html {
  background: var(--paper);
}

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Poppins:wght@400;500;600;700&display=swap');

/* =========================================================
   GLOBAL DESIGN VARIABLES
   ========================================================= */

:root{
  --paper:#FBF8F5;
  --surface:#FFFFFF;
  --surface-soft:#F8F5F3;

  --ink:#242331;
  --muted:#74717B;

  --accent:#AA4465;
  --accent-soft:#F8EDF1;

  --border:rgba(36,35,49,.12);
  --border-strong:rgba(36,35,49,.24);

  --red:#B3261E;
  --red-d:#FBE9E7;

  --green:#2E7D4F;
  --green-d:#E8F4EC;

  --serif:'Instrument Serif', Georgia, serif;
  --inter:'Poppins', Arial, sans-serif;
  --sans:'Poppins', Arial, sans-serif;
  --oswald:'Poppins', Arial, sans-serif;

  --r-sm:14px;
  --r:18px;
  --r-lg:24px;

  --shadow-sm:0 3px 10px rgba(36,35,49,.06);
  --shadow-md:0 10px 28px rgba(36,35,49,.10);
}

/* =========================================================
   RESET
   ========================================================= */

*{
  box-sizing:border-box;
}

html{
  margin:0;
  background:var(--paper);
  scrollbar-gutter:stable;
}

body{
  min-height:100dvh;
  margin:0;
  overflow-x:hidden;

  background:var(--paper);
  color:var(--ink);

  font-family:var(--inter);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--inter);
  min-height: 100dvh;
  overflow-x: hidden;
}

.screen {
  display: none;
  min-height: 100dvh;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

#ob-college, #ob-login, #ob-phone, #ob-done {
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  gap: 0;
  background: var(--paper);
}

.ob-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  margin-bottom: 2.25rem;
}

.ob-logo-mark {
  width: 64px;
  height: 64px;
  background: var(--ink);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.ob-logo-mark svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}

.ob-wordmark {
  font-family: var(--oswald);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--ink);
}

.ob-tagline {
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ob-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: var(--shadow-md);
}

.ob-card h2 {
  font-family: var(--oswald);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.ob-card p {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.55;
}

.field, .modal-field {
  display: flex;
  flex-direction: column;
  gap: .42rem;
}

.field label, .modal-field label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.dropdown-wrap {
  position: relative;
}

.dropdown-wrap input, .ob-input, .modal-input {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: .9rem 1rem;
  color: var(--ink);
  font-family: var(--inter);
  font-size: .95rem;
  outline: none;
  transition: border-color .18s,box-shadow .18s;
}

.dropdown-wrap input:focus, .ob-input:focus, .modal-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(36,35,49,.08);
}

.dropdown-list, .search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  z-index: 50;
  display: none;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.dropdown-list.open, .search-results.open {
  display: block;
}

.dropdown-item, .sr-item {
  padding: .8rem 1rem;
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s;
  color: var(--ink);
  border-bottom: 1px solid rgba(36,35,49,.08);
}

.dropdown-item:last-child, .sr-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover, .dropdown-item.selected, .sr-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.ob-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 1rem;
  font-family: var(--oswald);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  transition: transform .1s,box-shadow .18s;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(170,68,101,.18);
}

.ob-btn:active {
  transform: scale(.98);
  box-shadow: none;
}

.ob-btn.secondary {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
  box-shadow: none;
}

.ob-err {
  font-size: .78rem;
  color: var(--red);
  min-height: 1em;
  text-align: center;
}

.step-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 1.5rem;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(36,35,49,.18);
}

.step-dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

.step-dot.done {
  background: var(--ink);
}

#ob-phone {
  background: var(--paper);
}

.phone-screen-inner {
  width: 100%;
  max-width: 380px;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.1rem;
  padding: 1.35rem 0;
}

.phone-label {
  font-family: var(--serif);
  font-size: clamp(2.1rem,8vw,2.7rem);
  font-weight: 400;
  line-height: .95;
  color: var(--ink);
  text-align: center;
  margin-top: .35rem;
  letter-spacing: -.025em;
}

.phone-sublabel {
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  margin: .45rem 0 1.2rem;
  line-height: 1.45;
}

.phone-display {
  background: #fff;
  border: 1px solid rgba(36,35,49,.12);
  border-radius: 22px;
  height: 78px;
  padding: 0 1.05rem;
  font-size: clamp(1.08rem,5.8vw,1.5rem);
  font-family: var(--inter);
  font-weight: 400;
  letter-spacing: .075em;
  color: var(--ink);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(36,35,49,.07);
}

.phone-display.filled {
  border-color: rgba(170,68,101,.22);
  box-shadow: 0 8px 24px rgba(170,68,101,.08);
}

.phone-display .placeholder {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0;
}

.keypad {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3,78px);
  justify-content: center;
  gap: .72rem 1.02rem;
}

.key {
  width: 78px;
  height: 78px;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(36,35,49,.08);
  border-radius: 50%;
  text-align: center;
  cursor: pointer;
  transition: background .15s,transform .1s,box-shadow .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .06rem;
  user-select: none;
  box-shadow: 0 4px 14px rgba(36,35,49,.07);
}

.key:active {
  background: var(--accent-soft);
  transform: scale(.96);
  box-shadow: none;
}

.key .num {
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--ink);
  font-family: var(--inter);
  line-height: 1;
}

.key .letters {
  font-size: .52rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: .1rem;
}

.key.del {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.key.del svg {
  width: 25px;
  height: 25px;
  fill: var(--ink);
  opacity: .9;
}

#key-confirm, #key-next {
  grid-column: 1/-1;
  width: 100%;
  height: 56px;
  border-radius: 999px;
  margin-top: .25rem;
}

#key-confirm {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 8px 18px rgba(46,125,79,.16);
}

#key-confirm .num {
  color: #fff!important;
  font-size: .98rem!important;
  font-weight: 600;
  letter-spacing: .01em;
}

#key-next {
  background: #fff;
  border-color: var(--border);
  box-shadow: none;
}

#key-next .num {
  font-size: .9rem!important;
  color: var(--muted)!important;
  font-weight: 600;
}

@media(max-width:360px) {
  .keypad {
    grid-template-columns: repeat(3,72px);
    gap: .65rem .9rem;
  }

  .key {
    width: 72px;
    height: 72px;
  }

  .key .num {
    font-size: 1.55rem;
  }

}

.done-icon {
  width: 72px;
  height: 72px;
  background: var(--green-d);
  border: 2px solid rgba(46,125,79,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  margin-bottom: 0;
}

.done-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#app-main {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--paper);
}

#app-main.active {
  display: flex;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1rem .75rem;
}

.app-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.header-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--ink);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo-mark svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.header-brand-logo {
  display: block;
  width: 58px;
  height: auto;
  flex: 0 0 auto;
}

.header-wordmark {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.025em;
  text-transform: lowercase;
  white-space: nowrap;
  color: var(--ink);
}

@media (max-width: 420px) {
  
  .header-brand-logo {
    width: 52px;
  }


  .header-wordmark {
    font-size: 1rem;
  }
}

.header-wordmark {
  font-family: var(--oswald);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--ink);
}

.header-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.header-time-val {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.header-date-val {
  font-size: .65rem;
  color: var(--muted);
}

.search-wrap {
  position: relative;
  margin-bottom: 0;
}

.search-wrap svg {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.search-input {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: .78rem 1rem .78rem 2.5rem;
  color: var(--ink);
  font-family: var(--inter);
  font-size: .88rem;
  outline: none;
  transition: border-color .18s,box-shadow .18s;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(36,35,49,.08);
}

.sr-item .sr-name {
  color: var(--ink);
  font-weight: 600;
}

.sr-item .sr-dept {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .1rem;
}

.tab-bar {
  display: none;
}

.app-body {
  flex: 1;
  overflow-y: auto;
  padding: .9rem .95rem 6.4rem;
}

.dept-section {
  margin-bottom: .65rem;
}

.dept-row {
  display: flex;
  align-items: center;
  padding: .9rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: background .15s,border-color .2s,box-shadow .2s;
  gap: .75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dept-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transition: background .2s;
}

.dept-row.ref::before {
  background: var(--muted);
}

.dept-row.open {
  border-color: var(--border-strong);
  background: var(--surface-soft);
  box-shadow: var(--shadow-md);
}

.dept-row.open::before {
  background: var(--accent);
}

.dept-row-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.dept-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  border: 1px solid rgba(170,68,101,.14);
  padding: 9px;
  color: var(--accent);
}

.dept-icon svg, .dept-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  stroke: currentColor;
  fill: none;
}

.dept-icon img {
  filter: none;
  max-width: 24px;
  max-height: 24px;
}

.dept-icon svg {
  max-width: 24px;
  max-height: 24px;
}

.dept-row.ref .dept-icon {
  background: rgba(36,35,49,.06);
  border-color: var(--border);
  color: var(--ink);
}

.dept-name-wrap {
  min-width: 0;
}

.dept-name {
  font-family: var(--oswald);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: .035em;
  color: var(--ink);
}

.dept-subtitle {
  font-size: .66rem;
  color: var(--muted);
  margin-top: 1px;
}

.dept-row-right {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.dept-count {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: .18rem .58rem;
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--inter);
}

.dept-row.ref .dept-count {
  background: rgba(36,35,49,.08);
  color: var(--ink);
}

.dept-row.no-number .dept-count {
  background: var(--red-d);
  color: var(--red);
  border: 1px solid rgba(179,38,30,.18);
}

.chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform .25s;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.dept-row.open .chevron {
  transform: rotate(180deg);
}

.student-drawer {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.student-drawer.open {
  display: block;
}

.student-item {
  display: flex;
  align-items: center;
  padding: .82rem 1rem;
  border-bottom: 1px solid rgba(36,35,49,.08);
  gap: .75rem;
}

.student-item:last-child {
  border-bottom: none;
}



.student-avatar, .admin-student-card .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(36,35,49,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}

.student-details {
  flex: 1;
  min-width: 0;
}

.student-name {
  font-size: 1rem;
  font-weight: 575;
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.15;

  white-space: normal;
  overflow: hidden;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-details,
.student-name-row,
.student-name {
  min-width: 0;
}

@media (max-width: 420px) {
  .student-name {
    font-size: 0.92rem;
  }
}

.student-reg {
  font-size: .65rem;
  color: var(--muted);
  font-family: 'Courier New',monospace;
  margin-top: 1px;
}

.call-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  padding: .52rem .78rem;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: opacity .2s,transform .1s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.call-btn:active {
  transform: scale(.94);
  opacity: .85;
}

.call-btn svg {
  width: 13px;
  height: 13px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.call-btn.missing {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
}

.empty-drawer {
  padding: 1rem;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  font-style: italic;
}

.profile-wrap, .admin-wrap {
  padding: 1rem;
}

.profile-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.profile-banner {
  background: linear-gradient(135deg,var(--ink) 0%,#3A3747 100%);
  padding: 1.5rem 1.25rem 2rem;
  position: relative;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 2px solid rgba(255,255,255,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: .75rem;
}

.profile-pname {
  font-family: var(--oswald);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}

.profile-preg {
  font-size: .75rem;
  color: rgba(255,255,255,.72);
  margin-top: .25rem;
  font-family: monospace;
}

.profile-body {
  padding: 1.25rem;
}

.profile-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 0;
  border-bottom: 1px solid rgba(36,35,49,.08);
}

.profile-field:last-child {
  border-bottom: none;
}

.pf-label {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}

.pf-val {
  font-size: .92rem;
  color: var(--ink);
  font-weight: 600;
}

.pf-edit, .edit-btn, .modal-change-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 999px;
  padding: .45rem .75rem;
  font-size: .74rem;
  cursor: pointer;
  font-family: var(--inter);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.posting-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: .34rem .72rem;
  margin-top: .5rem;
}

.posting-badge span {
  font-size: .75rem;
  color: #fff;
  font-weight: 700;
}

.posting-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A8D5BA;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }

}

.admin-stat-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}

.admin-stat {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .8rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.admin-stat-num {
  font-family: var(--oswald);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-stat-lbl {
  font-size: .65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: .2rem;
}

.admin-filter-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .42rem .8rem;
  font-size: .72rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}

.filter-chip.active {
  background: var(--accent-soft);
  border-color: rgba(170,68,101,.22);
  color: var(--accent);
  font-weight: 700;
}

.admin-student-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: var(--shadow-sm);
}

.admin-student-card .info {
  flex: 1;
  min-width: 0;
}

.admin-student-card .name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-student-card .meta {
  font-size: .65rem;
  color: var(--muted);
  margin-top: 2px;
}

.admin-student-card .phone-tag {
  font-size: .7rem;
  color: var(--green);
  background: var(--green-d);
  border-radius: 999px;
  padding: .18rem .48rem;
  margin-top: 4px;
  display: inline-block;
}

.admin-student-card .phone-tag.missing {
  color: var(--red);
  background: var(--red-d);
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
  padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom,0));
  box-shadow: 0 -8px 22px rgba(36,35,49,.08);
}

#app-main.active + .bottom-nav {
  display: flex;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .45rem .25rem;
  cursor: pointer;
  gap: .26rem;
  color: var(--muted);
  transition: color .2s;
  border-radius: 14px;
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.nav-item.hidden {
  display: none;
}

.tools-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-top: .5rem;
}

.tools-card h2 {
  font-family: var(--oswald);
  color: var(--ink);
  font-size: 1.35rem;
}

.tools-card p {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
  margin-top: .5rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36,35,49,.28);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom,0));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 -12px 34px rgba(36,35,49,.18);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: rgba(36,35,49,.18);
  border-radius: 2px;
  margin: 0 auto -.5rem;
}

.modal-title {
  font-family: var(--oswald);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.phone-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .75rem;
}

.phone-edit-current {
  font-weight: 700;
  color: var(--ink);
  font-size: .92rem;
}

.modal-actions {
  display: flex;
  gap: .5rem;
}

.modal-actions button {
  flex: 1;
  padding: .9rem;
  border-radius: 999px;
  font-family: var(--oswald);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .05em;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
}

.btn-save {
  background: var(--accent);
  color: white;
}

.btn-cancel {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border)!important;
}

.app-footer {
  text-align: center;
  padding: 1rem 1.25rem;
  font-size: .68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.toast {
  position: fixed;
  bottom: 5.7rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .72rem 1.25rem;
  font-size: .82rem;
  color: #fff;
  opacity: 0;
  transition: opacity .25s,transform .25s;
  z-index: 999;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hide onboarding and app screens until Firebase restores the session. */
body.auth-loading .screen,
body.auth-loading #app-main {
  visibility: hidden !important;
}

.student-item.search-highlight {
  background: var(--surface-soft) !important;
  box-shadow: inset 3px 0 0 var(--accent);
  position: relative;
  z-index: 1;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.student-item.search-highlight .student-name {
  color: var(--accent-ll);
}

.student-item.search-highlight .student-avatar {
  border-color: var(--accent);
}

.confirm-dialog-sheet { gap: 0.75rem; }
.confirm-dialog-message { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin: 0; }
.confirm-dialog-danger { background: var(--red) !important; }