:root{
    /* Brand */
    --primary-600:#2563eb;
    --primary-700:#1e47d7;
    --accent-500:#ff7a45;
    --ink:#0f172a;
    --muted:#667085;

    /* Surfaces */
    --bg-grad: radial-gradient(900px 500px at 10% -10%, #eaf1ff 10%, transparent 50%),
    radial-gradient(900px 500px at 100% 0%, #edf3ff 10%, transparent 50%), #f8fbff;
    --card:#ffffff;
    --panel-grad: linear-gradient(135deg, #0e1f33 0%, #132a45 100%);
    --border: rgba(2,6,23,.08);
    --radius:22px;
    --shadow: 0 10px 30px rgba(2,6,23,.08);
    --shadow-lg: 0 24px 60px rgba(2,6,23,.18);

    --wrap: min(92vw, 1120px);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    -webkit-tap-highlight-color: transparent;
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
    color:var(--ink);
    background:var(--bg-grad);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Topbar */
.topbar{
    position:sticky; top:0; z-index:10;
    backdrop-filter:saturate(180%) blur(8px);
    background:rgba(255,255,255,.85);
    border-bottom:1px solid var(--border);
}
.wrap{width:var(--wrap); margin-inline:auto; padding:14px 16px}
.topbar .wrap{display:flex; align-items:center; justify-content:space-between;}
.brand{display:flex; align-items:center; gap:.55rem; color:var(--ink); text-decoration:none; font-weight:800}
.logo{font-size:1.1rem}
.back-link{color:var(--primary-600); text-decoration:none; font-weight:700}

/* Auth */
.auth{padding:26px 0 48px}
.auth-grid{
    display:grid;
    grid-template-columns: 1fr; /* mobile first */
    gap:18px;
}

/* Card */
.card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}
.auth-card{padding:18px 16px}
.title{font-size:1.6rem; line-height:1.1; margin:4px 0 6px; letter-spacing:-.02em}
.subtitle{color:var(--muted); margin:0 0 14px; font-size:.95rem}

/* Form (bigger touch targets) */
.form{display:grid; gap:12px}
.field{display:grid; gap:8px}
.label-row{display:flex; align-items:center; justify-content:space-between}
label{font-weight:700; color:#1f2a44}

.input-wrap{position:relative}
.input-wrap .peek{
    position:absolute; right:8px; top:50%; transform:translateY(-50%);
    border:none; background:transparent; cursor:pointer; font-size:1.1rem; line-height:1; padding:8px;
    opacity:.7;
}
.input-wrap .peek.on{opacity:1}

input[type="email"], input[type="password"], input[type="text"], .input-wrap input{
    width:100%; border:1px solid #e5e7ef; border-radius:16px;
    padding:14px 44px 14px 14px; /* room for peek button */
    font-size:16px; /* prevents iOS zoom */
    background:#fbfcff; transition:border .15s, box-shadow .15s;
}
input::placeholder{color:#9aa6bf}
input:focus{outline:none; border-color:var(--primary-600); box-shadow:0 0 0 4px rgba(37,99,235,.12)}

.checkbox{display:flex; align-items:center; gap:.6rem; user-select:none; cursor:pointer; margin-top:2px}
.checkbox input{width:20px; height:20px; accent-color:var(--primary-600)}

.btn{
    display:inline-flex; align-items:center; justify-content:center;
    width:100%; min-height:52px; padding:14px 18px;
    border-radius:18px; border:none; cursor:pointer;
    font-weight:800; letter-spacing:.01em;
    transition:transform .06s ease, box-shadow .2s ease;
}
.btn-primary{
    background:linear-gradient(135deg, var(--accent-500), #ff9858);
    color:#fff; box-shadow:0 12px 26px rgba(255,122,69,.28);
}
.btn-primary:active{transform:translateY(1px)}

.alt{margin-top:8px; font-size:.95rem; color:var(--muted); display:flex; gap:.5rem; justify-content:center}
.link{color:var(--primary-600); text-decoration:none; font-weight:700}
.link:hover{text-decoration:underline}

/* Trust pills (wrap nicely on small screens) */
.trust{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
.pill{
    background:#f3f6ff; color:#20325a; border:1px solid #e1e8ff;
    border-radius:999px; padding:8px 10px; font-weight:700; font-size:.9rem;
}

/* Right panel */
.panel{
    border-radius:var(--radius);
    background:var(--panel-grad);
    color:#e6eefb;
    box-shadow:var(--shadow-lg);
    overflow:hidden;
}
.panel-inner{padding:18px}
.panel .badge{
    display:inline-block; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12);
    color:#eaf2ff; padding:6px 10px; border-radius:999px; font-weight:800; margin-bottom:10px
}
.panel h2{color:#fff; margin:2px 0 6px; font-size:1.25rem}
.panel p{color:#b8c7e4; margin:0 0 14px; font-size:.95rem}

.art{position:relative; height:220px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); overflow:hidden}
.cap{position:absolute; width:100px; height:60px; background:#244a7a; left:18px; top:26px; border-radius:10px; box-shadow:0 10px 20px rgba(0,0,0,.25)}
.books{position:absolute; left:34px; top:98px; width:170px; height:22px; background:#1e3b63; border-radius:6px; box-shadow:0 30px 0 0 #254a7f, 0 60px 0 0 #2a5690}
.sheet{position:absolute; right:22px; top:34px; width:150px; height:120px; background:#eef4ff; border-radius:12px; box-shadow:0 10px 40px rgba(0,0,0,.25)}
.stamp{position:absolute; right:48px; top:58px; width:38px; height:38px; background:linear-gradient(135deg,#43a2ff,#2563eb); border-radius:50%; box-shadow:0 8px 16px rgba(37,99,235,.35)}

/* Footer */
.foot{padding:22px 0}
.foot-inner{display:flex; gap:12px; align-items:center; justify-content:space-between; color:#7382a3; flex-wrap:wrap}
.foot a{color:var(--primary-600); text-decoration:none}
.foot-links{display:flex; gap:12px}

/* Larger screens */
@media (min-width: 960px){
    /*.auth{padding:48px 0 72px}*/
    .auth-grid{grid-template-columns: 1.1fr .9fr; gap:28px}
    .auth-card{padding:28px}
    .title{font-size:2rem}
    .panel-inner{padding:28px}
    .panel h2{font-size:1.6rem}
    .art{height:400px}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
    *{transition:none !important}
}

@media (max-width: 360px){ .panel{ display:none; } }
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #344054;
    font-weight: 600;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.btn-google:hover {
    background: #f9fafb;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
