:root {
    --ca-primary: #27878f;
    --ca-primary-dark: #1a5a5f;
    --ca-ink: #14292b;
    --ca-muted: #6b7d80;
    --ca-gold: #ff8f1f;
    --ca-danger: #e5484d;
    --ca-success: #22a06b;
    --ca-radius: 22px;
    --ca-shadow: 0 24px 60px rgba(15, 51, 56, 0.22);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body.client-auth {
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
    color: var(--ca-ink);
    background: #0f3338;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 1fr);
}

.auth-brand {
    position: relative;
    overflow: hidden;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(ellipse 80% 70% at 10% 90%, rgba(255, 143, 31, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 10%, rgba(39, 135, 143, 0.45), transparent 50%),
        linear-gradient(160deg, #0c2a2e 0%, #16494e 45%, #27878f 100%);
    color: #fff;
}

.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand::before {
    width: 420px;
    height: 420px;
    right: -140px;
    top: -120px;
    background: rgba(255, 255, 255, 0.05);
}

.auth-brand::after {
    width: 280px;
    height: 280px;
    left: -80px;
    bottom: -90px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-top,
.brand-copy,
.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-logo {
    max-width: 220px;
    height: auto;
    display: block;
    mix-blend-mode: screen;
}

.brand-company {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ca-gold);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-badge i { color: var(--ca-gold); }

.brand-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.brand-copy p {
    margin: 0 0 28px;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.6;
}

.brand-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
}

.brand-features .feat-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: var(--ca-gold);
    flex-shrink: 0;
}

.brand-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.auth-panel {
    background: #f4f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--ca-radius);
    box-shadow: var(--ca-shadow);
    padding: 36px 32px 28px;
}

.auth-card.wide {
    max-width: 720px;
}

.auth-card-header {
    margin-bottom: 26px;
}

.auth-card-header h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-card-header p {
    margin: 0;
    color: var(--ca-muted);
    font-size: 14.5px;
    line-height: 1.5;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 13px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 18px;
}

.auth-alert i { margin-top: 2px; flex-shrink: 0; }

.auth-alert.error {
    background: rgba(229, 72, 77, 0.1);
    color: #b52b30;
    border: 1px solid rgba(229, 72, 77, 0.22);
}

.auth-alert.success {
    background: rgba(34, 160, 107, 0.1);
    color: #18794e;
    border: 1px solid rgba(34, 160, 107, 0.22);
}

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.field label small {
    font-weight: 500;
    color: var(--ca-muted);
}

.field-input { position: relative; }

.field-input > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ca-muted);
    font-size: 15px;
    pointer-events: none;
}

.field input {
    width: 100%;
    border: 1px solid #dbe5e6;
    border-radius: 13px;
    padding: 13px 14px 13px 42px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ca-ink);
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 4px rgba(39, 135, 143, 0.14);
}

.field input.has-toggle { padding-right: 46px; }

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--ca-muted);
    cursor: pointer;
    border-radius: 8px;
}

.toggle-password:hover { color: var(--ca-ink); background: #f2f8f8; }

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 13px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(130deg, var(--ca-primary-dark), var(--ca-primary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
    margin-top: 6px;
    text-decoration: none;
}

.auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 10px 22px rgba(39, 135, 143, 0.28);
    color: #fff;
}

.auth-btn:disabled {
    background: #c5d0d2;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.auth-links {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.auth-links a,
.back-link a {
    color: var(--ca-primary);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover,
.back-link a:hover { text-decoration: underline; }

.back-link {
    margin-top: 18px;
    text-align: center;
}

.auth-hint {
    margin-top: 18px;
    padding: 12px 14px;
    background: #f2f8f8;
    border-radius: 12px;
    font-size: 12.5px;
    color: var(--ca-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.auth-hint i {
    color: var(--ca-primary);
    margin-top: 2px;
}

.mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 18px;
}

.mobile-brand img {
    max-width: 180px;
    height: auto;
}

.auth-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ca-primary);
}

.event-list {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.event-card {
    border: 1.5px solid #e4eeef;
    border-radius: 16px;
    padding: 18px 18px 16px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
    background: #fff;
    position: relative;
}

.event-card:hover {
    border-color: var(--ca-primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(39, 135, 143, 0.12);
}

.event-card.selected {
    border-color: var(--ca-primary);
    background: #f3fafb;
    box-shadow: 0 0 0 4px rgba(39, 135, 143, 0.12);
}

.event-card input { display: none; }

.event-name {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--ca-ink);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-name i { color: var(--ca-primary); }

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--ca-muted);
    font-size: 13.5px;
    font-weight: 600;
}

.event-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #d5e1e2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 11px;
}

.event-card.selected .event-check {
    background: var(--ca-primary);
    border-color: var(--ca-primary);
    color: #fff;
}

.auth-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 11px;
    background: #fff;
    color: var(--ca-danger);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(229, 72, 77, 0.18);
}

.btn-ghost:hover {
    background: rgba(229, 72, 77, 0.08);
    color: var(--ca-danger);
    text-decoration: none;
}

.email-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f2f8f8;
    color: var(--ca-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.email-chip strong { color: var(--ca-ink); }

@media (max-width: 960px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .mobile-brand { display: block; }
    .auth-panel {
        min-height: 100vh;
        background:
            radial-gradient(ellipse 80% 50% at 50% -10%, rgba(39, 135, 143, 0.18), transparent 50%),
            #eef4f5;
    }
}

@media (max-width: 480px) {
    .auth-card { padding: 26px 20px 22px; }
    .auth-card-header h1 { font-size: 22px; }
}
