/* Admin Dashboard tab contents (2026-11-05). Shared by the pages shown inside Admin Dashboard.
   All classes are prefixed at- so nothing else on the site is affected. Colors follow the --eq-* tokens in design-system.css
   (with fallbacks, so a page still looks right if that file is not loaded). */
.at-page { max-width: 1100px; }
.at-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.at-bar-title { font-size: 1.02rem; font-weight: 700; color: var(--eq-ink, #1f2430); }
.at-bar-sub { font-size: .85rem; color: var(--eq-muted, #6b7280); }
.at-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Buttons (same pill look as the Appointment/Patients tabs) */
.at-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem 1rem; border: 1px solid #d5d9e0; background: #fff; border-radius: 20px; cursor: pointer; font: inherit; font-size: .93rem; font-weight: 500; color: #3a3f44; width: fit-content; text-decoration: none; }
.at-btn:hover { background: #f3f4f6; color: #3a3f44; text-decoration: none; }
.at-btn.primary { background: var(--eq-accent, #2563eb); border-color: var(--eq-accent, #2563eb); color: #fff; font-weight: 600; }
.at-btn.primary:hover { filter: brightness(.93); }
.at-btn.danger { color: #b3261e; border-color: #f1b0b7; }
.at-btn.danger:hover { background: #fdf1f1; }
.at-btn.sm { padding: .3rem .75rem; font-size: .85rem; }
.at-btn:disabled, .at-btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Section cards: one topic per card, with a short heading */
.at-section { background: #fff; border: 1px solid var(--eq-border, #e6e8ec); border-radius: 14px; margin-bottom: 1rem; overflow: hidden; }
.at-section-head { padding: .85rem 1.1rem .1rem; }
.at-section-title { font-size: 1rem; font-weight: 700; color: var(--eq-ink, #1f2430); margin: 0; display: flex; align-items: center; gap: .5rem; }
.at-section-title i { color: var(--eq-accent, #2563eb); }
.at-section-sub { font-size: .84rem; color: var(--eq-muted, #6b7280); margin-top: .1rem; }
.at-section-body { padding: .8rem 1.1rem 1.05rem; }
.at-section.warn { border-color: var(--eq-warn-border, #fdba74); background: var(--eq-warn-soft, #fff7ed); }

/* Form grid: two columns on a desktop, one on a phone */
.at-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .8rem 1rem; }
.at-grid.one { grid-template-columns: minmax(0, 1fr); }
.at-span { grid-column: 1 / -1; }
.at-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.at-field > label, .at-label { font-size: .82rem; font-weight: 600; color: #3a3f44; margin: 0; }
.at-field .form-control, .at-field .form-select, .at-field .rz-dropdown, .at-field .rz-textbox { width: 100%; }
.at-field textarea.form-control { min-height: 84px; resize: vertical; }
.at-help { font-size: .8rem; color: var(--eq-muted, #6b7280); line-height: 1.35; }
.at-check { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; }
.at-check input[type=checkbox] { width: 1.1rem; height: 1.1rem; margin-top: .15rem; flex-shrink: 0; }
.at-check label { margin: 0; font-weight: 600; font-size: .9rem; color: #1f2430; }
.at-check .at-help { display: block; font-weight: 400; margin-top: .1rem; }
.at-field .validation-message, .at-grid .validation-message { color: #b3261e; font-size: .8rem; }
.validation-errors { color: #b3261e; font-size: .85rem; }

/* Sticky action bar under a long form, so Save is always reachable */
.at-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; align-items: center; padding: .7rem 1.1rem; background: rgba(255,255,255,.96); border: 1px solid var(--eq-border, #e6e8ec); border-radius: 14px; box-shadow: 0 -4px 14px rgba(15,18,25,.06); }
.at-actions .at-grow { flex: 1 1 auto; font-size: .85rem; color: var(--eq-muted, #6b7280); }

/* Lists as cards (phone friendly) */
.at-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; align-items: start; }
.at-card { background: #fff; border: 1px solid var(--eq-border, #e6e8ec); border-radius: 14px; padding: .85rem 1rem; min-width: 0; }
.at-card.inactive { background: #fafafa; }
.at-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.at-card-name { font-weight: 700; color: var(--eq-ink, #1f2430); word-break: break-word; }
.at-card-meta { font-size: .85rem; color: var(--eq-muted, #6b7280); margin-top: .15rem; word-break: break-word; }
.at-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.at-kv { font-size: .86rem; margin-top: .4rem; }
.at-kv div { margin-top: .1rem; word-break: break-word; }
.at-kv span { display: inline-block; min-width: 5.5rem; color: var(--eq-muted, #6b7280); }

.at-badge { display: inline-block; border-radius: 12px; padding: .1rem .6rem; font-size: .75rem; font-weight: 700; background: #eef2ff; color: #3b4a8f; border: 1px solid #d4dcf7; white-space: nowrap; }
.at-badge.good { background: #e6f4ea; color: #1b6e3a; border-color: #bfe0cd; }
.at-badge.warn { background: #fff4de; color: #8a5a00; border-color: #f3dca4; }
.at-badge.bad { background: #fdecea; color: #b3261e; border-color: #f1b0b7; }
.at-badge.muted { background: #f1f2f4; color: #6b7280; border-color: #e0e3e8; }

.at-note { background: #eef3ff; border: 1px solid #c7d7fb; border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .88rem; color: #1f2937; }
.at-note.warn { background: var(--eq-warn-soft, #fff7ed); border-color: var(--eq-warn-border, #fdba74); color: #7c2d12; }
.at-note.bad { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.at-note.good { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.at-empty { text-align: center; color: var(--eq-muted, #6b7280); padding: 1.6rem 1rem; border: 1px dashed #d5d9e0; border-radius: 14px; background: #fafbfc; }
.at-empty strong { display: block; color: #3a3f44; margin-bottom: .2rem; }
.at-table-wrap { overflow-x: auto; border: 1px solid var(--eq-border, #e6e8ec); border-radius: 14px; background: #fff; }
.at-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.at-table th { text-align: left; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--eq-muted, #6b7280); padding: .55rem .75rem; border-bottom: 1px solid var(--eq-border, #e6e8ec); white-space: nowrap; background: #fafbfc; }
.at-table td { padding: .55rem .75rem; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.at-table tbody tr:hover { background: #f8f9fb; }
.at-search { flex: 1 1 240px; min-width: 0; max-width: 420px; }

@media (max-width: 576px) {
    .at-section-head { padding: .75rem .85rem .1rem; }
    .at-section-body { padding: .7rem .85rem .9rem; }
    .at-grid { grid-template-columns: minmax(0, 1fr); }
    .at-list { grid-template-columns: minmax(0, 1fr); }
    .at-actions { justify-content: stretch; padding: .6rem .75rem; }
    .at-actions .at-btn { flex: 1 1 auto; justify-content: center; }
}
