/* Xirfadkaab component kit — composes the tokens in tokens.css.
   No per-screen ad-hoc colors: screens use these classes only. */

/* ---------- Layout shells ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--brand-green); color: var(--on-green);
  padding: var(--s3) var(--s4);
  display: flex; align-items: center; justify-content: space-between;
}
.topbar__right { display: flex; align-items: center; gap: var(--s4); color: var(--on-green-muted); }
.brand { display: flex; align-items: center; gap: var(--s2); font-size: var(--fz-18); font-weight: 500; }
.brand__dot {
  width: 26px; height: 26px; border-radius: 50%; background: var(--gold);
  color: var(--brand-green); display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: var(--fz-14);
}
.lang-pill { border: 0.5px solid rgba(255,255,255,0.45); border-radius: var(--r-md); padding: 3px 9px; font-size: var(--fz-13); }

/* Sidebar shell (web/admin/teacher/tutor/tablet) */
.layout { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 200px; background: var(--brand-green); padding: var(--s3) var(--s2); display: flex; flex-direction: column; gap: var(--s1); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: var(--r-md); color: #B9CEC4; font-size: var(--fz-13); text-decoration: none;
}
.nav-item:hover { color: var(--on-green); }
.nav-item.is-active { background: var(--brand-green-active); color: #F0D9A8; font-weight: 500; }
.content { flex: 1; background: var(--surface); padding: var(--s5); min-width: 0; }

/* Mobile shell (student) */
.phone { max-width: 420px; margin: 0 auto; background: var(--card); min-height: 100vh; display: flex; flex-direction: column; }
.phone__content { flex: 1; background: var(--surface); padding: var(--s4); }
.bottomnav { display: flex; border-top: 0.5px solid var(--border); background: var(--card); padding: 9px 6px 11px; }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #7E8C83; text-decoration: none; }
.bottomnav a .lbl { font-size: var(--fz-11); }
.bottomnav a.is-active { color: var(--gold-text); }
.bottomnav a.is-active .lbl { font-weight: 500; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); }
.card--accent { border: 2px solid var(--gold); }
.card--flush { padding: 0; overflow: hidden; }
.metric { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-md); padding: var(--s3); }
.metric__num { font-size: var(--fz-22); font-weight: 500; }
.metric__label { font-size: var(--fz-13); color: var(--text-muted); }
.eyebrow { font-size: var(--fz-11); font-weight: 500; letter-spacing: 0.4px; color: var(--eyebrow); text-transform: uppercase; }

/* ---------- Buttons ---------- */
.btn { border: none; border-radius: var(--r-md); padding: 10px 18px; font-size: var(--fz-14);
  font-weight: 500; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; }
.btn--primary { background: var(--brand-green); color: #fff; }
.btn--gold { background: var(--gold); color: var(--brand-green); }
.btn--secondary { background: transparent; color: var(--text); border: 0.5px solid var(--border); }
.btn--block { width: 100%; justify-content: center; padding: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--border); border-radius: 6px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--gold); }
.progress--lg { height: 10px; }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fz-11); font-weight: 500;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill--pending { background: var(--status-pending-bg); color: var(--status-pending-text); }
.pill--active { background: var(--status-active-bg); color: var(--status-active-text); }
.pill--rejected { background: var(--status-rejected-bg); color: var(--status-rejected-text); }
.pill--neutral { background: var(--status-neutral-bg); color: var(--status-neutral-text); }
.pill--info { background: var(--status-info-bg); color: var(--status-info-text); }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s3); }
.field label { display: block; font-size: var(--fz-13); color: var(--text-muted); margin-bottom: 6px; }
.input, .select, textarea.input {
  width: 100%; height: 44px; padding: 0 12px; border: 0.5px solid var(--border);
  border-radius: var(--r-md); background: var(--card); font-size: var(--fz-14);
  font-family: inherit; color: var(--text);
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; }
.input:focus, .select:focus, textarea.input:focus { outline: none; box-shadow: 0 0 0 2px var(--gold); }
.dropzone { border: 1px dashed var(--border); border-radius: var(--r-md); padding: var(--s5);
  text-align: center; color: var(--text-muted); background: var(--card); }
.otp { display: flex; gap: 8px; }
.otp .box { width: 44px; height: 52px; border: 0.5px solid var(--border); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; font-size: var(--fz-18); font-weight: 500; background: var(--card); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: var(--fz-13); background: var(--card);
  border: 0.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.table th { text-align: left; background: var(--border-soft); color: var(--text-muted); font-weight: 500; padding: 10px 12px; }
.table td { padding: 10px 12px; border-top: 0.5px solid var(--border); vertical-align: middle; }

/* ---------- List rows ---------- */
.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid var(--border-soft); }
.row:last-child { border-bottom: none; }
.row__grow { flex: 1; min-width: 0; }

/* ---------- Chat bubbles ---------- */
.bubble { max-width: 80%; padding: 10px 12px; border-radius: var(--r-lg); font-size: var(--fz-14); }
.bubble--ai { background: var(--card); border: 0.5px solid var(--border); align-self: flex-start; }
.bubble--me { background: #E6EFE9; color: var(--text); align-self: flex-end; }
.chat { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Helpers ---------- */
.stack > * + * { margin-top: var(--s3); }
.cluster { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.muted { color: var(--text-muted); }
.small { font-size: var(--fz-13); }
.tiny { font-size: var(--fz-11); }
.h1 { font-size: var(--fz-22); font-weight: 500; margin: 0; }
.h2 { font-size: var(--fz-18); font-weight: 500; margin: 0; }
.h3 { font-size: var(--fz-16); font-weight: 500; margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s3); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s3); }
.icon-chip { width: 40px; height: 40px; border-radius: 50%; background: var(--gold-wash); color: var(--gold-text);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--brand-green);
  display: flex; align-items: center; justify-content: center; font-size: var(--fz-13); font-weight: 500; }
.video-ph { aspect-ratio: 16/9; background: var(--brand-green); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; color: var(--gold); }
.video-embed { aspect-ratio: 16/9; width: 100%; border-radius: var(--r-md); overflow: hidden;
  background: #000; display: block; border: 0; }
.video-embed iframe, .video-embed video { width: 100%; height: 100%; border: 0; display: block; }
.divider { height: 0.5px; background: var(--border); margin: var(--s4) 0; }
.chip-select { display: inline-flex; padding: 8px 14px; border-radius: 999px; border: 0.5px solid var(--border);
  background: var(--card); font-size: var(--fz-13); cursor: pointer; }
.chip-select.is-on { border-color: var(--gold); background: var(--gold-wash); color: var(--gold-text); font-weight: 500; }

@media (max-width: 640px) {
  .sidebar { display: none; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .content { padding: var(--s4); }
}

/* ---- Unified search box (homepage hero + search results page) ---- */
.xk-search{display:flex;align-items:center;gap:8px;background:#fff;border-radius:999px;padding:6px 6px 6px 16px;
  box-shadow:0 10px 30px rgba(0,0,0,.16);max-width:560px;width:100%;}
.xk-search > i{color:var(--text-muted);font-size:19px;flex-shrink:0;}
.xk-search input[type="search"]{flex:1;border:none;outline:none;background:none;font-family:inherit;
  font-size:var(--fz-14);color:var(--text);min-width:0;padding:10px 0;}
.xk-search input[type="search"]::placeholder{color:var(--text-muted);}
.xk-search .btn{flex-shrink:0;border-radius:999px;}
.xk-search--page{margin-top:var(--s4);box-shadow:0 6px 20px rgba(16,38,31,.10);border:0.5px solid var(--border);}
@media(max-width:520px){ .xk-search{padding-left:12px;} .xk-search .btn{padding-left:14px;padding-right:14px;} }
