:root {
    --primary: #f14635;
    --primary-hover: #d93627;
    --background: #f5f6fa;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
}

/* Страница авторизации */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.login-logo {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(241, 70, 53, 0.12);
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
}

.error-message {
    padding: 12px;
    margin-bottom: 20px;
    color: #b91c1c;
    background: #fef2f2;
    border-radius: 8px;
    font-size: 14px;
}

/* Личный кабинет */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1f2937;
    color: white;
    padding: 24px 16px;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 800;
    color: #ff6759;
    padding: 0 12px 28px;
}

.sidebar-menu a {
    display: block;
    padding: 13px 16px;
    margin-bottom: 6px;
    color: #d1d5db;
    text-decoration: none;
    border-radius: 8px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #374151;
    color: white;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-content {
    padding: 32px;
}

.page-title {
    font-size: 26px;
    margin: 0 0 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-label {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .login-card {
        padding: 28px 22px;
    }

    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .topbar,
    .page-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
