/* =========================================================
   Deprixa Auth Theme
   Shared design system for login / sign-up / forgot-password.
   ========================================================= */

:root {
    --ink-950: #060a14;
    --ink-900: #0a1024;
    --ink-800: #101833;
    --ink-700: #182348;
    --ink-600: #24316b;
    --brand-500: #2f55d4;
    --brand-400: #4a6bec;
    --brand-300: #7f97f5;
    --accent-500: #22d3ee;
    --slate-900: #0f1729;
    --slate-700: #3a445c;
    --slate-500: #6b7488;
    --slate-300: #c8ccd8;
    --slate-200: #e3e6ee;
    --slate-100: #eef1f7;
    --slate-50: #f7f8fc;
    --success-500: #16b981;
    --danger-500: #e6435a;
    --danger-50: #fdeced;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 1px 2px rgba(15, 23, 41, 0.06), 0 12px 32px -12px rgba(15, 23, 41, 0.18);
    --shadow-lift: 0 20px 45px -18px rgba(47, 85, 212, 0.55);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--slate-900);
    background: var(--slate-50);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-wordmark {
    font-family: "Lexend", "Inter", sans-serif;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* ---------- shell ---------- */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.auth-shell.auth-shell--wide {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
}

@media (max-width: 991px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
}

/* ---------- left: brand / marketing panel ---------- */
.auth-aside {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.25rem;
    background:
        radial-gradient(1100px 620px at -8% -12%, rgba(79, 107, 236, 0.55), transparent 60%),
        radial-gradient(900px 560px at 108% 118%, rgba(34, 211, 238, 0.28), transparent 55%),
        linear-gradient(160deg, var(--ink-950) 0%, var(--ink-900) 45%, var(--slate-900) 100%);
    color: #fff;
    overflow: hidden;
}

@media (max-width: 991px) {
    .auth-aside {
        display: none;
    }
}

.auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at 30% 20%, black 0%, transparent 75%);
    pointer-events: none;
}

.aside-glow {
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.35;
    pointer-events: none;
}

.aside-glow.g1 {
    background: radial-gradient(circle, var(--brand-400), transparent 70%);
    top: -160px;
    right: -140px;
    animation: float-a 14s ease-in-out infinite;
}

.aside-glow.g2 {
    background: radial-gradient(circle, var(--accent-500), transparent 70%);
    bottom: -180px;
    left: -120px;
    animation: float-b 16s ease-in-out infinite;
}

@keyframes float-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-24px, 22px); }
}

@keyframes float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -18px); }
}

.auth-aside > * {
    position: relative;
    z-index: 1;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-wordmark {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: #fff;
}

.aside-headline {
    margin: 3.25rem 0 0.9rem;
    font-size: 2.35rem;
    line-height: 1.2;
    font-weight: 700;
    max-width: 480px;
    letter-spacing: -0.01em;
}

.aside-headline .accent {
    background: linear-gradient(90deg, var(--accent-500), var(--brand-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.aside-copy {
    color: rgba(226, 232, 245, 0.72);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 420px;
    margin-bottom: 2.1rem;
}

.feature-list {
    list-style: none;
    margin: 0 0 2.4rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.94rem;
    color: rgba(226, 232, 245, 0.9);
}

.feature-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--accent-500);
}

.mock-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.2rem;
    max-width: 360px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.mock-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mock-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 245, 0.55);
}

.mock-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(22, 185, 129, 0.18);
    color: #4ee3ab;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mock-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ee3ab;
    box-shadow: 0 0 0 3px rgba(78, 227, 171, 0.25);
}

.mock-track-id {
    font-family: "SFMono-Regular", ui-monospace, Menlo, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 0.6rem;
}

.mock-progress {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-bottom: 0.55rem;
}

.mock-progress > span {
    display: block;
    height: 100%;
    width: 68%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-400), var(--accent-500));
}

.mock-route {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: rgba(226, 232, 245, 0.55);
}

.aside-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: rgba(226, 232, 245, 0.5);
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- right: form panel ---------- */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--slate-50);
    position: relative;
}

.auth-topbar {
    position: absolute;
    top: 1.75rem;
    left: 1.75rem;
    right: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.back-button:hover {
    transform: translateX(-2px);
    border-color: var(--brand-400);
    color: var(--brand-500);
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 0.55rem;
    font-family: "Lexend", sans-serif;
    font-weight: 700;
    color: var(--slate-900);
}

@media (max-width: 991px) {
    .mobile-brand {
        display: inline-flex;
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card.auth-card--wide {
    max-width: 660px;
}

.auth-card-head {
    margin-bottom: 1.9rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-500);
    background: rgba(47, 85, 212, 0.08);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    margin-bottom: 1rem;
}

.auth-card-head h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--slate-900);
    letter-spacing: -0.01em;
}

.auth-card-head p {
    margin: 0;
    color: var(--slate-500);
    font-size: 0.95rem;
}

.alert-banner {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    background: var(--danger-50);
    border: 1px solid rgba(230, 67, 90, 0.25);
    color: #a5223a;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    margin-bottom: 1.3rem;
    line-height: 1.5;
}

.alert-banner.alert-banner--warning {
    background: #fff8e8;
    border-color: rgba(217, 155, 15, 0.3);
    color: #93690a;
}

.alert-banner svg {
    flex: 0 0 auto;
    margin-top: 1px;
}

.field-group {
    margin-bottom: 1.15rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-row.field-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 560px) {
    .field-row,
    .field-row.field-row-3 {
        grid-template-columns: 1fr;
    }
}

.field-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.4rem;
}

.field-label .req {
    color: var(--danger-500);
}

.field-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.field-shell svg.field-icon {
    position: absolute;
    left: 14px;
    color: var(--slate-500);
    pointer-events: none;
    transition: color 0.15s ease;
    z-index: 2;
}

.field-shell input,
.field-shell select {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--slate-200);
    background: #fff;
    padding: 0 44px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--slate-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-shell input::placeholder {
    color: var(--slate-300);
}

.field-shell input:focus,
.field-shell select:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 4px rgba(47, 85, 212, 0.12);
}

.field-shell input:focus ~ svg.field-icon,
.field-shell:focus-within svg.field-icon {
    color: var(--brand-500);
}

.field-shell input.is-invalid {
    border-color: var(--danger-500);
}

.field-hint {
    font-size: 0.78rem;
    margin-top: 0.4rem;
}

.field-hint.hide {
    display: none;
}

.field-hint.text-danger {
    color: var(--danger-500);
}

.toggle-visibility {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--slate-500);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2;
}

.toggle-visibility:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.field-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: var(--slate-700);
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}

.check-wrap input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 0.15rem;
    accent-color: var(--brand-500);
    cursor: pointer;
}

.link-muted {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--brand-500);
}

.link-muted:hover {
    color: var(--ink-700);
}

.btn-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-500), var(--ink-700));
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: var(--shadow-lift);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 50px -16px rgba(47, 85, 212, 0.6);
}

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

.btn-submit[disabled] {
    opacity: 0.75;
    cursor: progress;
    transform: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    display: none;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.6rem 0;
    color: var(--slate-300);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}

.btn-secondary {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--slate-200);
    background: #fff;
    color: var(--slate-900);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--brand-400);
    background: var(--slate-50);
    color: var(--brand-500);
}

.signup-line {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: var(--slate-500);
}

.demo-block {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--slate-200);
}

.demo-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--slate-500);
    margin-bottom: 0.7rem;
}

.demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.demo-chip {
    border: 1px solid var(--slate-200);
    background: var(--slate-50);
    color: var(--slate-700);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.demo-chip:hover {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: #fff;
}

.legal-footer {
    text-align: center;
    font-size: 0.78rem;
    color: var(--slate-300);
    margin-top: 2.2rem;
}

.fade-up {
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- select2 restyle to match field-shell ---------- */
.field-shell .select2-container {
    width: 100% !important;
}

.field-shell .select2-container .select2-selection--single {
    height: 48px !important;
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid var(--slate-200) !important;
    background: #fff !important;
    display: flex;
    align-items: center;
    padding: 0 40px 0 44px;
}

.field-shell .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal !important;
    padding: 0 !important;
    color: var(--slate-900);
    font-size: 0.95rem;
}

.field-shell .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--slate-300);
}

.field-shell .select2-container .select2-selection__arrow {
    height: 46px !important;
    right: 10px !important;
}

.field-shell .select2-container--default.select2-container--focus .select2-selection--single,
.field-shell .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--brand-400) !important;
    box-shadow: 0 0 0 4px rgba(47, 85, 212, 0.12);
}

/* password strength meter */
.pwd-meter {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pwd-meter:empty {
    display: none;
}

.pwd-meter.weak, .pwd-meter.weaks {
    background: var(--danger-50);
    color: #a5223a;
}

.pwd-meter.medium {
    background: #fff4e0;
    color: #a3670a;
}

.pwd-meter.good, .pwd-meter.strong {
    background: rgba(47, 85, 212, 0.1);
    color: var(--brand-500);
}

.pwd-meter.very-strong {
    background: rgba(22, 185, 129, 0.12);
    color: #0f8f63;
}
