/* =========================================
   CSS — страница входа
   ========================================= */
:root {
    --bg-body: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --bg-card: rgba(30, 41, 59, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --input-bg: rgba(15, 23, 42, 0.45);
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-body: #f9f9f8;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --border-color: #e8e8e6;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --input-bg: #f7f7f5;
    --accent: #0d9488;
    --accent-hover: #0f766e;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 24px;
    transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
}

.login-page {
    min-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-top {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--text-secondary);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.login-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(128, 128, 128, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 16px;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.login-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.field input {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.field input::placeholder {
    color: var(--text-secondary);
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.submit-btn {
    margin-top: 8px;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #042f2e;
    background: var(--accent);
    cursor: pointer;
    transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.submit-btn:hover {
    background: var(--accent-hover);
    color: #f8fafc;
}

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

.login-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.login-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}
