:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-2: #f9fafc;
    --line: #e8edf5;
    --text: #172033;
    --muted: #7b8798;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #94a3b8;
    --sidebar-active: rgba(37, 99, 235, 0.18);
    --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 270px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 22px 16px;
    overflow-y: auto;
    z-index: 1040;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 0 8px;
}

.sidebar-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: var(--shadow-md);
}

.sidebar-brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.sidebar-brand-subtitle {
    font-size: 12px;
    color: var(--sidebar-muted);
}

.sidebar-section {
    margin-bottom: 26px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sidebar-muted);
    padding: 0 10px;
    margin-bottom: 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sidebar-text);
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 18px;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.app-main {
    flex: 1;
    margin-left: 270px;
    min-height: 100vh;
}

.app-topbar {
    height: 84px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.topbar-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
    box-shadow: var(--shadow-sm);
}

.topbar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.topbar-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.topbar-user-role {
    font-size: 12px;
    color: var(--muted);
}

.btn-logout,
.btn-toggle-sidebar {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.btn-logout:hover,
.btn-toggle-sidebar:hover {
    background: #f8fafc;
}

.app-content {
    padding: 30px 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.section-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}

.section-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
}

.card-surface {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.stat-card {
    padding: 22px;
    height: 100%;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-meta {
    font-size: 13px;
    color: var(--muted);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.icon-blue { background: #3b82f6; }
.icon-green { background: #22c55e; }
.icon-orange { background: #f59e0b; }
.icon-red { background: #ef4444; }

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.panel-header {
    padding: 22px 24px 0;
}

.panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.panel-body {
    padding: 20px 24px 24px;
}

.table-modern {
    margin: 0;
}

.table-modern thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    background: #fbfcfe;
}

.table-modern tbody td {
    border-bottom: 1px solid #f0f3f8;
    padding: 16px;
    vertical-align: middle;
}

.table-modern tbody tr:hover {
    background: #fafcff;
}

.form-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    box-shadow: none;
    padding-left: 14px;
    padding-right: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
    padding: 10px 16px;
}

.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.badge-soft {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-soft-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.badge-soft-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.badge-soft-info {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fb;
    padding: 24px;
}

.login-wrap {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
    border: 1px solid #e7edf7;
}

.login-hero {
    background: #0f172a;
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.login-hero h2 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin: 24px 0 18px;
}

.login-hero p {
    color: rgba(255,255,255,0.82);
    font-size: 16px;
    max-width: 420px;
}

.login-hero-features {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.login-hero-feature {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255,255,255,0.9);
}

.login-card-pro {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card-title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 8px;
}

.login-card-subtitle {
    color: var(--muted);
    margin-bottom: 28px;
}

.login-demo-box {
    margin-top: 24px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    font-size: 14px;
}

.sidebar-overlay {
    display: none;
}

.resumen-wrap {
    position: relative;
    width: 100%;
    max-height: 75vh;
    overflow: auto;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e8edf5;
}

.tabla-resumen-horarios {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    background: #fff;
}

.tabla-resumen-horarios th,
.tabla-resumen-horarios td {
    white-space: nowrap;
    min-width: 48px;       /* antes 72px */
    height: 26px;          /* antes 40px */
    padding: 2px 4px;      /* antes 8px 10px */
    border-right: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    text-align: center;
    font-size: 11px;       /* antes 13px */
    line-height: 1.1;
    background: #fff;
}

.tabla-resumen-horarios thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f8fafc;
    font-size: 11px;
    line-height: 1.1;
    padding: 4px 2px;
}

.tabla-resumen-horarios .columna-hora {
    position: sticky;
    left: 0;
    z-index: 25;
    min-width: 70px;       /* antes 95px */
    background: #f8fafc !important;
    text-align: left;
    font-weight: 600;      /* antes 700 */
    font-size: 11px;
    padding-left: 6px;
    box-shadow: 2px 0 0 #e8edf5;
}

.tabla-resumen-horarios thead .columna-hora {
    top: 0;
    left: 0;
    z-index: 35;
    background: #f1f5f9 !important;
    box-shadow: 2px 0 0 #dbe3ef, inset 0 -1px 0 #dbe3ef;
}

.tabla-resumen-horarios tbody tr:hover td {
    background-color: #fafcff;
}

.tabla-resumen-horarios tbody tr:hover .columna-hora {
    background: #f1f5f9 !important;
}

.tabla-resumen-horarios .celda-vacia {
    background: #fff;
}

.tabla-resumen-horarios .nivel-bajo {
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
}

.tabla-resumen-horarios .nivel-medio {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
}

.tabla-resumen-horarios .nivel-alto {
    background: #fecaca;
    color: #991b1b;
    font-weight: 700;
}

.table-compact th,
.table-compact td {
    padding: 6px 8px;        /* antes suele ser 12-16px */
    font-size: 13px;
    line-height: 1.2;
    vertical-align: middle;
}

.table-compact th {
    font-weight: 600;
    background: #f8fafc;
}

.table-compact td {
    background: #fff;
}

.table-compact tr {
    height: 38px;            /* controla altura total */
}

.table-compact .btn {
    padding: 3px 8px;
    font-size: 12px;
}

.table-compact .badge {
    font-size: 11px;
    padding: 4px 6px;
}

.table-compact input,
.table-compact select {
    height: 28px;
    font-size: 12px;
    padding: 2px 6px;
}

.table-compact thead th {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 12px;
}

.sidebar-dropdown {
    margin-bottom: 6px;
}

.sidebar-dropdown-toggle {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
}

.sidebar-dropdown-arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.sidebar-dropdown.open .sidebar-dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    margin-top: 6px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid rgba(148, 163, 184, 0.25);
}

.sidebar-sublink {
    display: block;
    color: var(--sidebar-text);
    padding: 9px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-sublink:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-sublink.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.table-compact th select {
    font-size: 12px;
    padding: 2px 4px;
    height: 28px;
}

.table th select {
    font-size: 12px;
    padding: 2px 4px;
    height: 28px;
}


.semana-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 14px;
}

.semana-card {
    border-radius: 18px;
    padding: 16px;
    min-height: 150px;
    border: 1px solid #e8edf5;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.semana-card-dia {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.semana-card-fecha {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1;
}

.semana-card-tipo {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
}

.semana-card-valor {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.semana-card-tramo {
    font-size: 13px;
    line-height: 1.35;
}

.semana-card-sindato {
    font-size: 13px;
    color: #64748b;
}

.semana-turno {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.semana-turno .semana-card-tipo {
    background: #dbeafe;
    color: #1d4ed8;
}

.semana-partido {
    background: #fffbeb;
    border-color: #fde68a;
}
.semana-partido .semana-card-tipo {
    background: #fef3c7;
    color: #b45309;
}

.semana-libre {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.semana-libre .semana-card-tipo {
    background: #dcfce7;
    color: #15803d;
}

.semana-vacaciones {
    background: #ecfeff;
    border-color: #a5f3fc;
}
.semana-vacaciones .semana-card-tipo {
    background: #cffafe;
    color: #0f766e;
}

.semana-baja {
    background: #fef2f2;
    border-color: #fecaca;
}
.semana-baja .semana-card-tipo {
    background: #fee2e2;
    color: #b91c1c;
}

.semana-permiso {
    background: #faf5ff;
    border-color: #e9d5ff;
}
.semana-permiso .semana-card-tipo {
    background: #f3e8ff;
    color: #7e22ce;
}

.semana-sindato {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.semana-sindato .semana-card-tipo {
    background: #e2e8f0;
    color: #475569;
}

.semana-hoy {
    position: relative;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.semana-hoy::after {
    content: "HOY";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 800;
    background: #2563eb;
    color: #fff;
    padding: 3px 6px;
    border-radius: 999px;
}

.semana-hoy { background: #e9f3fb !important; }

.mes-calendario {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 12px;
}

.mes-header {
    background: #f8fafc;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.mes-dia {
    border-radius: 18px;
    padding: 14px;
    min-height: 140px;
    border: 1px solid #e8edf5;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    background: #fff;
}

.mes-dia-vacio {
    background: transparent;
    border: 1px dashed #e2e8f0;
    box-shadow: none;
}

.mes-dia-numero {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1;
}

.mes-dia-valor {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.mes-dia-tramo {
    font-size: 12px;
    line-height: 1.35;
}

.mes-dia-tipo {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mes-turno {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.mes-turno .mes-dia-tipo {
    background: #dbeafe;
    color: #1d4ed8;
}

.mes-partido {
    background: #fffbeb;
    border-color: #fde68a;
}
.mes-partido .mes-dia-tipo {
    background: #fef3c7;
    color: #b45309;
}

.mes-libre {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.mes-libre .mes-dia-tipo {
    background: #dcfce7;
    color: #15803d;
}

.mes-vacaciones {
    background: #ecfeff;
    border-color: #a5f3fc;
}
.mes-vacaciones .mes-dia-tipo {
    background: #cffafe;
    color: #0f766e;
}

.mes-baja {
    background: #fef2f2;
    border-color: #fecaca;
}
.mes-baja .mes-dia-tipo {
    background: #fee2e2;
    color: #b91c1c;
}

.mes-permiso {
    background: #faf5ff;
    border-color: #e9d5ff;
}
.mes-permiso .mes-dia-tipo {
    background: #f3e8ff;
    color: #7e22ce;
}

.mes-sindato {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.mes-sindato .mes-dia-tipo {
    background: #e2e8f0;
    color: #475569;
}


.hoy-wrap {
    max-width: 980px;
}

.hoy-card {
    border-radius: 24px;
    padding: 28px;
    border: 1px solid #e8edf5;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.hoy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.hoy-fecha-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.hoy-fecha-valor {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.hoy-dia-semana {
    font-size: 15px;
    color: #64748b;
    margin-top: 6px;
}

.hoy-tipo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.hoy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.hoy-box {
    border: 1px solid #e8edf5;
    border-radius: 18px;
    padding: 18px;
    background: rgba(255,255,255,0.65);
}

.hoy-box-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.hoy-box-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.hoy-box-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

.hoy-valor-original {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hoy-observaciones {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid #e8edf5;
    color: #475569;
    font-size: 14px;
}

.hoy-turno {
    background: #e9f3fb;
    border-color: #bfdbfe;
}
.hoy-turno .hoy-tipo {
    background: #dbeafe;
    color: #1d4ed8;
}

.hoy-partido {
    background: #fff1df;
    border-color: #fde68a;
}
.hoy-partido .hoy-tipo {
    background: #fef3c7;
    color: #b45309;
}

.hoy-libre {
    background: #e2f4ee;
    border-color: #bbf7d0;
}
.hoy-libre .hoy-tipo {
    background: #dcfce7;
    color: #15803d;
}

.hoy-vacaciones {
    background: #e5f5f2;
    border-color: #a5f3fc;
}
.hoy-vacaciones .hoy-tipo {
    background: #cffafe;
    color: #0f766e;
}

.hoy-baja {
    background: #fbe6e4;
    border-color: #fecaca;
}
.hoy-baja .hoy-tipo {
    background: #fee2e2;
    color: #b91c1c;
}

.hoy-permiso {
    background: #f0ebf7;
    border-color: #e9d5ff;
}
.hoy-permiso .hoy-tipo {
    background: #f3e8ff;
    color: #7e22ce;
}

.hoy-sindato {
    background: #f2f6f8;
    border-color: #e2e8f0;
}
.hoy-sindato .hoy-tipo {
    background: #e2e8f0;
    color: #475569;
}

.mes-dia.semana-hoy {
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

@media (max-width: 767.98px) {
    .hoy-card {
        padding: 20px;
    }

    .hoy-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hoy-fecha-valor {
        font-size: 28px;
    }

    .hoy-grid {
        grid-template-columns: 1fr;
    }

    .hoy-box-value {
        font-size: 24px;
    }
}

@media (max-width: 1199.98px) {
    .mes-calendario {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .mes-calendario {
        grid-template-columns: repeat(1, minmax(120px, 1fr));
    }

    .mes-header {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .semana-strip {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .semana-strip {
        grid-template-columns: repeat(1, minmax(140px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 1035;
    }

    .app-main {
        margin-left: 0;
    }

    .app-topbar {
        padding: 0 16px;
        height: 76px;
    }

    .app-content {
        padding: 20px 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .login-wrap {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 32px 24px;
    }

    .login-card-pro {
        padding: 32px 24px;
    }
}

/* FarmaDay product refresh: shared visual system for the operational panel. */
:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --line: #e5eaf1;
    --text: #17212f;
    --muted: #718096;
    --primary: #0d6efd;
    --primary-dark: #0757c9;
    --sidebar-bg: #102337;
    --sidebar-text: #c8d4df;
    --sidebar-muted: #7f94a8;
    --sidebar-active: #1b4d73;
    --shadow-sm: 0 6px 20px rgba(16, 35, 55, 0.06);
    --shadow-md: 0 16px 34px rgba(16, 35, 55, 0.10);
    --radius: 14px;
}

body.app-body { font-family: 'DM Sans', Inter, sans-serif; background: var(--bg); color: var(--text); }
h1, h2, h3, h4, .sidebar-brand-title, .topbar-title { font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif; }
.app-sidebar { width: 254px; background: var(--sidebar-bg); padding: 26px 14px 18px; box-shadow: 12px 0 32px rgba(16,35,55,.05); }
.app-main { margin-left: 254px; }
.sidebar-brand { gap: 12px; margin-bottom: 24px; padding: 0 10px; }
.sidebar-brand-icon { width: 38px; height: 38px; border-radius: 11px; background: #4fbd98; box-shadow: none; font-size: 20px; }
.sidebar-brand-title { font-size: 15px; letter-spacing: -.02em; }
.sidebar-brand-subtitle { font-size: 11px; color: #93a8ba; }
.sidebar-context { display:flex; align-items:center; gap:8px; margin: 0 4px 24px; padding: 10px 11px; border:1px solid rgba(255,255,255,.10); border-radius: 9px; color:#adbecb; font-size:11px; }
.sidebar-context-dot { width:7px; height:7px; border-radius:50%; background:#54c99f; box-shadow:0 0 0 3px rgba(84,201,159,.13); }
.sidebar-context .bi { font-size: 10px; color: #7891a6; }
.sidebar-section { margin-bottom: 24px; }
.sidebar-section-title { font-size:10px; letter-spacing:.12em; color:#7e94a8; padding:0 11px; margin-bottom:8px; }
.sidebar-link { padding: 10px 11px; border-radius: 9px; margin-bottom: 3px; gap: 11px; font-size: 13px; color: #b9c9d6; }
.sidebar-link i { font-size: 16px; color:#86a2b7; width: 18px; text-align:center; }
.sidebar-link:hover { background: rgba(255,255,255,.06); color:#fff; }
.sidebar-link.active { background: var(--sidebar-active); color:#fff; box-shadow: inset 3px 0 0 #59c6a0; }
.sidebar-link.active i { color:#70d4ad; }
.sidebar-submenu { margin-left: 13px; padding-left: 13px; border-left-color: rgba(151,177,197,.25); }
.sidebar-sublink { font-size:12px; padding: 8px 10px; }
.sidebar-footer { display:flex; align-items:center; gap:8px; padding: 15px 7px 0; margin-top: 28px; border-top: 1px solid rgba(255,255,255,.10); }
.sidebar-footer-user { display:flex; align-items:center; gap:9px; min-width:0; flex:1; }
.sidebar-user-avatar { width:30px; height:30px; flex:0 0 30px; border-radius:9px; display:grid; place-items:center; background:#2c5878; color:#d9fff0; font-size:12px; font-weight:700; }
.sidebar-footer-copy { min-width:0; display:flex; flex-direction:column; gap:2px; }
.sidebar-footer-copy strong { color:#eef5f8; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-footer-copy span { color:#8da5b8; font-size:10px; }
.sidebar-logout { width:31px; height:31px; display:grid; place-items:center; border-radius:8px; color:#9fb4c2; }
.sidebar-logout:hover { background:rgba(255,255,255,.08); color:#fff; }
.app-topbar { height:78px; padding:0 34px; background:rgba(255,255,255,.94); border-bottom:1px solid var(--line); box-shadow: 0 2px 12px rgba(16,35,55,.025); }
.topbar-left { gap:16px; }
.topbar-kicker { color:#8a99a8; font-size:10px; font-weight:700; letter-spacing:.12em; margin-bottom:3px; }
.topbar-title { font-size:18px; line-height:1.1; font-weight:700; letter-spacing:-.02em; }
.topbar-subtitle { display:none; }
.topbar-right { gap:14px; }
.topbar-action { position:relative; width:37px; height:37px; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; color:#5d7082; background:#fff; }
.topbar-action:hover { color:var(--primary); border-color:#bcd3ed; }
.topbar-action-dot { width:6px; height:6px; position:absolute; top:7px; right:7px; border-radius:50%; background:#ee8c5b; border:2px solid #fff; }
.topbar-user { border:0; border-radius:0; box-shadow:none; padding:0; background:transparent; }
.topbar-user-avatar { width:35px; height:35px; border-radius:10px; background:#d9efe8; color:#19775f; font-size:13px; }
.topbar-user-name { font-size:12px; }
.topbar-user-role { font-size:10px; }
.btn-toggle-sidebar { border-radius:9px; box-shadow:none; }
.app-content { padding: 34px 38px 50px; max-width: 1600px; }
.dashboard-intro { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:28px; }
.dashboard-intro h2 { margin:4px 0 6px; font-size:27px; letter-spacing:-.035em; }
.dashboard-intro p { margin:0; color:var(--muted); font-size:13px; }
.eyebrow-label { display:block; color:#8392a1; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; }
.dashboard-primary-action { white-space:nowrap; display:inline-flex; align-items:center; gap:8px; padding:11px 16px; }
.kpi-grid { display:grid; gap:14px; }
.kpi-grid-four { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.kpi-card { min-height:150px; position:relative; display:flex; flex-direction:column; padding:20px; border:1px solid var(--line); border-radius:13px; background:#fff; box-shadow:var(--shadow-sm); overflow:hidden; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.kpi-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:#c8d9e9; color:inherit; }
.kpi-icon { width:35px; height:35px; display:grid; place-items:center; border-radius:10px; margin-bottom:17px; font-size:16px; }
.kpi-label { color:#687a89; font-size:11px; font-weight:600; }
.kpi-card strong { margin-top:4px; color:#1b2a39; font-family:'Plus Jakarta Sans', sans-serif; font-size:30px; line-height:1.1; letter-spacing:-.05em; }
.kpi-card small { margin-top:7px; color:#91a0ad; font-size:10px; }
.kpi-card-blue .kpi-icon { background:#e7f0fc; color:#206bc4; } .kpi-card-green .kpi-icon { background:#e3f5ee; color:#188463; } .kpi-card-violet .kpi-icon { background:#eeebfa; color:#7257b4; } .kpi-card-orange .kpi-icon { background:#fff0e7; color:#c9703d; }
.dashboard-grid { display:grid; gap:14px; }
.dashboard-grid-main { grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr); }
.dashboard-panel { background:#fff; border:1px solid var(--line); border-radius:13px; box-shadow:var(--shadow-sm); padding:24px; min-width:0; }
.panel-heading-row { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
.panel-heading-row h3, .dashboard-panel h3 { margin:5px 0 0; font-size:17px; letter-spacing:-.025em; }
.text-link { color:#2a72bb; font-size:11px; font-weight:700; white-space:nowrap; }
.text-link:hover { color:#0d4f8c; }
.text-link .bi { margin-left:3px; }
.pharmacy-list, .request-list { display:flex; flex-direction:column; }
.pharmacy-row, .request-row { display:flex; align-items:center; gap:12px; min-width:0; padding:13px 0; border-top:1px solid #edf1f5; color:inherit; }
.pharmacy-row:first-child, .request-row:first-child { border-top:0; padding-top:0; }
.pharmacy-row:last-child, .request-row:last-child { padding-bottom:0; }
.pharmacy-row:hover .pharmacy-copy strong, .request-row:hover .request-copy strong { color:var(--primary); }
.pharmacy-mark, .request-avatar { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; flex:0 0 34px; background:#e8f3f8; color:#267496; font-size:14px; }
.request-avatar { border-radius:50%; background:#edf1fa; color:#6c70a4; }
.pharmacy-copy, .request-copy { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
.pharmacy-copy strong, .request-copy strong { font-size:12px; color:#253443; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:color .15s ease; }
.pharmacy-copy small, .request-copy small { font-size:10px; color:#8796a3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pharmacy-meta { display:flex; flex-direction:column; align-items:flex-end; gap:2px; color:#405767; }
.pharmacy-meta strong { font-size:13px; } .pharmacy-meta small { font-size:9px; color:#9aa8b3; }
.row-chevron { color:#a3b0bb; font-size:12px; }
.accent-panel { background:#102d43; color:#fff; border-color:#102d43; padding:26px; }
.accent-panel .eyebrow-label { color:#78a0b6; } .accent-panel h3 { color:#fff; font-size:20px; } .accent-panel p { color:#adc0cd; font-size:12px; line-height:1.6; margin:11px 0 22px; max-width:260px; }
.accent-panel-icon { width:38px; height:38px; display:grid; place-items:center; margin-bottom:22px; border-radius:11px; background:#234b65; color:#70d4ad; }
.quick-actions { display:flex; flex-direction:column; gap:8px; }
.quick-actions a { display:flex; align-items:center; gap:10px; padding:10px 11px; border-radius:8px; color:#e2edf2; background:rgba(255,255,255,.07); font-size:11px; }
.quick-actions a:hover { background:rgba(255,255,255,.13); color:#fff; } .quick-actions a > .bi:last-child { margin-left:auto; font-size:10px; color:#8cb0bf; }
.workspace-banner { display:flex; align-items:center; gap:14px; padding:18px 20px; margin-bottom:16px; background:#eaf5f1; border:1px solid #d3ebe1; border-radius:13px; }
.workspace-banner-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:11px; background:#ccebdd; color:#167a5d; font-size:18px; }
.workspace-banner h3 { margin:4px 0 3px; font-size:16px; } .workspace-banner p { margin:0; color:#648376; font-size:11px; } .workspace-banner .status-pill { margin-left:auto; }
.status-pill { display:inline-flex; align-items:center; gap:5px; width:max-content; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:700; white-space:nowrap; }
.status-pill-success { background:#e1f5eb; color:#167455; } .status-pill-warning { background:#fff0dc; color:#a96419; } .status-pill-danger { background:#fde8e7; color:#b94b46; } .status-pill .bi { font-size:7px; }
.action-panel { display:flex; flex-direction:column; justify-content:center; } .action-panel p { color:var(--muted); font-size:12px; line-height:1.6; margin:10px 0 20px; }
.btn-secondary-soft { color:#365b71; background:#edf3f7; border:1px solid #e0e9ef; } .btn-secondary-soft:hover { color:#1b4c67; background:#e2edf3; }
.employee-hero { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:24px 28px; border:1px solid #cfe5eb; border-radius:13px; background:#e8f5f5; }
.employee-hero h3 { margin:5px 0 4px; font-size:23px; letter-spacing:-.04em; } .employee-hero p { margin:0; color:#5d8087; font-size:12px; } .employee-hero-icon { width:55px; height:55px; display:grid; place-items:center; border-radius:16px; background:#c5e7e5; color:#207d80; font-size:25px; }
.employee-grid { grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr); }
.schedule-highlight { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px; border-radius:10px; background:#f3f8fb; border:1px solid #e1ebf0; }
.schedule-time { display:flex; align-items:center; gap:9px; color:#234d63; font-size:16px; font-weight:700; } .schedule-time .bi { color:#42a684; }
.empty-state { padding:30px 16px; color:#8a9aa6; text-align:center; } .empty-state .bi { display:block; margin-bottom:9px; color:#afc0cb; font-size:26px; } .empty-state p { margin:0 0 12px; font-size:12px; } .empty-state.compact { padding:18px 12px; }
.card-surface { border-radius:13px; box-shadow:var(--shadow-sm); }
.panel-header { padding:20px 24px 0; } .panel-body { padding:18px 24px 24px; }
.table-modern thead th { background:#f8fafc; color:#81909c; font-size:10px; letter-spacing:.08em; padding:13px 16px; }
.table-modern tbody td { color:#455665; font-size:12px; padding:14px 16px; }
.form-control, .form-select { min-height:44px; border-radius:9px; font-size:13px; }
.form-label { font-size:12px; }
.btn { border-radius:9px; font-size:12px; padding:9px 14px; }
.btn-primary { background:var(--primary); box-shadow:0 5px 12px rgba(13,110,253,.18); } .btn-primary:hover { background:var(--primary-dark); }
.badge-soft { padding:5px 8px; font-size:10px; }
.alert { border-radius:9px; font-size:12px; }

/* FarmaDay clinical operations theme. */
:root {
    --brand-ink: #0b2538;
    --brand-ink-soft: #163b52;
    --brand-blue: #246fba;
    --brand-blue-dark: #18558f;
    --brand-teal: #159b78;
    --brand-teal-dark: #0f765d;
    --brand-mint: #e2f4ee;
    --brand-sky: #e9f3fb;
    --brand-amber: #bd741d;
    --brand-coral: #bd554c;
    --bg: #f3f7f9;
    --panel: #ffffff;
    --line: #dfe8ed;
    --text: #122c3d;
    --muted: #6e8290;
    --primary: var(--brand-teal);
    --primary-dark: var(--brand-teal-dark);
    --sidebar-bg: var(--brand-ink);
    --sidebar-active: #1a5368;
    --shadow-sm: 0 5px 18px rgba(11, 37, 56, .055);
    --shadow-md: 0 14px 30px rgba(11, 37, 56, .10);
}

body.app-body { background: var(--bg); color: var(--text); }
.app-sidebar { background: var(--brand-ink); border-right:1px solid #17435a; box-shadow: 8px 0 24px rgba(11,37,56,.06); }
.sidebar-brand-icon { background: var(--brand-teal); color:#fff; }
.sidebar-context { background:rgba(255,255,255,.035); border-color:rgba(177,225,221,.16); }
.sidebar-context-dot { background:#50cda5; box-shadow:0 0 0 3px rgba(80,205,165,.14); }
.sidebar-link.active { background:var(--sidebar-active); box-shadow:inset 3px 0 0 #56cbaa; }
.sidebar-link.active i { color:#72d8b4; }
.sidebar-submenu { border-left-color:rgba(173,220,220,.24); }
.sidebar-sublink.active { background:#1d5a70; }
.sidebar-user-avatar { background:#1f5a68; color:#d4faed; }
.app-topbar { background:rgba(255,255,255,.97); border-bottom-color:var(--line); }
.topbar-kicker { color:#7591a1; }
.topbar-action { color:#527183; border-color:var(--line); }
.topbar-action:hover { color:var(--brand-teal-dark); border-color:#b4d9d1; }
.topbar-action-dot { background:#e18b46; }
.topbar-user-avatar { background:var(--brand-mint); color:var(--brand-teal-dark); }
.app-content { max-width:1540px; }
.section-header { margin-bottom:26px; align-items:flex-end; }
.section-title { color:var(--brand-ink); font-size:24px; letter-spacing:-.035em; }
.section-subtitle { color:var(--muted); font-size:13px; }
.stat-card { border-radius:13px; }
.stat-label { color:#718792; font-size:11px; }
.stat-value { color:var(--brand-ink); font-size:30px; }
.stat-meta { color:#8a9da7; font-size:11px; }
.dashboard-intro h2 { color:var(--brand-ink); }
.eyebrow-label { color:#78919f; }
.dashboard-primary-action, .btn-primary { background:var(--brand-teal); border-color:var(--brand-teal); box-shadow:0 5px 12px rgba(21,155,120,.19); }
.dashboard-primary-action:hover, .btn-primary:hover { background:var(--brand-teal-dark); border-color:var(--brand-teal-dark); }
.kpi-card { border-color:var(--line); box-shadow:var(--shadow-sm); }
.kpi-card:hover { border-color:#b8d9d5; box-shadow:var(--shadow-md); }
.kpi-card strong { color:var(--brand-ink); }
.kpi-card-blue .kpi-icon { background:var(--brand-sky); color:var(--brand-blue); }
.kpi-card-green .kpi-icon { background:var(--brand-mint); color:var(--brand-teal-dark); }
.kpi-card-violet .kpi-icon { background:#e8f1f3; color:#287286; }
.kpi-card-orange .kpi-icon { background:#fff1df; color:var(--brand-amber); }
.dashboard-panel, .card-surface { border-color:var(--line); box-shadow:var(--shadow-sm); }
.dashboard-panel h3, .panel-title { color:var(--brand-ink); }
.text-link { color:var(--brand-blue); }
.text-link:hover { color:var(--brand-blue-dark); }
.pharmacy-mark { background:var(--brand-mint); color:var(--brand-teal-dark); }
.request-avatar { background:var(--brand-sky); color:var(--brand-blue); }
.pharmacy-copy strong, .request-copy strong { color:#1c3b4d; }
.pharmacy-row:hover .pharmacy-copy strong, .request-row:hover .request-copy strong { color:var(--brand-teal-dark); }
.accent-panel { background:var(--brand-ink); border-color:var(--brand-ink); }
.accent-panel-icon { background:#18465c; color:#74d7b7; }
.workspace-banner { background:var(--brand-mint); border-color:#c8e8dc; }
.workspace-banner-icon { background:#c7eadd; color:var(--brand-teal-dark); }
.status-pill-success, .badge-soft-success { background:#def3e9; color:#117457; }
.status-pill-warning, .badge-soft-warning { background:#fff0da; color:#a45f14; }
.status-pill-danger, .badge-soft-danger { background:#fbe6e4; color:var(--brand-coral); }
.status-pill-info, .badge-soft-info { background:var(--brand-sky); color:var(--brand-blue-dark); }
.btn-secondary-soft { color:#315f73; background:#edf4f6; border-color:#d8e6eb; }
.btn-secondary-soft:hover { color:var(--brand-ink); background:#e2eef1; }
.employee-hero { background:#e5f5f2; border-color:#c8e9df; }
.employee-hero-icon { background:#c8e9df; color:var(--brand-teal-dark); }
.schedule-highlight { background:#f1f8f7; border-color:#d7ebe5; }
.schedule-time .bi { color:var(--brand-teal); }
.table-modern { --bs-table-bg:transparent; }
.table-modern thead th { background:#f5f9fa; color:#708793; border-bottom-color:#dce7eb; }
.table-modern tbody td { color:#466171; border-bottom-color:#edf2f4; }
.table-modern tbody tr:hover { background:#f6fbfa; }
.form-control, .form-select { border-color:#cfdde4; color:var(--text); background:#fff; }
.form-control:focus, .form-select:focus { border-color:#6fc5ad; box-shadow:0 0 0 .2rem rgba(21,155,120,.13); }
.form-label { color:#294858; }
.login-page { background:#eef5f6; }
.login-wrap { border-color:#d9e6e8; box-shadow:0 24px 60px rgba(11,37,56,.12); }
.login-hero { background:var(--brand-ink); }
.login-hero-badge { background:rgba(21,155,120,.18); border-color:rgba(121,219,188,.25); }
.login-card-title { color:var(--brand-ink); }
.icon-blue { background:var(--brand-blue); }
.icon-green { background:var(--brand-teal); }
.icon-orange { background:#d38a2c; }
.icon-red { background:var(--brand-coral); }
.btn-warning { background:#d38a2c; border-color:#d38a2c; color:#fff; }
.btn-warning:hover { background:#a96818; border-color:#a96818; color:#fff; }
.btn-danger { background:var(--brand-coral); border-color:var(--brand-coral); }
.btn-danger:hover { background:#963f3a; border-color:#963f3a; }
.semana-turno, .mes-turno, .hoy-turno { background:#e9f3fb; border-color:#c8dff0; }
.semana-partido, .mes-partido, .hoy-partido { background:#fff1df; border-color:#f0d6af; }
.semana-libre, .mes-libre, .hoy-libre { background:#e2f4ee; border-color:#c7e8da; }
.semana-vacaciones, .mes-vacaciones, .hoy-vacaciones { background:#e5f5f2; border-color:#c5e7df; }
.semana-baja, .mes-baja, .hoy-baja { background:#fbe6e4; border-color:#f0cac5; }
.semana-permiso, .mes-permiso, .hoy-permiso { background:#f0ebf7; border-color:#ddd0ee; }
.semana-sindato, .mes-sindato, .hoy-sindato { background:#f2f6f8; border-color:#dce7eb; }
.semana-turno .semana-card-tipo, .mes-turno .mes-dia-tipo, .hoy-turno .hoy-tipo { background:#d8eaf8; color:#18558f; }
.semana-partido .semana-card-tipo, .mes-partido .mes-dia-tipo, .hoy-partido .hoy-tipo { background:#ffe7c4; color:#a45f14; }
.semana-libre .semana-card-tipo, .mes-libre .mes-dia-tipo, .hoy-libre .hoy-tipo { background:#cfeee1; color:#117457; }
.semana-vacaciones .semana-card-tipo, .mes-vacaciones .mes-dia-tipo, .hoy-vacaciones .hoy-tipo { background:#ccebe7; color:#176b71; }
.semana-baja .semana-card-tipo, .mes-baja .mes-dia-tipo, .hoy-baja .hoy-tipo { background:#f6d4d0; color:#963f3a; }
.semana-permiso .semana-card-tipo, .mes-permiso .mes-dia-tipo, .hoy-permiso .hoy-tipo { background:#e4d9f0; color:#68469a; }
.semana-sindato .semana-card-tipo, .mes-sindato .mes-dia-tipo, .hoy-sindato .hoy-tipo { background:#e3edf1; color:#486271; }
.semana-hoy { background:#e9f3fb !important; }
