/*
 * Traveling Dojo Admin -- shared admin styles.
 * Admin Panel, Student Account(s), Check In, and the store's windows.
 * 1.40.0: moved here from frontend-styles.php, where they were printed
 * inside every page; as a file the browser downloads them once and caches
 * them (versioned with the plugin). Theme colors: blue #004C97, red #B60004.
 */
.tda-admin-wrap { max-width:860px; margin:0 auto; padding:0 0 60px; font-family:inherit; color:#1a1a1a; }
.tda-admin-header { display:flex; align-items:center; gap:12px; background:#1a1a1a; color:#fff; padding:22px 28px; border-radius:6px 6px 0 0; margin-bottom:4px; }
.tda-admin-header h1 { margin:0; font-size:26px; font-weight:700; color:#fff; letter-spacing:.5px; }
.tda-admin-header-icon { width:28px; height:28px; fill:#B60004; flex-shrink:0; }
.tda-alert { padding:14px 20px; border-left:5px solid; border-radius:0 4px 4px 0; margin-bottom:24px; font-size:15px; }
.tda-alert--success { background:#eafaf1; border-color:#27ae60; color:#1e7e44; }
.tda-alert--error   { background:#fdf2f2; border-color:#B60004; color:#8c0003; }
.tda-section { background:#fff; border:1px solid #e0e0e0; border-radius:6px; margin-bottom:28px; overflow:hidden; overflow:clip; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.tda-section-header { background:#B60004; padding:14px 24px; }
.tda-section-header h2 { margin:0; font-size:19px; font-weight:700; color:#fff; letter-spacing:.3px; }
.tda-section-body { padding:28px 28px 24px; }
.tda-section-description { margin:0 0 24px; font-size:15px; line-height:1.6; color:#444; border-left:3px solid #B60004; padding-left:14px; }
.tda-field { margin-bottom:22px; }
.tda-label { display:block; font-size:14px; font-weight:700; margin-bottom:8px; color:#1a1a1a; letter-spacing:.3px; text-transform:uppercase; }
.tda-sublabel { display:block; font-size:13px; font-weight:600; margin:12px 0 6px; color:#333; }
.tda-required { color:#B60004; margin-left:2px; }
/* Conditional asterisk (e.g. not required for Gratis) -- the JS sets
   [hidden]; !important in case the theme styles spans' display. */
.tda-required[hidden] { display:none !important; }
.tda-select { width:100%; max-width:480px; padding:10px 14px; font-size:15px; border:1px solid #ccc; border-radius:4px; color:#1a1a1a; background:#fff; transition:border-color .2s; }
.tda-select:focus { outline:none; border-color:#B60004; box-shadow:0 0 0 3px rgba(182,0,4,.12); }
.tda-radio-group { display:flex; flex-direction:column; gap:10px; margin-bottom:4px; }
.tda-radio-label { display:flex; align-items:center; gap:10px; font-size:15px; color:#1a1a1a; cursor:pointer; font-weight:normal; text-transform:none; letter-spacing:0; }
.tda-radio-label input[type="radio"] { width:18px; height:18px; accent-color:#B60004; cursor:pointer; flex-shrink:0; }
.tda-listed-emails-wrap { margin-top:12px; padding:16px; background:#f9f9f9; border:1px solid #ddd; border-radius:4px; }
.tda-textarea { width:100%; padding:10px 14px; font-size:14px; border:1px solid #ccc; border-radius:4px; color:#1a1a1a; background:#fff; resize:vertical; box-sizing:border-box; transition:border-color .2s; }
.tda-textarea:focus { outline:none; border-color:#B60004; box-shadow:0 0 0 3px rgba(182,0,4,.12); }
.tda-template-editor { font-family:monospace; font-size:13px; line-height:1.5; }
.tda-field-hint { margin:8px 0 0; font-size:13px; color:#666; line-height:1.5; }
.tda-field-hint a, .tda-field-hint code { color:#B60004; }
code { background:#f4f4f4; padding:1px 5px; border-radius:3px; font-size:12px; }
#wp-tda_message-editor-container { border:1px solid #ccc !important; border-radius:4px !important; }
.tda-notice { padding:12px 16px; background:#fff8e1; border-left:4px solid #f0a500; border-radius:0 4px 4px 0; font-size:14px; color:#6b4c00; }
.tda-notice a { color:#B60004; }

/* Placeholder table */
.tda-placeholder-table { width:100%; border-collapse:collapse; margin-bottom:16px; font-size:14px; }
.tda-placeholder-table th { background:#1a1a1a; color:#fff; padding:8px 14px; text-align:left; font-weight:700; }
.tda-placeholder-table td { padding:8px 14px; border-bottom:1px solid #eee; vertical-align:top; }
.tda-placeholder-table td code { background:#f4f4f4; color:#B60004; font-size:13px; }
.tda-placeholder-table tr:last-child td { border-bottom:none; }

/* Live preview frame */
.tda-preview-frame-wrap { border:2px solid #ddd; border-radius:6px; overflow:hidden; background:#f5f5f5; }
.tda-preview-frame { width:100%; height:520px; border:none; display:block; background:#f5f5f5; }

/* Actions row */
.tda-field--actions { padding-top:8px; border-top:1px solid #eee; margin-top:28px; }
.tda-actions-row { display:flex; gap:12px; flex-wrap:wrap; }
.tda-btn { display:inline-flex; align-items:center; gap:8px; padding:12px 28px; font-size:15px; font-weight:700; font-family:inherit; border:none; border-radius:4px; cursor:pointer; letter-spacing:.3px; transition:background .2s, transform .1s; text-decoration:none; }
.tda-btn--primary { background:#B60004; color:#fff; }
.tda-btn--primary:hover { background:#8c0003; transform:translateY(-1px); }
/* 1.39.0 button rule: actions red with white text (primary and secondary
   alike); Cancel / Back / Not now blue with white text (.tda-btn--blue).
   Inside a family's row the secondary buttons stay blue (tda-community.css). */
.tda-btn--secondary { background:#B60004; color:#fff; border:2px solid #B60004; }
.tda-btn--secondary:hover { background:#8c0003; border-color:#8c0003; color:#fff; transform:translateY(-1px); }
.tda-btn--blue { background:#004C97; color:#fff; border:2px solid #004C97; }
.tda-btn--blue:hover { background:#003a75; border-color:#003a75; color:#fff; transform:translateY(-1px); }
.tda-btn--primary:active, .tda-btn--secondary:active, .tda-btn--blue:active { transform:translateY(0); }
.tda-btn--small { padding:7px 16px; font-size:13px; }
.tda-access-denied { padding:40px; text-align:center; background:#fdf2f2; border:1px solid #f5c6cb; border-radius:6px; color:#8c0003; font-size:16px; }
@media (max-width:640px) {
    .tda-section-body { padding:18px 16px; }
    .tda-admin-header { padding:16px 18px; }
    .tda-select { max-width:100%; }
    .tda-preview-frame { height:380px; }
}

/* ── Landing page (admin function picker) ── */
.tda-back-link { display:inline-flex; align-items:center; gap:6px; margin:16px 0 20px; font-size:14px; font-weight:600; color:#B60004; text-decoration:none; }
.tda-back-link:hover { text-decoration:underline; }
.tda-landing-intro { margin:20px 0 28px; font-size:15px; line-height:1.6; color:#444; }
.tda-landing-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:18px; }
.tda-landing-card {
    display:flex; flex-direction:column; align-items:flex-start; gap:10px;
    background:#fff; border:1px solid #e0e0e0; border-radius:6px; padding:24px;
    text-decoration:none; color:#1a1a1a; box-shadow:0 2px 8px rgba(0,0,0,.05);
    transition:border-color .2s, transform .1s;
}
.tda-landing-card:hover { border-color:#B60004; transform:translateY(-2px); }
.tda-landing-card-icon { width:32px; height:32px; fill:#B60004; flex-shrink:0; }
/* 1.59.2: a count on a card's corner (e.g. new users waiting for a timesheets decision). */
.tda-landing-card { position:relative; }
.tda-landing-card-badge { position:absolute; top:10px; right:10px; min-width:22px; height:22px; padding:0 6px; border-radius:11px; background:#B60004; color:#fff; font-size:12px; font-weight:700; line-height:22px; text-align:center; }
.tda-landing-card h3 { margin:0; font-size:18px; font-weight:700; color:#1a1a1a; }
.tda-landing-card p { margin:0; font-size:13px; line-height:1.5; color:#666; }

/* ── Student Account Management ── */
.tda-manager-list { display:flex; flex-direction:column; gap:2px; }
.tda-manager-row { border:1px solid #e0e0e0; border-radius:4px; margin-bottom:10px; overflow:hidden; overflow:clip; }
.tda-manager-row-header { display:flex; align-items:center; gap:14px; padding:14px 18px; background:#f9f9f9; }
.tda-manager-toggle { background:none; border:none; cursor:pointer; padding:4px; display:flex; color:#1a1a1a; flex-shrink:0; }
.tda-manager-toggle svg { width:18px; height:18px; fill:currentColor; transition:transform .15s; }
.tda-manager-toggle[aria-expanded="true"] svg { transform:rotate(90deg); }
.tda-manager-name { flex:1; font-size:16px; font-weight:700; }
.tda-manager-email { font-size:13px; color:#777; font-weight:normal; margin-left:8px; }
.tda-manager-is-student-label { display:flex; align-items:center; gap:6px; font-size:13px; color:#444; font-weight:normal; text-transform:none; letter-spacing:0; white-space:nowrap; }
.tda-manager-is-student-label input[type="checkbox"] { width:16px; height:16px; accent-color:#B60004; cursor:pointer; }
.tda-manager-row-body { padding:18px; display:none; border-top:1px solid #e0e0e0; }
.tda-manager-row-body.tda-open { display:block; }
.tda-empty-state { padding:28px; text-align:center; background:#f9f9f9; border:1px dashed #ccc; border-radius:6px; color:#666; font-size:15px; }
.tda-empty-state a { color:#B60004; }

/* ── Student list inside an expanded manager row ──
   The theme injects its own bullets (a ::before pseudo-element)
   and list indents, sometimes with !important. Fully chained
   ancestor selectors + !important win that specificity fight;
   the ::before/::marker kill removes the theme's red dot. These
   rules sit on the <li> (.tda-student-item); the flex layout is
   on the inner .tda-student-row div so the edit panel can sit
   below it inside the same <li>. */
.tda-admin-wrap .tda-manager-row-body .tda-student-list {
    list-style:none !important;
    list-style-type:none !important;
    margin:0 !important;
    padding:0 !important;
    padding-inline-start:0 !important;
}
.tda-admin-wrap .tda-manager-row-body .tda-student-list .tda-student-item {
    list-style:none !important;
    list-style-type:none !important;
    display:block !important;
    padding:0 !important;
    margin:0 !important;
    border-bottom:1px solid #eee;
    font-size:16px !important;
    font-weight:400 !important;
    color:#1a1a1a !important;
}
.tda-admin-wrap .tda-manager-row-body .tda-student-list .tda-student-item::before,
.tda-admin-wrap .tda-manager-row-body .tda-student-list .tda-student-item::marker {
    content:none !important;
    display:none !important;
}
.tda-admin-wrap .tda-manager-row-body .tda-student-list .tda-student-item:last-child { border-bottom:none; }

/* Summary line: name + badges on the left, buttons on the right. */
.tda-student-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 0 12px 12px; }
.tda-student-summary { flex:1; min-width:200px; }
.tda-student-name { font-weight:700; }
.tda-student-tag { font-size:12px; color:#777; margin-left:6px; }
.tda-student-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin-top:4px; font-size:13px; color:#555; }
.tda-muted { color:#999; font-style:italic; }
.tda-student-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }

/* Account Status badges -- modifier = stored status key. */
.tda-badge { display:inline-block; padding:2px 9px; border-radius:10px; font-size:12px; font-weight:700; letter-spacing:.2px; }
.tda-badge--good-standing { background:#eafaf1; color:#1e7e44; }
.tda-badge--past-due      { background:#fff8e1; color:#8a6200; }
.tda-badge--suspended     { background:#fff0e6; color:#a04500; }
.tda-badge--cancelled     { background:#fdf2f2; color:#8c0003; }
.tda-badge--gratis        { background:#e8f1fb; color:#004C97; }
/* 1.59.0: on a student's row until Source and Enrolled by are filled in. */
.tda-badge--missing-source { background:#fff; color:#B60004; border:1px solid #B60004; }

/* Inline edit panel (opened by the student's Edit button). */
.tda-student-edit { display:none; margin:0 0 14px 12px; padding:20px; background:#fafafa; border:1px solid #e0e0e0; border-radius:4px; }
.tda-student-edit.tda-open { display:block; }
/* Heading on the "+ Add Student" pane, which sits above the student list. */
.tda-student-edit-title { margin:0 0 16px; font-size:16px; font-weight:700; color:#1a1a1a; }
.tda-manager-row-body > .tda-student-edit { margin-left:0; }
.tda-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; }
/* 1.59.0: a heading across the student form (e.g. "Enrollment"). */
.tda-field-section { grid-column:1 / -1; margin:18px 0 4px; padding-top:12px; border-top:1px solid #e0e0e0; font-size:15px; font-weight:700; color:#004C97; }
.tda-field-grid .tda-field { margin-bottom:18px; }
.tda-field-grid .tda-field--wide { grid-column:1 / -1; }
.tda-field-grid .tda-select { max-width:100%; box-sizing:border-box; }
.tda-input--short { max-width:200px !important; }

/* $ prefix on money inputs. */
.tda-money { display:flex; align-items:center; max-width:220px; }
.tda-money-prefix { padding:10px 10px; background:#eee; border:1px solid #ccc; border-right:none; border-radius:4px 0 0 4px; font-weight:700; color:#555; line-height:1.2; }
.tda-money .tda-select { border-radius:0 4px 4px 0; }

/* Calculated (read-only) value, e.g. Next Payment Amount. */
.tda-calc-value { display:block; font-size:20px; font-weight:700; color:#1a1a1a; padding:6px 0 0; }

/* Classes Remaining -/+ stepper. */
.tda-stepper { display:inline-flex; align-items:stretch; }
.tda-stepper .tda-select { width:80px; text-align:center; border-radius:0; }
.tda-stepper-btn { width:40px; font-size:20px; font-weight:700; line-height:1; background:#f4f4f4; color:#1a1a1a; border:1px solid #ccc; cursor:pointer; padding:0; }
.tda-stepper-btn:first-child { border-radius:4px 0 0 4px; border-right:none; }
.tda-stepper-btn:last-child  { border-radius:0 4px 4px 0; border-left:none; }
.tda-stepper-btn:hover { background:#e8e8e8; }
.tda-unit { margin-left:8px; font-size:13px; color:#666; }

/* ── Managers' Student Account(s) page (read-only roster) ── */
.tda-readonly-value { font-size:16px; color:#1a1a1a; line-height:1.5; padding:4px 0 0; word-break:break-word; }
.tda-field--readonly { padding-bottom:4px; border-bottom:1px solid #eee; }
.tda-manager-view .tda-manager-row-body { padding:18px 20px 4px; }
.tda-manager-view .tda-manager-name { flex:1; }
/* Display Name: input + Save on one line (wraps on narrow screens). */
.tda-display-name-form { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:0; }
.tda-display-name-form .tda-select { flex:1; min-width:200px; max-width:420px; }

/* "Unlimited" count (e.g. Classes Remaining for Gratis): the JS/PHP
   add .tda-is-unlimited to the field, which swaps the number control
   and its description for the word "Unlimited". */
.tda-unlimited-text { display:none; font-size:18px; font-weight:700; color:#1a1a1a; padding-top:6px; }
.tda-is-unlimited .tda-unlimited-text { display:block; }
.tda-is-unlimited .tda-stepper,
.tda-is-unlimited .tda-unit,
.tda-is-unlimited .tda-field-hint { display:none; }

/* Forms that are just a button (Remove, Also a student). */
.tda-inline-form { margin:0; display:inline-flex; }

/* Destructive actions: outlined red, solid on hover. */
.tda-btn--danger { background:#fff; color:#B60004; border:2px solid #B60004; }
.tda-btn--danger:hover { background:#B60004; color:#fff; transform:translateY(-1px); }

/* Manager header gets crowded on narrow screens -- let it wrap. */
.tda-manager-row-header { flex-wrap:wrap; }

@media (max-width:640px) {
    .tda-field-grid { grid-template-columns:1fr; }
    .tda-student-edit { margin-left:0; padding:14px; }
}

/* ── Add Student modal ── */
.tda-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9999; align-items:center; justify-content:center; padding:20px; }
.tda-modal-overlay.tda-open { display:flex; }
.tda-modal { background:#fff; border-radius:6px; padding:28px; width:100%; max-width:420px; box-shadow:0 8px 30px rgba(0,0,0,.25); }
.tda-modal h3 { margin:0 0 18px; font-size:18px; color:#1a1a1a; }

/* Jumping to a manager (#tda-manager-ID) or an edit pane leaves room
   for the theme's fixed header. --header-height is the theme's own
   measurement (kept in sync by its js/main.js); 120px if missing.
   NOTE: this only works because .tda-section and .tda-manager-row use
   overflow:clip (above) -- overflow:hidden turns a box into a scroll
   container, and Chrome then ignores scroll-margin for its children.
   The overflow:hidden before each clip is the fallback for browsers
   without clip support (rounded corners still clip; offset is lost). */
.tda-manager-row, .tda-student-edit { scroll-margin-top:calc(var(--header-height, 120px) + 16px); }

/* ── Shared "Are you sure?" dialog (tda-confirm.js) ── */
/* pre-line: multi-line messages (e.g. the Record Payment summary) keep their line breaks. */
.tda-confirm-message { margin:0 0 22px; font-size:15px; line-height:1.6; color:#333; white-space:pre-line; }

/* ── Icon buttons (tda_icon_button) ──
   40x40 touch targets, outlined in their colour, filled on hover/focus.
   edit = theme blue, danger = red, pay = green, add = dark. */
.tda-icon-btn { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0;
    border:2px solid currentColor; border-radius:6px; background:#fff; cursor:pointer; flex-shrink:0;
    transition:background .15s, color .15s; }
.tda-icon-btn svg { width:22px; height:22px; fill:currentColor; }
.tda-icon-btn--edit   { color:#004C97; }
.tda-icon-btn--danger { color:#B60004; }
.tda-icon-btn--pay    { color:#1e7e44; }
.tda-icon-btn--add    { color:#1a1a1a; }
.tda-icon-btn--edit:hover,   .tda-icon-btn--edit:focus-visible   { background:#004C97; color:#fff; border-color:#004C97; }
.tda-icon-btn--danger:hover, .tda-icon-btn--danger:focus-visible { background:#B60004; color:#fff; border-color:#B60004; }
.tda-icon-btn--pay:hover,    .tda-icon-btn--pay:focus-visible    { background:#1e7e44; color:#fff; border-color:#1e7e44; }
.tda-icon-btn--add:hover,    .tda-icon-btn--add:focus-visible    { background:#1a1a1a; color:#fff; border-color:#1a1a1a; }
.tda-icon-btn:focus-visible { outline:3px solid rgba(0,76,151,.35); outline-offset:2px; }
/* Record Payment unavailable (no dates set, etc.): visible but inert; its tooltip says why. */
.tda-icon-btn--disabled, .tda-icon-btn--disabled:hover { color:#aaa !important; background:#fff !important; border-color:#ccc !important; cursor:not-allowed; }
.tda-icon-group { display:inline-flex; align-items:center; gap:8px; }
.tda-student-actions { gap:8px; }

/* ── Family billing ── */
/* Under the manager's name: total, next due date, automation tag. */
.tda-family-summary { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin-top:4px; font-size:13px; font-weight:normal; color:#555; }
.tda-family-summary strong { color:#1a1a1a; }
.tda-tag { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; font-weight:700; }
.tda-tag--off    { background:#eee; color:#555; }
.tda-tag--paused { background:#fff0e6; color:#a04500; }
/* Inside the expanded row: dates form + payment history side by side. */
.tda-billing-panel { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; padding:4px 0 16px; margin-bottom:12px; border-bottom:1px solid #eee; }
.tda-billing-form .tda-field { margin-bottom:14px; }
.tda-billing-save { margin-bottom:8px; }
/* 1.56.0: Note for payment reminders spans the panel. */
.tda-billing-note { max-width:520px; }
.tda-billing-note .tda-textarea { font-family:inherit; }
.tda-history-table { width:100%; border-collapse:collapse; font-size:14px; }
.tda-history-table th { text-align:left; font-size:12px; color:#666; font-weight:700; padding:4px 6px; border-bottom:1px solid #ddd; }
.tda-history-table td { padding:6px; border-bottom:1px solid #f0f0f0; }
/* Manager page: the family total box. */
.tda-family-total { font-size:34px; font-weight:700; color:#1a1a1a; line-height:1.2; }
.tda-family-due { margin:4px 0 14px; font-size:16px; color:#444; }
.tda-family-lines { max-width:420px; margin-bottom:10px; }
.tda-family-lines td:last-child { text-align:right; }
/* ── Daily check & reminders (daily-check-admin.php) ── */
/* A <details> section: the red header is its clickable summary. */
.tda-daily-check > summary, .tda-collapsible > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; }
.tda-daily-check > summary::-webkit-details-marker, .tda-collapsible > summary::-webkit-details-marker { display:none; }
.tda-daily-check > summary::before, .tda-collapsible > summary::before { content:"\25B8"; color:#fff; font-size:16px; transition:transform .15s; }
.tda-daily-check[open] > summary::before, .tda-collapsible[open] > summary::before { transform:rotate(90deg); }
.tda-daily-check > summary h2, .tda-collapsible > summary h2 { margin:0; }
.tda-check-status { display:grid; grid-template-columns:1fr 1fr; gap:10px 24px; margin:0 0 16px; font-size:14px; }
.tda-check-actions { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px; padding:14px 0; border-top:1px solid #eee; border-bottom:1px solid #eee; margin-bottom:18px; }
.tda-preview-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin:0; }
.tda-preview-form .tda-label { margin:0; }
.tda-preview { margin:0 0 24px; padding:16px; background:#fafafa; border:1px solid #e0e0e0; border-radius:4px; }
.tda-preview-title { margin:0 0 6px; font-size:17px; color:#1a1a1a; }
.tda-preview-family { padding:12px 0; border-top:1px solid #e6e6e6; }
.tda-preview-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.tda-preview-list { margin:6px 0 0; padding-left:20px; font-size:14px; line-height:1.7; }
.tda-email-preview summary { cursor:pointer; color:#004C97; font-size:13px; }
.tda-email-preview iframe { width:100%; height:620px; border:1px solid #ddd; border-radius:4px; background:#f5f5f5; margin-top:6px; }
.tda-tag--on { background:#eafaf1; color:#1e7e44; }
.tda-auto-settings { padding-top:4px; }
.tda-check { display:inline-flex; align-items:center; gap:8px; font-size:14px; cursor:pointer; }
.tda-label--spaced { display:block; margin-top:18px; }
@media (max-width:640px) {
    .tda-check-status { grid-template-columns:1fr; }
}

/* ── Attendance page (attendance-admin.php) ── */
.screen-reader-text { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
.tda-date-nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; }
/* Day navigation: "< [date] >  Today". Chevrons in the calendar's blue,
   no box -- a 40px tap area around a 30px icon. */
.tda-day-arrow { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; color:#004C97; border-radius:50%; text-decoration:none; transition:color .15s, background .15s; }
.tda-day-arrow svg { width:30px; height:30px; fill:currentColor; }
.tda-day-arrow:hover { color:#003c78; background:rgba(0,76,151,.08); }
.tda-day-arrow:focus-visible { outline:3px solid rgba(0,76,151,.35); outline-offset:1px; }
.tda-date-nav [hidden] { display:none !important; }
/* While another day loads in place: a gentle fade, no jump. */
.tda-att-day { transition:opacity .15s; }
.tda-att-day.tda-loading { opacity:.45; pointer-events:none; }
/* !important: beats the general .tda-input--short limit (200px !important);
   border-box: padding counts inside the width, so it really is 150px. */
.tda-date-nav .tda-select { box-sizing:border-box; width:150px; max-width:150px !important; min-width:0; flex:0 1 150px; padding-left:8px; padding-right:8px; }
.tda-link { color:#B60004; font-weight:600; }
/* Session list: one tappable card per session. */
.tda-admin-wrap .tda-session-list { list-style:none !important; margin:8px 0 0 !important; padding:0 !important; display:grid; gap:8px; }
.tda-admin-wrap .tda-session-list li { list-style:none !important; margin:0 !important; padding:0 !important; }
.tda-admin-wrap .tda-session-list li::before, .tda-admin-wrap .tda-session-list li::marker { content:none !important; display:none !important; }
.tda-session-link { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; padding:12px 14px; border:1px solid #ddd; border-radius:4px; background:#fff; color:#1a1a1a; text-decoration:none; }
.tda-session-link:hover, .tda-session-link:focus-visible { border-color:#004C97; }
/* Expanded session: its card + roster panel read as one block. */
.tda-session-item.tda-open .tda-session-link { border:2px solid #B60004; background:#fff7f7; border-radius:4px 4px 0 0; }
.tda-session-panel { display:none; border:2px solid #B60004; border-top:none; border-radius:0 0 4px 4px; padding:14px 16px 16px; background:#fff; }
.tda-session-item.tda-open .tda-session-panel { display:block; }
.tda-session-chevron { width:0; height:0; border-left:6px solid transparent; border-right:6px solid transparent; border-top:7px solid #555; transition:transform .15s; }
.tda-session-item.tda-open .tda-session-chevron { transform:rotate(180deg); }
/* Returning after a save lands at the session's top, clear of the theme's fixed header. */
.tda-session-item { scroll-margin-top:calc(var(--header-height, 120px) + 16px); }
.tda-session-time { font-weight:700; min-width:150px; }
.tda-session-title { flex:1; }
.tda-session-count { font-size:13px; color:#555; }
/* Roster: big tap targets for checking students in on a phone. */
.tda-admin-wrap .tda-roster { list-style:none !important; margin:0 0 8px !important; padding:0 !important; }
.tda-admin-wrap .tda-roster li { list-style:none !important; margin:0 !important; }
.tda-admin-wrap .tda-roster li::before, .tda-admin-wrap .tda-roster li::marker { content:none !important; display:none !important; }
.tda-roster-row { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; padding:10px 6px !important; border-bottom:1px solid #eee; }
.tda-roster-row.is-present { background:#f3fbf6; }
.tda-roster-check { display:inline-flex; align-items:center; gap:10px; cursor:pointer; min-height:40px; }
.tda-roster-check input { width:24px; height:24px; accent-color:#1e7e44; cursor:pointer; }
.tda-roster-name { font-size:17px; font-weight:700; }
.tda-roster-meta { font-size:13px; color:#555; }
.tda-roster-how { color:#1e7e44; }
.tda-att-log { margin-top:16px; font-size:14px; }
.tda-att-log summary { cursor:pointer; color:#004C97; font-weight:600; }
.tda-att-log ul { margin:8px 0 0; padding-left:20px; line-height:1.6; }

/* ── Check In page (checkin.php) -- built for a phone in one hand ── */
.tda-checkin { max-width:560px; margin:0 auto; }
.tda-checkin-session { background:#fff; border:1px solid #e0e0e0; border-top:4px solid #B60004; border-radius:6px; padding:16px 16px 8px; margin:0 0 16px; }
.tda-checkin-title { margin:0; font-size:22px; color:#1a1a1a; }
.tda-checkin-when { margin:4px 0 10px; color:#555; font-size:15px; }
.tda-admin-wrap .tda-checkin-list { list-style:none !important; margin:0 !important; padding:0 !important; }
.tda-admin-wrap .tda-checkin-list li { list-style:none !important; margin:0 !important; }
.tda-admin-wrap .tda-checkin-list li::before, .tda-admin-wrap .tda-checkin-list li::marker { content:none !important; display:none !important; }
.tda-checkin-row { display:flex; align-items:center; gap:12px; min-height:56px; padding:6px 0 !important; border-bottom:1px solid #f0f0f0; }
.tda-checkin-row:last-child { border-bottom:none; }
.tda-checkin-check { display:flex; align-items:center; gap:14px; width:100%; min-height:48px; cursor:pointer; }
.tda-checkin-check input { width:28px; height:28px; accent-color:#1e7e44; flex-shrink:0; cursor:pointer; }
.tda-checkin-name { font-size:19px; font-weight:700; color:#1a1a1a; }
.tda-checkin-row.is-in { background:#f3fbf6; padding-left:8px !important; padding-right:8px !important; border-radius:4px; }
.tda-checkin-done { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:#1e7e44; color:#fff; font-weight:700; flex-shrink:0; }
.tda-checkin-status { flex:1; color:#1e7e44; font-size:14px; font-weight:600; }
.tda-checkin-submit { display:block; width:100%; min-height:54px; font-size:19px; margin:4px 0 12px; }
.tda-checkin-all-in { text-align:center; font-size:17px; font-weight:600; color:#1e7e44; margin:4px 0 12px; }
.tda-checkin-closed p { margin:0 0 8px; }
.tda-checkin .tda-alert { font-size:16px; }

/* ── Check-in QR card (Attendance page) ── */
.tda-qr-card { max-width:360px; margin:0 auto 16px; padding:20px 20px 14px; border:2px solid #1a1a1a; border-radius:10px; text-align:center; background:#fff; }
.tda-qr-heading { margin:0 0 8px; font-size:26px; font-weight:800; color:#B60004; }
.tda-qr-code { width:100%; max-width:280px; margin:0 auto; }
.tda-qr-code svg { display:block; width:100%; height:auto; }
.tda-qr-instructions { margin:10px 0 4px; font-size:16px; color:#333; }
.tda-qr-url { margin:0; font-size:13px; color:#777; word-break:break-all; }
/* Printing the card: hide everything else on the page, card centred and large. */
@media print {
    body.tda-printing-qr * { visibility:hidden !important; }
    body.tda-printing-qr #tda-qr-card, body.tda-printing-qr #tda-qr-card * { visibility:visible !important; }
    body.tda-printing-qr #tda-qr-card { position:fixed; left:50%; top:1in; transform:translateX(-50%); width:5in; max-width:none; border-width:3px; }
    body.tda-printing-qr .tda-qr-code { max-width:4in; }
    body.tda-printing-qr .tda-qr-heading { font-size:34px; }
    body.tda-printing-qr .tda-qr-instructions { font-size:18px; }
}

/* ── Attendance > Kiosk (kiosk.php) ── */
.tda-kiosk-admin { display:grid; grid-template-columns:170px 1fr; gap:20px; align-items:start; }
.tda-kiosk-admin-qr svg { display:block; width:100%; height:auto; border:1px solid #ddd; border-radius:6px; }
.tda-kiosk-admin-info p { margin:0 0 10px; }
.tda-kiosk-link-row { display:flex; gap:8px; align-items:center; margin:0 0 6px; }
.tda-kiosk-link-row .tda-select { flex:1; min-width:0; font-size:13px; }
@media (max-width:640px) {
    .tda-kiosk-admin { grid-template-columns:1fr; }
    .tda-kiosk-admin-qr { max-width:200px; }
}

/* ── Student edit pane: attendance history + records download (student-records.php) ── */
.tda-student-history { margin-top:16px; padding-top:12px; border-top:1px solid #e5e5e5; }
.tda-student-history > summary { cursor:pointer; font-weight:700; color:#004C97; }
.tda-student-history .tda-history-table { margin-top:10px; }
.tda-student-history p { margin:10px 0 0; }

/* Confirm dialog: optional "Download records" button above Yes/Cancel (tda-confirm.js). */
.tda-confirm-download-row { margin:-8px 0 18px; }
.tda-confirm-download-row[hidden] { display:none; }

/* ── Family records download (student-records.php) ── */
.tda-family-records { margin:14px 0 4px; }
.tda-family-records p { margin:6px 0 0; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }

/* ── Transfer a family (manager-transfer.php) ── */
.tda-transfer-pane .tda-field { max-width:460px; }
.tda-transfer-check { display:block; margin:10px 0; line-height:1.5; }
.tda-transfer-check input { margin-right:6px; }
.tda-transfer-result.tda-transfer-ok { color:#1e7e44; font-weight:600; }
.tda-transfer-result.tda-transfer-error { color:#B60004; font-weight:600; }
.tda-transfer-history { margin:12px 0 4px; }
.tda-transfer-history ul { margin:6px 0 0; padding-left:20px; font-size:14px; color:#444; }

/* Contract Cancelled: fixed expiry date. */
.tda-expiry-note { color:#8c0003; font-weight:700; }
.tda-cancel-notice { margin-bottom:16px; }
@media (max-width:640px) {
    .tda-billing-panel { grid-template-columns:1fr; }
}

/* Shared dialog: the list of unsaved changes (who, and which fields), 1.43.4. */
/* Dialog buttons/rows switched off with [hidden] (e.g. no "Save all now" when a part asks "Are you sure?" first);
   !important because .tda-btn sets display. 1.44.0 */
.tda-modal-overlay [hidden] { display:none !important; }
.tda-confirm-groups { margin:-12px 0 18px; }
.tda-confirm-group-heading { margin:10px 0 2px; font-size:15px; font-weight:700; color:#1a1a1a; }
.tda-confirm-group-items { margin:0 0 0 20px; padding:0; font-size:15px; line-height:1.6; color:#333; }

/* Save in place: its note and busy-button rules moved to tda-inplace.css (1.45.0). */

/* 1.57.0: Record payment window. */
.tda-pay-window .tda-modal { max-width:520px; }
.tda-pay-row { display:flex; align-items:center; gap:12px; margin:0 0 12px; }
.tda-pay-row .tda-label { min-width:150px; margin:0; }
.tda-pay-lines { margin:0 0 14px; }
.tda-pay-lines td:last-child { text-align:right; white-space:nowrap; }
.tda-pay-lines__total td { font-weight:700; }
.tda-pay-diff { margin:0 0 12px; padding:10px 12px; background:#FFF8E5; border-radius:6px; }
.tda-pay-diff__text { margin:0 0 6px; font-weight:600; font-size:14px; line-height:1.4; }
.tda-pay-diff .tda-check { display:block; margin:2px 0; }
.tda-pay-changes { margin:0 0 14px; padding-left:18px; font-size:13px; color:#555; }
.tda-family-lines__carry td { color:#666; }
