:root {
    --auth-primary: #1B4FD8;
    --auth-primary-dark: #1E40AF;
    --auth-secondary: #16A34A;
    --auth-warning: #F59E0B;
    --auth-danger: #DC2626;
    --auth-dark: #0F172A;
    --auth-surface: #F8FAFC;
    --auth-card: #FFFFFF;
    --auth-text: #1E293B;
    --auth-muted: #64748B;
    --auth-border: #E2E8F0;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--auth-surface);
    color: var(--auth-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 40% 60%;
    background: var(--auth-surface);
}

.auth-brand-panel {
    position: sticky;
    top: 0;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--auth-dark);
    color: #fff;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 40px);
    pointer-events: none;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(27, 79, 216, 0.24), transparent 34%),
        radial-gradient(circle at 84% 78%, rgba(22, 163, 74, 0.16), transparent 30%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 56px 48px;
}

.hero-blob-auth {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.hero-blob-auth.blob-one {
    top: -120px;
    left: -140px;
    background: rgba(27, 79, 216, 0.15);
    animation: blobFloat 12s ease-in-out infinite alternate;
}

.hero-blob-auth.blob-two {
    right: -150px;
    bottom: -130px;
    background: rgba(22, 163, 74, 0.12);
    animation: blobFloat 15s ease-in-out -5s infinite alternate;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(40px, -30px) scale(1.12);
    }
}

.auth-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    color: var(--auth-text);
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
}

.auth-logo .puc {
    color: var(--auth-primary);
}

.auth-logo .zone,
.auth-logo .tick {
    color: var(--auth-secondary);
}

.auth-heading {
    margin: 32px 0 0;
    color: #fff;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
}

.auth-heading .blue {
    color: var(--auth-primary);
}

.auth-heading .green {
    color: var(--auth-secondary);
}

.auth-brand-copy {
    max-width: 320px;
    margin: 16px 0 0;
    color: #94A3B8;
    font-size: 16px;
    line-height: 1.7;
}

.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 40px;
}

.auth-stat {
    padding: 0 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-stat:first-child {
    padding-left: 0;
    border-left: 0;
}

.auth-stat strong {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.auth-stat strong.green {
    color: var(--auth-secondary);
}

.auth-stat span {
    display: block;
    margin-top: 3px;
    color: #64748B;
    font-size: 12px;
    line-height: 1.35;
}

.auth-testimonial,
.auth-dashboard-preview {
    margin-top: 40px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: #1E293B;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.auth-quote-mark {
    color: var(--auth-primary);
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
}

.auth-quote {
    margin: 8px 0 0;
    color: #CBD5E1;
    font-size: 14px;
    line-height: 1.6;
}

.auth-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.auth-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--auth-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.auth-author strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.auth-author span {
    display: block;
    margin-top: 2px;
    color: #64748B;
    font-size: 12px;
}

.auth-compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 32px;
    padding: 6px 14px;
    border: 1px solid rgba(22, 163, 74, 0.3);
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.15);
    color: #86EFAC;
    font-size: 12px;
    font-weight: 700;
}

.auth-benefits {
    display: grid;
    gap: 12px;
    margin-top: 32px;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #CBD5E1;
    font-size: 14px;
    line-height: 1.45;
}

.auth-benefits .check {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.18);
    color: #86EFAC;
    font-size: 12px;
    font-weight: 900;
}

.auth-dashboard-header,
.auth-vehicle-row,
.auth-reminder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-dashboard-header {
    margin-bottom: 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.auth-active-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #86EFAC;
    font-size: 11px;
    font-weight: 700;
}

.auth-active-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--auth-secondary);
}

.auth-vehicle-list {
    display: grid;
    gap: 8px;
}

.auth-vehicle-row {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.52);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.auth-status-pill {
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.auth-status-pill.valid {
    background: rgba(22, 163, 74, 0.16);
    color: #86EFAC;
}

.auth-status-pill.warning {
    background: rgba(245, 158, 11, 0.16);
    color: #FCD34D;
}

.auth-reminder-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748B;
    font-size: 11px;
}

.auth-form-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    background: var(--auth-surface);
}

.auth-form-wrap {
    width: min(100%, 520px);
}

.auth-form-wrap.wide {
    width: min(100%, 760px);
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 24px;
    text-align: center;
}

.auth-mobile-tagline {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-title {
    margin: 0;
    color: var(--auth-text);
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0;
}

.auth-title.small {
    font-size: 26px;
}

.auth-subtitle {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-link {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-alert.error {
    border: 1px solid #FECACA;
    border-left: 4px solid var(--auth-danger);
    background: #FEF2F2;
    color: #991B1B;
}

.auth-alert.success {
    border: 1px solid #BBF7D0;
    border-left: 4px solid var(--auth-secondary);
    background: #F0FDF4;
    color: #166534;
}

.auth-form {
    margin-top: 28px;
}

.auth-section {
    margin-top: 28px;
}

.auth-section:first-child {
    margin-top: 0;
}

.auth-section-label {
    margin: 0 0 12px;
    color: #94A3B8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-field {
    min-width: 0;
}

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

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.auth-label {
    display: block;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    width: 18px;
    height: 18px;
    color: #94A3B8;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 48px;
    background: #fff;
    border: 1.5px solid var(--auth-border);
    border-radius: 10px;
    padding: 12px 16px 12px 42px;
    color: var(--auth-text);
    font-size: 15px;
    line-height: 1.2;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input.with-right {
    padding-right: 46px;
}

.auth-input.with-two-right {
    padding-right: 76px;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(27, 79, 216, 0.1);
}

.auth-input.error {
    border-color: var(--auth-danger);
    background: #FFF5F5;
}

.auth-input:focus.error {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.auth-input::placeholder {
    color: #94A3B8;
}

select.auth-input {
    appearance: none;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, #94A3B8 50%),
        linear-gradient(135deg, #94A3B8 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94A3B8;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #F1F5F9;
    color: var(--auth-text);
}

.match-icon {
    position: absolute;
    top: 50%;
    right: 44px;
    z-index: 2;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-error {
    margin-top: 5px;
    color: var(--auth-danger);
    font-size: 12px;
    line-height: 1.4;
}

.auth-note {
    margin: 7px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.45;
}

.auth-check-row {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: #374151;
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    border: 1.5px solid #CBD5E1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.custom-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.custom-checkbox svg {
    width: 13px;
    height: 13px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}

.custom-checkbox.checked {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
}

.custom-checkbox.checked svg {
    opacity: 1;
}

.auth-submit-btn {
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-primary);
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.auth-submit-btn:hover {
    background: var(--auth-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(27, 79, 216, 0.35);
}

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

.auth-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

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

.auth-spinner {
    width: 18px;
    height: 18px;
    display: inline-block;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpinner 0.7s linear infinite;
    vertical-align: middle;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: #94A3B8;
    font-size: 12px;
    line-height: 1;
}

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

.auth-social-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auth-social-btn {
    position: relative;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 700;
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-social-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    padding: 6px 9px;
    border-radius: 8px;
    background: #0F172A;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}

.auth-social-btn:hover::after,
.auth-social-btn:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.auth-register-prompt {
    margin-top: 24px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    color: #94A3B8;
    font-size: 12px;
    text-align: center;
}

.auth-trust-badges span:not(:last-child)::after {
    content: "|";
    margin-left: 10px;
    color: #CBD5E1;
}

.role-selector {
    margin-bottom: 24px;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.role-card {
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    color: inherit;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.role-card:hover {
    transform: translateY(-1px);
}

.role-card.selected {
    border-color: var(--auth-primary);
    background: #EFF6FF;
}

.role-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #F1F5F9;
    color: var(--auth-primary);
}

.role-card.selected .role-icon {
    background: #DBEAFE;
}

.role-card strong {
    display: block;
    color: var(--auth-text);
    font-size: 14px;
    line-height: 1.25;
}

.role-card span {
    display: block;
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.35;
}

.auth-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 24px 0 28px;
}

.auth-step {
    position: relative;
    text-align: center;
}

.auth-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 14px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 2px;
    background: var(--auth-border);
}

.auth-step.active:not(:last-child)::after {
    background: rgba(27, 79, 216, 0.35);
}

.auth-step-circle {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #CBD5E1;
    border-radius: 999px;
    background: var(--auth-surface);
    color: #94A3B8;
    font-size: 12px;
    font-weight: 900;
}

.auth-step-label {
    display: block;
    margin-top: 7px;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 700;
}

.auth-step.active .auth-step-circle {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
    color: #fff;
}

.auth-step.active .auth-step-label {
    color: var(--auth-primary);
}

.strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 7px;
}

.strength-seg {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: var(--auth-border);
    transition: background 0.3s;
}

.strength-label {
    min-height: 18px;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 700;
}

.auth-file-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.auth-file-field {
    position: relative;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    background: #fff;
    color: var(--auth-muted);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
}

.auth-file-field input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.auth-file-field .preview {
    position: absolute;
    inset: 0;
}

.auth-file-field .preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.otp-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    background: var(--auth-surface);
}

.otp-card {
    width: min(100%, 440px);
    text-align: center;
}

.auth-center-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 28px auto 18px;
    border-radius: 999px;
    background: #EFF6FF;
    color: var(--auth-primary);
}

.otp-input-row {
    display: grid;
    grid-template-columns: repeat(6, 48px);
    justify-content: center;
    gap: 8px;
    margin: 28px 0 18px;
}

.otp-input {
    width: 48px;
    height: 56px;
    border: 1.5px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-text);
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.otp-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(27, 79, 216, 0.1);
}

.otp-input.filled {
    border-color: var(--auth-secondary);
}

.otp-input.flash {
    animation: otpFlash 0.4s ease;
}

@keyframes otpFlash {
    0%,
    100% {
        background: #fff;
    }
    50% {
        background: #F0FDF4;
    }
}

.otp-timer {
    margin: 12px 0 20px;
    color: var(--auth-muted);
    font-size: 14px;
    text-align: center;
}

.resend-link {
    display: none;
    border: 0;
    background: transparent;
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.auth-state {
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.auth-state.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.hidden {
    display: none !important;
}

@media (max-width: 1023px) {
    .auth-shell {
        display: block;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 24px 20px;
    }

    .auth-mobile-brand {
        display: block;
    }

    .auth-logo.mobile {
        font-size: 26px;
    }

    .auth-title {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    .auth-grid,
    .role-grid,
    .auth-file-grid {
        grid-template-columns: 1fr;
    }

    .auth-social-row {
        grid-template-columns: 1fr;
    }

    .otp-input-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }

    .otp-input {
        width: 100%;
        min-width: 0;
        height: 54px;
    }

    .auth-trust-badges {
        gap: 6px;
    }
}
