:root {
  color-scheme: light;
  --ink: #172338;
  --muted: #637086;
  --line: #dce4eb;
  --paper: #ffffff;
  --soft: #f4f7f8;
  --teal: #124d82;
  --teal-dark: #081e34;
  --gold: #d8a33c;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(30, 54, 72, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8faf9;
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.platform-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 12%, rgba(14, 129, 122, .16), transparent 30%),
    radial-gradient(circle at 88% 5%, rgba(216, 163, 60, .13), transparent 26%),
    linear-gradient(180deg, #fbfcfb 0%, #f3f7f6 100%);
}

.platform-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.platform-brand img { width: 50px; height: 50px; object-fit: contain; }
.platform-brand span { display: grid; line-height: 1; }
.platform-brand strong { font-size: 1.35rem; letter-spacing: .02em; }
.platform-brand small { margin-top: 6px; color: var(--teal); font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; }

.account-area { display: flex; align-items: center; gap: 14px; }
.account-name { font-size: .9rem; font-weight: 600; }
.ghost-button {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px;
  color: var(--ink); background: rgba(255,255,255,.65);
}

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
  padding: 54px 0 76px;
}

.eyebrow { color: var(--teal); font-weight: 700; font-size: .82rem; letter-spacing: .04em; }
.hero h1 { margin: 18px 0; max-width: 650px; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy > p { max-width: 600px; margin: 0; color: var(--muted); font-size: 1.14rem; line-height: 1.9; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.trust-row span { padding: 9px 13px; border: 1px solid rgba(14,129,122,.18); border-radius: 999px; color: var(--teal-dark); background: rgba(255,255,255,.68); font-size: .78rem; }

.auth-panel { padding: 24px; border: 1px solid rgba(220,228,235,.8); border-radius: 26px; background: rgba(255,255,255,.84); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); }
.auth-tab { padding: 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; }
.auth-tab.is-active { color: var(--ink); background: var(--paper); box-shadow: 0 4px 15px rgba(26,50,68,.08); font-weight: 700; }
.auth-form { margin-top: 24px; }
.form-heading h2 { margin: 0 0 7px; font-size: 1.45rem; }
.form-heading p { margin: 0 0 20px; color: var(--muted); font-size: .86rem; line-height: 1.6; }
.auth-form label { display: grid; gap: 7px; margin: 13px 0; color: #37445a; font-size: .78rem; font-weight: 600; }
.auth-form input, .auth-form select {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 11px;
  padding: 0 13px; color: var(--ink); outline: none; background: #fff;
}
.auth-form input:focus, .auth-form select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,129,122,.11); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.primary-button { width: 100%; min-height: 48px; margin-top: 10px; border: 0; border-radius: 12px; color: #fff; background: var(--teal); font-weight: 700; box-shadow: 0 10px 24px rgba(14,129,122,.2); }
.primary-button:hover { background: var(--teal-dark); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.form-message { margin-top: 14px; padding: 11px 13px; border-radius: 10px; color: var(--danger); background: #fff0ef; font-size: .82rem; }
.link-button { width:100%; margin-top:8px; padding:9px; border:0; color:var(--teal-dark); background:transparent; font-weight:700; }
.security-shield { display:grid; place-items:center; width:48px; height:48px; margin-bottom:12px; border-radius:15px; color:#fff; background:linear-gradient(135deg,var(--teal),#193b51); font-size:1.55rem; }

.security-dialog { width:min(850px,calc(100vw - 28px)); max-height:calc(100vh - 28px); padding:0; border:0; border-radius:22px; background:transparent; box-shadow:0 30px 90px rgba(17,37,52,.35); overflow:auto; }
.security-dialog::backdrop { background:rgba(14,31,44,.62); backdrop-filter:blur(3px); }
.security-card { overflow:hidden; border:1px solid rgba(255,255,255,.7); border-radius:22px; background:#fff; }
.security-card>header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:23px 25px; color:#fff; background:linear-gradient(125deg,#153247,#16756d); }
.security-card>header .eyebrow { color:#99e2ca; }
.security-card>header h2 { margin:7px 0 0; font-size:1.55rem; }
.security-card>header button { width:36px; height:36px; border:1px solid rgba(255,255,255,.3); border-radius:11px; color:#fff; background:rgba(255,255,255,.08); font-size:1.45rem; }
.security-content { display:grid; gap:16px; padding:23px 25px; }
.security-summary { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--soft); }
.security-summary div { display:grid; gap:5px; }
.security-summary strong { font-size:1rem; }
.security-summary small { color:var(--muted); line-height:1.6; }
.security-state { padding:7px 10px; border-radius:999px; color:#8a5b09; background:#fff1cf; font-size:.72rem; font-weight:800; white-space:nowrap; }
.security-state.enabled { color:#075f5b; background:#dff4ee; }
.security-summary-states { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.security-alert-count { padding:7px 10px; border-radius:999px; color:#9f2018; background:#fff0ef; font-size:.72rem; font-weight:800; white-space:nowrap; }
.security-section { padding:16px; border:1px solid var(--line); border-radius:14px; }
.security-section h3 { margin:0 0 6px; font-size:1rem; }
.security-section>p { margin:0 0 14px; color:var(--muted); font-size:.78rem; line-height:1.7; }
.security-subsection { margin-top:15px; padding-top:15px; border-top:1px dashed var(--line); }
.security-subsection h4 { margin:0 0 5px; font-size:.86rem; }
.security-subsection>p { margin:0 0 11px; color:var(--muted); font-size:.74rem; }
.security-form { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; }
.security-form.two-fields { grid-template-columns:1fr 1fr auto; }
.security-form label { display:grid; gap:6px; color:#37445a; font-size:.74rem; font-weight:600; }
.security-form input { min-height:43px; padding:0 12px; border:1px solid var(--line); border-radius:10px; outline:none; }
.security-form input:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(14,129,122,.11); }
.security-form button,.security-action { min-height:43px; padding:8px 15px; border:0; border-radius:10px; color:#fff; background:var(--teal); font-weight:700; }
.security-action.danger,.security-form button.danger { background:#b42318; }
.security-action.secondary { color:var(--teal-dark); background:#e5f4f1; }
.security-setup { display:grid; gap:13px; padding:16px; border:1px solid rgba(14,129,122,.28); border-radius:14px; background:#f2faf8; }
.security-secret { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px; border:1px dashed #8fcac3; border-radius:10px; background:#fff; }
.security-secret code { direction:ltr; font-size:1rem; letter-spacing:.13em; word-break:break-all; }
.security-recovery { display:grid; gap:12px; text-align:center; }
.recovery-codes { display:grid; grid-template-columns:repeat(2,1fr); gap:7px; direction:ltr; }
.recovery-codes code { padding:9px; border:1px solid var(--line); border-radius:8px; background:var(--soft); font-size:.8rem; }
.session-list { display:grid; gap:8px; }
.session-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid var(--line); border-radius:11px; }
.session-row>div { display:grid; gap:4px; min-width:0; }
.session-row strong { font-size:.8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.session-row small { color:var(--muted); font-size:.68rem; }
.session-row button { padding:7px 10px; border:1px solid #efb8b4; border-radius:8px; color:#9f2018; background:#fff4f3; font-size:.7rem; font-weight:700; }
.security-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:12px; }
.security-section-heading h3 { margin:0 0 5px; }
.security-section-heading p { margin:0; color:var(--muted); font-size:.74rem; }
.security-events { display:grid; gap:8px; }
.security-event { display:grid; grid-template-columns:9px 1fr; gap:10px; align-items:start; padding:10px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.security-event.is-alert { border-color:#f0b6b2; background:#fff8f7; }
.security-event-mark { width:8px; height:8px; margin-top:5px; border-radius:50%; background:#8ea0ad; }
.security-event.is-alert .security-event-mark { background:#c7362d; box-shadow:0 0 0 4px rgba(199,54,45,.1); }
.security-event>div { display:grid; gap:4px; min-width:0; }
.security-event strong { font-size:.78rem; }
.security-event small { color:var(--muted); font-size:.66rem; line-height:1.6; }
.security-card>.form-message { margin:0 25px 22px; }

.products-section { padding: 80px 0 100px; border-top: 1px solid rgba(220,228,235,.75); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.035em; }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); line-height: 1.7; font-size: .9rem; }
.products-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; }
.product-card { min-height: 236px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.8); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.product-card.has-access { border-color: rgba(14,129,122,.38); }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(30,54,72,.1); }
.product-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: #e8f4f2; font-size: 1.35rem; }
.product-card h3 { margin: 18px 0 8px; font-size: 1rem; line-height: 1.5; }
.product-card p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.65; }
.product-actions { display: grid; gap: 7px; margin-top: auto; padding-top: 18px; }
.tenant-button, .unavailable-button { min-height: 36px; border-radius: 9px; padding: 7px 10px; font-size: .72rem; font-weight: 700; }
.tenant-button { border: 0; color: #fff; background: var(--teal); }
.unavailable-button { border: 1px solid var(--line); color: #8a94a3; background: var(--soft); cursor: default; }
.status-pill { align-self: flex-start; margin-top: 12px; padding: 5px 8px; border-radius: 999px; color: var(--teal-dark); background: #e5f4f1; font-size: .66rem; font-weight: 700; }
.status-pill.is-unavailable { color: var(--danger); background: #fff0ef; }
.tenant-access { display: grid; gap: 7px; }
.tenant-status, .tenant-expiry { font-size: .875rem; line-height: 1.7; }
.tenant-status { color: var(--teal-dark); }
.tenant-status.is-unavailable { color: var(--danger); }
.tenant-expiry { color: var(--muted); }
.tenant-button:disabled { color: #596575; background: var(--soft); border: 1px solid var(--line); cursor: not-allowed; }
.platform-message { font-size: .95rem; line-height: 1.8; border: 1px solid currentColor; }
.loading-card { height: 236px; border-radius: 19px; background: linear-gradient(100deg,#edf1f2 30%,#f8fafa 50%,#edf1f2 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -150%; } }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 34px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
[hidden] { display: none !important; }

/* Educational entry: the approved landing's navy/blue/orange identity. */
.platform-bg { background: radial-gradient(circle at 12% 15%, #e8f0f8, transparent 35%), linear-gradient(160deg, #f5f7fa, #fff9f4); }
.education-brand-mark { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:#081e34; color:#fff; font-size:26px; box-shadow:4px 4px 0 #db5a14; }
.platform-brand small { font-size:14px; letter-spacing:0; }
.hero { min-height:510px; gap:clamp(28px,5vw,70px); padding:36px 0 56px; }
.hero h1 { font-size:clamp(2.4rem,5vw,4.7rem); line-height:1.3; letter-spacing:-.02em; }
.hero-copy > p { font-size:17px; }
.eyebrow, .trust-row span, .auth-form label, .form-heading p, .form-message, footer,
.security-section>p, .security-subsection>p, .security-form label,
.session-row small, .session-row button, .security-event small, .security-section-heading p { font-size:14px; }
.home-link { display:inline-block; color:#124d82; font-size:14px; text-decoration:none; margin-top:12px; }
.home-link:hover { text-decoration:underline; }
.primary-button { background:#b84c10; box-shadow:0 10px 24px #b84c1026; }
.primary-button:hover { background:#963b0b; }
.security-card>header { background:linear-gradient(125deg,#081e34,#124d82); }
.products-section { padding:36px 0 60px; }
.section-heading h2 { font-size:clamp(1.5rem,3vw,2rem); }
.products-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.product-card { min-height:220px; background:#fff; }
.empty-school { padding:20px; border:1px solid var(--line); border-radius:14px; grid-column:1/-1; line-height:1.9; }
.auth-form input, .security-form input { min-width:0; }
.account-area { flex-wrap:wrap; justify-content:flex-end; gap:8px; }
:focus-visible { outline:3px solid #b84c10; outline-offset:3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } *, *::before, *::after { animation:none!important; transition:none!important; } }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 35px; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .trust-row { justify-content: center; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .platform-header, main, footer { width: min(100% - 24px, 1180px); }
  .hero { gap: 34px; padding-bottom: 52px; }
  .hero h1 { font-size: 3.2rem; }
  .form-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .account-name { display: none; }
  .security-form,.security-form.two-fields { grid-template-columns:1fr; }
  .recovery-codes { grid-template-columns:1fr; }
  .security-summary,.session-row,.security-section-heading { align-items:stretch; flex-direction:column; }
  .security-summary-states { justify-content:flex-start; }
}
@media (max-width: 430px) {
  .products-grid { grid-template-columns: 1fr; }
  .auth-panel { padding: 17px; }
  footer { flex-direction: column; gap: 8px; }
}
