﻿:root {
    --auth-bg: #f5f6f8;
    --auth-surface: #ffffff;
    --auth-surface-soft: #f9fafb;
    --auth-text: #111827;
    --auth-muted: #6b7280;
    --auth-border: #d7dce3;
    --auth-border-strong: #b8c0cc;
    --auth-primary: #111827;
    --auth-primary-hover: #020617;
    --auth-danger-bg: #fff1f2;
    --auth-danger-border: #fecdd3;
    --auth-danger-text: #be123c;
    --auth-radius: 6px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text);
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.95), transparent 32%), linear-gradient(135deg, #f8fafc 0%, #eef2f7 48%, #e8edf5 100%);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
}

.auth-hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 56px;
    overflow: hidden;
    border-right: 1px solid rgba(183, 193, 207, 0.75);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 243, 248, 0.88)), radial-gradient(circle at top left, rgba(17, 24, 39, 0.08), transparent 34%);
}

.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 6px;
    transform: rotate(-8deg);
}

.auth-hero::before {
    width: 260px;
    height: 260px;
    right: -80px;
    top: 72px;
}

.auth-hero::after {
    width: 180px;
    height: 180px;
    left: -60px;
    bottom: 80px;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.auth-product-badge {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-eyebrow {
    margin-bottom: 10px;
    color: var(--auth-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-hero h1 {
    margin: 0;
    max-width: 520px;
    color: #0f172a;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
    font-weight: 750;
}

.auth-hero-text {
    max-width: 470px;
    margin-top: 22px;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.75;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 42px;
}

.auth-feature-item {
    min-height: 64px;
    padding: 4px;
    border: 1px solid rgba(183, 193, 207, 0.9);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.62);
}

.auth-feature-item span {
    display: block;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.auth-feature-item strong {
    display: block;
    color: #111827;
    font-size: 0.92rem;
    line-height: 1.35;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 34px;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(16px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.login-logo {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #111827;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-brand h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.login-brand p {
    margin: 5px 0 0;
    color: var(--auth-muted);
    font-size: 0.93rem;
    line-height: 1.45;
}

.demo-account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    padding: 10px 12px;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    background: var(--auth-surface-soft);
    color: #64748b;
    font-size: 0.86rem;
}

    .demo-account strong {
        color: #111827;
        font-weight: 700;
    }

.login-form {
    margin-top: 4px;
}

.form-field {
    margin-bottom: 16px;
}

.form-label {
    margin-bottom: 7px;
    color: #1f2937;
    font-size: 0.88rem;
    font-weight: 650;
}

.modern-input {
    min-height: 44px;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--auth-text);
    font-size: 0.95rem;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.modern-input::placeholder {
    color: #9ca3af;
}

.modern-input:hover {
    border-color: var(--auth-border-strong);
}

.modern-input:focus {
    border-color: #64748b;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.14);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 22px;
}

.remember-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.remember-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.remember-square {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #9ca3af;
    border-radius: 4px;
    background: #ffffff;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.remember-square::after {
    content: "";
    width: 6px;
    height: 11px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(42deg) translateY(-1px);
    opacity: 0;
}

.remember-input:checked + .remember-square {
    border-color: #111827;
    background: #111827;
}

.remember-input:checked + .remember-square::after {
    opacity: 1;
}

.remember-input:focus-visible + .remember-square {
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.16);
}

.remember-text {
    color: #374151;
    font-size: 0.94rem;
    font-weight: 500;
}

.login-btn {
    position: relative;
    min-height: 46px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #111827;
    border-radius: 6px;
    background: var(--auth-primary);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 700;
    transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease, opacity 140ms ease;
}

.login-btn:hover,
.login-btn:focus {
    border-color: var(--auth-primary-hover);
    background: var(--auth-primary-hover);
    color: #ffffff;
}

.login-btn:active {
    transform: translateY(1px);
}

.login-btn:disabled {
    opacity: 0.82;
    cursor: wait;
}

.login-btn-spinner {
    width: 17px;
    height: 17px;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.75s linear infinite;
}

.login-btn.is-loading .login-btn-spinner {
    display: inline-block;
}

.login-btn.is-loading .login-btn-text {
    opacity: 0.92;
}

.login-footer-text {
    margin: 18px 0 0;
    color: #6b7280;
    text-align: center;
    font-size: 0.82rem;
}

.auth-validation {
    padding: 10px 12px;
    border: 1px solid var(--auth-danger-border);
    border-radius: 6px;
    background: var(--auth-danger-bg);
    color: var(--auth-danger-text);
    font-size: 0.86rem;
}

.auth-validation:empty {
    display: none;
}

.text-danger.small {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 992px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .auth-main {
        padding: 32px 18px;
    }

    .login-card {
        max-width: 440px;
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .auth-main {
        align-items: flex-start;
        padding-top: 42px;
    }

    .login-card {
        padding: 22px;
    }

    .login-brand {
        align-items: flex-start;
    }

    .login-brand h1 {
        font-size: 1.45rem;
    }

    .demo-account {
        font-size: 0.8rem;
    }
}

/* =========================
   Feature cards with icons
   ========================= */

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 42px;
}

.auth-feature-item {
    min-height: 64px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px;
    padding-top: 12px;
    border: 1px solid rgba(183, 193, 207, 0.9);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.66);
}

.feature-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.72);
}

    .feature-icon svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.feature-blue .feature-icon {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.feature-purple .feature-icon {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.feature-green .feature-icon {
    color: #16a34a;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.auth-feature-item span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.auth-feature-item strong {
    display: block;
    color: #111827;
    font-size: 0.92rem;
    line-height: 1.35;
    font-weight: 750;
}


/* =========================
   Better login form inputs
   ========================= */

.form-field {
    margin-bottom: 17px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.modern-input {
    width: 100% !important;
    min-height: 46px;
    display: block;
    padding: 10px 12px;
    border: 1px solid #d5dbe5;
    border-radius: 6px;
    background: linear-gradient(#ffffff, #ffffff) padding-box, linear-gradient(180deg, #eef2f7, #d8dee8) border-box;
    color: #111827;
    font-size: 0.94rem;
    font-weight: 500;
    outline: none;
    box-shadow: none;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

    .modern-input::placeholder {
        color: #9aa3b2;
        font-weight: 450;
    }

    .modern-input:hover {
        border-color: #b8c1cf;
        background-color: #ffffff;
    }

    .modern-input:focus {
        border-color: #64748b;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.14);
    }

    .modern-input.input-validation-error {
        border-color: #f43f5e;
        background-color: #fffafa;
        box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.08);
    }

.text-danger.small,
.field-validation-error {
    display: block;
    margin-top: 6px;
    color: #be123c !important;
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 500;
}

.field-validation-valid {
    display: none;
}
