/* ==========================================================
   Florentis Teacher Hub — teacher-hub.css (CLEAN + COMPLETE)
   - Hub tokens + base
   - Tabs (single source)
   - Filters row
   - Package tools + alerts
   - Table card + actions
   - Edit row + pagination
   - Pills + chips + last lesson helpers
   - Latest lessons drawer
   - Parent report settings (2-col layout + theme-proof inputs)
   - Modal baseline
   ========================================================== */

/* ==========================================================
   Hub tokens + base scope
   ========================================================== */
.fl-teacher-hub{
  --fl-ink: #172830;
  --fl-blue: #27537a;
  --fl-green: #596c10;
  --fl-bg: #f1e5da;
  --fl-card: #ffffff;

  --fl-border: #e9ecef;
  --fl-border-2: #e2e8f0;

  --fl-muted: #64748b;
  --fl-soft: #f8fafc;
  --fl-soft-2: #f7f8f9;

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  --shadow-card: 0 6px 18px rgba(0,0,0,.06);
  --shadow-soft: 0 8px 18px rgba(0,0,0,.05);

  max-width: 1200px;
  margin: 0 auto 3rem;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--fl-ink);
}

.fl-teacher-hub h2,
.fl-teacher-hub h3{
  color: var(--fl-ink);
  margin: .25rem 0 .75rem;
}

/* Layout helpers (used by hub templates) */
.fl-th-layout{ display:block; width:100%; }
.fl-th-main{ width:100%; }
.fl-th-heading{ margin:14px 0 8px; padding:0 14px; }

/* ==========================================================
   Theme-proof form controls (hub scoped)
   ========================================================== */
.fl-teacher-hub input[type="text"],
.fl-teacher-hub input[type="email"],
.fl-teacher-hub input[type="url"],
.fl-teacher-hub input[type="number"],
.fl-teacher-hub select,
.fl-teacher-hub textarea,
.fl-teacher-hub .fl-input{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #d9e1e6;
  background: #fff;
  color: var(--fl-ink);

  font-size: 15px;
  line-height: 1.25;

  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.fl-teacher-hub textarea{ resize: vertical; }

.fl-teacher-hub input[type="text"]:focus,
.fl-teacher-hub input[type="email"]:focus,
.fl-teacher-hub input[type="url"]:focus,
.fl-teacher-hub input[type="number"]:focus,
.fl-teacher-hub select:focus,
.fl-teacher-hub textarea:focus,
.fl-teacher-hub .fl-input:focus{
  outline: 3px solid rgba(244, 212, 136, .65);
  outline-offset: 2px;
  border-color: rgba(39,83,122,.55);
}

/* Buttons (hub scoped) */
.fl-teacher-hub .button,
.fl-teacher-hub button,
.fl-teacher-hub input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;

  padding:.44rem .72rem;
  border-radius: var(--radius-md);

  border:1px solid #d9e1e6;
  background:#fff;
  color: var(--fl-ink);

  font-size: .9rem;
  text-decoration:none;
  cursor:pointer;
}

.fl-teacher-hub .button:hover,
.fl-teacher-hub button:hover{
  border-color:#c8d4dc;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

.fl-teacher-hub .button-primary{
  background: var(--fl-blue);
  border-color: var(--fl-blue);
  color:#fff;
}

/* ==========================================================
   Tabs (single source of truth)
   ========================================================== */
.flth-tabs{
  position: sticky;
  top: 0;
  z-index: 80;

  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;

  padding: 12px 14px;
  margin: 10px 0 16px;

  background:#fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
}

.flth-tab{
  display:inline-flex;
  align-items:center;
  gap:8px;

  padding:10px 14px;
  border-radius:999px;

  text-decoration:none;
  font-weight:800;
  line-height:1;

  color: var(--fl-blue);
  background: rgba(39,83,122,.06);
  border: 2px solid rgba(39,83,122,.25);

  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.flth-tab:hover{
  transform: translateY(-1px);
  background: rgba(39,83,122,.10);
  border-color: rgba(39,83,122,.40);
}

.flth-tab.is-active{
  background: var(--fl-blue);
  border-color: var(--fl-blue);
  color:#fff;
  box-shadow: 0 8px 16px rgba(39,83,122,.18);
}

.flth-tab:focus,
.flth-tab:focus-visible{
  outline: 3px solid #f4d488;
  outline-offset: 3px;
}

.flth-tabpanel{ min-height:20px; padding: 0 14px; }

.flth-tabs .flth-tab-gear{
  width:44px;
  height:44px;
  border-radius:999px;

  border:2px solid rgba(39,83,122,.25);
  background: rgba(39,83,122,.06);

  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;

  transition: background .12s ease, border-color .12s ease;
}

.flth-tabs .flth-tab-gear:hover{
  border-color: rgba(39,83,122,.45);
  background: rgba(39,83,122,.10);
}

.flth-tabs .flth-tab-gear .dashicons{
  font-size:18px;
  width:18px;
  height:18px;
}

/* ==========================================================
   Filters row
   ========================================================== */
.fl-th-filters{
  margin-bottom:12px;

  position: sticky;
  top: 0;
  z-index: 100;

  background:#f3e8dc;
  padding: 15px 14px;
  border-bottom: 2px solid #e9edf1;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);

  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.fl-th-filter-control{ min-width:220px; }
.fl-th-filters .fl-input{ min-width:240px; }

.fl-th-filters .fl-input,
.fl-th-filters select,
.fl-th-filters .button{
  height: 40px;
  padding: 0 .9rem;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

.fl-th-filter-actions{
  margin-left:auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.flth-filter-note{
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(39,83,122,.08);
  font-size: 13px;
  color: #334155;
}

/* ==========================================================
   Package tools + inline alerts
   ========================================================== */
.fl-th-package-tools{
  padding: 10px 12px;
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-md);
  background:#fff;
}

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

.fl-th-package-tools .flth-package-actions{ margin-top:8px; }

.flth-package-events .flth-inline-alert{
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.flth-package-events .flth-inline-alert.is-success{
  background:#e9f6ee;
  border-color:#b8e0c2;
}

.flth-package-events .flth-inline-alert.is-error{
  background:#f9eaea;
  border-color:#f1b8b8;
}

/* Toolbar row (above table widgets) */
.flth-toolbar-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin: 10px 0 14px;
}

.flth-toolbar-row--packages{
  padding: 10px;
  background:#fff;
  border: 1px solid var(--fl-border-2);
  border-radius: 14px;
}

/* ==========================================================
   Table card
   ========================================================== */
.fl-th-card{
  background:#fff;
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow:hidden;
}

.fl-th-table-wrap{ overflow-x:auto; padding:0; }

.fl-th-table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1000px;
}

.fl-th-table thead th{
  text-align:left;
  padding:14px;
  background: var(--fl-soft-2);
  color: var(--fl-ink);
  font-weight:700;
  border-bottom: 2px solid var(--fl-border);
  white-space:nowrap;
}

.fl-th-table tbody td{
  padding:14px;
  border-bottom: 1px solid #f0f1f2;
  vertical-align:middle;
}

.fl-th-table tbody tr:nth-child(even){ background-color:#fcfaf8; }
.fl-th-table tbody tr:hover{
  background-color:#f1f5f9;
  transition: background-color .15s ease;
}

/* Column sizing */
.fl-th-column-student{ width:22%; min-width:160px; }
.fl-th-column-level,
.fl-th-column-status,
.fl-th-column-package,
.fl-th-column-last-lesson{
  width:1%;
  white-space:nowrap;
}
.fl-th-column-actions{
  width:1%;
  min-width:250px;
  text-align:left;
}

/* Student link + helpers */
.fl-th-student a{
  color: var(--fl-blue);
  font-weight:600;
  text-decoration:none;
}
.fl-th-student-line{ display:flex; align-items:center; gap:8px; }
.fl-th-edit-pencil{ text-decoration:none; opacity:.85; }
.fl-th-edit-pencil:hover{ opacity:1; }

.fl-th-parent-link a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  background: rgba(39,83,122,.08);
}

/* ==========================================================
   Unified action icons (ONE source)
   ========================================================== */
.fl-th-actions{
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  justify-content:flex-start;
  align-items:center;
}

.fl-th-actions .button,
.fl-th-actions .button-emoji{
  display:inline-flex !important;
  justify-content:center;
  align-items:center;

  width:36px !important;
  height:36px !important;
  padding:0 !important;

  border-radius: var(--radius-sm) !important;
  background:#fff !important;
  color: var(--fl-blue) !important;
  border: 1px solid #d9e1e6 !important;

  box-shadow:none !important;
  transition: all .2s ease;
}

.fl-th-actions .button:hover,
.fl-th-actions .button-emoji:hover{
  background:#f1f5f9 !important;
  border-color: var(--fl-blue) !important;
}

/* ==========================================================
   Progress UI
   ========================================================== */
.fl-th-progress{ display:flex; align-items:center; gap:.5rem; }

.fl-th-progress-track{
  flex:1;
  height:8px;
  background:#eef2f7;
  border-radius:999px;
  overflow:hidden;
}

.fl-th-progress-bar{
  display:block;
  height:100%;
  background: var(--fl-blue);
}

.fl-th-progress-value{ font-weight:700; }

/* Inline form */
.fl-inline-form{ display:inline; }

/* ==========================================================
   Edit row + form grid
   ========================================================== */
.fl-th-edit-row td{ background:#fafafa; }

.fl-th-edit-form{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap:10px;
  align-items:end;
}

@media (max-width:1100px){
  .fl-th-edit-form{ grid-template-columns: 1fr 1fr; }
}
@media (max-width:720px){
  .fl-th-edit-form{ grid-template-columns: 1fr; }
}

.fl-th-form-field label{
  display:block;
  font-weight:600;
  color: var(--fl-ink);
  margin:4px 0;
}

.fl-th-field-help{
  color: var(--fl-muted);
  font-size:12px;
  margin:4px 0 0;
}

.fl-th-edit-actions{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  gap:.75rem;
  margin-top:2px;
}

/* Pagination */
.fl-th-pagination{ margin:14px 0 0; padding:0 14px; }
.fl-th-page-link{ margin-right:6px; color: var(--fl-blue); text-decoration:none; }
.fl-th-page-link.is-current{ font-weight:700; }

/* ==========================================================
   Package status pill + attention pill + chips
   ========================================================== */
.fl-th-package-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:#f1f5f9;
  color:#0f172a;
  font-weight:600;
  text-transform:capitalize;
}

.fl-th-package-pill.status-expired,
.fl-th-package-pill.status-exhausted{
  background:#fef2f2;
  color:#991b1b;
}
.fl-th-package-pill.status-active{
  background:#ecfdf3;
  color:#166534;
}

.fl-th-attn-pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  border:1px solid transparent;
  white-space:nowrap;
}
.fl-th-attn-watch{
  background:#fffbeb;
  border-color:#f59e0b;
  color:#92400e;
}
.fl-th-attn-risk{
  background:#fef2f2;
  border-color:#ef4444;
  color:#991b1b;
}

.fl-th-chip{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:#0f172a;
}
.fl-th-chip-success{ border-color: rgba(89,108,16,.35); }

/* ==========================================================
   Last lesson cell helpers
   ========================================================== */
.fl-th-last-lesson{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.fl-th-last-date{
  font-size:12px;
  color: var(--fl-muted);
  line-height:1.2;
}

.fl-th-next-lesson{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

a.fl-th-btn-small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 10px;
  border-radius: var(--radius-sm);
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:#0f172a;
  white-space:nowrap;
}
a.fl-th-btn-small:hover{ filter: brightness(.96); }

/* Start Next Lesson — blue tint */
a.fl-th-btn-next{
  border-color: rgba(39,83,122,.30);
  background: rgba(39,83,122,.07);
  color: #1e3a5f;
}

/* Continue Lesson — green tint (same lesson, repeating) */
a.fl-th-btn-next.is-continuing{
  border-color: rgba(89,108,16,.35);
  background: rgba(89,108,16,.08);
  color: #3a5c0a;
}

a.fl-th-btn-assign{ border-color: rgba(89,108,16,.35); }

/* ── Next lesson hover tooltip ── */
.fl-th-next-lesson{
  position: relative;
}

/* Tooltip wrapper — added via PHP data attribute */
a.fl-th-btn-next[data-lesson-title]{
  position: relative;
}

a.fl-th-btn-next[data-lesson-title]::after{
  content: attr(data-lesson-title);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;

  background: #172830;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  line-height: 1.3;
  letter-spacing: .01em;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);

  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateX(-50%) translateY(4px);
  z-index: 99;
}

/* Arrow */
a.fl-th-btn-next[data-lesson-title]::before{
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: #172830;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 99;
}

a.fl-th-btn-next[data-lesson-title]:hover::after,
a.fl-th-btn-next[data-lesson-title]:hover::before{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   Latest Lessons Drawer (single system)
   ========================================================== */
/* ═══════════════════════════════════════════════════════════
   Latest Lessons Drawer
   Handle: always-visible fixed tab at right edge
   Panel:  slides in from the right behind the handle
   ═══════════════════════════════════════════════════════════ */

/* Root container — zero-size anchor at top-right, no layout contribution */
.flth-latest-lessons-drawer{
  position: fixed;
  right: 0;
  top: 160px;
  z-index: 9999;
  width: 0;
  height: 0;
  pointer-events: none;
}

.flth-latest-lessons-handle,
.flth-latest-lessons-panel{
  pointer-events: auto;
}

/* ── Handle (always-visible tab) ── */
.flth-latest-lessons-handle{
  position: absolute;
  /* Sits just to the left of right:0, rotated sideways */
  right: 0;
  top: 0;
  transform-origin: bottom right;
  transform: rotate(-90deg) translateX(100%);

  background: #172830 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.25);
  border-bottom: none;
  border-radius: 10px 10px 0 0;

  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;

  box-shadow: -4px -4px 16px rgba(0,0,0,.18);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2px;

  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 2;
}

.flth-latest-lessons-handle:hover{ filter: brightness(1.12); }
.flth-latest-lessons-handle:focus,
.flth-latest-lessons-handle:focus-visible{
  outline: 3px solid #f4d488;
  outline-offset: 2px;
}

/* ── Panel — slides in from right, independent of handle layout ── */
.flth-latest-lessons-panel{
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  max-width: 88vw;

  background: #fff;
  border-radius: 14px 0 0 14px;
  border: 1px solid #e5e7eb;
  border-right: none;
  box-shadow: -6px 0 32px rgba(0,0,0,.14);

  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  z-index: 1;
}

.flth-latest-lessons-drawer.is-open .flth-latest-lessons-panel{
  transform: translateX(0);
}

/* ── Sidebar scrollable content ── */
.fl-th-sidebar{
  padding: 18px 18px 20px;
  max-height: 72vh;
  overflow-y: auto;
  border-radius: 14px 0 0 14px;
}

.flth-sidebar-title{
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #0f172a;
}

.flth-latest-lesson-item{ list-style: none; margin: 0 0 10px; }

.flth-latest-lesson-card{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  /* Again, use box-shadow trick for background so theme can't override */
  background: transparent;
  box-shadow: inset 0 0 0 9999px #fff;
  position: relative;
}
.flth-latest-lesson-card b{ font-weight: 800; }

/* ==========================================================
   Parent Report Settings
   - Two-column layout: preview left, form right (desktop)
   ========================================================== */
/* ==========================================================
   Parent Report Settings tab
   ========================================================== */

/* Grid wrapper expected:
   <div class="fl-settings-layout">
     <div class="fl-settings-left">...</div>
     <div class="fl-settings-right">...</div>
   </div>
*/
.fl-teacher-hub #tab-settings .fl-settings-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items:start;
}

@media (min-width: 960px){
  .fl-teacher-hub #tab-settings .fl-settings-layout{
    grid-template-columns: 420px 1fr;
  }
  .fl-teacher-hub #tab-settings .fl-settings-left{
    position: sticky;
    top: 90px;
  }
}

/* Cards (generic) */
.flth-card{
  background:#fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow:hidden;
}

.flth-card__head{
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.flth-card__title{ font-weight:900; font-size:18px; margin:0; }
.flth-card__sub{ margin-top:4px; color: var(--fl-muted); font-size:13px; }
.flth-card__body{ padding: 16px 18px 18px; }

/* IMPORTANT:
   Do NOT auto-center/cap widths here — this was one of the main causes
   of “lost styling” / narrow columns when you moved to 2-col layout. */
.fl-teacher-hub #tab-settings .flth-card,
.fl-teacher-hub #tab-settings .fl-report{
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Preview component */
.pv-contact-preview{
  display:flex;
  gap:14px;
  align-items:flex-start;

  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  background:#fff;

  width:100%;
  max-width:none; /* <- fixes the old 680/720 cap */
  box-sizing:border-box;
}

.pv-contact-avatar{ flex: 0 0 auto; }
.pv-contact-avatar img{
  width:64px;
  height:64px;
  border-radius:999px;
  object-fit:cover;
  display:block;
  border: 1px solid rgba(0,0,0,.10);
  background:#fff;
}

.pv-contact-name{ font-size:18px; font-weight:900; margin:0 0 4px; }
.pv-contact-role{ font-weight:800; color: var(--fl-muted); margin:0 0 10px; font-size:12px; }
.pv-contact-line{ margin:6px 0; font-size:14px; line-height:1.35; color:#0f172a; }
.pv-contact-cta{ margin-top:10px; }

.pv-contact-book{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 8px 10px;
  border-radius:999px;
  border: 1px solid rgba(39,83,122,.25);
  background: rgba(39,83,122,.08);
  font-weight:800;
  font-size:13px;
  color: var(--fl-ink);
}

/* Guidance note */
.fl-teacher-hub #tab-settings .fl-subnote{
  margin: 14px 0 16px;
  padding: 10px 12px;

  border: 1px solid #e2e8f0;
  border-left: 4px solid #27537a;
  border-radius: 12px;

  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}
.fl-teacher-hub #tab-settings .fl-subnote strong{ color: var(--fl-ink); }

/* Collapsible report card */
.fl-report{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius-xl);
  background:#fff;
  overflow:hidden;
  box-shadow: var(--shadow-soft);
}

.fl-report-summary,
.fl-report summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding: 14px 18px;
  cursor:pointer;
  user-select:none;

  font-weight:800;
  color: var(--fl-ink);
  background:#fff;
}

.fl-report summary::-webkit-details-marker,
.fl-report-summary::-webkit-details-marker{ display:none; }

.fl-report-title{ font-size:18px; font-weight:900; line-height:1.2; }

.fl-teacher-hub #tab-settings details.fl-report > summary.fl-report-summary::after{
  content:"▾";
  font-size:18px;
  opacity:.7;
  transition: transform .15s ease;
}
.fl-teacher-hub #tab-settings details.fl-report[open] > summary.fl-report-summary::after{
  transform: rotate(180deg);
}

.fl-report-content{
  padding: 0 18px 18px;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* Report form grid */
.fl-report-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items:start;
}
.fl-report-grid > div{ min-width:0; } /* prevents squishing */

.fl-row-2{ grid-column: span 2; }
.fl-row-3{ grid-column: span 3; }

@media (max-width:1100px){
  .fl-report-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fl-row-3{ grid-column: span 2; }
}
@media (max-width:720px){
  .fl-report-grid{ grid-template-columns: 1fr; }
  .fl-row-2, .fl-row-3{ grid-column: span 1; }
}

/* Labels in report */
.fl-report label{
  display:block;
  font-weight:800;
  font-size:13px;
  margin: 0 0 6px;
  color: var(--fl-ink);
}

/* Report inputs (inherit hub normalization, but keep sizing consistent) */
.fl-report .fl-input,
.fl-report select,
.fl-report textarea{
  font-size: 14px;
  min-height: 42px;
}
.fl-report textarea{ min-height: 92px; }

/* Inline checkbox control row */
.fl-inline-control{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 13px;
  color: #334155;
}
.fl-inline-control input[type="checkbox"]{
  width:16px;
  height:16px;
}

/* Actions row */
.fl-report-form .actions{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
  gap: .5rem;
}
.fl-report-form .button.button-primary{
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}

/* ==========================================================
   Modal baseline (prevents “lost CSS” in popups)
   ========================================================== */
.fl-teacher-hub .fl-modal,
.fl-teacher-hub .fl-modal *{
  box-sizing: border-box;
}

.fl-teacher-hub .fl-modal{
  position: fixed;
  inset: 0;
  display: none; /* toggled by JS */
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.35);
  z-index: 10000;
}

.fl-teacher-hub .fl-modal.is-open{ display:flex; }

.fl-teacher-hub .fl-modal-content{
  width: 100%;
  max-width: 720px;
  background:#fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  overflow:hidden;
}

.fl-teacher-hub .fl-modal-header{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.fl-teacher-hub .fl-modal-body{
  padding: 14px 16px 16px;
}

/* ==========================================================
   Misc / helpers
   ========================================================== */
.fl-empty-state{ margin:0; color: var(--fl-muted); }

/* Accessibility helper */
.screen-reader-text{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Parent Report Settings form controls */
.fl-report .fl-input,
.fl-report select,
.fl-report textarea {
  width: 100%;
  box-sizing: border-box;

  font-size: 14px;
  line-height: 1.25;

  min-height: 42px;
  padding: 10px 12px;

  border-radius: 12px;
  border: 1px solid #d8dee6;
  background: #fff;

  outline: none;
}

/* Focus state */
.fl-report .fl-input:focus,
.fl-report select:focus,
.fl-report textarea:focus {
  border-color: #27537a;
  box-shadow: 0 0 0 3px rgba(39,83,122,.18);
}

/* ==========================================================
   SETTINGS TAB — Notion-like skin (HARD OVERRIDE)
   Works even if .fl-teacher-hub wrapper is missing
   Paste at VERY BOTTOM of teacher-hub.css
   ========================================================== */

/* ---- Debug (optional): uncomment to confirm CSS is applying ---- */
/* #tab-settings { outline: 3px solid hotpink !important; } */

#tab-settings,
.fl-teacher-hub #tab-settings{
  --nt-text: #111827;
  --nt-muted: #6b7280;
  --nt-border: #eceff3;
  --nt-border-2: #e6ebf2;
  --nt-soft: #f8fafc;
  --nt-radius: 12px;
}

/* Make the whole settings area feel flatter + cleaner */
#tab-settings .flth-settings,
.fl-teacher-hub #tab-settings .flth-settings{
  padding: 0 !important;
}

/* 2-col layout: slightly tighter + more “doc” spacing */
#tab-settings .fl-settings-layout,
.fl-teacher-hub #tab-settings .fl-settings-layout{
  gap: 14px !important;
}

/* Cards: remove shadow, soften borders */
#tab-settings .flth-card,
#tab-settings .fl-report,
.fl-teacher-hub #tab-settings .flth-card,
.fl-teacher-hub #tab-settings .fl-report{
  background: #fff !important;
  border: 1px solid var(--nt-border) !important;
  box-shadow: none !important;                 /* <- Notion-ish */
  border-radius: var(--nt-radius) !important;
  overflow: hidden !important;
}

/* Card header: smaller type, calmer spacing */
#tab-settings .flth-card__head,
.fl-teacher-hub #tab-settings .flth-card__head{
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--nt-border) !important;
}

#tab-settings .flth-card__title,
.fl-teacher-hub #tab-settings .flth-card__title{
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--nt-text) !important;
  margin: 0 !important;
}

#tab-settings .flth-card__sub,
.fl-teacher-hub #tab-settings .flth-card__sub{
  margin-top: 4px !important;
  font-size: 12px !important;
  color: var(--nt-muted) !important;
}

#tab-settings .flth-card__body,
.fl-teacher-hub #tab-settings .flth-card__body{
  padding: 12px 14px 14px !important;
}

/* Preview block: make it a Notion callout */
#tab-settings .pv-contact-preview,
.fl-teacher-hub #tab-settings .pv-contact-preview{
  background: var(--nt-soft) !important;
  border: 1px solid var(--nt-border) !important;
  box-shadow: none !important;
  border-radius: var(--nt-radius) !important;
  padding: 12px 12px !important;
}

#tab-settings .pv-contact-name,
.fl-teacher-hub #tab-settings .pv-contact-name{
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--nt-text) !important;
}

#tab-settings .pv-contact-role,
.fl-teacher-hub #tab-settings .pv-contact-role{
  font-size: 12px !important;
  color: var(--nt-muted) !important;
  font-weight: 700 !important;
}

#tab-settings .pv-contact-line,
.fl-teacher-hub #tab-settings .pv-contact-line{
  margin: 4px 0 !important;
  font-size: 13px !important;
  color: #374151 !important;
}

/* “Book a lesson” pill — flatter */
#tab-settings .pv-contact-book,
.fl-teacher-hub #tab-settings .pv-contact-book{
  background: #fff !important;
  border: 1px solid var(--nt-border) !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  padding: 7px 10px !important;
}

/* Subnote: softer and less “alert” */
#tab-settings .fl-subnote,
.fl-teacher-hub #tab-settings .fl-subnote{
  background: var(--nt-soft) !important;
  border: 1px solid var(--nt-border) !important;
  border-left: 3px solid rgba(39,83,122,.55) !important;
  border-radius: var(--nt-radius) !important;
  padding: 10px 12px !important;
  font-size: 12.5px !important;
  color: #374151 !important;
  margin: 12px 0 14px !important;
}

/* Details summary row: feels like a Notion section header */
#tab-settings .fl-report-summary,
#tab-settings .fl-report summary,
.fl-teacher-hub #tab-settings .fl-report-summary,
.fl-teacher-hub #tab-settings .fl-report summary{
  padding: 12px 14px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--nt-border) !important;
}

#tab-settings .fl-report-title,
.fl-teacher-hub #tab-settings .fl-report-title{
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--nt-text) !important;
}

#tab-settings .fl-report-content,
.fl-teacher-hub #tab-settings .fl-report-content{
  padding: 12px 14px 14px !important;
  border-top: 0 !important;
}

/* Form grid: tighter, more doc-like */
#tab-settings .fl-report-grid,
.fl-teacher-hub #tab-settings .fl-report-grid{
  gap: 10px 12px !important;
}

/* Labels: smaller + muted */
#tab-settings .fl-report label,
.fl-teacher-hub #tab-settings .fl-report label{
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--nt-muted) !important;
  margin: 0 0 6px !important;
}

/* Inputs: embedded, subtle borders (keep your rounded corners) */
#tab-settings .fl-input,
#tab-settings select.fl-input,
#tab-settings textarea,
.fl-teacher-hub #tab-settings .fl-input,
.fl-teacher-hub #tab-settings select.fl-input,
.fl-teacher-hub #tab-settings textarea{
  background: #fff !important;
  border: 1px solid var(--nt-border-2) !important;
  border-radius: var(--radius-md) !important; /* uses your working rounded */
  box-shadow: none !important;
  font-size: 13.5px !important;
  padding: 9px 10px !important;
  min-height: 40px !important;
}

#tab-settings .fl-input:hover,
#tab-settings select.fl-input:hover,
#tab-settings textarea:hover,
.fl-teacher-hub #tab-settings .fl-input:hover,
.fl-teacher-hub #tab-settings select.fl-input:hover,
.fl-teacher-hub #tab-settings textarea:hover{
  border-color: #d7dde6 !important;
}

#tab-settings .fl-input:focus,
#tab-settings select.fl-input:focus,
#tab-settings textarea:focus,
.fl-teacher-hub #tab-settings .fl-input:focus,
.fl-teacher-hub #tab-settings select.fl-input:focus,
.fl-teacher-hub #tab-settings textarea:focus{
  outline: none !important;
  border-color: rgba(39,83,122,.55) !important;
  box-shadow: 0 0 0 3px rgba(39,83,122,.14) !important;
}

/* Checkbox row: subtle callout */
#tab-settings .fl-inline-control,
.fl-teacher-hub #tab-settings .fl-inline-control{
  background: var(--nt-soft) !important;
  border: 1px solid var(--nt-border) !important;
  border-radius: var(--nt-radius) !important;
  padding: 10px 12px !important;
}

/* Help text: muted and smaller */
#tab-settings .fl-th-field-help,
.fl-teacher-hub #tab-settings .fl-th-field-help{
  color: var(--nt-muted) !important;
  font-size: 12px !important;
  margin: 6px 0 0 !important;
  line-height: 1.35 !important;
}

/* Action row button: keep brand, reduce “chunky” */
#tab-settings .fl-report-form .actions .button.button-primary,
.fl-teacher-hub #tab-settings .fl-report-form .actions .button.button-primary{
  padding: 9px 12px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}
