/* ==========================================================================
   School Sathi — design system
   1. Tokens   2. Base   3. Buttons & forms   4. App shell   5. Page parts
   6. Cards & stats   7. Tables & lists   8. Feedback (badges, toasts, modals, states)
   9. Feature parts (attendance, timetable, marks)   10. Auth   11. Responsive   12. Print
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --primary: #315bcb;
  --primary-dark: #2447a8;
  --primary-soft: #ebf0fc;
  --primary-ring: rgba(49, 91, 203, 0.25);

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #f8f9fc;
  --text: #141b2d;
  --text-2: #3a4357;
  --muted: #5e6779;
  /* ≥ 4.5:1 on white */
  --border: #e3e7ef;
  --border-strong: #cfd5e1;

  --green: #13795b;
  --green-soft: #e5f5ee;
  --red: #c43d3d;
  --red-soft: #fcecec;
  --amber: #9a6100;
  --amber-soft: #fff3d6;
  --blue: #315bcb;
  --blue-soft: #ebf0fc;
  --gray-soft: #eef0f4;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, "Noto Sans Devanagari", sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 27, 45, 0.06);
  --shadow: 0 4px 14px rgba(20, 27, 45, 0.07);
  --shadow-lg: 0 18px 48px rgba(20, 27, 45, 0.18);

  --sidebar: 248px;
  --topbar: 60px;
  --control-h: 40px;
  --gutter: 24px;
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  font: 14px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: 22px;
  font-weight: 700;
}

h2 {
  font-size: 16px;
  font-weight: 700;
}

h3 {
  font-size: 14px;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Links inside running text: brand colour + semi-bold (so not told apart by colour alone); underline only on hover / focus. */
p a:not(.btn),
li a:not(.btn),
.check-field a {
  font-weight: 600;
  text-underline-offset: 2px;
}

p a:not(.btn):hover,
li a:not(.btn):hover,
.check-field a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* Privacy / Terms: long running text keeps its links underlined. */
.legal-doc a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.sr-only {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

label.btn {
  position: relative;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.nowrap {
  white-space: nowrap;
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.text-red {
  color: var(--red);
}

.text-green {
  color: var(--green);
}

.text-amber {
  color: var(--amber);
}

.mt {
  margin-top: 16px;
}

.mt-s {
  margin-top: 8px;
}

.mb {
  margin-bottom: 16px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.row.between {
  justify-content: space-between;
}

.stack>*+* {
  margin-top: 12px;
}

.grow {
  flex: 1 1 auto;
  min-width: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

/* 3. Buttons & forms ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-h);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--muted);
  color: var(--text);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: transparent;
}

.btn-soft:hover {
  background: #dbe4fa;
  border-color: transparent;
}

.btn-danger {
  background: var(--surface);
  color: var(--red);
  border-color: #efc7c7;
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
  padding-left: 8px;
  padding-right: 8px;
}

.btn-ghost:hover {
  background: var(--primary-soft);
  border-color: transparent;
}

.btn-sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  min-height: 46px;
  font-size: 15px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--gray-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field>span,
.field>label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.field .req {
  color: var(--red);
}

.field small {
  color: var(--muted);
  font-size: 12px;
}

.input,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
select.input {
  width: 100%;
  min-height: var(--control-h);
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--red);
}

.field .error {
  color: var(--red);
  font-size: 12.5px;
}

.check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-all {
  grid-column: 1 / -1;
}

.form-section+.form-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.form-section>h3 {
  margin-bottom: 12px;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* 4. App shell ------------------------------------------------------------- */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 60;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  min-height: var(--topbar);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none !important;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  flex: none;
}

.brand-mark .icon {
  width: 20px;
  height: 20px;
}

.brand b {
  font-family: var(--font-head);
  font-size: 16px;
  display: block;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 16px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group+.nav-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.nav-label {
  padding: 2px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none !important;
}

.side-nav a:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.side-nav a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.side-nav a.active .icon {
  color: var(--primary);
}

.side-nav .soon {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--gray-soft);
  border-radius: 999px;
  padding: 1px 7px;
}

.side-foot {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  flex: none;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-user b {
  display: block;
  font-size: 13.5px;
}

.side-user small {
  color: var(--muted);
  font-size: 12px;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--topbar);
  padding: 8px var(--gutter);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(6px);
}

.topbar .menu-btn {
  display: none;
}

.topbar-title {
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--text-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Topbar pills (feedback + user menu): one shared look — same height, border, radius and type. */
.fb-btn,
.user-btn {
  min-height: var(--control-h);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.fb-btn:hover,
.user-btn:hover {
  border-color: var(--primary);
  background: var(--surface-alt);
}

.fb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: var(--control-h);
  justify-content: center;
  padding: 4px 12px;
}

.fb-btn svg {
  width: 16px;
  height: 16px;
}

/* Phones: icon only (the title / user-menu item still name it). */
@media (max-width: 640px) {
  .fb-btn {
    padding: 4px;
  }

  .fb-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.menu-wrap {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
}

.user-btn span {
  font-weight: 600;
  font-size: 13px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-btn .avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 230px;
  padding: 6px;
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
}

.dropdown .dd-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.dropdown .dd-head small {
  display: block;
  color: var(--muted);
}

.dropdown a,
.dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  text-decoration: none !important;
}

.dropdown a:hover,
.dropdown button:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.content {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 22px var(--gutter) 40px;
  flex: 1;
}

.app-foot {
  padding: 14px var(--gutter);
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 27, 45, 0.45);
  z-index: 55;
}

.bottom-nav {
  display: none;
}

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: var(--r);
  margin-bottom: 16px;
  border: 1px solid;
  font-size: 13.5px;
}

.banner .icon {
  margin-top: 2px;
}

.banner.warn {
  background: var(--amber-soft);
  border-color: #f0d79a;
  color: #5c3b00;
}

.banner.error {
  background: var(--red-soft);
  border-color: #efc7c7;
  color: #7a1f1f;
}

.banner.info {
  background: var(--blue-soft);
  border-color: #c9d6f6;
  color: #1d377e;
}

/* 5. Page parts ------------------------------------------------------------ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head p {
  color: var(--muted);
  margin-top: 3px;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.crumbs a {
  color: var(--muted);
}

.crumbs span[aria-hidden] {
  opacity: 0.6;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  flex: none;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 42px;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button[aria-selected="true"] {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
}

.toolbar .field {
  min-width: 150px;
}

.toolbar .search {
  flex: 1 1 220px;
}

.toolbar .spacer {
  flex: 1;
}

/* 6. Cards & stats --------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card+.card {
  margin-top: 16px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card.flush>.card-head {
  padding: 16px 18px 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.main-side {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}

.grid>.card+.card {
  margin-top: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat b>span {
  font-size: inherit;
  color: inherit;
}

.stat {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

a.stat:hover {
  border-color: var(--border-strong);
}

.stat small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
}

.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.2;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stat span {
  color: var(--muted);
  font-size: 12.5px;
}

.stat-b {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.narrow {
  max-width: 720px;
}

.meter {
  height: 6px;
  border-radius: 99px;
  background: var(--gray-soft);
  overflow: hidden;
  margin-top: 8px;
}

.meter>i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.kv {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: 8px 12px;
  font-size: 13.5px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list li:last-child {
  border-bottom: 0;
}

.list .meta {
  color: var(--muted);
  font-size: 12.5px;
}

.profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  overflow: hidden;
  flex: none;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 7. Tables ---------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #fafbfe;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table td.actions {
  text-align: right;
  white-space: nowrap;
}

.table tfoot td {
  font-weight: 700;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}

.table .cell-main b {
  display: block;
}

.table .cell-main small {
  color: var(--muted);
}

.table a.rowlink {
  color: var(--text);
  font-weight: 600;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

/* 8. Feedback -------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--gray-soft);
  color: var(--text-2);
}

.badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--primary-dark);
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r);
  background: #1d2436;
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: toast-in 0.18s ease-out;
}

.toast.success .icon {
  color: #6fe0b5;
}

.toast.error .icon {
  color: #ff9c9c;
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 27, 45, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

/* The form wraps head, body and footer: it must pass the height limit on so only the body scrolls and the footer
   (Save / Cancel) always stays visible. */
.modal>form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-head,
.modal-foot {
  flex: 0 0 auto;
}

.modal.wide {
  width: min(860px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}

.empty .icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
  color: #a3abbd;
}

.empty b {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

.empty .btn {
  margin-top: 14px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  color: var(--muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--red);
}

.error-state .btn {
  margin-top: 12px;
}

/* 9. Feature parts --------------------------------------------------------- */
.att-list {
  display: flex;
  flex-direction: column;
}

.att-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.att-row:last-child {
  border-bottom: 0;
}

.att-row .roll {
  width: 34px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.att-row .who {
  flex: 1;
  min-width: 0;
}

.att-row .who b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.att-row .who small {
  color: var(--muted);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  flex: none;
}

.seg button {
  min-width: 44px;
  min-height: 40px;
  padding: 4px 8px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.seg button:first-child {
  border-left: 0;
}

.seg button[aria-pressed="true"][data-v="present"] {
  background: var(--green);
  color: #fff;
}

.seg button[aria-pressed="true"][data-v="absent"] {
  background: var(--red);
  color: #fff;
}

.seg button[aria-pressed="true"][data-v="leave"] {
  background: var(--amber);
  color: #fff;
}

.seg button[aria-pressed="true"][data-v="late"] {
  background: var(--primary);
  color: #fff;
}

.seg button[aria-pressed="true"][data-v="half_day"] {
  background: #6b4fc8;
  color: #fff;
}

.sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.summary-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Monthly attendance register: name column lines up with the card title (18px), day columns are equal width,
   Sundays / today / days to come are shaded, totals sit in their own tinted block. */
.register-wrap {
  border-top: 1px solid var(--border);
}

.register {
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.register td,
.register th {
  padding: 8px 2px;
  text-align: center;
  font-size: 12.5px;
  min-width: 30px;
  width: 30px;
  border-bottom: 1px solid var(--border);
}

.register thead th {
  padding: 8px 2px 6px;
  background: var(--surface-alt);
  letter-spacing: 0;
  vertical-align: bottom;
}

.register th.day span {
  display: block;
  font-size: 12.5px;
  color: var(--text);
}

.register th.day small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.register td.name,
.register th.name {
  text-align: left;
  min-width: 190px;
  width: 190px;
  padding: 8px 12px 8px 18px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  font-size: 13.5px;
}

.register thead th.name {
  background: var(--surface-alt);
  vertical-align: middle;
  font-size: 12px;
}

.reg-roll {
  display: inline-block;
  min-width: 22px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.register td.day i {
  color: #c4cad6;
  font-style: normal;
}

.register .is-sun {
  background: #f3f4f8;
}

.register thead th.is-sun span,
.register thead th.is-sun small {
  color: var(--red);
}

.register .is-today {
  background: var(--primary-soft);
}

.register thead th.is-today {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.register thead th.is-today span {
  color: var(--primary-dark);
}

.register td.is-future i {
  visibility: hidden;
}

.register .tot {
  min-width: 36px;
  width: 36px;
  background: var(--surface-alt);
  font-weight: 700;
}

.register .tot.zero {
  color: var(--muted);
  font-weight: 500;
}

.register .tot.first {
  border-left: 1px solid var(--border);
}

.register .tot.pct {
  min-width: 60px;
  width: 60px;
  padding-right: 18px;
}

.register tbody tr:hover td {
  background: var(--primary-soft);
}

.register tbody tr:hover td.name {
  background: #eef2fc;
}

.reg-pct {
  display: inline-block;
  min-width: 42px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--gray-soft);
}

.reg-pct.good {
  color: var(--green);
  background: var(--green-soft);
}

.reg-pct.ok {
  color: var(--amber);
  background: var(--amber-soft);
}

.reg-pct.low {
  color: var(--red);
  background: var(--red-soft);
}

.register .P {
  color: var(--green);
  font-weight: 700;
}

.register .A {
  color: var(--red);
  font-weight: 700;
}

.register .L {
  color: var(--amber);
  font-weight: 700;
}

.register .LT {
  color: var(--primary);
  font-weight: 700;
}

.tt {
  border-collapse: separate;
  border-spacing: 4px;
  width: 100%;
  min-width: 720px;
}

.tt th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  padding: 6px;
  text-align: left;
}

.tt td {
  vertical-align: top;
}

.tt-cell {
  width: 100%;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: left;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 12.5px;
  cursor: default;
}

button.tt-cell {
  cursor: pointer;
}

button.tt-cell:hover {
  border-color: var(--primary);
}

.tt-cell b {
  font-size: 13px;
}

.tt-cell small {
  color: var(--muted);
}

.tt-cell.empty-cell {
  color: #a3abbd;
  border-style: dashed;
}

.tt-cell.break {
  background: var(--surface-alt);
  color: var(--muted);
  justify-content: center;
  text-align: center;
}

.marks-input {
  width: 90px;
  text-align: right;
}

.time-input {
  width: 112px !important;
  flex: none;
}

@media (max-width: 767px) {
  .att-row .time-input {
    flex: 1 1 100px;
    width: auto !important;
  }
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
}

.chip[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.search-results {
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-top: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.search-results button:hover {
  background: var(--surface-alt);
}

.search-results button:last-child {
  border-bottom: 0;
}

.due-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.due-row:last-child {
  border-bottom: 0;
}

/* 10. Auth ------------------------------------------------------------------ */
/* Same layout as Coaching Sathi's login (brand panel + tabbed forms), in School Sathi's blue. */
.auth-page {
  background: var(--surface);
}

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 56px;
  background: linear-gradient(145deg, #3a66d6 0%, var(--primary) 45%, #213f96 100%);
  color: #fff;
}

.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.07);
}

.auth-hero::before {
  width: 460px;
  height: 460px;
  right: -160px;
  top: -140px;
}

.auth-hero::after {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -120px;
}

.auth-hero>* {
  position: relative;
  z-index: 1;
}

.auth-hero .brand {
  border: 0;
  padding: 0;
  min-height: 0;
  color: #fff;
}

.auth-hero .brand-mark {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-hero .brand small {
  color: rgba(255, 255, 255, 0.75);
}

.auth-hero-body {
  max-width: 520px;
}

.hero-chip {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 600;
}

.auth-hero h1 {
  color: #fff;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.auth-hero h1 span {
  color: #c9d8ff;
}

.auth-hero-body>p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.hero-features {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-features i {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
}

.hero-features div {
  display: flex;
  flex-direction: column;
}

.hero-features b {
  font-size: 14px;
}

.hero-features span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-foot {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
}

.auth-box {
  width: min(100%, 420px);
}

.auth-mobile-brand {
  display: none;
  border: 0;
  padding: 0;
  min-height: 0;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: var(--primary-soft);
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form header {
  margin-bottom: 6px;
}

.auth-form h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-form header p {
  color: var(--muted);
  font-size: 15px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

.field-label small {
  color: var(--muted);
  font-weight: 500;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-group {
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.input-group .prefix {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 48px;
  height: 100%;
  padding: 0 12px;
  border-right: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.input-group input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 14px;
  font-size: 15px;
  background: transparent;
  outline: none;
}

.pw-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.pw-toggle:hover {
  color: var(--primary);
}

.form-row-end {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.back-link:hover {
  color: var(--primary);
}

.back-link .icon {
  width: 16px;
  height: 16px;
}

.form-error,
.form-success {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.form-error {
  background: var(--red-soft);
  color: #a8332c;
  border: 1px solid #f3cfcb;
}

.form-success {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #c7ebd9;
}

.switch-text {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.forgot-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.forgot-steps li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-alt);
}

.forgot-steps span {
  color: var(--muted);
  font-size: 13.5px;
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth-note .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.auth-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 12px;
  font-size: 12.5px;
}

.auth-legal a,
.auth-legal .sc-link {
  color: var(--muted);
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--primary);
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* spam honeypot: hidden from people */

/* Public pages: Privacy, Terms, 404 */
.legal-page {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.legal-bar {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.legal-head .brand {
  border: 0;
  padding: 0;
  min-height: 0;
}

.legal-main {
  flex: 1;
  width: min(100% - 32px, 1040px);
  margin: 24px auto 40px;
}

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}

.legal-doc .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.legal-doc h1 {
  font-size: 30px;
  font-weight: 800;
  margin-top: 6px;
}

.legal-doc h2 {
  font-size: 17px;
  margin: 28px 0 8px;
}

.legal-doc p,
.legal-doc li {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}

.legal-doc p+p {
  margin-top: 10px;
}

.legal-doc ul {
  padding-left: 20px;
  margin: 8px 0 0;
}

.legal-doc li+li {
  margin-top: 6px;
}

.legal-doc code {
  font-size: 13px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
}

.legal-updated {
  color: var(--muted) !important;
  font-size: 13.5px !important;
  margin: 4px 0 20px;
}

.biz-missing {
  background: var(--amber-soft);
  color: #5c3b00;
  border-radius: 4px;
  padding: 0 3px;
}

.legal-foot {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--muted);
}

.legal-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.legal-foot a,
.legal-foot .sc-link {
  color: var(--muted);
}

.legal-foot a[aria-current="page"] {
  color: var(--primary-dark);
  font-weight: 600;
}

.notfound {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 48px 16px;
  text-align: center;
}

.notfound-card {
  max-width: 460px;
}

.notfound-brand {
  justify-content: center;
  border: 0;
  min-height: 0;
  padding: 0 0 26px;
}

.notfound .notfound-code {
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  letter-spacing: -0.04em;
}

.notfound h1 {
  font-size: 24px;
  margin: 14px 0 8px;
}

.notfound p {
  color: var(--muted);
  font-size: 15px;
}

.notfound .row {
  justify-content: center;
  margin-top: 22px;
}

@media (max-width: 640px) {
  .legal-doc {
    padding: 22px 18px;
    border-radius: var(--r);
  }

  .legal-doc h1 {
    font-size: 25px;
  }

  .legal-head .btn {
    padding: 8px 12px;
  }
}

@media (max-width: 1023px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    display: none;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-panel {
    align-items: start;
    background: radial-gradient(ellipse at 0% 0%, #e2eafd 0, transparent 55%), var(--surface);
  }
}

@media (max-width: 520px) {
  .auth-panel {
    padding: 28px 18px;
  }

  .auth-form h2 {
    font-size: 23px;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }
}

/* 11. Responsive ------------------------------------------------------------ */
/* Same breakpoints as Coaching Sathi:
     > 1200  full layout        921–1200  narrower sidebar, two-column grids
     ≤ 920   sidebar becomes a drawer + bottom nav (tablets and phones)
     ≤ 767   phone layout: one column, stacked tables, bottom-sheet modals
     ≤ 380 / ≤ 330  small and very small phones */
@media (min-width: 1600px) {
  :root {
    --gutter: 36px;
  }

  .content {
    max-width: 1480px;
  }
}

@media (max-width: 1200px) {
  :root {
    --sidebar: 232px;
    --gutter: 20px;
  }

  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .grid.main-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablets and phones: drawer + bottom nav */
@media (max-width: 920px) {
  :root {
    --gutter: 16px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

  body.nav-open .sidebar {
    transform: none;
  }

  body.nav-open {
    overflow: hidden;
  }

  .topbar .menu-btn {
    display: inline-grid;
  }

  .user-btn>span:not(.avatar),
  .user-btn .chev {
    display: none;
  }

  .user-btn {
    padding: 3px;
  }

  .content {
    padding-top: 18px;
  }

  .app-foot {
    text-align: center;
  }

  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    /* even columns, also when a role hides an item */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
  }

  .bottom-nav a,
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 4px 2px;
    border: 0;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none !important;
  }

  .bottom-nav .icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav .active {
    color: var(--primary);
  }

  .bottom-nav .active .icon {
    stroke-width: 2.4;
  }

  .bottom-nav a:hover,
  .bottom-nav button:hover {
    color: var(--primary-dark);
  }

  body:has(.bottom-nav) {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  body:has(.bottom-nav) .shell {
    min-height: calc(100vh - 64px - env(safe-area-inset-bottom));
  }

  /* footer of short pages stays above the nav */
  .toasts {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .sticky-bar {
    bottom: calc(62px + env(safe-area-inset-bottom));
  }

  /* stay above the bottom nav */
}

/* Phones */
@media (max-width: 767px) {
  h1 {
    font-size: 20px;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1 1 auto;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.main-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid,
  .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .form-actions .btn {
    flex: 1 1 auto;
  }

  .toolbar .field {
    min-width: 0;
    flex: 1 1 140px;
  }

  .card {
    padding: 14px;
    border-radius: var(--r);
  }

  .card.flush>.card-head {
    padding: 14px 14px 0;
  }

  .modal-back {
    padding: 0;
    align-items: end;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
  }

  .modal.wide {
    width: 100%;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-foot {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .modal-foot .btn {
    flex: 1 1 auto;
  }

  /* Data tables turn into stacked cards */
  table.stack thead {
    display: none;
  }

  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }

  table.stack tr {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
  }

  table.stack td {
    border: 0;
    padding: 3px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }

  table.stack td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12.5px;
    text-align: left;
    font-weight: 600;
    flex: none;
  }

  table.stack td.cell-main {
    display: block;
    text-align: left;
    padding-bottom: 6px;
  }

  table.stack td.cell-main::before {
    display: none;
  }

  table.stack td.actions {
    justify-content: flex-start;
    padding-top: 8px;
    flex-wrap: wrap;
  }

  table.stack td.actions::before {
    display: none;
  }

  table.stack tfoot {
    display: block;
  }

  table.stack tfoot tr {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  table.stack tfoot td {
    display: inline;
    width: auto;
  }

  table.stack td.num {
    text-align: right;
  }

  .att-row {
    flex-wrap: wrap;
  }

  .att-row .seg {
    width: 100%;
  }

  .att-row .seg button {
    flex: 1;
  }

  .kv {
    grid-template-columns: minmax(96px, 42%) 1fr;
  }

  .toasts {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stats> :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  /* 5 tiles: last one full width, no gap */
  .stat {
    padding: 12px;
  }

  .stat b {
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  :root {
    --gutter: 12px;
  }

  .topbar {
    gap: 6px;
  }

  .seg button {
    min-width: 0;
    padding: 4px 4px;
  }
}

@media (max-width: 330px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats> :last-child:nth-child(odd) {
    grid-column: auto;
  }

}

/* Laptop heights: tighter sidebar so the whole menu fits without scrolling */
@media (max-height: 860px) {
  .side-nav a {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .nav-group+.nav-group {
    margin-top: 6px;
    padding-top: 6px;
  }
}

@media (max-height: 720px) {
  .side-nav a {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .nav-group {
    gap: 2px;
  }

  .nav-label {
    padding-bottom: 3px;
  }

  .brand {
    min-height: 52px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .side-foot {
    padding: 8px 12px;
  }
}

/* Short landscape phones: do not pin the topbar so content has room */
@media (max-height: 480px) and (orientation: landscape) {
  .topbar {
    position: static;
  }

  .sidebar {
    overflow-y: auto;
  }

  .modal {
    max-height: 100vh;
    max-height: 100dvh;
  }
}

/* Touch screens: comfortable tap targets; 16px inputs stop iPhone Safari zooming in on focus */
@media (hover: none) and (pointer: coarse) {

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 38px;
  }

  .chip {
    min-height: 40px;
  }

  .side-nav a {
    min-height: 44px;
  }

  .tabs button {
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* 12. Print ----------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    padding-bottom: 0 !important;
  }

  .sidebar,
  .topbar,
  .bottom-nav,
  .app-foot,
  .no-print,
  .toasts,
  .tabs,
  .toolbar,
  .page-actions,
  .scrim {
    display: none !important;
  }

  .content {
    padding: 0;
    max-width: none;
  }

  .card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  table.stack thead {
    display: table-header-group;
  }
}

/* 13. Subscription page — same layout as Coaching Sathi's (status → plan cards → order summary + what you get →
   history), in School Sathi colours. ------------------------------------------------------------------------ */
.eyebrow {
  margin: 0 0 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
}

.sub-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-left: 5px solid var(--amber);
}

.sub-status.is-active {
  border-left-color: var(--green);
}

.sub-status.is-expired,
.sub-status.is-suspended {
  border-left-color: var(--red);
  background: linear-gradient(100deg, #fff6f6, var(--surface));
}

.sub-status-icon {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--amber-soft);
  color: var(--amber);
}

.sub-status.is-active .sub-status-icon {
  background: var(--green-soft);
  color: var(--green);
}

.sub-status.is-expired .sub-status-icon,
.sub-status.is-suspended .sub-status-icon {
  background: var(--red-soft);
  color: var(--red);
}

.sub-status-icon .icon {
  width: 26px;
  height: 26px;
}

.sub-status-main {
  flex: 1;
  min-width: 0;
}

.sub-status-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sub-status-title h2 {
  font-size: 20px;
}

.sub-status-main>p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.sub-status-main>p b {
  color: var(--text);
}

.progress {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--gray-soft);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width .4s ease;
}

.sub-status.is-grace .progress span {
  background: var(--amber);
}

.sub-status.is-expired .progress span,
.sub-status.is-suspended .progress span {
  background: var(--red);
}

.plan-picker-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 24px 0 14px;
}

.plan-picker-head h2 {
  font-size: 18px;
}

.plan-picker-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cycle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.cycle-chip .icon {
  width: 15px;
  height: 15px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.tier-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

button.tier-card {
  cursor: pointer;
}

button.tier-card:hover {
  border-color: #b8c8ee;
  box-shadow: var(--shadow);
}

.tier-card:focus-visible {
  outline: 3px solid var(--primary-ring);
  outline-offset: 2px;
}

.tier-card.is-selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--surface) 55%);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.tier-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  background: var(--gray-soft);
  color: var(--text-2);
}

.tier-chip.tier-standard {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tier-chip.tier-premium {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.tier-chip.tier-trial {
  background: var(--green-soft);
  color: var(--green);
}

.tier-current {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.tier-radio {
  flex: none;
  margin-left: auto;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}

.tier-card.is-selected .tier-radio {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.tier-card-tag {
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.3;
}

.tier-card-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  min-height: 40px;
}

.tier-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
}

.tier-price strong {
  font-family: var(--font-head);
  font-size: 30px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.tier-price span {
  color: var(--muted);
  font-size: 13px;
}

.tier-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tier-card.is-locked {
  background: var(--surface-alt);
  border-style: dashed;
  box-shadow: none;
}

.tier-card.is-locked .tier-card-tag,
.tier-card.is-locked .tier-card-desc,
.tier-card.is-locked .tier-price {
  opacity: .7;
}

.tier-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.tier-lock .icon {
  width: 14px;
  height: 14px;
}

.tier-locked-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--primary-soft);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
}

.tier-locked-note .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--primary);
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  font-size: 17px;
}

.panel-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.heading-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
}

.heading-icon.is-green {
  background: var(--green-soft);
  color: var(--green);
}

.heading-icon .icon {
  width: 19px;
  height: 19px;
}

.summary-lines {
  margin-bottom: 16px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.detail-line:last-child {
  border-bottom: 0;
}

.detail-line span {
  color: var(--muted);
  flex: none;
  white-space: nowrap;
}

.detail-line b {
  text-align: right;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-total {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 2px dashed var(--border);
  border-bottom: 0;
  font-size: 15px;
}

.summary-total b {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.full-btn {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  white-space: normal;
}

.pay-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.pay-note .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--amber);
}

.pay-terms {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.feature-list .icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.feature-list li.is-on .icon {
  color: var(--green);
}

.feature-list li.is-off {
  color: var(--muted);
}

.feature-list li.is-off .icon {
  color: var(--border-strong);
}

.feature-list li.is-off span {
  text-decoration: line-through;
  text-decoration-color: var(--border-strong);
}

.feature-list small {
  display: block;
  text-decoration: none;
  font-size: 11.5px;
}

.upg-hero {
  text-align: center;
}

.upg-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.upg-icon .icon {
  width: 24px;
  height: 24px;
}

.upg-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.upg-hero p b {
  color: var(--text);
}

.upg-plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
}

.upg-plan {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-alt);
}

.upg-plan.is-next {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.upg-plan-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.upg-plan small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.upg-plan b {
  font-family: var(--font-head);
  font-size: 16px;
}

.upg-plan>span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.upg-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 20px;
}

.upg-points {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.upg-points li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.45;
}

.upg-points .icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--green);
}

.upg-points li.is-info .icon {
  color: var(--amber);
}

.upg-pay {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
}

.upg-pay span {
  color: var(--muted);
  font-size: 13px;
}

.upg-pay b {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--primary-dark);
}

.upg-pay small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
}

.paid-box {
  text-align: center;
}

.paid-box>p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.55;
}

.paid-box .summary-lines {
  text-align: left;
  margin: 0;
}

.paid-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.paid-icon .icon {
  width: 28px;
  height: 28px;
}

@media (max-width: 1100px) {
  .tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .tier-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .tier-card {
    padding: 16px;
  }

  .tier-card-desc {
    min-height: 0;
  }

  .sub-status {
    padding: 16px;
    gap: 14px;
    align-items: flex-start;
  }

  .sub-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .sub-status-title h2 {
    font-size: 18px;
  }

  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .upg-plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .upg-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* ---------- Import, follow-ups, alerts (students import, enquiry history, message provider) ---------- */
.banner.ok {
  background: var(--green-soft);
  border-color: #c7ebd9;
  color: #0d5a43;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-btn:hover,
.link-btn:focus-visible {
  text-decoration: underline;
}

.steps-list {
  margin: 0 0 10px;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.import-errors {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.import-errors .table-wrap {
  border: 0;
}

.import-errors td:first-child {
  width: 54px;
  color: var(--muted);
}

.stat-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.stat-btn:hover {
  border-color: var(--primary);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--surface);
}

.timeline p {
  margin: 2px 0;
  font-size: 13.5px;
}

/* ---------- Homework list (staff page + parent portal) ---------- */
.hw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.hw-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.hw-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hw-list li:first-child {
  padding-top: 0;
}

.hw-title {
  margin: 6px 0 2px;
  font-weight: 600;
  font-size: 15px;
}

.hw-details {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--text-2);
  white-space: pre-line;
}

fieldset.field {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

fieldset.field legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

/* ---------- Parent portal ---------- */
.parent-app {
  background: var(--bg, #f5f7fb);
}

.pp-wrap {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 0 14px;
}

.pp-top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.pp-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 10px;
}

.brand-plain {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none !important;
}

.brand-plain .brand-mark {
  width: 30px;
  height: 30px;
}

#pp-main {
  padding-top: 16px;
  padding-bottom: 40px;
  display: grid;
  gap: 14px;
}

.pp-login {
  max-width: 420px;
  margin: 24px auto 0;
  text-align: center;
  padding: 26px 22px;
}

.pp-login form {
  text-align: left;
}

.pp-login h1 {
  font-size: 22px;
  margin: 6px 0;
}

.pp-login-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.pp-login-icon .icon {
  width: 26px;
  height: 26px;
}

.pp-kids {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pp-child {
  display: flex;
  gap: 14px;
  align-items: center;
}

.pp-child h1 {
  font-size: 20px;
}

.pp-child p {
  margin: 2px 0 0;
}

.pp-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: none;
}

.pp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.pp-grid>.card {
  margin: 0;
}

.pp-notice {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.pp-notice:last-child {
  border-bottom: 0;
}

.pp-notice p {
  margin: 6px 0 0;
  font-size: 14px;
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}

.cal>b {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cal-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-height: 52px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-alt, #f1f4fa);
  color: var(--text-2);
}

.cal-present {
  background: var(--green-soft);
  color: var(--green);
}

.cal-absent {
  background: var(--red-soft);
  color: var(--red);
}

.cal-late {
  background: var(--blue-soft);
  color: var(--primary-dark);
}

.cal-leave {
  background: var(--amber-soft);
  color: #8a5a00;
}

.cal-holiday {
  background: #eef0f5;
  color: var(--muted);
}

.cal-sun {
  color: var(--muted);
  background: transparent;
}

.cal-today {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.cal-legend {
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cal-legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

@media (max-width: 640px) {
  .pp-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pp-child h1 {
    font-size: 18px;
  }

  .pp-logo {
    display: none;
  }
}

/* ---------- Form controls: dropdowns, date & time pickers — the same clean look in every browser ----------
   Native pickers are kept on purpose (the phone's own calendar / clock: familiar, accessible, no extra script);
   only their look is styled. A tap anywhere on a date / time field opens the picker (see the app script). */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2718%27%20height%3D%2718%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%235b687d%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m6%209%206%206%206-6%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
  padding-right: 36px !important;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

select:not([multiple]):not([size]):hover:not(:disabled):not(:focus) {
  border-color: var(--primary);
}

select::-ms-expand {
  display: none;
}

select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

select option {
  font-weight: 400;
}

input[type="date"],
input[type="time"],
input[type="month"],
input[type="week"],
input[type="datetime-local"] {
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]:hover:not(:disabled):not(:focus),
input[type="time"]:hover:not(:disabled):not(:focus),
input[type="month"]:hover:not(:disabled):not(:focus),
input[type="datetime-local"]:hover:not(:disabled):not(:focus) {
  border-color: var(--primary);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  width: 20px;
  height: 20px;
  padding: 3px;
  margin-left: 6px;
  border-radius: 6px;
  color: transparent;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2718%27%20height%3D%2718%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23315bcb%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%273%27%20y%3D%274%27%20width%3D%2718%27%20height%3D%2718%27%20rx%3D%273%27%2F%3E%3Cpath%20d%3D%27M16%202v4M8%202v4M3%2010h18%27%2F%3E%3C%2Fsvg%3E") center / 18px 18px no-repeat;
}

input[type="time"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2718%27%20height%3D%2718%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23315bcb%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27%2F%3E%3Cpath%20d%3D%27M12%207v5l3%202%27%2F%3E%3C%2Fsvg%3E");
}

input::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(49, 91, 203, 0.12);
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="month"]::-webkit-datetime-edit-text {
  color: #8a94a6;
  padding: 0 2px;
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #315bcb;
  cursor: pointer;
}

input[type="file"] {
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #f5f7fb;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(49, 91, 203, 0.12);
  border-color: #315bcb;
}

/* ---------- Dropdown list (the open list, not only the box) ----------
   Chrome / Edge 135+ let a <select> be styled completely ("customizable select"): rounded list, shadow, hover, a tick
   on the chosen option. Other browsers keep their own native list (still fully usable). Nothing changes for scripts:
   it is the same <select>, so every value / change handler keeps working. */
@supports (appearance: base-select) {

  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }

  select:not([multiple]):not([size]) {
    background-image: none !important;
    padding-right: 12px !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  select:not([multiple]):not([size])::picker-icon {
    content: "";
    width: 18px;
    height: 18px;
    margin-left: auto;
    flex: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2718%27%20height%3D%2718%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%235b687d%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m6%209%206%206%206-6%27%2F%3E%3C%2Fsvg%3E") center / 18px 18px no-repeat;
    transition: rotate 0.18s ease;
  }

  select:not([multiple]):not([size]):open::picker-icon {
    rotate: 180deg;
  }

  select:not([multiple]):not([size]):open {
    border-color: #315bcb;
    box-shadow: 0 0 0 3px #ebf0fc;
  }

  select::picker(select) {
    border: 1px solid #dde3ec;
    border-radius: 12px;
    padding: 6px;
    margin-block: 6px;
    background: #fff;
    color: #1d2436;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
    max-height: min(340px, 60vh);
    overflow-y: auto;
    min-width: anchor-size(width);
    opacity: 0;
    translate: 0 -4px;
    transition: opacity 0.14s ease, translate 0.14s ease, overlay 0.14s allow-discrete, display 0.14s allow-discrete;
  }

  select:open::picker(select) {
    opacity: 1;
    translate: 0 0;
  }

  @starting-style {
    select:open::picker(select) {
      opacity: 0;
      translate: 0 -4px;
    }
  }

  select option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.35;
    color: #1d2436;
    cursor: pointer;
    white-space: normal;
    transition: background 0.1s;
  }

  select option:hover,
  select option:focus-visible {
    background: color-mix(in srgb, #ebf0fc 55%, #fff);
    color: #2549a8;
    outline: none;
  }

  select option:checked {
    background: #ebf0fc;
    color: #2549a8;
    font-weight: 600;
  }

  select option::checkmark {
    order: 1;
    margin-left: auto;
    content: "✓";
    color: #315bcb;
    font-weight: 700;
  }

  select option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  select optgroup {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6a7385;
    padding: 8px 12px 4px;
  }
}

/* ---------- Date, month & time picker (js/datepicker.js) ---------- */
:root {
  --dp-accent: #315bcb;
  --dp-soft: #ebf0fc;
  --dp-dark: #2549a8;
}

html.dp-on input[type="date"]::-webkit-calendar-picker-indicator,
html.dp-on input[type="month"]::-webkit-calendar-picker-indicator,
html.dp-on input[type="time"]::-webkit-calendar-picker-indicator {
  display: none;
}

html.dp-webkit input[type="date"],
html.dp-webkit input[type="month"] {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2718%27%20height%3D%2718%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23315bcb%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%273%27%20y%3D%274%27%20width%3D%2718%27%20height%3D%2718%27%20rx%3D%273%27%2F%3E%3Cpath%20d%3D%27M16%202v4M8%202v4M3%2010h18%27%2F%3E%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 18px 18px !important;
  padding-right: 38px !important;
}

html.dp-webkit input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2718%27%20height%3D%2718%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23315bcb%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27%2F%3E%3Cpath%20d%3D%27M12%207v5l3%202%27%2F%3E%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 18px 18px !important;
  padding-right: 38px !important;
}

html.dp-on input[type="date"],
html.dp-on input[type="month"],
html.dp-on input[type="time"] {
  cursor: pointer;
  caret-color: transparent;
}

.dp {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 2147483000;
  width: 312px;
  max-width: calc(100vw - 16px);
  padding: 14px;
  box-sizing: border-box;
  background: #fff;
  color: #1d2436;
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18), 0 3px 10px rgba(15, 23, 42, 0.08);
  font: 400 14px/1.3 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: dp-in 0.14s ease-out;
}

.dp:focus {
  outline: none;
}

@keyframes dp-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.dp button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dp button:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 1px;
}

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dp-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 700 !important;
  font-size: 15px !important;
}

.dp-title:hover {
  background: #f2f4f8;
}

.dp-title svg {
  color: #6a7385;
}

.dp-nav {
  display: flex;
  gap: 2px;
}

.dp-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #4a5263 !important;
}

.dp-arrow:hover {
  background: var(--dp-soft);
  color: var(--dp-dark) !important;
}

.dp-week,
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.dp-week span {
  font-size: 11.5px;
  font-weight: 600;
  color: #8a94a6;
  padding: 4px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dp-grid {
  row-gap: 2px;
}

.dp-day {
  height: 38px;
  width: 38px;
  margin: 0 auto;
  border-radius: 50%;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background 0.1s;
}

.dp-day:hover:not(:disabled) {
  background: var(--dp-soft);
  color: var(--dp-dark);
}

.dp-day.is-other {
  color: #b3bac7;
}

.dp-day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--dp-accent);
  color: var(--dp-accent);
  font-weight: 700;
}

.dp-day.is-selected,
.dp-day.is-selected:hover {
  background: var(--dp-accent) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--dp-accent) 35%, transparent);
}

.dp-day:disabled {
  color: #d2d7e0;
  cursor: not-allowed;
  text-decoration: line-through;
}

.dp-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 0 2px;
}

.dp-month {
  height: 46px;
  border-radius: 12px !important;
  font-weight: 600;
  background: #f6f7fa !important;
}

.dp-month:hover:not(:disabled) {
  background: var(--dp-soft) !important;
  color: var(--dp-dark);
}

.dp-month.is-today {
  box-shadow: inset 0 0 0 1.5px var(--dp-accent);
  color: var(--dp-accent);
}

.dp-month.is-selected {
  background: var(--dp-accent) !important;
  color: #fff !important;
}

.dp-month:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf0f5;
}

.dp-foot-r {
  display: flex;
  gap: 6px;
}

.dp-link {
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600 !important;
  color: #5b687d !important;
}

.dp-link:hover {
  background: #f2f4f8;
  color: #1d2436 !important;
}

.dp-btn {
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 700 !important;
  background: var(--dp-accent) !important;
  color: #fff !important;
}

.dp-btn:hover {
  filter: brightness(1.08);
}

/* time */
.dp-time-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 12px;
}

.dp-time-big {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #1d2436;
}

.dp-time-big i {
  font-style: normal;
  color: var(--dp-accent);
  padding: 0 2px;
}

.dp-ampm {
  display: inline-flex;
  padding: 3px;
  background: #f1f3f7;
  border-radius: 10px;
}

.dp-ampm button {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700 !important;
  font-size: 13px !important;
  color: #6a7385 !important;
}

.dp-ampm button.is-selected {
  background: #fff;
  color: var(--dp-accent) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.dp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dp-cols small {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a94a6;
  margin: 0 0 6px 4px;
}

.dp-col {
  height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: start;
  gap: 4px;
  padding: 2px;
  scrollbar-width: thin;
}

.dp-opt {
  height: 36px;
  border-radius: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #f6f7fa !important;
}

.dp-opt:hover {
  background: var(--dp-soft) !important;
  color: var(--dp-dark);
}

.dp-opt.is-selected {
  background: var(--dp-accent) !important;
  color: #fff !important;
}

/* phones: a bottom sheet */
.dp-back {
  position: fixed;
  inset: 0;
  margin: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 2147482999;
  animation: dp-fade 0.15s ease-out;
}

@keyframes dp-fade {
  from {
    opacity: 0;
  }
}

.dp.dp-sheet {
  left: 0 !important;
  right: 0;
  bottom: 0;
  top: auto !important;
  width: 100%;
  max-width: none;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  animation: dp-up 0.2s ease-out;
}

.dp.dp-sheet::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #d5dae3;
  margin: -6px auto 12px;
}

.dp-sheet .dp-day {
  height: 44px;
  width: 44px;
  font-size: 15px;
}

.dp-sheet .dp-col {
  height: 240px;
}

.dp-sheet .dp-opt {
  height: 42px;
}

@keyframes dp-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .dp,
  .dp-back,
  .dp.dp-sheet {
    animation: none;
  }
}
/* Login / sign-up / OTP: fit common phone and laptop screens without page scrolling. Only spacing is tightened —
   every field, message, consent box and button stays visible; very short screens still scroll normally. */
.auth-split {
  min-height: 100svh;
}

@media (min-width: 1024px) and (max-height: 900px) {
  .auth-panel { padding-top: 24px; padding-bottom: 24px; }
  .auth-tabs { margin-bottom: 20px; }
  .auth-form { gap: 12px; }
  .auth-form header { margin-bottom: 0; }
  .auth-form h2 { font-size: 24px; margin-bottom: 4px; }
  .auth-field { gap: 5px; }
  .auth-form .input-group { height: 44px; }
  .auth-note { margin-top: 18px; padding-top: 14px; }
  .forgot-steps li { padding: 10px 12px; }
}

@media (max-width: 1023px) {
  .auth-panel { padding-top: 18px; padding-bottom: 18px; }
  .auth-mobile-brand { margin-bottom: 14px; }
  .auth-tabs { margin-bottom: 16px; }
  .auth-form { gap: 11px; }
  .auth-form header { margin-bottom: 0; }
  .auth-form h2 { margin-bottom: 2px; }
  .auth-form header p { font-size: 14px; }
  .auth-field { gap: 5px; }
  .auth-form .input-group { height: 44px; }
  .auth-note { margin-top: 16px; padding-top: 12px; }
  .forgot-steps li { padding: 10px 12px; }
}

/* Board + Mobile number stay side by side down to 380px wide; slimmer padding inside so the placeholder fits. */
@media (min-width: 380px) and (max-width: 520px) {
  .auth-form .field-pair { grid-template-columns: 1fr 1fr; }
  .auth-form .field-pair .input-group .prefix { min-width: 40px; padding: 0 8px; }
  .auth-form .field-pair .input-group input { padding: 0 10px; }
}

/* Shorter screens (768px laptops, most phones): a little less space around the form and its footer. */
@media (max-height: 820px) {
  .auth-panel { padding-top: 14px; padding-bottom: 14px; }
  .auth-tabs { margin-bottom: 14px; }
  .auth-tabs button { padding: 8px; }
  .auth-form { gap: 10px; }
  .auth-note { margin-top: 12px; padding-top: 10px; }
  .auth-legal { margin-top: 8px; }
}
