@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #faf7f1;
  --card: #ffffff;
  --ink: #0e1b2a;
  --muted: #6b7684;
  --border: #e8e2d8;
  --primary: #ff5c1f;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Instrument Sans', sans-serif; margin: 0; }

.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--ink);
  color: #f7f3ec;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.brand__name { font-family: 'Instrument Serif', Georgia, serif; font-size: 27px; letter-spacing: -0.01em; }
.brand__tag { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247, 243, 236, 0.5); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(247, 243, 236, 0.72);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.nav-link svg { width: 17px; height: 17px; flex: none; }
.sidebar__note { margin-top: auto; font-size: 11.5px; line-height: 1.55; color: rgba(247, 243, 236, 0.45); padding: 0 6px; }

.main { padding: 26px 30px 48px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.page-head h1 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-head__toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.input, .select {
  height: 36px; border: 1px solid var(--border); background: #fff;
  border-radius: 10px; padding: 0 12px;
  font-family: inherit; font-size: 13px; color: var(--ink); outline: none;
}
.input { min-width: 230px; }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 92, 31, 0.14); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.kpi { padding: 16px 18px; }
.kpi__label { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.kpi__value { font-family: 'Instrument Sans', sans-serif; font-size: 24px; font-weight: 600; margin-top: 8px; letter-spacing: -0.02em; }
.kpi__hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.card__title { font-family: 'Instrument Sans', sans-serif; font-size: 14.5px; font-weight: 600; }
.card__body { padding: 0 18px 18px; }

.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 92px; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; }
.bar { height: 8px; border-radius: 999px; background: #f1ece2; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.bar-row__value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-row__label { color: var(--muted); font-size: 12.5px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 10px 18px;
  border-bottom: 1px solid var(--border); font-weight: 600; white-space: nowrap;
}
tbody td { padding: 12px 18px; border-bottom: 1px solid #f3eee5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fdfaf5; }

.person { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #f1ece2; color: #5a6472;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; flex: none;
}
.person__name { font-weight: 500; }
.person__meta { font-size: 12px; color: var(--muted); }
.cell-muted { color: var(--muted); font-size: 12.5px; }
.cell-strong { font-weight: 500; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; border: 1px solid transparent; white-space: nowrap;
}
.pill--orange { background: #fff0e9; color: #c2440f; border-color: #ffd9c7; }
.pill--green { background: #e9f7ee; color: #1e7a45; border-color: #ccecd8; }
.pill--blue { background: #eaf2fe; color: #1f5aa8; border-color: #d3e3fb; }
.pill--amber { background: #fdf3e2; color: #946200; border-color: #f7e5c4; }
.pill--violet { background: #f1edfe; color: #5b3bbd; border-color: #e2d9fb; }
.pill--teal { background: #e6f5f3; color: #1a6f66; border-color: #caebe6; }
.pill--red { background: #fdeceb; color: #b32a20; border-color: #f8d5d2; }
.pill--gray { background: #f2efe9; color: #5f6670; border-color: #e6e1d7; }

.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.column {
  flex: 1 0 258px; max-width: 320px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 9px;
}
.column__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 6px; }
.column__name { font-size: 12.5px; font-weight: 600; }
.column__total { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.deal { border: 1px solid var(--border); border-radius: 14px; padding: 11px 12px; background: #fff; display: flex; flex-direction: column; gap: 5px; }
.deal__name { font-size: 13px; font-weight: 600; line-height: 1.35; margin: 0; }
.deal__amount { font-family: 'Instrument Sans', sans-serif; font-size: 15px; font-weight: 600; }
.deal__meta { font-size: 11.5px; color: var(--muted); }
.deal select {
  margin-top: 4px; height: 28px; font-size: 11.5px; border-radius: 8px;
  border: 1px solid var(--border); padding: 0 6px;
  background: #fdfaf5; color: #5a6472; font-family: inherit; outline: none;
}
.deal select:focus { border-color: var(--primary); }

.feed { display: flex; flex-direction: column; }
.feed__item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f3eee5; }
.feed__item:last-child { border-bottom: none; }
.feed__body { font-size: 13px; line-height: 1.5; }
.feed__meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.status-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; }
.status-row__count { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static; height: auto; flex-direction: row; align-items: center;
    gap: 14px; overflow-x: auto; padding: 12px 14px;
  }
  .brand__name { font-size: 22px; }
  .brand__tag, .sidebar__note { display: none; }
  .nav { flex-direction: row; gap: 6px; }
  .nav-link { padding: 8px 10px; white-space: nowrap; }
  .nav-link svg { display: none; }
  .main { padding: 18px 16px 40px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .input { min-width: 0; flex: 1 1 160px; }
  .page-head__toolbar { width: 100%; }
  .bar-row { grid-template-columns: 90px minmax(0, 1fr) 80px; }
}
