@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=Sora:wght@400;500;600;700;800&display=swap');

/* ============================================================
   THEME TOKENS (overridden by js/theme.js)
   ============================================================ */
:root {
  --c-accent: #E8724A;
  --c-accent-2: #F0944D;
  --c-hero: linear-gradient(135deg, #E8724A 0%, #F0944D 50%, #F4B95E 100%);
  --c-hero-soft: linear-gradient(135deg, #FFF4EC 0%, #FFE8DA 100%);
  --c-bg: #FBF7F4;
  --c-soft: #FFF1E8;
  --c-surface: #FFFFFF;
  --c-ink: #19140F;
  --c-ink-2: #5B4F45;
  --c-ink-3: #9B8D82;
  --c-border: #EFE4DB;
  --c-card-border: #EEE3DA;
  --c-glow: rgba(232,114,74,0.28);
  --nav-bg: rgba(255,255,255,0.82);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 36px;
  --r-full: 9999px;

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-h: 'Sora', -apple-system, sans-serif;

  --shadow-sm: 0 1px 3px rgba(22,17,12,0.06), 0 4px 14px rgba(22,17,12,0.04);
  --shadow-md: 0 6px 24px rgba(22,17,12,0.08);
  --shadow-lg: 0 16px 48px rgba(22,17,12,0.10);
  --shadow-accent: 0 8px 28px var(--c-glow);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: clip; max-width: 100%; }
body {
  font-family: var(--font); color: var(--c-ink);
  background: var(--c-bg); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .4s ease, color .4s ease;
  overflow-x: clip; max-width: 100%;
}
img { max-width: 100%; height: auto; }
svg, video, canvas, embed, object, iframe, table { max-width: 100%; }
pre { white-space: pre-wrap; word-break: break-word; }
a { color: inherit; }
button { font-family: var(--font); cursor: pointer; }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-h); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--c-ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.25rem; }
p { color: var(--c-ink-2); }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--c-ink-2); max-width: 620px; font-weight: 400; line-height: 1.7; }

.wrap { width: min(1180px, 92%); margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  color: var(--c-accent); padding: 7px 16px; border-radius: var(--r-full);
  background: var(--c-soft); border: 1px solid var(--c-border);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.sec-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.sec-head.left { margin: 0 0 48px; text-align: left; }
.sec-head .lead { margin: 18px auto 0; }
.sec-head.left .lead { margin: 18px 0 0; }
.grad-text { background: var(--c-hero); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav-wrap { position: sticky; top: 0; z-index: 1000; padding: 14px 0 0; }
.nav {
  width: min(1240px, 94%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px 18px 12px 22px;
  background: var(--nav-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow-sm);
  animation: navIn .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes navIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #00e5ff, #7c3aed, #f472b6);
  display: grid; place-items: center; color: #fff; font-family: var(--font-h);
  font-weight: 900; font-size: 1.2rem; letter-spacing: -0.04em;
  box-shadow: 0 0 14px rgba(124,58,237,.55), 0 0 30px rgba(0,229,255,.25), 0 2px 6px rgba(0,0,0,.18);
  animation: neonPulse 3s ease-in-out infinite alternate;
}
@keyframes neonPulse {
  from { box-shadow: 0 0 14px rgba(124,58,237,.55), 0 0 30px rgba(0,229,255,.25), 0 2px 6px rgba(0,0,0,.18); }
  to   { box-shadow: 0 0 20px rgba(124,58,237,.7),  0 0 44px rgba(0,229,255,.35), 0 2px 6px rgba(0,0,0,.18); }
}
.brand-name { font-family: var(--font-h); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-sub { display: block; font-size: .62rem; font-weight: 600; color: var(--c-ink-3); text-transform: uppercase; letter-spacing: .18em; margin-top: 1px; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; text-decoration: none; font-size: .9rem; font-weight: 600;
  color: var(--c-ink-2); padding: 9px 16px; border-radius: var(--r-full);
  transition: color .2s, background .2s; white-space: nowrap;
}
.nav-link:hover { color: var(--c-accent); }
.nav-link.active { color: var(--c-accent); background: var(--c-soft); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-burger {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--c-soft); border: 1px solid var(--c-border);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 26px; border-radius: var(--r-full);
  font-size: .92rem; font-weight: 700; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  color: #fff; background: var(--c-hero); background-size: 200% 200%;
  box-shadow: var(--shadow-accent);
  animation: gradShift 6s ease infinite;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px var(--c-glow); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-secondary { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-card-border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--c-ink-2); border-color: transparent; }
.btn-ghost:hover { color: var(--c-accent); background: var(--c-soft); }
.btn-soft { background: var(--c-soft); color: var(--c-accent); border-color: var(--c-border); }
.btn-soft:hover { background: var(--c-border); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .85rem; }
.btn-xsm { min-height: 30px; padding: 0 12px; font-size: .78rem; border-radius: var(--r-sm, 8px); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }
@keyframes gradShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(720px 480px at 12% 8%, var(--c-glow), transparent 60%),
    radial-gradient(640px 460px at 92% 82%, var(--c-glow), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-full); background: var(--c-surface); border: 1px solid var(--c-border); font-size: .8rem; font-weight: 600; box-shadow: var(--shadow-sm); animation: floaty 5s ease-in-out infinite; }
.hero-badge .live { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; position: relative; }
.hero-badge .live::after { content:''; position:absolute; inset:-4px; border-radius:50%; background:#22C55E; opacity:.4; animation: ring 2s infinite; }
.hero-badge.closed { border-color: #FECACA; background: #FEF2F2; color: #B91C1C; }
.hero-badge.closed .live { background: #DC2626; }
.hero-badge.closed .live::after { background: #DC2626; }
.hero h1 { margin: 22px 0 20px; }
.hero .lead { margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-visual { position: relative; }
.hero-card {
  background: var(--c-surface); border: 1px solid var(--c-card-border);
  border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
}
.hero-card .tutor-row { display: flex; gap: 16px; align-items: center; }
.hero-avatar {
  width: 72px; height: 72px; border-radius: 22px; flex-shrink: 0;
  background: var(--c-hero); display: grid; place-items: center;
  color: #fff; font-family: var(--font-h); font-weight: 800; font-size: 1.9rem;
  box-shadow: var(--shadow-accent);
}
.hero-card h3 { margin-bottom: 4px; }
.hero-card .role { font-size: .82rem; color: var(--c-ink-3); font-weight: 600; }
.rating-pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .78rem; font-weight: 700; color: var(--c-accent); }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-soft); border: 1px solid var(--c-border);
  color: var(--c-ink-2); font-size: .78rem; font-weight: 600;
  padding: 7px 13px; border-radius: var(--r-full);
}
.tag svg { width: 14px; height: 14px; stroke: var(--c-accent); }
.tag .tick { color: var(--c-accent); font-weight: 800; }

.hero-float {
  position: absolute; padding: 14px 18px; border-radius: var(--r-md);
  background: var(--c-surface); border: 1px solid var(--c-card-border);
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 12px;
  font-size: .84rem;
}
.hero-float.c1 { top: -18px; right: -8px; animation: floaty 5s ease-in-out .5s infinite; }
.hero-float.c2 { bottom: -22px; left: -12px; animation: floaty 5s ease-in-out 1.2s infinite; }
.hero-float .f-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--c-soft); display: grid; place-items: center; color: var(--c-accent); }
.hero-float .f-icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-float strong { display: block; font-size: .95rem; }
.hero-float small { color: var(--c-ink-3); font-size: .74rem; }

/* ============================================================
   SECTIONS / CARDS
   ============================================================ */
.section { padding: clamp(64px, 9vw, 110px) 0; position: relative; }
.section-alt { background: var(--c-soft); }
.section-line { background: linear-gradient(180deg, transparent, var(--c-soft) 18%, var(--c-soft) 82%, transparent); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
  background: var(--c-surface); border: 1px solid var(--c-card-border);
  border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--c-border); }
.icon-tile {
  width: 54px; height: 54px; border-radius: 15px; background: var(--c-soft);
  display: grid; place-items: center; margin-bottom: 20px; color: var(--c-accent);
  border: 1px solid var(--c-border);
}
.icon-tile svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .95rem; }

.num-big { font-family: var(--font-h); font-weight: 800; font-size: 2.2rem; color: var(--c-ink); }
.stat-num { font-family: var(--font-h); font-weight: 800; font-size: 2.6rem; background: var(--c-hero); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============================================================
   PRICING
   ============================================================ */
.pkg { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: visible; }
.pkg.featured { border: 2px solid var(--c-accent); box-shadow: var(--shadow-accent); transform: scale(1.03); }
.pkg.featured:hover { transform: scale(1.03) translateY(-6px); }
.pkg-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--c-hero); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 7px 18px; border-radius: var(--r-full); box-shadow: var(--shadow-accent); white-space: nowrap; }
.pkg-price { font-family: var(--font-h); font-weight: 800; font-size: 2rem; margin: 14px 0 2px; }
.pkg-old { font-size: 1.1rem; font-weight: 600; color: var(--c-ink-3); text-decoration: line-through; text-decoration-thickness: 2px; margin-right: 10px; vertical-align: middle; }
.pkg-sub { color: var(--c-ink-3); font-size: .84rem; font-weight: 600; }
.pkg-note { display: inline-block; color: var(--c-accent); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; background: color-mix(in srgb, var(--c-accent) 10%, transparent); padding: 3px 10px; border-radius: var(--r-full); }
.checks { list-style: none; margin: 20px 0 26px; display: grid; gap: 11px; }
.checks li { display: flex; gap: 10px; font-size: .9rem; color: var(--c-ink-2); align-items: flex-start; }
.checks .ck { width: 20px; height: 20px; border-radius: 50%; background: var(--c-soft); color: var(--c-accent); display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: .7rem; }

/* ============================================================
   VIDEO / TESTIMONIAL / OTHER
   ============================================================ */
.vid-wrap { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--r-lg); overflow: hidden; background: #0b0b0e; box-shadow: var(--shadow-lg); border: 1px solid var(--c-card-border); }
.vid-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.plan-band { background: var(--c-hero); border-radius: var(--r-xl); padding: clamp(36px,6vw,64px); color: #fff; box-shadow: var(--shadow-accent); position: relative; overflow: hidden; text-align: center; }
.plan-band::after { content:''; position:absolute; top:-40%; right:-10%; width: 340px; height: 340px; background: rgba(255,255,255,.12); border-radius: 50%; }
.plan-band h2, .plan-band p { color: #fff; position: relative; z-index: 1; }
.plan-band p { opacity: .9; }
.plan-band .btn { background: #fff; color: var(--c-accent); margin-top: 26px; position: relative; z-index: 1; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.plan-band .btn:hover { transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--c-border); background: var(--c-surface); padding: 44px 0 38px; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--c-ink-2); transition: color .2s; }
.footer a:hover { color: var(--c-accent); }
.footer .muted { color: var(--c-ink-3); font-size: .88rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer .mini-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #00e5ff, #7c3aed, #f472b6); display: grid; place-items: center; color: #fff; font-weight: 900; font-family: var(--font-h); font-size: .85rem; box-shadow: 0 0 10px rgba(124,58,237,.4), 0 0 20px rgba(0,229,255,.2); }

/* ============================================================
   THEME WIDGET (floating icon + dropdown)
   ============================================================ */
#theme-widget { position: relative; z-index: 9999; }
#theme-widget.floating { position: fixed; top: 22px; left: 22px; }
#theme-widget.in-nav { display: flex; align-items: center; }
.theme-toggle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--c-surface); border: 1.5px solid var(--c-card-border);
  box-shadow: var(--shadow-md); display: grid; place-items: center;
  color: var(--c-ink); transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
}
#theme-widget.in-nav .theme-toggle {
  width: 40px; height: 40px; box-shadow: var(--shadow-sm);
}
#theme-widget.in-nav .theme-toggle svg { width: 20px; height: 20px; }
#theme-widget.in-nav .theme-dot { bottom: 6px; right: 6px; width: 9px; height: 9px; }
.theme-toggle:hover { transform: scale(1.12) rotate(15deg); box-shadow: var(--shadow-lg); }
.theme-toggle svg { width: 23px; height: 23px; }
.theme-dot { position: absolute; bottom: 8px; right: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--c-accent); border: 2px solid var(--c-surface); transition: background .3s; }
.theme-pop {
  position: absolute; top: calc(100% + 12px); left: 0; width: 224px; padding: 14px;
  background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px) scale(.96);
  pointer-events: none; transition: opacity .25s, transform .25s cubic-bezier(.22,1,.36,1);
}
.theme-pop.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.theme-pop-title { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--c-ink-3); margin-bottom: 10px; }
.theme-opt { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: none; background: none; border-radius: 10px; transition: background .15s; }
.theme-opt:hover { background: var(--c-soft); }
.theme-swatch { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(0,0,0,.05); }
.theme-opt.active .theme-swatch { box-shadow: 0 0 0 2.5px var(--c-surface), 0 0 0 4.5px var(--c-accent); }
.theme-opt span { font-size: .86rem; font-weight: 600; color: var(--c-ink-2); }
.theme-opt.active span { color: var(--c-accent); }

/* ============================================================
   DASHBOARD / PORTAL
   ============================================================ */
.dash-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
@supports (min-height: 100dvh) { .dash-shell { min-height: 100dvh; } }
.sidebar { background: var(--c-surface); border-right: 1px solid var(--c-border); padding: 26px 18px; position: sticky; top: 0; align-self: start; height: auto; min-height: 100vh; max-height: 100vh; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; display: flex; flex-direction: column; }
@supports (min-height: 100dvh) { .sidebar { min-height: 100dvh; max-height: 100dvh; } }
.side-nav { display: grid; gap: 4px; margin: 34px 0 auto; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--c-ink-2); transition: all .2s; }
.side-link svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.side-link:hover { background: var(--c-soft); color: var(--c-accent); }
.side-link.active { background: var(--c-hero); color: #fff; box-shadow: var(--shadow-accent); }
.dash-main { padding: 34px; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: var(--r-md);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat .s-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--c-soft); display: grid; place-items: center; color: var(--c-accent); margin-bottom: 14px; }
.stat .s-ic svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat small { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); }
.stat .num { font-family: var(--font-h); font-weight: 800; font-size: 1.9rem; margin-top: 4px; }

.panel { background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }

.table { width: 100%; border-collapse: collapse; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table th, .table td { padding: 14px 16px; text-align: left; font-size: .9rem; border-bottom: 1px solid var(--c-border); }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); background: var(--c-soft); }
.table td { color: var(--c-ink-2); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--c-soft); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: var(--r-full); font-size: .74rem; font-weight: 700; }
.badge-ok { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.badge-warn { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.badge-acc { background: var(--c-soft); color: var(--c-accent); border: 1px solid var(--c-border); }

.tool-row { display: flex; align-items: center; gap: 18px; padding: 20px; text-decoration: none; border-radius: var(--r-lg); border: 1px solid var(--c-card-border); background: var(--c-surface); box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; }
.tool-row:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--c-border); }
.tool-row .t-ic { width: 50px; height: 50px; border-radius: 14px; background: var(--c-soft); display: grid; place-items: center; color: var(--c-accent); }
.tool-row .t-ic svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-row strong { color: var(--c-ink); display: block; }
.tool-row p { font-size: .82rem; color: var(--c-ink-3); }

.portal-hero { background: var(--c-hero); background-size: 200% 200%; animation: gradShift 8s ease infinite; border-radius: var(--r-xl); padding: clamp(32px,6vw,52px); color: #fff; box-shadow: var(--shadow-accent); position: relative; overflow: hidden; margin-bottom: 26px; }
.portal-hero::after { content:''; position:absolute; top:-40%; right:-12%; width: 320px; height: 320px; background: rgba(255,255,255,.12); border-radius: 50%; }
.portal-hero h1, .portal-hero p { color: #fff; position: relative; z-index: 1; }
.portal-hero p { opacity: .92; }
.portal-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 26px; position: relative; z-index: 1; }
.p-stat { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-md); padding: 18px; backdrop-filter: blur(8px); }
.p-stat small { color: rgba(255,255,255,.8); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.p-stat strong { display: block; font-family: var(--font-h); font-size: 1.5rem; margin-top: 4px; color: #fff; }

.muted { color: var(--c-ink-3); text-align: center; padding: 26px; font-size: .9rem; }

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; background: var(--c-bg); position: relative; overflow: hidden; }
.auth-wrap::before { content:''; position:absolute; inset:0; background: radial-gradient(600px 420px at 10% 0%, var(--c-glow), transparent 60%), radial-gradient(560px 400px at 95% 100%, var(--c-glow), transparent 60%); }
.auth-box { position: relative; width: min(440px, 100%); background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: var(--r-xl); padding: 40px; box-shadow: var(--shadow-lg); animation: popIn .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fg { margin-bottom: 18px; }
.fg label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 7px; }
.field { width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-md); border: 1.5px solid var(--c-card-border); background: var(--c-surface); font-size: .95rem; color: var(--c-ink); transition: border-color .2s, box-shadow .2s; font-family: var(--font); }
.field:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px var(--c-glow); }
.field::placeholder { color: var(--c-ink-3); }
.msg { min-height: 22px; font-size: .88rem; font-weight: 700; margin: 8px 0; }
.msg.err { color: #E11D48; }
.msg.ok { color: #059669; }

/* ============================================================
   AUTH SPLIT (BEFORE LOGIN)
   ============================================================ */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
@supports (min-height: 100dvh) { .auth-shell { min-height: 100dvh; } }
.auth-panel {
  position: relative; overflow: hidden; color: #fff; padding: 52px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--c-hero); background-size: 200% 200%; animation: gradShift 10s ease infinite;
}
.auth-panel::before { content:''; position:absolute; top:-22%; right:-18%; width: 480px; height: 480px; background: rgba(255,255,255,.14); border-radius: 50%; }
.auth-panel::after { content:''; position:absolute; bottom:-14%; left:-10%; width: 360px; height: 360px; background: rgba(255,255,255,.10); border-radius: 50%; }
.auth-panel > * { position: relative; z-index: 1; }
.auth-panel .brand-sub { color: rgba(255,255,255,.75); }
.auth-panel h1 { color: #fff; font-size: clamp(2rem,4.4vw,3.4rem); margin: 28px 0 18px; }
.auth-panel p.big { color: rgba(255,255,255,.9); font-size: 1.08rem; max-width: 460px; line-height: 1.7; }
.auth-proof { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 44px; }
.auth-proof .pp { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-md); padding: 16px; backdrop-filter: blur(8px); }
.auth-proof .pp strong { display: block; font-family: var(--font-h); font-size: 1.5rem; }
.auth-proof .pp small { color: rgba(255,255,255,.82); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.auth-side { display: grid; place-items: center; padding: 40px 24px; background: var(--c-bg); position: relative; }

/* ============================================================
   DASHBOARD TOPBAR (AFTER LOGIN)
   ============================================================ */
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px; margin-bottom: 26px; flex-wrap: wrap;
  background: var(--c-surface); border: 1px solid var(--c-card-border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.dash-topbar .tb-title h2 { font-size: 1.5rem; }
.dash-topbar .tb-title .eyebrow { margin-bottom: 8px; }
.tb-search { position: relative; }
.tb-search input {
  width: min(300px, 60vw); height: 44px; padding: 0 44px 0 44px; border-radius: var(--r-full);
  border: 1.5px solid var(--c-card-border); background: var(--c-soft); color: var(--c-ink); font-family: var(--font); font-size: .9rem;
}
.tb-search input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px var(--c-glow); background: var(--c-surface); }
.tb-search .s-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--c-ink-3); }
.tb-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--c-card-border);
  background: var(--c-surface); display: grid; place-items: center; color: var(--c-ink-2); transition: all .2s;
}
.icon-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; border: 2px solid var(--c-surface); }
.avatar {
  width: 44px; height: 44px; border-radius: 13px; background: var(--c-hero); color: #fff;
  display: grid; place-items: center; font-family: var(--font-h); font-weight: 800; font-size: 1.05rem; cursor: pointer; border: none; box-shadow: var(--shadow-accent);
}
.tb-actions .tb-user { display: flex; align-items: center; gap: 12px; }
.tb-actions .tb-user .nm { text-align: left; line-height: 1.2; }
.tb-actions .tb-user .nm strong { display: block; font-family: var(--font-h); font-size: .92rem; }
.tb-actions .tb-user .nm small { color: var(--c-ink-3); font-size: .78rem; font-weight: 600; }

/* Dropdown menus (notifications / profile) */
.drop-wrap { position: relative; }
.drop-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 320px; z-index: 60;
  background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 10px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: all .22s;
}
.drop-wrap.open .drop-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.drop-menu.wide { width: 340px; }
.drop-head { padding: 10px 12px; border-bottom: 1px solid var(--c-border); margin-bottom: 6px; font-family: var(--font-h); font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; }
.drop-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.drop-item:hover { background: var(--c-soft); }
.drop-item .di-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--c-soft); display: grid; place-items: center; color: var(--c-accent); flex-shrink: 0; }
.drop-item .di-ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-item strong { font-size: .88rem; display: block; }
.drop-item small { color: var(--c-ink-3); font-size: .78rem; }
.drop-item p { font-size: .8rem; margin-top: 2px; }
.drop-menu.menu .drop-item { align-items: center; }
.avatar-big { width: 56px; height: 56px; border-radius: 16px; background: var(--c-hero); color: #fff; display: grid; place-items: center; font-family: var(--font-h); font-weight: 800; font-size: 1.4rem; }

/* KPI card with sparkline + trend */
.stat .trend { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800; margin-top: 6px; padding: 3px 9px; border-radius: var(--r-full); }
.trend.up { background: #ECFDF5; color: #059669; }
.trend.down { background: #FEF2F2; color: #DC2626; }
.stat .spark { margin-top: 12px; height: 34px; }
.stat .spark svg { width: 100%; height: 100%; }

/* PROGRESS RING (student level) */
.ring-wrap { display: inline-flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 96px; height: 96px; }
.ring svg { transform: rotate(-90deg); width: 96px; height: 96px; }
.ring .bg-ring { stroke: var(--c-soft); }
.ring .fg-ring { stroke: var(--c-accent); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.22,1,.36,1); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-h); font-weight: 800; font-size: 1.3rem; }
.ring-wrap .rl { max-width: 200px; }
.ring-wrap .rl strong { font-family: var(--font-h); font-size: 1.05rem; display: block; }
.ring-wrap .rl small { color: var(--c-ink-3); font-size: .82rem; }

/* TIMELINE (lesson history) */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--c-border); }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item .tl-dot { position: absolute; left: -26px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--c-surface); border: 4px solid var(--c-accent); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item strong { font-size: .94rem; display: block; }
.tl-item small { color: var(--c-ink-3); font-size: .8rem; }
.tl-item p { font-size: .86rem; margin-top: 4px; }

/* CHECKLIST (homework) */
.check-list { display: grid; gap: 12px; }
.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--c-card-border); border-radius: var(--r-md); background: var(--c-surface); }
.check-item input[type=checkbox] { accent-color: var(--c-accent); width: 20px; height: 20px; margin-top: 2px; cursor: pointer; }
.check-item .ci-body { flex: 1; }
.check-item .ci-body strong { font-size: .92rem; display: block; }
.check-item .ci-body small { color: var(--c-ink-3); }
.check-item.done .ci-body strong { text-decoration: line-through; color: var(--c-ink-3); }

/* GOOGLE + divider for auth */
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--c-ink-3); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.auth-divider::before, .auth-divider::after { content:''; flex: 1; height: 1px; background: var(--c-border); }
.btn-google {
  width: 100%; min-height: 50px; background: #fff; color: #2B2B2B; border: 1.5px solid var(--c-card-border);
  font-weight: 700; border-radius: var(--r-full); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--shadow-sm); transition: all .2s; text-decoration: none;
}
.btn-google:hover { border-color: #4285F4; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-google svg { width: 20px; height: 20px; }

/* ACTIVITY FEED */
.act-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--c-border); align-items: flex-start; }
.act-item:last-child { border-bottom: none; }
.act-item .a-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--c-soft); display: grid; place-items: center; color: var(--c-accent); flex-shrink: 0; }
.act-item .a-ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.act-item .a-body { flex: 1; }
.act-item .a-body strong { font-size: .9rem; }
.act-item .a-body p { font-size: .82rem; margin-top: 1px; }
.act-item .a-time { font-size: .74rem; color: var(--c-ink-3); white-space: nowrap; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes floaty { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.4; } }
@keyframes ring { 0%{ transform: scale(.8); opacity:.5; } 100%{ transform: scale(2.2); opacity:0; } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-36px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal-right { opacity: 0; transform: translateX(36px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal-left.in, .reveal-right.in { opacity: 1; transform: translateX(0); }
.stagger > * { transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal,.reveal-left,.reveal-right{ opacity:1; transform:none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { max-width: 480px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { padding: 32px 26px; }
  .auth-panel .auth-proof { display: none; }
  .nav-menu {
    position: fixed; top: 92px; left: 8px; right: 8px;
    padding: 16px 14px 18px; max-height: calc(100dvh - 120px); overflow-y: auto;
    background: var(--c-surface);
    flex-direction: column; align-items: stretch; gap: 4px;
    border: 1px solid var(--c-border); border-radius: 20px;
    box-shadow: 0 24px 60px rgb(0 0 0 / .22);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform .3s, opacity .3s;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { width: 100%; font-size: 1.05rem; padding: 13px 14px; border-radius: 12px; }
  .nav-link.active { background: var(--c-soft); }
  .nav-cta .btn-cta-nav { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 820px) {
  .dash-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; z-index: 60; height: auto; border-right: none;
    border-bottom: 1px solid var(--c-border); border-radius: 0;
    padding: 10px 14px 8px; flex-direction: column;
  }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; flex-shrink: 0; }
  .sidebar .brand .brand-mark { width: 38px; height: 38px; }
  .sidebar .brand .brand-name { font-size: 1.05rem; }
  .sidebar .brand .brand-sub { font-size: .74rem; }
  .sidebar > div:last-child { display: none; }
  .side-nav { display: flex; flex-direction: row; flex-wrap: nowrap; margin: 0; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 2px 8px; align-items: center; }
  .side-nav::-webkit-scrollbar { height: 4px; }
  .side-nav::-webkit-scrollbar-thumb { background: var(--c-soft); border-radius: 8px; }
  .side-nav::-webkit-scrollbar-track { background: transparent; }
  .side-link { font-size: .84rem; padding: 11px 14px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--c-card-border); flex: 0 0 auto; }
  .side-link.active { box-shadow: none; }
  .side-link svg { width: 17px; height: 17px; }
  .side-nav .btn { white-space: nowrap; flex: 0 0 auto; }
  .dash-main { padding: 20px 16px; }
  .dash-top { flex-direction: column; align-items: stretch; gap: 14px; }
  .dash-top > div:last-child .btn { flex: 1 1 auto; justify-content: center; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .dash-topbar { padding: 12px 14px; }
  .dash-topbar .tb-actions .tb-search { display: none; }
  .panel { padding: 22px 18px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats, .portal-stats { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .stat { padding: 16px; }
  .stat .num { font-size: 1.5rem; }
  .stat .s-ic { width: 38px; height: 38px; margin-bottom: 10px; }
  .p-stat { padding: 14px; }
  .p-stat strong { font-size: 1.15rem; }
  .dash-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; height: auto; border-right: none; border-bottom: 1px solid var(--c-border); border-radius: 0; padding: 8px 12px 6px; flex-direction: column; }
  .sidebar .brand { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; flex-shrink: 0; }
  .sidebar .brand .brand-mark { width: 34px; height: 34px; }
  .sidebar .brand .brand-name { font-size: .98rem; }
  .sidebar .brand .brand-sub { font-size: .7rem; }
  .sidebar > div:last-child { display: none; }
  .side-nav { display: flex; flex-direction: row; flex-wrap: nowrap; margin: 0; gap: 7px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 2px 6px; align-items: center; }
  .side-nav::-webkit-scrollbar { height: 4px; }
  .side-nav::-webkit-scrollbar-thumb { background: var(--c-soft); border-radius: 8px; }
  .side-nav::-webkit-scrollbar-track { background: transparent; }
  .side-link { font-size: .8rem; padding: 10px 13px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--c-card-border); flex: 0 0 auto; }
  .dash-main { padding: 16px 12px; }
  .dash-top { flex-direction: column; align-items: stretch; gap: 14px; }
  .dash-top > div:last-child { flex-direction: column; align-items: stretch; }
  .dash-top > div:last-child .btn { width: 100%; justify-content: center; }
  .panel { padding: 18px 14px; }
  .panel-head { align-items: flex-start; }
  .portal-hero { padding: 26px 20px; }
  .portal-hero > div:first-child { flex-direction: column; align-items: flex-start; }
  .ring-wrap { width: 100%; justify-content: flex-start; }
  .dash-topbar { padding: 12px 14px; }
  .tb-actions .tb-user .nm { display: none; }
  .drop-menu { position: fixed; left: 12px; right: 12px; width: auto; top: 74px; }
  .hero-float.c1 { right: 4px; }
  .hero-float.c2 { left: 4px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }

  /* Phone-safe: collapse the pre-login showcase hero into a compact brand strip
     so the login/portal form is immediately visible (no tall empty hero). */
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel {
    padding: 14px 18px; display: flex; flex-direction: row; align-items: center;
    gap: 12px; min-height: 0; justify-content: flex-start;
  }
  .auth-panel .brand-sub, .auth-panel h1, .auth-panel p.big, .auth-panel .auth-proof { display: none; }
  .auth-panel .brand { margin: 0; }
  .auth-side { padding: 28px 16px; }
  .auth-box { padding: 26px 20px; }
}

/* ---- Phone safety: never allow stray wide children to cause sideways scroll ---- */
html, body { overflow-x: hidden; }
.dash-main, .dash-main > *, .panel, .panel > *, .auth-side, .auth-box, main, section, article, .hero-grid, .hero-visual, .hero-card { max-width: 100%; min-width: 0; }

/* ---- Reveal-animation safety: on small/narrow screens the scroll-entrance
   transforms (translateX/Y + opacity) can fail to finish on phones, leaving
   content shifted/squished and the page overflowing sideways. On phones they
   are always shown fully in place instead. ---- */
@media (max-width: 900px) {
  .reveal, .reveal-left, .reveal-right,
  .reveal.in, .reveal-left.in, .reveal-right.in {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ---- Older-browser fallbacks (phones without color-mix / backdrop-filter / dvh) ---- */
.bk-ok-check { background: rgba(5,150,105,.12); }
.bk-type-btn.is-active { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-accent); }
.p-stat { background: rgba(255,255,255,.2); }
.auth-proof .pp { background: rgba(255,255,255,.2); }
.sidebar { height: auto; min-height: 0; }

@media (max-width: 480px) {
  .hero-float, .ring-wrap { display: none; }
  .auth-panel .brand-mark { width: 32px; height: 32px; }
}

/* ============ Booking page: toasts ============ */
.bk-toast-wrap {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 1400; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.bk-toast {
  pointer-events: auto; background: var(--c-ink); color: #fff;
  padding: 12px 20px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: bkToastIn .22s ease; line-height: 1.4;
}
.bk-toast.ok { background: #065F46; }
.bk-toast.err { background: #9F1239; }
@keyframes bkToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============ Booking page: confirm modal ============ */
.bk-overlay {
  position: fixed; inset: 0; z-index: 1250; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.55); padding: 20px;
}
.bk-overlay[hidden] { display: none; }
.bk-modal {
  background: var(--c-surface); color: var(--c-ink); border-radius: 20px;
  width: 100%; max-width: 440px; padding: 26px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-card-border); text-align: center;
}
.bk-modal h3 { margin: 0; font-size: 1.25rem; }
.bk-modal .bk-sub { color: var(--c-ink-3); font-size: .9rem; margin: 6px 0 0; }
.bk-sum { display: grid; gap: 8px; margin: 20px 0 4px; text-align: left; }
.bk-sum > div {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: baseline;
  font-size: .92rem; padding: 11px 14px; background: var(--c-soft);
  border-radius: 12px; border: 1px solid var(--c-card-border);
}
.bk-sum .muted { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-3); }
.bk-sum b { color: var(--c-ink); font-weight: 700; line-height: 1.5; }
.bk-type { margin-top: 18px; text-align: left; }
.bk-type .seg { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.bk-type .seg .btn { flex: 1 1 auto; white-space: nowrap; }
.bk-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.bk-actions .btn { min-width: 120px; }
.bk-note { font-size: .78rem; color: var(--c-ink-3); margin-top: 13px; line-height: 1.55; }

/* ---- compact confirm dialog ---- */
.bk-modal.bk-compact { max-width: 400px; padding: 0; text-align: left; overflow: hidden; }
.bk-confirm { display: flex; flex-direction: column; padding: 20px 20px 18px; }
.bk-confirm-head { position: relative; text-align: center; padding: 2px 26px 12px; }
.bk-confirm-head .bk-close-x { position: absolute; top: -8px; right: -8px; }
.bk-confirm-head h3 { font-size: 1.15rem; }
.bk-confirm-head p { margin: 4px 0 0; font-size: .8rem; color: var(--c-ink-3); line-height: 1.45; }
.bk-close-x {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; font: inherit;
  background: var(--c-soft); color: var(--c-ink-3); font-size: .85rem;
}
.bk-close-x:hover { background: var(--c-border); color: var(--c-ink); }
.bk-ok-check {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%;
  background: color-mix(in srgb, #059669 12%, transparent); color: #059669;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 900;
}
.bk-loading { text-align: center; color: var(--c-ink-3); font-size: .9rem; padding: 16px 0; }

.bk-sum2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  border: 1px solid var(--c-card-border); border-radius: 14px;
  padding: 12px; margin: 4px 0 14px; background: var(--c-surface);
}
.bk-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-cell .muted { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.bk-cell b { font-size: .9rem; line-height: 1.3; color: var(--c-ink); }
.bk-cell small { font-size: .74rem; color: var(--c-ink-3); }
.bk-cell .bk-plantext { font-size: .8rem; font-weight: 600; color: var(--c-ink-2); }

.bk-type-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; margin-bottom: 16px; }
.bk-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 6px; cursor: pointer; font: inherit; text-align: center;
  border: 1.5px solid var(--c-card-border); border-radius: 12px;
  background: var(--c-surface); color: var(--c-ink); transition: all .15s;
}
.bk-type-btn:hover { border-color: var(--c-accent); }
.bk-type-btn.is-active { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 18%, transparent); }
.bk-type-l { font-size: .78rem; font-weight: 700; }
.bk-type-d { font-size: .68rem; color: var(--c-ink-3); }
.bk-type-btn.is-active .bk-type-d { color: var(--c-accent); }

@media (max-width: 420px) {
  .bk-sum2 { grid-template-columns: 1fr; }
}

/* ============ My Bookings ============ */
.bk-books-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px;
  background: var(--c-soft); border: 1px solid var(--c-card-border); border-radius: 14px;
}
.bk-btab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; cursor: pointer;
  padding: 9px 18px; border-radius: 10px; font-size: .85rem; font-weight: 700;
  color: var(--c-ink-3); font-family: inherit; transition: all .18s cubic-bezier(.22,1,.36,1);
}
.bk-btab-cnt {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px;
  background: color-mix(in srgb, var(--c-ink-3) 22%, transparent); color: var(--c-ink-2);
  font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.bk-btab.is-on { background: var(--c-accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--c-accent) 32%, transparent); }
.bk-btab.is-on .bk-btab-cnt { background: rgba(255,255,255,.25); color: #fff; }

.bk-books-list { display: flex; flex-direction: column; gap: 10px; }
.bk-book {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 14px 18px;
  border: 1.5px solid var(--c-card-border); border-radius: 16px;
  background: var(--c-surface); box-shadow: 0 2px 10px rgb(0 0 0 / .03);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.bk-book:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgb(0 0 0 / .08); border-color: color-mix(in srgb, var(--c-accent) 30%, var(--c-card-border)); }
.bk-book-dot {
  position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px;
  background: var(--c-accent);
}
.bk-book.is-cancelled .bk-book-dot { background: var(--c-ink-3); }
.bk-book.is-past { opacity: .82; }
.bk-book.is-cancelled { opacity: .7; box-shadow: none; }
.bk-book-ic {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
  background: color-mix(in srgb, var(--c-accent) 14%, var(--c-surface));
}
.bk-book.is-cancelled .bk-book-ic { background: var(--c-soft); filter: grayscale(.4); opacity: .7; }
.bk-book-main { flex: 1; min-width: 0; }
.bk-book-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bk-book-top strong { font-size: 1rem; color: var(--c-ink); line-height: 1.25; }
.bk-book-when { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; color: var(--c-ink-2); font-size: .86rem; font-weight: 600; }
.bk-book-when svg { width: 14px; height: 14px; color: var(--c-ink-3); flex-shrink: 0; }
.bk-book-when svg + span { white-space: nowrap; }
.bk-book-when svg ~ svg { margin-left: 4px; }

.bk-stat { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.bk-stat-ok { color: #059669; background: color-mix(in srgb, #059669 12%, transparent); border: 1px solid color-mix(in srgb, #059669 28%, transparent); }
.bk-stat-pend { color: #B45309; background: color-mix(in srgb, #B45309 12%, transparent); border: 1px solid color-mix(in srgb, #B45309 28%, transparent); }
.bk-stat-canc { color: var(--c-ink-3); background: var(--c-soft); border: 1px solid var(--c-card-border); }

.bk-book-cancel {
  flex: 0 0 auto; border: 1.5px solid var(--c-card-border); background: transparent; cursor: pointer;
  color: #DC2626; font-size: .8rem; font-weight: 700; font-family: inherit;
  padding: 9px 16px; border-radius: 10px; transition: all .15s;
}
.bk-book-cancel:hover { background: #DC2626; border-color: #DC2626; color: #fff; }

.bk-books-empty {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 36px 20px; text-align: center; color: var(--c-ink-3);
  border: 1.5px dashed var(--c-card-border); border-radius: 16px;
}
.bk-books-empty-ic { font-size: 2rem; margin-bottom: 6px; }
.bk-books-empty strong { font-size: 1rem; color: var(--c-ink-2); }
.bk-books-empty p { margin: 4px 0 0; font-size: .85rem; }

@media (max-width: 520px) {
  .bk-book { flex-wrap: wrap; padding: 14px; }
  .bk-book-cancel { width: 100%; }
}

/* ============ Booking page: week calendar ============ */
.bk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0 6px; }
.bk-day {
  border: 1px solid var(--c-card-border); border-radius: 16px;
  background: var(--c-surface); padding: 10px 8px; min-width: 0;
  transition: transform .2s, box-shadow .2s;
}
.bk-day:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.bk-day.today { border-color: var(--c-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 25%, transparent); background: color-mix(in srgb, var(--c-accent) 4%, var(--c-surface)); }
.bk-day-head { text-align: center; padding: 2px 0 8px; border-bottom: 2px solid var(--c-card-border); margin-bottom: 8px; }
.bk-day-head .dw { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3); }
.bk-day-head .dd { font-size: 1.1rem; font-weight: 900; margin-top: 2px; color: var(--c-ink); }
.bk-day.today .bk-day-head { border-bottom-color: var(--c-accent); }
.bk-day.today .bk-day-head .dd { color: var(--c-accent); }
.bk-slot { display: block; width: 100%; margin: 4px 0; border-radius: 10px; font-size: .82rem; font-weight: 700; padding: 7px 6px; text-align: center; background: color-mix(in srgb, var(--c-accent) 10%, transparent); color: var(--c-accent); border: 1px solid color-mix(in srgb, var(--c-accent) 25%, transparent); transition: all .15s; }
.bk-slot:hover { background: var(--c-accent); color: #fff; transform: scale(1.04); box-shadow: 0 4px 12px var(--c-glow); }
.bk-slot.is-past { opacity: .35; pointer-events: none; background: var(--c-soft); color: var(--c-ink-3); border-color: var(--c-card-border); }
.bk-day .bk-empty { font-size: .76rem; color: var(--c-ink-3); text-align: center; padding: 14px 0 6px; font-style: italic; }

/* ============ Agenda (two-pane) time picker ============ */
.bk-agenda {
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 16px;
  margin: 16px 0 6px;
  background: var(--c-card-bg, var(--c-surface));
  border: 1.5px solid var(--c-card-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 34px rgb(0 0 0 / .06);
}
.bk-ago-days {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}
.bk-ago-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 8px;
  border: 1.5px solid var(--c-card-border);
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  transition: all .18s cubic-bezier(.22,1,.36,1);
  width: 100%;
}
.bk-ago-day:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--c-accent) 45%, transparent); background: color-mix(in srgb, var(--c-accent) 5%, transparent); }
.bk-ago-day.is-active {
  border-color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--c-accent) 20%, transparent);
}
.bk-ago-day:disabled { opacity: .5; cursor: default; }
.bk-ago-day:disabled:hover { transform: none; background: transparent; border-color: var(--c-card-border); }
.bk-ago-dw { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--c-ink-3); }
.bk-ago-day.today .bk-ago-dw { color: var(--c-accent); }
.bk-ago-dn { font-size: 1.25rem; font-weight: 900; color: var(--c-ink); line-height: 1; }
.bk-ago-day.today .bk-ago-dn { color: var(--c-accent); }
.bk-ago-dc { font-size: .62rem; font-weight: 700; color: var(--c-ink-3); }
.bk-ago-day.is-active .bk-ago-dc { color: var(--c-accent); }

.bk-ago-panel { min-width: 0; display: flex; flex-direction: column; }
.bk-ago-panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 2px solid var(--c-card-border);
}
.bk-ago-panel-head strong { font-size: 1.15rem; font-weight: 900; color: var(--c-ink); }
.bk-ago-panel-count { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3); }
.bk-ago-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  align-content: start;
}
.bk-ago-time {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 10px;
  border: 1.5px solid color-mix(in srgb, var(--c-accent) 30%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--c-accent) 7%, var(--c-surface));
  cursor: pointer; font: inherit;
  transition: all .18s cubic-bezier(.22,1,.36,1);
}
.bk-ago-time:hover {
  border-color: var(--c-accent);
  background: var(--c-accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--c-accent) 30%, transparent);
}
.bk-ago-time:hover .bk-ago-clock,
.bk-ago-time:hover .bk-ago-dur { color: #fff; }
.bk-ago-clock { font-size: 1.15rem; font-weight: 900; color: var(--c-accent); }
.bk-ago-dur { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); }
.bk-ago-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; }

@media (max-width: 720px) {
  .bk-agenda { grid-template-columns: 1fr; }
  .bk-ago-days { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .bk-ago-day { width: 96px; flex: 0 0 auto; }
  .bk-ago-times { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ============ Cal.com-style booking card ============ */
.bk-cal {
  display: grid; grid-template-columns: 260px 1fr;
  border: 1px solid var(--c-border, #e5e7eb);
  border-radius: 16px; overflow: hidden;
  background: var(--c-surface, #fff);
  box-shadow: 0 14px 44px rgb(0 0 0 / .10);
  max-width: 900px; margin: 0 auto 8px;
}
.bk-cal-side {
  background: color-mix(in srgb, var(--c-soft, #f6f6f6) 60%, var(--c-surface, #fff));
  border-right: 1px solid var(--c-border, #e5e7eb);
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.bk-cal-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  overflow: hidden; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent, #0b3b2c); color: #fff; font-weight: 900; font-size: 1.1rem;
}
.bk-cal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bk-cal-avatar span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.bk-cal-who { margin: 2px 0 0; font-size: .8rem; color: var(--c-ink-3, #6b7280); font-weight: 600; }
.bk-cal-title { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.15; color: var(--c-ink, #111); }
.bk-cal-meta { display: flex; align-items: center; gap: 6px; color: var(--c-ink-3, #6b7280); font-size: .86rem; font-weight: 600; margin-top: -6px; }
.bk-cal-select { min-height: 20px; margin-top: -6px; }
.bk-cal-events { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bk-cal-events-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3, #6b7280); margin-bottom: 2px; }
.bk-cal-event {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--c-border, #e5e7eb); border-radius: 10px;
  background: var(--c-surface, #fff); color: var(--c-ink, #111); font: inherit;
  transition: all .15s cubic-bezier(.22,1,.36,1);
}
.bk-cal-event:hover { border-color: var(--c-accent, #0b3b2c); background: color-mix(in srgb, var(--c-accent) 5%, var(--c-surface)); }
.bk-cal-event.is-active { border-color: var(--c-accent, #0b3b2c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 20%, transparent); }
.bk-cal-event-name { flex: 1; font-weight: 700; font-size: .86rem; }
.bk-cal-event-dur { font-size: .76rem; color: var(--c-ink-3, #6b7280); font-weight: 600; }
.bk-cal-event-arrow { width: 14px; height: 14px; color: var(--c-ink-3, #9ca3af); flex-shrink: 0; }
.bk-cal-powered { margin-top: auto; padding-top: 14px; font-size: .72rem; color: var(--c-ink-3, #9ca3af); }

.bk-cal-main { display: flex; flex-direction: column; min-width: 0; }
.bk-cal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 14px 18px 6px;
}
.bk-cal-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-cal-body { padding: 10px 18px 18px; }
.bk-cal-caption { font-size: .95rem; font-weight: 700; color: var(--c-ink, #111); padding: 6px 0 10px; }

.bk-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.bk-chip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 62px; padding: 9px 8px; cursor: pointer;
  border: 1.5px solid var(--c-border, #e5e7eb); border-radius: 10px;
  background: var(--c-surface, #fff); color: var(--c-ink, #111); font: inherit;
  transition: all .15s cubic-bezier(.22,1,.36,1);
}
.bk-chip:hover { border-color: var(--c-accent, #0b3b2c); }
.bk-chip.is-selected { border-color: var(--c-accent, #0b3b2c); background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 18%, transparent); }
.bk-chip.today .bk-chip-wd { color: var(--c-accent, #0b3b2c); }
.bk-chip.empty { opacity: .45; cursor: default; }
.bk-chip.empty:hover { border-color: var(--c-border, #e5e7eb); }
.bk-chip-wd { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3, #6b7280); }
.bk-chip-d { font-size: 1.15rem; font-weight: 800; line-height: 1.1; }
.bk-chip-n { font-size: .62rem; font-weight: 700; color: var(--c-ink-3, #9ca3af); }
.bk-chip.is-selected .bk-chip-n { color: var(--c-accent, #0b3b2c); }

.bk-times-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 0 10px; border-top: 1px solid var(--c-border, #eef0f2); }
.bk-times-date { font-size: .92rem; font-weight: 800; color: var(--c-ink, #111); }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.bk-time {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; cursor: pointer; font: inherit;
  border: 1.5px solid var(--c-border, #e5e7eb); border-radius: 10px;
  background: var(--c-surface, #fff); color: var(--c-ink, #111);
  transition: all .15s cubic-bezier(.22,1,.36,1);
}
.bk-time:hover { border-color: var(--c-accent, #0b3b2c); background: color-mix(in srgb, var(--c-accent) 7%, var(--c-surface)); transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--c-accent) 18%, transparent); }
.bk-time-h { font-size: .98rem; font-weight: 800; }
.bk-time-sub { font-size: .72rem; color: var(--c-ink-3, #6b7280); font-weight: 600; }
.bk-empty2 { grid-column: 1 / -1; text-align: center; padding: 36px 0; }

@media (max-width: 720px) {
  .bk-cal { grid-template-columns: 1fr; }
  .bk-cal-side { border-right: 0; border-bottom: 1px solid var(--c-border, #e5e7eb); padding: 18px 16px; }
  .bk-cal-body { padding: 8px 14px 16px; }
  .bk-times { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}



/* ============ Booking page: toolbar + month calendar ============ */
.bk-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 18px 0 6px;
}
.bk-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.bk-mid { display: flex; gap: 6px; }
.bk-mid .btn { border-radius: 10px; font-weight: 700; }
.bk-mode {
  display: inline-flex; padding: 4px; gap: 3px; border-radius: 14px;
  background: var(--c-soft); border: 1px solid var(--c-card-border);
}
.bk-mode-btn {
  border: 0; background: transparent; cursor: pointer; padding: 8px 20px;
  border-radius: 11px; font-size: .84rem; font-weight: 700; color: var(--c-ink-3);
  transition: all .25s cubic-bezier(.22,1,.36,1);
}
.bk-mode-btn.is-on {
  background: var(--c-accent); color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--c-accent) 35%, transparent);
}
.bk-mode-btn:not(.is-on):hover { color: var(--c-ink); background: var(--c-surface); }

.bk-month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 5px; margin: 14px 0 6px;
}
.bk-wd {
  text-align: center; font-size: .66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3);
  padding: 6px 0 8px;
}
.bk-mcell { min-height: 68px; }
.bk-mbtn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 100%; height: 100%; min-height: 68px; padding: 8px 4px;
  border: 1.5px solid var(--c-card-border); border-radius: 14px;
  background: var(--c-surface); cursor: default; font: inherit;
  transition: all .2s cubic-bezier(.22,1,.36,1);
}
.bk-mbtn:disabled { opacity: .5; }
.bk-mbtn:disabled .bk-dn { opacity: .5; }
.bk-mcell.has .bk-mbtn {
  cursor: pointer; border-color: color-mix(in srgb, var(--c-accent) 35%, transparent);
  background: color-mix(in srgb, var(--c-accent) 3%, var(--c-surface));
}
.bk-mcell.has .bk-mbtn:hover {
  transform: translateY(-3px);
  border-color: var(--c-accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--c-accent) 18%, transparent);
  background: color-mix(in srgb, var(--c-accent) 6%, var(--c-surface));
}
.bk-mcell.today .bk-mbtn {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 20%, transparent);
  background: color-mix(in srgb, var(--c-accent) 5%, var(--c-surface));
}
.bk-dn {
  font-size: .92rem; font-weight: 900; color: var(--c-ink); line-height: 1;
}
.bk-dn.past { color: var(--c-ink-3); opacity: .6; }
.bk-mcell.today .bk-dn { color: var(--c-accent); }
.bk-pills { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.bk-mini {
  font-size: .6rem; font-weight: 700; color: var(--c-ink);
  background: var(--c-soft); border: 1px solid var(--c-card-border);
  border-radius: 8px; padding: 2px 5px; line-height: 1.3;
}
.bk-mcell.has .bk-mini { color: var(--c-accent); border-color: color-mix(in srgb, var(--c-accent) 30%, transparent); background: color-mix(in srgb, var(--c-accent) 10%, transparent); }
.bk-mini.bk-more { color: var(--c-ink-3); border-color: var(--c-card-border); background: transparent; }
.bk-blank { visibility: hidden; }

.bk-day-card {
  margin-top: 16px; border: 1.5px solid var(--c-card-border);
  border-radius: 18px; background: var(--c-surface); padding: 18px 20px;
  box-shadow: 0 12px 40px rgb(0 0 0 / .1);
  animation: bkSlideUp .3s cubic-bezier(.22,1,.36,1);
}
@keyframes bkSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.bk-day-card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 2px solid var(--c-card-border);
}
.bk-day-card-head strong { font-size: 1.05rem; font-weight: 800; }
.bk-dslot-list { display: grid; gap: 8px; }
.bk-dslot {
  display: flex; align-items: center; gap: 14px; width: 100%;
  border: 1.5px solid var(--c-card-border); border-radius: 14px; padding: 14px 16px;
  background: var(--c-surface); cursor: pointer; font: inherit; text-align: left;
  transition: all .2s cubic-bezier(.22,1,.36,1);
}
.bk-dslot:hover {
  border-color: var(--c-accent); transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--c-accent) 15%, transparent);
  background: color-mix(in srgb, var(--c-accent) 4%, var(--c-surface));
}
.bk-dslot.is-past { opacity: .45; cursor: default; pointer-events: none; }
.bk-dt { font-size: 1.1rem; font-weight: 900; color: var(--c-ink); min-width: 88px; }
.bk-dm { font-size: .82rem; color: var(--c-ink-3); flex: 1; }
.bk-dtag {
  font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-ink-3); padding: 5px 12px; border-radius: 10px; border: 1.5px solid var(--c-card-border);
}
.bk-dtag.bk-ok { color: var(--c-accent); border-color: color-mix(in srgb, var(--c-accent) 40%, transparent); background: color-mix(in srgb, var(--c-accent) 10%, transparent); }

@media (max-width: 900px) {
  .bk-week { grid-template-columns: repeat(7, minmax(88px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}
@media (max-width: 480px) {
  .bk-mode-btn { padding: 8px 14px; font-size: .8rem; }
  .bk-mcell { min-height: 58px; }
  .bk-mbtn { min-height: 58px; padding: 6px 2px; gap: 3px; border-radius: 12px; }
  .bk-wd { font-size: .58rem; }
  .bk-dt { min-width: 64px; font-size: .95rem; }
  .bk-dm { display: none; }
  .bk-day-card { padding: 14px; border-radius: 14px; }
}

/* ===== Qualifications / Certificates ===== */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cert-card { text-align: center; }
.cert-card .icon-tile { margin-left: auto; margin-right: auto; }
.cert-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.cert-card p { margin: 0 0 14px; font-size: 0.92rem; color: var(--c-ink-2, #4B5563); }
.cert-year {
  display: inline-block; font-size: 0.82rem; font-weight: 800;
  padding: 5px 14px; border-radius: 999px;
  background: var(--c-soft, #F9FAFB); color: var(--c-accent, #4F46E5);
  border: 1px solid var(--c-border, #E5E7EB);
}
@media (max-width: 900px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } }

/* ============ Admin Inbox ============ */
.bk-inbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.bk-inbox-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-inbox-tabs {
  display: inline-flex; gap: 2px; padding: 4px; margin: 18px 0 12px;
  border-radius: 999px; background: var(--c-soft, #F9FAFB);
  border: 1px solid var(--c-card-border, #E5E7EB);
}
.bk-tab {
  border: 0; background: transparent; cursor: pointer; padding: 8px 16px;
  border-radius: 999px; font-size: .84rem; font-weight: 700; color: var(--c-ink-3, #6B7280);
  transition: background .18s, color .18s, box-shadow .18s; font-family: var(--font, inherit);
}
.bk-tab.is-on {
  background: var(--c-surface, #fff); color: var(--c-accent, #0b3b2c);
  box-shadow: 0 1px 4px rgb(0 0 0 / .12);
}
.bk-inbox-search {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 9px 13px; border: 1px solid var(--c-card-border, #E5E7EB);
  border-radius: 12px; background: var(--c-surface, #fff); color: var(--c-ink-3, #6B7280);
  max-width: 360px;
}
#inbox-wrap {
  display: grid; gap: 18px; grid-template-columns: minmax(260px, 320px) 1fr;
  align-items: stretch;
}
#inbox-side {
  border: 1px solid var(--c-card-border, #E5E7EB); border-radius: 14px;
  overflow: hidden; background: var(--c-surface, #fff);
  display: flex; flex-direction: column; max-height: 620px;
}
#inbox-list { flex: 1; overflow-y: auto; min-height: 200px; }
#inbox-thread {
  border: 1px solid var(--c-card-border, #E5E7EB); border-radius: 14px;
  display: flex; flex-direction: column; min-height: 460px; justify-content: center;
  background: var(--c-surface, #fff); overflow: hidden;
}
.inbox-row {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 14px; border-bottom: 1px solid var(--c-card-border, #E5E7EB);
  cursor: pointer; transition: background .15s;
}
.inbox-row:hover { background: color-mix(in srgb, var(--c-accent, #0b3b2c) 5%, transparent); }
.inbox-row.active { background: color-mix(in srgb, var(--c-accent, #0b3b2c) 9%, transparent); }
.inbox-ava {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .86rem;
  background: linear-gradient(135deg, var(--c-hero, #0b3b2c), var(--c-accent, #0b3b2c));
}
.inbox-row.guest .inbox-ava { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.inbox-main { flex: 1; min-width: 0; }
.inbox-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inbox-top strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-top time { font-size: .68rem; color: var(--c-ink-3, #6B7280); flex-shrink: 0; }
.inbox-prev {
  font-size: .78rem; color: var(--c-ink-3, #6B7280); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inbox-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.inbox-tag {
  font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; color: #6366f1;
  background: #eef2ff; border: 1px solid #e0e7ff;
}
.inbox-unread {
  background: #e5484d; color: #fff; border-radius: 12px; font-size: .68rem; font-weight: 800;
  padding: 2px 8px; flex-shrink: 0;
}
.inbox-del {
  background: transparent; border: 0; cursor: pointer; color: var(--c-ink-3, #9ca3af);
  padding: 4px; border-radius: 8px; line-height: 0;
}
.inbox-del:hover { color: #e5484d; background: rgb(229 72 77 / .1); }
.inbox-thread-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--c-card-border, #E5E7EB);
}
.inbox-thread-head .inbox-ava { width: 34px; height: 34px; font-size: .78rem; }
.inbox-thread-head strong { font-size: .94rem; }
.inbox-thread-head .muted { font-size: .78rem; }
.inbox-thread-meta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
#admin-thread-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.bk-bubble {
  align-self: flex-start; max-width: 82%; background: var(--c-surface, #fff);
  color: var(--c-ink, #111); padding: 9px 12px; border-radius: 12px;
  font-size: .86rem; white-space: pre-wrap; border: 1px solid var(--c-card-border, #E5E7EB);
}
.bk-bubble.mine { align-self: flex-end; background: var(--c-hero, #0b3b2c); color: #fff; border-color: transparent; }
.bk-bubble.guest { border-style: dashed; border-color: #c7d2fe; }
.bk-bubble .bk-btime { display: block; font-size: .64rem; opacity: .55; margin-top: 4px; }
.inbox-replybar {
  display: flex; gap: 8px; border-top: 1px solid var(--c-card-border, #E5E7EB); padding: 12px;
}
.inbox-replybar .field { margin: 0; }
.inbox-no { padding: 26px; text-align: center; }
.bk-contact-card {
  border: 1px solid var(--c-card-border, #E5E7EB); border-radius: 13px;
  padding: 14px 16px; margin-bottom: 10px; background: var(--c-surface, #fff);
}
.bk-contact-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-contact-head strong { font-size: .95rem; }
.bk-contact-msg { font-size: .86rem; color: var(--c-ink-2, #4B5563); margin-top: 8px; white-space: pre-wrap; }
.bk-contact-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.bk-contact-mail { font-size: .8rem; color: var(--c-accent, #0b3b2c); font-weight: 600; text-decoration: none; }
.badge-soft { font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--c-soft, #F9FAFB); color: var(--c-ink-3, #6B7280); border: 1px solid var(--c-card-border, #E5E7EB); }
@media (max-width: 900px) {
  #inbox-wrap { grid-template-columns: 1fr; }
  #inbox-side { max-height: 320px; }
  #inbox-search { max-width: 100%; }
  .bk-inbox-head { flex-direction: column; }
}

/* ============ Ad zones ============ */
.ad-zone { width: 100%; margin: 22px 0; overflow: hidden; }
.ad-zone > .adsbygoogle { display: block; min-height: 60px; }
.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--c-border, #dfe3e8); background: var(--c-soft, #fff1e8);
  border-radius: 12px; min-height: 70px; padding: 12px; text-align: center;
}
.ad-ph { font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink-3, #9ca3af); }
.ad-zone.ad-inline { margin: 26px 0 30px; }
.ad-zone.ad-footer { margin: 8px 0 0; }
.ad-zone.ad-mobile { width: 100%; margin: 0; }
.ad-zone.ad-mobile .ad-placeholder { border-radius: 0; border-left: 0; border-right: 0; min-height: 56px; }
@media (min-width: 821px) { .ad-zone.ad-mobile { display: none; } }

/* ============ Ads control (admin) ============ */
.zone-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--c-ink-2, #5B4F45); cursor: pointer; white-space: nowrap; }
.zone-toggle input { width: 17px; height: 17px; accent-color: var(--c-accent, #E8724A); cursor: pointer; }
.zone-card { background: var(--c-surface, #fff); border: 1px solid var(--c-border, #e5e7eb); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.zone-card:has(input[type="checkbox"]:checked) { border-color: var(--c-accent, #E8724A); }
.zone-card .zone-code { resize: vertical; min-height: 66px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .78rem; line-height: 1.5; color: var(--c-ink, #333); background: var(--c-soft, #faf7f3); }
.zone-card .zone-code::placeholder { font-family: var(--font), sans-serif; font-size: .78rem; color: var(--c-ink-3, #9ca3af); }
.zone-tag { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; color: var(--c-accent, #E8724A); background: color-mix(in srgb, var(--c-accent, #E8724A) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent, #E8724A) 30%, transparent); white-space: nowrap; }
.zone-loc { font-size: .72rem; font-weight: 600; color: var(--c-ink-3, #9ca3af); }

/* Visual site preview (Google-Ads-style placement map) */
#zone-preview { border: 1px solid var(--c-border, #e5e7eb); border-radius: 14px; overflow: hidden; background: #eef1f5; }
.ads-prev-browser { background: var(--c-surface, #fff); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md, 0 10px 30px rgba(0,0,0,.12)); }
.ads-prev-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--c-soft, #f3f4f6); border-bottom: 1px solid var(--c-border, #e5e7eb); }
.ads-prev-bar i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #FCA5A5; }
.ads-prev-bar i:nth-child(2){ background:#FCD34D; } .ads-prev-bar i:nth-child(3){ background:#86EFAC; }
.ads-prev-bar .ads-prev-url { margin-left: 10px; flex: 1; background: #fff; border: 1px solid var(--c-border,#e5e7eb); border-radius: 999px; font-size: .68rem; color: var(--c-ink-3,#6b7280); padding: 4px 10px; }
.ads-prev-site { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ads-prev-nav { display: flex; gap: 6px; }
.ads-prev-nav span { width: 36px; height: 7px; border-radius: 4px; background: #d1d5db; }
.ads-prev-row { display: flex; gap: 12px; align-items: stretch; }
.ads-prev-main { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ads-prev-side { width: 78px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.ads-prev-h { height: 12px; border-radius: 4px; background: #e5e7eb; }
.ads-prev-h.w60{width:60%;} .ads-prev-h.w80{width:80%;} .ads-prev-h.w40{width:40%;}
.ads-prev-ad { border: 2px dashed #F5A623; background: color-mix(in srgb, #F5A623 14%, #fff); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; color: #b45309; font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-align: center; }
.ads-prev-ad.g { border-color: #10B981; background: color-mix(in srgb, #10B981 12%, #fff); color: #065F46; }
.ads-prev-ad .adx { font-size: .7rem; font-weight: 900; }
.ads-prev-label { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-3,#6b7280); margin-bottom: 2px; }

/* Google-Ads-style placement map legends + zone chips */
.ads-prev-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.ads-leg { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; color: var(--c-ink-2,#444); }
.ads-leg .sw { width: 11px; height: 11px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.ads-leg .sw.g { background: #10B981; } .ads-leg .sw.y { background: #F5A623; } .ads-leg .sw.off { background: #e5e7eb; }
.ads-slot { display: flex; flex-direction: column; gap: 4px; margin: 2px 0; }
.ads-slot .ads-prev-ad { padding: 6px; font-size: .6rem; }
.ads-slot-meta { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ads-slot-meta strong { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-2,#444); }
.ads-slot-meta span { font-size: .6rem; color: #94a3b8; font-weight: 600; }
.ads-slot.off { opacity: .55; }
.ads-prev-mobile { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--c-border,#e5e7eb); padding-top: 12px; }

/* ============ Dashboard mobile hardening (prevents clipped / cut-off content) ============ */
@media (max-width: 820px) {
  .dash-main, .dash-main > *, .panel, .panel > * { max-width: 100%; }
  .dash-main > * { min-width: 0; }
  /* Panels scroll horizontally IN PLACE instead of stretching the page (fixes "half page" cutoff) */
  .panel, .panel > .table-responsive, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel table, .table { width: auto; min-width: 100%; border-collapse: collapse; }
  /* Prevent the vertical single-character wrapping bug: keep cells on one logical line
     with a usable minimum column width; the whole table scrolls horizontally IN PLACE. */
  .table th, .table td { white-space: nowrap; word-break: normal; overflow-wrap: normal; min-width: 130px; }
  /* Only genuinely long free-text columns (goals, emails, package names) may wrap at word
     boundaries instead of forcing a very wide horizontal scroll. Applied by column index. */
  #roster-table th:nth-child(2), #roster-table td:nth-child(2),
  #roster-table th:nth-child(4), #roster-table td:nth-child(4),
  #revenue table th:nth-child(2), #revenue table td:nth-child(2),
  .soft-col-3 th:nth-child(3), .soft-col-3 td:nth-child(3) { white-space: normal; word-break: normal; overflow-wrap: break-word; min-width: 160px; max-width: 340px; }
  #roster-table th:nth-child(6), #roster-table td:nth-child(6) { min-width: 110px; }
  /* data grids/rows must shrink within the phone */
  .grid-2, .grid-3, .grid-4, .stats, .portal-stats { min-width: 0; }
  .dash-top, .panel-head, .tool-row { min-width: 0; }
  /* horizontal flex toolbars/rows must wrap instead of overflowing */
  .tool-row, .panel-head, .dash-topbar, .tb-actions, .inbox-top,
  .side-nav, .zone-row, .bk-actions, .btn-row { flex-wrap: wrap !important; }
  .tool-row > *, .panel-head > *, .dash-topbar > *, .tb-actions > * { max-width: 100%; }
  /* comfortable, readable phone text for dashboard content (no stretching) */
  .dash-main .panel h3 { font-size: 1.08rem; }
  .dash-main .panel, .dash-main .panel p, .dash-main .panel li, .dash-main .panel td,
  .dash-main .panel th, .dash-main .panel small, .dash-main .panel .muted { line-height: 1.55; }
  .dash-main .num { font-size: 1.6rem; }
}

/* ============ Ads zone cards: clean stacked mobile layout ============ */
@media (max-width: 640px) {
  .zone-card { grid-template-columns: 1fr; padding: 12px; }
  .zone-card > div[style] { flex-wrap: wrap; }
  .zone-card .field[data-zone-slot] { min-width: 0 !important; flex-basis: 100% !important; }
  .zone-card .zone-loc { width: 100%; }
  #zone-cards { grid-template-columns: 1fr !important; }
  #zone-preview { overflow-x: auto; }
  .ads-prev-site { min-width: 320px; }
  /* ads view header + button stack cleanly */
  #monet-view > div[style] { align-items: flex-start !important; }
}

/* ============ Ads control: modern card headers ============ */
.zone-card { background: var(--c-surface, #fff); border: 1px solid var(--c-card-border, #e5e7eb); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; transition: border-color .2s, box-shadow .2s; }
.zone-card:has(input[type="checkbox"]:checked) { border-color: var(--c-accent, #E8724A); box-shadow: 0 0 0 3px var(--c-glow, rgba(232,114,74,.15)); }
.zone-toggle b { font-size: .92rem; }
.zone-tag { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--c-soft, #f3f4f6); color: var(--c-ink-2, #444); padding: 3px 8px; border-radius: 999px; }
.zone-loc { font-size: .72rem; font-weight: 600; color: var(--c-ink-3, #9ca3af); }

/* ============ Ads & SEO control: SEO panel ============ */
.seo-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--c-soft, #f8fafc); border: 1px solid var(--c-card-border, #e5e7eb); border-radius: 10px; padding: 10px 14px; font-size: .85rem; font-weight: 600; }
.seo-file .btn { flex: 0 0 auto; }
#seo-health-list td { font-size: .83rem; }
#seo-health-list .ok { color: #059669; font-weight: 700; }
#seo-health-list .warn { color: #D97706; font-weight: 700; }
.seo-kw-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--c-soft, #f3f4f6); border: 1px solid var(--c-card-border, #e5e7eb); border-radius: 999px; padding: 4px 12px; font-size: .76rem; font-weight: 600; margin: 4px 6px 0 0; }

/* Visitor Activity breakdown cards (Ads & SEO panel) */
.dist-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dist-card { background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.dist-card h4 { font-size: .85rem; margin: 0 0 6px; letter-spacing: .02em; }
.dist-list { display: flex; flex-direction: column; gap: 10px; }
.dist-row { display: block; }
.dist-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .78rem; margin-bottom: 4px; }
.dist-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; }
.dist-top b { font-size: .76rem; font-weight: 700; }
.dist-bar { height: 7px; background: var(--c-soft, #eef2f7); border-radius: 999px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-accent, #2563eb), var(--c-accent2, #0ea5e9)); opacity: .85; }
@media (max-width: 900px) { .dist-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .dist-cols { grid-template-columns: 1fr; gap: 12px; } }


/* Ads & SEO view: jump bar between the header and the Ads panel */
.jump-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(110, 43, 178, .18);
  border-radius: 12px;
  background: rgba(110, 43, 178, .06);
}
.jump-nav-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--c-ink-2, #6b7280);
  white-space: nowrap;
}
.jump-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 43, 178, .22);
  background: rgba(255, 255, 255, .8);
  color: #6E2BB2;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.jump-nav-link:hover,
.jump-nav-link:focus {
  background: #6E2BB2;
  color: #fff;
}
.jump-nav-link:active { transform: translateY(1px); }
@media (max-width: 640px) {
  .jump-nav { padding: 10px; }
  .jump-nav-link { padding: 5px 10px; font-size: .75rem; }
}

/* Defensive: monet-view content stays visible once shown.
   NOTE: no display:block !important on the containers themselves - that would
   override showView()'s hide/show (inline display:none cannot beat !important). */
#monet-view { visibility: visible !important; }
#monet-view * { visibility: visible !important; }
#monet-panel { visibility: visible !important; }
#monet-panel .grid-2 { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 22px !important; }
#monet-panel .zone-card { display: grid !important; }
@media (max-width: 900px) {
  #monet-panel .grid-2 { grid-template-columns: 1fr !important; }
}

/* Ads AI manager panel (admin) */
.ai-card { background: var(--c-surface, #fff); border: 1px solid var(--c-card-border, #e5e7eb); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .82rem; }
.tbl th, .tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--c-card-border, #eee3da); vertical-align: top; }
.tbl th { color: var(--c-ink-3, #9ca3af); font-weight: 600; }
.ai-line { font-size: .82rem; line-height: 1.55; margin: 3px 0; }
.ai-line pre, .ai-log pre { margin: 6px 0; white-space: pre-wrap; word-break: break-all; font-size: .78rem; }
.ai-line.ai-ok { color: #059669; font-weight: 600; }
.ai-line.ai-err { color: #DC2626; font-weight: 600; }
.ai-line.ai-info { color: var(--c-ink-2, #4b5563); }

/* Ads AI key-status note (admin) */
.ai-key-note { font-size: .76rem; color: var(--c-ink-2, #4b5563); margin: 6px 0 0; }
.ai-key-note.on { color: #059669; }

/* Modern Dashboard - Ads Hub + Link Shortener (admin) */
.hub-band-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.hub-band-head b { font-family: var(--font-h); font-size: .9rem; }
.hub-band-head span { font-size: .74rem; color: var(--c-ink-3); }
.kpi-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-tile { background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.kpi-tile:hover { border-color: var(--c-accent); box-shadow: var(--shadow-md); }
.kpi-tile small { display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3); }
.kpi-tile b { display: block; font-family: var(--font-h); font-size: 1.35rem; color: var(--c-ink); margin-top: 4px; letter-spacing: -.02em; }
.kpi-tile.accent b { color: var(--c-accent); }
.kpi-tile span { font-size: .72rem; color: var(--c-ink-3); }
.kpi-tile.empty b { color: var(--c-ink-3); font-size: .95rem; }

.tools-grid > * { min-width: 0; }
.tool-card { background: var(--c-surface); border: 1px solid var(--c-card-border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm); display: grid; gap: 10px; }
.tool-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.tool-head .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--c-soft); color: var(--c-accent); flex-shrink: 0; }
.tool-head b { font-size: .9rem; color: var(--c-ink); display: block; }
.tool-head span { font-size: .74rem; color: var(--c-ink-3); display: block; }

.tool-fold { border: 1px solid var(--c-card-border); border-radius: 16px; background: var(--c-surface); margin-top: 14px; overflow: hidden; }
.tool-fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; font-size: .88rem; color: var(--c-ink); }
.tool-fold summary::-webkit-details-marker { display: none; }
.tool-fold summary::marker { content: ''; }
.tool-fold .chev { margin-left: auto; transition: transform .25s; color: var(--c-ink-3); flex-shrink: 0; }
.tool-fold[open] summary .chev { transform: rotate(180deg); }
.tool-fold .tool-fold-body { padding: 0 18px 16px; }

.sl-hero { background: linear-gradient(180deg, var(--c-soft, #fff1e8), var(--c-surface, #fff)); border: 1px solid var(--c-card-border); border-radius: 18px; padding: 22px; margin-bottom: 16px; }
.sl-input-row { display: flex; gap: 10px; }
.sl-input-row .field { flex: 1; min-width: 0; font-size: 1rem; }
.sl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.sl-opts label { display: block; font-size: .76rem; font-weight: 700; color: var(--c-ink-2); margin-bottom: 6px; }
.sl-code-row { display: flex; gap: 8px; align-items: center; }
.sl-prefix { font-family: var(--font-h); font-weight: 800; color: var(--c-accent); font-size: .95rem; white-space: nowrap; }
.sl-preview { font-size: .82rem; color: var(--c-accent); font-weight: 700; margin-top: 6px; word-break: break-all; min-height: 1em; }
.sl-result { margin-top: 16px; padding: 14px 16px; border: 1px solid #A7F3D0; background: #ECFDF5; border-radius: 14px; }
.sl-result .lbl { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #059669; margin-bottom: 6px; }
.sl-result-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sl-msg { font-size: .85rem; font-weight: 700; margin-bottom: 10px; }
.sl-msg.err { color: #DC2626; }
.sl-msg.ok { color: #059669; }

.sl-list { display: grid; gap: 10px; }
.sl-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--c-card-border); border-radius: 14px; background: var(--c-surface); transition: border-color .2s, box-shadow .2s; }
.sl-row:hover { border-color: var(--c-accent); box-shadow: var(--shadow-sm); }
.sl-row-main { flex: 1; min-width: 0; }
.sl-row-short { font-family: var(--font-h); font-weight: 800; font-size: .95rem; color: var(--c-accent); word-break: break-all; }
.sl-row-target { font-size: .76rem; color: var(--c-ink-3); word-break: break-all; margin-top: 2px; line-height: 1.4; }
.sl-row-label { font-size: .72rem; margin-top: 4px; }
.sl-row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sl-row-stats { text-align: right; flex-shrink: 0; min-width: 50px; }
.sl-row-clicks { font-family: var(--font-h); font-weight: 800; font-size: 1.15rem; color: var(--c-ink); }
.sl-row-stat-lbl { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); font-weight: 700; }
.sl-empty { padding: 18px; text-align: center; border: 1px dashed var(--c-card-border); border-radius: 14px; background: var(--c-surface); }

@media (max-width: 640px) {
  .kpi-band { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tools-grid { grid-template-columns: 1fr !important; }
  .sl-opts { grid-template-columns: 1fr; gap: 12px; }
  .sl-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .sl-row-stats { text-align: left; display: flex; gap: 8px; align-items: center; }
}