:root {
    --blue: #2da9d6;
    --blue-dark: #1e8ab3;
    --red: #a93535;
    --red-light: #fdeaea;
    --text: #57514d;
    --text-light: #8a847f;
    --bg: #f0f2f5;
    --white: #ffffff;
    --border: #e2e2e2;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    --radius: 12px;
    --radius-sm: 8px;
    --input-bg: #ffffff;
    --input-text: #57514d;
    --input-placeholder: #8a847f;
}

:root[data-theme="dark"] {
    --blue: #44b7e0;
    --blue-dark: #83d4ef;
    --red: #d06666;
    --red-light: #3e1f1f;
    --text: #e6e9ee;
    --text-light: #a7b0bb;
    --bg: #171b21;
    --white: #222831;
    --border: #3a424d;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    --input-bg: #1f252d;
    --input-text: #e6e9ee;
    --input-placeholder: #a7b0bb;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
}

input {
    font-family: inherit;
    font-size: inherit;
    color: var(--input-text);
    background: var(--input-bg);
}

input::placeholder {
    color: var(--input-placeholder);
    opacity: 1;
}

body.login-shell .header .logo {
    pointer-events: none;
    cursor: default;
}

body.login-shell .main-nav,
body.login-shell .header-right,
body.login-shell .modal-overlay {
    display: none !important;
}

.login-header .header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 60px;
}

.login-header {
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.logo-image {
    height: 40px;
    width: auto;
    display: block;
}

.content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.login-card {
    max-width: 420px;
    margin: 42px auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.login-card h2 {
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.login-error {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #f3bdbd;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 12px;
}

.login-card .form-group {
    margin-bottom: 16px;
}

.login-card .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-light);
}

.login-card .form-group input[type="text"],
.login-card .form-group input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.login-card .form-group input:focus {
    border-color: var(--blue);
}

.login-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s;
}

.login-card .btn-primary {
    background: var(--blue);
    color: #fff;
    width: 100%;
}

.login-card .btn-primary:hover {
    background: var(--blue-dark);
}

.login-card .btn-primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

.login-loading {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.login-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 16px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}
