:root {
  --sky: #eef4f8;
  --ink: #16324f;
  --ink-soft: #4d6377;
  --slate: #23473b;
  --chalk: #f8f8f0;
  --chalk-soft: #c9d6cd;
  --wood: #b5803f;
  --pen: #b92c1c;
  --line: #c6d4df;
  --white: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 1.0625rem/1.7 Alexandria, "Segoe UI", Tahoma, sans-serif;
}
[hidden] { display: none !important; }
.page { width: 100%; max-width: 30rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--wood); outline-offset: 2px; }

.brand { font-size: 2.75rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.25rem; }
.title { font-size: 1.75rem; font-weight: 800; line-height: 1.3; }
.subtitle { color: var(--ink-soft); }

/* اللوحة المدرسية: العنصر الذي يميز الموقع */
.slate {
  background: var(--slate);
  color: var(--chalk);
  border: 8px solid var(--wood);
  border-radius: 6px;
  padding: 1.25rem;
}
form.slate { display: grid; gap: .875rem; }
.slate label { font-size: 1.125rem; font-weight: 600; }
.code-input {
  width: 100%;
  background: transparent;
  color: var(--chalk);
  border: 0;
  border-bottom: 3px dashed var(--chalk-soft);
  border-radius: 0;
  padding: .5rem 0;
  font: 800 clamp(1.625rem, 8.5vw, 2.125rem)/1.3 Alexandria, Tahoma, sans-serif;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.code-input::placeholder { color: #7f9a8d; }
.code-input:focus { outline: 0; border-bottom-color: var(--chalk); border-bottom-style: solid; }
.slate-error { color: #ffd9d2; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .5rem 1.25rem;
  border: 2px solid transparent; border-radius: 6px;
  font-family: inherit; font-size: 1.0625rem; font-weight: 600; line-height: 1.3;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-chalk { background: var(--chalk); color: var(--slate); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-line { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 2.75rem; padding: .375rem .75rem; font-size: .9375rem; flex: 1 1 8rem; }

.guardian { display: grid; gap: .5rem; margin-top: 2.25rem; }
.guardian h2 { font-size: 1.25rem; font-weight: 800; }
.guardian .btn { margin-top: .5rem; }

.bar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 30rem; margin: 0 auto; padding: .75rem 1rem;
}
.bar-brand { color: var(--ink); font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.link-btn {
  background: none; border: 0; padding: .5rem .25rem; min-height: 2.75rem;
  color: var(--ink); font: inherit; font-size: .9375rem; text-decoration: underline; cursor: pointer;
}
.link-danger { color: var(--pen); }

.panel {
  display: grid; gap: .375rem; margin-top: 1rem; padding: 1.25rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 6px;
}
.panel h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: .5rem; }
.panel label { font-weight: 600; margin-top: .375rem; }
.panel .btn { margin-top: .75rem; }
input:not(.code-input), select {
  width: 100%; min-height: 3rem; padding: .5rem .75rem;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--line); border-radius: 6px; font: inherit;
}
input:not(.code-input):focus, select:focus { outline: 0; border-color: var(--ink); }
.hint { color: var(--ink-soft); font-size: .875rem; }
.error { color: var(--pen); font-weight: 600; }
.empty { margin-top: 1.5rem; color: var(--ink-soft); }

.students { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
.student { display: grid; gap: .625rem; }
.student-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .75rem; }
.student-name { font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; }
.student-level { color: var(--ink-soft); font-size: .9375rem; }
.slate-mini {
  border-width: 6px; padding: .75rem; text-align: center;
  font-size: clamp(1.375rem, 7vw, 1.75rem); font-weight: 800; letter-spacing: .08em; line-height: 1.3;
}
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions-quiet { justify-content: space-between; }
.status { color: var(--slate); font-weight: 600; font-size: .9375rem; }
.quiet-link { display: inline-block; margin-top: 2.5rem; padding: .5rem 0; color: var(--ink-soft); font-size: .9375rem; }
