/* =========================================================
   karurceo.com — Login / Forgot password pages
   Mobile-first. Shared by Login, examcenterlogin, adminlogin,
   ForgotPassword, examcenterforgetpassword.
   ========================================================= */
:root {
    --primary: #0b5d3b;
    --primary-dark: #073d27;
    --primary-soft: #e6f2ec;
    --accent: #c8962a;
    --bg: #f2f5f3;
    --card: #ffffff;
    --text: #1b2a22;
    --muted: #64746b;
    --border: #d5ded9;
    --danger: #c0392b;
    --warn: #b7791f;
    --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Noto Sans Tamil', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ---------- Layout (phone first) ---------- */
.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Brand header: compact band on phones */
.auth-brand {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 28px 16px 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.auth-brand::after {
    content: "";
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    right: -90px; top: -90px;
}
.emblem {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px rgba(200,150,42,.55);
}
.emblem svg { width: 30px; height: 30px; }
.auth-brand h1 { font-size: 19px; font-weight: 700; line-height: 1.45; }
.auth-brand h2 { font-size: 17px; font-weight: 600; color: #f3cf7a; margin-top: 2px; }
.auth-brand p  { font-size: 14px; opacity: .9; margin-top: 6px; }
.brand-foot { display: none; }

/* Card overlaps the header band on phones */
.auth-main {
    flex: 1;
    padding: 0 16px 28px;
    margin-top: -44px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}
.card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(7,61,39,.12);
    padding: 24px 20px;
    align-self: flex-start;
}

/* School / Exam centre switcher */
.switch {
    display: flex;
    background: var(--primary-soft);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}
.switch a {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.switch a.active { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.card h3 { font-size: 21px; font-weight: 700; color: var(--primary-dark); }
.card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 20px; }

/* ---------- Form fields ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input-box { position: relative; }
.input-box .ico {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.input-box input {
    width: 100%;
    height: 50px;                 /* big touch target */
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 46px 0 42px;
    font-size: 16px;              /* 16px stops iPhone zoom-on-focus */
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.input-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11,93,59,.15);
}
.input-box.otp input {
    padding: 0 14px;
    text-align: center;
    letter-spacing: 8px;
    font-size: 22px;
    font-weight: 700;
}
.toggle-pass {
    position: absolute; right: 4px; top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    border: none; background: none;
    cursor: pointer;
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}
.toggle-pass.on { color: var(--primary); }
.toggle-pass svg { width: 20px; height: 20px; }

.err { display: block; font-size: 13px; color: var(--danger); margin-top: 4px; }
.err:empty { display: none; }
.caps { font-size: 13px; color: var(--warn); font-weight: 600; margin-top: 6px; }

.row-links { display: flex; justify-content: flex-end; margin: -4px 0 18px; }
.row-links a, .link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 0;
}
.row-links a:hover, .link:hover { text-decoration: underline; }

.btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, transform .1s;
    -webkit-appearance: none;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: scale(.98); }

.msg {
    display: block;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecea;
    color: var(--danger);
    font-size: 14px;
    text-align: center;
}
.msg:empty { display: none; }

.back { text-align: center; margin-top: 20px; }

/* Forgot-password steps: code-behind switches display */
.otp-section { display: none; }

.dev-foot {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    line-height: 1.7;
}

/* ---------- Tablet / desktop: two panels ---------- */
@media (min-width: 900px) {
    .auth { flex-direction: row; }
    .auth-brand {
        flex: 1.1;
        text-align: left;
        padding: 56px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .auth-brand::after { width: 460px; height: 460px; right: -160px; top: auto; bottom: -160px; }
    .emblem { margin: 0 0 28px; width: 72px; height: 72px; }
    .emblem svg { width: 38px; height: 38px; }
    .auth-brand h1 { font-size: 32px; }
    .auth-brand h2 { font-size: 24px; margin-top: 6px; }
    .auth-brand p {
        font-size: 18px;
        margin-top: 18px;
        border-left: 3px solid var(--accent);
        padding-left: 12px;
    }
    .brand-foot {
        display: block;
        position: absolute;
        bottom: 28px; left: 56px;
        font-size: 13px; opacity: .7;
    }
    .auth-main { flex: 1; margin-top: 0; align-items: center; padding: 32px; }
    .card { padding: 36px 32px; align-self: center; }
}
