:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eaeef2;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --border-color: #d0d7de;
    --border-subtle: #d8dee4;
    --accent-primary: #0969da;
    --accent-success: #22c55e;
    --accent-error: #ef4444;
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #010409;
    --bg-tertiary: #1c2128;
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --border-color: #30363d;
    --border-subtle: #21262d;
    --accent-primary: #58a6ff;
    --accent-success: #22c55e;
    --accent-error: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    max-width: 400px;
    width: 100%;
    padding: 0;
}

.login-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    text-align: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 48px;
    height: 48px;
    background-image: url('/static/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.login-content {
    padding: 2rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-error);
    color: var(--accent-error);
    padding: 0.75rem 1rem;
    border-radius: 0;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.submit-btn {
    width: 100%;
    padding: 0.625rem 1.25rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submit-btn:active {
    transform: translateY(0);
}

.theme-toggle-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
}

.theme-toggle {
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.theme-icon {
    font-size: 14px;
    transition: all 0.3s ease;
}

.theme-icon.sun {
    display: block;
}

.theme-icon.moon {
    display: none;
}

[data-theme="dark"] .theme-icon.sun {
    display: none;
}

[data-theme="dark"] .theme-icon.moon {
    display: block;
}
