/* Базовые стили кабинета. Цвета и шрифты — переменные; фирменный стиль подставит сессия «Визуал». */
:root {
  --bg: #f6f4ef; --surface: #ffffff; --text: #1d2433; --muted: #6b7280; --line: #e5e1d8;
  --accent: #1f4fd8; --accent-text: #ffffff; --ok: #1a7f4b; --warn: #b7791f; --err: #c0392b;
  --radius: 12px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 26px; margin: 0 0 20px; } h2 { font-size: 18px; margin: 28px 0 12px; }
code { background: var(--line); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--text); color: #fff; padding: 20px 14px; flex-shrink: 0; }
.brand { display: block; color: #fff; font-weight: 700; font-size: 20px; margin: 0 8px 24px; }
.brand.big { color: var(--text); font-size: 28px; margin: 0 0 8px; }
.menu a { display: block; color: #cfd5e3; padding: 8px 10px; border-radius: 8px; margin-bottom: 2px; }
.menu a:hover, .menu a.active { background: rgba(255,255,255,.1); color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .spacer { flex: 1; } .topbar form { margin: 0; }
.client-switch select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.badge { font-size: 11px; background: var(--warn); color: #fff; padding: 1px 6px; border-radius: 6px; }
.content { padding: 28px; max-width: 1200px; width: 100%; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.card.on { border-color: var(--accent); } .card.on:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.card.off { opacity: .85; }
.card-title { font-weight: 600; font-size: 16px; } .card-text { color: var(--muted); flex: 1; }
.card-foot { color: var(--accent); font-weight: 500; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 500; cursor: pointer; text-align: center; }
.btn.wide { width: 100%; margin-bottom: 8px; } .btn.secondary { background: var(--line); color: var(--text); }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
input, select, textarea { font: inherit; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 400px; }
.narrow { max-width: 400px; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
@media (max-width: 760px) {
  .layout { flex-direction: column; } .sidebar { width: 100%; padding: 12px 16px; }
  .menu { display: flex; flex-wrap: wrap; gap: 4px; } .brand { margin-bottom: 8px; }
  .content, .topbar { padding: 16px; }
}
