/* Tour Builder — shared prototype stylesheet
   Consolidated from the two seed mockups; the actuals-vs-budget shell is canonical.
   Dummy/sample content only. */

:root {
  --ink: #0b1020;
  --muted: #62708b;
  --line: #e4e8f0;
  --line-soft: #edf0f6;
  --bg: #f8fafd;
  --panel: #ffffff;
  --green: #00a868;
  --green-soft: #dcf7ea;
  --red: #ff1c1c;
  --red-soft: #ffe7e4;
  --blue: #0d60ef;
  --blue-soft: #e7f0ff;
  --orange: #ff7a16;
  --orange-soft: #fff0e7;
  --purple: #8a3ffc;
  --purple-soft: #f2eafe;
  --sidebar-line: rgba(255, 255, 255, 0.11);
  --shadow: 0 8px 24px rgba(13, 29, 58, 0.05);
  --shadow-sm: 0 1px 2px rgba(15, 30, 62, 0.04);
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; color: currentColor;
}
.i.small { width: 12px; height: 12px; }
.i.info { width: 12px; height: 12px; color: #7e8ba4; stroke-width: 2.2; }

/* ---------- Shell ---------- */

.app { display: flex; width: 100%; min-width: 1280px; height: 100vh; background: var(--panel); }

.sidebar {
  width: 264px; flex: 0 0 264px; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 16px 16px 14px;
  color: #fff;
  background: #181818;
}

.brand { height: 49px; margin: 0 8px 10px; display: flex; align-items: center; }
.brand-logo { width: 188px; height: auto; display: block; }

.section-title {
  margin: 0 0 6px 6px; color: rgba(255, 255, 255, 0.52);
  font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: 0;
}

.sidebar-section { margin-bottom: 5px; }
.budget-section { margin-bottom: 6px; }

.select-card {
  min-height: 40px; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 10px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.select-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #fff; font-size: 13px; font-weight: 500; }
.client-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tiny-lock { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: #02a665; }
.version-card { min-height: 64px; }
.mini-row { display: flex; align-items: center; gap: 9px; margin-top: 11px; color: #04c678; font-size: 13px; font-weight: 500; }
.green-dot { width: 8px; height: 8px; border-radius: 50%; background: #0ac77c; flex: 0 0 8px; }

/* Client / Budget switchers */
.switcher { width: 100%; min-height: 32px; display: flex; align-items: center; gap: 8px; padding: 6px 7px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #fff; text-align: left; cursor: pointer; }
.switcher:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); }
.switcher-minimal { padding-left: 6px; }
.sw-avatar { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #f6d56f, #f36f56 48%, #5b6ee1); color: #fff; font-size: 10.5px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24); }
.sw-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,0.08); color: #fff; }
.sw-icon .i { width: 16px; height: 16px; }
.sw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-name { font-size: 12.5px; font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-sub { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,0.55); }
.switcher .chev { margin-left: auto; color: rgba(255,255,255,0.5); flex: 0 0 auto; }
.switcher-arrows { margin-left: auto; width: 13px; height: 17px; flex: 0 0 13px; display: grid; place-items: center; }
.switcher-arrow { width: 7px; height: 7px; display: block; border-color: rgba(255,255,255,0.52); border-style: solid; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.dot-green { width: 7px; height: 7px; border-radius: 50%; background: #0ac77c; flex: 0 0 7px; }

.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 0; }
.nav .section-title { margin-top: 5px; }
.nav > .section-title:first-child { margin-top: 0; }
.nav-item {
  min-height: 26px; display: flex; align-items: center; gap: 9px; padding: 0 8px;
  border-radius: 5px; color: rgba(255,255,255,0.82); font-size: 12.5px; line-height: 1; font-weight: 600;
}
.nav-item .nav-icon { width: 17px; height: 17px; color: rgba(255,255,255,0.88); flex: 0 0 17px; }
.nav-item .chev { margin-left: auto; opacity: 0.6; }
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active { color: #fff; background: rgba(255,255,255,0.15); box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.nav-item.active .nav-icon { color: #fff; }
.nav-divider { height: 1px; margin: 8px 4px; background: var(--sidebar-line); }
.nav-sub-divider { height: 1px; margin: 5px 4px 5px 14px; background: var(--sidebar-line); }
.subnav { display: flex; flex-direction: column; gap: 1px; margin: 3px 0 5px 14px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.13); }
.sub-item { display: flex; align-items: center; gap: 8px; min-height: 23px; padding: 0 8px; border-radius: 5px; color: rgba(255,255,255,0.54); font-size: 12px; font-weight: 500; }
.sub-item:hover,
.sub-item.active { color: #fff; background: rgba(255,255,255,0.08); font-weight: 600; }
.sub-icon { width: 14px; height: 14px; color: rgba(255,255,255,0.43); flex: 0 0 14px; }
.sub-item:hover .sub-icon,
.sub-item.active .sub-icon { color: #fff; }
.sub-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.45); }

.sidebar-footer { margin-top: auto; padding: 10px 5px 0; border-top: 1px solid var(--sidebar-line); }
.profile { display: flex; align-items: center; gap: 11px; }
.profile-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #9a9da3, #55575d); color: #fff; font-size: 13px; font-weight: 600; flex: 0 0 36px; }
.profile-text { min-width: 0; flex: 1; }
.profile-name { color: #fff; font-weight: 600; line-height: 1.25; }
.profile-role { color: rgba(255,255,255,0.66); font-size: 12px; line-height: 1.35; }
.profile-settings { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: rgba(255,255,255,0.58); flex: 0 0 28px; }
.profile-settings:hover,
.profile-settings.active { color: #fff; background: rgba(255,255,255,0.1); }

.main { flex: 1; min-width: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #fff; }

/* ---------- Top bar (breadcrumb) ---------- */

.topbar { flex: 0 0 auto; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 28px 0 30px; border-bottom: 1px solid #e8ebf1; background: #fff; }
.crumbs { min-width: 0; display: flex; align-items: center; gap: 10px; color: #52607b; font-size: 13px; font-weight: 550; white-space: nowrap; }
.crumbs .i { width: 13px; height: 13px; color: #a0aabf; flex: 0 0 13px; }
.top-item { max-width: 210px; overflow: hidden; color: #52607b; line-height: 1.1; text-overflow: ellipsis; }
.top-status { color: #52607b; font: inherit; font-weight: 600; white-space: nowrap; }
.top-status:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.saved-quiet { color: #8a95aa; font-size: 12px; white-space: nowrap; }
.bell { position: relative; width: 30px; height: 32px; display: grid; place-items: center; color: #1d2740; }
.bell::after { content: "2"; position: absolute; right: 1px; top: 2px; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; color: #fff; background: #ed1717; font-size: 8px; font-weight: 700; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; border-radius: 6px; padding: 0 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.blue { color: #075dec; background: #e9f1ff; }
.pill.green { color: #008c58; background: #dff7eb; }
.pill.orange { color: #e0560f; background: var(--orange-soft); }
.pill.purple { color: #6a38f1; background: var(--purple-soft); }
.pill.grey { color: #55617c; background: #eef1f6; }

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; border: 1px solid #dfe5ef; border-radius: 7px; padding: 0 14px; background: #fff; color: #182033; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-sm); }
.btn:hover { border-color: #cdd6e4; }
.btn.primary { color: #095ee8; }
.btn.black { border-color: #0a1020; color: #fff; background: #0b0f1a; box-shadow: 0 7px 18px rgba(8,16,32,0.14); }
.btn.black:hover { background: #131826; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }

/* ---------- Content ---------- */

.content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 30px 30px; }
.page-heading { margin: 0 0 16px; }
.page-heading h1 { margin: 0; color: #11182a; font-size: 18px; line-height: 1.2; font-weight: 650; letter-spacing: 0; }
.redirect-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.redirect-screen h1 { margin: 0 0 8px; font-size: 22px; line-height: 1.15; }
.redirect-screen p { margin: 0 0 16px; color: #66728d; }

/* ---------- Cards / metrics ---------- */

.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin-bottom: 24px; }
.card { border: 1px solid #e1e6ef; border-radius: 9px; background: #fff; box-shadow: var(--shadow); padding: 18px 18px 16px; }
.metric-label { display: flex; align-items: center; gap: 6px; color: #54617c; font-size: 11px; font-weight: 600; text-transform: uppercase; line-height: 1; }
.metric { margin-top: 12px; color: #080d1e; font-size: 24px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric.green { color: var(--green); }
.metric.red { color: var(--red); }
.metric-note { margin-top: 11px; color: #586680; font-size: 13px; line-height: 1; }

/* ---------- Toolbar ---------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.filters { display: flex; align-items: center; gap: 12px; }
.filter-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; min-width: 132px; border: 1px solid #dee4ef; border-radius: 7px; padding: 0 13px; background: #fff; color: #162036; font-size: 12px; font-weight: 600; }
.search { display: flex; align-items: center; gap: 10px; width: 260px; height: 38px; border: 1px solid #dee4ef; border-radius: 7px; padding: 0 13px; color: #8a95aa; background: #fff; }
.search input { width: 100%; border: 0; outline: 0; color: #768199; background: transparent; font-size: 12px; }

/* ---------- Tables ---------- */

.table-shell { border: 1px solid #e1e6ef; border-radius: 9px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(12,27,54,0.03); }
table { width: 100%; border-collapse: collapse; }
thead th { height: 38px; border-bottom: 1px solid #e3e7ef; color: #56627b; background: #f9fafc; font-size: 10px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; padding: 0 14px; }
tbody td { height: 44px; border-bottom: 1px solid #eef1f6; color: #11182a; font-size: 13px; font-weight: 500; padding: 0 14px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdff; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.center, th.center { text-align: center; }
.money-green { color: var(--green); font-weight: 600; }
.money-red { color: var(--red); font-weight: 600; }
.status { display: inline-grid; place-items: center; min-width: 52px; height: 24px; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.status.under, .status.favourable { color: #009b61; background: #dff6eb; }
.status.over { color: var(--red); background: var(--red-soft); }
.status.track { color: #075eea; background: var(--blue-soft); }

/* ---------- Stub / placeholder helpers (breadth-first scaffolding) ---------- */

.stub-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 9px 14px; border: 1px dashed #cdd6e4; border-radius: 8px; color: #6a7790; background: #fbfcfe; font-size: 12px; }
.stub-banner .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); flex: 0 0 7px; }
.panel { border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.panel-pad { padding: 18px 18px; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 37%, #eef1f6 63%); border-radius: 6px; }
.sk-row { height: 14px; margin: 0 0 12px; }
.sk-row.w70 { width: 70%; } .sk-row.w50 { width: 50%; } .sk-row.w40 { width: 40%; } .sk-row.w85 { width: 85%; }
.empty-state { display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.empty-state .ico { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; color: var(--purple); background: var(--purple-soft); margin-bottom: 14px; }
.empty-state .ico .i { width: 30px; height: 30px; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; color: #0b1224; }
.empty-state p { margin: 0; color: #66728d; font-size: 13px; max-width: 46ch; }

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------- Deepened-content utilities ---------- */
.lp-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.lp-row:last-child { border-bottom: 0; }
.lp-row .r { font-variant-numeric: tabular-nums; font-weight: 600; }
.lp-row .muted { color: #8a95aa; font-size: 12px; font-weight: 500; margin-top: 2px; }
.act { display: flex; gap: 11px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); }
.act:last-child { border-bottom: 0; }
.act .ai { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 9px; background: #f1f4f9; color: #55617c; }
.act .ai .i { width: 17px; height: 17px; }
.act .at { font-size: 13px; color: #1a2236; }
.act .am { font-size: 12px; color: #8a95aa; margin-top: 2px; }
.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow .step { flex: 1; min-width: 118px; border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px; background: #fbfcfe; }
.flow .step .l { font-size: 11px; text-transform: uppercase; color: #54617c; font-weight: 600; letter-spacing: 0.03em; }
.flow .step .v { font-size: 17px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.flow .step.final { background: var(--green-soft); border-color: #b9ecd2; }
.flow .step.final .v { color: var(--green); }
.flow .op { display: grid; place-items: center; color: #9aa6bd; font-weight: 700; }
