/* ============================================================
   Nami AI Agent — Interactive Walkthrough
   Light theme · brand sky-blue from the academy logo
   ============================================================ */

:root {
  /* Brand */
  --brand:        #4FA8E0;   /* logo sky blue */
  --brand-400:    #6FBBE9;
  --brand-500:    #4FA8E0;
  --brand-600:    #2F8BCB;
  --brand-700:    #1E6FA8;
  --brand-soft:   #E8F4FC;
  --brand-softer: #F3F9FE;

  /* Ink / neutrals */
  --ink:        #14233D;
  --ink-2:      #33455F;
  --muted:      #6B7A90;
  --line:       #E3EAF2;
  --line-soft:  #EEF2F7;

  /* Surfaces */
  --bg:         #F4F8FC;
  --bg-2:       #EAF1F8;
  --card:       #FFFFFF;

  /* Accents */
  --green:      #1FA855;   /* whatsapp-ish */
  --green-soft: #E7F7ED;
  --amber:      #E0922F;
  --amber-soft: #FCF1E0;
  --rose:       #DC4B5A;
  --rose-soft:  #FCE9EB;
  --violet:     #7A5AF0;
  --violet-soft:#EEEAFD;

  /* WhatsApp chat */
  --wa-bg:        #E5DDD4;
  --wa-bubble-in: #FFFFFF;
  --wa-bubble-out:#DCF8C6;
  --wa-header:    #008069;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20,35,61,.06), 0 1px 3px rgba(20,35,61,.05);
  --shadow:    0 6px 20px rgba(20,35,61,.08), 0 2px 6px rgba(20,35,61,.05);
  --shadow-lg: 0 24px 60px rgba(20,35,61,.16), 0 8px 20px rgba(20,35,61,.08);

  --maxw: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);

  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 6px; }

.jp { font-family: "Noto Sans JP", var(--font); }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar[hidden] { display: none; }
.topbar__logo { height: 30px; width: auto; border-radius: 6px; }
.topbar__back {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 7px 13px 7px 9px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: .18s var(--ease);
}
.topbar__back:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-softer); }
.topbar__nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.topbar__nav button {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: .18s var(--ease);
}
.topbar__nav button:hover { color: var(--ink); background: var(--bg-2); }
.topbar__nav button[aria-current="true"] { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }

/* ============================================================
   App container / view transitions
   ============================================================ */
.app { min-height: calc(100vh - 0px); }
.view { animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ============================================================
   LANDING — "Who's watching"
   ============================================================ */
.landing {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 22px 64px;
  background:
    radial-gradient(1200px 560px at 50% -8%, var(--brand-soft) 0%, rgba(232,244,252,0) 60%),
    radial-gradient(900px 500px at 100% 110%, #EAF7F0 0%, rgba(234,247,240,0) 55%),
    var(--bg);
  position: relative; overflow: hidden;
}
.landing::before {
  /* subtle wave motif */
  content: ""; position: absolute; inset: auto 0 0 0; height: 220px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220'><path fill='%234FA8E0' fill-opacity='0.05' d='M0,120 C240,40 480,200 720,120 C960,40 1200,200 1440,120 L1440,220 L0,220 Z'/></svg>") no-repeat center bottom / cover;
  pointer-events: none;
}
.landing__logo { height: 56px; width: auto; margin-bottom: 26px; border-radius: 10px; box-shadow: var(--shadow); animation: floatIn .7s var(--ease); }
.landing__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-soft); border: 1px solid #D5EAF9;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.landing__kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.landing h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(30px, 5vw, 52px); margin: 0 0 10px; text-align: center; color: var(--ink);
}
.landing h1 .accent { color: var(--brand-600); }
.landing__sub { color: var(--ink-2); font-size: clamp(15px,2.1vw,19px); max-width: 640px; text-align: center; margin: 0 0 44px; }

.profiles {
  display: grid; gap: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%; max-width: 940px; position: relative; z-index: 1;
}
.profile {
  background: transparent; border: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: floatIn .6s var(--ease) backwards;
}
.profile:nth-child(1){ animation-delay: .05s; }
.profile:nth-child(2){ animation-delay: .12s; }
.profile:nth-child(3){ animation-delay: .19s; }
.profile:nth-child(4){ animation-delay: .26s; }

.profile__avatar {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg);
  display: grid; place-items: center; position: relative;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  overflow: hidden;
}
.profile__avatar::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 0 var(--brand); transition: box-shadow .25s var(--ease);
}
.profile:hover .profile__avatar { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-lg); border-color: transparent; }
.profile:hover .profile__avatar::after { box-shadow: inset 0 0 0 3px var(--brand); }
.profile__avatar .ico { width: 46%; height: 46%; color: #fff; }
.profile__avatar .tint { position: absolute; inset: 0; opacity: .14; }
.profile__name { font-weight: 700; font-size: 18px; color: var(--ink-2); transition: color .2s var(--ease); }
.profile:hover .profile__name { color: var(--ink); }
.profile__role { font-size: 13px; color: var(--muted); margin-top: -8px; text-align: center; }

/* gradient tints per role */
.tint--admin   { background: linear-gradient(140deg, #2F8BCB, #1E6FA8); }
.tint--teacher { background: linear-gradient(140deg, #1FA855, #128a45); }
.tint--student { background: linear-gradient(140deg, #7A5AF0, #5b3fd6); }
.tint--about   { background: linear-gradient(140deg, #E0922F, #c9791a); }
.av--admin   { background: linear-gradient(140deg, #EAF3FB, #DCEEFA); }
.av--teacher { background: linear-gradient(140deg, #E7F7ED, #DBF1E3); }
.av--student { background: linear-gradient(140deg, #EFEAFD, #E6DEFB); }
.av--about   { background: linear-gradient(140deg, #FCF1E0, #FAE8CF); }

.landing__contact { position: relative; z-index: 1; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: floatIn .6s var(--ease) backwards; animation-delay: .32s; }
.landing__contact-label { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-700); }
.landing__contact-name { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.landing__contact-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.landing__contact-link { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; box-shadow: var(--shadow-sm); transition: .16s var(--ease); }
.landing__contact-link:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-softer); transform: translateY(-1px); }
.landing__contact-link svg { width: 15px; height: 15px; color: var(--brand-600); flex-shrink: 0; }

.landing__foot { margin-top: 30px; color: var(--muted); font-size: 13.5px; text-align: center; position: relative; z-index: 1; }
.landing__foot strong { color: var(--ink-2); }

@keyframes floatIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Shared POV scaffolding
   ============================================================ */
.pov { padding: 26px 0 80px; }
.pov__head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.pov__badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; letter-spacing: .03em;
}
.pov__badge--admin   { background: var(--brand-soft); color: var(--brand-700); }
.pov__badge--teacher { background: var(--green-soft); color: var(--green); }
.pov__badge--student { background: var(--violet-soft); color: var(--violet); }
.pov h2 { font-family: var(--display); font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.02em; margin: 10px 0 6px; }
.pov__lede { color: var(--ink-2); font-size: 16.5px; max-width: 720px; margin: 0; }

.pov__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; margin-top: 26px; }
@media (max-width: 960px){ .pov__grid { grid-template-columns: 1fr; } }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel__head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel__head .sub { color: var(--muted); font-size: 13px; margin-left: auto; }
.panel__body { padding: 18px; }

.note { color: var(--muted); font-size: 13.5px; }

/* Scenario rail (shared across POVs) */
.scenario {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--brand-softer), #fff);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-sm);
}
.scenario .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-700); }
.scenario .desc { color: var(--ink-2); font-size: 14.5px; }
.scenario .desc b { color: var(--ink); }
.scenario .spacer { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  transition: .18s var(--ease); white-space: nowrap;
}
.btn:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-softer); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn--green { background: var(--green); border-color: var(--green); color: #fff; }
.btn--green:hover { background: #128a45; border-color: #128a45; color:#fff; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--bg-2); color: var(--ink); border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--sm { padding: 7px 13px; font-size: 13px; }
.btn .ico { width: 17px; height: 17px; }

/* Badges / labels */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.tag--reschedule { background: var(--brand-soft); color: var(--brand-700); }
.tag--billing    { background: var(--amber-soft); color: var(--amber); }
.tag--complaint  { background: var(--rose-soft); color: var(--rose); }
.tag--general    { background: var(--bg-2); color: var(--ink-2); }
.tag--ai         { background: var(--violet-soft); color: var(--violet); }
.tag--green      { background: var(--green-soft); color: var(--green); }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 10px; user-select: none; }
.switch__track {
  width: 44px; height: 26px; border-radius: 999px; background: #CBD5E1; position: relative;
  transition: background .2s var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease);
}
.switch[data-on="true"] .switch__track { background: var(--green); }
.switch[data-on="true"] .switch__track::after { transform: translateX(18px); }
.switch__label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

/* ============================================================
   Phone frame + WhatsApp chat (Student POV)
   ============================================================ */
.phone {
  width: 360px; max-width: 100%; margin: 0 auto;
  background: #0d1b2a; border-radius: 38px; padding: 12px;
  box-shadow: var(--shadow-lg); position: relative;
}
.phone__notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 120px; height: 24px; background: #0d1b2a; border-radius: 0 0 16px 16px; z-index: 5; }
.phone__screen { background: var(--wa-bg); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; height: 620px; position: relative; }
.wa-bgimg { position:absolute; inset:0; opacity:.5; pointer-events:none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><circle cx='6' cy='6' r='1.2' fill='%23d8cfc4'/><circle cx='26' cy='20' r='1.2' fill='%23d8cfc4'/><circle cx='16' cy='34' r='1.2' fill='%23d8cfc4'/></svg>"); }

.wa-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: var(--wa-header); color: #fff;
  position: relative; z-index: 2;
}
.wa-head__av { width: 40px; height: 40px; border-radius: 50%; background: #fff; display:grid; place-items:center; overflow:hidden; flex-shrink: 0; }
.wa-head__av img { width: 100%; height: 100%; object-fit: cover; }
.wa-head__name { font-weight: 700; font-size: 15px; line-height: 1.1; }
.wa-head__status { font-size: 11.5px; opacity: .85; display:flex; align-items:center; gap:5px; }
.wa-head__status .dot { width:7px; height:7px; border-radius:50%; background:#9be7b4; }
.wa-head__lang { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.18); padding: 4px 9px; border-radius: 999px; font-weight: 600; }

.wa-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; scroll-behavior: smooth; }
.wa-day { align-self:center; background:#FFF6D6; color:#6b6a52; font-size:11px; padding:4px 12px; border-radius:8px; box-shadow: var(--shadow-sm); margin: 2px 0 6px; }

.bubble {
  max-width: 80%; padding: 7px 10px 8px; border-radius: 9px; font-size: 14px; line-height: 1.42;
  box-shadow: 0 1px .5px rgba(0,0,0,.13); position: relative; white-space: pre-wrap; word-wrap: break-word;
  animation: bubbleIn .28s var(--ease);
}
.bubble .meta { display:block; text-align:right; font-size:10.5px; color:#667781; margin-top:2px; }
.bubble--in  { align-self: flex-start; background: var(--wa-bubble-in); border-top-left-radius: 2px; }
.bubble--out { align-self: flex-end; background: var(--wa-bubble-out); border-top-right-radius: 2px; }
.bubble--out .meta { color:#5a8f63; }
.bubble--out .meta .tick { color:#34b7f1; font-weight:700; }
@keyframes bubbleIn { from { opacity:0; transform: translateY(6px) scale(.98);} to { opacity:1; transform:none; } }

.bubble .ai-flag { display:inline-flex; align-items:center; gap:3px; font-size:9.5px; font-weight:700; color:var(--violet); background:var(--violet-soft); padding:1px 6px 1px 5px; border-radius:999px; margin-bottom:4px; line-height:1.5; }
.bubble .ai-flag svg { width:10px; height:10px; flex-shrink:0; }

/* slot chips inside chat */
.slots { display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.slot {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  background:#fff; border:1px solid #d7e3d4; border-radius:8px; padding:8px 11px; font-size:13.5px; font-weight:600; color:var(--ink);
  transition:.15s var(--ease); text-align:left;
}
.slot:hover:not(:disabled){ border-color:var(--green); background:var(--green-soft); }
.slot:disabled{ opacity:.45; cursor:default; }
.slot .pick { font-size:11px; color:var(--green); font-weight:700; }

/* typing indicator */
.typing { align-self:flex-start; background:#fff; border-radius:9px; border-top-left-radius:2px; padding:10px 12px; box-shadow:0 1px .5px rgba(0,0,0,.13); display:inline-flex; gap:4px; }
.typing span { width:7px; height:7px; border-radius:50%; background:#9aa6b2; animation: blink 1.2s infinite; }
.typing span:nth-child(2){ animation-delay:.2s; } .typing span:nth-child(3){ animation-delay:.4s; }
@keyframes blink { 0%,60%,100%{ opacity:.3; transform:translateY(0);} 30%{ opacity:1; transform:translateY(-3px);} }

.wa-input { display:flex; align-items:center; gap:8px; padding:10px; background:#f0f0f0; position:relative; z-index:2; }
.wa-input__box { flex:1; background:#fff; border-radius:999px; padding:9px 14px; color:#8a949e; font-size:13.5px; border:1px solid #e4e4e4; }
.wa-input__send { width:40px; height:40px; border-radius:50%; background:var(--wa-header); border:none; display:grid; place-items:center; color:#fff; flex-shrink:0; }

/* language picker */
.langbar { display:flex; gap:8px; flex-wrap:wrap; }
.langbar button {
  border:1px solid var(--line); background:#fff; color:var(--ink-2); border-radius:999px;
  padding:8px 14px; font-weight:600; font-size:13.5px; transition:.15s var(--ease);
}
.langbar button:hover { border-color:var(--violet); color:var(--violet); background:var(--violet-soft); }
.langbar button[aria-pressed="true"]{ background:var(--violet); border-color:var(--violet); color:#fff; }

/* ============================================================
   Admin console
   ============================================================ */
.console { display:grid; grid-template-columns: 270px 1fr; min-height: 540px; }
@media (max-width: 720px){ .console { grid-template-columns: 1fr; } }
.console__list { border-right:1px solid var(--line-soft); background:var(--brand-softer); overflow-y:auto; max-height:560px; }
.console__search { padding:12px 14px; border-bottom:1px solid var(--line-soft); }
.console__search div { background:#fff; border:1px solid var(--line); border-radius:999px; padding:8px 14px; color:var(--muted); font-size:13px; display:flex; align-items:center; gap:8px; }
.convo { display:flex; gap:11px; padding:12px 14px; border-bottom:1px solid var(--line-soft); width:100%; text-align:left; background:transparent; border-left:3px solid transparent; transition:.15s var(--ease); }
.convo:hover { background:#fff; }
.convo[aria-current="true"]{ background:#fff; border-left-color:var(--brand); }
.convo__av { width:42px; height:42px; border-radius:50%; flex-shrink:0; display:grid; place-items:center; color:#fff; font-weight:700; font-size:15px; }
.convo__main { flex:1; min-width:0; }
.convo__top { display:flex; align-items:center; gap:6px; }
.convo__name { font-weight:700; font-size:14px; color:var(--ink); }
.convo__time { margin-left:auto; font-size:11px; color:var(--muted); }
.convo__preview { font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; }
.convo__tags { display:flex; gap:5px; margin-top:6px; }

.thread { display:flex; flex-direction:column; min-width:0; }
.thread__head { display:flex; align-items:center; gap:12px; padding:13px 18px; border-bottom:1px solid var(--line-soft); flex-wrap: wrap; }
.thread__head .nm { font-weight:700; }
.thread__head .meta2 { font-size:12px; color:var(--muted); }
.thread__ai { margin-left:auto; display:flex; align-items:center; gap:14px; }

.thread__summary { margin:14px 18px 4px; background:var(--violet-soft); border:1px solid #ddd5fb; border-radius:12px; padding:12px 14px; }
.thread__summary .h { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:800; color:var(--violet); text-transform:uppercase; letter-spacing:.05em; margin-bottom:5px; }
.thread__summary p { margin:0; font-size:13.5px; color:var(--ink-2); }

.thread__body { padding:14px 18px; display:flex; flex-direction:column; gap:9px; overflow-y:auto; max-height: 320px; background:var(--brand-softer); }
.msg { max-width:78%; padding:8px 12px; border-radius:12px; font-size:13.5px; line-height:1.4; box-shadow:var(--shadow-sm); position:relative; animation: bubbleIn .28s var(--ease); white-space:pre-wrap; }
.msg .who { font-size:10.5px; font-weight:700; opacity:.7; margin-bottom:2px; display:block; }
.msg--student { align-self:flex-start; background:#fff; border:1px solid var(--line); }
.msg--ai { align-self:flex-end; background:var(--brand); color:#fff; }
.msg--ai .who { opacity:.85; }
.msg--system { align-self:center; background:#fff; border:1px dashed var(--brand-400); color:var(--brand-700); font-size:12px; font-weight:600; max-width:90%; text-align:center; }
.thread__compose { display:flex; gap:10px; padding:12px 18px; border-top:1px solid var(--line-soft); align-items:center; }
.thread__compose .box { flex:1; border:1px solid var(--line); border-radius:999px; padding:10px 16px; color:var(--muted); font-size:13.5px; background: var(--bg); }
.thread__compose.is-ai .box { background: var(--violet-soft); color: var(--violet); border-color:#ddd5fb; }

/* KPI dashboard */
.kpis { display:grid; grid-template-columns: repeat(4, 1fr); gap:14px; }
@media (max-width:760px){ .kpis { grid-template-columns: repeat(2,1fr);} }
.kpi { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px 16px 14px; box-shadow:var(--shadow-sm); position:relative; overflow:hidden; }
.kpi::after { content:""; position:absolute; right:-20px; top:-20px; width:80px; height:80px; border-radius:50%; background:var(--brand-soft); opacity:.6; }
.kpi__label { font-size:12.5px; color:var(--muted); font-weight:600; position:relative; }
.kpi__value { font-family:var(--display); font-size:30px; font-weight:800; letter-spacing:-.02em; margin-top:6px; color:var(--ink); position:relative; }
.kpi__value .unit { font-size:15px; color:var(--muted); font-weight:700; }
.kpi__delta { font-size:12px; font-weight:700; margin-top:4px; position:relative; display:inline-flex; align-items:center; gap:4px; }
.kpi__delta.good { color:var(--green); }
.kpi__delta.bad { color:var(--rose); }

/* ============================================================
   Teacher POV
   ============================================================ */
.approval {
  background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow);
  overflow:hidden; max-width:420px;
}
.approval__head { background:var(--wa-header); color:#fff; padding:12px 16px; display:flex; align-items:center; gap:10px; font-weight:700; font-size:14px; }
.approval__head .ico { width:20px; height:20px; }
.approval__body { padding:16px; }
.approval__card { border:1px solid var(--line); border-radius:12px; padding:14px; background:var(--brand-softer); }
.approval__row { display:flex; justify-content:space-between; gap:12px; padding:6px 0; font-size:14px; border-bottom:1px dashed var(--line); }
.approval__row:last-child { border-bottom:none; }
.approval__row .k { color:var(--muted); }
.approval__row .v { font-weight:700; text-align:right; }
.approval__row .v.move { color:var(--brand-700); }
.approval__actions { display:flex; gap:10px; margin-top:14px; }
.approval__actions .btn { flex:1; }
.approval__done { text-align:center; padding:8px; }

.tcal { background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.tcal__head { padding:13px 16px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; gap:8px; font-weight:700; }
.tcal__grid { display:grid; grid-template-columns: repeat(3, 1fr); }
.tcal__day { border-right:1px solid var(--line-soft); min-height: 220px; }
.tcal__day:last-child { border-right:none; }
.tcal__dname { text-align:center; font-size:12px; font-weight:700; color:var(--muted); padding:9px 0; border-bottom:1px solid var(--line-soft); background:var(--bg); text-transform:uppercase; letter-spacing:.05em; }
.tcal__slots { padding:8px; display:flex; flex-direction:column; gap:7px; }
.tlesson { border-radius:9px; padding:8px 10px; font-size:12.5px; line-height:1.3; border-left:3px solid; }
.tlesson .t { font-weight:700; }
.tlesson--blue { background:var(--brand-soft); border-color:var(--brand); color:var(--brand-700); }
.tlesson--green { background:var(--green-soft); border-color:var(--green); color:var(--green); }
.tlesson--ghost { background:var(--bg); border-color:var(--line); color:var(--muted); border-left-style:dashed; }
.tlesson.is-new { animation: pulseNew 1.2s var(--ease); }
@keyframes pulseNew { 0%{ box-shadow:0 0 0 0 rgba(31,168,85,.5);} 100%{ box-shadow:0 0 0 14px rgba(31,168,85,0);} }
.tlesson .removed { text-decoration: line-through; opacity:.55; }

/* attendance */
.att { display:flex; flex-direction:column; gap:8px; }
.att__row { display:flex; align-items:center; gap:12px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.att__row .nm { font-weight:600; }
.att__row .meta { font-size:12px; color:var(--muted); }
.att__row .spacer { flex:1; }
.att__btns { display:flex; gap:6px; }
.att__btn { border:1px solid var(--line); background:#fff; border-radius:999px; padding:6px 12px; font-size:12.5px; font-weight:700; color:var(--muted); transition:.15s var(--ease); }
.att__btn[data-state="present"][aria-pressed="true"]{ background:var(--green); border-color:var(--green); color:#fff; }
.att__btn[data-state="absent"][aria-pressed="true"]{ background:var(--rose); border-color:var(--rose); color:#fff; }

/* time-saved counter */
.timesaved { display:flex; align-items:center; gap:14px; }
.timesaved__big { font-family:var(--display); font-size:42px; font-weight:800; color:var(--green); letter-spacing:-.02em; }

/* ============================================================
   Generic: feature cards, callouts, steps
   ============================================================ */
.cards3 { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
@media (max-width:820px){ .cards3 { grid-template-columns:1fr; } }
.fcard { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-sm); }
.fcard__ico { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; margin-bottom:12px; }
.fcard h4 { margin:0 0 6px; font-size:16px; }
.fcard p { margin:0; color:var(--ink-2); font-size:14px; }

.callout { background:var(--brand-softer); border:1px solid #d8ebfa; border-left:4px solid var(--brand); border-radius:12px; padding:14px 16px; color:var(--ink-2); font-size:14.5px; }
.callout svg { width:17px; height:17px; flex-shrink:0; vertical-align:-3px; margin-right:2px; }
.guard .t svg { width:17px; height:17px; flex-shrink:0; }

.steps { counter-reset: s; display:flex; flex-direction:column; gap:0; }
.step { display:flex; gap:14px; padding:14px 0; border-bottom:1px dashed var(--line); }
.step:last-child { border-bottom:none; }
.step__n { counter-increment:s; flex-shrink:0; width:30px; height:30px; border-radius:50%; background:var(--brand); color:#fff; display:grid; place-items:center; font-weight:800; font-size:14px; }
.step__n::before { content: counter(s); }
.step h5 { margin:0 0 3px; font-size:15px; }
.step p { margin:0; color:var(--ink-2); font-size:13.5px; }

/* ============================================================
   ABOUT page
   ============================================================ */
.about { padding: 0 0 90px; }
.about__hero {
  background:
    radial-gradient(900px 420px at 80% -10%, var(--brand-soft), rgba(232,244,252,0) 60%),
    linear-gradient(180deg, #fff, var(--bg));
  border-bottom:1px solid var(--line); padding: 40px 0 44px;
}
.about__hero .kick { color:var(--brand-700); font-weight:800; letter-spacing:.06em; text-transform:uppercase; font-size:13px; }
.about__hero h2 { font-family:var(--display); font-size:clamp(26px,4vw,40px); letter-spacing:-.02em; margin:8px 0 10px; max-width:780px; }
.about__hero p { color:var(--ink-2); font-size:17px; max-width:720px; margin:0; }
.about__meta { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.about__meta .chip { background:#fff; border:1px solid var(--line); border-radius:999px; padding:8px 14px; font-size:13px; box-shadow:var(--shadow-sm); }
.about__meta .chip b { color:var(--ink); }

.about section { padding-top: 38px; }
.about h3.sec { font-family:var(--display); font-size:23px; letter-spacing:-.01em; margin:0 0 4px; display:flex; align-items:center; gap:10px; }
.about h3.sec .num { width:30px; height:30px; border-radius:9px; background:var(--brand); color:#fff; display:grid; place-items:center; font-size:14px; font-weight:800; }
.about .sec-sub { color:var(--muted); margin:0 0 18px; padding-left:40px; font-size:14px; }
.about p.body { color:var(--ink-2); font-size:15.5px; max-width:820px; }

.statgrid { display:grid; grid-template-columns: repeat(4,1fr); gap:14px; }
@media (max-width:820px){ .statgrid { grid-template-columns: repeat(2,1fr);} }
.statbox { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-sm); }
.statbox .v { font-family:var(--display); font-size:30px; font-weight:800; color:var(--brand-600); letter-spacing:-.02em; }
.statbox .l { font-size:13px; color:var(--ink-2); margin-top:4px; }

.quote { background:#fff; border:1px solid var(--line); border-left:4px solid var(--brand); border-radius:12px; padding:16px 18px; box-shadow:var(--shadow-sm); }
.quote p { margin:0 0 8px; font-size:15.5px; font-style:italic; color:var(--ink); }
.quote .by { font-size:13px; color:var(--muted); font-weight:600; font-style:normal; }
.quote--neg { border-left-color: var(--rose); }
.quote--pos { border-left-color: var(--green); }
.quotes { display:grid; grid-template-columns: repeat(2,1fr); gap:16px; }
@media (max-width:760px){ .quotes { grid-template-columns:1fr; } }

.archi { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.archi .node { background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 14px; font-size:13.5px; font-weight:600; box-shadow:var(--shadow-sm); display:flex; align-items:center; gap:8px; }
.archi .arrow { color:var(--brand); font-weight:800; }

.timeline { display:flex; flex-direction:column; gap:14px; }
.tl { display:flex; gap:14px; }
.tl .dot { width:14px; height:14px; border-radius:50%; background:var(--brand); margin-top:5px; flex-shrink:0; box-shadow:0 0 0 4px var(--brand-soft); }
.tl h5 { margin:0 0 3px; font-size:15.5px; }
.tl p { margin:0; color:var(--ink-2); font-size:14px; }

.guardrails { display:grid; grid-template-columns: repeat(3,1fr); gap:14px; }
@media (max-width:820px){ .guardrails { grid-template-columns:1fr; } }
.guard { border:1px solid var(--line); border-radius:14px; padding:16px; background:var(--card); box-shadow:var(--shadow-sm); }
.guard .t { font-weight:700; display:flex; gap:8px; align-items:center; margin-bottom:6px; }
.guard p { margin:0; font-size:13.5px; color:var(--ink-2); }

.divider { height:1px; background:var(--line); margin:34px 0 0; }

.about__cta { margin-top: 40px; background: linear-gradient(130deg, var(--brand-700), var(--brand-600)); color:#fff; border-radius:var(--radius-lg); padding:32px 30px; text-align:center; box-shadow:var(--shadow); }
.about__cta h3 { font-family:var(--display); font-size:26px; margin:0 0 8px; }
.about__cta p { margin:0 auto 20px; max-width:560px; opacity:.92; }
.about__cta .row { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.about__cta .btn { background:#fff; color:var(--brand-700); border-color:#fff; }
.about__cta .btn:hover { background:var(--brand-soft); color:var(--brand-700); }
.about__cta .btn--out { background:transparent; color:#fff; border-color:rgba(255,255,255,.6); }
.about__cta .btn--out:hover { background:rgba(255,255,255,.12); color:#fff; }

/* utility */
.section-head { margin-bottom:14px; }
.section-head h3 { font-family:var(--display); font-size:20px; margin:0 0 3px; letter-spacing:-.01em; }
.section-head p { margin:0; color:var(--muted); font-size:14px; }
.mt8{margin-top:8px} .mt14{margin-top:14px} .mt22{margin-top:22px} .mt32{margin-top:32px}
.center{ text-align:center; }
.hide-sm{ } @media(max-width:720px){ .hide-sm{ display:none!important; } }

/* segmented scenario picker (Student rail) */
.segbar { display:flex; gap:6px; flex-wrap:wrap; }
.segbar button {
  border:1px solid var(--line); background:#fff; color:var(--ink-2); border-radius:999px;
  padding:8px 14px; font-weight:600; font-size:13.5px; transition:.15s var(--ease);
}
.segbar button:hover { border-color:var(--brand-400); color:var(--brand-700); background:var(--brand-softer); }
.segbar button[aria-pressed="true"] { background:var(--brand); border-color:var(--brand); color:#fff; box-shadow:var(--shadow-sm); }

/* behind-the-scenes live list (Student POV) */
.bts { display:flex; flex-direction:column; gap:2px; }
.bts__item { display:flex; gap:13px; align-items:flex-start; padding:11px 10px; border-radius:12px; transition:.2s var(--ease); opacity:.55; }
.bts__item.is-active { background:var(--brand-softer); opacity:1; box-shadow:inset 0 0 0 1px #d8ebfa; }
.bts__item.is-done { opacity:.9; }
.bts__ico { width:32px; height:32px; border-radius:9px; flex-shrink:0; display:grid; place-items:center; background:var(--bg-2); color:var(--muted); transition:.2s var(--ease); }
.bts__ico svg { width:17px; height:17px; }
.bts__item.is-active .bts__ico { background:var(--brand); color:#fff; }
.bts__item.is-done .bts__ico { background:var(--green-soft); color:var(--green); }
.bts__t { font-weight:700; font-size:14px; color:var(--ink); }
.bts__d { font-size:13px; color:var(--ink-2); margin-top:2px; }

.phone-cap { color:var(--muted); font-size:13px; }
.phone-cap svg { width:14px; height:14px; vertical-align:-2px; margin-right:3px; }
.fcard__ico svg { width:21px; height:21px; }

/* integrations / interoperability (About) */
.intg-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
@media (max-width:820px){ .intg-grid { grid-template-columns:repeat(2,1fr); } }
.intg-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:22px 16px 18px; text-align:center; transition:transform .2s var(--ease), box-shadow .2s var(--ease); }
.intg-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.intg-logo { height:44px; display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
.intg-logo img { max-height:40px; max-width:140px; width:auto; }
.intg-name { font-weight:700; font-size:15px; color:var(--ink); }
.intg-role { font-size:12.5px; color:var(--ink-2); margin-top:6px; line-height:1.45; }

/* phone header polish — clear the notch, keep the name on one line */
.wa-notch { position:absolute; top:0; left:50%; transform:translateX(-50%); width:128px; height:26px; background:#0d1b2a; border-radius:0 0 16px 16px; z-index:6; }
.wa-head { padding-top:30px; }
.wa-head__info { flex:1; min-width:0; }
.wa-head__name { font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wa-head__status { white-space:nowrap; }
.wa-head__lang { flex-shrink:0; }

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.05ms !important; scroll-behavior:auto !important; }
}
