/* Login page specific styles */
:root {
    --bg: #0b1020;
    --card-bg: #121831;
    --card-border: #1f2647;
    --text: #e5e7eb;
    --muted: #9aa3b2;
    --primary: #6366f1;
    --primary-hover: #5558e6;
    --danger: #ef4444;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* Login page layout */
body.login-page {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    color: var(--text);
    background: radial-gradient(1200px 800px at 20% -10%, #1f2547 0%, transparent 60%),
                radial-gradient(1000px 700px at 110% 0%, #0e1634 0%, transparent 60%),
                var(--bg);
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.02);
    backdrop-filter: blur(6px);
}

.auth-header {
    margin-bottom: 18px;
}

.auth-title {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 22px;
}

.auth-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.form-group { 
    margin-bottom: 14px; 
}

label.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .02em;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: #0b1330;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}

/* Login button styles - completely isolated */
body.login-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    width: 100%;
    color: white;
    background: var(--primary);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

body.login-page .btn:hover {
    background: var(--primary-hover);
    border: 1px solid transparent;
    transform: none;
    box-shadow: none;
    color: white;
    text-decoration: none;
}

body.login-page .btn:focus {
    background: var(--primary-hover);
    border: 1px solid transparent;
    transform: none;
    box-shadow: none;
    outline: none;
    color: white;
}

body.login-page .btn:active {
    background: var(--primary-hover);
    border: 1px solid transparent;
    transform: none;
    box-shadow: none;
    color: white;
}

/* Ultra-specific submit button fix */
body.login-page button[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    outline: none !important;
    color: white !important;
    background: var(--primary) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
}

body.login-page button[type="submit"]:hover {
    background: var(--primary-hover) !important;
    border: 1px solid transparent !important;
    transform: none !important;
    box-shadow: none !important;
    color: white !important;
    text-decoration: none !important;
}

body.login-page button[type="submit"]:focus {
    background: var(--primary-hover) !important;
    border: 1px solid transparent !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: white !important;
}

body.login-page button[type="submit"]:active {
    background: var(--primary-hover) !important;
    border: 1px solid transparent !important;
    transform: none !important;
    box-shadow: none !important;
    color: white !important;
}

.alert {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.helper-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

/* Password field with reveal button */
.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-field {
    flex: 1;
}

.password-field:disabled {
    background-color: #f8f9fa;
    opacity: 1;
    color: #495057;
}

.password-reveal-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
    padding: 8px 10px;
    width: 40px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
    flex-shrink: 0;
}

.password-reveal-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.password-reveal-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}
