:root {
  --ink: #10151c;
  --ink-soft: #4a5563;
  --paper: #f6f7f9;
  --panel: #ffffff;
  --line: #dfe3e8;
  --brand: #f2a900;
  --brand-ink: #17130a;
  --danger: #b3261e;
  --ok: #1e6b3a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 21, 28, .06), 0 8px 24px rgba(16, 21, 28, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}

header.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
}

header.app-bar .brand {
  font-weight: 700;
  letter-spacing: .02em;
}

header.app-bar .brand span { color: var(--brand); }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.field { display: block; margin-bottom: 12px; }

.field span {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

textarea { min-height: 84px; resize: vertical; }

button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}

button.primary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* Кнопки узкие: иконка и одно слово, полная формулировка в title. */
button[aria-label] {
  white-space: nowrap;
  padding: 8px 12px;
  line-height: 1.1;
}

@media (max-width: 640px) {
  button[aria-label] { padding: 8px 10px; }
}
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Действия водителя — по две в ряд, как в рабочей группе. */
.driver-actions { display: flex; flex-direction: column; gap: 8px; }
.driver-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.driver-actions-row > button { width: 100%; }
.col { display: flex; flex-direction: column; gap: 8px; }

.status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef1f4;
  color: var(--ink-soft);
}

.status.live { background: #fff4da; color: #7a5400; }
.status.done { background: #e6f4ec; color: var(--ok); }
.status.bad { background: #fdeceb; color: var(--danger); }

.muted { color: var(--ink-soft); font-size: 14px; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); font-weight: 600; }

.confirm-banner {
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #fffaf0;
  margin-bottom: 16px;
}

/* Лента диалога с помощником: прокручивается, не растягивая карточку. */
.ai-log {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.ai-log p { margin: 0 0 6px; }

.tech-works {
  max-width: 560px;
  margin: 12vh auto;
  text-align: center;
}

nav.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
nav.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
nav.tabs button { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.notice { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.notice.error { background: #fdeceb; color: var(--danger); }
.notice.ok { background: #e6f4ec; color: var(--ok); }

@media (max-width: 640px) {
  main { padding: 16px 12px 48px; }
  .card { padding: 14px; }
}

/* Поверхности: строка «название — действие» */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

