/* ExamClarity institute portal. Same colours as the public site (from the lighthouse logo). */
:root {
  --navy: #00205C;
  --navy-2: #0B2E73;
  --blue: #0A6CDE;
  --sky: #0C8AF4;
  --sky-50: #EAF4FF;
  --orange: #FE9510;
  --amber: #FEBA34;
  --peach: #FFE6CF;
  --peach-50: #FFF6EC;
  --green: #1FA971;
  --green-50: #E8F8F1;
  --red: #D6453D;
  --red-50: #FDEDEC;
  --ink: #0E1A3A;
  --text: #2C3858;
  --muted: #5F6B8A;
  --line: #E2E9F5;
  --line-2: #CFDBEE;
  --bg: #F6F9FF;
  --f-head: "Comfortaa", "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 24px 60px rgba(0, 32, 92, .12);
  --shadow-sm: 0 10px 30px rgba(0, 32, 92, .07);
  --grad: linear-gradient(120deg, var(--blue), var(--sky));
  --grad-warm: linear-gradient(120deg, var(--orange), var(--amber));
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--f-body); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--f-head); color: var(--navy); line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.55rem, 2.6vw, 1.95rem); font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* Boot screen while auth state loads */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; transition: opacity .25s; }
.boot.gone { opacity: 0; pointer-events: none; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--sky-50); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Auth layout: brand panel + form */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.side { position: sticky; top: 0; height: 100vh; align-self: start; overflow: hidden; padding: 40px 48px; display: flex; flex-direction: column; background: radial-gradient(520px 420px at 92% 8%, rgba(255, 213, 170, .75), transparent 62%), radial-gradient(600px 460px at 0% 100%, rgba(12, 138, 244, .16), transparent 60%), linear-gradient(170deg, #FFFFFF, #F1F6FF); border-right: 1px solid var(--line); }
.side .logo img { height: 48px; width: auto; }
.side-body { margin: auto 0; max-width: 440px; padding: 40px 0; }
.side-body .lh { width: 210px; margin: 0 0 22px -10px; filter: drop-shadow(0 18px 30px rgba(0, 32, 92, .12)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.side h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; }
.side h2 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding-left: 34px; margin: 12px 0; font-weight: 600; color: var(--ink); font-size: .95rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8.5' fill='none' stroke='%231FA971' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.side-foot { font-size: .82rem; color: var(--muted); }

.main { display: flex; flex-direction: column; padding: 28px 24px; }
.main-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.main-top .m-logo img { height: 38px; width: auto; }
.main-top .m-logo { display: none; }
.top-link { font-size: .9rem; color: var(--muted); font-weight: 600; margin-left: auto; }
.top-link a { margin-left: 4px; }
.wrap-form { width: min(460px, 100%); margin: auto; padding: 30px 0; }
.wrap-form.wide { width: min(680px, 100%); }
.lead { color: var(--muted); margin-bottom: 26px; }

/* Stepper */
.steps { display: flex; align-items: center; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.steps li .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line-2); font-size: .78rem; }
.steps li.on { color: var(--navy); }
.steps li.on .n { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(10, 108, 222, .3); }
.steps li.done .n { background: var(--green); border-color: transparent; color: #fff; }
.steps .bar { flex: 1; height: 2px; min-width: 14px; background: var(--line-2); border-radius: 2px; }
.steps .bar.done { background: var(--green); }

/* Card */
.card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow-sm); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 22px; border-radius: 14px; border: 0; cursor: pointer; font-family: var(--f-head); font-weight: 700; font-size: .98rem; color: #fff; background: var(--grad); box-shadow: 0 12px 24px rgba(10, 108, 222, .26); transition: transform .15s, box-shadow .15s, opacity .15s; text-decoration: none !important; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(10, 108, 222, .32); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-warm { background: var(--grad-warm); box-shadow: 0 12px 24px rgba(254, 149, 16, .3); }
.btn-ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--blue), 0 8px 18px rgba(0, 32, 92, .08); }
.btn-google { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); font-family: var(--f-body); font-weight: 700; }
.btn-google:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px #9DB3D6, 0 8px 18px rgba(0, 32, 92, .08); }
.btn-google svg { width: 20px; height: 20px; }
.btn .sp { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-ghost .sp, .btn-google .sp { border-color: var(--sky-50); border-top-color: var(--blue); }
.btn-sm { width: auto; padding: 9px 16px; font-size: .86rem; border-radius: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.link-btn:disabled { color: var(--muted); cursor: default; }

.or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: .82rem; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Fields */
.field { margin-bottom: 18px; }
.field > label, .label { display: block; font-family: var(--f-head); font-weight: 700; font-size: .84rem; color: var(--navy); margin-bottom: 7px; }
.opt { color: var(--muted); font-weight: 600; font-family: var(--f-body); font-size: .78rem; }
.control { position: relative; display: flex; align-items: center; }
.control > svg.i { position: absolute; left: 14px; width: 19px; height: 19px; color: #8A98B8; pointer-events: none; }
.input, select.input, textarea.input { width: 100%; font: inherit; font-size: .97rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line-2); border-radius: 13px; padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.control > svg.i + .input { padding-left: 44px; }
textarea.input { resize: vertical; min-height: 84px; }
select.input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%235F6B8A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center/18px no-repeat; padding-right: 40px; cursor: pointer; }
.input::placeholder { color: #9AA5BF; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 108, 222, .12); }
.input.bad { border-color: var(--red); box-shadow: 0 0 0 4px rgba(214, 69, 61, .1); }
.input[readonly] { background: var(--bg); color: var(--muted); }
.eye { position: absolute; right: 8px; background: none; border: 0; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; color: #7D8BAA; display: grid; place-items: center; }
.eye:hover { background: var(--bg); color: var(--navy); }
.eye svg { width: 20px; height: 20px; }
.prefix { position: absolute; left: 14px; font-weight: 700; color: var(--navy); font-size: .97rem; pointer-events: none; }
.prefix + .input { padding-left: 52px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.hint.good { color: #1E8E5A; font-weight: 600; }
.hint.warn { color: #B4620A; }
.err-text { font-size: .8rem; color: var(--red); margin-top: 6px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 0 16px; }

/* Password strength */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.meter span { height: 5px; border-radius: 5px; background: var(--line); transition: background .2s; }
.meter[data-s="1"] span:nth-child(-n+1) { background: var(--red); }
.meter[data-s="2"] span:nth-child(-n+2) { background: var(--orange); }
.meter[data-s="3"] span:nth-child(-n+3) { background: #2BA0E8; }
.meter[data-s="4"] span { background: var(--green); }

/* Choice chips and tiles */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 13px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 700; font-size: .92rem; color: var(--navy); cursor: pointer; transition: all .15s; user-select: none; }
.chip span::before { content: ""; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); background: #fff; transition: all .15s; }
.chip.radio span::before { border-radius: 50%; }
.chip input:checked + span { border-color: var(--blue); background: var(--sky-50); color: var(--blue); box-shadow: 0 6px 16px rgba(10, 108, 222, .14); }
.chip input:checked + span::before { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(10, 108, 222, .2); }

/* Code boxes */
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 20px; }
.code input { width: 100%; aspect-ratio: 1 / 1.12; text-align: center; font-family: var(--f-head); font-weight: 700; font-size: 1.6rem; color: var(--navy); border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; outline: none; transition: all .15s; }
.code input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 108, 222, .12); }
.code input.filled { border-color: #9CC3F2; background: var(--sky-50); }
.code.bad input { border-color: var(--red); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.email-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--sky-50); color: var(--navy); font-weight: 700; border-radius: 999px; padding: 6px 14px; font-size: .9rem; word-break: break-all; }
.resend { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 18px; }

/* Alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; font-size: .9rem; font-weight: 600; margin-bottom: 18px; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert.err { background: var(--red-50); color: #A6302A; }
.alert.ok { background: var(--green-50); color: #157A52; }
.alert.info { background: var(--sky-50); color: var(--navy); }

.foot-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 22px; }
.fine { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 700; color: var(--navy); font-size: 1rem; margin: 6px 0 16px; }
.section-title .si { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--sky-50); color: var(--blue); }
.section-title .si.w { background: var(--peach-50); color: var(--orange); }
.section-title .si svg { width: 18px; height: 18px; }
.divider { height: 1px; background: var(--line); margin: 10px 0 24px; }

/* Signed-in shell */
.shell-top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.shell-top-in { width: min(1120px, 100% - 32px); margin: 0 auto; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shell-top img { height: 40px; width: auto; }
.who { display: flex; align-items: center; gap: 12px; }
.who-text { text-align: right; line-height: 1.3; }
.who-text b { display: block; font-family: var(--f-head); color: var(--navy); font-size: .9rem; }
.who-text small { color: var(--muted); font-size: .78rem; }
.avatar { width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; }
.shell-main { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 34px 0 60px; }
.hello { margin-bottom: 22px; }
.hello p { color: var(--muted); margin: 0; }
.review { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; background: linear-gradient(120deg, var(--peach-50), #fff 70%); border: 1px solid #FFE0BD; border-radius: 24px; padding: 26px 28px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.review .ri { width: 64px; height: 64px; border-radius: 20px; background: var(--grad-warm); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px rgba(254, 149, 16, .3); }
.review .ri svg { width: 30px; height: 30px; }
.review h2 { margin-bottom: 4px; }
.review p { margin: 0; color: var(--text); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.tile .ti { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.tile .ti svg { width: 22px; height: 22px; }
.tile h3 { font-size: 1rem; margin-bottom: 4px; }
.tile p { color: var(--muted); font-size: .88rem; margin: 0; }
.tile .lock { position: absolute; top: 18px; right: 18px; font-size: .7rem; font-weight: 700; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.t1 .ti { background: #EAF2FF; color: var(--blue); }
.t2 .ti { background: var(--peach-50); color: var(--orange); }
.t3 .ti { background: var(--green-50); color: var(--green); }
.profile { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; }
.profile div small { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.profile div b { color: var(--ink); font-weight: 700; font-size: .95rem; word-break: break-word; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: 5px 12px; }
.badge.wait { background: var(--peach-50); color: #C46A00; }
.badge.ok { background: var(--green-50); color: #157A52; }
.badge .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Responsive */
@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; }
  .side { display: none; }
  .main-top .m-logo { display: block; }
  .tiles, .profile { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .main { padding: 18px 16px; }
  .card { padding: 22px 18px; border-radius: 20px; }
  .grid2, .grid3, .tiles, .profile { grid-template-columns: 1fr; }
  .code { gap: 7px; }
  .steps li .t { display: none; }
  .review { grid-template-columns: 1fr; padding: 22px; }
  .who-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Not approved state on the dashboard */
.review.no { background: linear-gradient(120deg, #FFF0EE, #fff 70%); border-color: #F8CFC8; }
.review.no .ri { background: #FDE3DF; color: #B8322A; box-shadow: none; }
.badge.no { background: #FDECEB; color: #B8322A; }
.badge.no .d { background: #B8322A; }
