/* ================================================================
   AXO NETWORKS — LOGIN.CSS
   Theme: Industrial utilitarian — deep charcoal + amber accent
   ================================================================ */

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
    /* Surfaces */
    --bg:              #0c0e13;
    --bg-panel:        #0f1219;
    --bg-input:        #181c26;
    --bg-input-hover:  #1d2230;
    --bg-badge:        rgba(245, 158, 11, 0.08);

    /* Borders */
    --border:          #232838;
    --border-subtle:   #1c2030;
    --border-focus:    #f59e0b;

    /* Text */
    --text-primary:    #eef0f6;
    --text-secondary:  #7e8ba0;
    --text-muted:      #454e63;
    --text-placeholder:#3e4758;

    /* Accent */
    --accent:          #f59e0b;
    --accent-dark:     #d97706;
    --accent-light:    #fbbf24;
    --accent-glow:     rgba(245, 158, 11, 0.16);
    --accent-glow-btn: rgba(245, 158, 11, 0.32);

    /* State */
    --error:           #f04f4f;
    --error-bg:        rgba(240, 79, 79, 0.09);
    --error-border:    rgba(240, 79, 79, 0.28);
    --success:         #22c55e;
    --success-bg:      rgba(34, 197, 94, 0.09);
    --success-border:  rgba(34, 197, 94, 0.28);

    /* Typography */
    --font-display:    'Syne', sans-serif;
    --font-body:       'DM Sans', sans-serif;

    /* Radii */
    --r-sm:   6px;
    --r-md:   10px;
    --r-lg:   14px;

    /* Shadows */
    --shadow-input: 0 0 0 3px var(--accent-glow);
    --shadow-btn:   0 10px 28px var(--accent-glow-btn);

    /* Easing */
    --ease:   cubic-bezier(0.4, 0, 0.2, 1);
    --t:      200ms;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.login-body {
    background-color: var(--bg);
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   SIMPLE NAVIGATION HEADER - Only Home Logo
   ================================================================ */

.login-header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 48px;
    }
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #aaaaaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    flex-shrink: 0;
    font-family: 'Syne', sans-serif;
}

@media (min-width: 768px) {
    .logo {
        font-size: 24px;
    }
}

.logo:hover {
    opacity: 0.8;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.2s ease;
}

/* ── Background Layers ──────────────────────────────────────────── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(245, 158, 11, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-tl {
    position: fixed;
    top: -15%;
    right: -8%;
    width: 680px;
    height: 680px;
    background: radial-gradient(circle at center,
        rgba(245, 158, 11, 0.065) 0%,
        transparent 68%
    );
    pointer-events: none;
    z-index: 0;
}

.bg-glow-br {
    position: fixed;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at center,
        rgba(99, 102, 241, 0.04) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* ── Layout Wrapper ─────────────────────────────────────────────── */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════
   BRAND PANEL (Left)
══════════════════════════════════════════ */
.login-brand {
    flex: 0 0 46%;
    background-color: var(--bg-panel);
    background-image:
        linear-gradient(155deg, rgba(245, 158, 11, 0.055) 0%, transparent 55%),
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: auto, 28px 28px, 28px 28px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 52px;
    position: relative;
    overflow: hidden;
}

/* Corner accent glow */
.login-brand::before {
    content: '';
    position: absolute;
    bottom: -5%;
    left: -5%;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle at bottom left,
        rgba(245, 158, 11, 0.09) 0%, transparent 65%
    );
    pointer-events: none;
}

/* Top-right diagonal line decoration */
.login-brand::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--border) 30%,
        var(--border) 70%,
        transparent 100%
    );
}

.brand-inner {
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 44px;
    position: relative;
    z-index: 1;
}

/* ── Logo ── */
.brand-logo,
.mobile-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
}

.logo-mark {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--accent);
}

.logo-divider {
    display: block;
    width: 1px;
    height: 22px;
    background: var(--border);
    flex-shrink: 0;
}

.logo-sub {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-top: 2px;
}

/* ── Brand copy ── */
.brand-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.brand-copy h2 em {
    font-style: normal;
    color: var(--accent);
    position: relative;
}

/* Underline accent on em */
.brand-copy h2 em::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 1px;
}

.brand-copy p {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* ── Stats row ── */
.brand-stats {
    list-style: none;
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--bg);
}

.brand-stats li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 20px 12px;
    border-right: 1px solid var(--border);
    transition: background-color var(--t) var(--ease);
    cursor: default;
}

.brand-stats li:last-child {
    border-right: none;
}

.brand-stats li:hover {
    background-color: var(--bg-input);
}

.stat-num {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ── Badge ── */
.brand-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-badge);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--r-sm);
    width: fit-content;
}

.brand-badge svg {
    width: 8px;
    height: 8px;
    color: var(--accent);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.brand-badge span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

/* ══════════════════════════════════════════
   LOGIN CARD (Right)
══════════════════════════════════════════ */
.login-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.card-inner {
    width: 100%;
    max-width: 428px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: cardReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* Mobile logo — only on small screens */
.mobile-logo {
    display: none;
}

/* ── Card header ── */
.card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.card-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ══════════════════════════════════════════
   ALERT BANNER
══════════════════════════════════════════ */
.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    animation: alertSlideIn 0.22s var(--ease) both;
}

.alert-banner[hidden] {
    display: none;
}

.alert-banner.is-success {
    background-color: var(--success-bg);
    border-color: var(--success-border);
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 1px;
    width: 18px;
    height: 18px;
}

.alert-icon svg {
    width: 18px;
    height: 18px;
}

.icon-alert-error   { color: var(--error); display: block; }
.icon-alert-success { color: var(--success); display: none; }

.alert-banner.is-success .icon-alert-error   { display: none; }
.alert-banner.is-success .icon-alert-success { display: block; }

.alert-text {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 400;
}

.alert-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--r-sm);
    transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
    margin-top: 1px;
}

.alert-close svg {
    width: 14px;
    height: 14px;
}

.alert-close:hover {
    color: var(--text-secondary);
    background-color: var(--bg-input-hover);
}

/* ══════════════════════════════════════════
   LOGIN FORM
══════════════════════════════════════════ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Field group ── */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    user-select: none;
}

/* ── Field wrap (input + icons) ── */
.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* Left icon */
.field-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
    transition: color var(--t) var(--ease);
    z-index: 1;
}

.field-icon svg {
    width: 16px;
    height: 16px;
}

/* Input */
.field-input {
    width: 100%;
    height: 50px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    padding: 0 48px 0 44px;
    outline: none;
    transition:
        border-color var(--t) var(--ease),
        background-color var(--t) var(--ease),
        box-shadow var(--t) var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.field-input::placeholder {
    color: var(--text-placeholder);
}

/* Auto-fill override */
.field-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
    transition: background-color 5000s ease-in-out 0s;
}

.field-input:hover {
    background-color: var(--bg-input-hover);
    border-color: #2d3447;
}

.field-input:focus {
    background-color: var(--bg-input-hover);
    border-color: var(--border-focus);
    box-shadow: var(--shadow-input);
}

.field-wrap:focus-within .field-icon {
    color: var(--accent);
}

/* Error state */
.field-group.has-error .field-input {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(240, 79, 79, 0.12);
}

.field-error {
    font-size: 12.5px;
    color: var(--error);
    line-height: 1.4;
    min-height: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s var(--ease), opacity 0.2s var(--ease);
    opacity: 0;
}

.field-group.has-error .field-error {
    max-height: 40px;
    opacity: 1;
}

/* ── Password toggle ── */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--r-sm);
    transition:
        color var(--t) var(--ease),
        background-color var(--t) var(--ease);
    flex-shrink: 0;
    z-index: 1;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
    display: block;
}

.toggle-password:hover {
    color: var(--text-secondary);
    background-color: var(--bg-input-hover);
}

.toggle-password:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Submit button ── */
.btn-submit {
    width: 100%;
    height: 52px;
    background-color: var(--accent);
    border: none;
    border-radius: var(--r-md);
    color: #0a0b0f;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
    transition:
        background-color var(--t) var(--ease),
        transform var(--t) var(--ease),
        box-shadow var(--t) var(--ease),
        opacity var(--t) var(--ease);
}

/* Shine overlay */
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.18) 0%,
        transparent 50%
    );
    pointer-events: none;
    border-radius: inherit;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--accent-dark);
    box-shadow: var(--shadow-btn);
    transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.btn-label {
    line-height: 1;
    transition: opacity var(--t) var(--ease);
}

.btn-arrow {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform var(--t) var(--ease);
}

.btn-submit:hover:not(:disabled) .btn-arrow {
    transform: translateX(3px);
}

/* Spinner */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(10, 11, 15, 0.22);
    border-top-color: #0a0b0f;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

.btn-spinner[hidden] {
    display: none;
}

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

/* ── Loading state — hide arrow, show spinner ── */
.btn-submit.is-loading .btn-arrow {
    display: none;
}

/* ── Card footer ── */
.card-footer {
    text-align: center;
    padding-top: 4px;
}

.card-footer p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--t) var(--ease);
}

.footer-link:hover {
    color: var(--accent-light);
    text-decoration: underline;
    text-decoration-color: rgba(245, 158, 11, 0.4);
}

.footer-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ══════════════════════════════════════════
   RESPONSIVE — Tablet ≤ 960px
══════════════════════════════════════════ */
@media (max-width: 960px) {
    .login-brand {
        flex: 0 0 44%;
        padding: 48px 36px;
    }

    .brand-inner {
        gap: 36px;
    }

    .brand-copy h2 {
        font-size: 26px;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Mobile ≤ 680px
══════════════════════════════════════════ */
@media (max-width: 680px) {
    .login-wrapper {
        flex-direction: column;
    }

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

    .login-card {
        flex: 1;
        align-items: flex-start;
        padding: 36px 24px 32px;
    }

    .card-inner {
        max-width: 100%;
        gap: 24px;
    }

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

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

    /* 16px prevents iOS auto-zoom on focus */
    .field-input {
        font-size: 16px;
        height: 52px;
    }

    .btn-submit {
        height: 54px;
        font-size: 16px;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Small mobile ≤ 380px
══════════════════════════════════════════ */
@media (max-width: 380px) {
    .login-card {
        padding: 28px 20px 24px;
    }

    .card-title {
        font-size: 23px;
    }
}

/* ══════════════════════════════════════════
   ACCESSIBILITY
══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .card-inner          { animation: none; }
    .alert-banner        { animation: none; }
    .btn-spinner         { animation-duration: 1.5s; }
    .brand-badge svg     { animation: none; }

    *,
    *::before,
    *::after {
        transition-duration: 0ms !important;
        animation-duration: 0ms !important;
    }
}

@media (forced-colors: active) {
    .field-input,
    .btn-submit {
        border: 2px solid ButtonText;
    }

    .btn-submit {
        background-color: Highlight;
        color: HighlightText;
    }
}
/* ================================================================
   HOME NAVIGATION STYLES - Only Logo
   ================================================================ */

.home-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 20px 0;
}

.home-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .home-nav-container {
        padding: 0 48px;
    }
}

.home-logo {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #aaaaaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    display: inline-block;
}

@media (min-width: 768px) {
    .home-logo {
        font-size: 24px;
    }
}

.home-logo:hover {
    opacity: 0.8;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.2s ease;
}

