/* RestoreUnited Development Hub — single stylesheet, no build step. */
:root {
  --ru-red: #bc4630; --ru-red-dark: #9a3724; --ru-ink: #42414d; --ink: #1f1e26; --muted: #6b6a75;
  --line: #e6e5ea; --bg: #f7f7f9; --card: #ffffff; --blue: #0353aa; --green: #1f7a4d; --amber: #b7791f; --red: #b42318;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,20,30,.05), 0 6px 20px rgba(20,20,30,.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; } h4 { font-size: 1rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 36px; width: auto; }
.brand-title { font-size: .8rem; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: .92rem; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.is-active { background: #fbeae6; color: var(--ru-red-dark); }
.nav-toggle { display: none; margin-left: auto; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; color: var(--muted); display: inline-flex; padding: 6px; border-radius: 8px; }
.bell:hover { background: var(--bg); }
.bell-count { position: absolute; top: 0; right: 0; background: var(--ru-red); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--bg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ru-ink); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; }
.menu-name { font-size: .9rem; font-weight: 500; }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 200px; padding: 8px; display: grid; gap: 2px; z-index: 30; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--bg); text-decoration: none; }
.menu-role { font-size: .75rem; color: var(--muted); padding: 6px 10px 4px; }

.main { padding: 28px 0 48px; min-height: 60vh; }
.footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; font-size: .85rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.footer-partners { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-label { font-size: .78rem; }
.footer-logos { display: inline-flex; gap: 16px; align-items: center; }
.footer-logos img { height: 20px !important; width: auto !important; }
.footer-logos img[alt="Holarctic"] { height: 18px !important; }
/* Guest pages: partner credit sits under the card, small and quiet. */
.guest-partners { max-width: 520px; margin: -22px auto 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.guest-partners-label { font-size: .75rem; color: var(--muted); letter-spacing: .01em; text-align: center; }
.guest-partners-logos { display: inline-flex; gap: 20px; align-items: center; }
.guest-partners-logos img { height: 19px !important; width: auto !important; }
.guest-partners-logos img[alt="Holarctic"] { height: 17px !important; }
.brand-logo { height: 36px !important; width: auto !important; }

/* Layout primitives */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.right { margin-left: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.narrow { max-width: 520px; margin: 40px auto; }
.card.center { text-align: center; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-title h2, .card-title h3 { margin: 0; }
.section { margin-bottom: 28px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--ru-red); margin-bottom: 6px; }

/* Buttons & badges */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--ru-red); background: var(--ru-red); color: #fff; font-weight: 600; font-size: .92rem; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:hover { background: var(--ru-red-dark); text-decoration: none; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--blue); padding-inline: 8px; }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 10px; font-size: .82rem; border-radius: 8px; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
.linklike { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.badge-green { background: #e3f3ea; color: var(--green); }
.badge-blue { background: #e6eef9; color: var(--blue); }
.badge-amber { background: #fbf0dc; color: var(--amber); }
.badge-red { background: #fbe7e5; color: var(--red); }
.badge-gray { background: #ececf0; color: var(--muted); }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.flash-ok, .flash-success { background: #e3f3ea; border-color: #bfe3cf; color: var(--green); }
.flash-error { background: #fbe7e5; border-color: #f3c3bf; color: var(--red); }
.flash-info { background: #e6eef9; border-color: #c6d8f1; color: var(--blue); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; background: #fff; }
.empty strong { color: var(--ink); display: block; margin-bottom: 4px; }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.help { font-weight: 400; color: var(--muted); font-size: .84rem; display: block; margin-top: 2px; }
input[type=text], input[type=email], input[type=url], input[type=date], input[type=datetime-local], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfced6; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f0c2b8; outline-offset: 1px; border-color: var(--ru-red); }
.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.checks input { margin-top: 3px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.autosave { font-size: .8rem; color: var(--muted); }
.autosave.is-saving { color: var(--amber); } .autosave.is-saved { color: var(--green); } .autosave.is-error { color: var(--red); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; position: relative; }

/* Progress stepper */
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 92px; display: grid; gap: 6px; align-content: start; position: relative; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.step.s-completed .step-num { background: var(--green); color: #fff; }
.step.s-in_progress .step-num, .step.s-under_review .step-num { background: var(--blue); color: #fff; }
.step.s-waiting_on_customer .step-num { background: var(--amber); color: #fff; }
.step-label { font-weight: 600; font-size: .88rem; }
.step a { color: inherit; }
.step a:hover { text-decoration: none; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { padding-left: 18px; position: relative; font-size: .92rem; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--ru-red); }
.kpi { display: grid; gap: 4px; }
.kpi .num { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.kpi .lbl { font-size: .82rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.is-active { color: var(--ru-red-dark); border-color: var(--ru-red); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.pill-choice { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pill-choice label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: .85rem; cursor: pointer; background: #fff; }
.pill-choice input:checked + span { color: var(--ru-red-dark); font-weight: 700; }
details.collapse { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 14px; }
details.collapse summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
details.collapse > div { padding: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 20px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Small utilities: the CSP forbids style="" attributes, so views use these instead. */
.center { text-align: center; }
.btn-block { width: 100%; justify-content: center; }
.mt-6 { margin-top: 6px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; } .mt-22 { margin-top: 22px; }
.mb-14 { margin-bottom: 14px; } .mb-18 { margin-bottom: 18px; }
.m-0 { margin: 0; }
.is-read { opacity: .7; }
.pre-wrap { white-space: pre-wrap; font-size: .9rem; background: var(--bg); padding: 12px; border-radius: 8px; overflow-wrap: anywhere; }
.code-key { font-size: 1.05rem; letter-spacing: .12em; }
.otp-input { text-align: center; font-size: 1.3rem; letter-spacing: .2em; }
.list-indent { padding-left: 20px; }
.list-indent li + li { margin-top: 6px; }
.strong { font-weight: 600; }
.num-of { font-size: .9rem; }
.card-compact { padding: 14px 18px; min-width: 260px; }
.list-item.compact { padding: 10px 12px; }
@media print { .topbar, .footer, .btn, .nav, .form-actions { display: none !important; } .card { box-shadow: none; border-color: #aaa; } body { background: #fff; } }
@media (max-width: 900px) {
  .stepper { grid-template-columns: repeat(3, 1fr); }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; order: 10; padding-bottom: 10px; }
  .nav.is-open { display: flex; }
  .brand-title { display: none; }
  .menu-name { display: none; }
}
@media (max-width: 560px) { .stepper { grid-template-columns: repeat(2, 1fr); } .card { padding: 16px; } h1 { font-size: 1.4rem; } }
@media (prefers-reduced-motion: no-preference) { .btn, .nav a, .list-item { transition: background .15s ease, transform .15s ease; } }
