/* ============================================================
   GTR by Vero UK — admin dashboard styles
   Reuses tokens, buttons, fields, modal & fonts from styles.css.
   ============================================================ */
.dash { background: #f4f1eb; min-height: 100vh; }

/* The JS toggles views with the `hidden` attribute. Class rules below set
   `display: flex`, which would otherwise beat the browser's [hidden] rule and
   leave the gate/loading overlay stuck on screen even when signed in. Force
   hidden to always win. */
[hidden] { display: none !important; }

.dash-loading,
.dash-gate {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: #efeae1;
}
.dash-loading { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: var(--muted); }
.gate-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 16px 0 0; }

/* Feedback page */
.fb-wrap { max-width: 680px; margin: 0 auto; }
.fb-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(26px,3.4vw,38px); letter-spacing: -.8px; color: var(--ink); margin: 6px 0 12px; line-height: 1.1; }
.fb-lede { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 28px; }
.fb-form { gap: 18px; }
.fb-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.fb-consent input { margin-top: 2px; flex: none; width: 16px; height: 16px; }
.fb-thanks { text-align: center; padding: 20px 0; }
.fb-thanks .thankyou-mark { margin: 0 auto 18px; width: 56px; }

/* My courses (account page) */
.mycourse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mycourse { background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.mycourse__cover { height: 130px; background-size: cover; background-position: center; background: var(--paper); }
.mycourse__cover--ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #efe7db, #e0d3bf); }
.mycourse__cover--ph span { font-family: var(--font-display); font-size: 38px; color: #b39a78; }
.mycourse__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.mycourse__title { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--ink); }

/* Course manager (admin) */
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.dc-eg { font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; color: var(--sand); }
.dc-upstate { font-size: 13px; color: var(--muted); margin-top: 8px; }
.dc-cover-prev { max-width: 220px; border-radius: 12px; border: 1px solid var(--line-soft); display: block; }

/* Top bar */
.dash-top { background: var(--ink-deep); color: #fff; }
.dash-top__inner { max-width: 1240px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-top .brand-name { color: #fff; }
.dash-top .brand-sub  { color: rgba(255,255,255,.5); }
.dash-top .brand-dot  { background: #fff; }
.dash-top .brand-dot::after { background: var(--ink-deep); }
.dash-top .footer-mark { margin: 0; }
.dash-who { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.7); }
.dash-who .btn { color: #fff; border-color: rgba(255,255,255,.3); }
.dash-link-light { color: rgba(255,255,255,.7); text-decoration: none; font-size: 13px; }
.dash-link-light:hover { color: #fff; }

/* Body */
.dash-main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.dash-demo { background: #fbeee9; border: 1px solid #f2cabd; color: #8a3a26; border-radius: 12px; padding: 14px 16px; font-size: 13px; line-height: 1.5; margin-bottom: 24px; }

.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 32px; }
.dash-stat { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; }
.dash-stat__num { font-family: var(--font-display); font-size: clamp(26px,3vw,34px); font-weight: 500; letter-spacing: -1px; color: var(--ink); line-height: 1; }
.dash-stat__label { font-size: 13px; color: var(--muted); margin-top: 8px; }

.dash-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-tab { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-family: var(--font-body); font-size: 13px; cursor: pointer; color: var(--ink); }
.dash-tab.is-active { background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.dash-tab__count { display: inline-block; margin-left: 5px; font-family: var(--font-mono); font-size: 11px; opacity: .55; }

/* Search / toolbar */
.dash-toolbar { margin-bottom: 16px; }
.dash-search { width: 100%; max-width: 360px; font-family: var(--font-body); font-size: 14px; padding: 11px 14px; border: 1px solid var(--field); border-radius: 12px; background: #fff; color: var(--ink); }
.dash-search:focus { outline: none; border-color: var(--ink); }

/* Clickable client rows + per-client drill-down */
.dash-table tr.is-clickable { cursor: pointer; }
.client-detail-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.client-detail-name { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -.4px; color: var(--ink); }

/* Live "new lead" notifications */
.notif-stack { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; width: 300px; max-width: calc(100% - 32px); }
.notif { background: var(--ink-deep); color: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(20,18,14,.32); cursor: pointer; transition: opacity .3s ease; animation: notifIn .3s ease both; }
.notif__title { font-size: 13px; font-weight: 600; }
.notif__body { font-size: 12px; opacity: .82; margin-top: 4px; word-break: break-word; }
@keyframes notifIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.dash-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; overflow: hidden; }
.dash-scroll { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.dash-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); vertical-align: top; white-space: nowrap; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: #faf8f3; }
.dash-empty { padding: 48px; text-align: center; color: var(--muted); font-size: 14px; }

.status-select { font-family: var(--font-body); font-size: 12px; border: 1px solid var(--field); border-radius: 8px; padding: 6px 8px; background: #fff; cursor: pointer; }
.pill-status { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.pill-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill-new       { background: #fde9d9; color: #9a4b16; }
.pill-contacted { background: #e4eede; color: #3f6b2e; }
.pill-closed    { background: #ececec; color: #666; }
.pill-paid      { background: #dcefe0; color: #256b3c; }
.pill-refunded  { background: #f3e2c8; color: #8a5a16; }
.pill-cancelled { background: #f3d9d9; color: #9a2b2b; }
.dash-link { color: var(--vero-coral); text-decoration: none; }
.dash-link:hover { text-decoration: underline; }

/* Detailed "logical" view (client account portal) */
.dash-section { margin-bottom: 30px; }
.dash-section-title { font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: -.4px; color: var(--ink); margin: 0 0 14px; }
.detail-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; padding: 24px; margin-bottom: 14px; }
.detail-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 24px; }
.detail-item { min-width: 0; }
.detail-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.detail-value { font-size: 14px; color: var(--ink); word-break: break-word; }
.detail-msg { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
