/* ===========================================================
   বিদ্যালয় বার্তা — ডিজাইন টোকেন
   =========================================================== */
:root {
  --bg: #F4F7F6;
  --surface: #FFFFFF;
  --text: #17231F;
  --text-muted: #5C6E68;
  --border: #DCE4E1;
  --border-strong: #C4CFCA;

  --accent: #2F6F62;
  --accent-hover: #24564B;
  --accent-soft: #E3EEEC;

  --gold: #9C7A2B;
  --gold-soft: #F3ECDB;

  --danger: #A5432E;
  --danger-soft: #F7E9E5;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 35, 31, 0.06), 0 6px 20px rgba(23, 35, 31, 0.05);

  --font-bn: 'Hind Siliguri', sans-serif;
  --font-en: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-bn);
  font-size: 16px;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.wordmark {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* ---------- Stage / screens ---------- */
.stage {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 16px 60px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 440px;
}

.screen.active {
  display: block;
}

.progress {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 26px;
}

.card.center {
  text-align: center;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.sub {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0 0 20px;
}

/* ---------- Form fields ---------- */
.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: var(--font-bn);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.counter {
  display: block;
  text-align: right;
  font-family: var(--font-en);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.search {
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
button {
  font-family: var(--font-bn);
  cursor: pointer;
  border: none;
}

.primary {
  width: 100%;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 18px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.primary:hover { background: var(--accent-hover); }
.primary:disabled {
  background: var(--border-strong);
  color: #8A9691;
  cursor: not-allowed;
}

.ghost {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 8px;
  margin-top: 10px;
}

.ghost:hover { background: var(--accent-soft); }

.linklike {
  background: none;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 4px 0;
}

.linklike:hover { color: var(--accent-hover); text-decoration: underline; }

.btn-row {
  margin-top: 22px;
}

/* ---------- Class chips ---------- */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.chip {
  padding: 14px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 1.02rem;
  background: var(--surface);
  color: var(--text);
}

.chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Student list ---------- */
.student-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  width: 100%;
}

.student-row:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.roll-badge {
  flex-shrink: 0;
  min-width: 40px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

.student-name {
  font-weight: 500;
  color: var(--text);
}

/* ---------- Selected student box ---------- */
.selected-student {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  margin-bottom: 20px;
}

.selected-student .roll-badge {
  background: var(--surface);
}

.selected-student .meta {
  display: flex;
  flex-direction: column;
}

.selected-student .mobile {
  font-family: var(--font-en);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- States ---------- */
.error {
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.88rem;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.empty {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 20px 4px;
  text-align: center;
}

.check {
  width: 52px;
  height: 52px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Mobile ---------- */
@media (max-width: 420px) {
  .card { padding: 22px 18px 20px; }
  h1 { font-size: 1.25rem; }
}
