/* The Simple Group console, in the site's design.
 *
 * inner-circle.html is the one page the conversion pipeline leaves alone: it is
 * a 190 KB single-page app with its own inline stylesheet, and every colour in
 * that sheet comes from a handful of custom properties (--bg, --gold, --txt-*,
 * --neu-*). So this sheet loads last and re-points those properties at the
 * design's palette - navy ground and violet accent, the same as the journey
 * pages - then flattens the old neumorphic shadows into the design's 1px
 * rings, and catches the few places the page hardcodes the old brand green
 * (the emblem SVGs, inline notice styles, the floats).
 *
 * The palette is declared !important because the old skin's sheet forces
 * --gold, --bg, --gold-grad and --line that way on :root; this sheet loads
 * after it, so an equally-important declaration here wins.
 *
 * Loaded by build/make-simple-group.js. Light mode (the page's own toggle)
 * is kept and mapped to the design's light palette.
 */

/* ---- palette: dark (default) ----------------------------------------------- */
:root {
  --bg:        #01041A !important;                 /* ground: the journey pages' navy */
  --bg-dark:   #0B1240 !important;                 /* hairlines */
  --bg-light:  #0A1030 !important;                 /* raised surfaces */
  --surface:   #01041A !important;

  --gold:        #A78BFA !important;               /* the old "gold" slot is the accent */
  --gold-bright: #C4B5FD !important;
  --gold-deep:   #7C3AED !important;
  --gold-grad:   linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%) !important;

  --txt:   #FFFFFF !important;
  --txt-2: #97A3C8 !important;
  --txt-3: #6F7BA3 !important;
  --green: #3DDC64 !important;
  --red:   #FB7185 !important;

  --r-lg: 20px !important; --r-md: 14px !important; --r-sm: 12px !important; --r-pill: 999px !important;

  --line:   rgba(255, 255, 255, 0.10) !important;
  --neu-out:    0 0 0 1px var(--line), 0 18px 40px -28px rgba(0, 0, 0, 0.85) !important;
  --neu-out-sm: 0 0 0 1px var(--line) !important;
  --neu-in:     inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  --neu-in-sm:  inset 0 0 0 1px rgba(255, 255, 255, 0.10) !important;

  --sg-ring:  rgba(167, 139, 250, 0.38) !important; /* focus ring */
  --sg-glow:  rgba(124, 58, 237, 0.22) !important;  /* tinted fills */
  --sg-on-accent: #FFFFFF !important;               /* text on the violet gradient */
}

/* ---- palette: light (the page's toggle) ------------------------------------- */
html[data-theme="light"] {
  --bg:        #F7F8FA !important;
  --bg-dark:   #E4E8EF !important;
  --bg-light:  #FFFFFF !important;
  --surface:   #F7F8FA !important;

  --gold:        #6D28D9 !important;
  --gold-bright: #7C3AED !important;
  --gold-deep:   #5B21B6 !important;

  --txt:   #0B1B34 !important;
  --txt-2: #5A6B84 !important;
  --txt-3: #7C8AA3 !important;
  --green: #15803D !important;
  --red:   #DC2626 !important;

  --line:   #E4E8EF !important;
  --neu-out:    0 0 0 1px var(--line), 0 18px 40px -28px rgba(11, 27, 52, 0.35) !important;
  --neu-out-sm: 0 0 0 1px var(--line) !important;
  --neu-in:     inset 0 0 0 1px var(--line) !important;
  --neu-in-sm:  inset 0 0 0 1px var(--line) !important;

  --sg-ring: rgba(124, 58, 237, 0.25) !important;
  --sg-glow: rgba(124, 58, 237, 0.10) !important;
}

/* the old skin paints html/body with !important too */
html, body { background: var(--bg) !important; color: var(--txt) !important; }
html[data-theme="light"], html[data-theme="light"] body { background: var(--bg) !important; color: var(--txt) !important; }
html { scrollbar-color: var(--gold-deep) var(--bg); }
::selection { background: rgba(167, 139, 250, 0.35); }

/* ---- surfaces: raised cards sit one step lighter than the ground ----------- */
.login-card, .perk, .inc-card, .tile, .mrow, .srow, .create-card, .join-card,
.player-card, .fb-card, .matrow, .fbrow, .gl-card, .gl-lay, details.help, #toast,
.btn-ghost, .btn-sm, .btn-nav, .btn-close, .btn-drive, .btn-copy, .fb-chip,
.btn-ghost-full, .btn-back, .lv-login-top, .tile-state, .tile-badge, .mrow-badge,
.mat-ico, .s-avatar, .pf-v {
  background: var(--bg-light);
}
.perk-ico, .role-pill, .status, .s-status, .fbrow-pill, .helper, .warn, .cc-result,
.demo-hint, .login-msg, .progress-bar, .tabs {
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="light"] .perk-ico, html[data-theme="light"] .role-pill,
html[data-theme="light"] .status, html[data-theme="light"] .s-status,
html[data-theme="light"] .fbrow-pill, html[data-theme="light"] .helper,
html[data-theme="light"] .warn, html[data-theme="light"] .cc-result,
html[data-theme="light"] .demo-hint, html[data-theme="light"] .login-msg,
html[data-theme="light"] .progress-bar, html[data-theme="light"] .tabs {
  background: #FFFFFF;
}

/* ---- inputs ----------------------------------------------------------------- */
.field input, .ccf input, .mrow-edit input, #bulk-input, .st-vidinput,
.fb-field input, .fb-field textarea, .fb-select {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--neu-in);
}
html[data-theme="light"] .field input, html[data-theme="light"] .ccf input,
html[data-theme="light"] .mrow-edit input, html[data-theme="light"] #bulk-input,
html[data-theme="light"] .st-vidinput, html[data-theme="light"] .fb-field input,
html[data-theme="light"] .fb-field textarea, html[data-theme="light"] .fb-select {
  background: #FFFFFF;
}
.field input:focus, .ccf input:focus, .mrow-edit input:focus, #bulk-input:focus,
.fb-field input:focus, .fb-field textarea:focus, .fb-select:focus {
  box-shadow: inset 0 0 0 1px var(--gold-deep), 0 0 0 3px var(--sg-ring);
}
.field input::placeholder, .ccf input::placeholder, .mrow-edit input::placeholder,
.st-vidinput::placeholder { color: var(--txt-3); }
.fb-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23A78BFA' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

/* ---- the gradient buttons: white text on violet, not black on green ---------- */
.btn-gold, .btn-save, .btn-dl, .scroll-cue, .tab.active, .fb-chip.selected, .ph-num,
.btn-watch.done, .st-pill {
  background: var(--gold-grad) !important;
  color: var(--sg-on-accent) !important;
  box-shadow: 0 10px 24px -14px rgba(109, 40, 217, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-gold::after, .btn-gold:hover::after { display: none; }   /* stockwiz's shine sweep */
.btn-gold:hover, .btn-save:hover, .btn-dl:hover { filter: brightness(1.08); }
.btn-gold:active, .btn-save:active { transform: scale(0.985); }
.btn-gold:disabled { opacity: 0.55; }
.btn-watch { color: var(--green); }

/* ---- bars ------------------------------------------------------------------- */
.topbar {
  background: rgba(1, 4, 26, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.86); }
.tab.active { box-shadow: none; }
.lv-topbar { position: absolute; }
#loginView {
  background:
    radial-gradient(60% 42% at 85% -5%, var(--sg-glow), transparent 70%),
    radial-gradient(40% 30% at 0% 100%, var(--sg-glow), transparent 70%);
}

/* ---- things the page hardcodes in green -------------------------------------- */
/* the emblem SVGs carry their colours as attributes */
.emblem [stroke="#29e337"] { stroke: var(--gold-deep); }
.emblem [stroke="#58ff29"] { stroke: var(--gold); }
.emblem [fill="#58ff29"]   { fill: var(--gold); }
.emblem [fill="#76ff80"], .emblem [fill="#29e337"] { fill: var(--gold-bright); }
.emblem [stroke="#3a3b45"] { stroke: var(--line); }
.em-core { filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6)); }

.perk-group::after { background: linear-gradient(90deg, rgba(167, 139, 250, 0.35), transparent); }
.inc-eyebrow .inc-dash { box-shadow: 0 0 10px rgba(167, 139, 250, 0.5); }
.inc-ico {
  background: radial-gradient(130% 130% at 30% 20%, var(--sg-glow), transparent 70%);
  box-shadow: var(--neu-out-sm), inset 0 0 0 1px rgba(167, 139, 250, 0.2);
}
#icNotice {
  border-color: rgba(167, 139, 250, 0.35) !important;
  background: linear-gradient(90deg, var(--sg-glow), transparent) !important;
}
.gl-mini i { background: var(--gold-grad); }
.gl-badge { color: var(--gold); }
.aj-ok { color: var(--green); }
.tab-badge { background: var(--red); color: #FFFFFF; }
.st-vidopen { background: rgba(251, 113, 133, 0.16); color: var(--red); }
.row-del { background: rgba(251, 113, 133, 0.12); color: var(--red); border-color: rgba(251, 113, 133, 0.3); }
.theme-toggle .tt-sun, html[data-theme="light"] .theme-toggle .tt-sun { color: var(--gold); }

/* the boot loader's bar and the call float */
#tstLoadBar { background: linear-gradient(90deg, #6D28D9, #8B5CF6, #A78BFA) !important; }
#tstCallFloat { background: var(--gold-grad) !important; }
#tstCallFloat svg { fill: #FFFFFF; }

/* the sign-in popup's echo of the number used the old green via --gilt */
:root, html[data-theme="light"] { --gilt: var(--gold) !important; }

/* ---- type: the design's tighter display tracking ------------------------------ */
.join-title, .inc-title, .page-title, .brand-name, .fb-title, .tb-name {
  letter-spacing: -0.02em;
}
.join-eyebrow, .inc-eyebrow, .eyebrow, .perk-group, .mt-head, .st-group-label {
  letter-spacing: 0.14em;
}
.otp-input, .s-uid, .row-sub, .st-group-label, .st-pill, .st-slotlbl {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;   /* --mono is not defined on this site */
}

/* ---- light mode: the old skin re-greens these with html[data-theme="light"] rules ---- */
html[data-theme="light"] .btn-gold, html[data-theme="light"] .btn-save, html[data-theme="light"] .btn-dl,
html[data-theme="light"] .scroll-cue, html[data-theme="light"] .tab.active,
html[data-theme="light"] .fb-chip.selected, html[data-theme="light"] .ph-num,
html[data-theme="light"] .btn-watch.done, html[data-theme="light"] .st-pill {
  background: var(--gold-grad) !important;
  color: var(--sg-on-accent) !important;
}
html[data-theme="light"] #tstCallFloat { background: var(--gold-grad) !important; }
html[data-theme="light"] #tstCallFloat svg { fill: #FFFFFF !important; }
html[data-theme="light"] .theme-toggle .tt-knob, .theme-toggle .tt-knob { background: var(--gold-grad) !important; }
html[data-theme="light"] .lc-signin button, html[data-theme="light"] .auth-links a b,
html[data-theme="light"] .foot-note a { color: var(--gold) !important; }

/* ---- phones: the signed-in top bar ---------------------------------------------
   Five link buttons and Sign out sat in one unbroken row 585px wide, running
   200-250px off a phone screen. They wrap onto their own full-width line. */
@media (max-width: 760px) {
  .topbar { row-gap: 10px; }
  .user-zone { width: 100%; min-width: 0; flex-wrap: wrap; gap: 8px; }
  .user-zone .btn-ghost { padding: 9px 12px; }
  #logoutBtn { margin-left: auto; }
  .role-pill { font-size: 11px; }
}

/* ---- paid courses: Starter / Pro (js/sg-courses.js) ---------------------------- */
.sgc-wrap { margin: 26px 0 30px; }
.sgc-wrap:empty { display: none; }
.sgc-head { margin-bottom: 14px; }
.sgc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .sgc-grid { grid-template-columns: 1fr; } }
.sgc-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 20px 18px; border-radius: var(--r-lg);
  background: var(--bg-light); box-shadow: var(--neu-out);
}
.sgc-card.is-open { box-shadow: 0 0 0 1px rgba(167,139,250,.45), 0 18px 40px -28px rgba(0,0,0,.85); }
.sgc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sgc-name { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; color: var(--txt); }
.sgc-chip {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px;
  color: var(--gold); background: var(--sg-glow); box-shadow: inset 0 0 0 1px rgba(167,139,250,.35); white-space: nowrap;
}
.sgc-chip.ok { color: var(--green); background: rgba(61,220,100,.10); box-shadow: inset 0 0 0 1px rgba(61,220,100,.35); }
.sgc-tag { margin: 0; color: var(--txt-2); font-size: 14px; line-height: 1.5; }
.sgc-meta { margin: 2px 0 0; color: var(--txt-3); font-size: 12.5px; }
.sgc-until { margin: 0; color: var(--txt); font-size: 13px; font-weight: 600; }
.sgc-card .btn-gold { margin-top: 10px; }
.sgc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.sgc-actions .btn-gold { width: auto; margin-top: 0; padding: 12px 18px; text-decoration: none; display: inline-flex; }
a.btn-gold.sgc-buy { text-decoration: none; display: inline-flex; justify-content: center; }

.sgc-peek-box { margin-top: 16px; padding: 18px; border-radius: var(--r-lg); background: var(--bg-light); box-shadow: var(--neu-out-sm); }
.sgc-peek-box.hidden { display: none; }
.sgc-peek-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--txt); }

.sgc-course-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 6px; }
.sgc-course-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--txt); }
.sgc-langs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: var(--neu-in-sm); margin-left: auto; }
html[data-theme="light"] .sgc-langs { background: #FFFFFF; }
.sgc-lang { padding: 7px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--txt-2); }
.sgc-lang.on { background: var(--gold-grad); color: #FFFFFF; }

.sgc-sec { margin: 18px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.sgc-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.sgc-lesson {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 13px 16px; border-radius: 14px; background: var(--bg-light); box-shadow: var(--neu-out-sm);
  color: var(--txt); font-size: 14.5px; transition: transform .15s;
}
button.sgc-lesson:not([disabled]):hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(167,139,250,.5); }
.sgc-lesson.is-soon, .sgc-lesson.is-locked { opacity: .65; cursor: default; }
.sgc-n { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; font-size: 12.5px; color: var(--gold); box-shadow: var(--neu-in-sm); }
.sgc-lesson.is-done .sgc-n { color: var(--green); }
.sgc-t { flex: 1; min-width: 0; font-weight: 600; }
.sgc-t small { display: block; margin-top: 2px; font-weight: 400; font-size: 12.5px; color: var(--txt-3); }
.sgc-d { flex: 0 0 auto; color: var(--txt-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sgc-lock { flex: 0 0 auto; font-size: 13px; }

/* admin: payment log */
.sgc-ev { padding: 12px 15px; border-radius: 12px; background: var(--bg-light); box-shadow: var(--neu-out-sm); font-size: 12.5px; }
.sgc-ev-top { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--txt-2); }
.sgc-ev-top b { color: var(--txt); font-weight: 700; }
.sgc-ev-out { margin-top: 4px; color: var(--txt-2); word-break: break-word; }
.sgc-ev.ok .sgc-ev-out { color: var(--green); }
.sgc-ev.bad { box-shadow: inset 0 0 0 1px rgba(251,113,133,.45); }
.sgc-ev.bad .sgc-ev-out { color: var(--red); }
#coursesAdminView select.fb-select { width: 100%; }

/* payment-return popups (sg-courses.js) */
.sgc-modal { position: fixed; inset: 0; z-index: 9990; display: grid; place-items: center; padding: 18px;
  background: rgba(1,4,26,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sgc-modal-card { width: min(440px, 100%); max-height: 92vh; overflow: auto; padding: 26px 24px 22px;
  border-radius: var(--r-lg); background: var(--bg-light); box-shadow: 0 0 0 1px rgba(167,139,250,.35), 0 30px 80px rgba(0,0,0,.6); }
.sgc-modal-kick { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.sgc-modal-kick.ok { color: var(--green); }
.sgc-modal-kick.bad { color: var(--red); }
.sgc-modal-title { margin: 8px 0 8px; font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; color: var(--txt); }
.sgc-modal-text { margin: 0 0 14px; color: var(--txt-2); font-size: 14px; line-height: 1.6; }
.sgc-modal-note { margin: 12px 0 16px; color: var(--txt-3); font-size: 12.5px; line-height: 1.55; }
.sgc-cred { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; padding: 14px 16px;
  border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: var(--neu-in-sm); }
html[data-theme="light"] .sgc-cred { background: #FFFFFF; }
.sgc-cred dt { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3); align-self: center; }
.sgc-cred dd { margin: 0; color: var(--txt); font-size: 14px; }
.sgc-cred b { color: var(--gold-bright); }
.sgc-spin { width: 34px; height: 34px; margin: 6px auto 4px; border-radius: 50%;
  border: 3px solid rgba(167,139,250,.25); border-top-color: var(--gold); animation: sgcSpin .9s linear infinite; }
@keyframes sgcSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sgc-spin { animation-duration: 2.4s; } }
