@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=Sora:wght@400;600;700;800&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Left panel */
    --yellow:      #f5c842;
    --yellow-deep: #e0a800;
    --cream:       #faf3e0;
    --beige:       #f0e4c0;
    --espresso:    #2c1a0e;
    --brown-mid:   #5c3d1e;
    --brown-lt:    #a07850;

    /* Right panel — clean neutrals only */
    --blue:        #2563eb;
    --blue-dark:   #1d4ed8;
    --white:       #ffffff;
    --surface:     #f8fafc;
    --border:      #e2e8f0;
    --text-dark:   #0f172a;
    --text-mid:    #475569;
    --text-muted:  #94a3b8;

    --error-bg:    #fff5f5;
    --error:       #dc2626;
    --radius-sm:   10px;
    --radius-md:   16px;
}

body {
    min-height: 100vh;
    font-family: Inter, 'Segoe UI', sans-serif;
    background: var(--surface);
    display: flex;
    align-items: stretch;
}

/* ── Layout ─────────────────────────────────────── */
.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Left Panel ──────────────────────────────────── */
.panel-left {
    flex: 1;
    background: var(--yellow);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 64px;
    overflow: hidden;
}

/* Cream fade from bottom-left */
.panel-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(250,243,224,.75) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 100% 0%, rgba(224,168,0,.25) 0%, transparent 60%);
    pointer-events: none;
}

/* Warm brown dot pattern */
.panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(92,61,30,.2) 1.2px, transparent 1.2px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
    pointer-events: none;
}

.ballot-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,.35);
    border: 1.5px solid rgba(92,61,30,.18);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.ballot-icon svg {
    width: 30px;
    height: 30px;
    color: var(--espresso);
}

.panel-left h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    color: var(--espresso);
    line-height: 1.15;
    margin-bottom: 14px;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.panel-left h2 span {
    color: var(--brown-mid);
}

.panel-left > p {
    font-size: 15px;
    color: var(--brown-mid);
    line-height: 1.7;
    max-width: 360px;
    margin-bottom: 44px;
    position: relative;
    z-index: 1;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--espresso);
    font-weight: 500;
}

.feature-list li::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232c1a0e'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E") center/10px no-repeat;
    border: 1.5px solid rgba(92,61,30,.25);
}

/* ── Right Panel ─────────────────────────────────── */
.panel-right {
    width: 480px;
    flex-shrink: 0;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    box-shadow: -20px 0 60px rgba(15,23,42,.06);
    animation: slideIn .4s ease both;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.form-header {
    width: 100%;
    margin-bottom: 36px;
}

.school-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
    border: 3px solid var(--border);
    display: block;
}

.form-header h1 {
    font-family: 'Sora', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Form ────────────────────────────────────────── */
form { width: 100%; }

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 7px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.input-wrap { position: relative; }

.input-wrap svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color .2s;
}

.input-wrap:focus-within svg { color: var(--blue); }

.form-group input {
    width: 100%;
    height: 46px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px 0 40px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--surface);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.login-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--blue);
    color: var(--white);
    font-size: 15px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    margin-top: 6px;
    transition: background .2s, transform .1s;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}

.login-btn:hover  { background: var(--blue-dark); }
.login-btn:active { transform: translateY(1px); }

/* ── Alert ───────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 22px;
    animation: shake .35s ease;
}

.alert svg { width: 17px; height: 17px; flex-shrink: 0; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 860px) {
    .login-wrapper { flex-direction: column; }

    .panel-left {
        padding: 48px 32px 40px;
        align-items: center;
        text-align: center;
    }

    .ballot-icon { margin-left: auto; margin-right: auto; }
    .panel-left h2, .panel-left > p { max-width: 100%; }
    .feature-list { display: none; }

    .panel-right {
        width: 100%;
        padding: 40px 28px 48px;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .panel-left  { padding: 36px 20px 32px; }
    .panel-right { padding: 32px 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .panel-right { animation: none; }
    .alert       { animation: none; }
}