/* ZAKAZ — Базовые стили */

:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Навигация */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    padding: 0 24px;
    height: 56px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 8px; }
.nav-brand {
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    margin-right: 16px;
}
.nav-link {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    transition: background .15s;
}
.nav-link:hover { background: rgba(255,255,255,.15); color: white; }
.nav-admin { color: #fbbf24; }
.nav-user { color: rgba(255,255,255,.7); font-size: 13px; }

/* Контейнер */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* Карточки */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    padding: 24px;
    margin-bottom: 16px;
}

/* Формы */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.15); }

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--bg); font-weight: 600; color: var(--text-light); font-size: 12px; text-transform: uppercase; }
tr:hover { background: #f9fafb; }

/* Бейджи */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* Статистика */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.stat-value { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* Сообщения */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* Auth pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg);
}
.auth-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.auth-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary);
}
.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 14px;
}
.auth-footer { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-light); }
.auth-footer a { color: var(--primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Online indicator */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.online-dot.active { background: var(--success); }
.online-dot.inactive { background: var(--border); }
