* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, #e8f1ff 100%);
    color: #1e293b;
}

.container {
    width: 95%;
    max-width: 1080px;
    margin: 40px auto;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #d7e6ff;
    box-shadow: 0 10px 28px rgba(30, 64, 175, 0.10);
    padding: 24px;
}

h1, h2 {
    margin-top: 0;
}

.center-message {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-box {
    max-width: 700px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #e2ecff;
    color: #1e3a8a;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-success {
    background: #0ea5e9;
    color: #fff;
}

.stack {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: #111827;
    color: #fff;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-disponible { background: #e0f2fe; color: #075985; }
.status-activa { background: #dcfce7; color: #166534; }
.status-inactiva { background: #fef9c3; color: #854d0e; }
.status-vencida { background: #fee2e2; color: #991b1b; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.owner-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
}

.owner-topbar {
    margin-bottom: 20px;
}

.owner-login-card {
    max-width: 560px;
    margin: 40px auto;
}

.owner-login-subtitle {
    margin-top: -8px;
    color: #475569;
}

.owner-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.kpi-card {
    background: linear-gradient(180deg, #fdfefe 0%, #f3f8ff 100%);
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
}

.kpi-label {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}

.kpi-value {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.owner-section-title {
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d7e6ff;
}

.owner-block-space {
    margin-top: 26px;
}

.owner-inner-card {
    padding: 16px;
    margin-bottom: 16px;
    background: #f6faff;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table a {
    word-break: break-all;
}

@media (max-width: 920px) {
    .container {
        width: 100%;
        padding: 0 12px;
        margin: 20px auto;
    }

    .card {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stack {
        width: 100%;
    }

    .stack .btn {
        width: 100%;
        text-align: center;
    }

    table {
        min-width: 980px;
    }

    th, td {
        padding: 10px;
        font-size: 14px;
        vertical-align: top;
    }

    .owner-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .kpi-card {
        padding: 12px;
    }

    .kpi-value {
        font-size: 18px;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 0 10px;
    }

    .card {
        padding: 14px;
        border-radius: 12px;
    }

    .owner-topbar {
        align-items: stretch;
    }

    .owner-topbar .btn {
        width: 100%;
        text-align: center;
    }

    .owner-kpis {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
