* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #dbe4ee;
    --text: #17212b;
    --muted: #5b6876;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --secondary: #e5e7eb;
    --secondary-hover: #d1d5db;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success-bg: #ecfdf3;
    --success-text: #166534;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --info-bg: #eff6ff;
    --info-text: #1d4ed8;
    --sidebar: #0f172a;
    --sidebar-text: #e2e8f0;
    --sidebar-muted: #cbd5e1;
    --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.2s ease;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.45;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* =========================
   LOGIN CORPORATIVO
========================= */

.login-body {
    min-height: 100vh;
}

.login-body--corporate {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.12), transparent 30%),
        linear-gradient(135deg, #eef4fb 0%, #f8fafc 100%);
}

.login-shell {
    width: 100%;
    max-width: 1220px;
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.login-showcase {
    position: relative;
    min-height: 680px;
    background: #0f172a;
    overflow: hidden;
}

.login-showcase__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.login-showcase__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.24)),
        linear-gradient(to right, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.08));
    z-index: 1;
}

.login-showcase__content {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 40px;
    z-index: 2;
    color: #fff;
}

.login-showcase__eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-showcase__content h1 {
    font-size: 42px;
    line-height: 1.08;
    margin-bottom: 14px;
}

.login-showcase__content p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.65;
    font-size: 16px;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: none;
    padding: 34px 28px;
    width: 100%;
    max-width: 430px;
}

.login-card__header {
    margin-bottom: 24px;
}

.login-brand {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.login-card__header h1,
.login-card__header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #0f172a;
}

.login-card__header p {
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================
   FORMULARIOS
========================= */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.form-card {
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* =========================
   BOTONES Y ALERTAS
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s ease, opacity var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: #111827;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #bbf7d0;
}

.alert-list {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* =========================
   LAYOUT APP
========================= */

.app-body {
    min-height: 100vh;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: var(--sidebar);
    color: #fff;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-shrink: 0;
}

.sidebar__brand h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

.sidebar__brand p {
    color: var(--sidebar-muted);
    font-size: 14px;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar__link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--sidebar-text);
    transition: background var(--transition), color var(--transition);
}

.sidebar__link:hover,
.sidebar__link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar__link--danger:hover {
    background: rgba(220, 38, 38, 0.18);
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

/* =========================
   TOPBAR / DASHBOARD
========================= */

.topbar {
    margin-bottom: 24px;
}

.topbar h1 {
    font-size: 30px;
    margin-bottom: 8px;
    color: #0f172a;
}

.topbar p {
    color: var(--muted);
}

.topbar--between {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #eaf2ff;
    color: #1d4ed8;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card h3 {
    font-size: 20px;
    color: #0f172a;
}

.card p {
    color: var(--muted);
    line-height: 1.6;
}

/* =========================
   TABLAS
========================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th {
    font-size: 14px;
    color: var(--muted);
    background: var(--surface-soft);
}

.table td {
    font-size: 14px;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================
   BADGES / TEXTOS
========================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge--success {
    background: #ecfdf3;
    color: #166534;
}

.status-badge--danger {
    background: #fef2f2;
    color: #991b1b;
}

.status-badge--info {
    background: var(--info-bg);
    color: var(--info-text);
}

.text-muted {
    color: var(--muted);
    font-size: 13px;
}

/* =========================
   AGENDA
========================= */

.agenda-list {
    display: grid;
    gap: 18px;
}

.agenda-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.agenda-item__order {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        min-height: 320px;
    }

    .login-showcase__content h1 {
        font-size: 30px;
    }
}

@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .login-panel {
        padding: 20px;
    }

    .login-showcase__content {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }

    .login-showcase__content h1 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 18px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .login-card {
        padding: 24px 18px;
    }
}
.login-logo-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.login-logo {
    max-width: 140px;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.app-watermark {
    position: fixed;
    right: 18px;
    bottom: 14px;
    z-index: 999;
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.42);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(6px);
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    pointer-events: none;
    user-select: none;
}

.app-watermark strong {
    color: rgba(29, 78, 216, 0.78);
    font-weight: 800;
}

@media (max-width: 640px) {
    .app-watermark {
        right: 10px;
        bottom: 10px;
        font-size: 11px;
        padding: 5px 9px;
    }

    .login-logo {
        max-width: 120px;
    }
}