/* ============================================================
   UNIFIED AUTH STYLES — Matches Public Landing Page Exactly
   Login / Signup / Forgot / Reset Password pages
   Same light theme, palette, typography & component system as landing.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --auth-bg:#ffffff;
    --auth-bg-soft:#f8fafc;
    --auth-bg-tint:#f1f5f9;
    --auth-surface:#ffffff;
    --auth-border:#e2e8f0;
    --auth-border-strong:#cbd5e1;

    --auth-text:#0f172a;
    --auth-text-2:#334155;
    --auth-text-3:#64748b;
    --auth-text-muted:#94a3b8;

    --auth-primary:#4f46e5;
    --auth-primary-hover:#4338ca;
    --auth-primary-soft:#eef2ff;
    --auth-accent:#7c3aed;
    --auth-success:#10b981;
    --auth-warning:#f59e0b;
    --auth-danger:#ef4444;

    --auth-gradient:linear-gradient(135deg,#4f46e5 0%,#7c3aed 100%);
    --auth-gradient-soft:linear-gradient(135deg,#eef2ff 0%,#f5f3ff 100%);

    --auth-shadow-xs:0 1px 2px rgba(15,23,42,.04);
    --auth-shadow-sm:0 1px 3px rgba(15,23,42,.06),0 1px 2px rgba(15,23,42,.04);
    --auth-shadow-md:0 4px 12px rgba(15,23,42,.06),0 2px 4px rgba(15,23,42,.04);
    --auth-shadow-lg:0 12px 32px rgba(15,23,42,.08),0 4px 12px rgba(15,23,42,.04);
    --auth-shadow-xl:0 24px 60px rgba(15,23,42,.10),0 8px 24px rgba(15,23,42,.06);
    --auth-shadow-glow:0 20px 50px rgba(79,70,229,.20);

    --auth-radius-sm:8px;
    --auth-radius:12px;
    --auth-radius-md:16px;
    --auth-radius-lg:20px;
    --auth-radius-xl:24px;
    --auth-radius-full:999px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans','Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--auth-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--auth-primary-hover); }

/* ---------- Auth Page Layout ---------- */
.auth-page {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(800px 500px at 90% 10%, rgba(124,58,237,.08) 0%, transparent 60%),
        radial-gradient(700px 500px at 10% 30%, rgba(79,70,229,.06) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}
.auth-left, .auth-right { overflow-y: auto; }
/* Slim scrollbar inside columns */
.auth-left::-webkit-scrollbar,
.auth-right::-webkit-scrollbar { width: 6px; }
.auth-left::-webkit-scrollbar-thumb,
.auth-right::-webkit-scrollbar-thumb { background: rgba(79,70,229,.25); border-radius: 999px; }
.auth-left::-webkit-scrollbar-thumb:hover,
.auth-right::-webkit-scrollbar-thumb:hover { background: rgba(79,70,229,.45); }

/* decorative grid (same as landing hero) */
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79,70,229,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,70,229,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.auth-left, .auth-right { position: relative; z-index: 1; }

/* ---------- LEFT: Branding (landing hero style) ---------- */
.auth-left {
    padding: 64px 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-brand {
    max-width: 540px;
    width: 100%;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-full);
    font-size: .82rem;
    font-weight: 600;
    color: var(--auth-text-2);
    box-shadow: var(--auth-shadow-xs);
    margin-bottom: 28px;
}
.auth-kicker i {
    background: var(--auth-gradient);
    color: #fff;
    width: 26px; height: 26px;
    border-radius: var(--auth-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
}

.auth-title {
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--auth-text);
    margin: 0 0 18px;
}
/* gradient-accent first word effect (landing matches this with .accent) */
.auth-title strong,
.auth-title em {
    font-style: normal;
    font-weight: inherit;
    background: var(--auth-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--auth-text-3);
    margin: 0 0 36px;
    max-width: 500px;
}

/* feature checklist – landing's check-list style */
.auth-feature {
    display: grid;
    gap: 14px;
}
.auth-feature > div {
    display: flex !important;
    align-items: center;
    gap: 12px !important;
    font-size: 1rem;
    color: var(--auth-text-2);
    font-weight: 500;
    line-height: 1.55;
}
.auth-feature i {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--auth-gradient-soft);
    border: 1px solid rgba(79,70,229,.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--auth-primary);
    transition: all .25s;
}
.auth-feature > div:hover i {
    background: var(--auth-gradient);
    color: #fff;
    transform: scale(1.05);
    border-color: transparent;
}

/* ---------- RIGHT: Form Card (landing card style) ---------- */
.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-xl);
    box-shadow: var(--auth-shadow-xl);
    overflow: hidden;
    position: relative;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--auth-gradient);
}

.auth-card-inner {
    padding: 40px 36px 32px;
}

/* ---------- Header ---------- */
.auth-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--auth-border);
}
.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--auth-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: var(--auth-shadow-glow);
}
.auth-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
.auth-company {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.auth-company strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--auth-text);
    letter-spacing: -.01em;
}
.auth-company span {
    font-size: .82rem;
    color: var(--auth-text-3);
    font-weight: 500;
    margin-top: 2px;
}

/* ---------- Body ---------- */
.auth-body h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--auth-text);
    margin: 0 0 6px;
    letter-spacing: -.02em;
}
.auth-body > p {
    font-size: .96rem;
    color: var(--auth-text-3);
    margin: 0 0 24px;
}

/* ---------- Alerts ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--auth-radius);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    margin-bottom: 20px;
}
.auth-alert > i {
    flex-shrink: 0;
    font-size: 1.15rem;
    margin-top: 2px;
    color: #dc2626;
}
.auth-alert strong {
    display: block;
    font-weight: 700;
    font-size: .95rem;
    color: #991b1b;
    margin-bottom: 2px;
}
.auth-alert p {
    margin: 0;
    font-size: .88rem;
    color: #b91c1c;
    line-height: 1.55;
}
.auth-alert.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.auth-alert.alert-success > i,
.auth-alert.alert-success strong { color: #065f46; }
.auth-alert.alert-success p { color: #047857; }
.auth-alert.is-animate { animation: authAlertIn .35s cubic-bezier(.4,0,.2,1); }
@keyframes authAlertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Form Grid ---------- */
.form-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 8px;
}

/* ---------- Float Field ---------- */
.float-field {
    position: relative;
}
.float-field input {
    width: 100%;
    padding: 16px 44px 16px 44px;
    font-size: .96rem;
    font-family: inherit;
    color: var(--auth-text);
    background: var(--auth-bg-soft);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    outline: none;
    transition: all .2s;
}
.float-field input:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79,70,229,.12);
}
.float-field label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-3);
    font-size: .95rem;
    font-weight: 500;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
    transition: all .2s cubic-bezier(.4,0,.2,1);
}
.float-field input:focus + label,
.float-field input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(.86);
    color: var(--auth-primary);
    background: #fff;
    font-weight: 600;
    left: 38px;
}
.float-field .field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color .2s;
}
.float-field input:focus ~ .field-icon { color: var(--auth-primary); }

.field-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    transition: all .2s;
}
.field-action:hover {
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
}

/* ---------- Form Modern (select / file / etc) ---------- */
.form-group-modern {
    display: flex;
    flex-direction: column;
}
.form-label-modern {
    font-size: .85rem;
    font-weight: 600;
    color: var(--auth-text-2);
    margin-bottom: 6px;
}
.form-label-modern .required {
    color: var(--auth-danger);
    margin-left: 2px;
}

.form-select-modern,
.form-input-modern {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: var(--auth-bg-soft);
    color: var(--auth-text);
    font-family: inherit;
    font-size: .95rem;
    outline: none;
    transition: all .2s;
}
.form-select-modern {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
}
.form-select-modern:focus,
.form-input-modern:focus {
    border-color: var(--auth-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(79,70,229,.12);
}

.form-input-modern[type="file"] {
    padding: 9px 12px;
    background: #fff;
    cursor: pointer;
    font-size: .88rem;
}
.form-input-modern[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    background: var(--auth-gradient);
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
}
.form-input-modern[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

/* ---------- Info box ---------- */
.info-box {
    padding: 16px 18px;
    background: var(--auth-gradient-soft);
    border: 1px solid rgba(79,70,229,.18);
    border-radius: var(--auth-radius);
}

/* ---------- Actions row ---------- */
.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.auth-actions label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--auth-text-2);
    cursor: pointer;
    user-select: none;
}
.auth-actions input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}
.auth-actions a {
    font-size: .88rem;
    font-weight: 600;
}

/* ---------- Submit button (matches landing's btn-primary) ---------- */
.auth-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--auth-gradient);
    border: none;
    border-radius: var(--auth-radius);
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 8px 20px rgba(79,70,229,.30);
    margin-top: 4px;
}
.auth-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(79,70,229,.40);
}
.auth-submit:active:not(:disabled) { transform: translateY(0); }
.auth-submit:disabled { opacity: .7; cursor: not-allowed; }
.auth-submit.loading { pointer-events: none; }

/* ---------- Footer (card) ---------- */
.auth-footer {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--auth-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.auth-footer small {
    font-size: .88rem;
    color: var(--auth-text-3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.auth-footer a {
    font-weight: 700;
    color: var(--auth-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .auth-page {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .auth-left, .auth-right { overflow-y: visible; }
    .auth-left {
        padding: 56px 32px 24px;
        min-height: auto;
    }
    .auth-brand { max-width: 100%; text-align: center; }
    .auth-brand .auth-kicker { margin-left: auto; margin-right: auto; }
    .auth-title { font-size: clamp(1.7rem, 5vw, 2.3rem); }
    .auth-subtitle { font-size: .98rem; margin-bottom: 28px; margin-left: auto; margin-right: auto; }
    .auth-feature { grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: left; max-width: 540px; margin: 0 auto; }
    .auth-feature > div { font-size: .9rem; }
    .auth-right { padding: 24px 24px 48px; }
}

@media (max-width: 640px) {
    .auth-left { padding: 44px 20px 16px; }
    .auth-feature { grid-template-columns: 1fr; }
    .auth-right { padding: 16px 16px 40px; }
    .auth-card-inner { padding: 28px 22px 24px; }
    .auth-body h2 { font-size: 1.4rem; }
    .auth-header { gap: 12px; }
    .auth-logo { width: 48px; height: 48px; font-size: 1.2rem; }
    .auth-company strong { font-size: 1rem; }
    .auth-footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- Misc utilities for legacy markup ---------- */
.form-grid > .form-group-modern { margin: 0; }
.form-grid > div { min-width: 0; }

/* ---------- Wide card variant (used by signup) — ULTRA COMPACT ---------- */
/* Goal: full signup form must fit a typical desktop viewport with no scroll. */
.auth-card.is-wide { max-width: 820px; }
.auth-card.is-wide .auth-card-inner { padding: 18px 22px 16px; }

/* Header very tight */
.auth-card.is-wide .auth-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    gap: 10px;
}
.auth-card.is-wide .auth-logo { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }
.auth-card.is-wide .auth-company strong { font-size: .96rem; }
.auth-card.is-wide .auth-company span { font-size: .72rem; }

/* Body title compact */
.auth-card.is-wide .auth-body h2 { font-size: 1.15rem; margin-bottom: 2px; }
.auth-card.is-wide .auth-body > p { font-size: .82rem; margin-bottom: 12px; line-height: 1.45; }

/* Float fields — converted to label-on-top layout (matches form-group-modern) */
.auth-card.is-wide .float-field {
    display: flex;
    flex-direction: column;
}
.auth-card.is-wide .float-field label {
    position: static;
    order: -1;
    transform: none;
    left: auto;
    top: auto;
    background: transparent;
    padding: 0;
    margin: 0 0 3px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--auth-text-2);
    pointer-events: auto;
}
.auth-card.is-wide .float-field input {
    padding: 8px 12px;
    font-size: .85rem;
    border-radius: 9px;
    border-width: 1px;
}
/* keep label static on focus / filled state too */
.auth-card.is-wide .float-field input:focus + label,
.auth-card.is-wide .float-field input:not(:placeholder-shown) + label {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    background: transparent;
    font-size: .72rem;
    color: var(--auth-text-2);
}
/* hide inline icon since label is above now */
.auth-card.is-wide .float-field .field-icon { display: none; }
/* required asterisk for required fields */
.auth-card.is-wide .float-field:has(input[required]) label::after {
    content: ' *';
    color: var(--auth-danger);
    margin-left: 2px;
}

/* Modern fields (select/file) slim */
.auth-card.is-wide .form-label-modern { font-size: .72rem; margin-bottom: 3px; font-weight: 700; }
.auth-card.is-wide .form-select-modern,
.auth-card.is-wide .form-input-modern {
    padding: 8px 12px;
    font-size: .85rem;
    border-radius: 9px;
    border-width: 1px;
}
.auth-card.is-wide .form-select-modern { background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.auth-card.is-wide .form-input-modern[type="file"] { padding: 4px 8px; font-size: .76rem; }
.auth-card.is-wide .form-input-modern[type="file"]::file-selector-button { padding: 5px 10px; font-size: .76rem; border-radius: 6px; }
.auth-card.is-wide .form-group-modern small { font-size: .68rem; margin-top: 2px; line-height: 1.3; }

/* Info / terms */
.auth-card.is-wide .info-box { padding: 8px 12px; border-radius: 9px; }
.auth-card.is-wide .info-box > div > div > div:first-child { font-size: .65rem !important; }
.auth-card.is-wide .info-box > div > div > div:last-child { font-size: .72rem !important; }
.auth-card.is-wide .info-box #packagePrice { font-size: 1.3rem !important; }
.auth-card.is-wide .terms-row { padding: 8px 10px; border-radius: 9px; }
.auth-card.is-wide .terms-row span { font-size: .76rem; line-height: 1.4; }
.auth-card.is-wide .terms-row input[type="checkbox"] { width: 16px; height: 16px; }

/* Submit & footer */
.auth-card.is-wide .auth-submit {
    padding: 11px 22px;
    font-size: .92rem;
    border-radius: 10px;
    margin-top: 2px;
    box-shadow: 0 6px 16px rgba(79,70,229,.28);
}
.auth-card.is-wide .auth-footer {
    margin-top: 12px;
    padding-top: 10px;
}
.auth-card.is-wide .auth-footer small { font-size: .8rem; }

/* Form grid — tight rows */
.auth-card.is-wide .form-grid {
    gap: 8px 12px;
    margin-bottom: 4px;
}
@media (min-width: 640px) {
    .auth-card.is-wide .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Right column compact padding so card has more vertical room */
.auth-card.is-wide { margin: 12px 0; }
@media (min-width: 1025px) {
    .auth-right:has(.auth-card.is-wide) { padding: 16px 20px; align-items: flex-start; }
}

@media (max-width: 640px) {
    .auth-card.is-wide .auth-card-inner { padding: 18px 16px 16px; }
}

/* fields that should always span full width inside a 2-col grid */
.form-grid > .field-full,
.form-grid > .form-group-modern.field-full,
.form-grid > .float-field.field-full,
.form-grid > .info-box.field-full,
.form-grid > .terms-row { grid-column: 1 / -1; }

/* file input row helper (label + control nicely sized) */
.form-group-modern small {
    display: block;
    font-size: .78rem;
    color: var(--auth-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* Terms checkbox row */
.terms-row {
    margin: 4px 0 2px;
    padding: 14px 16px;
    background: var(--auth-bg-soft);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
}
.terms-row label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-size: .9rem;
    cursor: pointer;
    margin: 0;
}
.terms-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--auth-primary);
    cursor: pointer;
    flex-shrink: 0;
}
.terms-row span { color: var(--auth-text-2); line-height: 1.55; }
.terms-row a { color: var(--auth-primary); font-weight: 700; }

