/* ═══════════════════════════════════════════════════════════════════════════
   ConsignRev Login - Bold Dark Professional
   Red. White. Black. Gold Accent.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   CSS VARIABLES
   ───────────────────────────────────────────────────────────────────────── */
:root {
    /* Core */
    --red: #FF2D2D;
    --red-hover: #FF4444;
    --red-muted: rgba(255, 45, 45, 0.15);
    --black: #000000;
    --white: #FFFFFF;

    /* Grays */
    --gray-950: #0A0A0A;
    --gray-900: #111111;
    --gray-800: #1A1A1A;
    --gray-700: #222222;
    --gray-600: #2D2D2D;
    --gray-500: #3D3D3D;
    --gray-400: #525252;
    --gray-300: #737373;
    --gray-200: #A3A3A3;
    --gray-100: #D4D4D4;

    /* Gold Accent */
    --gold: #F59E0B;
    --gold-hover: #FBBF24;

    /* Semantic */
    --text-primary: var(--white);
    --text-secondary: var(--gray-200);
    --text-muted: var(--gray-400);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
}

/* ─────────────────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-950);
    color: var(--text-primary);
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────
   LOGIN SHELL - Two Column Layout
   ───────────────────────────────────────────────────────────────────────── */
.login-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ─────────────────────────────────────────────────────────────────────────
   LEFT PANEL - BRAND
   ───────────────────────────────────────────────────────────────────────── */
.login-brand-panel {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255, 45, 45, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, var(--gray-950) 0%, var(--gray-900) 50%, var(--gray-950) 100%);
    overflow: hidden;
}

/* Background Grid */
.brand-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
}

.brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Content */
.brand-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
    -ms-interpolation-mode: bicubic;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.brand-tagline {
    font-size: 1rem;
    color: var(--gray-300);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Features */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 1rem;
    align-items: start;
}

.feature-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--gold);
    font-size: 1.1rem;
}

.feature-content h3 {
    font-family: 'Teko', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.feature-content p {
    font-size: 0.85rem;
    color: var(--gray-400);
    line-height: 1.5;
}

/* Stats */
.brand-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-family: 'Teko', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

.article{
    text-align: top;
    /*align-items: flex-start;*/
}
/* ─────────────────────────────────────────────────────────────────────────
   RIGHT PANEL - LOGIN FORM
   ───────────────────────────────────────────────────────────────────────── */
.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--gray-950);
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
    display: none;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.mobile-logo .logo-img {
    height: 48px;
    max-width: 180px;
}

/* ─────────────────────────────────────────────────────────────────────────
   LOGIN CARD
   ───────────────────────────────────────────────────────────────────────── */
.login-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: none;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-logo .logo-img {
    height: 48px;
    max-width: 180px;
}

.login-header h1 {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.375rem;
}

.login-header p {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* ─────────────────────────────────────────────────────────────────────────
   ALERTS
   ───────────────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

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

.alert-error {
    background: var(--red-muted);
    border: 1px solid rgba(255, 45, 45, 0.25);
    color: #FF8888;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93C5FD;
}

/* ─────────────────────────────────────────────────────────────────────────
   LOGIN FORM
   ───────────────────────────────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Field */
.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Radzen Inputs Override */
.field .rz-textbox,
.field .rz-password {
    width: 100% !important;
    height: 48px !important;
    padding: 0 1rem !important;
    background: var(--gray-800) !important;
    border: 1px solid var(--gray-600) !important;
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.field .rz-textbox:focus,
.field .rz-password:focus {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px var(--red-muted) !important;
    outline: none !important;
}

.field .rz-textbox::placeholder,
.field .rz-password::placeholder {
    color: var(--gray-500) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   FORM ROW - Checkbox & Link
   ───────────────────────────────────────────────────────────────────────── */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.25rem;
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-300);
}

.checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    background: var(--gray-800);
    border: 1px solid var(--gray-500);
    border-radius: 4px;
    position: relative;
    transition: all 0.15s;
}

.checkbox-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: 2px solid var(--white);
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s;
}

.checkbox input:checked + .checkbox-box {
    background: var(--red);
    border-color: var(--red);
}

.checkbox input:checked + .checkbox-box::after {
    transform: rotate(45deg) scale(1);
}

.checkbox input:focus-visible + .checkbox-box {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* Link Button */
.link-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.link-btn:hover {
    color: var(--gold-hover);
}

.link-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   PRIMARY BUTTON
   ───────────────────────────────────────────────────────────────────────── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    height: 52px;
    margin-top: 0.5rem;
    background: var(--red);
    border: none;
    border-radius: 6px;
    color: var(--white);
    font-family: 'Teko', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--red-hover);
    box-shadow: 0 4px 20px rgba(255, 45, 45, 0.3);
}

.btn-primary:active {
    background: var(--red);
    transform: translateY(1px);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.btn-primary svg {
    transition: transform 0.2s;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* ─────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────── */
.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--gray-400);
}

.login-copyright {
    display: none;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE - TABLET
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    html, body {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-shell {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-brand-panel {
        flex: none;
        padding: 2rem;
        min-height: auto;
    }

    .brand-content {
        max-width: 100%;
    }

    .brand-features {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: flex-start;
    }

    .feature {
        flex: 1 1 200px;
    }

    .login-form-panel {
        flex: 1;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 2rem 1.5rem;
        background: var(--gray-950) !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE - MOBILE
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    html, body {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
    }

    /* Hide brand panel */
    .login-brand-panel {
        display: none;
    }

    /* Full-width form panel - FULL SCREEN COVERAGE */
    .login-form-panel {
        flex: 1;
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 2rem 1rem;
        justify-content: center;
        background: var(--gray-950) !important;
        background-attachment: fixed !important;
    }

    /* Show mobile logo */
    .mobile-logo {
        display: flex;
    }

    /* Full-width card */
    .login-card {
        max-width: 100%;
        padding: 1.5rem;
        background: var(--gray-900);
        border: 1px solid var(--gray-700);
        border-radius: 8px;
    }

    /* Adjust header for mobile */
    .login-header h1 {
        font-size: 1.75rem;
    }

    /* Show copyright */
    .login-copyright {
        display: block;
    }

    /* Adjust footer */
    .login-footer {
        display: none;
    }

    /* Input height for touch */
    .field .rz-textbox,
    .field .rz-password {
        height: 52px !important;
    }

    /* Button height for touch */
    .btn-primary {
        height: 52px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   ACCESSIBILITY - REDUCED MOTION
   ───────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
