/* ══════════════════════════════════════════════════════════════
   BeautySoft — app.css
   Shared component styles. Load after app-tokens.css (§5 CLAUDE.md).
   Source Serif 4 (--font-display) is restricted to hero/login/dashboard
   VIP h1/h2 only — never in content-page headings (§5.5 CLAUDE.md).
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   Login — premium two-column shell
   ══════════════════════════════════════════════════════════════ */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #F5F4F0;
}
.login-aside {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 55%, #0a5440 100%);
    color: #fff;
    padding: 56px 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}
.login-aside::before,
.login-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.42;
    pointer-events: none;
    z-index: 0;
}
.login-aside::before {
    width: 460px; height: 460px;
    background: #2DB88A;
    top: -160px; right: -120px;
    animation: dhBlob1 18s ease-in-out infinite alternate;
}
.login-aside::after {
    width: 360px; height: 360px;
    background: #9FE1CB;
    bottom: -140px; left: -80px;
    animation: dhBlob2 22s ease-in-out infinite alternate;
}
.login-aside-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 85%);
    z-index: 1;
    pointer-events: none;
}
.login-aside-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.login-brand-logo {
    width: 220px;
    height: auto;
    display: block;
}
.login-aside h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2rem, 3.2vw, 2.7rem);
    line-height: 1.12;
    color: #fff;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}
.login-aside .login-tagline {
    font-size: 1.02rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.55;
    max-width: 440px;
    margin: 0;
}
.login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.93rem;
    color: rgba(255,255,255,0.9);
}
.login-features .feat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 0.95rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.login-aside-footer {
    position: relative;
    z-index: 2;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}
.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    min-height: 100vh;
}
.login-main-inner {
    width: 100%;
    max-width: 420px;
}
.login-main-logo {
    display: none;
    margin-bottom: 24px;
    text-align: center;
}
.login-main-logo img { height: 44px; width: auto; }
.login-card {
    background: #fff;
    border: 1px solid rgba(44,44,42,0.08);
    border-radius: 18px;
    box-shadow: 0 30px 60px -30px rgba(15,110,86,0.18), 0 8px 24px -12px rgba(44,44,42,0.08);
    overflow: hidden;
    position: relative;
}
.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1D9E75 0%, #0F6E56 60%, #f59e0b 100%);
    z-index: 1;
}
.login-card-body {
    padding: 44px 40px 36px;
}
.login-greeting-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0F6E56;
    background: rgba(29,158,117,0.1);
    border: 1px solid rgba(29,158,117,0.18);
    padding: 5px 11px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.login-greeting-eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.22);
}
.login-card h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: 1.7rem;
    line-height: 1.15;
    color: #2C2C2A;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.login-card .login-sub {
    color: #6b7280;
    font-size: 0.93rem;
    margin: 0 0 24px;
}
.login-card .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2C2C2A;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.login-card .form-control {
    border-radius: 10px;
    border: 1px solid #e4e3df;
    padding: 11px 14px;
    font-size: 0.95rem;
    background: #fafaf9;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.login-card .form-control:focus {
    border-color: #1D9E75;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29,158,117,0.12);
}
.login-submit {
    width: 100%;
    background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 100%);
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.97rem;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 22px -10px rgba(15,110,86,0.55);
    transition: transform .12s, box-shadow .15s, filter .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 14px 28px -12px rgba(15,110,86,0.6);
    color: #fff;
}
.login-submit:active { transform: translateY(0); }
.login-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 0.78rem;
    margin: 22px 0 0;
}
@media (max-width: 991px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-aside { display: none; }
    .login-main { padding: 28px 16px; min-height: 100vh; }
    .login-main-logo { display: block; }
    .login-card-body { padding: 36px 28px 30px; }
}

/* ══════════════════════════════════════════════════════════════
   Dashboard welcome panel (replaces flat welcome bar)
   ══════════════════════════════════════════════════════════════ */
.dash-welcome {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 18px;
    background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 100%);
    color: #fff;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 18px 40px -22px rgba(15,110,86,0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.dash-welcome::before {
    content: "";
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(159,225,203,0.55) 0%, rgba(159,225,203,0) 70%);
    top: -180px; right: -120px;
    z-index: 0;
    animation: dhBlob1 22s ease-in-out infinite alternate;
}
.dash-welcome::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 85%);
    z-index: 0;
    pointer-events: none;
}
.dash-welcome-content { position: relative; z-index: 1; max-width: 640px; }
.dash-welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 4px 11px;
    border-radius: 999px;
    margin-bottom: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.dash-welcome-eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.3);
}
.dash-welcome h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    line-height: 1.14;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.dash-welcome p {
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
    margin: 0;
}
.dash-welcome-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dash-welcome-actions .btn-quick {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    background: rgba(255,255,255,0.13);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.24);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background .15s, transform .12s;
    text-decoration: none;
}
.dash-welcome-actions .btn-quick:hover {
    background: rgba(255,255,255,0.22);
    color: #fff !important;
    transform: translateY(-1px);
    text-decoration: none;
}
/* Primary CTA on hero — solid white pill, teal text. Use for the one most-important action. */
.dash-welcome-actions .btn-quick.btn-quick-primary {
    background: #fff;
    border-color: rgba(255,255,255,0.9);
    color: #0F6E56 !important;
    font-weight: 700;
}
.dash-welcome-actions .btn-quick.btn-quick-primary:hover {
    background: rgba(255,255,255,0.92);
    color: #0F6E56 !important;
}

/* KPI cards (dashboard mini-grid) */
.kpi-mini {
    background: #fff;
    border: 1px solid rgba(44,44,42,0.08);
    border-radius: 14px;
    padding: 20px 22px;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.kpi-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -18px rgba(15,110,86,0.25);
}
.kpi-mini .kpi-mini-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.kpi-mini .kpi-mini-label {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin: 0;
}
.kpi-mini .kpi-mini-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.kpi-mini .kpi-mini-icon.bg-teal   { background: rgba(29,158,117,0.12); color: #0F6E56; }
.kpi-mini .kpi-mini-icon.bg-amber  { background: rgba(245,158,11,0.14); color: #b45309; }
.kpi-mini .kpi-mini-icon.bg-charcoal { background: rgba(44,44,42,0.08); color: #2C2C2A; }
.kpi-mini .kpi-mini-icon.bg-indigo { background: rgba(129,140,248,0.14); color: #4f46e5; }
.kpi-mini .kpi-mini-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #2C2C2A;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}
.kpi-mini .kpi-mini-sub {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
}
.kpi-mini.is-primary {
    background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 32px -18px rgba(15,110,86,0.55);
}
.kpi-mini.is-primary .kpi-mini-label,
.kpi-mini.is-primary .kpi-mini-sub { color: rgba(255,255,255,0.78); }
.kpi-mini.is-primary .kpi-mini-value { color: #fff; }
.kpi-mini.is-primary .kpi-mini-icon {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
}

/* Dark mode for new dashboard cards */
:root[data-menu-color="dark"] .kpi-mini {
    background: var(--card-bg);
    border-color: var(--card-border);
}
:root[data-menu-color="dark"] .kpi-mini .kpi-mini-value { color: var(--surface-900); }
:root[data-menu-color="dark"] .kpi-mini .kpi-mini-sub,
:root[data-menu-color="dark"] .kpi-mini .kpi-mini-label { color: #9aa39d; }

/* ══════════════════════════════════════════════════════════════
   Premium page header (clientes, tipos_servicio, empleados, …)
   Replaces the flat "h4 + p" pattern.
   ══════════════════════════════════════════════════════════════ */
.page-hero {
    position: relative;
    background: #fff;
    border: 1px solid rgba(44,44,42,0.07);
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    overflow: hidden;
    box-shadow: 0 6px 22px -16px rgba(44,44,42,0.18);
}
.page-hero::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #1D9E75 0%, #0F6E56 100%);
    border-radius: 14px 0 0 14px;
}
.page-hero::after {
    content: "";
    position: absolute;
    right: -120px; top: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29,158,117,0.10) 0%, rgba(29,158,117,0) 70%);
    pointer-events: none;
    z-index: 0;
}
.page-hero-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.page-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 10px 22px -12px rgba(15,110,86,0.55);
}
.page-hero-text { min-width: 0; }
.page-hero-title {
    font-family: var(--font-ui);
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2A;
    margin: 0 0 2px;
    letter-spacing: -0.01em;
    line-height: 1.15;
}
.page-hero-subtitle {
    font-size: 0.92rem;
    color: #6b7280;
    margin: 0;
}
.page-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

:root[data-menu-color="dark"] .page-hero {
    background: var(--card-bg);
    border-color: var(--card-border);
}
:root[data-menu-color="dark"] .page-hero-title { color: var(--surface-900); }
:root[data-menu-color="dark"] .page-hero-subtitle { color: #9aa39d; }

@media (max-width: 575px) {
    .page-hero { padding: 18px 18px 18px 22px; }
    .page-hero-icon { width: 44px; height: 44px; font-size: 1.15rem; }
    .page-hero-title { font-size: 1.2rem; }
    .page-hero-actions { width: 100%; }
    .page-hero-actions .btn { width: 100%; }
}

/* ── Page header ──────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}
.page-header h1 {
    font-family: var(--font-ui); /* Inter — Source Serif 4 only in hero/login/VIP */
    font-weight: 700;
    font-size: 1.7rem;
    margin: 0;
    color: var(--brand-900);
}
.page-header .subtitle {
    color: var(--surface-700);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ── Sidebar section labels ────────────────────────────────────── */
.sidebar-menu-section {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    padding: 20px 20px 6px;
    pointer-events: none;
    user-select: none;
}

/* ── DataTables controls ──────────────────────────────────────── */
.dataTables_wrapper {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    color: var(--brand-900);
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dataTables_wrapper .dataTables_filter {
    justify-content: flex-end;
}
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 500;
    color: var(--surface-700);
    white-space: nowrap;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-sm, 8px);
    padding: 4px 8px;
    font-family: var(--font-ui);
    font-size: 0.86rem;
    color: var(--brand-900);
    background: #fff;
    cursor: pointer;
    outline: none;
}
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-sm, 8px);
    padding: 7px 12px 7px 36px; /* espacio izq para icono lupa */
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--brand-900);
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231D9E75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 10px center;
    outline: none;
    min-width: 320px;
}
.dataTables_wrapper .dataTables_filter input::placeholder {
    color: var(--surface-500, #9aa3a7);
    font-style: italic;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}

/* Scroll horizontal cuando la tabla excede el ancho del contenedor.
   scrollX: true en DataTables genera .dataTables_scroll → su body es
   el área que scrollea. Forzamos que se vea claro con un fondo sutil
   y un borde para indicar overflow al usuario. */
.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    border-bottom: 1px solid var(--brand-100);
}
.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar {
    height: 10px;
}
.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: var(--brand-300, #6ec3a8);
    border-radius: 6px;
}
.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-track {
    background: var(--surface-100, #f0efe9);
}
.dataTables_wrapper .dataTables_info {
    color: var(--surface-700);
    font-size: 0.84rem;
    padding: 8px 0 0;
}
.dataTables_wrapper .dataTables_paginate {
    padding: 8px 0 0;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--brand-100);
    border-radius: 6px;
    font-size: 0.84rem;
    font-family: var(--font-ui);
    color: var(--brand-900) !important;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--brand-50);
    border-color: var(--brand-200);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.4;
    cursor: default;
    background: #fff;
}
.dataTables_wrapper .dataTables_processing {
    color: var(--brand-500);
    font-weight: 600;
}

/* ── Card components ──────────────────────────────────────────── */
.card-app {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.card-app .card-header-gradient {
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
    color: #fff;
    padding: 14px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-app .card-body { padding: 20px; }

/* ── Table components ─────────────────────────────────────────── */
.table-app {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}
.table-app thead th {
    background: var(--brand-50);
    color: var(--brand-900);
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--brand-100);
    white-space: nowrap;
}
.table-app tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--surface-200);
    vertical-align: middle;
}
.table-app tbody tr:hover td { background: var(--brand-50); }
.num-col { text-align: right; white-space: nowrap; }

/* ── Badge / pill ─────────────────────────────────────────────── */
.badge-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}
.badge-activo   { background: var(--brand-200); color: var(--brand-900); }
.badge-inactivo { background: var(--surface-200); color: var(--surface-700); }
.badge-amber    { background: #FEF3C7; color: #92400E; }
.badge-cargo    { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-200); }
.badge-esp      { background: #E0E7FF; color: var(--info-400); font-size: 0.72rem; padding: 2px 7px; }

/* ── Button components ────────────────────────────────────────── */
.btn-app {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast);
}
.btn-teal         { background: var(--brand-500); color: #fff; }
.btn-teal:hover   { background: var(--brand-600); color: #fff; }
.btn-charcoal     { background: var(--brand-900); color: #fff; }
.btn-charcoal:hover { background: var(--brand-800); color: #fff; }
.btn-outline      { background: transparent; color: var(--brand-600); border: 1px solid var(--brand-200); }
.btn-outline:hover { background: var(--brand-50); color: var(--brand-600); }
.btn-icon         { padding: 6px 10px; font-size: 0.85rem; }
.btn-accent       { background: var(--accent-500); color: #fff; }
.btn-accent:hover { background: #d97706; color: #fff; }

/* ── Utility ──────────────────────────────────────────────────── */
.text-muted-sm { color: var(--surface-700); font-size: 0.83rem; }
.no-records { padding: 40px 20px; text-align: center; color: var(--surface-700); }

/* ── Avatar — Clientes ────────────────────────────────────────── */
.cliente-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--brand-200);
}

/* ── Avatar + specialties — Empleados ────────────────────────── */
.emp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    font-weight: 700;
    font-size: 0.88rem;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--brand-200);
    flex-shrink: 0;
}
.emp-name-cell { display: flex; align-items: center; }
.esp-pills     { display: flex; flex-wrap: wrap; gap: 4px; }
.select-all-link {
    font-size: 0.82rem;
    color: var(--brand-500);
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
}

/* ── Color dot — Tipos de servicio ───────────────────────────── */
.color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--surface-300);
    vertical-align: middle;
    margin-right: 6px;
}

/* ══════════════════════════════════════════════════════════════
   Dashboard-specific
   ══════════════════════════════════════════════════════════════ */
.dash-section { margin-bottom: 28px; }

.btn-ghost-white {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.btn-ghost-white:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* VIP Hero */
.dash-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 100%);
    border-radius: var(--card-radius, 14px);
    color: #fff;
    padding: 40px 48px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 170px;
}
.dash-hero::before,
.dash-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}
.dash-hero::before {
    width: 420px; height: 420px;
    background: #2DB88A;
    top: -150px; right: -80px;
    animation: dhBlob1 18s ease-in-out infinite alternate;
}
.dash-hero::after {
    width: 300px; height: 300px;
    background: #9FE1CB;
    bottom: -110px; left: -70px;
    animation: dhBlob2 22s ease-in-out infinite alternate;
}
@keyframes dhBlob1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-40px, 28px) scale(1.14); }
}
@keyframes dhBlob2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(50px, -22px) scale(1.1); }
}
.dash-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 85%);
    z-index: 1;
    pointer-events: none;
}
.dash-hero-noise {
    position: absolute;
    inset: 0;
    background-image: var(--noise);
    opacity: 0.5;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}
.dash-hero-watermark {
    position: absolute;
    right: 200px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8.5rem;
    opacity: 0.07;
    color: #fff;
    z-index: 1;
    pointer-events: none;
}
.sparkle {
    position: absolute;
    border-radius: 50%;
    background: #f59e0b;
    pointer-events: none;
    z-index: 2;
    animation: sparklePulse 2.5s ease-in-out infinite alternate;
}
@keyframes sparklePulse {
    from { opacity: 0.55; transform: scale(1); }
    to   { opacity: 1;    transform: scale(1.5); }
}
.dash-hero-content {
    position: relative;
    z-index: 3;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    margin-bottom: 16px;
}
.hero-eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.3);
}
.dash-hero-content h1 {
    font-family: 'Source Serif 4', Georgia, serif; /* VIP hero — display font allowed here */
    font-weight: 600;
    font-size: clamp(1.65rem, 2.5vw, 2.1rem);
    line-height: 1.1;
    margin: 0 0 10px;
    color: #fff;
}
.hero-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}
.dash-hero-actions {
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

/* KPI Star card */
.kpi-star {
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
    border-radius: var(--card-radius, 14px);
    box-shadow: 0 8px 32px rgba(15,110,86,0.25);
    color: #fff;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.kpi-star .kpi-watermark {
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: 4.5rem;
    opacity: 0.12;
    color: #fff;
    pointer-events: none;
}
.kpi-star .kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 10px;
}
.kpi-star .kpi-value {
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    font-family: var(--font-ui);
}
.kpi-star .kpi-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.68);
    margin-top: 8px;
}
.kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 0.74rem;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
}

/* ── btn-secondary neutral override (Modernize sets --bs-secondary to cyan) ── */
.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #6b6b68;
    --bs-btn-border-color: #6b6b68;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #444441;
    --bs-btn-hover-border-color: #444441;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2C2C2A;
    --bs-btn-active-border-color: #2C2C2A;
    background-color: #6b6b68 !important;
    border-color: #6b6b68 !important;
    color: #fff !important;
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: #444441 !important;
    border-color: #444441 !important;
}
.btn-outline-secondary {
    --bs-btn-color: #6b6b68;
    --bs-btn-border-color: #aaa89e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #6b6b68;
    --bs-btn-hover-border-color: #6b6b68;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #444441;
    --bs-btn-active-border-color: #444441;
    background-color: transparent !important;
    border-color: #aaa89e !important;
    color: #6b6b68 !important;
}
.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: #6b6b68 !important;
    border-color: #6b6b68 !important;
    color: #fff !important;
}

/* ── DataTables Bootstrap5 pagination brand override ─────────── */
/* dataTables.net-bs5 v1: .dataTables_paginate > ul.pagination > li.page-item */
/* dataTables.net v2:     .dt-paging > ul > li.page-item */
.dataTables_paginate .page-item.active .page-link,
.dt-paging .page-item.active .page-link,
.dt-paging-button.active .page-link {
    background-color: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
    color: #fff !important;
}
.dataTables_paginate .page-link,
.dt-paging .page-link { color: var(--brand-900); }
.dataTables_paginate .page-link:hover,
.dt-paging .page-link:hover { color: var(--brand-600); background: var(--brand-50); border-color: var(--brand-200); }
.dataTables_paginate .page-link:focus,
.dt-paging .page-link:focus { box-shadow: 0 0 0 3px rgba(29,158,117,.18); }

/* ── FullCalendar brand buttons ───────────────────────────────── */
.fc .fc-button-primary {
    background: var(--brand-900);
    border-color: var(--brand-900);
    color: #fff;
    font-size: .82rem;
    font-weight: 500;
    padding: 5px 14px;
}
.fc .fc-button-primary:hover {
    background: var(--brand-800);
    border-color: var(--brand-800);
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
}
.fc .fc-today-button {
    background: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
}
.fc .fc-today-button:disabled {
    background: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
    opacity: .65;
}
.fc .fc-button:focus { box-shadow: 0 0 0 3px rgba(29,158,117,.25) !important; }
.fc .fc-day-today { background: rgba(29,158,117,.07) !important; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dash-hero { padding: 28px 24px; }
    .dash-hero-watermark { display: none; }
    .dash-hero-actions { width: 100%; }
    .dataTables_wrapper .dataTables_filter { justify-content: flex-start; }
    .dataTables_wrapper .dataTables_paginate { justify-content: center; }
}

/* Sidebar logo: full horizontal when expanded, favicon when mini */
body[data-sidebartype="mini-sidebar"] .logo-full { display: none !important; }
body[data-sidebartype="mini-sidebar"] .logo-mini { display: inline-block !important; }

/* ══════════════════════════════════════════════════════════════════════════════
   density-compact layout layer
   Scoped to body.density-compact — added permanently to every view <body> tag.
   Recovers ~250px vertical space per listing page vs Modernize defaults.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Base font: 15px → 14px */
body.density-compact { font-size: 14px; }

/* Topbar: 70px → 52px. body-wrapper must match: 52 + 20 = 72px */
body.density-compact .topbar { min-height: 52px !important; }
body.density-compact .topbar .navbar { min-height: 52px !important; }
body.density-compact .body-wrapper { padding-top: 72px !important; }

/* Sidebar: 270px → 250px */
@media (min-width: 768px) {
    body.density-compact .left-sidebar { width: 250px !important; }
    body.density-compact .page-wrapper { margin-left: 250px !important; }
    body.density-compact .topbar { width: calc(100% - 250px) !important; }
    body.density-compact .left-sidebar:hover { width: 250px !important; }
    /* Mini-sidebar collapse: keep Modernize's 87px */
    body.density-compact[data-sidebartype=mini-sidebar] .left-sidebar { width: 87px !important; }
    body.density-compact[data-sidebartype=mini-sidebar] .page-wrapper { margin-left: 87px !important; }
    body.density-compact[data-sidebartype=mini-sidebar] .topbar { width: calc(100% - 87px) !important; }
}

/* Sidebar visible (sticky desktop) a partir de 992px — override del
   `left:-270px` de Modernize gateado a <1299.98px, que esconde el sidebar
   en laptops estándar (1280/1366/1440). Pareado con el threshold de JS
   que mantiene data-sidebartype=full desde 992 hacia arriba. */
@media (min-width: 992px) {
    body.density-compact .left-sidebar { left: 0 !important; }
}

/* Container horizontal padding: 24px → 18px */
body.density-compact .body-wrapper > .container-fluid,
body.density-compact .body-wrapper > .container,
body.density-compact .body-wrapper > .container-lg,
body.density-compact .body-wrapper > .container-xl,
body.density-compact .body-wrapper > .container-xxl { padding-left: 18px !important; padding-right: 18px !important; }

/* Page hero: 22px 26px → 10px 16px, margin 24px → 12px */
body.density-compact .page-hero { padding: 10px 16px !important; margin-bottom: 12px !important; }
body.density-compact .page-hero-icon { width: 36px !important; height: 36px !important; font-size: 1.05rem !important; border-radius: 10px !important; }
body.density-compact .page-hero-main { gap: 10px !important; }
body.density-compact .page-hero-title { font-size: 1.15rem !important; margin-bottom: 0 !important; }

/* Cards */
body.density-compact .card-app .card-body,
body.density-compact .card .card-body { padding: 14px !important; }
body.density-compact .card-app .card-header-gradient,
body.density-compact .card .card-header { padding: 10px 14px !important; }

/* Table cell padding */
body.density-compact .table > :not(caption) > * > * { padding: 8px 10px !important; }

/* Form labels: tighter margin */
body.density-compact .form-label { margin-bottom: .2rem !important; }

/* Gap reduction */
body.density-compact .gap-4 { gap: 1rem !important; }

/* ══════════════════════════════════════════════════════════════
   [data-bs-theme=dark] — Full dark mode overrides
   Modernize template doesn't cover all custom components.
   ══════════════════════════════════════════════════════════════ */

/* Replace Modernize's navy (#202936) with BeautySoft charcoal palette */
[data-bs-theme=dark] {
    --bs-body-bg:                   #1e1e1c;
    --bs-body-bg-rgb:               30, 30, 28;
    --bs-secondary-bg:              #2C2C2A;
    --bs-secondary-bg-rgb:          44, 44, 42;
    --bs-tertiary-bg:               #383836;
    --bs-tertiary-bg-rgb:           56, 56, 54;
    --bs-body-color:                #e8e6e3;
    --bs-body-color-rgb:            232, 230, 227;
    --bs-secondary-color:           rgba(232,230,227,0.55);
    --bs-tertiary-color:            rgba(232,230,227,0.35);
    --bs-border-color:              rgba(255,255,255,0.1);
    --bs-border-color-translucent:  rgba(255,255,255,0.08);
    --bs-card-bg:                   #2C2C2A;
    --bs-card-border-color:         rgba(255,255,255,0.08);
    --bs-link-color:                #9FE1CB;
    --bs-link-hover-color:          #1D9E75;
}

/* Body bg: app-tokens.css sets var(--body-bg) always warm-white; override for dark */
[data-bs-theme=dark] body {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color);
}

/* DataTables: length select + search input + info text */
[data-bs-theme=dark] .dataTables_wrapper .dataTables_length label,
[data-bs-theme=dark] .dataTables_wrapper .dataTables_filter label,
[data-bs-theme=dark] .dataTables_wrapper .dataTables_info {
    color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .dataTables_wrapper .dataTables_length select,
[data-bs-theme=dark] .dataTables_wrapper .dataTables_filter input {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}
[data-bs-theme=dark] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--bs-body-color) !important;
}

/* Page hero — white strip adapts to dark surface */
[data-bs-theme=dark] .page-hero {
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}
[data-bs-theme=dark] .page-hero-title { color: var(--bs-body-color); }
[data-bs-theme=dark] .page-hero-icon  { color: var(--bs-body-color); }

/* KPI mini-cards */
[data-bs-theme=dark] .kpi-mini {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
}
[data-bs-theme=dark] .kpi-mini .kpi-mini-label,
[data-bs-theme=dark] .kpi-mini .kpi-mini-sub  { color: var(--bs-secondary-color); }
[data-bs-theme=dark] .kpi-mini .kpi-mini-value { color: var(--bs-body-color); }

/* FullCalendar grid */
[data-bs-theme=dark] .fc-theme-standard td,
[data-bs-theme=dark] .fc-theme-standard th,
[data-bs-theme=dark] .fc-theme-standard .fc-scrollgrid { border-color: var(--bs-border-color) !important; }
[data-bs-theme=dark] .fc .fc-daygrid-day,
[data-bs-theme=dark] .fc .fc-timegrid-slot,
[data-bs-theme=dark] .fc .fc-timegrid-axis { background: var(--bs-body-bg); }
[data-bs-theme=dark] .fc .fc-col-header-cell {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
[data-bs-theme=dark] .fc .fc-timegrid-slot-label,
[data-bs-theme=dark] .fc .fc-col-header-cell-cushion,
[data-bs-theme=dark] .fc .fc-daygrid-day-number { color: var(--bs-body-color) !important; }
[data-bs-theme=dark] .fc .fc-day-today { background: rgba(29,158,117,.12) !important; }
[data-bs-theme=dark] .fc-scrollgrid-section-header .fc-scroller { background: var(--bs-tertiary-bg); }

/* FullCalendar — override FC's own --fc-page-bg-color: #fff */
[data-bs-theme=dark] .fc {
    --fc-page-bg-color:    #1e1e1c;
    --fc-neutral-bg-color: rgba(255,255,255,0.04);
    --fc-border-color:     rgba(255,255,255,0.1);
    --fc-today-bg-color:   rgba(29,158,117,0.12);
    --fc-neutral-text-color: #e8e6e3;
    --fc-event-bg-color:   #1D9E75;
    --fc-event-border-color: #0F6E56;
}
/* FullCalendar toolbar (header with nav + title + view buttons) */
[data-bs-theme=dark] .fc .fc-header-toolbar {
    background: var(--bs-card-bg, var(--bs-body-bg));
}
[data-bs-theme=dark] .fc .fc-toolbar-title {
    color: var(--bs-body-color);
}
[data-bs-theme=dark] .fc .fc-button {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .fc .fc-button:hover {
    background-color: rgba(29,158,117,.2) !important;
    border-color: #1D9E75 !important;
    color: #1D9E75 !important;
}
[data-bs-theme=dark] .fc .fc-button-primary:not(:disabled).fc-button-active,
[data-bs-theme=dark] .fc .fc-button-primary:not(:disabled):active {
    background-color: #1D9E75 !important;
    border-color: #1D9E75 !important;
    color: #fff !important;
}

/* Agenda employee filter Select2 */
[data-bs-theme=dark] .select2-container--default .select2-selection--single {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .select2-dropdown {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .select2-container--default .select2-results__option {
    color: var(--bs-body-color);
}
[data-bs-theme=dark] .select2-container--default .select2-results__option--highlighted {
    background-color: var(--bs-primary, #1D9E75) !important;
    color: #fff !important;
}
/* ══════════════════════════════════════════════════════════════
   Modal — scrollable body with scroll-shadow UX indicator
   ══════════════════════════════════════════════════════════════ */
.modal-body {
    max-height: calc(100dvh - 220px);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* scroll shadow: appears only when content overflows top/bottom */
    background:
        linear-gradient(var(--bs-modal-bg, #fff) 30%, transparent)         top    / 100% 24px no-repeat,
        linear-gradient(transparent, var(--bs-modal-bg, #fff) 70%)         bottom / 100% 24px no-repeat,
        radial-gradient(farthest-side at 50% 0,   rgba(0,0,0,.10), transparent) top    / 100%  8px no-repeat,
        radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.10), transparent) bottom / 100%  8px no-repeat;
    background-attachment: local, local, scroll, scroll;
}
[data-bs-theme=dark] .modal-body {
    background:
        linear-gradient(var(--bs-modal-bg, #1e293b) 30%, transparent)          top    / 100% 24px no-repeat,
        linear-gradient(transparent, var(--bs-modal-bg, #1e293b) 70%)           bottom / 100% 24px no-repeat,
        radial-gradient(farthest-side at 50% 0,    rgba(0,0,0,.25), transparent) top    / 100%  8px no-repeat,
        radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.25), transparent) bottom / 100%  8px no-repeat;
    background-attachment: local, local, scroll, scroll;
}

[data-bs-theme=dark] .select2-search--dropdown .select2-search__field {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}

/* ══════════════════════════════════════════════════════════════
   Modal header — visible in dark mode
   ══════════════════════════════════════════════════════════════ */
[data-bs-theme=dark] .modal-header {
    background-color: var(--bs-modal-bg, #1e293b);
    border-bottom: 1px solid var(--bs-border-color);
}
[data-bs-theme=dark] .modal-title {
    color: var(--bs-body-color);
}

/* ══════════════════════════════════════════════════════════════
   Nav tabs — brand teal active state (overrides Bootstrap indigo)
   ══════════════════════════════════════════════════════════════ */
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--brand-500, #1D9E75);
    border-bottom-color: var(--brand-500, #1D9E75);
    border-bottom-width: 2px;
}
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: var(--brand-600, #0F6E56);
}

/* ══════════════════════════════════════════════════════════════
   KPI mini label — Title Case (no uppercase per brand rules)
   ══════════════════════════════════════════════════════════════ */
.kpi-mini .kpi-mini-label {
    text-transform: none;
}

/* ══════════════════════════════════════════════════════════════
   Modal confinado al área de contenido (derecha del sidebar).
   Bootstrap centra el modal sobre el viewport completo, lo que
   hace que el borde izquierdo del modal quede debajo del sidebar
   y la imagen se vea "cortada". Desplazamos backdrop y modal
   para que empiecen donde termina el sidebar (270 px).
   En mini-sidebar (87 px) y móvil, se usa el viewport completo.
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 992px) {
    body:not([data-sidebartype="mini-sidebar"]) .modal-backdrop,
    body:not([data-sidebartype="mini-sidebar"]) .modal {
        left: 270px;
        width: calc(100% - 270px);
    }
}

/* ══════════════════════════════════════════════════════════════
   Segundo y tercer nivel del sidebar.
   sidebarmenu.js usa .in (Modernize) — Modernize styles.css ya
   tiene .collapse.in { display:block }. Solo necesitamos
   indentado y guía visual por nivel.
   ══════════════════════════════════════════════════════════════ */
.second-level,
.third-level {
    border-left: 2px solid rgba(29,158,117,.22);
    margin-left: 1.25rem;
    padding-left: .25rem;
}
.third-level {
    margin-left: 1rem;
}
.second-level .sidebar-link {
    font-size: .82rem !important;
    padding-top:    .35rem !important;
    padding-bottom: .35rem !important;
}
.third-level .sidebar-link {
    font-size: .78rem !important;
    padding-top:    .3rem !important;
    padding-bottom: .3rem !important;
    opacity: .92;
}
