:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --ink: #1f2933;
    --muted: #667085;
    --line: #edf0f7;
    --brand: #4b55c7;
    --brand-dark: #30388f;
    --green: #16834a;
    --red: #b42318;
    --amber: #b25e09;
    --shadow: 0 8px 26px rgba(36, 43, 82, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--brand);
    text-decoration: none;
}

h1,
h2,
p {
    margin: 0;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #e7f3f6 0%, #f4f6f8 48%, #eef2e8 100%);
}

.auth-shell {
    width: min(440px, 100%);
}

.auth-panel,
.toolbar,
.table-section,
.summary-grid article {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-panel {
    padding: 32px;
    display: grid;
    gap: 22px;
}

.auth-body { background: radial-gradient(circle at 15% 12%, rgba(99, 102, 241, .22), transparent 26rem), radial-gradient(circle at 86% 86%, rgba(16, 185, 129, .15), transparent 25rem), linear-gradient(135deg, #eef2ff, #f8fafc 48%, #ecfdf5); }
.auth-shell { position: relative; }
.auth-panel { border-color: rgba(255,255,255,.8); border-radius: 20px; box-shadow: 0 22px 55px rgba(30, 41, 59, .13); gap: 20px; padding: 34px; }
.auth-heading { position: relative; }
.auth-logo { align-items: center; background: linear-gradient(135deg, #4f46e5, #7c3aed); border-radius: 13px; box-shadow: 0 9px 18px rgba(79,70,229,.25); color: #fff; display: inline-flex; font-size: 12px; font-weight: 900; height: 42px; justify-content: center; margin-bottom: 17px; width: 42px; }
.auth-heading h1 { color: #172033; font-size: 25px; letter-spacing: -.5px; margin-top: 4px; }
.auth-heading > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 7px; }
.auth-input { align-items: center; display: flex; position: relative; }
.auth-input i { color: #94a3b8; left: 14px; position: absolute; }
.auth-input input { padding-left: 40px; }
.auth-input:focus-within i { color: var(--brand); }
.auth-submit { gap: 8px; min-height: 44px; width: 100%; }
.auth-security-note { align-items: flex-start; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; color: #166534; display: flex; font-size: 11px; font-weight: 700; gap: 8px; line-height: 1.45; padding: 10px 11px; }
.auth-security-note i { margin-top: 2px; }

.eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.form-grid,
.filters,
.import-box {
    display: grid;
    gap: 14px;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
}

input,
select,
button {
    border-radius: 8px;
    font: inherit;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    color: var(--ink);
    min-height: 42px;
    padding: 9px 14px;
    background: #fff;
}

button,
.primary-button,
.ghost-button,
.whatsapp-button,
.copy-button,
.icon-button {
    align-items: center;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
}

button,
.primary-button {
    background: var(--brand);
    color: #fff;
}

button:hover,
.primary-button:hover {
    background: var(--brand-dark);
}

.ghost-button {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
    gap: 8px;
}

.whatsapp-button {
    background: #1f9d55;
    color: #fff;
    white-space: nowrap;
}

.copy-button {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
    gap: 8px;
    white-space: nowrap;
}

.primary-button.disabled,
.whatsapp-button.disabled,
.copy-button.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.icon-button {
    border-radius: 8px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    width: 36px;
}

.danger-button {
    background: var(--red);
}

.danger-button:hover {
    background: #8f1d14;
}

.cancel-row-button {
    background: #64748b;
}

.cancel-row-button:hover {
    background: #475569;
}

.is-hidden {
    display: none !important;
}

.alert {
    border: 1px solid #b7d7ea;
    background: #eef8fc;
    border-radius: 7px;
    color: #0d4f6d;
    padding: 12px 14px;
}

.alert.success {
    border-color: #b7dfc5;
    background: #eef9f1;
    color: var(--green);
}

.alert.error {
    border-color: #f2c3bd;
    background: #fff1ef;
    color: var(--red);
}

.auth-link {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 100vh;
    padding: 0;
    gap: 0;
}

.dashboard-shell.sidebar-collapsed { grid-template-columns: 74px minmax(0, 1fr); }
.sidebar-toggle { align-items: center; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 9px; color: #fff; display: inline-flex; height: 32px; margin-left: auto; min-height: 32px; padding: 0; width: 32px; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.22); }
.dashboard-shell.sidebar-collapsed .brand { justify-content: center; }
.dashboard-shell.sidebar-collapsed .brand strong { display: none; }
.dashboard-shell.sidebar-collapsed .sidebar-toggle { left: 58px; margin: 0; position: absolute; top: 20px; z-index: 5; }
.dashboard-shell.sidebar-collapsed .sidebar-toggle i { transform: rotate(180deg); }
.dashboard-shell.sidebar-collapsed .side-nav { justify-items: center; }
.dashboard-shell.sidebar-collapsed .side-nav a,
.dashboard-shell.sidebar-collapsed .logout-link { font-size: 0; justify-content: center; padding: 0; width: 42px; }
.dashboard-shell { transition: grid-template-columns .22s ease; }

.sidebar {
    background: linear-gradient(180deg, #272d68 0%, #303887 55%, #242a63 100%);
    border: 0;
    border-radius: 0;
    box-shadow: 0 20px 45px rgba(61, 72, 183, 0.25);
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    padding: 18px 12px;
}

.brand {
    align-items: center;
    display: flex;
    justify-content: flex-start;
    gap: 11px;
    margin-bottom: 28px;
}

.brand-mark {
    align-items: center;
    background: #ff914d;
    border: 3px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.brand strong {
    color: #fff;
    display: block;
    font-size: 15px;
}

.side-nav {
    display: grid;
    align-content: start;
    gap: 12px;
    justify-items: stretch;
}

.side-nav::before {
    color: rgba(255, 255, 255, 0.42);
    content: 'NAVEGACIÓN';
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.25px;
    margin: 0 8px 4px;
}

.dashboard-shell.sidebar-collapsed .side-nav::before { content: ''; margin: 0; }

.side-nav a,
.logout-link {
    align-items: center;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    height: 42px;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 8px;
    width: 100%;
}

.nav-icon {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 13px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.nav-icon i {
    color: #fff;
    font-size: 15px;
    line-height: 1;
}

.side-nav a.active,
.side-nav a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.side-nav a { position: relative; transition: background .18s ease, transform .18s ease; }
.side-nav a:hover { transform: translateX(2px); }
.side-nav a.active::before { background: #ff9b61; border-radius: 0 3px 3px 0; content: ''; height: 22px; left: -12px; position: absolute; width: 3px; }

.side-nav a.active .nav-icon,
.side-nav a:hover .nav-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.logout-link {
    border: 1px solid rgba(255, 255, 255, 0.35);
    text-align: center;
}

.logout-link .nav-icon {
    border-color: transparent;
}

.workspace {
    background: rgba(247, 248, 255, 0.96);
    border: 0;
    border-left: 0;
    border-radius: 0;
    min-width: 0;
    overflow: hidden;
}

.workspace { display: flex; flex-direction: column; }
.workspace > .page { flex: 1 0 auto; width: 100%; }

.admin-footer {
    background: linear-gradient(110deg, #252b70 0%, #303887 55%, #3b439b 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    display: grid;
    flex: 0 0 auto;
    gap: 42px;
    grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(150px, 1fr)) minmax(170px, auto);
    padding: 26px 34px 28px;
    width: 100%;
}

.footer-brand,
.footer-column { align-content: start; display: grid; gap: 8px; }
.footer-brand strong,
.footer-column > strong { color: #fff; font-size: 14px; }
.footer-brand span { color: rgba(255, 255, 255, 0.62); font-size: 12px; line-height: 1.5; max-width: 280px; }
.footer-column a { color: rgba(255, 255, 255, 0.78); font-size: 12px; line-height: 1.35; width: fit-content; }
.footer-column a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-signature { align-content: center; display: grid; gap: 5px; justify-items: end; text-align: right; }
.footer-signature span { color: rgba(255, 255, 255, 0.62); font-size: 11px; }
.footer-signature strong { color: #fff; font-size: 13px; }

.topbar {
    align-items: center;
    background: rgba(247, 248, 255, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(228, 231, 242, .8);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 26px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar h1 {
    font-size: 25px;
}

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

.topbar nav {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 14px;
    font-size: 14px;
    min-width: 0;
}

.topbar-actions span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions a {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
}

.topbar-main { align-items: center; display: flex; gap: 18px; min-width: 0; }
.topbar-brand { align-items: center; color: #182b4d; display: flex; flex: 0 0 auto; gap: 10px; }
.topbar-logo-mark { align-items: center; background: linear-gradient(135deg, #ff7043, #f04f2f); border-radius: 10px; box-shadow: 0 5px 12px rgba(240,79,47,.22); color: #fff; display: inline-flex; font-size: 12px; font-weight: 900; height: 38px; justify-content: center; letter-spacing: -.4px; width: 38px; }
.topbar-wordmark { font-size: 14px; font-weight: 600; white-space: nowrap; }
.topbar-wordmark strong { font-weight: 850; }
.topbar-divider { background: #e2e6ed; height: 30px; width: 1px; }
.topbar-context { display: grid; gap: 2px; min-width: 0; }
.topbar-context small { color: #8a94a5; font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.topbar-context strong { color: #26364f; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { position: relative; }
.user-menu-toggle { align-items: center; background: #fff; border: 1px solid #e1e5ec; border-radius: 11px; color: #102a4c; display: flex; gap: 10px; min-height: 50px; padding: 6px 13px 6px 7px; }
.user-menu-toggle:hover { background: #f8fafc; }
.user-menu-toggle > i { font-size: 11px; margin-left: 4px; transition: transform .2s ease; }
.topbar-actions.is-open .user-menu-toggle > i { transform: rotate(180deg); }
.user-avatar { align-items: center; background: #edf4fa; border: 1px solid #d7e2eb; border-radius: 50%; color: #102a4c !important; display: inline-flex !important; font-size: 14px; font-weight: 800; height: 32px; justify-content: center; width: 32px; }
.user-identity { display: grid; gap: 1px; text-align: left; }
.user-identity strong { color: #162b4d; font-size: 12px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { color: #8a94a5; font-size: 9px; font-weight: 600; }
.user-menu-dropdown { background: #fff; border: 1px solid #e1e5ec; border-radius: 10px; box-shadow: 0 14px 35px rgba(25, 45, 77, .16); display: none; min-width: 210px; padding: 8px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; }
.topbar-actions.is-open .user-menu-dropdown { display: grid; }
.user-menu-dropdown > span { color: #8993a4; font-size: 10px; padding: 7px 9px; text-transform: uppercase; }
.user-menu-dropdown a { border: 0; border-radius: 7px; justify-content: flex-start; min-height: 38px; padding: 8px 9px; }
.topbar-notifications { position: relative; }
.notification-toggle { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; color: #475569; height: 46px; min-height: 46px; padding: 0; position: relative; width: 46px; }
.notification-toggle:hover { background: #f8faff; border-color: #c7d2fe; color: #4f46e5; }
.notification-badge { align-items: center; background: #ef4444; border: 2px solid #fff; border-radius: 999px; color: #fff; display: inline-flex; font-size: 9px; font-weight: 850; height: 19px; justify-content: center; min-width: 19px; padding: 0 4px; position: absolute; right: -5px; top: -5px; }
.notification-dropdown { background: #fff; border: 1px solid #e2e8f0; border-radius: 15px; box-shadow: 0 20px 45px rgba(15, 23, 42, .16); display: none; overflow: hidden; position: absolute; right: 0; top: calc(100% + 9px); width: min(390px, calc(100vw - 28px)); z-index: 70; }
.topbar-notifications.is-open .notification-dropdown { display: block; }
.notification-heading { align-items: center; border-bottom: 1px solid #eef2f7; display: flex; justify-content: space-between; padding: 15px 16px; }
.notification-heading div { display: grid; gap: 2px; }
.notification-heading strong { color: #1e293b; font-size: 13px; }
.notification-heading span { color: #94a3b8; font-size: 10px; font-weight: 700; }
.notification-heading a { color: #4f46e5; font-size: 11px; font-weight: 800; }
.notification-list { max-height: 360px; overflow-y: auto; }
.notification-item { align-items: center; border-bottom: 1px solid #f1f5f9; color: #334155; display: grid; gap: 10px; grid-template-columns: auto 1fr auto; padding: 12px 15px; }
.notification-item:hover { background: #f8faff; }
.notification-item > span { align-items: center; background: #eef2ff; border-radius: 10px; color: #4f46e5; display: inline-flex; height: 32px; justify-content: center; width: 32px; }
.notification-pending > span { background: #fff7e8; color: #d97706; }.notification-warning > span { background: #fff1f2; color: #e11d48; }.notification-upcoming > span { background: #ecfdf5; color: #059669; }
.notification-tomorrow > span { background: #eff6ff; color: #2563eb; }
.notification-item div { display: grid; gap: 3px; min-width: 0; }.notification-item strong, .notification-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.notification-item strong { font-size: 12px; }.notification-item small { color: #64748b; font-size: 10px; font-weight: 600; }.notification-item > i { color: #cbd5e1; font-size: 10px; }
.notification-empty { color: #94a3b8; font-size: 12px; margin: 0; padding: 25px 16px; text-align: center; }.notification-empty i { color: #22c55e; margin-right: 5px; }

.page {
    display: grid;
    gap: 16px;
    margin: 0;
    max-width: none;
    padding: 16px 22px 24px;
}

.dashboard-welcome {
    align-items: center;
    background: linear-gradient(115deg, #30388f 0%, #4b55c7 70%, #6670df 100%);
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(56, 64, 169, 0.18);
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 24px 26px;
    position: relative;
}

.operations-strip {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.operations-strip > a { align-items: center; color: var(--ink); display: grid; gap: 12px; grid-template-columns: auto 1fr auto; min-width: 0; padding: 16px 18px; position: relative; transition: background .18s ease; }
.operations-strip > a:not(:last-child) { border-right: 1px solid var(--line); }
.operations-strip > a:hover { background: #fafbff; }
.operation-icon { align-items: center; border-radius: 10px; display: inline-flex; height: 38px; justify-content: center; width: 38px; }
.operation-today { background: #eef2ff; color: #4f5bd5; }
.operation-pending { background: #fff7e8; color: #c47608; }
.operation-week { background: #eaf8f0; color: #16834a; }
.operation-alert { background: #fff0ef; color: #c33a30; }
.operations-strip a > span:nth-child(2) { display: grid; min-width: 0; }
.operations-strip small { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.operations-strip strong { font-size: 22px; line-height: 1.15; margin-top: 2px; }
.operations-strip em { color: #98a2b3; font-size: 10px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-arrow { color: #c5cad5; font-size: 10px; }

.dashboard-welcome::after {
    border: 28px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    content: '';
    height: 150px;
    position: absolute;
    right: 25%;
    top: -88px;
    width: 150px;
}

.dashboard-welcome h2 { font-size: 24px; margin: 7px 0 4px; }
.dashboard-welcome p { color: rgba(255, 255, 255, 0.78); font-size: 13px; }
.welcome-date { color: rgba(255, 255, 255, 0.82); font-size: 12px; font-weight: 700; }
.welcome-date i { margin-right: 6px; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.welcome-actions .ghost-button { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.welcome-actions .primary-button { background: #fff; color: var(--brand-dark); }
.welcome-refresh { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; gap: 7px; }
.welcome-refresh:hover { background: rgba(255,255,255,.12); }
.welcome-refresh.is-loading i { animation: dashboard-spin .7s linear infinite; }
.welcome-refresh small { color: rgba(255,255,255,.65); font-size: 10px; font-weight: 600; }
@keyframes dashboard-spin { to { transform: rotate(360deg); } }

.status-overview {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 18px 20px 20px;
}

.status-overview-head { align-items: center; display: flex; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.status-overview-head h2 { font-size: 17px; margin-top: 3px; }
.status-overview-head > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.status-overview-content { align-items: center; display: grid; gap: 24px; grid-template-columns: 150px minmax(0, 1fr); }
.status-donut { align-items: center; background: var(--donut-background); border-radius: 50%; display: flex; height: 132px; justify-content: center; margin: auto; position: relative; width: 132px; }
.status-donut::after { background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); content: ''; height: 88px; position: absolute; width: 88px; }
.status-donut > div { display: grid; position: relative; text-align: center; z-index: 1; }
.status-donut strong { font-size: 25px; line-height: 1; }
.status-donut span { color: var(--muted); font-size: 10px; margin-top: 5px; text-transform: uppercase; }
.status-grid { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-summary-item { align-items: center; background: #f8f9fd; border: 1px solid transparent; border-radius: 9px; color: var(--ink); display: grid; gap: 3px 8px; grid-template-columns: auto 1fr auto; overflow: hidden; padding: 11px 11px 15px; position: relative; transition: border-color .2s, transform .2s; }
.status-summary-item::after { background: currentColor; bottom: 0; content: ''; height: 3px; left: 0; opacity: .35; position: absolute; transform: scaleX(0); transform-origin: left; transition: transform .7s ease; width: var(--status-progress); }
.dashboard-ready .status-summary-item::after { transform: scaleX(1); }
.status-summary-item:hover, .status-summary-item.is-active { border-color: #cfd3f6; transform: translateY(-1px); }
.status-summary-label { color: var(--muted); font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-summary-item strong { font-size: 18px; grid-column: 2; }
.status-dot { border-radius: 50%; height: 8px; width: 8px; }
.status-percentage { color: var(--muted); font-size: 11px; font-weight: 700; grid-column: 3; grid-row: 2; }
.status-bg-pendiente { background: #f59e0b; }
.status-bg-confirmado { background: #2563eb; }
.status-bg-realizado { background: #16a34a; }
.status-bg-cancelado { background: #dc2626; }
.status-bg-cambio_fecha { background: #7c3aed; }
.status-bg-no_show { background: #64748b; }

.quick-filters { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.quick-filters > span:first-child { color: var(--muted); font-size: 11px; font-weight: 800; margin-right: 3px; text-transform: uppercase; }
.quick-filters a, .filter-count { align-items: center; background: #f6f7fb; border: 1px solid var(--line); border-radius: 999px; color: #596273; display: inline-flex; font-size: 12px; font-weight: 700; gap: 6px; min-height: 30px; padding: 5px 11px; }
.quick-filters a:hover, .quick-filters a.active { background: #eef0ff; border-color: #cfd3f6; color: var(--brand); }
.filter-count { background: #edf8f1; border-color: #ccead7; color: var(--green); margin-left: auto; }

.toolbar {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    padding: 18px;
}

.management-toolbar {
    grid-template-columns: 1fr;
}

.management-toolbar .filters {
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) minmax(240px, 1fr) minmax(140px, 180px) auto auto;
}

.management-toolbar .whatsapp-filters {
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) minmax(240px, 1fr) minmax(140px, 180px) auto auto;
}

.report-filters {
    grid-template-columns: minmax(140px, 170px) minmax(140px, 170px) minmax(240px, 1fr) minmax(140px, 180px) auto auto auto;
}

.filters {
    align-items: end;
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) minmax(260px, 1.2fr) minmax(140px, 170px) auto auto;
}

.import-box,
.import-shortcut {
    align-items: end;
    grid-template-columns: 1fr auto;
}

.import-shortcut {
    align-items: center;
    display: grid;
    gap: 14px;
}

.import-shortcut span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.import-page-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.import-hero, .admin-hero { align-items: center; border-radius: 18px; color: #fff; display: flex; justify-content: space-between; overflow: hidden; padding: 26px 28px; position: relative; }
.import-hero { background: linear-gradient(120deg, #075985, #0369a1 58%, #0284c7); box-shadow: 0 18px 36px rgba(3, 105, 161, .18); }
.admin-hero { background: linear-gradient(120deg, #3f1d6d, #6d28d9 58%, #8b5cf6); box-shadow: 0 18px 36px rgba(109, 40, 217, .18); }
.import-hero::after, .admin-hero::after { border: 34px solid rgba(255,255,255,.08); border-radius: 50%; content: ''; height: 180px; position: absolute; right: 16%; top: -115px; width: 180px; }
.import-hero > div:first-child, .admin-hero > div:first-child { padding-left: 58px; position: relative; z-index: 1; }
.import-hero .eyebrow { color: #bae6fd; }
.admin-hero .eyebrow { color: #ddd6fe; }
.import-hero h2, .admin-hero h2 { font-size: 25px; margin: 4px 0; }
.import-hero p:last-child, .admin-hero p:last-child { color: rgba(255,255,255,.8); font-size: 13px; }
.import-hero-icon, .admin-hero-icon { align-items: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; display: inline-flex; height: 44px; justify-content: center; left: 0; position: absolute; top: 4px; width: 44px; }
.import-hero-safe, .admin-hero > span { align-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 800; gap: 8px; padding: 10px 12px; position: relative; z-index: 1; }
.import-panel { border-radius: 16px; padding: 26px; }
.import-notes { border-radius: 16px; }
.file-drop { background: linear-gradient(180deg, #f8fbff, #f0f9ff); border-color: #7dd3fc; border-radius: 14px; min-height: 205px; }
.file-drop:hover { background: #eaf7ff; border-color: #38bdf8; }
.danger-zone { border-radius: 16px; }

.import-panel,
.import-notes {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.import-panel {
    display: grid;
    gap: 18px;
}

.import-panel h2,
.import-notes h2 {
    font-size: 20px;
}

.import-panel p,
.import-notes li {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.import-panel p {
    margin-top: 6px;
}

.file-drop {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #b7c1d6;
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 12px;
    justify-items: center;
    min-height: 180px;
    padding: 22px;
    text-align: center;
}

.file-drop i {
    color: var(--brand);
    font-size: 34px;
}

.file-drop span {
    font-size: 16px;
    font-weight: 800;
}

.file-drop input {
    max-width: 360px;
}

.import-notes {
    align-content: start;
    display: grid;
    gap: 16px;
}

.import-notes ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 18px;
}

.danger-zone {
    background: #fff;
    border: 1px solid #f2c3bd;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    padding: 22px;
}

.danger-zone h2 {
    color: var(--red);
    font-size: 20px;
}

.danger-zone p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    margin-top: 6px;
}

.danger-zone form {
    display: grid;
    gap: 14px;
    max-width: 420px;
}

.whatsapp-page-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.message-preview {
    border: 0;
    border-radius: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 520px;
    padding: 18px 22px;
    resize: vertical;
    width: 100%;
}

.whatsapp-summary {
    align-self: start;
}

.summary-list {
    display: grid;
    gap: 12px;
    padding: 18px 22px;
}

.summary-list span {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    gap: 4px;
}

.summary-list strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.35;
}

.summary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid article {
    align-items: center;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    min-height: 124px;
    padding: 20px 22px;
    position: relative;
}

.summary-grid article::before { background: var(--brand); border-radius: 0 3px 3px 0; content: ''; height: 44px; left: -1px; position: absolute; top: 22px; width: 3px; }
.summary-grid article small { color: #98a2b3; font-size: 11px; }

.summary-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric-icon {
    align-items: center;
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 42px;
}

.metric-icon i {
    color: #fff;
    font-size: 17px;
    line-height: 1;
}

.whatsapp-button {
    gap: 8px;
}

.preview-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.guide-panel,
.whatsapp-reservations {
    margin-bottom: 16px;
}

.guide-add-form {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(170px, 1fr) minmax(210px, 1fr) auto;
}

.guide-page-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    padding: 0 20px 20px;
}

.guide-page-form label {
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
}

.guide-add-form input {
    min-height: 38px;
}

.guide-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 18px;
}

.guide-chips > span {
    align-items: center;
    background: #eef2ff;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    gap: 7px;
    padding: 7px 8px 7px 13px;
}

.guide-chips form { margin: 0; }
.guide-chips button {
    border-radius: 50%;
    min-height: 26px;
    padding: 0;
    width: 26px;
}

.guides-hero { align-items: center; background: linear-gradient(120deg, #0f766e, #059669 58%, #22c55e); border-radius: 18px; box-shadow: 0 18px 36px rgba(5, 150, 105, .19); color: #fff; display: grid; gap: 20px; grid-template-columns: 1fr auto auto; overflow: hidden; padding: 26px 28px; position: relative; }
.guides-hero::after { border: 34px solid rgba(255,255,255,.08); border-radius: 50%; content: ''; height: 180px; position: absolute; right: 21%; top: -112px; width: 180px; }
.guides-hero > div:first-child { padding-left: 58px; position: relative; z-index: 1; }
.guides-hero .eyebrow { color: #bbf7d0; }
.guides-hero h2 { font-size: 25px; margin: 4px 0; }
.guides-hero p:last-child { color: rgba(255,255,255,.8); font-size: 13px; }
.guides-hero-icon { align-items: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; display: inline-flex; height: 44px; justify-content: center; left: 0; position: absolute; top: 4px; width: 44px; }
.guides-hero-stat { display: grid; position: relative; text-align: center; z-index: 1; }
.guides-hero-stat strong { font-size: 30px; line-height: 1; }
.guides-hero-stat span { color: rgba(255,255,255,.76); font-size: 11px; font-weight: 700; margin-top: 5px; }
.guides-hero-action { align-items: center; background: #fff; border-radius: 10px; color: #047857; display: inline-flex; font-size: 13px; font-weight: 800; gap: 8px; padding: 11px 14px; position: relative; z-index: 1; }
.guides-hero-action:hover { background: #ecfdf5; }
.guide-add-form-card { background: linear-gradient(180deg, #fff, #fbfffd); border-top: 1px solid #ecfdf5; padding-top: 20px; }
.guides-table { min-width: 680px; }
.guide-person-cell { align-items: center; display: flex; gap: 11px; }
.guide-person-cell > span:last-child { display: grid; gap: 3px; }
.guide-person-cell small { color: #94a3b8; font-size: 11px; font-weight: 700; }
.guide-avatar { align-items: center; background: linear-gradient(135deg, #ccfbf1, #d1fae5); border: 1px solid #99f6e4; border-radius: 50%; color: #047857; display: inline-flex; flex: 0 0 auto; font-size: 13px; font-weight: 850; height: 36px; justify-content: center; width: 36px; }
.guide-whatsapp-link { align-items: center; background: #ecfdf5; border-radius: 999px; color: #047857; display: inline-flex; font-size: 12px; font-weight: 800; gap: 7px; padding: 8px 11px; }
.guide-whatsapp-link:hover { background: #d1fae5; }
.guide-row-actions { display: flex; justify-content: flex-start; }
.guide-row-actions form { margin: 0; }

.guide-selector {
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    min-width: 280px;
}

.guide-send-controls {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.whatsapp-selection-table input[type="checkbox"] {
    accent-color: #22a559;
    cursor: pointer;
    height: 19px;
    min-height: 19px;
    width: 19px;
}

.whatsapp-selection-table th:first-child,
.whatsapp-selection-table td:first-child {
    text-align: center;
    width: 54px;
}

.guide-assignment-summary { background: #fafbff; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px; }
.guide-assignment-card { align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; display: flex; gap: 9px; min-width: 210px; padding: 9px 10px; transition: border-color .18s ease, box-shadow .18s ease; }
.guide-assignment-card.is-active { border-color: var(--guide-color); box-shadow: 0 4px 12px color-mix(in srgb, var(--guide-color) 18%, transparent); }
.guide-assignment-dot { background: var(--guide-color); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--guide-color) 14%, transparent); height: 9px; width: 9px; }
.guide-assignment-card > div { display: grid; flex: 1; gap: 2px; }
.guide-assignment-card strong { color: #334155; font-size: 12px; }
.guide-assignment-card small { color: #94a3b8; font-size: 10px; font-weight: 700; }
.guide-summary-send, .guide-summary-export { align-items: center; border: 0; border-radius: 8px; display: inline-flex; height: 30px; justify-content: center; width: 30px; }
.guide-summary-send { background: #ecfdf5; color: #059669; }
.guide-summary-export { background: #eff6ff; color: #2563eb; cursor: pointer; }
.guide-summary-send:hover { background: #d1fae5; }
.guide-summary-export:hover { background: #dbeafe; }
.guide-summary-send.disabled, .guide-summary-export.disabled { opacity: .4; pointer-events: none; }
.guide-excel-download { align-items: center; background: #eff6ff; border-radius: 8px; color: #2563eb; display: inline-flex; font-size: 12px; font-weight: 800; gap: 7px; padding: 8px 11px; }
.guide-excel-download:hover { background: #dbeafe; }
.guide-excel-delete { background: #fef2f2; border: 0; border-radius: 8px; color: #b91c1c; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; padding: 8px 11px; }
.guide-excel-delete:hover { background: #fee2e2; }
.user-row-actions { align-items: center; display: flex; gap: 8px; }
.user-row-actions form { margin: 0; }
.user-edit-input { background: transparent; border: 1px solid transparent; color: var(--ink); font: inherit; font-weight: 700; max-width: 230px; padding: 6px; }
.user-edit-input:disabled { cursor: default; padding-left: 0; }
.user-edit-input:not(:disabled) { background: #fff; border-color: #cbd5e1; }
.whatsapp-selection-table tbody tr.guide-assigned { background: color-mix(in srgb, var(--guide-assignment-color) 8%, #fff); box-shadow: inset 4px 0 0 var(--guide-assignment-color); }
.whatsapp-selection-table tbody tr.guide-assigned:hover { background: color-mix(in srgb, var(--guide-assignment-color) 12%, #fff); }
.whatsapp-selection-table tr.guide-assigned .reservation-check { accent-color: var(--guide-assignment-color); }
.guide-assignment-badge { align-items: center; background: color-mix(in srgb, var(--guide-assignment-color) 13%, #fff); border: 1px solid color-mix(in srgb, var(--guide-assignment-color) 28%, #fff); border-radius: 999px; color: var(--guide-assignment-color); display: inline-flex; font-size: 11px; font-weight: 800; padding: 6px 9px; white-space: nowrap; }
.guide-assignment-badge.is-unassigned { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }

.status-badge {
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    white-space: nowrap;
}

.whatsapp-send-grid { grid-template-columns: minmax(0, 1fr); }
.whatsapp-send-grid .message-preview { min-height: 360px; }

.reservations-icon {
    background: #5362e8;
}

.sales-icon {
    background: #16834a;
}

.net-icon {
    background: #7f8cf4;
}

.profit-icon {
    background: #ff8b55;
}

.summary-grid strong {
    font-size: 26px;
}

.management-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-metric {
    font-size: 17px !important;
    line-height: 1.25;
    padding-right: 42px;
    word-break: break-word;
}

.summary-grid .profit strong {
    color: var(--green);
}

.summary-grid .loss strong {
    color: var(--red);
}

.table-section {
    overflow: hidden;
}

.section-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
}

.section-head p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 940px;
    width: 100%;
}

.manage-table {
    min-width: 1560px;
}

.manage-table.has-tour-option {
    min-width: 1510px;
    table-layout: fixed;
}

.manage-table.has-tour-option th:nth-child(1), .manage-table.has-tour-option td:nth-child(1) { width: 105px; }
.manage-table.has-tour-option th:nth-child(2), .manage-table.has-tour-option td:nth-child(2) { width: 78px; }
.manage-table.has-tour-option th:nth-child(3), .manage-table.has-tour-option td:nth-child(3) { width: 110px; }
.manage-table.has-tour-option th:nth-child(4), .manage-table.has-tour-option td:nth-child(4) { width: 110px; }
.manage-table.has-tour-option th:nth-child(5), .manage-table.has-tour-option td:nth-child(5) { width: 60px; }
.manage-table.has-tour-option th:nth-child(6), .manage-table.has-tour-option td:nth-child(6) { width: 80px; }
.manage-table.has-tour-option th:nth-child(7), .manage-table.has-tour-option td:nth-child(7) { width: 125px; }
.manage-table.has-tour-option th:nth-child(8), .manage-table.has-tour-option td:nth-child(8) { width: 130px; }
.manage-table.has-tour-option th:nth-child(9), .manage-table.has-tour-option td:nth-child(9) { width: 190px; }
.manage-table.has-tour-option th:nth-child(12), .manage-table.has-tour-option td:nth-child(12) { width: 155px; }
.manage-table.has-tour-option th:nth-child(13), .manage-table.has-tour-option td:nth-child(13) { width: 110px; }

.manage-table.has-tour-option th:last-child,
.manage-table.has-tour-option td:last-child {
    position: static;
}

.manage-table.has-tour-option .row-actions {
    justify-content: flex-start;
    min-width: 80px;
}

.tour-option-cell {
    color: #334155;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.report-table {
    min-width: 1120px;
}

.report-detail-table {
    min-width: 1320px;
}

.missing-value {
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

.users-table { min-width: 700px; }
.user-total-badge, .access-badge, .current-user-label {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    gap: 6px;
    white-space: nowrap;
}
.user-total-badge { background: #eef2ff; color: #4338ca; padding: 8px 11px; }
.access-badge { background: #f1f5f9; color: #475569; padding: 7px 10px; }
.access-badge.is-admin { background: #ede9fe; color: #6d28d9; }
.user-name-cell { align-items: center; display: flex; gap: 10px; }
.user-list-avatar { align-items: center; background: linear-gradient(135deg, #e0e7ff, #ede9fe); border: 1px solid #c7d2fe; border-radius: 50%; color: #4338ca; display: inline-flex; flex: 0 0 auto; font-size: 12px; font-weight: 850; height: 32px; justify-content: center; width: 32px; }
.current-user-label { background: #dcfce7; color: #15803d; margin-left: 2px; padding: 4px 7px; }
.admin-shortcut { align-items: center; background: linear-gradient(110deg, #fff, #f5f3ff); border: 1px solid #ddd6fe; border-radius: 16px; box-shadow: var(--shadow); display: flex; gap: 22px; justify-content: space-between; padding: 22px 24px; }
.admin-data-summary { grid-template-columns: minmax(260px, 365px); }
.admin-data-summary article:nth-child(2), .admin-data-summary + .admin-shortcut { display: none; }
.admin-shortcut > div { padding-left: 54px; position: relative; }
.admin-shortcut .metric-icon { left: 0; right: auto; top: 2px; }
.admin-shortcut h2 { font-size: 18px; margin: 3px 0 5px; }
.admin-shortcut p:last-child { color: var(--muted); font-size: 13px; }
.users-hero { align-items: center; background: linear-gradient(120deg, #312e81, #4f46e5 58%, #7c3aed); border-radius: 18px; box-shadow: 0 18px 36px rgba(79, 70, 229, .2); color: #fff; display: flex; justify-content: space-between; overflow: hidden; padding: 25px 28px; position: relative; }
.users-hero::after { border: 30px solid rgba(255,255,255,.07); border-radius: 50%; content: ''; height: 175px; position: absolute; right: 10%; top: -105px; width: 175px; }
.users-hero > div { padding-left: 58px; position: relative; z-index: 1; }
.users-hero .eyebrow { color: #c7d2fe; }
.users-hero h2 { font-size: 24px; margin: 4px 0; }
.users-hero p:last-child { color: rgba(255,255,255,.78); font-size: 13px; }
.users-hero-icon { align-items: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; display: inline-flex; height: 44px; justify-content: center; left: 0; position: absolute; top: 4px; width: 44px; }
.users-hero > strong { font-size: 30px; position: relative; text-align: right; z-index: 1; }
.users-hero > strong small { color: rgba(255,255,255,.72); display: block; font-size: 11px; font-weight: 700; margin-top: 3px; }
.calendar-hero { align-items: center; background: linear-gradient(120deg, #0f3f85, #2563eb 58%, #38bdf8); border-radius: 18px; box-shadow: 0 18px 36px rgba(37,99,235,.18); color: #fff; display: flex; justify-content: space-between; overflow: hidden; padding: 26px 28px; position: relative; }
.calendar-hero::after { border: 34px solid rgba(255,255,255,.08); border-radius: 50%; content: ''; height: 190px; position: absolute; right: 28%; top: -120px; width: 190px; }.calendar-hero > div:first-child { padding-left: 58px; position: relative; z-index: 1; }.calendar-hero .eyebrow { color: #bae6fd; }.calendar-hero h2 { font-size: 25px; margin: 4px 0; }.calendar-hero p:last-child { color: rgba(255,255,255,.8); font-size: 13px; }.calendar-hero-icon { align-items: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; display: inline-flex; height: 44px; justify-content: center; left: 0; position: absolute; top: 4px; width: 44px; }
.calendar-quick-stats { display: flex; gap: 10px; position: relative; z-index: 1; }.calendar-quick-stats > * { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: #fff; display: grid; min-width: 92px; padding: 10px 12px; text-align: center; }.calendar-quick-stats a:hover { background: rgba(255,255,255,.23); }.calendar-quick-stats strong { font-size: 22px; }.calendar-quick-stats span { color: rgba(255,255,255,.78); font-size: 10px; font-weight: 700; margin-top: 3px; }
.calendar-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }.calendar-controls { align-items: center; display: flex; gap: 12px; padding: 19px 22px; }.calendar-controls > div { flex: 1; }.calendar-controls h2 { font-size: 20px; margin-top: 3px; text-transform: capitalize; }.calendar-nav { align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; color: #475569; display: inline-flex; height: 38px; justify-content: center; width: 38px; }.calendar-nav:hover { background: #eef2ff; color: #4f46e5; }.calendar-today-link { margin-left: 8px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }.calendar-weekdays { background: #f8fafc; border-top: 1px solid #eef2f7; }.calendar-weekdays span { color: #64748b; font-size: 10px; font-weight: 850; padding: 11px; text-align: center; text-transform: uppercase; }.calendar-days { border-left: 1px solid #eef2f7; }.calendar-day { border-bottom: 1px solid #eef2f7; border-right: 1px solid #eef2f7; color: #334155; display: grid; gap: 5px; min-height: 105px; padding: 11px; position: relative; }.calendar-day:hover { background: #f8faff; }.calendar-day.is-empty { background: #fbfcfe; }.calendar-date { font-size: 13px; font-weight: 850; }.calendar-day strong { color: #2563eb; font-size: 12px; }.calendar-day small { color: #94a3b8; font-size: 10px; font-weight: 700; }.calendar-day.has-reservations { background: #f8fbff; }.calendar-day.is-today { background: #eef2ff; box-shadow: inset 0 3px 0 #4f46e5; }.calendar-day.is-tomorrow { background: #eff6ff; box-shadow: inset 0 3px 0 #2563eb; }.calendar-legend { align-items: center; color: #64748b; display: flex; flex-wrap: wrap; font-size: 11px; font-weight: 700; gap: 16px; padding: 14px 20px; }.calendar-legend span { align-items: center; display: inline-flex; gap: 6px; }.calendar-legend i { border-radius: 50%; display: inline-block; height: 9px; width: 9px; }.calendar-legend-today { background: #4f46e5; }.calendar-legend-tomorrow { background: #2563eb; }.calendar-legend-reservations { background: #93c5fd; }
.users-hero-action { align-items: center; background: #fff; border-radius: 10px; color: #4338ca; display: inline-flex; font-size: 13px; font-weight: 800; gap: 8px; padding: 11px 14px; position: relative; z-index: 1; }
.users-hero-action:hover { background: #eef2ff; }
.user-create-form { align-items: end; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; padding: 20px 22px 12px; }
.user-create-form button { white-space: nowrap; }
.user-password-note { color: #64748b; font-size: 11px; font-weight: 700; padding: 0 22px 20px; }
.user-password-note i { color: #4f46e5; margin-right: 5px; }
@media (max-width: 680px) { .admin-shortcut { align-items: flex-start; flex-direction: column; } .admin-shortcut .primary-button { width: 100%; } }
@media (max-width: 680px) { .users-hero { align-items: flex-start; flex-direction: column; gap: 16px; } .users-hero > strong { text-align: left; } }

.report-table td:nth-child(9),
.report-table td:nth-child(10),
.report-table td:nth-child(11) {
    font-weight: 800;
}

.product-cell {
    max-width: 320px;
    line-height: 1.35;
}

.dashboard-reservations-table .financial-column,
.manage-table .financial-column {
    display: none;
}

.dashboard-reservations-table.has-tour-option {
    min-width: 1210px;
    table-layout: fixed;
}

.dashboard-reservations-table.has-tour-option th:nth-child(1), .dashboard-reservations-table.has-tour-option td:nth-child(1) { width: 105px; }
.dashboard-reservations-table.has-tour-option th:nth-child(2), .dashboard-reservations-table.has-tour-option td:nth-child(2) { width: 70px; }
.dashboard-reservations-table.has-tour-option th:nth-child(3), .dashboard-reservations-table.has-tour-option td:nth-child(3) { width: 175px; }
.dashboard-reservations-table.has-tour-option th:nth-child(4), .dashboard-reservations-table.has-tour-option td:nth-child(4) { width: 70px; }
.dashboard-reservations-table.has-tour-option th:nth-child(5), .dashboard-reservations-table.has-tour-option td:nth-child(5) { width: 90px; }
.dashboard-reservations-table.has-tour-option th:nth-child(6), .dashboard-reservations-table.has-tour-option td:nth-child(6) { width: 180px; }
.dashboard-reservations-table.has-tour-option th:nth-child(7), .dashboard-reservations-table.has-tour-option td:nth-child(7) { width: 200px; }
.dashboard-reservations-table.has-tour-option th:nth-child(8), .dashboard-reservations-table.has-tour-option td:nth-child(8) {width: 450px;}
.dashboard-reservations-table.has-tour-option th:nth-child(11), .dashboard-reservations-table.has-tour-option td:nth-child(11) {width: 250px;}

.dashboard-reservations-table.has-tour-option td[data-label="Opción"] {
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.dashboard-reservations-table.has-tour-option .status-form,
.dashboard-reservations-table.has-tour-option .status-form select {
    min-width: 145px;
    width: 100%;
}

.manage-table th:last-child,
.manage-table td:last-child {
    background: #fff;
    position: sticky;
    right: 0;
    z-index: 2;
}

.manage-table th:last-child {
    background: #f7f8ff;
    z-index: 3;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

th {
    background: #f7f8ff;
    color: #475467;
    font-size: 11px;
    position: sticky;
    top: 0;
    text-transform: uppercase;
    z-index: 1;
}

td {
    font-size: 13px;
}

tbody tr:hover {
    background: #fbfdff;
}

td:nth-child(5),
td:nth-child(6),
td:nth-child(7) {
    font-weight: 700;
}

.status-form select {
    min-width: 145px;
}

.status-form {
    display: grid;
    gap: 8px;
}

.status-select {
    border: 1px solid transparent;
    color: #fff;
    font-weight: 800;
}

.reservation-details-form input,
.atv-select {
    min-width: 120px;
    max-width: 170px;
    padding: 8px 10px;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.management-product-name {
    display: inline-block;
    margin: 4px 0 6px;
    color: #4f55c8;
    font-size: 1rem;
}

.status-pendiente {
    background: #f59e0b;
    color: #fff;
}

.status-confirmado {
    background: #2563eb;
    color: #fff;
}

.status-realizado {
    background: #16a34a;
    color: #fff;
}

.status-cancelado {
    background: #dc2626;
    color: #fff;
}

.status-cambio_fecha {
    background: #7c3aed;
    color: #fff;
}

.status-no_show {
    background: #64748b;
    color: #fff;
}

.status-select option {
    background: #fff;
    color: #111827;
}

.reschedule-field {
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    width: 0;
}

.reschedule-field input {
    height: 0;
    min-height: 0;
    padding: 0;
    width: 0;
}

.rescheduled-note {
    color: #6d28d9;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-top: 4px;
}

.selected-product-name {
    border-bottom: 3px solid #ff6b2c;
    color: var(--ink);
    display: inline-block;
    font-size: 15px;
    line-height: 1.35;
    margin-top: 8px;
    padding-bottom: 5px;
}

.passenger-cell {
    min-width: 190px;
}

.passenger-cell strong,
.passenger-cell span {
    display: block;
}

.passenger-cell span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.manage-table th,
.manage-table td {
    padding: 10px 9px;
}

.manage-table td {
    font-weight: 400;
}

.manage-table input,
.manage-table select {
    border-radius: 8px;
    font-size: 12px;
    min-height: 36px;
    padding: 7px 9px;
}

.manage-table input:disabled,
.manage-table select:disabled {
    background: transparent;
    border-color: transparent;
    color: var(--ink);
    opacity: 1;
    padding-left: 0;
    padding-right: 0;
}

.manage-table .manage-status-select {
    min-width: 145px;
    width: 145px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    padding: 8px 30px 8px 12px;
    text-align: left;
}

.manage-table .manage-status-select:disabled {
    color: #fff;
    cursor: default;
    opacity: 1;
    padding: 8px 30px 8px 12px;
    -webkit-text-fill-color: #fff;
}

.manage-table .manage-status-select.status-pendiente { background: #d97706; }
.manage-table .manage-status-select.status-confirmado { background: #2563eb; }
.manage-table .manage-status-select.status-realizado { background: #15803d; }
.manage-table .manage-status-select.status-cancelado { background: #dc2626; }
.manage-table .manage-status-select.status-cambio_fecha { background: #7c3aed; }
.manage-table .manage-status-select.status-no_show { background: #475569; }

.manage-table tr.is-editing .manage-status-select {
    border-color: transparent;
    color: #fff;
    padding: 8px 30px 8px 12px;
}

.manage-table tr.is-editing {
    background: #fbfdff;
}

.manage-table tr.is-editing input,
.manage-table tr.is-editing select {
    background: #fff;
    border-color: #cbd5e1;
    padding-left: 9px;
    padding-right: 9px;
}

.manage-table input[name="product"] {
    min-width: 240px;
}

.manage-table input[name="first_name"],
.manage-table input[name="last_name"] {
    min-width: 130px;
}

.manage-table input[name="phone"] {
    min-width: 120px;
}

.inline-edit-form {
    margin: 0;
}

.row-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    min-width: 128px;
}

.row-actions form {
    margin: 0;
}

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

.empty-list-state {
    align-items: center;
    color: var(--muted);
    display: grid;
    gap: 10px;
    justify-items: center;
    min-height: 220px;
    padding: 32px;
    text-align: center;
}

.empty-list-state i {
    align-items: center;
    background: #eef2ff;
    border-radius: 8px;
    color: var(--brand);
    display: inline-flex;
    font-size: 22px;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.empty-list-state strong {
    color: var(--ink);
    font-size: 18px;
}

.empty-list-state span {
    font-size: 14px;
}

.pagination {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 14px 18px;
}

.pagination-summary {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.pagination-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pagination-links a,
.pagination-ellipsis {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 7px;
    justify-content: center;
    min-height: 36px;
    min-width: 36px;
    padding: 8px 11px;
}

.pagination-links a {
    background: #fff;
    color: var(--ink);
}

.pagination-links a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.pagination-links a.disabled {
    color: #98a2b3;
    opacity: 0.55;
    pointer-events: none;
}

.pagination-ellipsis {
    border-color: transparent;
    color: var(--muted);
    min-width: auto;
}

@media (max-width: 980px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .dashboard-shell.sidebar-collapsed { grid-template-columns: 1fr; }
    .dashboard-shell.sidebar-collapsed .brand { justify-content: flex-start; }
    .dashboard-shell.sidebar-collapsed .brand strong { display: inline; }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle { left: auto; margin-left: auto; position: static; }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle i { transform: none; }
    .sidebar.menu-closed .side-nav { display: none; }
    .side-nav::before { display: none; }
    .operations-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operations-strip > a:nth-child(2) { border-right: 0; }
    .operations-strip > a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

    .sidebar {
        align-items: center;
        border-radius: 0;
        display: grid;
        gap: 12px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 0;
        padding: 12px;
    }

    .brand {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .brand strong {
        color: #fff;
        display: inline;
        font-size: 14px;
        margin-left: 10px;
        white-space: nowrap;
    }

    .workspace {
        border-left: 0;
        border-radius: 0;
    }

    .side-nav {
        display: flex;
        gap: 8px;
        justify-items: stretch;
        min-width: 0;
        overflow-x: auto;
        padding: 2px 0;
    }

    .side-nav a,
    .logout-link {
        flex: 0 0 auto;
        font-size: 0;
        justify-content: center;
        padding: 0;
        width: 42px;
    }

    .status-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .management-toolbar .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .management-toolbar .whatsapp-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .management-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-footer { gap: 26px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px; }
    .footer-signature { justify-items: start; text-align: left; }
}

@media (max-width: 680px) {
    .topbar,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        gap: 12px;
        padding: 18px 16px 6px;
    }

    .topbar h1 {
        font-size: 22px;
        line-height: 1.15;
    }

    .topbar-actions {
        justify-content: space-between;
        width: 100%;
    }

    .preview-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .topbar-actions span {
        max-width: calc(100vw - 118px);
    }

    .page {
        padding: 14px 12px 18px;
    }

    .dashboard-welcome {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px;
    }

    .operations-strip { grid-template-columns: 1fr; }
    .operations-strip > a:not(:last-child) { border-bottom: 1px solid var(--line); border-right: 0; }

    .welcome-actions,
    .welcome-actions a {
        width: 100%;
    }

    .status-overview-head {
        align-items: flex-start;
    }

    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-overview-content { grid-template-columns: 1fr; }
    .filter-count { margin-left: 0; }

    .dashboard-shell {
        padding: 0;
    }

    .sidebar,
    .workspace {
        border-radius: 0;
    }

    .sidebar {
        align-items: stretch;
        grid-template-columns: 1fr auto;
    }

    .brand strong {
        max-width: calc(100vw - 96px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .side-nav {
        grid-column: 1 / -1;
        order: 3;
    }

    .logout-link {
        justify-self: end;
    }

    .filters,
    .management-toolbar .filters,
    .import-box,
    .import-shortcut,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .management-summary {
        grid-template-columns: 1fr;
    }

    .report-filters {
        grid-template-columns: 1fr;
    }

    .guide-add-form {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .guide-page-form {
        grid-template-columns: 1fr;
    }

    .guide-selector {
        min-width: 0;
        width: 100%;
    }

    .guide-send-controls {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .import-page-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-page-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination-links {
        justify-content: flex-start;
    }

    .auth-panel {
        padding: 24px;
    }

    .admin-footer { grid-template-columns: 1fr; padding: 24px 20px; }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        min-width: 0;
    }

    thead {
        display: none;
    }

    tr {
        border-bottom: 1px solid var(--line);
        padding: 12px;
    }

    td {
        border: 0;
        display: grid;
        gap: 8px;
        grid-template-columns: minmax(92px, 35%) minmax(0, 1fr);
        padding: 8px 0;
    }

    .manage-table {
        min-width: 0;
    }

    .manage-table.has-tour-option {
        min-width: 0;
        table-layout: auto;
    }

    .manage-table.has-tour-option th,
    .manage-table.has-tour-option td {
        width: auto;
    }

    .dashboard-reservations-table.has-tour-option {
        min-width: 0;
        table-layout: auto;
    }

    .dashboard-reservations-table.has-tour-option th,
    .dashboard-reservations-table.has-tour-option td {
        width: auto;
    }

    .manage-table th:last-child,
    .manage-table td:last-child {
        position: static;
    }

    .manage-table input,
    .manage-table select,
    .manage-table input[name="product"],
    .manage-table input[name="first_name"],
    .manage-table input[name="last_name"],
    .manage-table input[name="phone"] {
        min-width: 0;
    }

    td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .empty {
        display: block;
    }

    .empty::before {
        content: none;
    }
}

/* Navegacion administrativa */
@media (min-width: 981px) {
    .dashboard-shell { grid-template-columns: 350px minmax(0, 1fr); }
    .dashboard-shell.sidebar-collapsed { grid-template-columns: 74px minmax(0, 1fr); }

    .topbar {
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 1px 0 #e2e6ed;
        height: 74px;
        padding: 10px 22px;
    }

    .workspace { padding-top: 74px; }

    .workspace {
        grid-column: 2;
        min-width: 0;
        width: 100%;
    }

    .sidebar {
        background: #fff;
        border-right: 1px solid #dfe3ea;
        box-shadow: none;
        grid-template-rows: 1fr auto;
        height: calc(100vh - 74px);
        left: 0;
        min-height: 0;
        padding: 12px 10px 0;
        position: fixed;
        top: 74px;
        width: 350px;
        z-index: 15;
    }

    .sidebar .side-nav {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 4px 3px 18px;
        scrollbar-gutter: stable;
    }

    .dashboard-shell.sidebar-collapsed .sidebar { width: 74px; }

    .sidebar .brand,
    .sidebar .logout-link { display: none; }

    .topbar {
        height: 96px;
        left: 0;
        padding-left: 26px;
        position: fixed;
        right: 0;
        width: 100%;
    }

    .workspace { padding-top: 96px; }

    .sidebar-toggle {
        background: #fff;
        border: 0;
        border-radius: 0;
        border-top: 1px solid #dfe3ea;
        color: #172b4d;
        font-size: 16px;
        gap: 9px;
        height: 68px;
        justify-content: flex-start;
        margin: 0 -10px;
        padding: 0 22px;
        width: calc(100% + 20px);
    }

    .sidebar-toggle:hover { background: #f7f8fa; }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle { bottom: 0; left: 0; margin: 0 -10px; position: static; top: auto; width: calc(100% + 20px); }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle i { margin: auto; transform: rotate(180deg); }

    .side-nav { gap: 7px; padding-top: 0; }
    .side-nav::before { display: none; }
    .side-nav a,
    .nav-group-toggle {
        align-items: center;
        background: transparent;
        border: 0;
        border-radius: 10px;
        color: #0d294d;
        display: flex;
        font-size: 16px;
        font-weight: 700;
        gap: 9px;
        justify-content: flex-start;
        min-height: 58px;
        padding: 0 12px;
        width: 100%;
    }

    .side-nav a:hover,
    .side-nav a.active,
    .nav-group:has(a.active) > .nav-group-toggle { background: #eceff2; color: #0668ee; transform: none; }
    .side-nav a.active::before { display: none; }
    .side-nav .nav-icon { background: transparent; border: 0; color: currentColor; flex-basis: 24px; height: 24px; width: 24px; }
    .side-nav .nav-icon i { color: currentColor; font-size: 16px; }
    .nav-label { flex: 1; text-align: left; }
    .nav-chevron { font-size: 11px; transition: transform .2s ease; }
    .nav-group.is-open .nav-chevron { transform: rotate(180deg); }
    .nav-group-links { display: none; padding: 3px 0 6px 42px; }
    .nav-group.is-open .nav-group-links { display: grid; gap: 3px; }
    .nav-group-links a { border-radius: 7px; color: #56667c; font-size: 12px; min-height: 34px; padding: 0 10px; }
    .nav-group-links a.active { background: #edf4ff; color: #0568f0; }

    .dashboard-shell.sidebar-collapsed .nav-label,
    .dashboard-shell.sidebar-collapsed .nav-chevron,
    .dashboard-shell.sidebar-collapsed .nav-group-links { display: none; }
    .dashboard-shell.sidebar-collapsed .side-nav a,
    .dashboard-shell.sidebar-collapsed .nav-group-toggle { font-size: 0; justify-content: center; padding: 0; width: 52px; }
    .dashboard-shell.sidebar-collapsed .side-nav { justify-items: center; }
}

/* Sistema visual renovado: aplicado a todo el panel administrativo */
:root {
    --bg: #f5f7fb;
    --panel: rgba(255, 255, 255, .96);
    --ink: #172033;
    --muted: #6b778c;
    --line: #e6eaf1;
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --shadow: 0 12px 32px rgba(31, 41, 55, .07);
}

body {
    background:
        radial-gradient(circle at 92% 0%, rgba(99, 102, 241, .09), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
    outline: none;
}

.workspace { background: transparent; }
.page { gap: 20px; padding: 24px 28px 32px; }
.topbar {
    background: rgba(255, 255, 255, .82);
    border-bottom-color: rgba(226, 232, 240, .9);
}
.topbar-logo-mark { background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 7px 18px rgba(79, 70, 229, .28); }
.topbar-context strong, .topbar-brand { color: #172033; }
.user-menu-toggle { border-color: #e2e8f0; box-shadow: 0 2px 5px rgba(15, 23, 42, .03); }

.dashboard-welcome {
    background: linear-gradient(120deg, #312e81 0%, #4f46e5 53%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    box-shadow: 0 20px 42px rgba(79, 70, 229, .20);
    padding: 28px 30px;
}
.dashboard-welcome::before { background: rgba(255,255,255,.06); border-radius: 50%; content: ''; height: 260px; position: absolute; right: -72px; top: -128px; width: 260px; }
.dashboard-welcome::after { right: 18%; }
.dashboard-welcome h2 { font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -.6px; }
.welcome-actions .primary-button { border-color: #fff; }

.operations-strip, .status-overview, .toolbar, .table-section, .summary-grid article {
    border-color: rgba(226, 232, 240, .92);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.operations-strip > a { min-height: 92px; padding: 18px 20px; }
.operations-strip > a:hover { background: #f8faff; }
.operation-icon { border-radius: 12px; }
.operation-arrow { transition: color .18s ease, transform .18s ease; }
.operations-strip > a:hover .operation-arrow { color: var(--brand); transform: translateX(3px); }

.summary-grid { gap: 18px; }
.summary-grid article { min-height: 142px; padding: 22px 24px; overflow: hidden; }
.summary-grid article::before { background: linear-gradient(180deg, #818cf8, #4f46e5); border-radius: 0 6px 6px 0; height: 52px; top: 24px; }
.summary-grid article:hover { border-color: #cfd5ff; box-shadow: 0 16px 34px rgba(79, 70, 229, .12); transform: translateY(-2px); }
.summary-grid strong { font-size: clamp(24px, 2vw, 30px); letter-spacing: -.7px; }
.metric-icon { border-radius: 15px; box-shadow: 0 9px 18px rgba(79, 70, 229, .18); }
.reservations-icon { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.sales-icon { background: linear-gradient(135deg, #22c55e, #15803d); }
.net-icon { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.profit-icon { background: linear-gradient(135deg, #fb923c, #ea580c); }

.status-overview { padding: 22px 24px 24px; }
.status-overview-head h2, .section-head h2 { letter-spacing: -.35px; }
.status-donut { box-shadow: 0 12px 25px rgba(15, 23, 42, .08); }
.status-grid { gap: 10px; }
.status-summary-item { background: #f8fafc; border-color: #eef2f7; border-radius: 12px; padding: 12px 12px 16px; }
.status-summary-item:hover, .status-summary-item.is-active { background: #fff; border-color: #c7d2fe; box-shadow: 0 7px 14px rgba(79, 70, 229, .08); }

.toolbar { padding: 20px; }
.quick-filters a, .filter-count { background: #fff; border-color: #e2e8f0; }
input, select { border-color: #dbe2ec; border-radius: 10px; background: #fff; }
input:hover, select:hover { border-color: #b9c3d2; }
button, .primary-button { border-radius: 10px; box-shadow: 0 5px 12px rgba(79, 70, 229, .15); }
.ghost-button { border-radius: 10px; }

.section-head { padding: 21px 24px; }
.table-wrap { scrollbar-color: #c7d2fe transparent; scrollbar-width: thin; }
th { background: #f8fafc; color: #64748b; letter-spacing: .04em; }
th, td { border-bottom-color: #eef2f7; padding: 14px 16px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f8faff; }
.pagination { padding: 16px 20px; }
.pagination-links a { border-radius: 9px; }
.empty-list-state { background: linear-gradient(180deg, #fff, #fafbff); }

@media (min-width: 981px) {
    .sidebar, .dashboard-shell.sidebar-collapsed .sidebar {
        background: linear-gradient(180deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
        box-shadow: 14px 0 35px rgba(30, 27, 75, .12);
    }
    .side-nav a { border-radius: 12px; }
    .side-nav a.active::before { display: block; background: #a5b4fc; }
}

@media (max-width: 680px) {
    .page { gap: 16px; padding: 16px 14px 24px; }
    .dashboard-welcome { border-radius: 16px; padding: 22px; }
    .status-overview, .toolbar, .table-section { border-radius: 14px; }
    .summary-grid article { min-height: 124px; }
    .welcome-refresh { width: 100%; }
}

.calendar-tour-list { display: grid; gap: 3px; min-width: 0; }
.calendar-tour-list > span { align-items: center; background: #eef6ff; border-radius: 5px; color: #365a8a; display: grid; font-size: 9px; gap: 4px; grid-template-columns: minmax(0, 1fr) auto; padding: 3px 5px; }
.calendar-tour-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-tour-list em { color: #2563eb; font-size: 10px; font-style: normal; font-weight: 850; }

/* Topbar de operaciones */
@media (min-width: 981px) {
    .topbar { align-items: center; background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid rgba(226, 232, 240, .9); box-shadow: 0 4px 22px rgba(15, 23, 42, .035); height: 80px; padding: 10px 30px; }
    .workspace { padding-top: 80px; }
    .sidebar, .dashboard-shell.sidebar-collapsed .sidebar { height: calc(100vh - 80px); top: 80px; }
    .topbar-main { gap: 16px; }
    .topbar-logo-mark { background: linear-gradient(145deg, #4f46e5, #7c3aed); border-radius: 13px; box-shadow: 0 8px 20px rgba(79, 70, 229, .28); font-size: 11px; height: 42px; letter-spacing: .02em; width: 42px; }
    .topbar-wordmark { color: #334155; font-size: 14px; letter-spacing: -.2px; }
    .topbar-wordmark strong { color: #172033; }
    .topbar-divider { background: #e2e8f0; height: 36px; }
    .topbar-context { gap: 3px; }
    .topbar-context small { color: #94a3b8; font-size: 9px; letter-spacing: .1em; }
    .topbar-context strong { color: #1e293b; font-size: 14px; }
    .topbar-live { align-items: center; background: #f8fafc; border: 1px solid #e8edf4; border-radius: 999px; color: #64748b; display: inline-flex; font-size: 11px; font-weight: 700; gap: 7px; margin-left: 4px; padding: 8px 11px; text-transform: capitalize; }
    .topbar-live i { color: #6366f1; font-size: 12px; }
    .user-menu-toggle { background: #fff; border-color: #e2e8f0; border-radius: 14px; box-shadow: 0 3px 10px rgba(15, 23, 42, .04); min-height: 54px; padding: 7px 12px 7px 8px; }
    .user-menu-toggle:hover { border-color: #c7d2fe; box-shadow: 0 7px 16px rgba(79, 70, 229, .10); }
    .user-avatar { background: linear-gradient(135deg, #e0e7ff, #ede9fe); border-color: #c7d2fe; color: #4338ca !important; height: 36px; width: 36px; }
    .user-identity strong { color: #1e293b; font-size: 12px; }
    .user-identity small { color: #94a3b8; }
    .user-menu-dropdown { border-radius: 14px; box-shadow: 0 18px 42px rgba(15, 23, 42, .15); padding: 9px; }
}

@media (max-width: 980px) { .topbar-live { display: none; } }

@media (max-width: 680px) {
    .guides-hero { align-items: flex-start; grid-template-columns: 1fr; padding: 22px; }
    .guides-hero-stat { text-align: left; }
    .guides-hero-action { justify-content: center; width: 100%; }
    .guide-person-cell { display: flex !important; }
    .import-hero, .admin-hero { align-items: flex-start; flex-direction: column; padding: 22px; }
    .user-create-form { grid-template-columns: 1fr; padding: 18px 18px 10px; }
    .user-create-form button { width: 100%; }
    .user-password-note { padding: 0 18px 18px; }
    .calendar-hero { align-items: flex-start; flex-direction: column; padding: 22px; }.calendar-quick-stats { width: 100%; }.calendar-quick-stats > * { flex: 1; min-width: 0; }.calendar-controls { flex-wrap: wrap; padding: 16px; }.calendar-controls > div { min-width: calc(100% - 100px); order: -1; }.calendar-today-link { margin-left: 0; }.calendar-day { min-height: 76px; padding: 7px 5px; }.calendar-day strong { font-size: 10px; }.calendar-day small { display: none; }.calendar-weekdays span { font-size: 9px; padding: 9px 2px; }.calendar-legend { gap: 8px 12px; padding: 12px; }
}

@media (max-width: 980px) {
    .topbar { left: 0; right: 0; position: fixed; width: 100%; }
    .sidebar { margin-top: 82px; }
    .sidebar .logout-link { display: none; }
    .sidebar .sidebar-toggle { font-size: 0; justify-self: end; margin-left: 0; }
    .workspace { padding-top: 82px; }
    .nav-group-toggle { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; font-size: 0; height: 42px; min-height: 42px; padding: 0; width: 42px; }
    .nav-group-toggle .nav-chevron { display: none; }
    .nav-group-links { display: none; }
    .side-nav .nav-label { display: none; }
}

@media (max-width: 680px) {
    .topbar { position: static; }
    .topbar-divider,
    .topbar-context,
    .topbar-wordmark,
    .user-identity { display: none; }
    .sidebar { margin-top: 0; }
    .workspace { padding-top: 0; }
}

/* Restauracion de la navegacion lateral anterior */
@media (min-width: 981px) {
    .dashboard-shell,
    .dashboard-shell.sidebar-collapsed { grid-template-columns: 230px minmax(0, 1fr); }
    .dashboard-shell.sidebar-collapsed { grid-template-columns: 74px minmax(0, 1fr); }

    .sidebar,
    .dashboard-shell.sidebar-collapsed .sidebar {
        background: linear-gradient(180deg, #5657c9 0%, #3d48b7 100%);
        border-right: 0;
        box-shadow: 0 20px 45px rgba(61, 72, 183, 0.25);
        grid-template-rows: 1fr auto;
        height: calc(100vh - 96px);
        min-height: 0;
        padding: 18px 12px;
        top: 96px;
        width: 230px;
    }

    .dashboard-shell.sidebar-collapsed .sidebar { width: 74px; }
    .sidebar .brand { display: none; }
    .sidebar .logout-link { display: none; }
    .brand { justify-content: flex-start; margin-bottom: 28px; }
    .brand strong { color: #fff; display: block; font-size: 15px; }

    .sidebar .sidebar-toggle,
    .dashboard-shell.sidebar-collapsed .sidebar-toggle {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 14px;
        color: #fff;
        font-size: 13px;
        gap: 10px;
        height: 43px;
        justify-content: flex-start;
        margin: 0;
        padding: 0 16px;
        position: static;
        width: 100%;
    }

    .sidebar-toggle span { display: inline; }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle { justify-content: center; padding: 0; }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle span { display: none; }
    .dashboard-shell.sidebar-collapsed .sidebar-toggle i { margin: 0; }
    .side-nav { gap: 12px; padding-top: 0; }
    .side-nav a {
        border-radius: 14px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 13px;
        gap: 10px;
        min-height: 42px;
        padding: 0 8px;
    }
    .side-nav a:hover,
    .side-nav a.active { background: rgba(255, 255, 255, 0.18); color: #fff; }
    .side-nav .nav-icon {
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 12px;
        color: #fff;
        flex-basis: 34px;
        height: 34px;
        width: 34px;
    }
    .side-nav .nav-icon i { color: #fff; font-size: 15px; }
    .dashboard-shell.sidebar-collapsed .brand { justify-content: center; }
    .dashboard-shell.sidebar-collapsed .brand strong { display: none; }
    .dashboard-shell.sidebar-collapsed .sidebar .sidebar-toggle { position: static; }
    .dashboard-shell.sidebar-collapsed .side-nav a { font-size: 0; justify-content: center; padding: 0; width: 42px; }
}

/* Prioridad final para que la identidad visual se conserve sobre reglas heredadas. */
@media (min-width: 981px) {
    .sidebar, .dashboard-shell.sidebar-collapsed .sidebar {
        background: linear-gradient(180deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
        box-shadow: 14px 0 35px rgba(30, 27, 75, .12);
    }
    .side-nav a.active::before { background: #a5b4fc; display: block; }
}

@media (max-width: 680px) {
    .page { gap: 16px; padding: 16px 14px 24px; }
    .dashboard-welcome { border-radius: 16px; padding: 22px; }
    .status-overview, .toolbar, .table-section { border-radius: 14px; }
    .summary-grid article { min-height: 124px; }
    .welcome-refresh { width: 100%; }
}
