@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=Barlow+Condensed:wght@700&display=swap');

:root {
  --navy: #13202F; --navy-2: #1B2B3E; --navy-3: #24384F;
  --orange: #C2410C; --orange-soft: #FDEEE6; --steel: #1E5A8A;
  --ink: #13202F; --muted: #566577; --line: #E2E7EE; --bg: #F3F5F8; --white: #FFFFFF;
  --green: #15803D; --green-soft: #E7F6EC; --red: #B91C1C; --red-soft: #FDECEC; --amber-soft: #FEF3E2;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; }
a { color: var(--steel); }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; margin: 0; letter-spacing: -0.2px; }
.wordmark { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.wordmark span { color: #F07A3A; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* buttons & inputs */
.btn { height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid #CBD3DD; background: var(--white); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: #9AA8B8; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: #A8370A; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: default; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.input, select.input, textarea.input { height: 44px; padding: 0 12px; border: 1px solid #CBD3DD; border-radius: 10px; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff; width: 100%; font-weight: 400; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(194,65,12,.35); outline-offset: 1px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: #EEF1F5; color: #3E4C5D; }
.chip.green { background: var(--green-soft); color: #166534; } .chip.red { background: var(--red-soft); color: #991B1B; }
.chip.blue { background: #E8F1F9; color: #1E4F7A; } .chip.amber { background: var(--amber-soft); color: #92400E; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.alert.error { background: var(--red-soft); color: #7F1D1D; } .alert.ok { background: var(--green-soft); color: #14532D; }
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid #CBD3DD;
  background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.pill:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.pill input { accent-color: var(--orange); }

/* auth / onboarding */
.split { min-height: 100vh; display: flex; flex-wrap: wrap; }
.split aside { flex: 1 1 380px; background: var(--navy); color: #fff; padding: 44px; display: flex; flex-direction: column; gap: 28px; }
.split aside .wordmark { font-size: 26px; color: #fff; }
.split aside h1 { font-size: 34px; line-height: 1.15; }
.split aside p { color: #C5D0DC; font-size: 16px; line-height: 1.55; margin: 0; }
.split main { flex: 999 1 560px; padding: 44px 56px; display: flex; flex-direction: column; gap: 22px; max-width: 900px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 36px; height: 36px; }
.tabs { display: flex; gap: 6px; background: #E9EDF2; padding: 4px; border-radius: 12px; width: fit-content; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.country { flex: 1 1 200px; display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 12px; border: 2px solid #D5DCE5; background: #fff; cursor: pointer; }
.country:has(input:checked) { border-color: var(--orange); background: #FFF8F4; }
.country input { accent-color: var(--orange); width: 18px; height: 18px; }

/* app shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; background: var(--navy); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { padding: 4px 8px 20px; text-decoration: none; }
.sidebar .wordmark { color: #fff; font-size: 21px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; color: #C5D0DC; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a[aria-current="page"] { background: var(--navy-3); color: #fff; font-weight: 600; }
.nav a .soon { margin-left: auto; font-size: 11px; color: #8FA0B3; }
.nav svg { width: 18px; height: 18px; flex: none; }
.company-box { margin-top: auto; padding: 14px 12px; border-radius: 10px; background: var(--navy-2); color: #C5D0DC; font-size: 12.5px; line-height: 1.5; }
.company-box strong { color: #fff; font-size: 13px; display: block; }
.company-box button { margin-top: 10px; background: none; border: 1px solid #3B5068; color: #C5D0DC; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 20px 32px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar h1 { font-size: 26px; font-weight: 600; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.topbar .spacer { flex: 1; }
.content { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1240px; width: 100%; }
.menu-btn { display: none; }

/* dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(130px, auto); gap: 16px; }
.block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.block h3 { font-size: 14px; font-family: Inter, sans-serif; font-weight: 600; color: var(--muted); }
.block .big { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 600; }
.block .empty { color: var(--muted); font-size: 14px; line-height: 1.5; }
.editing .block { border: 1.5px dashed #AEB9C6; }
.block .tools { display: none; position: absolute; top: 10px; right: 10px; gap: 6px; }
.editing .block .tools { display: flex; }
.tools button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #CBD3DD; background: #fff; cursor: pointer; font-size: 14px; }
.tools button.rm { color: var(--red); }
.edit-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 18px; background: var(--navy); color: #fff; border-radius: var(--radius); }
.edit-bar .grow { flex: 1; }
.edit-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.library .item { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #EDF0F4; }
.library .item div { flex: 1; min-width: 0; }
.library .item small { color: var(--muted); display: block; }

/* tables */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 13px 12px; border-bottom: 1px solid #EDF0F4; font-size: 14.5px; }

@media (max-width: 900px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edit-wrap { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 18px; padding-right: 18px; }
  .split main { padding: 28px 20px; }
}
@media (max-width: 560px) { .dash-grid { grid-template-columns: 1fr; } .block { grid-column: span 1 !important; } }
