/* ============================================================
   refine.css — Phase 6 "Daylight": the new-business Overview briefing,
   the first-payment moment, onboarding, and the Xero integration panel.
   Loaded last. (Page-level Overview / Money In / Quotes / Settings styles
   live in their own files since Phase 6 — nothing here overrides them.)
   ============================================================ */

/* ---------- new-business Overview briefing + first payment ---------- */
.ov-brief{max-width:640px; padding:4px 0 32px}
.ov-brief-h{margin:0; font-size:28px; font-weight:600; letter-spacing:-.025em; color:var(--ink); line-height:1.2}
.ov-brief-p{margin:14px 0 0; font-size:16px; color:var(--ink-muted); line-height:1.6}
.ov-brief-status{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-top:24px; padding:14px 16px; border-radius:var(--r-md); background:var(--surface-2); font-size:var(--fs-sm); color:var(--ink-muted); line-height:1.5}
.ov-brief-acts{display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin-top:26px}
.ov-brief-acts .btn{width:auto; margin:0}
.ov-first-slot:empty{display:none}
.ov-first{display:flex; align-items:center; justify-content:space-between; gap:12px 20px; flex-wrap:wrap; margin:0; padding:18px 20px; border-radius:var(--r-lg); background:var(--accent-soft)}
.ov-first b{display:block; font-size:17px; color:var(--ink); letter-spacing:-.01em}
.ov-first span{display:block; font-size:var(--fs-sm); color:var(--ink-muted); margin-top:3px}
.ov-first .btn{width:auto; margin:0}

/* ============================================================
   ONBOARDING — welcoming, short steps, one obvious action.
   ============================================================ */
.ob-screen{min-height:100vh; min-height:100dvh; display:flex; justify-content:center; padding:0 16px 40px;
  background:radial-gradient(1100px 520px at 50% -12%, #EAF1F7 0%, var(--bg) 62%)}
.ob-wrap{width:100%; max-width:600px}
.ob-top{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:28px 0 44px}
.ob-brand{display:flex; align-items:center; gap:10px}
.ob-brand .brand-word{font-size:13px}
.ob-progress{display:flex; align-items:center; gap:12px; font-size:var(--fs-xs); font-weight:500; color:var(--ink-muted); white-space:nowrap}
.ob-bar{display:block; width:120px; height:6px; border-radius:3px; background:var(--surface-3); overflow:hidden}
.ob-bar i{display:block; height:100%; background:var(--brand); border-radius:inherit; transition:width .3s var(--ease)}
.ob-body{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-xl); box-shadow:var(--shadow-md); padding:40px 44px 36px}
.ob-body h1{margin:0 0 12px; font-size:32px; font-weight:600; letter-spacing:-.03em; line-height:1.15; color:var(--ink)}
.ob-body h1:focus{outline:none}
.ob-lead{margin:0 0 28px; font-size:16.5px; line-height:1.6; color:var(--ink-muted); max-width:52ch}
.ob-points{margin:0; padding:0; list-style:none}
.ob-points li{position:relative; padding:14px 0 14px 32px; border-top:1px solid var(--line); color:var(--ink); font-size:var(--fs-body); line-height:1.5}
.ob-points li::before{content:""; position:absolute; left:2px; top:16px; width:18px; height:18px; border-radius:50%; background:var(--accent-soft)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2336668E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") no-repeat center}
.ob-body label{font-size:var(--fs-sm); font-weight:500; color:var(--ink); margin:22px 0 8px}
.ob-body select, .ob-body input[type=text], .ob-body input[type=number]{font-size:16px}
.ob-help{font-size:var(--fs-xs); color:var(--ink-faint); line-height:1.55; margin-top:8px}
.ob-field{border:none; margin:30px 0 0; padding:0; min-width:0}
.ob-field legend{padding:0; margin-bottom:12px; font-size:var(--fs-body); font-weight:600; color:var(--ink)}
.ob-choice{display:flex; flex-wrap:wrap; gap:8px}
.ob-choice label{margin:0; position:relative; font-size:var(--fs-body); color:var(--ink)}
.ob-choice input{position:absolute; opacity:0; width:1px; height:1px}
.ob-choice span{display:inline-flex; align-items:center; min-height:var(--touch); padding:10px 20px; border:1px solid var(--line-strong); border-radius:var(--r-pill); background:var(--surface); cursor:pointer; transition:border-color var(--t-fast) ease, background-color var(--t-fast) ease, box-shadow var(--t-fast) ease}
.ob-choice span:hover{border-color:#B9C5D3; background:var(--surface-2)}
.ob-choice input:checked + span{border-color:var(--accent); background:var(--accent-soft); color:var(--ink); font-weight:600; box-shadow:inset 0 0 0 1px var(--accent)}
.ob-choice input:focus-visible + span{box-shadow:var(--focus-ring)}
.ob-field [data-reveal]{margin-top:4px}
.ob-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 14px}
.ob-grid > div{min-width:0}
.ob-span{grid-column:1 / -1}
/* the accounting step: a proper integration card */
.ob-panel{margin:4px 0 0; padding:20px 22px; border:1px solid var(--line); border-radius:var(--r-lg); background:#FAFBFD}
.ob-panel p{margin:12px 0 0; font-size:var(--fs-body); line-height:1.6; color:var(--ink-muted)}
.ob-panel p b{color:var(--ink); font-weight:600}
.ob-panel .xc .st-kv:first-child{padding-top:0}
.ob-note{margin-top:30px; padding:16px 18px; border-radius:var(--r-md); background:var(--surface-2)}
.ob-note b{font-size:var(--fs-body); color:var(--ink)}
.ob-note p{margin:6px 0 0; font-size:var(--fs-sm); line-height:1.6; color:var(--ink-muted)}
.ob-note .ob-warn{color:var(--attention)}
.ob-sum{margin-top:26px}
.ob-sum h2{margin:0 0 6px}
.ob-sum dl{margin:0}
.ob-sum dl > div{display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); font-size:var(--fs-sm)}
.ob-sum dt{color:var(--ink-muted); flex-shrink:0}
.ob-sum dd{margin:0; text-align:right; color:var(--ink); min-width:0; overflow-wrap:anywhere; font-weight:500}
.ob-actions{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:40px; padding-top:22px; border-top:1px solid var(--line)}
.ob-actions .btn{width:auto; margin:0; min-width:160px}
.ob-actions .btn-text{color:var(--ink-muted)}
.ob-err.show{margin-top:16px}
/* Phase 9.1B: identity format hints, imported-from-accounting panel, source tags */
.ob-idhint.is-ok{color:var(--good)}
.ob-idhint.is-bad{color:var(--attention)}
.ob-opt{font-weight:400; color:var(--ink-faint)}
.ob-sub{font-size:var(--fs-xs); font-weight:400; color:var(--ink-faint)}
.ob-src-tag{display:inline-block; margin-left:6px; padding:1px 7px; border-radius:var(--r-pill); background:var(--accent-soft); color:var(--accent); font-size:11px; font-weight:600; vertical-align:1px}
.ob-imported{margin-top:16px}
.ob-imp-h{margin:12px 0 4px; font-size:var(--fs-body); font-weight:600; color:var(--ink)}
.ob-imp{margin:0}
.ob-imp > div{display:flex; justify-content:space-between; gap:16px; padding:9px 0; border-bottom:1px solid var(--line); font-size:var(--fs-sm)}
.ob-imp dt{color:var(--ink-muted); flex-shrink:0}
.ob-imp dd{margin:0; text-align:right; color:var(--ink); font-weight:500; min-width:0; overflow-wrap:anywhere}
.ob-imp-data{display:flex; flex-wrap:wrap; gap:6px 16px; margin:14px 0 0 !important; font-size:var(--fs-xs) !important; color:var(--ink-muted)}
.ob-imp-data b{color:var(--ink); font-weight:600}
.ob-imp-diff{margin-top:16px; padding-top:14px; border-top:1px solid var(--line)}
.ob-imp-diff p{margin:0 0 6px !important; font-weight:600; color:var(--ink) !important}
.ob-imp-diff ul{margin:0 0 12px; padding-left:18px; font-size:var(--fs-sm); color:var(--ink-muted); line-height:1.6}
.ob-imp-ok{margin-top:14px !important; font-size:var(--fs-sm) !important; color:var(--good) !important}
@media (max-width:640px){
  .ob-screen{padding:0 0 0; background:var(--surface)}
  .ob-wrap{max-width:none}
  .ob-top{padding:18px 18px 22px; border-bottom:1px solid var(--line); background:var(--surface)}
  .ob-body{border:none; border-radius:0; box-shadow:none; padding:26px 18px 0}
  .ob-body h1{font-size:26px}
  .ob-lead{font-size:16px}
  .ob-bar{width:64px}
  .ob-actions{position:sticky; bottom:0; margin:32px -18px 0; padding:12px 18px calc(12px + env(safe-area-inset-bottom)); background:rgba(255,255,255,.94); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px)}
  .ob-actions .btn{flex:1; min-width:0}
}
@media (max-width:420px){
  .ob-grid{grid-template-columns:1fr}
  .ob-choice span{padding:10px 16px}
}

/* ============================================================
   XERO INTEGRATION PANEL (Settings → Account & Xero, onboarding)
   ============================================================ */
.xc-head{display:flex; align-items:center; gap:14px; padding:18px 20px; border:1px solid var(--line); border-radius:var(--r-lg); background:#FAFBFD; margin:14px 0 6px}
.xc-ic{width:44px; height:44px; border-radius:12px; background:var(--surface); box-shadow:inset 0 0 0 1px var(--line-strong); color:var(--accent-strong); display:flex; align-items:center; justify-content:center; flex-shrink:0}
.xc-head-text{flex:1; min-width:0}
.xc-head-text b{display:block; font-size:var(--fs-body); font-weight:600; color:var(--ink)}
.xc-head-text span{display:block; font-size:var(--fs-sm); color:var(--ink-muted); margin-top:2px; overflow-wrap:anywhere}
.xc-head .r-chip{flex-shrink:0}
.xc .xc-orgs{border:none; margin:18px 0 0; padding:0; min-width:0; display:flex; flex-direction:column; gap:8px}
.xc .xc-orgs legend{padding:0; margin-bottom:10px; font-size:var(--fs-body); font-weight:600; color:var(--ink)}
.xc .xc-orgs label{display:flex; align-items:center; gap:10px; min-height:var(--touch); margin:0; padding:10px 14px; border:1px solid var(--line-strong); border-radius:var(--r-md); cursor:pointer; color:var(--ink); font-size:var(--fs-body); background:var(--surface)}
.xc .xc-orgs label:has(input:checked){border-color:var(--accent); background:var(--accent-soft)}
.xc .xc-orgs input{accent-color:var(--accent-strong); width:18px; height:18px; margin:0; flex:none}
.xc-acts{display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin-top:20px}
.xc-acts .btn{width:auto; margin:0; padding:10px 18px}
.xc-danger, .xc-danger:hover{color:var(--risk)}
.xc .btn.danger{background:var(--risk); border-color:var(--risk); color:#fff}
.xc .btn.danger:hover{background:#962015}
.xc-confirm{margin-top:16px; padding:16px 18px; border:1px solid #F3D3CF; border-radius:var(--r-md); background:var(--risk-soft)}
.xc-confirm p{margin:0; font-size:var(--fs-sm); line-height:1.55; color:var(--ink-muted)}
.xc-confirm p b{color:var(--ink)}
.xc-confirm .xc-acts{margin-top:14px}
.xc-msg{margin-top:12px; font-size:var(--fs-sm); color:var(--ink-muted); min-height:1em}
.xc-msg:empty{display:none}
.xc .st-kv b{min-width:0}
.xc .r-chip{white-space:normal; max-width:100%; height:auto; text-align:left}
/* the onboarding panel never wraps the Xero panel's own card (no card-in-card) */
.ob-panel:has(.xc){padding:0; border:none; background:none}
