/* Shared styles for login, signup, verification and password reset pages */
:root {
    --blue: #0b3d9e;
    --blue-deep: #072a72;
    --blue-soft: #eef3fd;
    --gold: #f5a81c;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --danger: #dc2626;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }

/* ───────── Form side ───────── */
.pane { display: flex; flex-direction: column; padding: 28px clamp(24px, 5vw, 64px); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--blue); }
.brand small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

.form-area { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 0 28px; }
.form-wrap { width: 100%; max-width: 400px; animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: 13px; font-weight: 500; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
h1 { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.lead { margin: 10px 0 28px; color: var(--muted); font-size: 15px; font-weight: 300; }

.alert {
    display: flex; gap: 10px; align-items: flex-start;
    margin-bottom: 22px; padding: 12px 14px;
    border-left: 3px solid var(--danger);
    background: #fef2f2; color: #991b1b;
    font-size: 14px; border-radius: 0 8px 8px 0;
}
.alert i { margin-top: 2px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: #334155; margin-bottom: 6px; }
.control { position: relative; }
.control > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 14px; pointer-events: none; transition: color .2s; }
.control input {
    width: 100%; height: 48px; padding: 0 44px 0 40px;
    border: 1.5px solid var(--line); border-radius: 12px;
    background: #f8fafc; font: 400 15px 'Outfit', sans-serif; color: var(--ink);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.control input::placeholder { color: #a3aec0; font-weight: 300; }
.control input:hover { border-color: #cbd5e1; }
.control input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(11, 61, 158, .1); }
.control:focus-within > i { color: var(--blue); }

.reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
    border: 0; background: transparent; color: #94a3b8; cursor: pointer; border-radius: 9px;
    display: grid; place-items: center; font-size: 15px; transition: color .2s, background .2s;
}
.reveal:hover, .reveal:focus-visible { color: var(--blue); background: var(--blue-soft); outline: none; }
.caps { display: none; margin-top: 6px; font-size: 12px; color: #b45309; }
.caps.on { display: block; }

.submit {
    width: 100%; margin-top: 8px; height: 50px; padding: 0 20px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; border-radius: 12px; cursor: pointer;
    background: var(--blue); color: #fff;
    font: 600 16px 'Outfit', sans-serif;
    box-shadow: 0 12px 24px -12px rgba(11, 61, 158, .65);
    transition: background .2s, transform .15s, box-shadow .2s;
}
.submit i { transition: transform .25s; }
.submit:hover { background: var(--blue-deep); box-shadow: 0 16px 28px -12px rgba(11, 61, 158, .75); }
.submit:hover i { transform: translateX(4px); }
.submit:active { transform: scale(.985); }
.submit:focus-visible { outline: 3px solid rgba(245, 168, 28, .55); outline-offset: 2px; }
.submit[disabled] { opacity: .75; cursor: progress; }
.submit[disabled] i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Demo accounts */
.divider { display: flex; align-items: center; gap: 12px; margin: 28px 0 14px; font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.demo-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 4px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
    font: 500 12px 'Outfit', sans-serif; color: #334155; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.demo-btn i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 14px; transition: .15s; }
.demo-btn:hover, .demo-btn:focus-visible { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); outline: none; }
.demo-btn:hover i, .demo-btn:focus-visible i { background: var(--blue); color: #fff; }
.demo-note { margin-top: 10px; font-size: 12px; color: #94a3b8; text-align: center; }
.demo-note code { background: var(--blue-soft); padding: 1px 6px; border-radius: 4px; color: var(--blue); font-size: 11.5px; }

.foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #94a3b8; }
.foot i { color: #22c55e; margin-right: 4px; }

/* ───────── Art side ───────── */
.art {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(90% 70% at 85% 0%, rgba(245, 168, 28, .22), transparent 60%),
        radial-gradient(80% 80% at 0% 100%, #0a4bd0 0%, transparent 65%),
        linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%);
    padding: 48px clamp(32px, 4vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 40px;
    position: sticky; top: 0; height: 100vh;    /* stays put while a long form scrolls */
}
.art::before {                        /* dot grid, like a notebook margin */
    content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 62%);
            mask-image: linear-gradient(135deg, #000 0%, transparent 62%);
}
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); pointer-events: none; }
.ring.r1 { width: 520px; height: 520px; right: -200px; top: -200px; }
.ring.r2 { width: 340px; height: 340px; right: -110px; top: -110px; }
.ring.r3 { width: 170px; height: 170px; right: -20px; top: -20px; border-color: rgba(245, 168, 28, .5); }

.art h2 { position: relative; font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; max-width: 460px; }
.art h2 em { font-style: normal; color: var(--gold); }
.art p { position: relative; margin-top: 14px; max-width: 400px; font-size: 15px; font-weight: 300; line-height: 1.6; color: rgba(255, 255, 255, .78); }

/* Live snapshot card */
.snapshot {
    position: relative; max-width: 460px; padding: 20px; border-radius: 20px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
    animation: float 8s ease-in-out infinite;
}
.snapshot header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #86efac; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .25); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.tile span { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .7); }
.tile span i { color: var(--gold); width: 14px; }
.tile b { display: block; margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.bar { margin-top: 8px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.features { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.features span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; font-size: 13px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.features i { color: var(--gold); font-size: 12px; }

/* ───────── Small screens ───────── */
@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .art { display: none; }
}
@media (max-width: 480px) {
    h1 { font-size: 28px; }
    .demos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .foot { flex-direction: column; align-items: center; }
}
@media (max-height: 720px) and (min-width: 961px) {
    .snapshot { display: none; }
}
@media (max-height: 640px) {
    .pane { padding-top: 18px; padding-bottom: 14px; }
    .form-area { padding: 10px 0; }
    .eyebrow { display: none; }
    h1 { font-size: 28px; }
    .lead { margin: 6px 0 16px; }
    .field { margin-bottom: 10px; }
    .control input, .submit { height: 44px; }
    .divider { margin: 16px 0 10px; }
    .demo-btn { flex-direction: row; justify-content: center; padding: 8px 4px; }
    .demo-btn i { width: 24px; height: 24px; font-size: 12px; }
    .demo-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .form-wrap, .snapshot { animation: none; }
    * { transition-duration: .01ms !important; }
}

/* ───────── Extra pieces for signup, verification and password reset ───────── */
.alert.ok { border-left-color: #16a34a; background: #f0fdf4; color: #166534; }
.alert.info { border-left-color: var(--blue); background: var(--blue-soft); color: #1e3a8a; }
.form-link { color: var(--blue); font-weight: 500; text-decoration: none; }
.form-link:hover { text-decoration: underline; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 13px; color: var(--muted); }
.switch { margin-top: 26px; text-align: center; font-size: 14px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.control input.no-icon { padding-left: 14px; }
.otp { display: flex; gap: 10px; justify-content: space-between; margin: 6px 0 22px; }
.otp input {
    width: 100%; height: 60px; text-align: center; font: 600 26px 'Outfit', sans-serif; color: var(--blue);
    border: 1.5px solid var(--line); border-radius: 14px; background: #f8fafc; transition: border-color .2s, box-shadow .2s, background .2s;
}
.otp input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(11, 61, 158, .1); }
.otp input.filled { border-color: #93b4ef; background: #fff; }
.meter { height: 5px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s, background .3s; }
.meter-label { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 16px; }
.resend { background: none; border: 0; padding: 0; font: 500 14px 'Outfit', sans-serif; color: var(--blue); cursor: pointer; }
.resend[disabled] { color: #94a3b8; cursor: not-allowed; }
.big-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; margin-bottom: 22px; background: var(--blue-soft); color: var(--blue); }
.big-icon.ok { background: #dcfce7; color: #16a34a; }
.steps { list-style: none; margin: 24px 0 0; display: grid; gap: 14px; position: relative; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: rgba(255,255,255,.85); }
.steps b { flex: 0 0 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--gold); color: var(--blue-deep); font-size: 13px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } .otp input { height: 52px; font-size: 22px; } }

/* Sign in with Google */
.google-btn {
    width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px;
    border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: #1f2937; text-decoration: none;
    font: 500 15px 'Outfit', sans-serif; transition: border-color .2s, box-shadow .2s, background .2s;
}
.google-btn:hover { border-color: #c7d2e3; background: #f8fafc; box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .35); }
.google-btn:focus-visible { outline: 3px solid rgba(11, 61, 158, .3); outline-offset: 2px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: .1em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* "Get the app" strip above the footer on sign-in pages */
.auth-app { width: 100%; max-width: 400px; margin: 8px auto 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #f8fafc; color: var(--ink); }
.auth-app .edumy-install, .auth-app .edumy-store { height: 40px; padding: 0 14px; }

/* ───────── Finishing touches ───────── */
/* Keep browser autofill from painting fields yellow/blue */
.control input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #f8fafc inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
.control input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px #fff inset, 0 0 0 4px rgba(11, 61, 158, .1); }
.form-link:focus-visible, .resend:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
/* Without the art panel, a soft wash keeps small screens from feeling bare */
@media (max-width: 960px) {
    .pane { min-height: 100vh; background: radial-gradient(120% 50% at 100% 0%, var(--blue-soft), transparent 70%); }
}
