/* Пастельная тёплая тема дашборда VoxLead (п.6, правило 9).
   Светлая по умолчанию + мягкая тёмная (тёпло-серо-бежевая, не чёрная). */
:root {
  --bg: #faf6f1;          /* кремовый фон */
  --surface: #fffdfb;
  --surface-2: #f4ebe4;
  --text: #4a3f3a;
  --muted: #9b8b82;
  --primary: #d8a7b1;     /* пудрово-розовый */
  --primary-strong: #c1808f;
  --accent: #cba35c;      /* золотистый акцент */
  --border: #ece0d8;
  --danger: #c98b8b;
  --ok: #9cbf9c;
  --shadow: 0 2px 10px rgba(120, 90, 80, .08);
}
[data-theme="dark"] {
  --bg: #2b2724;
  --surface: #332e2a;
  --surface-2: #3d3733;
  --text: #efe6df;
  --muted: #b3a79f;
  --primary: #c98b98;
  --primary-strong: #dca7b3;
  --accent: #d8b877;
  --border: #463f39;
  --shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 15px;
}
a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Сайдбар */
.sidebar {
  width: 240px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
}
.brand { font-size: 20px; font-weight: 700; padding: 8px 12px 16px; color: var(--accent); }
.nav a {
  display: block; padding: 10px 14px; border-radius: 10px; color: var(--text);
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }

/* Основная область */
.main { flex: 1; display: flex; flex-direction: column; }
.banner {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center;
}
.banner h1 { margin: 0; font-size: 22px; }
.banner .sub { opacity: .9; font-size: 13px; }
.content { padding: 24px 28px; }

/* Кнопки */
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 10px; border: none;
  background: var(--primary); color: #fff; cursor: pointer; font-size: 14px;
}
.btn:hover { background: var(--primary-strong); text-decoration: none; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; }

/* Карточки / сетки */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow);
}
.stat .num { font-size: 30px; font-weight: 700; color: var(--accent); }
.stat .lbl { color: var(--muted); font-size: 13px; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* Формы */
label { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.inline-form { display: inline; }

.badge { padding: 3px 9px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--text); }
.badge.new { background: #eadfe8; }
.badge.paused { background: var(--accent); color: #fff; }
.muted { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.notice { background: var(--surface-2); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }

/* Выпадающее меню выгрузки каталога (Этап 4) */
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; z-index: 20; min-width: 140px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; margin-top: 4px;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); }
.dropdown-menu a:hover { background: var(--surface-2); text-decoration: none; }

/* Чат */
.chat { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 75%; }
.msg.user { background: var(--surface-2); align-self: flex-start; }
.msg.assistant { background: var(--primary); color: #fff; align-self: flex-end; }
.msg.owner { background: var(--accent); color: #fff; align-self: flex-end; }
.msg .who { font-size: 11px; opacity: .8; display: block; margin-bottom: 2px; }

/* Логин */
.login-wrap { max-width: 380px; margin: 8vh auto; }
.icon-btn { background: rgba(255,255,255,.2); border: none; color: #fff; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
