/* ============================================================
   ADMIN — Configuración días de operación
============================================================ */

.admin-config {
    display: grid;
    gap: 22px;
}

.admin-config-header {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.admin-config-header h1 {
    color: #111;
    font-family: "Oswald", Impact, sans-serif;
    font-size: clamp(1.9rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.admin-config-lead {
    color: #555;
    font-size: 1rem;
    line-height: 1.45;
    margin: 0;
    max-width: 62ch;
}

.admin-flash-error {
    background: rgba(238, 28, 37, 0.1);
    border: 1px solid rgba(238, 28, 37, 0.35);
    color: #9d1218;
}

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

.admin-panel {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.04);
    display: grid;
    gap: 18px;
    padding: 20px;
}

.admin-panel-wide {
    grid-column: 1 / -1;
}

.admin-panel-head h2 {
    color: #111;
    font-family: "Oswald", Impact, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.admin-panel-head p {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.4;
    margin: 0;
}

.admin-week-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.admin-day-chip {
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: grid;
    gap: 2px;
    grid-template-columns: auto 1fr auto;
    padding: 12px 14px;
    transition: border-color .15s ease, background-color .15s ease;
}

.admin-day-chip input {
    accent-color: #ee1c25;
    margin: 0;
}

.admin-day-chip.is-on {
    background: rgba(238, 28, 37, 0.06);
    border-color: rgba(238, 28, 37, 0.4);
}

.admin-day-chip.is-off {
    opacity: 0.78;
}

.admin-day-name {
    color: #111;
    font-weight: 700;
}

.admin-day-state {
    color: #777;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-day-chip.is-on .admin-day-state {
    color: #c4121a;
}

.admin-exception-form,
.admin-week-form {
    display: grid;
    gap: 12px;
}

.admin-field {
    display: grid;
    gap: 6px;
}

.admin-field label {
    color: #333;
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-field .form-control,
.admin-field .form-select {
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    min-height: 44px;
}

.admin-field .form-control:focus,
.admin-field .form-select:focus {
    border-color: #ee1c25;
    box-shadow: 0 0 0 3px rgba(238, 28, 37, 0.14);
}

.admin-btn-primary,
.admin-btn-ghost,
.admin-btn-danger-ghost {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    font-family: "Oswald", Impact, sans-serif;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    letter-spacing: 0.06em;
    min-height: 44px;
    padding: 10px 16px;
    text-transform: uppercase;
}

.admin-btn-primary {
    background: #ee1c25;
    border: 1px solid #ee1c25;
    color: #fff;
}

.admin-btn-primary:hover {
    background: #ff2a33;
    border-color: #ff2a33;
    color: #fff;
}

.admin-btn-ghost {
    background: #fff;
    border: 1px solid #ddd;
    color: #111;
}

.admin-btn-ghost:hover {
    border-color: #ee1c25;
}

.admin-btn-danger-ghost {
    background: transparent;
    border: 1px solid rgba(238, 28, 37, 0.35);
    color: #c4121a;
    font-size: 0.78rem;
    min-height: 34px;
    padding: 6px 10px;
}

.admin-btn-danger-ghost:hover {
    background: rgba(238, 28, 37, 0.08);
}

.admin-empty {
    color: #777;
    margin: 0;
}

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

.admin-table {
    border-collapse: collapse;
    width: 100%;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #ececec;
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: #777;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-table-actions {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.admin-tag {
    border: 0;
    border-radius: 999px;
    cursor: default;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    text-transform: uppercase;
}

button.admin-tag {
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}

button.admin-tag:hover,
button.admin-tag:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(238, 28, 37, 0.25);
}

.admin-tag-open {
    background: rgba(34, 160, 92, 0.12);
    color: #1d6b3f;
}

button.admin-tag-open:hover,
button.admin-tag-open:focus-visible {
    background: rgba(34, 160, 92, 0.22);
}

.admin-tag-close {
    background: rgba(238, 28, 37, 0.1);
    color: #9d1218;
}

button.admin-tag-close:hover,
button.admin-tag-close:focus-visible {
    background: rgba(238, 28, 37, 0.18);
}

.admin-table tr.is-muted td {
    opacity: 0.55;
}

.admin-feriado-toggle-form {
    margin: 0;
}

.admin-feriado-select {
    max-width: 160px;
    min-width: 132px;
}

.admin-day-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-day-tab-form {
    margin: 0;
}

.admin-day-tab {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-family: "Oswald", Impact, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-height: 40px;
    padding: 8px 14px;
    text-transform: uppercase;
}

.admin-day-tab.is-active,
.admin-day-tab:hover {
    background: rgba(238, 28, 37, 0.08);
    border-color: #ee1c25;
    color: #111;
}

.admin-aforo-input {
    max-width: 88px;
}

.admin-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-btn-sm {
    min-height: 34px;
    padding: 6px 10px;
}

.admin-field-hint {
    color: #777;
    font-size: 0.8rem;
}

.admin-muted-inline {
    color: #888;
    display: inline-block;
    margin-left: 6px;
}

.admin-alumnos-filters {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.admin-alumnos-filters-row {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 168px;
}

.admin-alumnos-filters .admin-field {
    margin: 0;
}

.admin-alumnos-filters .admin-field > label {
    display: block;
    line-height: 1.2;
    margin-bottom: 6px;
}

.admin-alumnos-filters .form-control,
.admin-alumnos-filters .form-select {
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

.admin-filter-actions {
    display: flex;
    gap: 8px;
}

.admin-filter-search {
    min-width: 0;
}

.admin-alumnos-search-hint {
    color: #777;
    display: block;
    font-size: 0.78rem;
    margin: 0;
}

.admin-alumnos-meta {
    color: #666;
    font-size: 0.88rem;
    margin: 0;
    min-width: 0;
}

.admin-alumnos-meta-row {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.admin-alumnos-meta-filter {
    color: #b31218;
    font-weight: 700;
}

.admin-alumnos-indicadores {
    flex-shrink: 0;
    position: relative;
}

.admin-alumnos-indicadores-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    color: #444;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.05rem;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: relative;
    width: 36px;
}

.admin-alumnos-indicadores-badge {
    align-items: center;
    background: #ee1c25;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-width: 1.05rem;
    padding: 0.18rem 0.28rem;
    position: absolute;
    right: -5px;
    top: -5px;
}

.admin-alumnos-indicadores-toggle:hover,
.admin-alumnos-indicadores-toggle:focus-visible {
    border-color: #ee1c25;
    color: #ee1c25;
    outline: none;
}

.admin-alumnos-indicadores-toggle.is-active {
    background: rgba(238, 28, 37, 0.08);
    border-color: #ee1c25;
    color: #ee1c25;
}

.admin-alumnos-indicadores-menu {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    display: grid;
    gap: 2px;
    min-width: 240px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
}

.admin-alumnos-indicadores-menu[hidden] {
    display: none;
}

.admin-alumnos-indicadores-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #222;
    cursor: pointer;
    display: flex;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 8px;
    padding: 10px 10px;
    text-align: left;
    width: 100%;
}

.admin-alumnos-indicadores-option .bi {
    color: #777;
    font-size: 0.95rem;
    width: 1.1rem;
}

.admin-alumnos-indicadores-option-label {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-alumnos-indicadores-option-count {
    background: #f0f0f0;
    border-radius: 999px;
    color: #555;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    min-width: 1.4rem;
    padding: 0.28rem 0.45rem;
    text-align: center;
}

.admin-alumnos-indicadores-option:hover,
.admin-alumnos-indicadores-option:focus-visible {
    background: rgba(238, 28, 37, 0.08);
    outline: none;
}

.admin-alumnos-indicadores-option.is-selected {
    background: rgba(238, 28, 37, 0.1);
    color: #b31218;
}

.admin-alumnos-indicadores-option.is-selected .bi {
    color: #ee1c25;
}

.admin-alumnos-indicadores-option.is-selected .admin-alumnos-indicadores-option-count {
    background: rgba(238, 28, 37, 0.16);
    color: #b31218;
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-toggle {
    background: #1a1a1a;
    border-color: #333;
    color: #ddd;
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-toggle.is-active,
html[data-bs-theme="dark"] .admin-alumnos-indicadores-toggle:hover,
html[data-bs-theme="dark"] .admin-alumnos-indicadores-toggle:focus-visible {
    border-color: #ff7a80;
    color: #ff7a80;
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-menu {
    background: #1a1a1a;
    border-color: #2a2a2a;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-option {
    color: #f2f2f2;
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-option .bi {
    color: rgba(255, 255, 255, 0.55);
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-option:hover,
html[data-bs-theme="dark"] .admin-alumnos-indicadores-option:focus-visible,
html[data-bs-theme="dark"] .admin-alumnos-indicadores-option.is-selected {
    background: rgba(255, 122, 128, 0.14);
    color: #ff7a80;
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-option.is-selected .bi {
    color: #ff7a80;
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-option-count {
    background: #2a2a2a;
    color: rgba(255, 255, 255, 0.7);
}

html[data-bs-theme="dark"] .admin-alumnos-indicadores-option.is-selected .admin-alumnos-indicadores-option-count {
    background: rgba(255, 122, 128, 0.22);
    color: #ff7a80;
}

html[data-bs-theme="dark"] .admin-alumnos-meta-filter {
    color: #ff7a80;
}

.admin-table-scroll {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    max-height: calc(2.75rem + (10 * 3.05rem));
    overflow: auto;
}

.admin-alumnos-table {
    margin: 0;
}

.admin-alumnos-table thead th {
    background: #f7f7f7;
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-alumnos-table tbody tr {
    height: 3.05rem;
}

.admin-pagination {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 14px;
}

.admin-pagination-status {
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

html[data-bs-theme="dark"] .admin-field-hint,
html[data-bs-theme="dark"] .admin-muted-inline,
html[data-bs-theme="dark"] .admin-alumnos-meta,
html[data-bs-theme="dark"] .admin-pagination-status {
    color: rgba(255, 255, 255, 0.55);
}

html[data-bs-theme="dark"] .admin-table-scroll {
    border-color: #2a2a2a;
}

html[data-bs-theme="dark"] .admin-alumnos-table thead th {
    background: #1a1a1a;
}

@media (max-width: 900px) {
    .admin-alumnos-filters-row {
        grid-template-columns: 1fr;
    }
}

.admin-horarios-table td,
.admin-horarios-table th {
    vertical-align: middle;
}

html[data-bs-theme="dark"] .admin-day-tab {
    background: #1a1a1a;
    border-color: #333;
    color: #f0f0f0;
}

html[data-bs-theme="dark"] .admin-day-tab.is-active,
html[data-bs-theme="dark"] .admin-day-tab:hover {
    background: rgba(238, 28, 37, 0.16);
    border-color: #ee1c25;
    color: #fff;
}

.admin-switch {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    user-select: none;
}

.admin-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-switch-track {
    background: #d0d0d0;
    border-radius: 999px;
    display: inline-block;
    height: 22px;
    position: relative;
    transition: background-color .15s ease;
    width: 40px;
}

.admin-switch-track::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform .15s ease;
    width: 18px;
}

.admin-switch input:checked + .admin-switch-track {
    background: #ee1c25;
}

.admin-switch input:checked + .admin-switch-track::after {
    transform: translateX(18px);
}

.admin-switch-text {
    color: #555;
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 1.5rem;
}

html[data-bs-theme="dark"] .admin-switch-track {
    background: #444;
}

html[data-bs-theme="dark"] .admin-switch-text {
    color: rgba(255, 255, 255, 0.7);
}

html[data-bs-theme="dark"] .admin-config-header h1,
html[data-bs-theme="dark"] .admin-panel-head h2,
html[data-bs-theme="dark"] .admin-day-name {
    color: #fff;
}

html[data-bs-theme="dark"] .admin-config-lead,
html[data-bs-theme="dark"] .admin-panel-head p,
html[data-bs-theme="dark"] .admin-empty,
html[data-bs-theme="dark"] .admin-day-state {
    color: rgba(255, 255, 255, 0.62);
}

html[data-bs-theme="dark"] .admin-panel {
    background: #121212;
    border-color: #2a2a2a;
    box-shadow: none;
}

html[data-bs-theme="dark"] .admin-day-chip,
html[data-bs-theme="dark"] .admin-btn-ghost {
    background: #1a1a1a;
    border-color: #333;
    color: #f0f0f0;
}

html[data-bs-theme="dark"] .admin-day-chip.is-on {
    background: rgba(238, 28, 37, 0.12);
    border-color: rgba(238, 28, 37, 0.45);
}

html[data-bs-theme="dark"] .admin-field label,
html[data-bs-theme="dark"] .admin-table td {
    color: #f0f0f0;
}

html[data-bs-theme="dark"] .admin-field .form-control,
html[data-bs-theme="dark"] .admin-field .form-select {
    background: #0a0a0a;
    border-color: #333;
    color: #fff;
}

html[data-bs-theme="dark"] .admin-table th {
    color: #8d8d8d;
}

html[data-bs-theme="dark"] .admin-table th,
html[data-bs-theme="dark"] .admin-table td {
    border-bottom-color: #2a2a2a;
}

html[data-bs-theme="dark"] .admin-flash-error {
    background: rgba(238, 28, 37, 0.16);
    border-color: rgba(238, 28, 37, 0.45);
    color: #ffb0b4;
}

@media (max-width: 900px) {
    .admin-config-grid {
        grid-template-columns: 1fr;
    }

    .admin-config-header {
        flex-direction: column;
    }
}
