/* ══════════════════════════════════════
   AUTH PAGES — Login & Register
   Uses brand tokens from app.css
   ══════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --emerald: #097A61;
    --emerald-light: #0a9070;
    --lime: #DAF8A0;
    --charcoal: #232121;
    --white: #FFFFFF;
    --bg-content: #F8FAFC;
    --border-color: #E5E7EB;
    --text-primary: #232121;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --bg-sidebar: #FFFFFF;
}

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-content);
}

/* ── SPLIT LAYOUT ── */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

/* ── LEFT PANEL ── */
.auth-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 64px;
    background: var(--white);
    position: relative;
    min-height: 100vh;
}

/* LOGO */
.auth-logo {
    position: absolute;
    top: 36px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.auth-logo-mark {
    width: 32px;
    height: 32px;
    background: var(--emerald);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-mark span {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-logo-texts { display: flex; flex-direction: column; }

.auth-logo-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.2;
}

.auth-logo-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* FORM BOX */
.auth-form-box {
    width: 100%;
    max-width: 380px;
}

.auth-heading {
    font-size: 26px;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: 6px;
    line-height: 1.2;
}

.auth-subheading {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* TABS */
.auth-tabs {
    display: flex;
    background: var(--bg-content);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.18s ease;
    display: block;
}

.auth-tab.active {
    background: var(--white);
    color: var(--charcoal);
    box-shadow: var(--shadow-sm);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(0,0,0,0.03);
}

/* GOOGLE BUTTON */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 20px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--charcoal);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.auth-google-btn:hover {
    border-color: #4285F4;
    background: #f8faff;
    box-shadow: 0 2px 8px rgba(66,133,244,0.12);
}

/* DIVIDER */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* FIELDS */
.auth-field { margin-bottom: 16px; }

.auth-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--charcoal);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.auth-input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(9,122,97,0.1);
}

.auth-input::placeholder { color: var(--text-muted); }

.auth-forgot {
    font-size: 12px;
    color: var(--emerald);
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot:hover { text-decoration: underline; }

/* SUBMIT */
.auth-submit {
    width: 100%;
    padding: 12px 20px;
    background: var(--emerald);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.auth-submit:hover {
    background: var(--emerald-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(9,122,97,0.25);
}

.auth-submit:active { transform: translateY(0); }

/* FOOTER NOTE */
.auth-footer-note {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-footer-note a {
    color: var(--emerald);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-note a:hover { text-decoration: underline; }

/* ERROR BOX */
.auth-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #DC2626;
    margin-bottom: 16px;
}

/* REMEMBER ME */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    margin-bottom: 16px;
    user-select: none;
}

.auth-remember-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-remember-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border-color);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.auth-remember-box svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.18s ease;
}

.auth-remember-input:checked ~ .auth-remember-box {
    background: var(--emerald);
    border-color: var(--emerald);
}

.auth-remember-input:checked ~ .auth-remember-box svg {
    opacity: 1;
    transform: scale(1);
}

.auth-remember:hover .auth-remember-box {
    border-color: var(--emerald);
}

.auth-remember-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── RIGHT PANEL ── */
.auth-right {
    background: var(--emerald);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 64px 56px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.auth-right-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(218,248,160,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(0,0,0,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.auth-right-content { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; }

.auth-right-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 99px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
}

.auth-right-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lime);
    flex-shrink: 0;
}

.auth-right-title {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.auth-right-title em {
    font-style: normal;
    color: var(--lime);
}

.auth-right-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 36px;
    line-height: 1.6;
    max-width: 400px;
    text-align: center;
}

/* DASHBOARD MOCKUP */
.auth-mockup {
    width: 100%;
    max-width: 500px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.15);
}

.auth-mockup-bar {
    background: rgba(0,0,0,0.2);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
}

.auth-mockup-url {
    margin-left: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    flex: 1;
    max-width: 180px;
}

.auth-mockup-body { padding: 16px; }

/* Header row of mockup */
.mockup-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.mockup-title {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.mockup-date {
    font-size: 9px;
    color: rgba(255,255,255,0.45);
}

/* KPI row */
.mockup-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.mockup-kpi {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 9px 11px;
}

.mockup-kpi-label {
    font-size: 8px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mockup-kpi-value {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.mockup-kpi-delta {
    font-size: 8px;
    color: var(--lime);
    font-weight: 600;
    margin-top: 3px;
}

/* Chart */
.mockup-chart {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.mockup-chart-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
}

.mockup-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 44px;
}

.mockup-bar {
    flex: 1;
    background: rgba(255,255,255,0.15);
    border-radius: 3px 3px 0 0;
}

.mockup-bar.lime { background: var(--lime); }
.mockup-bar.lime-soft { background: rgba(218,248,160,0.5); }

/* Contacts list */
.mockup-list { display: flex; flex-direction: column; gap: 5px; }

.mockup-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 6px 10px;
}

.mockup-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: var(--charcoal);
    flex-shrink: 0;
}

.mockup-name {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    flex: 1;
}

.mockup-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 99px;
    background: rgba(218,248,160,0.2);
    color: var(--lime);
}

/* FEATURES */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
}

.auth-feature-icon {
    width: 20px;
    height: 20px;
    background: rgba(218,248,160,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--lime);
    font-weight: 800;
    flex-shrink: 0;
    text-align: center;
    line-height: 20px;
}

/* LOGO IMAGE */
.auth-logo-img {
    height: 48px;
    width: auto;
    display: block;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-right { display: none; }
    .auth-left { padding: 80px 24px 40px; }
    .auth-logo { left: 24px; top: 24px; }
    .auth-logo-img { height: 36px; }
}
