/* ===================================================================
   Tech Noir Auth Portal Stylesheet
   Design System: Dark Dev / Tech Noir (High-contrast, Cybernetic Accents)
   =================================================================== */

:root {
    --bg-main: #06080d;
    --bg-surface: #0b0f19;
    --bg-card: #101623;
    --bg-card-hover: #151d2e;
    --bg-card-header: #0d121c;

    --border-dim: #1a2333;
    --border-bright: #26354d;
    --border-cyan: rgba(0, 240, 255, 0.4);
    --border-green: rgba(0, 255, 157, 0.4);
    --border-red: rgba(255, 95, 86, 0.5);

    --cyan-glow: #00f0ff;
    --green-glow: #00ff9d;
    --amber-glow: #ffb86c;
    --red-glow: #ff5f56;

    --text-pure: #ffffff;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Atmosphere */
.bg-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    pointer-events: none;
    z-index: 0;
}

.ambient-glow {
    position: fixed;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.14;
    pointer-events: none;
    z-index: 0;
}

.glow-cyan {
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cyan-glow);
}

.glow-green {
    bottom: -150px;
    right: 15%;
    background: var(--green-glow);
}

/* Auth Container */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

.brand-header {
    margin-bottom: 2rem;
    text-align: center;
}

.brand-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-pure);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.prompt-symbol {
    color: var(--green-glow);
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--cyan-glow);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.system-sub {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-tertiary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Auth Box Window */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: #080b12;
    border: 1px solid var(--border-bright);
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.05);
    overflow: hidden;
    position: relative;
    transition: var(--transition-fast);
}

.auth-card:hover {
    border-color: rgba(0, 240, 255, 0.35);
}

.terminal-titlebar {
    background: #0d121c;
    border-bottom: 1px solid var(--border-dim);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-controls {
    display: flex;
    gap: 7px;
}

.control-btn {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.control-btn.close { background: #ff5f56; }
.control-btn.minimize { background: #ffbd2e; }
.control-btn.maximize { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.terminal-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(0, 240, 255, 0.12);
    color: var(--cyan-glow);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.auth-body {
    padding: 2.2rem 2rem;
}

.auth-headline {
    margin-bottom: 1.8rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-pure);
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.auth-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Status Alert Banner */
.status-banner {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.status-banner.error {
    display: flex;
    background: rgba(255, 95, 86, 0.1);
    border: 1px solid var(--border-red);
    color: #ff9494;
}

.status-banner.success {
    display: flex;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--border-green);
    color: var(--green-glow);
}

.status-banner.info {
    display: flex;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid var(--border-cyan);
    color: var(--cyan-glow);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.4rem;
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #060911;
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.input-container:focus-within {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.input-prefix {
    font-family: var(--font-mono);
    color: var(--green-glow);
    font-size: 0.85rem;
    padding-left: 14px;
    user-select: none;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-pure);
}

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

.btn-toggle-pw {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0 14px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.btn-toggle-pw:hover {
    color: var(--cyan-glow);
}

/* Submit Action Button */
.btn-submit {
    width: 100%;
    padding: 12px 20px;
    background: var(--text-pure);
    color: var(--bg-main);
    border: none;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.15);
    margin-top: 1.8rem;
}

.btn-submit:hover:not(:disabled) {
    background: var(--cyan-glow);
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.8s linear infinite;
}

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

.btn-submit.loading .spinner {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    opacity: 0.8;
}

/* Footer Links */
.auth-footer {
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.auth-link {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.auth-link:hover {
    color: var(--cyan-glow);
}

.auth-mode-switch {
    background: transparent;
    border: none;
    color: var(--green-glow);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
