:root {
    --ink: #1A2035;
    --dawn-purple: #2E8B57;
    --coral: #E5484D;
    --gold: #F5A623;
    --teal: #3B82F6;
    --paper: #FFFFFF;
    --paper-dim: #F1F5F9;
    --line: rgba(26, 32, 53, 0.1);
}

* { box-sizing: border-box }
html, body { height: 100% }

body {
    margin: 0;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    background-color: var(--paper-dim);
    color: var(--ink);
}

h1, h2, h3, .brand-heading {
    font-family: 'Bitter', Georgia, serif;
    color: var(--dawn-purple);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--paper);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(26, 32, 53, 0.12);
    padding: 2.5rem;
}

.brand { text-align: center; margin-bottom: 1.5rem }
.brand .logo { width: 56px; height: 56px; object-fit: contain; display: block; margin: 0 auto 0.75rem }

.auth-badge {
    display: inline-block;
    background-color: var(--paper-dim);
    color: var(--dawn-purple);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 100px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 0.75rem;
}

.brand h1 { margin: 0 0 0.25rem; font-size: 1.4rem }
.brand .subtitle { margin: 0; color: var(--ink); opacity: 0.65; font-size: 0.9rem }

.input-group { margin-bottom: 1rem; text-align: left; position: relative }
.input-group label { display: block; font-weight: 500; margin-bottom: 0.35rem; font-size: 0.9rem }
.input-group input {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.input-group input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.password-field input { padding-right: 3.5rem }
.toggle-password {
    position: absolute;
    right: 0.5rem;
    top: 2.15rem;
    border: none;
    background: none;
    color: var(--dawn-purple);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
}

.form-row { display: flex; align-items: center; justify-content: space-between; margin: 0.75rem 0 1.25rem; font-size: 0.85rem }
.checkbox { display: flex; align-items: center; gap: 0.4rem; color: var(--ink); opacity: 0.8; cursor: pointer }
.checkbox input { width: 15px; height: 15px }
.forgot { color: var(--dawn-purple); text-decoration: none; font-weight: 500 }
.forgot:hover { text-decoration: underline }

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: var(--dawn-purple);
    border: none;
    color: #fff;
    border-radius: 100px;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    cursor: pointer;
}
.btn-primary:hover, .btn-primary:focus { background-color: var(--ink) }

.back-link { text-align: center; font-size: 0.9rem; color: var(--ink); opacity: 0.75; margin: 1.25rem 0 0 }
.back-link a, .footer-note a { color: var(--dawn-purple); font-weight: 500; text-decoration: none }
.back-link a:hover, .footer-note a:hover { text-decoration: underline }

.footer-note { text-align: center; margin-top: 1rem; color: var(--ink); opacity: 0.65; font-size: 0.85rem }

.form-error {
    display: none;
    background-color: rgba(229, 72, 77, 0.1);
    color: var(--coral);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin: 0 0 1rem;
}
.form-error.show { display: block }

.form-success {
    display: none;
    background-color: rgba(46, 139, 87, 0.1);
    color: var(--dawn-purple);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin: 0 0 1rem;
}
.form-success.show { display: block }

.role-label { font-weight: 500; font-size: 0.9rem; margin: 0.25rem 0 0 }
.role-choice i { font-size: 0.95rem }
.role-option { margin-bottom: 1.25rem }

/* Role picker (register.html) */
.role-option { display: flex; gap: 0.6rem; margin-top: 0.5rem; flex-wrap: wrap }
.role-choice {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    color: var(--ink);
    cursor: pointer;
}
.role-choice:has(input:checked) {
    border-color: var(--dawn-purple);
    background-color: rgba(46, 139, 87, 0.08);
    color: var(--dawn-purple);
    font-weight: 600;
}

/* Split-screen login (index.html) */
.split-body { background-color: var(--paper) }

.login-split { display: flex; min-height: 100vh }

.login-hero {
    position: relative;
    flex: 1 1 50%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    overflow: hidden;
}
.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 20, 14, 0.38) 0%, rgba(7, 36, 22, 0.62) 45%, rgba(5, 40, 24, 0.9) 100%);
}
.login-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 2rem;
    color: #fff;
}

.brand-lockup { display: flex; align-items: center; gap: 0.75rem }
.brand-heart { width: 44px; height: 44px; flex-shrink: 0; display: block }
.brand-heart-lg { width: 56px; height: 56px }
.brand-word { font-family: 'Bitter', Georgia, serif; font-weight: 700; font-size: 1.1rem; line-height: 1.25; color: #fff; margin: 0 }
.brand-word b, .brand-word span { display: block; color: #6be79a; font-weight: 700 }
.brand-tag { font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); margin: 0.15rem 0 0 }

.hero-headline { font-size: 2.5rem; line-height: 1.1; margin: 0 0 1rem; color: #fff }
.hero-headline span { display: block; color: #6be79a }
.hero-desc { max-width: 420px; color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; line-height: 1.6; margin: 0 0 1.75rem }

.hero-features { display: grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 1.25rem 1.5rem; max-width: 480px; padding: 0; margin: 0; list-style: none }
.feature-item { display: flex; flex-direction: column; gap: 0.35rem }
.feature-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem }
.feature-icon.f-green { background-color: var(--dawn-purple) }
.feature-icon.f-blue { background-color: var(--teal) }
.feature-icon.f-gold { background-color: var(--gold) }
.feature-icon.f-purple { background-color: #8b5cf6 }
.feature-item strong { font-family: 'Bitter', Georgia, serif; font-size: 0.95rem; color: #fff }
.feature-item span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7) }

.hero-location { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85) }
.hero-location i { margin-top: 0.2rem }
.hero-location strong { display: block; font-family: 'Bitter', Georgia, serif; font-weight: 600 }
.hero-location span { color: rgba(255, 255, 255, 0.65); font-size: 0.8rem }

.login-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background-color: var(--paper);
}
.login-panel-inner { width: 100%; max-width: 400px }

.panel-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.5rem }
.panel-brand .brand-word { color: var(--ink); text-align: center; margin-top: 0.5rem }
.panel-brand .brand-word b, .panel-brand .brand-word span { color: var(--dawn-purple) }

.panel-title { text-align: center; font-size: 1.6rem; margin: 0.5rem 0 0.25rem }
.panel-subtitle { text-align: center; color: var(--ink); opacity: 0.6; font-size: 0.9rem; margin: 0 0 1.75rem }

.field-icon-group { position: relative; margin-bottom: 1rem }
.field-icon-group > i:first-child { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--ink); opacity: 0.4 }
.field-icon-group input {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 2.6rem;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.field-icon-group input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.field-icon-group .toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--ink);
    opacity: 0.45;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
}

.admin-link { text-align: center; margin: 0.75rem 0 0; font-size: 0.8rem }
.admin-link a { color: var(--ink); opacity: 0.55; text-decoration: none }
.admin-link a:hover { opacity: 0.85; text-decoration: underline }

.panel-copyright { margin-top: 1.5rem; font-size: 0.75rem; color: var(--ink); opacity: 0.45; text-align: center }

@media (max-width: 900px) {
    .login-hero { display: none }
    .login-panel { min-height: 100vh }
}


/* Brand marks link back to the home page */
a.brand-lockup, a.panel-brand { text-decoration: none; color: inherit }
a.brand-lockup:hover, a.panel-brand:hover { opacity: 0.9 }
.login-hero { background-color: #0A4D32; background-repeat: no-repeat }

/* Agreement to the terms on the sign-up form */
.consent-line { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.9rem 0 0.4rem; font-size: 0.88rem; line-height: 1.4; color: var(--ink, #1f2a24); cursor: pointer }
.consent-line input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; flex: none; accent-color: #12804A }
.consent-line a { color: #12804A; text-decoration: underline }
