/* ==========================================================================
   GetMyTariff — Auth pages (Login, Register, Forgot/Reset password, etc.)
   Single stylesheet for all Views/AuthView pages. No Inspinia dependency.
   ========================================================================== */

:root {
    --auth-bg-deep: #1a2332;
    --auth-bg-mid: #243044;
    --auth-bg-glow: #2d4a6a;
    --auth-card-bg: #ffffff;
    --auth-card-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
    --auth-panel-start: #1e3a5f;
    --auth-panel-end: #152a45;
    --auth-panel-accent: #60a5fa;
    --auth-text: #0f172a;
    --auth-text-soft: #64748b;
    --auth-soft: #dbeafe;
    --auth-soft-fill: #eff6ff;
    --auth-input-bg: #f0f7ff;
    --auth-primary: #2563eb;
    --auth-primary-strong: #1d4ed8;
    --auth-primary-hover: #1e40af;
    --auth-primary-wash: rgba(37, 99, 235, 0.12);
    --auth-success: #2563eb;
    --auth-danger: #dc2626;
    --auth-warning: #d97706;
    --auth-border: rgba(148, 163, 184, 0.35);
    --auth-radius: 12px;
    --auth-radius-lg: 20px;
    --auth-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Bootstrap theme overrides (auth pages only) */
.auth-wrapper {
    --bs-primary: var(--auth-primary);
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: var(--auth-primary-strong);
    --bs-link-hover-color: var(--auth-primary-hover);
    --bs-body-font-family: var(--auth-font);
    --bs-border-radius: var(--auth-radius);
    --bs-border-radius-sm: 10px;
    --bs-border-radius-lg: var(--auth-radius-lg);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--auth-font);
    color: var(--auth-text);
    background:
        radial-gradient(circle at 15% 20%, rgba(96, 165, 250, 0.14), transparent 32rem),
        radial-gradient(circle at 85% 80%, rgba(37, 99, 235, 0.12), transparent 34rem),
        linear-gradient(145deg, var(--auth-bg-deep) 0%, var(--auth-bg-mid) 55%, #2a3d55 100%);
    -webkit-font-smoothing: antialiased;
}

/* ── Layout shell ───────────────────────────────────────────────────────── */

.auth-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
}

.auth-wrapper::before,
.auth-wrapper::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.auth-wrapper::before {
    width: 30rem;
    height: 30rem;
    top: -14rem;
    left: -12rem;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
}

.auth-wrapper::after {
    width: 36rem;
    height: 36rem;
    right: -16rem;
    bottom: -20rem;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 72%);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    background: var(--auth-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-card-shadow);
    overflow: hidden;
    display: flex;
    min-height: 600px;
}

.auth-card.auth-card--narrow {
    width: min(500px, 100%);
    min-height: auto;
    display: block;
    padding: 40px 36px 30px;
}

.auth-card.auth-card--terms {
    width: min(900px, 100%);
    min-height: auto;
    display: block;
    padding: 0;
}

.auth-card.auth-card--register {
    width: min(1060px, 100%);
    min-height: 640px;
}

.auth-left {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 38px 28px;
    background: #ffffff;
}

.auth-left--register {
    flex-basis: 52%;
    justify-content: flex-start;
    padding-top: 32px;
}

.auth-left--register .auth-title,
.auth-left--register .auth-subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.auth-left--register .auth-subtitle {
    max-width: 30rem;
}

.auth-card--narrow .auth-left,
.auth-card--terms .auth-left {
    padding: 0;
}

/* ── Right marketing panel ───────────────────────────────────────────────── */

.auth-right {
    position: relative;
    flex: 1;
    padding: 36px 32px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.08), transparent 36%),
        radial-gradient(circle at 8% 88%, rgba(96, 165, 250, 0.14), transparent 28%),
        linear-gradient(165deg, var(--auth-panel-start) 0%, var(--auth-panel-end) 100%);
    overflow: hidden;
}

.auth-right::before,
.auth-right::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.5;
}

.auth-right::before {
    width: 20rem;
    height: 20rem;
    top: -7rem;
    right: -7rem;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, transparent 68%);
}

.auth-right::after {
    width: 16rem;
    height: 16rem;
    left: -5rem;
    bottom: -6rem;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, transparent 70%);
}

.auth-right-inner {
    position: relative;
    z-index: 1;
    max-width: 340px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.auth-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    width: fit-content;
}

.auth-panel-title {
    margin: 0;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-panel-copy {
    margin: 14px 0 24px;
    max-width: 22rem;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.92rem;
    line-height: 1.6;
}

.auth-feature-list {
    display: grid;
    gap: 4px;
}

.right-feature {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
}

.right-feature .icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--auth-panel-accent);
    font-size: 1rem;
}

.right-feature h6 {
    margin: 1px 0 3px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
}

.right-feature p {
    margin: 0;
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.84rem;
    line-height: 1.45;
}

/* ── Brand header ────────────────────────────────────────────────────────── */

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.auth-left--register .brand-logo {
    margin-bottom: 16px;
}

.brand-logo.brand-logo--center {
    justify-content: center;
}

.brand-logo .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #3b82f6 50%, var(--auth-primary-strong) 100%);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    flex-shrink: 0;
}

.brand-logo .logo-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.brand-logo .logo-text span {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--auth-text-soft);
}

/* ── Typography (Inspinia auth-2: h4 + semibold, muted subtitle) ─────────── */

.auth-title {
    margin: 0 0 8px;
    color: #495057;
    font-size: 1.25rem;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1.auth-title,
h2.auth-title,
h3.auth-title,
h4.auth-title,
h5.auth-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.auth-left--register .auth-title {
    font-size: 1.25rem;
}

.auth-subtitle {
    margin: 0 0 22px;
    max-width: 28rem;
    color: var(--auth-text-soft);
    font-size: 0.875rem;
    line-height: 1.55;
}

.auth-left--register .auth-subtitle {
    margin-bottom: 20px;
}

.auth-muted,
.auth-wrapper .small.text-muted {
    font-size: 0.8125rem;
    color: var(--auth-text-soft);
}

.auth-wrapper a.small.link-primary {
    font-size: 0.8125rem;
}

.auth-muted--center {
    text-align: center;
    margin-bottom: 8px;
}

.auth-muted--center.mb-0 {
    margin-bottom: 0;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

.form-label {
    margin-bottom: 6px;
    color: var(--auth-text);
    font-size: 0.85rem;
    font-weight: 600;
}

.input-group {
    position: relative;
    align-items: stretch;
    border-radius: var(--auth-radius);
}

.input-group-text,
.form-control,
.form-select,
.btn-toggle-pass,
.btn-toggle {
    border: 1px solid var(--auth-border);
    background: var(--auth-input-bg);
}

.input-group-text {
    border-right: 0;
    min-width: 44px;
    justify-content: center;
    background: var(--auth-input-bg);
    color: #64748b;
    border-radius: var(--auth-radius) 0 0 var(--auth-radius);
}

.form-control,
.form-select {
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    color: var(--auth-text);
    font-size: 0.92rem;
    line-height: 1.35;
    border-left: 0;
    border-radius: 0 var(--auth-radius) var(--auth-radius) 0;
    box-shadow: none;
}

.form-select {
    cursor: default;
}

.input-group .form-control:not(:last-child),
.input-group .form-select:not(:last-child) {
    border-radius: 0;
}

.input-group .form-control:last-child,
.input-group .form-select:last-child {
    border-radius: 0 var(--auth-radius) var(--auth-radius) 0;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control,
.input-group:focus-within .form-select,
.input-group:focus-within .btn-toggle-pass,
.input-group:focus-within .btn-toggle {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px var(--auth-primary-wash);
    position: relative;
    z-index: 1;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none;
    background: #fff;
}

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

.btn-toggle-pass,
.btn-toggle {
    min-width: 44px;
    border-left: 0;
    border-radius: 0 var(--auth-radius) var(--auth-radius) 0;
    color: #64748b;
    background: var(--auth-input-bg);
}

.btn-toggle-pass:hover,
.btn-toggle:hover {
    color: var(--auth-primary);
    background: #e8f1ff;
}

.form-check-input {
    margin-top: 0.18rem;
    border-color: #94a3b8;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-wash);
}

.form-check-label {
    color: var(--auth-text-soft);
    font-size: 0.8125rem;
}

/* ── Buttons & links ──────────────────────────────────────────────────────── */

.auth-wrapper .btn-primary,
.auth-wrapper .btn-auth-primary {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #3b82f6 48%, var(--auth-primary-strong) 100%);
    color: #fff !important;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-wrapper .btn-primary:hover,
.auth-wrapper .btn-primary:focus,
.auth-wrapper .btn-auth-primary:hover,
.auth-wrapper .btn-auth-primary:focus {
    color: #fff !important;
    background: linear-gradient(135deg, var(--auth-primary-strong) 0%, var(--auth-primary) 48%, var(--auth-primary-hover) 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.auth-wrapper .btn-primary:disabled,
.auth-wrapper .btn-auth-primary:disabled {
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.auth-wrapper .btn-outline-secondary {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--auth-border);
    color: var(--auth-text);
    background: #fff;
}

.auth-wrapper .btn-outline-secondary:hover,
.auth-wrapper .btn-outline-secondary:focus {
    color: var(--auth-primary-strong);
    border-color: rgba(37, 99, 235, 0.3);
    background: var(--auth-soft-fill);
}

.auth-wrapper .link-primary,
.auth-wrapper a.link-primary {
    color: var(--auth-primary) !important;
    text-decoration: none;
    font-weight: 600;
}

.auth-wrapper .link-primary:hover,
.auth-wrapper a.link-primary:hover {
    color: var(--auth-primary-hover) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-wrapper #seatLimitMessage .btn {
    border-radius: 10px;
}

/* ── Alerts & status ─────────────────────────────────────────────────────── */

.auth-message-slot {
    min-height: 25px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0.7rem 0.9rem;
    border-radius: var(--auth-radius);
    background: var(--auth-primary-wash);
    color: var(--auth-primary-strong);
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-alert,
.alert-msg {
    margin-bottom: 0;
    padding: 0.75rem 0.9rem;
    border: 0;
    border-radius: var(--auth-radius);
    font-size: 0.88rem;
    line-height: 1.45;
}

.auth-wrapper .alert-danger,
.alert-danger.auth-alert {
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
}

.auth-wrapper .alert-success,
.alert-success.auth-alert {
    background: var(--auth-primary-wash);
    color: var(--auth-primary-strong);
}

.auth-wrapper .alert-warning,
.alert-warning.auth-alert {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
}

/* ── Footer & misc ─────────────────────────────────────────────────────────── */

.divider {
    margin: 18px 0 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.copyright-text {
    margin-top: 18px;
    color: #94a3b8;
    font-size: 0.78rem;
    text-align: center;
}

.auth-footer-links {
    margin: 0 0 6px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
}

.auth-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.icon-circle {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-primary-wash);
    color: var(--auth-primary-strong);
    font-size: 1.65rem;
}

.icon-circle--danger {
    background: rgba(220, 38, 38, 0.08);
    color: var(--auth-danger);
}

/* ── Register grid ───────────────────────────────────────────────────────── */

.register-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.register-form-grid--single-column {
    grid-template-columns: 1fr;
    row-gap: 16px;
    max-width: 520px;
    margin: 0 auto;
}

.register-form-grid--single-column .register-field,
.register-form-grid--single-column .register-field--full {
    grid-column: 1 / -1;
}

.register-form-grid--single-column .form-control,
.register-form-grid--single-column .input-group-text,
.register-form-grid--single-column .btn-auth-primary,
.register-form-grid--single-column .form-select {
    min-height: 44px;
}

.register-form-grid--single-column .btn-auth-primary {
    border-radius: 10px;
    font-weight: 700;
}

.register-field--full {
    grid-column: 1 / -1;
}

.plan-select-locked {
    background: var(--auth-input-bg) !important;
    color: var(--auth-text) !important;
    cursor: not-allowed;
    opacity: 1;
}

/* ── Password strength ─────────────────────────────────────────────────────── */

.strength-bar-wrap,
.strength-bar {
    margin-top: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    height: 5px;
}

.strength-bar-line {
    margin-top: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    height: 5px;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.24s ease, background-color 0.24s ease;
}

.req-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 5px;
    color: var(--auth-text-soft);
    font-size: 0.8rem;
}

.req-list li {
    display: flex;
    align-items: center;
}

.req-list li i {
    margin-right: 8px;
}

.req-list li.met {
    color: var(--auth-primary);
}

.req-list li.unmet {
    color: #94a3b8;
}

.strength-text {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ── Verify / state screens ───────────────────────────────────────────────── */

.state-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.state-icon.success {
    background: var(--auth-primary-wash);
    color: var(--auth-primary);
}

.state-icon.error {
    background: rgba(220, 38, 38, 0.08);
    color: var(--auth-danger);
}

.state-icon.mail {
    background: var(--auth-primary-wash);
    color: var(--auth-primary);
}

.state-title {
    margin: 0 0 8px;
    color: #495057;
    font-size: 1.25rem;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.state-title--success {
    color: var(--auth-primary-strong);
}

.state-title--danger {
    color: var(--auth-danger);
}

.state-subtitle {
    margin: 0 0 20px;
    color: var(--auth-text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.spinner-ring {
    width: 42px;
    height: 42px;
    margin: 0 auto 16px;
    border-radius: 999px;
    border: 3px solid var(--auth-primary-wash);
    border-top-color: var(--auth-primary);
    animation: auth-spin 0.75s linear infinite;
}

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

.invalid-token-box {
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
    border: 1px solid rgba(220, 38, 38, 0.12);
    text-align: center;
}

/* ── Terms page ────────────────────────────────────────────────────────────── */

.terms-header {
    padding: 28px 34px 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.terms-body {
    padding: 28px 34px;
    max-height: 72vh;
    overflow-y: auto;
}

.terms-footer {
    padding: 14px 34px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: #f8fafc;
}

.terms-body h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.terms-body h2 {
    margin-top: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--auth-text);
    font-size: 0.98rem;
    font-weight: 700;
}

.terms-body p,
.terms-body li {
    color: var(--auth-text-soft);
    font-size: 0.9rem;
    line-height: 1.6;
}

.terms-body ul {
    padding-left: 1.25rem;
}

/* ── Two-factor code inputs ────────────────────────────────────────────────── */

.two-factor-code-wrap {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.two-factor-code-wrap .code-input {
    min-width: 0;
    min-height: 48px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    padding: 0.5rem;
    background: var(--auth-input-bg);
}

.two-factor-code-wrap .code-input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px var(--auth-primary-wash);
    background: #fff;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .auth-card,
    .auth-card.auth-card--register {
        min-height: 0;
    }

    .auth-left,
    .auth-right {
        padding: 30px 26px;
    }
}

@media (max-width: 920px) {
    .auth-wrapper {
        padding: 18px;
    }

    .auth-card,
    .auth-card.auth-card--register {
        flex-direction: column;
        border-radius: var(--auth-radius-lg);
    }

    .auth-left,
    .auth-left--register,
    .auth-right {
        flex-basis: auto;
        padding: 32px 24px;
    }

    .auth-right {
        min-height: 0;
    }

    .auth-right-inner {
        max-width: none;
    }

    .register-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-wrapper {
        padding: 12px;
    }

    .auth-card.auth-card--narrow {
        padding: 32px 22px 26px;
    }

    .auth-left,
    .auth-left--register,
    .auth-right {
        padding: 26px 18px;
    }

    .brand-logo {
        margin-bottom: 22px;
    }

    .auth-title {
        font-size: 1.2rem;
    }

    .two-factor-code-wrap {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .terms-header,
    .terms-body,
    .terms-footer {
        padding-left: 18px;
        padding-right: 18px;
    }
}
