:root{
  /* Fixed brand accents — same in both themes */
  --thread:#B23A2E; --chalk:#3E5C76;

  /* Theme-aware roles (light values here; dark overrides below) */
  --bg:#F5F2E9;           /* page background */
  --bg-alt:#EDE7D6;       /* alternating section background */
  --surface:#FBFAF6;      /* card / input background */
  --text:#2A2924;         /* primary text */
  --text-muted:#6E6A5F;   /* secondary text */
  --border:#EDE7D6;       /* subtle borders/dividers */
  --accent-bg:#2A2924;    /* button / icon-circle background */
  --accent-text:#FBFAF6;  /* text on accent-bg */

  /* Kept for the hero + rich footer, which are always dark regardless of
     site theme (see the "Landing page + rich footer" block below) —
     these values never change between light/dark mode on purpose. */
  --ink:#2A2924; --muslin:#EDE7D6; --white:#FBFAF6;
}
:root[data-theme="dark"]{
  --bg:#1B1A16; --bg-alt:#211F1A; --surface:#252420;
  --text:#EDE7D6; --text-muted:#A39E8F; --border:#3A362D;
  --accent-bg:#EDE7D6; --accent-text:#1B1A16;
  --thread:#E2685A; --chalk:#7CA0C4;
}

*{box-sizing:border-box;}
body{margin:0; font-family:'IBM Plex Sans', Arial, sans-serif; background:var(--bg); color:var(--text); transition:background .2s ease, color .2s ease;}
a{color:var(--chalk); text-decoration:none;}

.site-header{display:flex; justify-content:space-between; align-items:center; padding:16px 32px; border-bottom:1px solid var(--border); background:var(--bg); position:sticky; top:0; z-index:50; flex-wrap:wrap; gap:10px;}
.brand{font-size:20px; font-weight:700; color:var(--text);}
.header-right{display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:4px;}
.site-header nav{display:flex; align-items:center; flex-wrap:wrap; order:1;}
.site-header nav a{margin-left:16px; font-size:14px; color:var(--text);}
.user-name{margin-left:16px; font-size:14px; color:var(--text-muted);}
.logout-btn{background:none; border:none; cursor:pointer; font:inherit; margin-left:12px; color:var(--text); padding:0;}
.btn-ghost{border:1px solid var(--text); padding:6px 12px; border-radius:3px; color:var(--text);}
.container{max-width:1000px; margin:0 auto; padding:32px;}

.alert{padding:10px 14px; border-radius:3px; margin-bottom:16px; font-size:14px;}
.alert-success{background:#e4efe4; border:1px solid #4a7a4a; color:#1c3d1c;}
.alert-error{background:#f6e2df; border:1px solid var(--thread); color:#5c1f16;}

form{max-width:420px;}
label{display:block; font-size:13px; color:var(--text-muted); margin:14px 0 4px;}
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=search], input[type=number], textarea, select{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:3px; font-size:14px;
  font-family:inherit; background:var(--surface); color:var(--text);
}
input[type=file]{max-width:100%;}
button, .btn{
  background:var(--accent-bg); color:var(--accent-text); border:1px solid var(--accent-bg);
  padding:10px 18px; border-radius:3px; cursor:pointer; font-size:14px; margin-top:16px; display:inline-block;
}
button.secondary{background:transparent; color:var(--text); border-color:var(--text);}

/* display:block on <table> turns the table itself into a scrollable
   container (cells inside keep their normal table layout, since thead/
   tbody/tr/td aren't touched) — so a wide table scrolls within its own
   box on narrow screens instead of blowing out the whole page layout. */
table{
  display:block; overflow-x:auto; -webkit-overflow-scrolling:touch;
  width:100%; border-collapse:collapse; margin-top:20px; max-width:100%;
}
th, td{text-align:left; padding:10px 12px; border-bottom:1px solid var(--border);}
th{font-size:12px; text-transform:uppercase; color:var(--text-muted); letter-spacing:.04em;}

.status-pill{font-size:11px; padding:4px 10px; border-radius:20px; border:1px solid var(--text); text-transform:uppercase; color:var(--text);}
.status-pill.in_progress, .status-pill.deal_finalized{background:var(--chalk); color:#fff; border-color:var(--chalk);}
.status-pill.delivered, .status-pill.closed{background:var(--accent-bg); color:var(--accent-text); border-color:var(--accent-bg);}

.card{background:var(--surface); border:1px solid var(--border); border-radius:4px; padding:20px; margin-bottom:16px;}
.pipeline{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:14px; margin:20px 0;}
.pipeline .col h4{font-size:12px; text-transform:uppercase; color:var(--text-muted); border-bottom:1px solid var(--border); padding-bottom:6px;}
.pipeline .order-card{background:var(--surface); border:1px solid var(--border); border-radius:3px; padding:10px; margin-bottom:8px; font-size:13px;}
.pipeline .order-card a{font-weight:600; color:var(--text);}

/* Theme + mobile nav toggle buttons (shared by app header and landing nav) */
.theme-toggle{
  background:none; border:1px solid var(--border); color:var(--text); border-radius:4px;
  width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0; margin:0 8px; order:2;
}
.theme-toggle .icon-moon{display:none;}
[data-theme="dark"] .theme-toggle .icon-sun{display:none;}
[data-theme="dark"] .theme-toggle .icon-moon{display:inline-flex;}
.nav-toggle{
  display:none; background:none; border:1px solid var(--border); color:var(--text); border-radius:4px;
  width:38px; height:38px; align-items:center; justify-content:center; cursor:pointer; padding:0; order:3;
}

/* ============================================================
   Landing page + rich footer
   ============================================================ */

.landing-nav{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px 32px; border-bottom:1px solid var(--border); background:var(--bg);
  position:sticky; top:0; z-index:50; flex-wrap:wrap; gap:10px;
}
.landing-nav .brand{font-size:22px; font-weight:700; color:var(--text);}
.landing-nav .brand span{color:var(--thread);}

.nav-collapsible{display:flex; align-items:center; gap:24px; flex:1; justify-content:flex-end; margin-right:16px; order:1;}
.landing-nav .nav-links{display:flex; align-items:center;}
.landing-nav .nav-links a{margin-left:18px; font-size:14px; color:var(--text);}
.nav-auth{display:flex; align-items:center; gap:10px;}
.nav-controls{display:flex; align-items:center; gap:4px; order:2;}

.nav-auth .btn-primary{
  background:var(--accent-bg); color:var(--accent-text); padding:8px 16px; border-radius:3px;
}
.nav-auth .btn-outline{
  border:1px solid var(--text); color:var(--text); padding:7px 15px; border-radius:3px;
}

/* Mobile hamburger collapse — applies to both the landing nav and the
   app header nav once the viewport gets narrow. The toggle controls
   (theme + hamburger) are re-ordered to come FIRST so they stay on the
   header's first line even when the collapsible nav below them opens up
   to full width — otherwise flexbox would push them down onto a second
   line along with the open menu. Auto-close-on-link-click and
   click-outside-to-close are handled in assets/js/site.js. */
@media (max-width:860px){
  .nav-toggle{display:inline-flex;}

  .nav-controls{order:1;}
  .nav-collapsible{
    display:none; flex-basis:100%; flex-direction:column; align-items:flex-start; gap:14px;
    order:2; padding-top:14px; border-top:1px solid var(--border); margin-top:4px; margin-right:0;
  }
  .landing-nav.nav-open .nav-collapsible{display:flex;}
  .landing-nav .nav-links{flex-direction:column; align-items:flex-start; width:100%;}
  .landing-nav .nav-links a{margin-left:0; padding:8px 4px;}
  .nav-auth{width:100%;}
  .nav-auth a{flex:1; text-align:center;}

  .theme-toggle{order:1;}
  .nav-toggle{order:2;}
  .site-header nav{
    display:none; flex-basis:100%; flex-direction:column; align-items:flex-start; gap:2px;
    order:3; padding-top:12px; border-top:1px solid var(--border); margin-top:8px;
  }
  .site-header.nav-open nav{display:flex;}
  .site-header nav a, .user-name, .logout-btn{margin-left:0 !important; padding:6px 0;}
}

/* Hero carousel */
.hero{position:relative; height:460px; overflow:hidden; color:var(--white);}
.hero-slide{
  position:absolute; inset:0; opacity:0; transition:opacity 1s ease;
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding:32px;
}
.hero-slide.active{opacity:1;}
.hero-slide .hero-inner{max-width:720px;}
.hero-slide .eyebrow{
  font-size:12px; letter-spacing:.12em; text-transform:uppercase; opacity:.85; margin-bottom:10px;
}
.hero-slide h1, .hero-slide .hero-heading{font-size:38px; line-height:1.2; margin:0 0 14px;}
.hero-slide p{font-size:16px; opacity:.92; margin:0 0 22px;}
.hero-slide .btn-hero{
  background:var(--white); color:var(--ink); padding:12px 24px; border-radius:3px;
  font-weight:600; display:inline-block; margin-right:10px;
}
.hero-slide .btn-hero.outline{
  background:transparent; color:var(--white); border:1px solid var(--white);
}
.hero-dots{
  position:absolute; bottom:18px; left:0; right:0; display:flex; justify-content:center; gap:8px;
}
.hero-dots button{
  width:9px; height:9px; border-radius:50%; border:1px solid var(--white); background:transparent;
  padding:0; margin:0; cursor:pointer;
}
.hero-dots button.active{background:var(--white);}

/* Generic marketing sections */
.section{padding:56px 32px;}
.section-inner{max-width:1000px; margin:0 auto;}
.section-title{font-size:28px; margin:0 0 8px; color:var(--text);}
.section-sub{color:var(--text-muted); font-size:15px; margin:0 0 36px; max-width:640px;}
.section.alt{background:var(--bg-alt);}

.why-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:20px;}
.why-card{background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:22px;}
.why-card .icon{
  width:42px; height:42px; border-radius:50%; background:var(--accent-bg); color:var(--accent-text);
  display:flex; align-items:center; justify-content:center; margin-bottom:14px; font-size:18px;
}
.why-card h3{font-size:16px; margin:0 0 8px; color:var(--text);}
.why-card p{font-size:13.5px; color:var(--text-muted); margin:0; line-height:1.55;}

.steps-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:20px;}
.step-card{position:relative; padding:22px 18px 18px; background:var(--surface); border:1px solid var(--border); border-radius:6px;}
.step-card .step-num{
  font-size:13px; font-weight:700; color:var(--thread); letter-spacing:.06em; margin-bottom:8px;
}
.step-card h3{font-size:15px; margin:0 0 6px; color:var(--text);}
.step-card p{font-size:13px; color:var(--text-muted); margin:0; line-height:1.5;}

.faq-item{border-bottom:1px solid var(--border); padding:14px 0;}
.faq-item summary{cursor:pointer; font-weight:600; font-size:15px; list-style:none; color:var(--text);}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::before{content:"+ "; color:var(--thread); font-weight:700;}
.faq-item[open] summary::before{content:"– ";}
.faq-item p{color:var(--text-muted); font-size:14px; margin:10px 0 0; line-height:1.6;}

.contact-grid{display:grid; grid-template-columns:1.2fr 1fr; gap:32px;}
@media (max-width:760px){ .contact-grid{grid-template-columns:1fr;} }
.contact-info-list{list-style:none; padding:0; margin:0;}
.contact-info-list li{margin-bottom:14px; font-size:14px; display:flex; align-items:center; gap:8px; color:var(--text);}
.contact-info-list a{color:var(--text); font-weight:600;}

/* Rich 3-column footer */
.site-footer-rich{background:var(--ink); color:var(--muslin); padding:48px 32px 20px;}
.footer-grid{
  max-width:1000px; margin:0 auto; display:grid;
  grid-template-columns:1.3fr 1fr 1fr; gap:36px;
}
@media (max-width:760px){ .footer-grid{grid-template-columns:1fr;} }
.footer-col h4{
  color:var(--white); font-size:13px; text-transform:uppercase; letter-spacing:.08em;
  margin:0 0 16px;
}
.footer-col p, .footer-col a{color:var(--muslin); font-size:13.5px;}
.footer-col a{display:flex; align-items:center; gap:7px; margin-bottom:9px;}
.footer-col a:hover{color:var(--white);}
.footer-profile-name{color:var(--white); font-weight:700; font-size:15px; margin:0 0 2px;}
.footer-profile-title{color:var(--muslin); font-size:12.5px; margin:0 0 14px;}

.social-icons{display:flex; gap:8px; margin-top:14px; flex-wrap:wrap;}
.social-icons a{
  width:32px; height:32px; border-radius:50%; border:1px solid #4a4738;
  display:flex; align-items:center; justify-content:center; margin:0;
  font-size:11px; font-weight:700; color:var(--muslin);
}
.social-icons a:hover{background:var(--thread); border-color:var(--thread); color:var(--white);}

.footer-bottom{
  max-width:1000px; margin:32px auto 0; padding-top:18px; border-top:1px solid #4a4738;
  font-size:12px; color:#9b9686; text-align:center;
}

/* ============================================================
   Pattern Library + Spec Match (v6)
   ============================================================ */
:root{ --ok:#2f7a4a; --warn:#b07a12; --bad:var(--thread); --ok-bg:#e3efe6; --warn-bg:#f5ecd6; --bad-bg:#f6e2df; }
:root[data-theme="dark"]{ --ok:#6cc08a; --warn:#e0b04a; --ok-bg:#1f2e24; --warn-bg:#33291a; --bad-bg:#3a201c; }
.container.wide{max-width:1240px;}
.muted{color:var(--text-muted);} .small{font-size:12.5px;}
.btn.sm, button.sm{padding:6px 12px; font-size:13px; margin-top:0;}
.btn.secondary{background:transparent; color:var(--text); border-color:var(--text);}
.btn-row{display:flex; flex-wrap:wrap; gap:8px; align-items:center;}
.btn-row form{max-width:none; margin:0;}
.page-head{display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:12px; margin-bottom:8px;}
.page-head h2{margin:0;}
.form-wide{max-width:none;}
.form-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:0 16px;}
.form-grid .fg-wide{grid-column:1 / -1;}
.inline-form{display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; max-width:none;}
.inline-form > div{min-width:160px; flex:1;}
.inline-form button{margin-top:0;}
.tabs{display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid var(--border); margin:12px 0 16px;}
.tabs a{padding:8px 14px; color:var(--text-muted); border-bottom:2px solid transparent; font-size:14px;}
.tabs a.active{color:var(--text); border-color:var(--thread); font-weight:600;}

/* stat tiles */
.stats{display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:12px; margin:16px 0;}
.stat{background:var(--surface); border:1px solid var(--border); border-radius:4px; padding:14px;}
.stat b{display:block; font-size:24px;}
.stat span{font-size:12px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em;}

/* grid editor */
.pom-grid-wrap{overflow-x:auto; border:1px solid var(--border); border-radius:4px; margin-top:12px;}
table.pom-grid{display:table; margin:0; min-width:100%; font-size:13px;}
table.pom-grid th, table.pom-grid td{padding:4px; border-bottom:1px solid var(--border); vertical-align:middle;}
table.pom-grid input, table.pom-grid select{padding:6px 7px; font-size:13px; min-width:0;}
table.pom-grid .col-label{min-width:190px;} table.pom-grid .col-code{min-width:170px;}
table.pom-grid .col-basis{width:70px;} table.pom-grid .col-tol{width:70px;}
table.pom-grid th.col-size, table.pom-grid td:not(:first-child) input[inputmode]{width:72px;}
table.pom-grid th.col-size input{font-weight:700; text-align:center; text-transform:uppercase;}
table.pom-grid tr.is-custom td:first-child input{border-left:3px solid var(--warn);}
.icon-btn{margin:0; padding:2px 9px; background:transparent; color:var(--text-muted); border:1px solid var(--border); font-size:15px; line-height:1.2;}
.icon-btn:hover{color:var(--thread); border-color:var(--thread);}
.grid-tools{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0;}

/* match results */
.match-card{background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:16px; margin-bottom:14px;}
.match-card.top{border-color:var(--text);}
.match-head{display:flex; gap:16px; align-items:center; flex-wrap:wrap;}
.score-ring{--p:0; width:76px; height:76px; border-radius:50%; flex:none; display:grid; place-items:center;
  background:conic-gradient(var(--ring) calc(var(--p)*1%), var(--border) 0);}
.score-ring::before{content:""; grid-area:1/1; width:60px; height:60px; border-radius:50%; background:var(--surface);}
.score-ring b{grid-area:1/1; font-size:17px; z-index:1;}
.score-ring.reuse{--ring:var(--ok);} .score-ring.modify{--ring:var(--chalk);} .score-ring.base{--ring:var(--warn);} .score-ring.new{--ring:var(--bad);}
.match-title{flex:1; min-width:200px;}
.match-title h3{margin:0 0 4px; font-size:17px;}
.chip{display:inline-block; font-size:11px; padding:3px 9px; border-radius:20px; border:1px solid var(--border); margin:2px 4px 2px 0; color:var(--text-muted);}
.chip.reuse{background:var(--ok-bg); color:var(--ok); border-color:transparent; font-weight:600;}
.chip.modify{background:var(--chalk); color:#fff; border-color:transparent; font-weight:600;}
.chip.base{background:var(--warn-bg); color:var(--warn); border-color:transparent; font-weight:600;}
.chip.new{background:var(--bad-bg); color:var(--bad); border-color:transparent; font-weight:600;}
.chip.flag{border-color:var(--warn); color:var(--warn);}
.breakdown{display:flex; gap:18px; flex-wrap:wrap; font-size:12.5px; color:var(--text-muted); margin-top:8px;}
.breakdown b{color:var(--text);}
table.cmp{display:table; width:100%; font-size:13px; margin-top:12px;}
table.cmp td, table.cmp th{padding:7px 8px;}
.st{font-size:11px; font-weight:700; padding:2px 7px; border-radius:3px; white-space:nowrap;}
.st.exact, .st.ok{background:var(--ok-bg); color:var(--ok);}
.st.warn{background:var(--warn-bg); color:var(--warn);}
.st.bad{background:var(--bad-bg); color:var(--bad);}
.st.missing{border:1px dashed var(--text-muted); color:var(--text-muted);}
td.num{text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap;}
.diff-pos{color:var(--chalk);} .diff-neg{color:var(--thread);}
details.more summary{cursor:pointer; font-size:13px; color:var(--chalk); margin-top:10px;}
.use-block{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px; max-width:none;}
.use-block select{width:auto; min-width:200px; max-width:100%;}
.use-block button{margin-top:0;}

/* library list */
.lib-table td{vertical-align:top;}
.lib-code{font-family:'IBM Plex Mono', ui-monospace, monospace; font-size:12.5px; white-space:nowrap;}
.file-kind{font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted);}
.dropzone{border:1.5px dashed var(--text-muted); border-radius:6px; padding:18px; background:var(--surface);}
.steps{display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 18px; font-size:12.5px;}
.steps span{padding:4px 10px; border-radius:20px; border:1px solid var(--border); color:var(--text-muted);}
.steps span.on{background:var(--accent-bg); color:var(--accent-text); border-color:var(--accent-bg);}
.note{font-size:13px; padding:10px 12px; border-left:3px solid var(--chalk); background:var(--surface); margin:10px 0;}
.note.warn{border-color:var(--warn);}
@media (max-width:640px){ .container{padding:20px 16px;} .score-ring{width:64px; height:64px;} .score-ring::before{width:50px; height:50px;} }

/* ============================================================
   v7 — chat, offers, payments, dashboards, client portal
   ============================================================ */
:root{ --info:#3E5C76; --info-bg:#e5ecf3; --shadow:0 1px 2px rgba(42,41,36,.06), 0 4px 14px rgba(42,41,36,.05); }
:root[data-theme="dark"]{ --info:#9fbfdc; --info-bg:#22303d; --shadow:0 1px 2px rgba(0,0,0,.3); }
.sr-only{position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.count-badge{display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--thread); color:#fff; font-size:11px; font-weight:700; line-height:1; vertical-align:middle;}
.bell{position:relative; text-decoration:none;} .bell .count-badge{position:relative; top:-8px; margin-left:-4px;}
.badge{display:inline-block; font-size:11px; padding:2px 8px; border-radius:10px; border:1px solid var(--border); color:var(--text-muted); background:var(--surface); white-space:nowrap;}
.badge.ok{background:var(--ok-bg); color:var(--ok); border-color:transparent;}
.badge.warn{background:var(--warn-bg); color:var(--warn); border-color:transparent;}
.badge.bad{background:var(--bad-bg); color:var(--bad); border-color:transparent; font-weight:600;}
.badge.info{background:var(--info-bg); color:var(--info); border-color:transparent;}
.status-pill.under_review{border-color:var(--chalk); color:var(--chalk);}
.status-pill.deal_finalized{background:var(--warn-bg); color:var(--warn); border-color:transparent;}
.status-pill.cancelled{opacity:.6; text-decoration:line-through;}
.status-pill.ready{background:var(--ok-bg); color:var(--ok); border-color:transparent;}
.chip-btn{cursor:pointer; background:var(--surface); font:inherit; font-size:11.5px; margin-top:0;}
.chip-btn:hover{border-color:var(--text);}
.table-scroll{overflow-x:auto;} .table-scroll table{display:table; margin-top:8px;}
.kv{list-style:none; padding:0; margin:0;} .kv li{display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px solid var(--border); font-size:13.5px;}
.kv li span{color:var(--text-muted);} .kv li b{text-align:right;}
.timeline{list-style:none; margin:0; padding:0 0 0 14px; border-left:2px solid var(--border); font-size:13px;}
.timeline li{position:relative; padding:0 0 12px 8px;} .timeline li::before{content:""; position:absolute; left:-21px; top:5px; width:10px; height:10px; border-radius:50%; background:var(--surface); border:2px solid var(--chalk);}
.toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--accent-bg); color:var(--accent-text); padding:10px 16px; border-radius:6px; font-size:14px; box-shadow:var(--shadow); z-index:200; transition:opacity .4s, transform .4s;}
.toast.bad{background:var(--thread); color:#fff;} .toast.out{opacity:0; transform:translate(-50%,10px);}

/* ---- journey stepper */
.journey{display:flex; list-style:none; padding:0; margin:18px 0 6px; counter-reset:j; overflow-x:auto;}
.journey li{flex:1; min-width:84px; display:flex; flex-direction:column; align-items:center; position:relative; font-size:12px; color:var(--text-muted); text-align:center;}
.journey li::before{content:""; position:absolute; top:13px; left:-50%; width:100%; height:2px; background:var(--border); z-index:0;}
.journey li:first-child::before{display:none;}
.journey .dot{width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:var(--surface); border:2px solid var(--border); font-weight:700; font-size:12px; position:relative; z-index:1;}
.journey li.done .dot{background:var(--ok); border-color:var(--ok); color:#fff;} .journey li.done::before, .journey li.current::before{background:var(--ok);}
.journey li.current .dot{border-color:var(--chalk); color:var(--chalk); box-shadow:0 0 0 4px var(--info-bg);}
.journey li.current{color:var(--text); font-weight:600;} .journey .lbl{margin-top:6px;}
.journey.is-cancelled{opacity:.45;}

/* ---- order page */
.order-hero{padding:20px 22px;}
.oh-top{display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-start;}
.oh-top h2{margin:4px 0 8px; font-size:22px;}
.client-line{margin-top:8px; font-size:13.5px; color:var(--text-muted);} .client-line b{color:var(--text);}
.oh-facts{display:grid; grid-template-columns:repeat(auto-fit, minmax(130px,1fr)); gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid var(--border);}
.oh-facts span{display:block; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted);} .oh-facts b{font-size:15px;}
.order-layout{display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:16px; align-items:start;}
.ol-side{position:sticky; top:84px;} .ol-side .card{padding:16px;}
@media (max-width:980px){ .order-layout{grid-template-columns:1fr;} .ol-side{position:static;} }
.file-list{list-style:none; padding:0; margin:0;} .file-list li{padding:8px 0; border-bottom:1px solid var(--border); font-size:13.5px; display:flex; flex-wrap:wrap; align-items:center; gap:6px;}
.file-list .file-kind{width:100%;}
.file-group{margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid var(--border);} .fg-title{font-weight:600; font-size:13.5px;}
.verify-box{border:1px solid var(--warn); background:var(--warn-bg); padding:10px; border-radius:4px; margin-bottom:10px; font-size:13px;}
.copy-row{display:flex; gap:6px;} .copy-row input{font-size:12px;} .copy-row button{margin-top:0;}

/* ---- payment card */
.pay-card{border-color:var(--chalk);}
.pay-item + .pay-item{margin-top:16px; padding-top:16px; border-top:1px solid var(--border);}
.pay-amount{display:flex; justify-content:space-between; align-items:baseline; gap:12px; flex-wrap:wrap;} .pay-amount b{font-size:24px;}
.pay-methods{display:grid; grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); gap:12px; margin-top:12px;}
.pay-method{border:1px solid var(--border); border-radius:6px; padding:12px; display:flex; flex-direction:column; gap:6px; background:var(--bg);}
.pay-method > button{align-self:flex-start;} .upi-qr{margin:6px 0; min-height:10px;} .upi-qr img, .upi-qr canvas{background:#fff; padding:6px; border-radius:4px;}
.upi-open{align-self:flex-start; margin-top:0;}
.delivery-card{border-color:var(--ok);}

/* ---- chat */
.chat{padding:0; overflow:hidden; display:flex; flex-direction:column;}
.chat-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; padding:14px 18px; border-bottom:1px solid var(--border);}
.chat-head h3{margin:0; font-size:16px;}
.chat-log{height:min(56vh, 520px); overflow-y:auto; padding:16px 18px; display:flex; flex-direction:column; gap:10px; background:var(--bg);}
.chat-empty{color:var(--text-muted); font-size:13.5px; text-align:center; margin:auto; max-width:420px;}
.msg{max-width:78%; display:flex; flex-direction:column; gap:3px;}
.msg-meta{font-size:11.5px; color:var(--text-muted); display:flex; gap:8px;} .msg-meta b{color:var(--text);}
.msg-body{padding:9px 12px; border-radius:10px; white-space:pre-wrap; word-wrap:break-word; font-size:14px; line-height:1.45; background:var(--surface); border:1px solid var(--border);}
.msg-mine{align-self:flex-end; align-items:flex-end;} .msg-mine .msg-body{background:var(--accent-bg); color:var(--accent-text); border-color:var(--accent-bg); border-bottom-right-radius:3px;}
.msg-theirs{align-self:flex-start;} .msg-theirs .msg-body{border-bottom-left-radius:3px;}
.msg-system{align-self:center; max-width:90%; font-size:12px; color:var(--text-muted); background:var(--surface); border:1px dashed var(--border); padding:5px 12px; border-radius:14px; text-align:center; display:block;}
.msg-system time{margin-left:8px; opacity:.7;}
.msg-file{display:inline-flex; flex-direction:column; gap:4px; font-size:13px; padding:6px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); max-width:260px;}
.msg-file img{max-width:240px; max-height:180px; border-radius:6px; object-fit:cover;}
.chat-form{border-top:1px solid var(--border); padding:10px 12px; max-width:none; background:var(--surface);}
.chat-form textarea{resize:vertical; min-height:44px;}
.chat-actions{display:flex; align-items:center; gap:10px; margin-top:6px;} .chat-actions .btn{margin:0 0 0 auto;}
.chat-attach{margin:0; cursor:pointer; font-size:13px; color:var(--text-muted); display:inline-flex; gap:4px; align-items:center;}
.chat-attach input{display:none;} .chat-error{color:var(--thread); font-size:12.5px;}
.chat-reload{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 18px; background:var(--info-bg); color:var(--info); font-size:13px;}
.chat-reload .btn{margin:0;}

/* ---- offer card */
.offer-card{border:1.5px solid var(--chalk); border-radius:10px; background:var(--surface); padding:12px 14px; width:min(420px, 100%); margin-top:4px; color:var(--text);}
.offer-head{display:flex; justify-content:space-between; gap:8px; font-size:11px; text-transform:uppercase; letter-spacing:.05em;}
.offer-tag{color:var(--chalk); font-weight:700;} .offer-status{color:var(--text-muted);}
.offer-status.accepted{color:var(--ok); font-weight:700;} .offer-status.declined, .offer-status.withdrawn, .offer-status.expired{color:var(--bad);}
.offer-title{font-weight:700; font-size:15px; margin:6px 0 2px;} .offer-desc{font-size:13px; color:var(--text-muted); white-space:pre-wrap; margin:4px 0;}
.offer-terms{display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; margin:10px 0; font-size:13px;}
.offer-terms span{display:block; font-size:11px; color:var(--text-muted);} .offer-terms b{font-size:14px;}
.offer-exp{font-size:12px; color:var(--text-muted); margin:0 0 6px;}
.offer-actions{display:flex; gap:8px; flex-wrap:wrap;} .offer-actions form{max-width:none; margin:0;} .offer-actions .btn{margin:0;}
.offer-declined, .offer-withdrawn, .offer-expired{opacity:.65; border-style:dashed;}
.offer-accepted{border-color:var(--ok);}

/* ---- services / price list */
.service-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:12px; margin:12px 0 18px;}
.service-card{position:relative; display:flex; flex-direction:column; gap:4px; padding:14px 16px; background:var(--surface); border:1.5px solid var(--border); border-radius:8px; cursor:pointer; color:var(--text); margin:0; font-size:14px;}
.service-card:hover{border-color:var(--text-muted);} .service-card.link{text-decoration:none;}
.service-card input[type=radio]{position:absolute; opacity:0;}
.service-card:has(input:checked){border-color:var(--chalk); box-shadow:0 0 0 3px var(--info-bg);}
.sc-name{font-weight:700; font-size:15px;} .sc-price{font-size:18px; font-weight:700; color:var(--chalk);} .sc-price small{font-size:11.5px; font-weight:400; color:var(--text-muted);}
.sc-meta{font-size:12px; color:var(--text-muted);} .sc-desc{font-size:12.5px; color:var(--text-muted); line-height:1.45;}
.sc-cta{margin-top:auto; padding-top:6px; font-size:13px; font-weight:600; color:var(--thread);}
.service-card.is-off{opacity:.55;} .service-grid.admin .service-card{cursor:default;}

/* ---- inbox / notifications */
.inbox{display:flex; flex-direction:column; border:1px solid var(--border); border-radius:6px; overflow:hidden; background:var(--surface);}
.inbox-row{display:flex; gap:12px; align-items:center; padding:12px 14px; border-bottom:1px solid var(--border); color:var(--text);}
.inbox-row:last-child{border-bottom:0;} .inbox-row:hover{background:var(--bg);}
.inbox-row.unread{background:var(--info-bg);} .inbox-row.unread .ib-last{color:var(--text); font-weight:600;}
.avatar{width:38px; height:38px; flex:none; border-radius:50%; display:grid; place-items:center; background:var(--accent-bg); color:var(--accent-text); font-weight:700;}
.ib-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;} .ib-last{color:var(--text-muted); font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.ib-side{display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex:none;}

/* ---- dashboards */
.dash-head{display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:14px;}
.dash-head h2{margin:2px 0 0; font-size:24px;} .dash-head > .btn{margin-top:0;}
.quick-links{display:flex; flex-wrap:wrap; gap:6px;}
.ql{padding:7px 12px; border:1px solid var(--border); border-radius:20px; background:var(--surface); color:var(--text); font-size:13px; white-space:nowrap;}
.ql:hover{border-color:var(--text);}
.kpis{display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:10px; margin-bottom:16px;}
.kpi{display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:14px; margin:0; font:inherit; box-shadow:var(--shadow);}
button.kpi{cursor:pointer;} button.kpi:hover{border-color:var(--text-muted);}
.kpi span{font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted);}
.kpi b{font-size:26px; line-height:1.15; font-variant-numeric:tabular-nums;} .kpi small{font-size:12px; color:var(--text-muted);}
.kpi.on{border-color:var(--chalk); box-shadow:0 0 0 3px var(--info-bg);}
.kpi.is-bad b{color:var(--bad);} .kpi.is-warn b{color:var(--warn);}
.dash-grid{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:16px; margin-bottom:18px;}
@media (max-width:900px){ .dash-grid{grid-template-columns:1fr;} }
.cc-head{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;} .cc-head h3, .attention h3{margin:0 0 6px; font-size:16px;}
.seg{display:inline-flex; border:1px solid var(--border); border-radius:6px; overflow:hidden; background:var(--bg);}
.seg button{margin:0; background:transparent; color:var(--text-muted); border:0; border-radius:0; padding:6px 12px; font-size:12.5px;}
.seg button.on{background:var(--surface); color:var(--text); font-weight:600; box-shadow:inset 0 -2px 0 var(--chalk);}
.bar-chart{position:relative; height:230px; margin-top:6px;} .bar-chart svg{width:100%; height:100%; overflow:visible;}
.bar-chart .grid{stroke:var(--border); stroke-width:1;} .bar-chart .axis{fill:var(--text-muted); font-size:11px;}
.bar-chart .bar{fill:var(--chalk); opacity:.72;} .bar-chart .bar.current{opacity:1;}
.bar-chart .hit{fill:transparent; cursor:pointer; outline:none;} .bar-chart .hit.on{fill:var(--text); fill-opacity:.04;}
.chart-tip{position:absolute; pointer-events:none; background:var(--accent-bg); color:var(--accent-text); padding:6px 10px; border-radius:6px; font-size:12.5px; min-width:120px; box-shadow:var(--shadow);}
.chart-tip b{display:block; font-size:11px; opacity:.8; font-weight:500;} .chart-tip span{font-size:15px; font-weight:700;}
.attention ul{list-style:none; padding:0; margin:0;} .attention li a{display:flex; flex-direction:column; padding:8px 10px; border-left:3px solid var(--border); margin-bottom:6px; background:var(--bg); border-radius:0 4px 4px 0; color:var(--text); font-size:13px;}
.attention li a span{color:var(--text-muted); font-size:12px;}
.attention .att-bad a{border-color:var(--bad);} .attention .att-warn a{border-color:var(--warn);} .attention .att-info a{border-color:var(--chalk);}
.lib-mini{display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; padding-top:10px; border-top:1px solid var(--border); font-size:12.5px; color:var(--text-muted);} .lib-mini b{color:var(--text);}
.board-wrap{scroll-margin-top:90px;}
.board-toolbar{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:4px;}
.board-toolbar h3{margin:0 8px 0 0;} .board-toolbar input[type=search]{max-width:260px;} .board-toolbar select{width:auto;}
.chk{display:inline-flex; gap:6px; align-items:center; margin:0; font-size:13px; color:var(--text);} .chk input{width:auto;}
.board{display:grid; grid-auto-flow:column; grid-auto-columns:minmax(230px, 1fr); gap:10px; overflow-x:auto; padding-bottom:10px; align-items:start;}
.col{background:var(--bg-alt); border-radius:8px; padding:8px; min-height:120px; transition:box-shadow .15s;}
.col.over{box-shadow:inset 0 0 0 2px var(--chalk);}
.col-head{display:flex; justify-content:space-between; align-items:center; padding:4px 6px 8px; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted);}
.col-head b{background:var(--surface); border-radius:10px; padding:1px 8px; color:var(--text);}
.col-body{display:flex; flex-direction:column; gap:8px; min-height:60px;}
.ocard{background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:10px; cursor:grab; box-shadow:var(--shadow); font-size:13px;}
.ocard:active{cursor:grabbing;} .ocard.dragging{opacity:.4;} .ocard.saving{opacity:.6; pointer-events:none;}
.oc-title{font-weight:600; color:var(--text); display:block; line-height:1.3;} .oc-client{color:var(--text-muted); font-size:12px; margin-top:3px;}
.oc-meta{display:flex; flex-wrap:wrap; gap:4px; margin-top:8px;}
.list-view table{display:table;} td.num{text-align:right;}
table.sortable th[data-sort]{cursor:pointer; user-select:none;} table.sortable th[aria-sort=ascending]::after{content:" ▲";} table.sortable th[aria-sort=descending]::after{content:" ▼";}
.order-cards{display:grid; grid-template-columns:repeat(auto-fill, minmax(280px,1fr)); gap:12px;}
.order-card{background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:16px; display:flex; flex-direction:column; gap:8px; box-shadow:var(--shadow);}
.order-card.is-done{opacity:.72;} .order-card h3{margin:0; font-size:16px; line-height:1.3;} .order-card h3 a{color:var(--text);}
.oc-top{display:flex; justify-content:space-between; align-items:center;}
.progress{height:6px; background:var(--border); border-radius:3px; overflow:hidden;} .progress span{display:block; height:100%; background:var(--ok); border-radius:3px;}
.oc-money{display:flex; justify-content:space-between; align-items:baseline; font-weight:600;}
.oc-actions{display:flex; gap:6px; flex-wrap:wrap; margin-top:auto;} .oc-actions .btn{margin:0;}
.empty-state{text-align:center; padding:34px 20px;}
.upload-public{max-width:560px; margin:30px auto;}

/* ---- pattern tools */
.sketch-strip{display:flex; gap:10px; overflow-x:auto; margin:10px 0;}
.sketch-strip img{height:150px; width:auto; border:1px solid var(--border); border-radius:6px; background:#fff;}
.tool-row{display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; align-items:flex-start; margin:8px 0;}
.tool-row details{flex:1; min-width:260px;} .tool-row .btn-row a{font-size:13px;}
.compare-form{gap:6px;} .compare-form select{width:auto; max-width:260px;} .compare-form > div{min-width:0;}
.audit{border:1px solid var(--border); border-radius:6px; padding:8px 12px; margin:10px 0; font-size:13.5px; background:var(--surface);}
.audit.ok{border-color:var(--ok); color:var(--ok); background:var(--ok-bg);}
.audit.has-issues{border-color:var(--warn);} .audit summary{cursor:pointer; font-weight:600;}
.audit ul{margin:8px 0 2px; padding-left:4px; list-style:none;} .audit li{margin:4px 0;}
.audit .a-bad{color:var(--bad);} .audit .a-info{color:var(--text-muted);}
.grade-table td.irregular{background:var(--warn-bg); color:var(--warn); font-weight:700;}
.grade-table td, .grade-table th{padding:5px 8px; font-size:12.5px;}
.cmp-matrix td, .cmp-matrix th{padding:6px 8px; font-size:12.5px;} .cmp-matrix td small{display:block; font-weight:700;}
.cmp-matrix td.chg{background:var(--warn-bg);} .cmp-matrix tr.row-same td:first-child{color:var(--text-muted);}
.gallery{display:flex; flex-wrap:wrap; gap:10px; margin:6px 0 14px;}
.gallery figure{margin:0; width:150px; border:1px solid var(--border); border-radius:6px; overflow:hidden; background:var(--surface);}
.gallery figure.is-cover{border-color:var(--ok); box-shadow:0 0 0 2px var(--ok-bg);}
.gallery img{width:100%; height:120px; object-fit:contain; background:#fff; display:block;}
.gallery figcaption{padding:6px; text-align:center;} .gallery form{max-width:none; margin:0;}
.thumb-cell{width:58px;} .thumb-cell img{width:48px; height:48px; object-fit:cover; border-radius:4px; border:1px solid var(--border); background:#fff; display:block;}
.thumb-ph{width:48px; height:48px; display:grid; place-items:center; border-radius:4px; background:var(--bg-alt); color:var(--text-muted); font-weight:700; font-size:13px;}
.match-thumb{width:76px; height:76px; object-fit:cover; border-radius:8px; border:1px solid var(--border); background:#fff; flex:none;}
@media (max-width:640px){
  .msg{max-width:92%;} .kpi b{font-size:22px;} .board{grid-auto-columns:82%;}
  .board-toolbar input[type=search]{max-width:none; flex:1;}
  .order-hero{padding:16px;} .oh-top h2{font-size:19px;}
}
/* mobile overflow fixes (v7) */
.order-layout > *{min-width:0;}
@media (max-width:980px){ .order-layout{grid-template-columns:minmax(0,1fr);} }
.tool-row details{flex:1 1 260px; min-width:0; max-width:100%;}
.match-card{min-width:0;}
@media (max-width:760px){ table.cmp{display:block; overflow-x:auto;} }

/* ============================================================
   v7.2 — app shell: header, avatar menu, bottom nav, mobile polish
   ============================================================ */
:root{ --radius:12px; --radius-sm:8px; --hdr-h:60px; --bn-h:62px; }
body{font-family:'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; -webkit-font-smoothing:antialiased; line-height:1.5;}
h1, h2, h3{letter-spacing:-.01em; line-height:1.25;}
h2{font-size:26px; font-weight:700;}
code, .mono{font-family:'IBM Plex Mono', ui-monospace, monospace;}

/* ---- header */
.app-header{
  height:var(--hdr-h); padding:0 24px; flex-wrap:nowrap; gap:16px;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter:saturate(1.4) blur(10px); backdrop-filter:saturate(1.4) blur(10px);
}
.brand{display:inline-flex; align-items:center; gap:9px; font-size:19px; font-weight:700; color:var(--text); flex:none;}
.brand-mark{width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:var(--thread); color:#fff; box-shadow:0 2px 6px rgba(178,58,46,.35);}
.brand-text em{font-style:normal; color:var(--thread);}
.app-header .app-nav{display:flex; align-items:center; gap:2px; flex:1; margin-left:12px; order:0;}
.app-header .app-nav a{margin:0; padding:7px 12px; border-radius:var(--radius-sm); font-size:14px; font-weight:500; color:var(--text-muted); display:inline-flex; align-items:center; gap:6px; white-space:nowrap;}
.app-header .app-nav a:hover{color:var(--text); background:var(--bg-alt);}
.app-header .app-nav a.is-active{color:var(--text); background:var(--bg-alt); font-weight:600;}
.app-header .header-right{gap:8px; flex-wrap:nowrap; margin-left:auto;}
.hdr-icon{position:relative; width:38px; height:38px; margin:0; padding:0; border-radius:10px; display:inline-grid; place-items:center;
  border:1px solid var(--border); background:var(--surface); color:var(--text); cursor:pointer; order:0;}
.hdr-icon:hover{border-color:var(--text-muted);}
.hdr-icon .icon-sun, .hdr-icon .icon-moon{line-height:0;}
.dot-badge{position:absolute; top:-5px; right:-6px; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--thread); color:#fff;
  font-size:10.5px; font-weight:700; line-height:18px; text-align:center; border:2px solid var(--bg);}
.hdr-link{font-size:14px; font-weight:500; color:var(--text); padding:0 6px;}
.hdr-cta{margin:0; border-radius:var(--radius-sm);}

/* avatar menu */
.user-menu{position:relative;}
.user-menu summary{list-style:none; cursor:pointer; border-radius:50%;}
.user-menu summary::-webkit-details-marker{display:none;}
.user-menu summary:focus-visible{outline:2px solid var(--chalk); outline-offset:2px;}
.avatar-sm{width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:var(--accent-bg); color:var(--accent-text); font-weight:700; font-size:13.5px; letter-spacing:.02em;}
.avatar-sm.lg{width:42px; height:42px; flex:none;}
.um-panel{position:absolute; right:0; top:calc(100% + 10px); width:270px; max-width:calc(100vw - 24px); background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:0 12px 32px rgba(0,0,0,.14); padding:6px; z-index:60; animation:um-in .14s ease-out;}
@keyframes um-in{from{opacity:0; transform:translateY(-4px);} to{opacity:1; transform:none;}}
.um-head{display:flex; gap:10px; align-items:center; padding:10px 10px 12px; border-bottom:1px solid var(--border); margin-bottom:4px;}
.um-head b{display:block; font-size:14.5px;} .um-head small{display:block; color:var(--text-muted); font-size:12px; word-break:break-all;}
.um-panel a, .um-logout{display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border-radius:var(--radius-sm); color:var(--text); font-size:14px; margin:0;}
.um-panel a:hover, .um-logout:hover{background:var(--bg-alt);}
.um-panel form{max-width:none; margin:4px 0 0; border-top:1px solid var(--border); padding-top:4px;}
.um-logout{background:none; border:0; cursor:pointer; font:inherit; text-align:left; color:var(--thread);}

/* bottom nav (phones) */
.bottom-nav{display:none;}

/* ---- general polish */
.card, .stat, .kpi, .match-card, .order-card, .inbox, .audit{border-radius:var(--radius);}
.card, .stat{box-shadow:var(--shadow);}
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=search], input[type=number], textarea, select{
  border-radius:var(--radius-sm); border-color:color-mix(in srgb, var(--text-muted) 28%, transparent); min-height:42px;}
input:focus, textarea:focus, select:focus{outline:none; border-color:var(--chalk); box-shadow:0 0 0 3px var(--info-bg);}
button, .btn{border-radius:var(--radius-sm); font-weight:600;}
.stat b{font-size:26px; line-height:1.15; font-variant-numeric:tabular-nums;}
.stat span{font-size:11.5px;}
.tabs{gap:2px; margin:4px 0 20px;}
.tabs a{font-weight:500;}
.page-head{margin-bottom:14px;}
.app-footer{display:flex; justify-content:center; gap:14px; flex-wrap:wrap; padding:22px 16px 28px; font-size:12.5px; color:var(--text-muted); border-top:1px solid var(--border);}

@media (max-width:1060px){ .app-header .app-nav a{padding:7px 9px;} }
/* tablet: nav moves to the bottom bar */
@media (max-width:900px){
  .app-header .app-nav{display:none;}
  .app-header{padding:0 14px; --hdr-h:56px;}
  .app-header .nav-toggle{display:none;}
  body.has-bottom-nav{padding-bottom:calc(var(--bn-h) + env(safe-area-inset-bottom));}
  .bottom-nav{
    display:grid; grid-auto-flow:column; grid-auto-columns:1fr; position:fixed; left:0; right:0; bottom:0; z-index:55;
    height:calc(var(--bn-h) + env(safe-area-inset-bottom)); padding:0 4px env(safe-area-inset-bottom);
    background:color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
    border-top:1px solid var(--border); box-shadow:0 -4px 18px rgba(0,0,0,.05);
  }
  .bottom-nav a{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--text-muted); font-size:11px; font-weight:500; position:relative;}
  .bottom-nav a.is-active{color:var(--thread); font-weight:600;}
  .bottom-nav a.is-active::before{content:""; position:absolute; top:0; left:28%; right:28%; height:3px; border-radius:0 0 3px 3px; background:var(--thread);}
  .bn-ic{position:relative; line-height:0;}
  .bottom-nav .dot-badge{top:-6px; right:-10px; border-color:var(--surface);}
  .bottom-nav a.is-cta .bn-ic{width:40px; height:30px; border-radius:15px; display:grid; place-items:center; background:var(--thread); color:#fff;}
  .toast{bottom:calc(var(--bn-h) + 16px + env(safe-area-inset-bottom));}
}
/* phones */
@media (max-width:640px){
  .container, .container.wide{padding:18px 14px 24px;}
  h2, .page-head h2, .dash-head h2{font-size:22px;}
  h3{font-size:17px;}
  .brand{font-size:18px;} .brand-mark{width:28px; height:28px;}
  .hdr-icon, .avatar-sm{width:36px; height:36px;}
  .app-header .header-right{gap:6px;}

  /* section tabs become a scrollable pill row */
  .tabs{flex-wrap:nowrap; overflow-x:auto; border-bottom:0; gap:6px; margin:0 -14px 16px; padding:2px 14px 4px; scrollbar-width:none; -webkit-overflow-scrolling:touch;}
  .tabs::-webkit-scrollbar{display:none;}
  .tabs a{flex:none; padding:7px 14px; border:1px solid var(--border); border-radius:999px; background:var(--surface); font-size:13.5px; white-space:nowrap;}
  .tabs a.active{background:var(--accent-bg); color:var(--accent-text); border-color:var(--accent-bg);}

  /* page head: title then a tidy action row */
  .page-head{flex-direction:column; align-items:stretch; gap:10px;}
  .page-head .btn-row{display:grid; grid-template-columns:repeat(auto-fit, minmax(0,1fr)); gap:8px;}
  .page-head .btn-row .btn, .page-head .btn-row button{text-align:center; padding:10px 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

  /* compact 2-up stat tiles */
  .stats, .kpis{grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; margin:12px 0;}
  .stat, .kpi{padding:12px;}
  .stat b, .kpi b{font-size:22px;}
  .stat span, .kpi span{font-size:10.5px; line-height:1.3; display:block;}

  /* filter cards: search full width, selects side by side */
  .inline-form.card{display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px;}
  .inline-form.card > div{min-width:0;}
  .inline-form.card > div:first-child{grid-column:1 / -1;}
  .inline-form.card > button{grid-column:1 / -1; width:100%;}
  .inline-form.card label{margin:0 0 4px;}

  .card{padding:16px;}
  table th, table td{padding:9px 10px;}
}
@media (max-width:900px){
  .page-head .btn-row{display:grid; grid-template-columns:1fr 1fr; gap:8px; width:100%;}
  .page-head .btn-row > :first-child:nth-last-child(n+3){grid-column:1 / -1;}
  .page-head .btn-row .btn{text-align:center;}
}
@media (max-width:640px){
  /* dashboard quick links: one swipeable row */
  .quick-links{flex-wrap:nowrap; overflow-x:auto; margin:0 -14px; padding:2px 14px 6px; scrollbar-width:none;}
  .quick-links::-webkit-scrollbar{display:none;}
  .ql{flex:none;}

  /* library list -> cards */
  table.lib-table{display:block; margin-top:12px;}
  table.lib-table tbody{display:flex; flex-direction:column; gap:10px;}
  table.lib-table tr.lib-head{display:none;}
  table.lib-table tr.lib-row{display:grid; grid-template-columns:56px minmax(0,1fr); column-gap:12px; row-gap:2px; align-items:start;
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:12px; box-shadow:var(--shadow);}
  table.lib-table td{display:block; padding:0; border:0;}
  table.lib-table .thumb-cell{grid-row:1 / span 2; grid-column:1; width:56px;}
  table.lib-table .thumb-cell img, table.lib-table .thumb-ph{width:56px; height:56px; border-radius:10px;}
  table.lib-table .lib-code{grid-row:1; grid-column:2; font-size:12px;}
  table.lib-table .lib-title{grid-row:2; grid-column:2; font-weight:600; line-height:1.35;}
  table.lib-table .lib-title a{color:var(--text);}
  table.lib-table .lib-cat, table.lib-table .lib-used, table.lib-table .lib-upd{display:none;}
  table.lib-table .lib-sizes{grid-row:3; grid-column:1 / -1; margin-top:10px; padding-top:10px; border-top:1px dashed var(--border);}
  table.lib-table .lib-poms{grid-row:4; grid-column:1 / -1; justify-self:start; font-size:12.5px;}
  table.lib-table .lib-pat{grid-row:4; grid-column:1 / -1; justify-self:end;}
  table.lib-table td[data-l]::before{content:attr(data-l) ": "; color:var(--text-muted); font-weight:500;}
}
}

/* ============================================================
   v7.3 — client experience
   ============================================================ */
/* status colours (tinted pills) */
.status-pill{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; letter-spacing:.03em; padding:4px 10px; border-radius:999px; border:0; background:var(--bg-alt); color:var(--text-muted);}
.status-pill::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor;}
.status-pill.requested{background:var(--info-bg); color:var(--info);}
.status-pill.under_review{background:#efe7f7; color:#6b4a94;}
.status-pill.deal_finalized{background:var(--warn-bg); color:var(--warn);}
.status-pill.in_progress{background:#e2edf6; color:#2b5d86;}
.status-pill.ready{background:#fbe9de; color:#b4561d;}
.status-pill.delivered, .status-pill.closed{background:var(--ok-bg); color:var(--ok);}
.status-pill.cancelled{background:var(--bad-bg); color:var(--bad);}
:root[data-theme="dark"] .status-pill.under_review{background:#2e2538; color:#c7a8ec;}
:root[data-theme="dark"] .status-pill.in_progress{background:#1f2f3d; color:#8ec0ea;}
:root[data-theme="dark"] .status-pill.ready{background:#3a271b; color:#f0a36f;}

/* segment progress (cards + phone journey) */
.jm-bar{display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:4px;}
.jm-bar span{height:6px; border-radius:3px; background:var(--border);}
.jm-bar span.done{background:var(--ok);}
.jm-bar span.current{background:linear-gradient(90deg, var(--ok) 0 50%, var(--border) 50%); box-shadow:0 0 0 2px var(--ok-bg);}
.journey-mini{display:none; margin:16px 0 4px;}
.journey-mini .jm-text{margin-top:8px; font-size:13.5px;} .journey-mini .jm-text span{color:var(--text-muted);}
.journey-mini.is-cancelled{opacity:.5;}

/* hero */
.client-hero{position:relative; overflow:hidden; display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap;
  padding:28px 30px; border-radius:18px; margin-bottom:22px; color:#F5F2E9;
  background:radial-gradient(120% 140% at 100% 0%, rgba(178,58,46,.55) 0%, rgba(178,58,46,0) 55%), linear-gradient(135deg, #2A2924 0%, #3a3328 100%);
  box-shadow:0 10px 30px rgba(42,41,36,.18);}
.client-hero::after{content:""; position:absolute; right:-40px; bottom:-60px; width:260px; height:260px; border-radius:50%;
  border:2px dashed rgba(245,242,233,.12); pointer-events:none;}
.ch-text{max-width:560px; position:relative; z-index:1;}
.ch-kicker{font-size:13.5px; opacity:.8;}
.client-hero h2{margin:6px 0 8px; font-size:28px; color:#fff;}
.client-hero p{margin:0; opacity:.82; font-size:14.5px; line-height:1.55;}
.ch-actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:18px;}
.ch-actions .btn{margin:0; display:inline-flex; align-items:center; gap:8px; padding:11px 18px;}
.ch-cta{background:var(--thread); border-color:var(--thread); color:#fff;}
.ch-cta:hover{filter:brightness(1.08);}
.ch-ghost{background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.25); color:#fff;}
.ch-stats{display:flex; gap:10px; position:relative; z-index:1;}
.ch-stats div{min-width:92px; padding:12px 14px; border-radius:12px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12); text-align:center;}
.ch-stats b{display:block; font-size:26px; line-height:1.1; color:#fff; font-variant-numeric:tabular-nums;}
.ch-stats span{font-size:11.5px; opacity:.75; text-transform:uppercase; letter-spacing:.05em;}
.ch-stats .hl{background:rgba(224,176,74,.18); border-color:rgba(224,176,74,.5);} .ch-stats .hl b{color:#f3c86a;}

.sec-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; margin:26px 0 12px;}
.sec-head h3{margin:0; font-size:18px;}

/* order cards */
.ocards{display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:14px;}
.ocard-c{position:relative; display:flex; flex-direction:column; gap:12px; padding:18px; background:var(--surface); border:1px solid var(--border);
  border-radius:16px; box-shadow:var(--shadow); transition:transform .15s ease, box-shadow .15s ease, border-color .15s;}
.ocard-c:hover{transform:translateY(-2px); box-shadow:0 10px 26px rgba(42,41,36,.10); border-color:color-mix(in srgb, var(--text-muted) 35%, transparent);}
.ocard-c.needs-action{border-color:color-mix(in srgb, var(--thread) 45%, transparent);}
.ocard-c.is-done{opacity:.8;}
.occ-link{position:absolute; inset:0; z-index:0; border-radius:inherit;}
.ocard-c > *:not(.occ-link){position:relative; z-index:1;} .ocard-c .occ-top, .ocard-c .occ-status, .ocard-c .occ-steps, .ocard-c .occ-money{pointer-events:none;}
.occ-top{display:flex; gap:12px; align-items:flex-start;}
.occ-ic{width:44px; height:44px; flex:none; border-radius:12px; display:grid; place-items:center; background:var(--bg-alt); color:var(--text);}
.occ-ic.st-in_progress, .occ-ic.st-ready{background:#e2edf6; color:#2b5d86;} .occ-ic.st-closed, .occ-ic.st-delivered{background:var(--ok-bg); color:var(--ok);}
.occ-ic.st-deal_finalized{background:var(--warn-bg); color:var(--warn);}
:root[data-theme="dark"] .occ-ic.st-in_progress, :root[data-theme="dark"] .occ-ic.st-ready{background:#1f2f3d; color:#8ec0ea;}
.occ-id{flex:1; min-width:0;} .occ-id h3{margin:2px 0 0; font-size:16.5px; line-height:1.3;}
.occ-top .count-badge{flex:none;}
.occ-status{display:flex; gap:6px; flex-wrap:wrap; align-items:center;}
.occ-steps{display:flex; flex-direction:column; gap:6px;}
.occ-money{display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:10px 12px; border-radius:10px; background:var(--bg);}
.occ-money span{display:block; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted);}
.occ-money b{font-size:16px; font-variant-numeric:tabular-nums;} .occ-money b.due{color:var(--thread);} .occ-money b.paid{color:var(--ok);}
.occ-next{display:flex; align-items:center; gap:8px; padding:11px 14px; border-radius:10px; border:1px solid var(--border); color:var(--text); font-size:14px; margin-top:auto;}
.occ-next span{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted);}
.occ-next b{flex:1; font-weight:600;}
.occ-next:hover{border-color:var(--text-muted);}
.occ-next.is-primary{background:var(--thread); border-color:var(--thread); color:#fff;}
.occ-next.is-primary span{color:rgba(255,255,255,.8);}
.done-orders{margin-top:22px;} .done-orders summary{cursor:pointer; list-style:none; margin-bottom:12px;}
.done-orders summary::-webkit-details-marker{display:none;}
.done-orders summary h3{display:inline-flex; gap:6px; align-items:center; margin:0; font-size:18px;}
.done-orders summary h3::after{content:"▾"; font-size:13px; color:var(--text-muted); transition:transform .15s;}
.done-orders:not([open]) summary h3::after{transform:rotate(-90deg);}
.empty-state.slim{padding:18px; text-align:left;}

/* services */
.svc-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(210px,1fr)); gap:12px;}
.svc-card{display:flex; flex-direction:column; gap:4px; padding:16px; border-radius:14px; background:var(--surface); border:1px solid var(--border); color:var(--text); box-shadow:var(--shadow); transition:border-color .15s, transform .15s;}
.svc-card:hover{border-color:var(--thread); transform:translateY(-2px);}
.svc-ic{width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:color-mix(in srgb, var(--thread) 12%, transparent); color:var(--thread); margin-bottom:6px;}
.svc-name{font-weight:600; font-size:14.5px;}
.svc-price{font-size:18px; font-weight:700; color:var(--text);} .svc-price small{font-size:12px; font-weight:500; color:var(--text-muted);}
.svc-meta{display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--text-muted);}

/* how it works */
.how-steps h3{margin-top:0;}
.how-steps ol{list-style:none; padding:0; margin:6px 0 18px; display:grid; grid-template-columns:repeat(auto-fit, minmax(190px,1fr)); gap:14px; counter-reset:hs;}
.how-steps li{display:flex; flex-direction:column; gap:4px; padding:14px; border-radius:12px; background:var(--bg); position:relative; counter-increment:hs;}
.how-steps li::after{content:counter(hs); position:absolute; top:12px; right:14px; font-weight:700; color:var(--border); font-size:22px;}
.how-steps li span{width:36px; height:36px; border-radius:10px; display:grid; place-items:center; background:var(--surface); color:var(--thread); margin-bottom:4px;}
.how-steps li small{color:var(--text-muted); font-size:12.5px; line-height:1.45;}

@media (max-width:640px){
  .client-hero{padding:22px 18px; border-radius:16px; margin:0 0 18px;}
  .client-hero h2{font-size:22px;}
  .ch-stats{width:100%;} .ch-stats div{flex:1; min-width:0; padding:10px 6px;}
  .ch-stats b{font-size:22px;}
  .ch-actions .btn{flex:1; justify-content:center;}
  .ocards{grid-template-columns:minmax(0,1fr);}
  .ocard-c{padding:16px; border-radius:14px;}
  .svc-grid{grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px;}
  .svc-card{padding:14px;} .svc-price{font-size:16px;}
  .journey{display:none;} .journey-mini{display:block;}
}

/* ---- shared bits */
.back-link{display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:500; color:var(--text-muted); margin:0 0 12px;}
.back-link span{display:inline-grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--surface); border:1px solid var(--border);}
.back-link:hover{color:var(--text);}
.card-title{display:flex; gap:12px; align-items:flex-start; margin-bottom:12px;}
.card-title h3{margin:0 0 2px; font-size:17px;}
.ct-ic{width:38px; height:38px; flex:none; border-radius:10px; display:grid; place-items:center; background:var(--bg-alt);}
.ct-ic.warn{background:var(--warn-bg); color:var(--warn);} .ct-ic.ok{background:var(--ok-bg); color:var(--ok);}
.btn-block{width:100%; padding:12px; font-size:15px;}
.btn-lg{display:inline-flex; align-items:center; gap:8px; padding:13px 26px; font-size:15px; margin:0; background:var(--thread); border-color:var(--thread); color:#fff;}
.btn-lg:hover{filter:brightness(1.08);}
.note{border-radius:0 8px 8px 0;}
.info-note{background:var(--info-bg); color:var(--info); border-left-color:var(--info);}

/* ---- client order page */
.ohc{padding:22px 24px; border-radius:16px; border-top:4px solid var(--border);}
.ohc.st-requested{border-top-color:var(--info);} .ohc.st-under_review{border-top-color:#8b67b8;} .ohc.st-deal_finalized{border-top-color:var(--warn);}
.ohc.st-in_progress{border-top-color:#2b5d86;} .ohc.st-ready{border-top-color:#d06a28;} .ohc.st-delivered, .ohc.st-closed{border-top-color:var(--ok);} .ohc.st-cancelled{border-top-color:var(--bad);}
.oh-title{display:flex; gap:14px; align-items:flex-start; min-width:0; flex:1;}
.oh-title .occ-ic{width:50px; height:50px; border-radius:14px;}
.oh-title h2{margin:2px 0 8px; font-size:23px;}
.oh-cta{margin:0; padding:11px 20px; background:var(--thread); border-color:var(--thread); color:#fff;}
.oh-cta.secondary{background:transparent; color:var(--text); border-color:var(--text);}
.oh-facts.tiles{grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:10px; border-top:0; padding-top:0; margin-top:18px;}
.oh-facts.tiles > div{padding:12px 14px; border-radius:12px; background:var(--bg);}
.oh-facts.tiles span{display:flex; align-items:center; gap:6px; margin-bottom:4px;}
.oh-facts.tiles b{font-size:16px; font-variant-numeric:tabular-nums;}
.oh-facts.tiles .is-due{background:color-mix(in srgb, var(--thread) 10%, transparent);} .oh-facts.tiles .is-due b{color:var(--thread);}
.pay-card{border:1.5px solid color-mix(in srgb, var(--warn) 55%, transparent); border-radius:16px;}
.pay-amount{display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding:12px 14px; border-radius:12px; background:var(--bg);}
.pay-amount b{font-size:24px; font-variant-numeric:tabular-nums;}
.pay-method{border-radius:12px; padding:14px; background:var(--surface);}
.delivery-card{border:1.5px solid color-mix(in srgb, var(--ok) 50%, transparent); border-radius:16px;}
.file-list li{display:grid; grid-template-columns:30px minmax(0,1fr) auto; column-gap:8px; row-gap:0; align-items:center; padding:9px 0;}
.file-list .fl-ic{grid-row:1 / span 2; width:30px; height:30px; border-radius:8px; display:grid; place-items:center; background:var(--bg-alt); color:var(--text-muted);}
.file-list .file-kind{grid-column:2; width:auto;} .file-list li > a, .file-list li > span:not(.fl-ic):not(.file-kind){grid-column:2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.file-list li > form{grid-column:3; grid-row:1 / span 2;}
.file-list li.is-locked .fl-ic{background:var(--warn-bg); color:var(--warn);}
.drop-mini{display:flex; align-items:center; gap:10px; margin:0; padding:12px; border:1.5px dashed color-mix(in srgb, var(--text-muted) 40%, transparent); border-radius:12px; cursor:pointer; color:var(--text-muted); font-size:13.5px;}
.drop-mini input{display:none;} .drop-mini.has-files, .dropzone-big.has-files{border-color:var(--ok); color:var(--ok);}
.drop-mini:hover{border-color:var(--chalk); color:var(--text);}

/* ---- new request */
.nr-head h2{margin:0 0 6px;} .nr-head p{margin:0 0 14px; max-width:620px;}
.nr-steps{display:flex; gap:8px; list-style:none; padding:0; margin:0 0 20px; flex-wrap:wrap;}
.nr-steps li{display:inline-flex; align-items:center; gap:7px; padding:6px 12px 6px 6px; border-radius:999px; background:var(--surface); border:1px solid var(--border); font-size:13px; color:var(--text-muted);}
.nr-steps li b{width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:var(--bg-alt); font-size:12px;}
.nr-steps li.on{color:var(--text); border-color:var(--text-muted);} .nr-steps li.on b{background:var(--thread); color:#fff;}
.nr-layout{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:22px; align-items:start;}
.nr-sec{background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px; margin-bottom:14px; box-shadow:var(--shadow);}
.nr-sec h3{display:flex; align-items:center; gap:10px; margin:0 0 14px; font-size:17px;}
.nr-n{width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--accent-bg); color:var(--accent-text); font-size:13px;}
.pick-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:10px;}
.pick{position:relative; display:flex; gap:12px; align-items:flex-start; margin:0; padding:14px; border-radius:12px; border:1.5px solid var(--border); background:var(--bg); cursor:pointer; color:var(--text); font-size:14px; transition:border-color .15s, background .15s;}
.pick:hover{border-color:var(--text-muted);}
.pick input{position:absolute; opacity:0; pointer-events:none;}
.pick-ic{width:40px; height:40px; flex:none; border-radius:11px; display:grid; place-items:center; background:var(--surface); color:var(--thread);}
.pick-body{display:flex; flex-direction:column; gap:2px; min-width:0;}
.pick-name{font-weight:600;} .pick-price{font-weight:700; font-size:15px;} .pick-price small{font-weight:500; color:var(--text-muted); font-size:11.5px;}
.pick-meta{font-size:12px; color:var(--text-muted);}
.pick-desc{font-size:12.5px; color:var(--text-muted); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:2px;}
.pick-check{position:absolute; top:10px; right:10px; width:20px; height:20px; border-radius:50%; border:1.5px solid var(--border); display:grid; place-items:center; color:transparent; background:var(--surface);}
.pick:has(input:checked){border-color:var(--thread); background:color-mix(in srgb, var(--thread) 6%, var(--surface));}
.pick:has(input:checked) .pick-check{background:var(--thread); border-color:var(--thread); color:#fff;}
.pick:has(input:focus-visible){box-shadow:0 0 0 3px var(--info-bg);}
.hint-chips{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;}
.hchip{margin:0; padding:5px 10px; font-size:12px; font-weight:500; border-radius:999px; background:var(--bg); color:var(--text-muted); border:1px solid var(--border);}
.hchip:hover{color:var(--text); border-color:var(--text-muted);}
.dropzone-big{display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; margin:0; padding:26px 16px; border:2px dashed color-mix(in srgb, var(--text-muted) 40%, transparent); border-radius:14px; background:var(--bg); cursor:pointer; color:var(--text);}
.dropzone-big input{position:absolute; width:1px; height:1px; opacity:0;}
.dropzone-big.drag, .dropzone-big:hover{border-color:var(--chalk); background:var(--info-bg);}
.dz-ic{width:48px; height:48px; border-radius:50%; display:grid; place-items:center; background:var(--surface); color:var(--chalk);}
.nr-submit{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:6px;}
.nr-aside{position:sticky; top:calc(var(--hdr-h) + 16px);}
.nr-aside h3{margin-top:0; font-size:16px;}
.mini-timeline{list-style:none; padding:0; margin:0; counter-reset:mt;}
.mini-timeline li{position:relative; padding:0 0 14px 34px; counter-increment:mt; display:flex; flex-direction:column; gap:2px;}
.mini-timeline li::before{content:counter(mt); position:absolute; left:0; top:0; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:var(--bg-alt); font-size:12px; font-weight:700;}
.mini-timeline li::after{content:""; position:absolute; left:10.5px; top:24px; bottom:2px; width:1px; background:var(--border);}
.mini-timeline li:last-child::after{display:none;} .mini-timeline li:last-child{padding-bottom:0;}
.mini-timeline b{font-size:14px;} .mini-timeline span{font-size:12.5px; color:var(--text-muted); line-height:1.4;}
.trust p{display:flex; gap:8px; align-items:center; margin:0 0 8px; font-size:13px; color:var(--text-muted);} .trust p:last-child{margin:0;}
.trust svg{color:var(--ok); flex:none;}

/* ---- auth */
.auth-wrap{display:grid; grid-template-columns:1fr 1fr; max-width:920px; margin:10px auto 30px; border-radius:20px; overflow:hidden; box-shadow:0 20px 50px rgba(42,41,36,.14); border:1px solid var(--border);}
.auth-side{padding:40px 36px; color:#F5F2E9; display:flex; flex-direction:column; gap:16px;
  background:radial-gradient(120% 120% at 0% 100%, rgba(178,58,46,.5) 0%, rgba(178,58,46,0) 60%), linear-gradient(160deg, #2A2924, #3a3328);}
.auth-side h2{color:#fff; font-size:26px; margin:6px 0 0;}
.auth-side ul{list-style:none; padding:0; margin:auto 0 0; display:flex; flex-direction:column; gap:10px;}
.auth-side li{display:flex; gap:10px; align-items:center; font-size:14px; opacity:.88;}
.brand-mark.lg{width:46px; height:46px; border-radius:13px;}
.auth-card{margin:0; border:0; border-radius:0; box-shadow:none; padding:40px 36px;}
.auth-card h2{margin:0 0 4px;} .auth-card form{margin-top:10px;}
.auth-alt{margin:16px 0 0; font-size:13.5px; text-align:center; color:var(--text-muted);}

@media (max-width:900px){
  .nr-layout{grid-template-columns:minmax(0,1fr);}
  .nr-aside{position:static;}
  .nr-submit{position:sticky; bottom:calc(var(--bn-h) + env(safe-area-inset-bottom) + 8px); z-index:5; background:var(--surface); padding:10px; border-radius:14px; border:1px solid var(--border); box-shadow:0 8px 24px rgba(0,0,0,.12);}
  .nr-submit .btn-lg{flex:1; justify-content:center;}
  .nr-submit .muted{display:none;}
}
@media (max-width:720px){
  .auth-wrap{grid-template-columns:1fr; border-radius:16px; margin-top:0;}
  .auth-side{padding:22px 20px; gap:10px;}
  .auth-side h2{font-size:19px;} .auth-side ul{display:none;}
  .brand-mark.lg{display:none;}
  .auth-card{padding:24px 20px;}
}
@media (max-width:640px){
  .ohc{padding:16px; border-radius:14px;}
  .oh-title .occ-ic{width:42px; height:42px;}
  .oh-title h2{font-size:19px;}
  .oh-cta{width:100%; text-align:center;}
  .oh-facts.tiles{grid-template-columns:1fr 1fr; gap:8px;}
  .oh-facts.tiles > div:last-child:nth-child(odd){grid-column:1 / -1;}
  .oh-facts.tiles > div{padding:10px 12px;} .oh-facts.tiles b{font-size:15px;}
  .nr-sec{padding:16px; border-radius:14px;}
  .pick-grid{grid-template-columns:minmax(0,1fr);}
  .pick{padding:12px;}
  .pay-amount b{font-size:20px;}
  .chat-log{height:min(60vh, 460px);}
}
@media (max-width:640px){
  /* admin order page on phones */
  .order-hero:not(.ohc){padding:16px; border-radius:14px;}
  .oh-facts{grid-template-columns:1fr 1fr; gap:8px 12px;}
  .oh-top > .btn, .oh-top > .btn-row{width:100%;}
  .ol-side .card, .ol-main .card{padding:14px;}
  .chat-head{padding:12px 14px;} .chat-log{padding:12px;}
}

/* ---- profile + notifications (v7.3) */
.back-link span svg{transform:rotate(180deg);}
.pf-hero{display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding:24px; border-radius:18px; margin-bottom:16px; color:#F5F2E9;
  background:radial-gradient(120% 140% at 100% 0%, rgba(178,58,46,.5) 0%, rgba(178,58,46,0) 55%), linear-gradient(135deg, #2A2924, #3a3328);
  box-shadow:0 10px 30px rgba(42,41,36,.16);}
.pf-avatar{width:68px; height:68px; flex:none; border-radius:50%; display:grid; place-items:center; font-size:24px; font-weight:700; color:#fff;
  background:var(--thread); box-shadow:0 0 0 4px rgba(255,255,255,.12);}
.pf-id{flex:1; min-width:200px;} .pf-id h2{margin:0; color:#fff; font-size:24px;}
.pf-id p{margin:2px 0 6px; opacity:.8; font-size:14px; word-break:break-word;}
.pf-role{display:inline-block; font-size:12px; padding:3px 10px; border-radius:999px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.18);}
.pf-stats{display:flex; gap:8px;}
.pf-stats div{min-width:90px; padding:10px 12px; border-radius:12px; text-align:center; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12);}
.pf-stats b{display:block; font-size:19px; color:#fff; font-variant-numeric:tabular-nums;} .pf-stats span{font-size:11px; opacity:.75; text-transform:uppercase; letter-spacing:.04em;}
.pf-grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px;}
.pf-grid .card{margin:0;}
.pf-logout{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-top:16px;}
.pf-logout form{max-width:none; margin:0;}
.btn-danger-ghost{display:inline-flex; align-items:center; gap:8px; margin:0; background:transparent; color:var(--thread); border:1px solid color-mix(in srgb, var(--thread) 55%, transparent);}
.btn-danger-ghost:hover{background:color-mix(in srgb, var(--thread) 8%, transparent);}

.nt-head{align-items:flex-end;}
.nt-seg a{display:inline-block; padding:7px 14px; font-size:13px; color:var(--text-muted);}
.nt-seg a.on{background:var(--surface); color:var(--text); font-weight:600; box-shadow:inset 0 -2px 0 var(--thread);}
.nt-group{margin:18px 0 8px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted);}
.nt-list{display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);}
.nt-row{display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-bottom:1px solid var(--border); color:var(--text); position:relative;}
.nt-row:last-child{border-bottom:0;} .nt-row:hover{background:var(--bg);}
.nt-row.unread{background:color-mix(in srgb, var(--info-bg) 55%, var(--surface));}
.nt-row.unread .nt-msg{font-weight:600;}
.nt-ic{width:38px; height:38px; flex:none; border-radius:11px; display:grid; place-items:center; background:var(--bg-alt); color:var(--text-muted);}
.nt-ic.info{background:var(--info-bg); color:var(--info);} .nt-ic.ok{background:var(--ok-bg); color:var(--ok);}
.nt-ic.warn{background:var(--warn-bg); color:var(--warn);} .nt-ic.bad{background:var(--bad-bg); color:var(--bad);}
.nt-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.nt-msg{font-size:14px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}
.nt-dot{width:9px; height:9px; border-radius:50%; background:var(--thread); flex:none; margin-top:6px;}
.empty-state .es-ic{width:56px; height:56px; border-radius:50%; display:inline-grid; place-items:center; background:var(--bg-alt); color:var(--text-muted); margin-bottom:6px;}
.empty-state h3{margin:6px 0 4px;}

@media (max-width:760px){
  .pf-grid{grid-template-columns:minmax(0,1fr);}
  .pf-hero{padding:20px 18px; gap:14px;}
  .pf-avatar{width:56px; height:56px; font-size:20px;}
  .pf-id h2{font-size:20px;}
  .pf-stats{width:100%;} .pf-stats div{flex:1; min-width:0; padding:9px 6px;}
  .pf-logout{flex-direction:column; align-items:stretch;} .btn-danger-ghost{width:100%; justify-content:center;}
  .nt-head{align-items:stretch;} .nt-head .btn-row{display:flex; justify-content:space-between;}
  .nt-row{padding:12px 14px;}
}
