:root {
    --ateneo-blue-950: #081a40;
    --ateneo-blue-900: #0b1f4d;
    --ateneo-blue-800: #123a86;
    --ateneo-blue-700: #1952b8;
    --ateneo-blue-600: #2b6fe0;
    --ateneo-blue-300: #8eb8ff;
    --ateneo-blue-100: #eaf2ff;
    --ateneo-blue-050: #f5f9ff;
    --ateneo-surface: #f4f7fb;
    --ateneo-card: #ffffff;
    --ateneo-border: #d8e3f4;
    --ateneo-text: #1b2840;
    --ateneo-muted: #63759a;
    --ateneo-success-bg: #dcfce7;
    --ateneo-success-text: #166534;
    --ateneo-danger-bg: #fee2e2;
    --ateneo-danger-text: #991b1b;
    --ateneo-warning-bg: #fef3c7;
    --ateneo-warning-text: #92400e;
    --ateneo-info-bg: #dbeafe;
    --ateneo-info-text: #1d4ed8;
    --ateneo-shadow: 0 14px 34px rgba(16, 49, 107, 0.10);
}

body.ateneo-theme {
    background: var(--ateneo-surface);
    color: var(--ateneo-text);
    font-size: 0.92rem;
}

body.ateneo-theme,
body.ateneo-theme .content-wrapper,
body.ateneo-theme .content,
body.ateneo-theme .card,
body.ateneo-theme .table,
body.ateneo-theme .btn,
body.ateneo-theme input,
body.ateneo-theme select,
body.ateneo-theme textarea {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.tabla-acciones { white-space: nowrap; }
.login-page { background: #f4f6f9; }
.login-logo b { color: var(--ateneo-blue-700); }
.badge { font-size: 0.78rem; border-radius: 999px; padding: 0.38rem 0.58rem; font-weight: 700; }

.main-sidebar.ateneo-sidebar {
    background: linear-gradient(180deg, var(--ateneo-blue-900) 0%, #0e2e70 100%);
}

.ateneo-sidebar .brand-link {
    min-height: 72px;
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    text-align: left;
}

.ateneo-brand-logo {
    width: 40px;
    height: 40px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    padding: 4px;
}

.ateneo-sidebar .brand-copy {
    display: flex;
    flex-direction: column;
    margin-left: 0.65rem;
    overflow: hidden;
}

.ateneo-sidebar .brand-text,
.ateneo-sidebar .brand-subtitle {
    color: #fff;
    line-height: 1.1;
}

.ateneo-sidebar .brand-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    opacity: 0.8;
}

.ateneo-sidebar .nav-sidebar > .nav-item > .nav-link {
    color: rgba(255,255,255,0.88);
    border-radius: 12px;
    margin: 0.15rem 0.55rem;
    padding: 0.8rem 0.9rem;
}

.ateneo-sidebar .nav-sidebar > .nav-item > .nav-link:hover,
.ateneo-sidebar .nav-sidebar > .nav-item > .nav-link.active {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.ateneo-sidebar .nav-sidebar .nav-icon {
    color: #bfdbff;
}


body.ateneo-theme.sidebar-no-expand .main-sidebar {
    transition: margin-left .3s ease-in-out, width .3s ease-in-out;
}

body.ateneo-theme .main-sidebar,
body.ateneo-theme .main-sidebar::before {
    transition: margin-left .3s ease-in-out, width .3s ease-in-out;
}

body.ateneo-theme .ateneo-sidebar .nav-sidebar > .nav-item > .nav-link:hover {
    background: transparent;
    color: rgba(255,255,255,0.88);
}

body.ateneo-theme .ateneo-sidebar .nav-sidebar > .nav-item > .nav-link.active:hover,
body.ateneo-theme .ateneo-sidebar .nav-sidebar > .nav-item > .nav-link.active {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.sidebar-collapse .ateneo-sidebar .brand-copy,
.sidebar-collapse .ateneo-sidebar .nav-sidebar .nav-link p {
    display: none;
}

.sidebar-collapse .ateneo-sidebar .brand-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-collapse .ateneo-sidebar .nav-sidebar > .nav-item > .nav-link {
    display: flex;
    justify-content: center;
}

.sidebar-collapse .ateneo-sidebar .nav-sidebar .nav-icon {
    margin-right: 0;
}

.ateneo-navbar {
    background: #fff;
    border-bottom: 1px solid var(--ateneo-border);
    box-shadow: 0 8px 24px rgba(16, 49, 107, 0.08);
}

.ateneo-menu-toggle {
    color: var(--ateneo-blue-800) !important;
    font-size: 1.1rem;
}

.ateneo-user-chip {
    background: var(--ateneo-blue-100);
    border: 1px solid #d5e4ff;
    border-radius: 999px;
    padding: 0.35rem 0.8rem 0.35rem 0.4rem;
}

.ateneo-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #cfe0ff;
}

.ateneo-user-meta {
    display: flex;
    flex-direction: column;
    margin-left: 0.6rem;
    line-height: 1.1;
}

.ateneo-user-name {
    font-weight: 700;
    color: var(--ateneo-blue-900);
    font-size: 0.92rem;
}

.ateneo-user-role {
    color: var(--ateneo-muted);
    font-size: 0.72rem;
}

.ateneo-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    box-shadow: 0 10px 24px rgba(16, 49, 107, 0.12);
}

.ateneo-icon-btn-secondary {
    background: #edf4ff;
    color: var(--ateneo-blue-800);
}

.ateneo-icon-btn-secondary:hover {
    background: #dfeeff;
    color: var(--ateneo-blue-900);
}

.ateneo-icon-btn-danger {
    background: #ffeff1;
    color: #d63b57;
}

.ateneo-icon-btn-danger:hover {
    background: #ffe0e5;
    color: #b92f48;
}

.content-wrapper {
    background: linear-gradient(180deg, #f7faff 0%, #eef4fb 100%);
}

.content-header {
    padding-top: 1rem;
    padding-bottom: 0.35rem;
}

.content-header h1,
.ateneo-page-title {
    color: var(--ateneo-blue-900);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0;
}

.main-footer {
    background: #fff;
    border-top: 1px solid var(--ateneo-border);
}

.card,
.ateneo-shell-card,
.info-box {
    background: var(--ateneo-card);
    border: 1px solid rgba(216, 227, 244, 0.9);
    border-radius: 18px;
    box-shadow: var(--ateneo-shadow);
}

.card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid #ebf1fa;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding: 0.95rem 1.15rem;
}

.card-title {
    font-weight: 700;
    color: var(--ateneo-blue-900);
    margin-bottom: 0;
}

.card-body {
    padding: 1.15rem;
}

.info-box {
    padding: 0.2rem;
}

.info-box .info-box-icon {
    border-radius: 14px;
    margin: 0.7rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.info-box .info-box-content {
    padding: 0.95rem 0.7rem 0.95rem 0;
}

.info-box .info-box-text {
    color: var(--ateneo-muted);
    font-weight: 600;
}

.info-box .info-box-number {
    color: var(--ateneo-blue-900);
    font-weight: 800;
}

.table-responsive {
    border-radius: 14px;
}

.table {
    margin-bottom: 0;
    color: var(--ateneo-text);
}

.table thead th {
    border-top: none;
    border-bottom: 1px solid #dfe8f7;
    background: #f6f9ff;
    color: var(--ateneo-blue-900);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding-top: 0.78rem;
    padding-bottom: 0.78rem;
}

.table td {
    border-top: 1px solid #edf2fa;
    vertical-align: middle;
}

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

.btn {
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(17, 74, 159, 0.12);
}

.btn-sm {
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--ateneo-blue-700) 0%, var(--ateneo-blue-800) 100%);
    border-color: var(--ateneo-blue-800);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(180deg, var(--ateneo-blue-600) 0%, var(--ateneo-blue-700) 100%);
    border-color: var(--ateneo-blue-700);
}

.btn-secondary {
    background: #eef4ff;
    border-color: #dbe7ff;
    color: var(--ateneo-blue-900);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #e2ecff;
    color: var(--ateneo-blue-950);
}

.btn-info {
    background: #dfeeff;
    border-color: #d3e6ff;
    color: var(--ateneo-blue-800);
}

.btn-warning {
    background: #fff3d6;
    border-color: #ffe8ae;
    color: #925d00;
}

.btn-danger {
    background: #ffe7ea;
    border-color: #ffd7dd;
    color: #bf2947;
}

.form-control,
.custom-select,
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
    border-radius: 12px !important;
    border: 1px solid #cfe0fb;
    box-shadow: inset 0 1px 2px rgba(16, 49, 107, 0.04);
}

.form-control:focus,
.custom-select:focus,
select:focus,
textarea:focus,
input:focus {
    border-color: #8bb4ff;
    box-shadow: 0 0 0 0.2rem rgba(43, 111, 224, 0.14);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.ateneo-page-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ateneo-section-card {
    background: var(--ateneo-card);
    border-radius: 18px;
    box-shadow: var(--ateneo-shadow);
    border: 1px solid rgba(216, 227, 244, 0.9);
    padding: 1rem 1.1rem;
}

.ateneo-page-subtitle {
    color: var(--ateneo-muted);
    margin: 0.2rem 0 0;
}

.ateneo-session-note {
    font-size: 0.82rem;
    color: var(--ateneo-muted);
    margin-top: 0.35rem;
}

.ateneo-live-badge {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    background: var(--ateneo-blue-100);
    color: var(--ateneo-blue-800);
    font-size: 0.72rem;
    font-weight: 800;
}

.ateneo-flash {
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.ateneo-flash-success { background: var(--ateneo-success-bg); color: var(--ateneo-success-text); }
.ateneo-flash-danger { background: var(--ateneo-danger-bg); color: var(--ateneo-danger-text); }

.ateneo-table-wrapper {
    overflow-x: auto;
}

.ateneo-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
}

.ateneo-table th,
.ateneo-table td {
    border-bottom: 1px solid #e5edf8;
    padding: 0.62rem 0.52rem;
    vertical-align: middle;
}

.ateneo-table th {
    background: #f6f9ff;
    color: var(--ateneo-blue-900);
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.ateneo-table tbody tr:hover {
    background: #f9fbff;
}

.ateneo-person-main {
    font-weight: 800;
    color: var(--ateneo-blue-950);
    font-size: 0.82rem;
}

.ateneo-person-sub,
.ateneo-muted-text {
    color: var(--ateneo-muted);
    font-size: 0.72rem;
}

.ateneo-status-pill,
.ateneo-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.24rem 0.52rem;
    font-size: 0.68rem;
    font-weight: 800;
}

.ateneo-chip {
    background: #f2f6fd;
    color: #344767;
}

.ateneo-status-waiting_admin,
.ateneo-status-called_admin,
.ateneo-status-attending_admin,
.ateneo-status-waiting_doctor,
.ateneo-status-called_doctor {
    background: var(--ateneo-info-bg);
    color: var(--ateneo-info-text);
}

.ateneo-status-present,
.ateneo-status-finished {
    background: var(--ateneo-success-bg);
    color: var(--ateneo-success-text);
}

.ateneo-status-in_consultation {
    background: #cffafe;
    color: #0f766e;
}

.ateneo-status-cancelled {
    background: var(--ateneo-danger-bg);
    color: var(--ateneo-danger-text);
}

.ateneo-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ateneo-action-stack form,
.ateneo-action-stack a,
.ateneo-action-stack span { margin: 0; }

.ateneo-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border: 0;
    border-radius: 10px;
    padding: 0.42rem 0.58rem;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}

.ateneo-mini-btn i { font-size: 0.78rem; }
.ateneo-btn-call { background: var(--ateneo-info-bg); color: var(--ateneo-info-text); }
.ateneo-btn-recall { background: #ede9fe; color: #6d28d9; }
.ateneo-btn-attend { background: #cffafe; color: #0f766e; }
.ateneo-btn-present,
.ateneo-btn-finish { background: var(--ateneo-success-bg); color: var(--ateneo-success-text); }
.ateneo-btn-cancel { background: var(--ateneo-danger-bg); color: var(--ateneo-danger-text); }
.ateneo-btn-assign { background: var(--ateneo-warning-bg); color: var(--ateneo-warning-text); }
.ateneo-no-actions { color: #93a4c2; font-style: italic; font-size: 0.74rem; }
.ateneo-empty-row { text-align: center; color: var(--ateneo-muted); padding: 1.6rem 0 !important; }

.ateneo-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: end;
}

.ateneo-info-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ateneo-info-item {
    background: #f8fbff;
    border: 1px solid #e3ecfb;
    border-radius: 14px;
    padding: 0.9rem;
}

.ateneo-info-item small {
    display: block;
    color: var(--ateneo-muted);
    margin-bottom: 0.25rem;
}

.ateneo-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

@media (max-width: 767.98px) {
    .ateneo-user-chip { display: none !important; }
    .ateneo-table { min-width: 780px; }
    .content-header { padding-top: 0.75rem; }
    .card-body, .ateneo-section-card { padding: 0.9rem; }
}


.turnos-board-page .card.turnos-board-card {
    border: 1px solid var(--ateneo-border);
    box-shadow: var(--ateneo-shadow);
    border-radius: 22px;
}
.turnos-board-grid {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 1.25rem;
}
.turnos-board-sidebar,
.turnos-board-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.turnos-panel {
    background: #fff;
    border: 1px solid var(--ateneo-border);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(16, 49, 107, 0.08);
    padding: 1rem;
}
.turnos-panel-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ateneo-blue-900);
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.calendar-title {
    font-weight: 800;
    color: var(--ateneo-blue-900);
    text-transform: capitalize;
}
.turnos-calendar-weekdays,
.turnos-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}
.turnos-calendar-weekday {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ateneo-muted);
}
.turnos-calendar-cell {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid var(--ateneo-border);
    background: #f8fbff;
    color: var(--ateneo-text);
    font-weight: 700;
}
.turnos-calendar-cell.is-disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
.turnos-calendar-cell.is-enabled {
    background: var(--ateneo-blue-100);
    border-color: #c7dbff;
    color: var(--ateneo-blue-900);
}
.turnos-calendar-cell.is-selected {
    background: linear-gradient(135deg, var(--ateneo-blue-700), var(--ateneo-blue-800));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(25, 82, 184, 0.28);
}
.turnos-calendar-cell.is-empty {
    min-height: 42px;
    background: transparent;
    border: none;
}
.turnos-notes-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--ateneo-text);
}
.turnos-notes-list li + li {
    margin-top: 0.35rem;
}
.turnos-notes-empty {
    color: var(--ateneo-muted);
    font-size: 0.92rem;
}
.turnos-summary-table thead th,
.turnos-day-table thead th {
    background: #eef4ff;
    color: var(--ateneo-blue-900);
    font-size: 0.78rem;
    text-transform: uppercase;
    border-top: none;
}
.turnos-day-table tbody td {
    vertical-align: middle;
}
.turnos-row-free {
    background: #f2fbf4;
}
.turnos-row-booked {
    background: #f8fbff;
}
.turnos-slot-badge {
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    background: var(--ateneo-blue-100);
    color: var(--ateneo-blue-900);
    font-weight: 800;
}
.reservation-panel {
    position: sticky;
    bottom: 1rem;
}
@media (max-width: 1199px) {
    .turnos-board-grid {
        grid-template-columns: 1fr;
    }
    .reservation-panel {
        position: static;
    }
}
.turnos-board-grid-wide {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    align-items: start;
}
.turnos-day-panel {
    min-height: 100%;
}
.btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
.turnos-modal-open {
    overflow: hidden;
}
.turnos-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
}
.turnos-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 22, 52, 0.48);
    backdrop-filter: blur(4px);
}
.turnos-modal-card {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin: 1rem auto;
    background: #fff;
    border-radius: 24px;
    padding: 1.25rem;
    border: 1px solid var(--ateneo-border);
    box-shadow: 0 22px 48px rgba(10, 33, 79, 0.24);
}
.reservation-search-box {
    padding: 1rem;
    background: #f6f9ff;
    border: 1px solid #d9e6ff;
    border-radius: 18px;
}
.practice-results {
    margin-top: 0.5rem;
    border: 1px solid #d9e6ff;
    border-radius: 16px;
    background: #fff;
    max-height: 220px;
    overflow: auto;
    box-shadow: 0 10px 22px rgba(17, 54, 122, 0.08);
}
.practice-result-item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    text-align: left;
}
.practice-result-item + .practice-result-item {
    border-top: 1px solid #edf2fb;
}
.practice-result-item:hover {
    background: #f3f8ff;
}
.practice-result-code {
    min-width: 96px;
    font-weight: 800;
    color: var(--ateneo-blue-800);
}
.practice-result-name {
    color: var(--ateneo-text);
}
.practice-results-empty {
    padding: 0.95rem 1rem;
    color: var(--ateneo-muted);
}
.turnos-day-table tbody td:last-child {
    width: 92px;
}
@media (max-width: 1199px) {
    .turnos-modal-card {
        width: calc(100vw - 1rem);
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem);
    }
}


.turnos-board-page .page-title {
    font-size: 1.85rem;
}
.turnos-board-page .page-subtitle {
    font-size: 0.9rem;
}
.turnos-panel-title {
    font-size: 0.92rem;
}
.turnos-panel label,
.turnos-panel .form-control,
.turnos-panel .btn,
.turnos-day-table tbody td,
.turnos-summary-table tbody td {
    font-size: 0.9rem;
}
.turnos-day-table thead th,
.turnos-summary-table thead th {
    font-size: 0.72rem;
}
.turnos-slot-badge {
    font-size: 0.88rem;
}
.turnos-day-panel .turnos-panel-title {
    margin-bottom: 0.15rem;
}

.turnos-board-page .page-title { font-size: 1.55rem; }
.turnos-board-page .page-subtitle { font-size: 0.82rem; }
.turnos-panel-title { font-size: 0.88rem; }
.turnos-day-table thead th, .turnos-summary-table thead th { font-size: 0.68rem; }
.turnos-day-table tbody td, .turnos-summary-table tbody td, .turnos-panel label, .turnos-panel .form-control, .turnos-panel .btn { font-size: 0.84rem; }
.calendar-title { font-size: 0.92rem; }
.turnos-calendar-weekday { font-size: 0.7rem; }
.turnos-calendar-cell { font-size: 0.92rem; min-height: 40px; }

.turnos-title--compact{font-size:1.6rem!important;line-height:1.15;}
.turnos-subtitle--compact{font-size:.85rem!important;}
.turnos-day-card .card-title,.turnos-selector-card .card-title,.turnos-info-card .card-title{font-size:1rem!important;}
.turnos-calendar-grid .day-label,.turnos-calendar-grid .day-number{font-size:.86rem!important;}
.turnos-day-table th,.turnos-day-table td{font-size:.84rem!important;}
