/* Flask Auth Proxy - Themed to match Subsurface Web UI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Subsurface brand blues - matches webUI */
    --brand-primary: #4579AC;
    --brand-light: #5B8EC5;
    --brand-dark: #3A6694;
    --brand-deep: #2D5078;

    /* Ocean depth palette */
    --depth-900: #0a0f18;
    --depth-800: #0f1a2a;
    --depth-700: #152538;
    --depth-600: #1c3148;

    /* Accent colors */
    --accent-cyan: #5BC0DE;
    --accent-highlight: #7ECFFF;

    /* Text */
    --text-primary: #F2F7FB;
    --text-secondary: #B8CDD9;
    --text-dim: #7E9AAD;

    /* Surfaces */
    --surface-card: rgba(21, 37, 56, 0.85);
    --border-subtle: rgba(91, 142, 197, 0.25);
    --border-glow: rgba(91, 142, 197, 0.45);

    /* Form-specific */
    --input-bg: rgba(10, 15, 24, 0.5);
    --input-border: rgba(91, 142, 197, 0.3);
    --input-focus-border: var(--brand-light);
    --input-focus-glow: rgba(91, 142, 197, 0.25);

    /* Alert */
    --danger-color: #F87171;
    --danger-bg: rgba(220, 38, 38, 0.15);
    --danger-border: rgba(220, 38, 38, 0.3);

    /* Shadows */
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    font-family: var(--font-display);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, var(--depth-900) 0%, var(--depth-800) 50%, var(--depth-700) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.container {
    width: 100%;
    padding: 1rem;
}

/* Login Container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.4s ease-out;
}

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

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Alert Messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background-color: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid var(--danger-border);
}

/* Form Styles */
.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.7rem 0.875rem;
    font-size: 0.9rem;
    font-family: var(--font-display);
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-glow);
}

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

.form-group-checkbox {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-display);
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-primary {
    width: 100%;
    background-color: var(--brand-primary);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background-color: var(--brand-light);
    box-shadow: 0 0 16px rgba(91, 142, 197, 0.3);
}

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

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.login-footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.login-footer a {
    color: var(--brand-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--accent-highlight);
    text-decoration: none;
}

/* Error Pages */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-box {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 480px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.4s ease-out;
}

.error-box h1 {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--brand-light);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(91, 142, 197, 0.4);
}

.error-box h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.error-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-box .btn-primary {
    width: auto;
    padding: 0.75rem 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-box {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-logo {
        width: 64px;
        height: 64px;
    }

    .error-box {
        padding: 2rem 1.5rem;
    }

    .error-box h1 {
        font-size: 3rem;
    }
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 2px;
}
