:root {
    /* Brand Colors */
    --ch-teal: #0d9488;
    --ch-teal-deep: #0f766e;
    --ch-gold: #d97706;
    --ch-gold-deep: #b45309;

    /* Professional Corporate Palette */
    --ch-ink: #0f172a;
    --ch-text: #334155;
    --ch-muted: #64748b;
    --ch-bg-light: #f6faf9;
    --ch-card: #ffffff;
    --ch-card-border: #e2e8f0;

    /* Structural */
    --ch-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --ch-radius-lg: 12px;
    --ch-radius-sm: 6px;
}

body {
    background: var(--ch-bg-light);
    background-image: 
        url('/assets/charity/images/charity-login-background.webp'),
        linear-gradient(135deg, rgba(13, 148, 136, 0.04) 0%, transparent 40%),
        linear-gradient(-135deg, rgba(217, 119, 6, 0.04) 0%, transparent 40%);
    background-size: cover, auto, auto;
    background-position: center right, center, center;
    background-repeat: no-repeat, repeat, repeat;
    color: var(--ch-text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.for-login,
.for-signup,
.for-forgot,
.for-login-with-email-link {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Main Container */
.ch-login-shell {
    width: min(1000px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    max-width: 1100px;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--ch-card-border);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow);
    overflow: hidden;
}

/* Left Panel - Branding */
.ch-brand-panel {
    padding: 48px;
    background: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.88));
    border-right: 1px solid var(--ch-card-border);
    position: relative;
}

/* Subtle Teal/Gold Theme Accent Bar */
.ch-brand-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ch-teal), var(--ch-gold));
}

.ch-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    background: var(--ch-bg-light);
    border: 1px solid var(--ch-card-border);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ch-muted);
    margin-bottom: 32px;
}

.ch-brand-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ch-gold), var(--ch-teal));
}

.ch-brand-logo {
    width: auto;
    height: 100px;
    margin-bottom: 24px;
}

.ch-brand-title {
    font-size: clamp(1.75rem, 2vw, 2.25rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ch-ink);
    margin: 0 0 16px;
}

.ch-brand-copy {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ch-muted);
    margin-bottom: 32px;
}

/* Hero case-mix mockup */
.ch-impact-row {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
}
.ch-impact-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--ch-teal) 0 58%, var(--ch-gold) 58% 89%, var(--ch-muted) 89% 100%);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 8px 30px rgba(15,23,42,0.08);
}
.ch-impact-chart-inner {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(255,255,255,0.98);
    color: var(--ch-ink);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.ch-impact-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ch-impact-stat {
    background: var(--ch-bg-light);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--ch-ink);
}

.ch-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ch-feature-card {
    padding: 16px;
    border-radius: var(--ch-radius-sm);
    background: var(--ch-bg-light);
    border: 1px solid var(--ch-card-border);
}

.ch-feature-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ch-muted);
    margin-bottom: 6px;
}

.ch-feature-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ch-ink);
}

/* ch-band — lightweight capability tags */
.ch-band {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.ch-band span {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid var(--ch-card-border);
    color: var(--ch-muted);
}


/* Right Panel - Form */
.ch-form-panel {
    padding: 48px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ch-form-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: var(--ch-card);
    border: 1px solid var(--ch-card-border);
    border-radius: var(--ch-radius-sm);
    box-shadow: 0 8px 30px rgba(15,23,42,0.12);
    padding: 28px;
}

.ch-form-head {
    margin-bottom: 18px;
}

/* Input with icon */
.input-with-icon {
    position: relative;
}
.input-with-icon .icon-left,
.input-with-icon .icon-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.7;
}
.input-with-icon .icon-left { left: 12px; }
.input-with-icon .icon-right { right: 12px; cursor: pointer; }
.input-with-icon .form-control { padding-left: 40px; padding-right: 40px; }

.ch-form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ch-muted);
    margin-bottom: 12px;
}

.ch-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ch-ink);
    margin: 0 0 8px;
}

.ch-form-subtitle {
    font-size: 0.9rem;
    color: var(--ch-muted);
    margin: 0;
}

.page-card, .page-card-body {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Form Controls */
.form-control {
    height: 44px;
    border-radius: var(--ch-radius-sm);
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--ch-ink);
    padding: 10px 14px;
    font-size: 0.95rem;
    box-shadow: none;
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    border-color: var(--ch-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
    outline: none;
}

.ch-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.ch-forgot-link {
    color: var(--ch-teal);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.ch-forgot-link:hover {
    color: var(--ch-teal-deep);
    text-decoration: underline;
}

/* Sleek Teal/Gold Interactive Button */
.ch-login-btn,
.ch-form-card #verify_token {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: var(--ch-radius-sm);
    background: linear-gradient(90deg, var(--ch-teal) 0%, var(--ch-teal-deep) 50%, var(--ch-gold-deep) 100%);
    background-size: 200% auto;
    background-position: left center;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ch-login-btn:hover,
.ch-form-card #verify_token:hover {
    background-position: right center;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.15);
}

.ch-form-card #twofactor_div .page-card-head {
    margin-bottom: 18px;
}

.sign-up-message {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--ch-muted);
    text-align: center;
}

.sign-up-message a {
    color: var(--ch-teal);
    font-weight: 600;
}

.ch-support-note {
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: var(--ch-radius-sm);
    background: var(--ch-bg-light);
    border: 1px solid var(--ch-card-border);
    color: var(--ch-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.ch-support-note strong {
    color: var(--ch-ink);
}

/* Auth Cards for Signup / Forgot Password */
.ch-auth-card {
    width: min(480px, 100%);
    border: 1px solid var(--ch-card-border);
    border-radius: var(--ch-radius-lg);
    background: var(--ch-card);
    box-shadow: var(--ch-shadow);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.ch-auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ch-teal), var(--ch-gold));
}

.ch-auth-card-head {
    margin-bottom: 24px;
    text-align: center;
}

.ch-auth-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ch-ink);
    margin: 0 0 8px;
}

.ch-auth-card-subtitle {
    font-size: 0.9rem;
    color: var(--ch-muted);
    margin: 0;
}

.ch-auth-compact {
    min-height: auto;
    padding: 24px;
}

/* Small trust cards under brand panel */
.ch-trust-band {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ch-card-border);
}

.ch-trust-card {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 20px;              /* pill vs band's square */
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--ch-teal-deep);
    background: rgba(13, 148, 136, 0.06);
    border: 1px solid rgba(13, 148, 136, 0.18);
}

/* Checkmark dot before each trust item */
.ch-trust-card::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ch-teal);
    opacity: 0.7;
}


/* Form extras: remember, sso and help */
.ch-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.ch-remember-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ch-text);
    font-size: 0.9rem;
}
.ch-divider {
    text-align: center;
    margin: 18px 0;
    color: var(--ch-muted);
    font-size: 0.85rem;
}
.ch-sso-btn {
    width: 100%;
    height: 44px;
    border: 1px solid var(--ch-card-border);
    background: transparent;
    border-radius: var(--ch-radius-sm);
    color: var(--ch-ink);
    font-weight: 600;
    cursor: pointer;
}
.ch-help-box {
    margin-top: 14px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(245,247,250,1), rgba(255,255,255,1));
    border: 1px solid var(--ch-card-border);
    border-radius: 8px;
    color: var(--ch-muted);
    font-size: 0.9rem;
}

a {
    color: var(--ch-teal);
    text-decoration: none;
}

a:hover {
    color: var(--ch-teal-deep);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .ch-login-shell {
        grid-template-columns: 1fr;
    }
    .ch-brand-panel {
        border-right: 0;
        border-bottom: 1px solid var(--ch-card-border);
        padding: 40px 32px;
    }
    .ch-form-panel {
        padding: 40px 32px;
    }
}

@media (max-width: 640px) {
    .for-login, .for-signup, .for-forgot {
        padding: 16px;
    }
    .ch-brand-panel, .ch-form-panel, .ch-auth-card {
        padding: 24px;
    }
    .ch-feature-grid {
        grid-template-columns: 1fr;
    }
}