:root {
  color-scheme: light;
  --ink: #111a33;
  --muted: #667085;
  --line: #dfe5ee;
  --paper: #ffffff;
  --ground: #f3f6fb;
  --cyan: #69e3ef;
  --amber: #ffbd5c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ground); }
body { min-height: 100vh; margin: 0; background: var(--ground); color: #142033; }
a { color: inherit; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }

.shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 64px; }
.shell.wide { width: min(1160px, calc(100% - 32px)); }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 56px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark, .hero-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: white; font-size: 14px; font-weight: 900; }
.brand strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 2px; color: #7d8799; font-size: 11px; }
.lang { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 4px 14px rgba(17,26,51,.05); }
.lang a { padding: 5px 9px; border-radius: 7px; color: #7c879a; font-size: 11px; font-weight: 800; text-decoration: none; }
.lang a.active { background: var(--ink); color: white; }

.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.auth-layout { display: grid; width: min(1120px, 100%); min-height: min(760px, calc(100vh - 40px)); overflow: hidden; border: 1px solid rgba(210,218,230,.85); border-radius: 30px; background: white; box-shadow: 0 30px 90px rgba(17,26,51,.14); grid-template-columns: .9fr 1.1fr; }
.hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 42px; background: var(--ink); color: white; }
.hero::before, .hero::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.hero::before { top: -100px; right: -90px; width: 330px; height: 330px; }
.hero::after { top: -20px; right: 5px; width: 170px; height: 170px; border-color: rgba(255,189,92,.4); }
.hero > * { position: relative; z-index: 1; }
.hero-mark { background: white; color: var(--ink); }
.eyebrow { margin: 0 0 16px; color: #cb7d0c; font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.hero .eyebrow { color: var(--amber); }
.hero h1 { max-width: 470px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4vw, 55px); font-weight: 600; line-height: 1.04; letter-spacing: -.045em; }
.hero p:not(.eyebrow) { max-width: 470px; margin: 22px 0 0; color: #c8cfdb; font-size: 16px; line-height: 1.75; }
.hero ul { display: grid; gap: 13px; padding: 0; margin: 35px 0 0; list-style: none; color: #e5e9f0; font-size: 14px; font-weight: 650; }
.hero li::before { content: "✓"; display: inline-grid; width: 20px; height: 20px; margin-right: 10px; place-items: center; border-radius: 50%; background: rgba(105,227,239,.15); color: var(--cyan); }
.auth-side { display: flex; flex-direction: column; width: min(560px, 100%); margin: auto; padding: 42px 56px 28px; }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 29px; border-radius: 12px; background: #f0f3f7; }
.tabs button { padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: #6c7687; font-size: 14px; font-weight: 750; }
.tabs button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(17,26,51,.08); }
.auth-card h2, .center-card h1, .admin-head h1 { margin: 0; color: var(--ink); font-size: 28px; letter-spacing: -.035em; }
.auth-card > p, .center-card > p, .admin-head p { margin: 8px 0 25px; color: var(--muted); font-size: 14px; line-height: 1.65; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d6dde8; border-radius: 11px; outline: none; background: white; color: #152039; transition: border .15s, box-shadow .15s; }
input:focus, select:focus { border-color: #7f9fd5; box-shadow: 0 0 0 3px rgba(87,127,191,.14); }
label small { color: #8a93a2; font-size: 11px; font-weight: 500; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.primary, .secondary, .danger { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; text-decoration: none; }
.primary { background: var(--ink); color: white; }
.primary:hover { background: #1d2c52; }
.secondary { border-color: #d5dde9; background: white; color: #263653; }
.danger { border-color: #f4b8b8; background: #fff2f2; color: #a22323; }
.privacy { display: block; text-align: center; color: #8a93a2; font-size: 11px; line-height: 1.5; }
.admin-link { align-self: flex-end; margin-top: auto; padding-top: 30px; color: #9199a7; font-size: 11px; text-decoration: none; }
.alert { margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; font-size: 13px; font-weight: 650; }
.alert.error { border: 1px solid #f5c6c6; background: #fff2f2; color: #9a2525; }

.center-card { padding: 38px; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 22px 60px rgba(17,26,51,.09); text-align: center; }
.center-card .eyebrow { margin-top: 9px; }
.center-card > p { max-width: 520px; margin-right: auto; margin-left: auto; }
.status-icon { display: grid; width: 58px; height: 58px; margin: 0 auto 20px; place-items: center; border-radius: 18px; background: #fff3dc; color: #a05d00; font-size: 23px; font-weight: 900; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.actions form { display: block; }
.account { text-align: left; }
.account .eyebrow, .account > p { margin-left: 0; text-align: left; }
.account dl { display: grid; gap: 13px; margin: 28px 0 0; }
.account dl div { padding: 13px 15px; border-radius: 13px; background: #f7f9fc; }
dt { color: #8a93a2; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
dd { margin: 4px 0 0; color: #263653; font-size: 14px; font-weight: 650; }
.account .actions { justify-content: flex-start; }

.hub-intro { max-width: 730px; padding: 20px 0 38px; }
.greeting { margin: 0 0 5px !important; font-weight: 750; }
.hub-intro h1 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 7vw, 70px); font-weight: 600; line-height: 1.05; letter-spacing: -.05em; }
.hub-intro > p:last-child { max-width: 650px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.subject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.subject { position: relative; overflow: hidden; min-height: 440px; padding: 31px; border-radius: 28px; box-shadow: 0 22px 60px rgba(17,26,51,.1); }
.subject.dark { background: var(--ink); color: white; }
.subject.light { border: 1px solid var(--line); background: white; color: var(--ink); }
.subject-icon { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 16px; background: var(--cyan); color: var(--ink); font-size: 24px; font-weight: 900; }
.subject-icon.amber { background: #fff0d4; color: #986000; }
.badge { position: absolute; top: 32px; right: 32px; padding: 6px 10px; border: 1px solid #f0d59f; border-radius: 999px; background: #fff8e8; color: #8c5b00; font-size: 11px; font-weight: 800; }
.badge.ready { border: 0; background: rgba(89,224,166,.14); color: #8df0c2; }
.subject h2 { margin: 33px 0 0; font-size: 33px; letter-spacing: -.04em; }
.subject > p { max-width: 470px; margin: 12px 0 0; color: #657188; font-size: 14px; line-height: 1.65; }
.subject.dark > p { color: #c0c8d7; }
.module { display: grid; gap: 8px; padding: 20px; margin-top: 31px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.07); }
.module strong { font-size: 18px; }
.module small { color: #99a4b7; line-height: 1.5; }
.module .button { justify-self: start; margin-top: 10px; background: var(--cyan); color: var(--ink); }
.subject.light > .button { position: absolute; right: 31px; bottom: 31px; left: 31px; }
.hub-footer { padding: 22px 4px; text-align: center; }
.hub-footer a { color: #7b8595; font-size: 12px; }

.admin-login form { max-width: 420px; margin: 25px auto 0; text-align: left; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-head p { margin-bottom: 0; }
.admin-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.admin-head-actions form { display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stats div { display: flex; align-items: baseline; gap: 9px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.stats strong { color: var(--ink); font-size: 23px; }
.stats span { color: #7d8797; font-size: 12px; font-weight: 700; }
.admin-search { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 18px; }
.student-list { display: grid; gap: 12px; }
.student-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(17,26,51,.045); }
.student-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.student-card h3 { margin: 0 0 3px; color: var(--ink); font-size: 18px; }
.student-card header a { color: #66748b; font-size: 12px; }
.state { padding: 5px 9px; border-radius: 999px; background: #eef1f6; color: #667085; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.state.active { background: #e5f8ef; color: #15724b; }
.state.pending { background: #fff2d9; color: #8b5a00; }
.state.revoked, .state.expired { background: #fdeaea; color: #a52d2d; }
.student-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 18px 0; }
.student-card dl div { padding: 10px 12px; border-radius: 11px; background: #f7f9fc; }
.student-actions form { display: flex; grid-template-columns: 1fr auto; gap: 8px; }
.student-actions select { min-height: 41px; }
.empty { padding: 45px; border: 1px dashed #ccd5e2; border-radius: 18px; color: #7c8798; text-align: center; }

@media (max-width: 820px) {
  .auth-body { padding: 0; background: white; }
  .auth-layout { display: block; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .hero { display: none; }
  .auth-side { min-height: 100vh; padding: 26px 20px; }
  .mobile-brand { display: flex; }
  .admin-link { align-self: center; }
  .subject-grid { grid-template-columns: 1fr; }
  .subject { min-height: 400px; }
}

@media (max-width: 560px) {
  .shell, .shell.wide { width: min(100% - 24px, 1160px); padding-top: 14px; }
  .site-head { margin-bottom: 34px; }
  .two, .student-card dl, .stats { grid-template-columns: 1fr; }
  .center-card { padding: 27px 19px; }
  .subject { padding: 24px; border-radius: 22px; }
  .badge { top: 25px; right: 24px; }
  .subject.light > .button { right: 24px; bottom: 24px; left: 24px; }
  .student-actions form { display: grid; grid-template-columns: 1fr; }
  .admin-head { display: block; }
  .admin-head-actions { flex-direction: column; align-items: stretch; margin-top: 16px; }
  .admin-head-actions .button, .admin-head-actions form, .admin-head-actions form button { width: 100%; }
}
