:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #61707f;
  --line: #d9e2ea;
  --panel: #ffffff;
  --bg: #f5f7f8;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --success: #087443;
  --soft: #eef7f5;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 7px;
  padding: 9px 13px;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  min-height: 38px;
}
button:hover { background: var(--brand-dark); }
button.secondary { background: #e8eef2; color: var(--ink); }
button.danger { background: var(--danger); }
button.success { background: var(--success); }
button.linklike {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--brand-dark);
  text-decoration: underline;
}
button.linklike:hover {
  background: transparent;
}
button, .button-link, .price-card, .feature, .step-card, .hero-board {
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
button:hover, .button-link:hover { transform: translateY(-1px); }

.site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 6%, rgba(15, 118, 110, .12), transparent 28%),
    radial-gradient(circle at 10% 18%, rgba(180, 83, 9, .09), transparent 22%),
    #f7faf9;
  overflow: hidden;
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 34px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
}
.site-brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-dark);
}
.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 10px 24px rgba(15, 118, 110, .22);
  animation: logoFloat 4s ease-in-out infinite;
}
.site-links { display: flex; gap: 18px; }
.site-links a { color: var(--ink); text-decoration: none; }
.site-links a:hover { color: var(--brand-dark); }
.hero {
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 28px;
  align-items: center;
  padding: 58px 34px 34px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-copy {
  animation: slideUp .65s ease both;
}
.hero-copy h1 {
  font-size: 48px;
  line-height: 1.18;
  margin: 14px 0;
}
.hero-copy p { font-size: 18px; line-height: 1.8; color: var(--muted); max-width: 680px; }
.eyebrow {
  display: inline-flex;
  color: var(--brand-dark);
  font-weight: 700;
}
.hero-board {
  background: #17312e;
  color: #fff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 22px 60px rgba(23, 49, 46, .22);
  animation: boardIn .8s ease .12s both, boardFloat 6s ease-in-out 1s infinite;
  position: relative;
  isolation: isolate;
}
.hero-board::before {
  content: "";
  position: absolute;
  inset: 10px 10px auto auto;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(167, 243, 208, .14);
  filter: blur(4px);
  z-index: -1;
}
.board-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.board-row:last-child { border-bottom: 0; }
.board-row strong { color: #a7f3d0; }
.board-caption {
  color: #d1fae5;
  font-size: 13px;
  margin-bottom: 8px;
}
.site-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 34px;
}
.trust, .feature-grid, .pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.public-stats, .steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.trust div, .feature, .price-card, .branch-map div, .faq details, .public-stats div, .step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.trust div:hover, .feature:hover, .price-card:hover, .step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(23, 32, 42, .08);
  border-color: rgba(15, 118, 110, .28);
}
.trust strong, .trust span, .public-stats strong, .public-stats span { display: block; }
.public-stats strong {
  font-size: 28px;
  color: var(--brand-dark);
}
.step-card strong {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand-dark);
  margin-bottom: 10px;
}
.trust span, .feature p, .price-card p, .faq p { color: var(--muted); line-height: 1.7; }
.feature h3, .price-card h3 { margin: 0 0 8px; }
.price-card strong { display: block; font-size: 30px; margin: 10px 0; }
.price-card ul { padding-inline-start: 18px; line-height: 2; color: var(--muted); }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}
.branch-map { display: grid; gap: 10px; }
.branch-map div {
  display: flex;
  justify-content: space-between;
}
.branch-map span { color: var(--brand-dark); font-weight: 700; }
.faq details { margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.site-cta {
  margin-top: 24px;
  padding: 48px 24px;
  text-align: center;
  background: #17312e;
  color: #fff;
}
.site-footer {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 28px 34px;
  background: #102724;
  color: #d8f5ef;
}
.site-footer p {
  color: #b7d7d1;
  margin: 10px 0 0;
  max-width: 520px;
}
.site-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.site-footer a { color: #d8f5ef; text-decoration: none; }
.site-footer small { color: #a8c7c1; }
.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 7px;
  padding: 9px 13px;
  color: #fff;
  background: var(--brand);
  text-decoration: none;
}
.button-link.secondary { background: #e8eef2; color: var(--ink); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes boardIn {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes boardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes logoFloat {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-2px); }
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #e9f7f4, #f7f1e7);
}
.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(23, 32, 42, .08);
}
.student-portal {
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}
.student-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.student-head p { margin: 6px 0 0; color: var(--muted); }
.scan-panel {
  border-color: rgba(15, 118, 110, .35);
  background: #f8fffd;
}
.qr-box {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.qr-box img {
  width: 240px;
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #17312e;
  color: #e8fffb;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { font-size: 20px; font-weight: 700; margin: 4px 8px 22px; }
.nav button {
  width: 100%;
  text-align: right;
  background: transparent;
  margin-bottom: 6px;
  color: #d8f5ef;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,.12); }
.content { padding: 22px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
h1 { margin: 0; font-size: 26px; }
h2 { margin: 0 0 14px; font-size: 18px; }
.muted { color: var(--muted); }

.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.two { grid-template-columns: 1fr 1fr; }
.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.stat strong { display: block; font-size: 26px; margin-top: 8px; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.top-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.top-select select {
  width: 180px;
}
.billing-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.actions.compact { gap: 6px; }
.actions.compact button { min-height: 32px; padding: 6px 9px; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
  min-height: 38px;
}
label { display: grid; gap: 6px; color: var(--muted); }
.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-field input {
  width: 150px;
}
.field-action {
  display: flex;
  align-items: end;
}
.field-action button { width: 100%; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}
.form-grid .wide { grid-column: 1 / -1; }
.wide-panel { grid-column: 1 / -1; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}
th { background: #eef3f4; color: #30424e; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand-dark);
  white-space: nowrap;
}
.badge.warn { background: #fff4df; color: var(--accent); }
.badge.danger { background: #ffe8e6; color: var(--danger); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 10;
}
.modal-content {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  border: 1px solid var(--line);
}
.receipt-box { max-width: 520px; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.empty { padding: 24px; text-align: center; color: var(--muted); }
.toast {
  position: fixed;
  bottom: 18px;
  left: 18px;
  background: #17202a;
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  z-index: 20;
}
.receipt {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
.receipt h2 { text-align: center; margin-bottom: 6px; }
.receipt p { text-align: center; color: var(--muted); }
.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.receipt-line:last-child { border-bottom: 0; }

@media (max-width: 920px) {
  .site-nav { align-items: flex-start; flex-direction: column; padding: 14px; }
  .site-links { flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; padding: 32px 14px; min-height: auto; }
  .hero-copy h1 { font-size: 34px; }
  .trust, .feature-grid, .pricing-grid, .split, .public-stats, .steps-grid { grid-template-columns: 1fr; }
  .contact-band { align-items: flex-start; flex-direction: column; }
  .site-footer { grid-template-columns: 1fr; padding: 24px 14px; }
  .site-section { padding: 28px 14px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .stats, .two, .form-grid { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media print {
  body { background: #fff; }
  .layout, .modal { display: block; }
  .sidebar, .content, .no-print, .toast { display: none !important; }
  .modal {
    position: static;
    background: #fff;
    padding: 0;
  }
  .modal-content {
    border: 0;
    box-shadow: none;
    max-height: none;
    width: 100%;
  }
  .receipt { border: 0; }
}
