* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --border-color: #bdc3c7;
    --text-color: #2c3e50;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background: var(--primary-color);
    color: white;
    padding: 20px;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: var(--shadow);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo .subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.nav-menu {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background-color: var(--secondary-color);
    color: white;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 12px;
    opacity: 0.6;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: white;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* BOTONES */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* CONTENIDO PRINCIPAL */
.content-sections {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* TABLAS */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 4px;
    overflow: hidden;
}

.data-table thead {
    background-color: var(--primary-color);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ecf0f1;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pendiente {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmada {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-completada {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelada {
    background-color: #f8d7da;
    color: #721c24;
}

.status-no_asistio {
    background-color: #f5c6cb;
    color: #721c24;
}

.status-pagado {
    background-color: #d4edda;
    color: #155724;
}

.status-parcial {
    background-color: #fff3cd;
    color: #856404;
}

.status-anulado {
    background-color: #f8d7da;
    color: #721c24;
}

.text-center {
    text-align: center;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 16px;
}

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

.login-card {
    width: 100%;
    max-width: 380px;
    background: white;
    padding: 28px;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.login-card h1 {
    color: var(--primary-color);
    margin-bottom: 4px;
}

.login-card p {
    margin-bottom: 20px;
    color: #64748b;
}

.login-card .btn {
    width: 100%;
}

.current-user {
    align-self: center;
    font-size: 13px;
    color: #64748b;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-panel {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.admin-panel h3 {
    margin-bottom: 16px;
    color: var(--primary-color);
}

.modal-content {
    background-color: white;
    margin: 0 auto;
    padding: 0;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 32px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background: white;
}

.business-delete-dialog {
    max-width: 580px;
}

.modal-header-danger {
    background: linear-gradient(135deg, #7f1d1d, #b42318);
}

.modal-header-danger > div {
    min-width: 0;
}

.modal-eyebrow {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .82;
}

.danger-callout {
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff7f7;
    color: #7f1d1d;
}

.danger-callout p {
    margin: 7px 0 0;
    color: #991b1b;
    line-height: 1.5;
}

.deletion-summary {
    margin: 18px 0;
    padding: 15px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f8faf9;
}

.deletion-summary-header,
.deletion-summary li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.deletion-summary-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.deletion-summary ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.deletion-summary li {
    color: var(--text-muted, #64748b);
    font-size: 13px;
}

.deletion-summary li strong {
    color: var(--text-color);
}

.deletion-loading,
.deletion-error,
.deletion-summary > p {
    margin: 0;
}

.deletion-error {
    color: var(--danger-color);
}

.deletion-confirmation small {
    display: block;
    margin-top: 7px;
    color: var(--text-muted, #64748b);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .5;
    box-shadow: none;
    transform: none;
}

@media (max-width: 560px) {
    .deletion-summary ul {
        grid-template-columns: 1fr;
    }
}

/* FORMULARIO */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* TOAST NOTIFICACIONES */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 2000;
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}

.toast.warning {
    background-color: var(--warning-color);
}

.toast.info {
    background-color: #3498db;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 10px;
    }

    .logo h1 {
        font-size: 16px;
    }

    .logo .subtitle {
        display: none;
    }

    .nav-link {
        padding: 10px;
        text-align: center;
        font-size: 12px;
    }

    .main-content {
        margin-left: 60px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }

    .modal-content {
        width: 95%;
        max-height: calc(100vh - 20px);
    }

    .filter-group {
        flex-wrap: wrap;
    }
}

/* CONTENEDORES ESPECIALES */
.horarios-container,
.bloqueos-container {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.horarios-filter,
.bloqueos-filter {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.horarios-filter select,
.bloqueos-filter select,
.bloqueos-filter input {
    flex: 1;
    max-width: 200px;
}

.finance-header {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.finance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.summary-card span {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.summary-card strong {
    display: block;
    font-size: 22px;
    color: var(--primary-color);
}

.finance-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.finance-tab {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--primary-color);
    border-radius: 4px;
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 600;
}

.finance-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.finance-panel {
    display: none;
}

.finance-panel.active {
    display: block;
}

.whatsapp-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.whatsapp-panel {
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.whatsapp-panel h3 {
    color: var(--primary-color);
    margin-bottom: 14px;
}

.whatsapp-status-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.muted-label {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 4px;
}

.whatsapp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.whatsapp-qr-box {
    min-height: 260px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 16px;
}

.whatsapp-qr-box img {
    width: min(100%, 260px);
    height: auto;
    display: block;
}

.whatsapp-bot-panel {
    grid-column: 1 / -1;
}

.bot-message-input {
    min-height: 140px;
}

.bot-preview {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #f8fafc;
    padding: 12px;
    margin-bottom: 14px;
}

.bot-preview pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    margin-top: 6px;
    color: var(--text-color);
}

.weekly-schedule {
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.weekly-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.weekly-toolbar .filter-input {
    min-width: 240px;
}

.weekly-schedule-form {
    display: grid;
    gap: 10px;
}

.weekly-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(110px, 0.9fr) minmax(130px, 1fr) minmax(130px, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    background: #f8fafc;
}

.weekly-day {
    font-weight: 700;
    color: var(--primary-color);
}

.weekly-row label {
    display: grid;
    gap: 5px;
    font-size: 13px;
    color: #64748b;
}

.weekly-switch {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
    color: var(--text-color) !important;
}

.weekly-row input[type="time"] {
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 10px;
}

.form-error {
    margin-top: 12px;
    color: #b42318;
    font-weight: 600;
}

@media (max-width: 760px) {
    .weekly-row {
        grid-template-columns: 1fr;
    }
    .weekly-toolbar .filter-input,
    .weekly-toolbar .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Professional visual system — 2026 refresh
   -------------------------------------------------------------------------- */

:root {
    --primary-color: #15332f;
    --primary-strong: #0d2522;
    --secondary-color: #c47b46;
    --secondary-hover: #a96031;
    --success-color: #167c5a;
    --warning-color: #b7791f;
    --danger-color: #c43d3d;
    --light-bg: #f5f4f0;
    --border-color: #dde3df;
    --text-color: #182520;
    --muted-color: #6b7973;
    --surface: #ffffff;
    --shadow: 0 12px 32px rgba(20, 45, 40, 0.08);
    --shadow-sm: 0 3px 12px rgba(20, 45, 40, 0.07);
    --radius: 14px;
    --radius-sm: 9px;
}

html {
    background: var(--light-bg);
}

body {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--light-bg);
    color: var(--text-color);
    letter-spacing: -0.01em;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(196, 123, 70, 0.25);
    outline-offset: 2px;
}

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.eyebrow-light {
    color: #e7b38b;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: linear-gradient(145deg, #d49362, #a75b2b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 18px rgba(0, 0, 0, 0.15);
    color: #fff;
    display: inline-grid;
    flex: 0 0 auto;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 700;
    place-items: center;
}

/* Login */
.login-view {
    position: relative;
    min-height: 100vh;
    padding: 32px;
    background:
        radial-gradient(circle at 12% 15%, rgba(196, 123, 70, 0.14), transparent 28%),
        radial-gradient(circle at 88% 82%, rgba(21, 51, 47, 0.12), transparent 30%),
        #efeee9;
    overflow: hidden;
}

.login-view::before,
.login-view::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(21, 51, 47, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.login-view::before {
    left: -110px;
    top: -100px;
}

.login-view::after {
    right: -120px;
    bottom: -130px;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(330px, 0.9fr) minmax(390px, 1fr);
    width: min(940px, 100%);
    min-height: 570px;
    margin: auto;
    overflow: hidden;
    border: 1px solid rgba(21, 51, 47, 0.1);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 42, 37, 0.16);
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    overflow: hidden;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--primary-strong);
    color: #fff;
}

.login-brand::after {
    content: "";
    position: absolute;
    right: -105px;
    bottom: -105px;
    width: 300px;
    height: 300px;
    border: 48px solid rgba(196, 123, 70, 0.11);
    border-radius: 50%;
}

.brand-lockup {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 750;
}

.login-brand-copy {
    position: relative;
    z-index: 1;
}

.login-brand-copy h1 {
    max-width: 420px;
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.login-brand-copy p {
    max-width: 360px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.7;
}

.login-trust {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 650;
}

.login-trust span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.login-trust i,
.system-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #55c79a;
    box-shadow: 0 0 0 4px rgba(85, 199, 154, 0.12);
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    max-width: none;
    padding: clamp(38px, 7vw, 72px);
    border-radius: 0;
    box-shadow: none;
}

.login-card-heading {
    margin-bottom: 30px;
}

.login-card h2 {
    margin: 0 0 8px;
    color: var(--primary-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 550;
    letter-spacing: -0.035em;
}

.login-card p {
    margin: 0;
    color: var(--muted-color);
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-group label {
    margin-bottom: 8px;
    color: #31443d;
    font-size: 13px;
    font-weight: 700;
}

.login-card .form-group input {
    min-height: 50px;
    padding: 0 15px;
    border: 1px solid #d7dfda;
    border-radius: 10px;
    background: #fbfcfb;
    color: var(--text-color);
}

.login-card .form-group input::placeholder {
    color: #a4aea9;
}

.login-card .form-group input:focus {
    border-color: var(--secondary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(196, 123, 70, 0.1);
}

.login-submit {
    min-height: 50px;
    margin-top: 5px;
    justify-content: space-between;
    padding-inline: 18px;
}

.login-help {
    margin-top: 22px !important;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}

/* Application shell */
.container {
    min-height: 100vh;
    height: auto;
}

.sidebar {
    width: 264px;
    padding: 24px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--primary-strong);
    box-shadow: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 4px 32px;
    padding: 0 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    text-align: left;
}

.logo h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
}

.logo .subtitle {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-label {
    margin: 0 12px 10px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.nav-menu {
    padding-bottom: 110px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    margin-bottom: 4px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 13px;
    font-weight: 650;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-icon {
    width: 27px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: grid;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.58);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    place-items: center;
}

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

.nav-link.active {
    border-color: rgba(223, 159, 110, 0.16);
    background: rgba(196, 123, 70, 0.16);
    color: #f7e6d9;
}

.nav-link.active .nav-icon {
    border-color: rgba(223, 159, 110, 0.38);
    background: var(--secondary-color);
    color: #fff;
}

.sidebar-footer {
    right: 18px;
    bottom: 22px;
    left: 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    opacity: 1;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 10px;
    font-weight: 700;
}

.sidebar-footer .version {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
}

.main-content {
    margin-left: 264px;
    min-width: 0;
    overflow: visible;
}

.header {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 86px;
    padding: 16px clamp(20px, 3.5vw, 44px);
    border-bottom: 1px solid #e5e7e4;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.header h2 {
    color: var(--primary-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header-title .eyebrow {
    margin-bottom: 3px;
    font-size: 8px;
}

.header-actions {
    align-items: center;
    gap: 8px;
}

.current-user {
    max-width: 230px;
    margin-right: 8px;
    padding-right: 16px;
    border-right: 1px solid var(--border-color);
    color: var(--muted-color);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-sections {
    padding: clamp(20px, 3.5vw, 44px);
    background:
        linear-gradient(rgba(255,255,255,0.38), rgba(255,255,255,0.38)),
        var(--light-bg);
}

.section {
    max-width: 1500px;
    margin-inline: auto;
    overflow-x: auto;
}

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

.filter-group {
    flex-wrap: wrap;
}

.filter-input,
.form-group input,
.form-group select,
.form-group textarea,
.weekly-row input[type="time"] {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.filter-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.weekly-row input[type="time"]:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(196, 123, 70, 0.1);
}

.btn {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn-primary {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 5px 14px rgba(169, 96, 49, 0.2);
}

.btn-primary:hover {
    background: var(--secondary-hover);
    box-shadow: 0 7px 18px rgba(169, 96, 49, 0.24);
    transform: translateY(-1px);
}

.btn-secondary {
    border-color: var(--border-color);
    background: #fff;
    color: #34453f;
}

.btn-secondary:hover {
    border-color: #c2ccc7;
    background: #f8faf8;
}

.btn-success,
.btn-danger,
.btn-warning,
.btn-small {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 11px;
}

.data-table {
    min-width: 760px;
    border: 1px solid #e2e7e4;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.data-table thead {
    background: #f7f8f6;
    color: #52615b;
}

.data-table th {
    padding: 12px 15px;
    border-bottom: 1px solid #dde3df;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.data-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #edf0ee;
    color: #34443e;
    font-size: 12px;
}

.data-table tbody tr {
    transition: background 140ms ease;
}

.data-table tbody tr:hover {
    background: #fbf7f3;
}

.status-badge {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.status-pendiente,
.status-parcial {
    background: #fff4da;
    color: #8a5a0a;
}

.status-confirmada {
    background: #e1f2ef;
    color: #17685a;
}

.status-completada,
.status-pagado {
    background: #e3f4e9;
    color: #17613b;
}

.status-cancelada,
.status-no_asistio,
.status-anulado {
    background: #fde8e8;
    color: #9c3030;
}

.summary-card,
.admin-panel,
.whatsapp-panel,
.weekly-schedule,
.horarios-container,
.bloqueos-container {
    border: 1px solid #e1e6e3;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.summary-card {
    position: relative;
    padding: 20px;
    overflow: hidden;
}

.summary-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -32px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(196, 123, 70, 0.08);
}

.summary-card span {
    color: var(--muted-color);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-card strong {
    color: var(--primary-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 600;
}

.finance-tab {
    min-height: 38px;
    border-radius: 9px;
    color: #4b5b55;
}

.finance-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.modal {
    padding: 24px;
    background: rgba(8, 28, 25, 0.56);
    backdrop-filter: blur(5px);
}

.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(4, 24, 21, 0.28);
    overflow: hidden;
}

.modal-header {
    padding: 20px 22px;
    background: var(--primary-strong);
}

.modal-header h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 600;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 15px 22px;
    border-color: #e7ebe8;
    background: #fafbf9;
}

.toast {
    padding: 13px 17px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 42, 37, 0.18);
    font-size: 12px;
    font-weight: 650;
}

.weekly-row {
    border-color: #e4e9e6;
    border-radius: 10px;
    background: #fafbf9;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 0.8fr 1fr;
    }

    .login-brand,
    .login-card {
        padding: 34px;
    }

    .current-user {
        display: none;
    }
}

@media (max-width: 768px) {
    .login-view {
        padding: 0;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-brand {
        min-height: 260px;
        padding: 28px;
    }

    .login-brand-copy h1 {
        margin-bottom: 12px;
        font-size: 38px;
    }

    .login-brand-copy p,
    .login-trust {
        display: none;
    }

    .login-card {
        justify-content: flex-start;
        padding: 34px 28px 44px;
    }

    .login-card h2 {
        font-size: 29px;
    }

    .sidebar {
        width: 72px;
        padding: 20px 12px;
    }

    .logo {
        justify-content: center;
        margin-inline: 0;
    }

    .logo-copy,
    .nav-label,
    .nav-link > span:last-child,
    .sidebar-footer {
        display: none;
    }

    .nav-link {
        justify-content: center;
        padding: 8px;
    }

    .nav-icon {
        width: 34px;
        height: 34px;
    }

    .main-content {
        margin-left: 72px;
    }

    .header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 15px 18px;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .content-sections {
        padding: 18px;
    }

    .filter-group,
    .filter-input {
        width: 100%;
    }

    .filter-group .btn {
        flex: 1 1 calc(50% - 5px);
    }

    .data-table {
        font-size: 11px;
    }

    .modal {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
