:root{
  --bg:#f4efe6;
  --surface:#fffdf8;
  --surface-2:#fff9ed;
  --ink:#1a2430;
  --muted:#6a7b89;
  --brand:#13263b;
  --brand-2:#264867;
  --accent:#d2a24d;
  --accent-soft:#f3e4bf;
  --accent-strong:#be892a;
  --border:#e6ddcc;
  --line:#efe6d6;
  --shadow:0 18px 44px rgba(16,28,41,.10);
  --shadow-soft:0 10px 26px rgba(16,28,41,.07);
  --radius-lg:28px;
  --radius-md:20px;
  --radius-sm:14px;
  --focus-ring:0 0 0 4px rgba(210,162,77,.18);
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{
  font-family:"Avenir Next","Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at top right, rgba(210,162,77,.18), transparent 24%),
    linear-gradient(180deg, #f8f3ea 0%, #f2ece3 100%);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility
}
h1,h2,h3{margin:0}
p{margin:0}
button,input,textarea,select{font:inherit}
input:focus,textarea:focus,select:focus,button:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring)
}

.hidden{display:none!important}
.mobile-only{display:none}
.muted{color:var(--muted);font-size:14px}
.card{
  background:var(--surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
  border:1px solid var(--border);
  padding:24px;
  backdrop-filter:blur(4px)
}
.eyebrow{
  margin:0 0 10px;
  color:#8d7347;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:13px;
  font-weight:700
}
.brand-mark{
  width:82px;
  height:82px;
  border-radius:22px;
  object-fit:cover;
  object-position:center;
  display:block;
  background:transparent;
  clip-path:inset(6% 6% 6% 6% round 22px);
  box-shadow:0 10px 24px rgba(0,0,0,.14)
}
.brand-mark.large{
  width:116px;
  height:116px;
  border-radius:30px;
  margin-bottom:18px
}

.auth-shell{
  min-height:100vh;
  padding:44px;
  position:relative;
  display:grid;
  grid-template-columns:minmax(320px,560px) minmax(360px,430px);
  gap:34px;
  align-items:center;
  justify-content:center;
  overflow:hidden
}
.auth-backdrop{
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(19,38,59,.96) 0%, rgba(40,74,107,.86) 60%, rgba(60,99,138,.78) 100%);
  clip-path:ellipse(86% 72% at 20% 18%);
  z-index:0
}
.auth-hero,.login-card{position:relative;z-index:1}
html[data-route-mode="login"] .auth-shell{
  grid-template-columns:minmax(320px,430px);
  justify-content:center
}
html[data-route-mode="login"] .auth-hero{
  display:none
}
html[data-route-mode="login"] .login-card{
  justify-self:center
}
.auth-hero{
  color:#fff7ea;
  padding:28px 12px 28px 28px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:26px;
  align-items:center
}
.auth-copy h1{
  max-width:720px;
  font-family:Georgia,serif;
  font-size:54px;
  line-height:1.04;
  margin-bottom:16px
}
.auth-lead{
  max-width:680px;
  color:#d0dbe4;
  font-size:19px;
  line-height:1.55
}
.login-side-panel{
  max-width:560px
}
.login-security-list{
  display:grid;
  gap:12px;
  margin-top:26px
}
.login-security-list div{
  padding:16px 17px;
  border-radius:20px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,245,227,.14)
}
.login-security-list strong{
  display:block;
  color:#fff8ec;
  margin-bottom:5px
}
.login-security-list span{
  display:block;
  color:#d8e3ec;
  font-size:14px;
  line-height:1.45
}
.auth-badges{
  margin-top:28px;
  display:flex;
  flex-wrap:wrap;
  gap:12px
}
.oval-chip,
.nav-pills button,
button,
.preview-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1;
  white-space:nowrap
}
.oval-chip{
  min-width:126px;
  height:44px;
  padding:0 22px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,245,227,.22);
  color:#fef5e6;
  font-size:15px;
  font-weight:700
}
.auth-preview{
  background:rgba(255,251,241,.98);
  color:var(--ink);
  border-color:rgba(233,215,175,.95)
}
.preview-label{
  display:block;
  color:#8a6c35;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:13px;
  font-weight:700;
  margin-bottom:10px
}
.preview-stat strong{
  display:block;
  font-family:Georgia,serif;
  font-size:44px;
  margin-bottom:8px
}
.preview-stat p{
  color:var(--muted);
  font-size:17px;
  line-height:1.45
}
.preview-actions{
  margin-top:24px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.preview-button{
  min-height:48px;
  border-radius:999px;
  padding:0 18px;
  background:#17324b;
  color:#f4f8fb;
  font-size:15px;
  font-weight:700
}
.preview-button.is-primary{
  background:var(--accent-soft);
  color:#231809
}

.login-card{
  width:min(100%,430px);
  justify-self:end
}
.login-only-shell{
  grid-template-columns:minmax(320px,430px);
  justify-content:center
}
.login-only-card{
  justify-self:center
}
.login-card h2{
  font-family:Georgia,serif;
  font-size:44px;
  margin-bottom:8px
}
.login-title{
  font-family:Georgia,serif;
  font-size:44px;
  line-height:1.08;
  margin:8px 0
}
.login-form{
  display:block
}
.login-copy{
  color:var(--muted);
  font-size:17px;
  line-height:1.5;
  margin-bottom:20px
}
.field-label{
  display:block;
  margin:12px 0 8px;
  color:#4f6272;
  font-size:14px;
  font-weight:700
}
input,textarea,select{
  width:100%;
  min-height:48px;
  padding:13px 16px;
  margin:0 0 10px;
  border:1px solid #d6deea;
  border-radius:16px;
  font-size:15px;
  background:#fff;
  color:var(--ink);
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease
}
textarea{
  min-height:104px;
  resize:vertical
}
input:hover,textarea:hover,select:hover{
  border-color:#cbb892
}
button{
  min-height:48px;
  padding:0 20px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  background:var(--brand-2);
  color:#fff;
  font-size:15px;
  font-weight:700;
  transition:transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease
}
button.secondary{background:#6b7785}
button.ghost-button{
  background:rgba(255,255,255,.12);
  color:#fff;
  border:1px solid rgba(255,255,255,.16)
}
button.primary-action{
  width:100%;
  margin-top:8px;
  background:var(--accent);
  color:#211506
}
button:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(16,28,41,.10)
}
button:disabled{opacity:.6;cursor:not-allowed}
.login-message{
  margin-top:12px;
  min-height:20px
}
.login-message.is-error{
  padding:12px 14px;
  border-radius:14px;
  background:#fff1ed;
  border:1px solid #f2c7b8;
  color:#8c2f1b;
  font-weight:700;
  line-height:1.4
}
.login-links{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:18px;
  font-size:14px
}
.login-links a{
  color:#526575;
  font-weight:700;
  text-decoration:none
}
.login-links a:hover{
  color:var(--brand-2);
  text-decoration:underline
}
.login-powered{
  margin-top:14px;
  color:#7b8792;
  font-size:13px;
  font-weight:700;
  text-align:center
}

.app-shell{padding-bottom:28px}
.topbar{
  padding:26px 28px 18px;
  background:linear-gradient(135deg, #13263b 0%, #264867 100%);
  color:#fff;
  box-shadow:0 20px 40px rgba(19,38,59,.16);
  border-bottom:1px solid rgba(255,255,255,.08)
}
.topbar-row{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start
}
.brand-row{
  display:flex;
  align-items:center;
  gap:16px
}
.brand-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:82px
}
.topbar h1{
  font-family:Georgia,serif;
  font-size:40px;
  line-height:1.05;
  margin:0 0 6px
}
.topbar-eyebrow{color:#f2dfb9;margin-bottom:8px}
.topbar-user{color:#d7e3ec;font-size:15px}
.header-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end
}
.search-shell{
  min-width:340px;
  max-width:460px;
  width:28vw;
  position:relative
}
.search-shell input{
  margin:0;
  background:rgba(255,255,255,.95);
  border-color:rgba(255,255,255,.3);
  padding-right:44px
}
.search-clear{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  min-height:34px;
  width:34px;
  padding:0;
  border-radius:999px;
  background:transparent;
  color:#6d7e8d;
  font-size:24px;
  line-height:1
}
.search-clear:hover{
  background:rgba(19,38,59,.07);
  box-shadow:none;
  transform:translateY(-50%)
}
.nav-pills{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  justify-content:start;
  align-items:center;
  gap:6px;
  margin-top:22px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  white-space:nowrap;
  padding:0 0 4px
}
.nav-pills button{
  min-height:46px;
  min-width:auto;
  padding:0 13px;
  background:#f5e7c7;
  color:#453418;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
  border:1px solid rgba(117,87,36,.08)
}
.nav-pills::-webkit-scrollbar{
  height:8px
}
.nav-pills::-webkit-scrollbar-thumb{
  background:rgba(242,223,185,.45);
  border-radius:999px
}
.nav-pills button[data-min-role]{background:#efe4cc}

.search-results{padding:18px 28px 0}
.search-item{
  width:100%;
  background:#fffdfa;
  border:1px solid var(--border);
  padding:12px 14px;
  border-radius:16px;
  margin:8px 0;
  box-shadow:0 8px 18px rgba(16,28,41,.05);
  text-align:left;
  justify-content:flex-start;
  min-height:48px;
  color:var(--ink);
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease
}
.search-item:hover{
  border-color:#d2a24d;
  transform:translateY(-1px);
  box-shadow:0 14px 24px rgba(16,28,41,.08)
}
main{padding:0 28px 28px}
.section-title{
  margin:8px 0 16px;
  font-family:Georgia,serif;
  font-size:36px;
  color:#172333
}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
.kpi{
  background:var(--surface);
  padding:20px;
  border-radius:22px;
  box-shadow:0 8px 20px rgba(0,0,0,.05);
  border:1px solid var(--border)
}
.kpi h2{
  margin:8px 0 0;
  font-size:34px;
  font-family:Georgia,serif
}
.table-wrap{
  overflow:auto;
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-soft);
  border:1px solid var(--border);
  background:#fffdfa
}
table{
  width:100%;
  border-collapse:collapse;
  background:#fffdfa;
  min-width:680px
}
th,td{
  padding:13px 14px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:14px;
  vertical-align:middle
}
th{
  background:#f7efe0;
  position:sticky;
  top:0;
  z-index:1;
  color:#4d5e6d;
  font-size:12px;
  letter-spacing:.05em;
  text-transform:uppercase
}
tbody tr{
  transition:background-color .14s ease
}
tbody tr:hover{
  background:#fff7e8
}
.table-row-danger{
  background:#fff3ef
}
.table-row-danger:hover{
  background:#ffe9e1
}
.row-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.compact-filter-bar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:rgba(255,253,248,.92)
}
.filter-pill-group{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap
}
.filter-pill{
  min-height:34px;
  padding:0 14px;
  background:#f2ebdd;
  color:#415262;
  border:1px solid #e2d5bc;
  box-shadow:none
}
.filter-pill.is-active{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand)
}
.compact-filter-input{
  width:min(280px,100%);
  min-height:36px;
  margin:0;
  padding:9px 14px;
  border-radius:999px
}
.compact-filter-clear{
  min-height:34px;
  padding:0 14px
}
.space-between{justify-content:space-between}
.create-card h3{
  font-family:Georgia,serif;
  font-size:28px;
  color:#182534
}
.empty-state{
  display:grid;
  place-items:center;
  min-height:130px;
  color:var(--muted);
  text-align:center;
  border-style:dashed;
  background:linear-gradient(180deg,#fffdf8 0%,#fbf4e9 100%)
}
.create-card-body{
  margin-top:18px;
  display:grid;
  grid-template-rows:1fr;
  opacity:1;
  transform:translateY(0);
  transition:opacity .2s ease, transform .2s ease, margin-top .2s ease
}
.create-card-body.hidden{
  display:none!important
}
.table-link{
  background:none;
  border:none;
  color:#264867;
  font-weight:700;
  padding:0;
  min-height:auto;
  justify-content:flex-start;
  border-radius:0;
  box-shadow:none
}
.table-link:hover{
  color:var(--accent-strong);
  transform:none
}
.table-link-danger{
  color:#a13c24
}
.table-alert{
  color:#a13c24;
  font-size:12px
}
.expand-toggle{
  min-width:160px;
  gap:10px;
  background:#f5e7c7;
  color:#453418;
  border:1px solid #ead6ad
}
.expand-toggle.secondary,
.expand-toggle.is-open{
  background:#f0e5cf;
  color:#5a4931
}
.expand-toggle-icon{
  width:18px;
  height:18px;
  border-radius:999px;
  position:relative;
  background:rgba(69,52,24,.08);
  flex:0 0 18px
}
.expand-toggle-icon::before,
.expand-toggle-icon::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:8px;
  height:2px;
  background:currentColor;
  border-radius:999px;
  transform-origin:center
}
.expand-toggle-icon::before{
  transform:translate(-58%, -50%) rotate(45deg)
}
.expand-toggle-icon::after{
  transform:translate(-8%, -50%) rotate(-45deg)
}
.expand-toggle.is-open .expand-toggle-icon::before{
  transform:translate(-58%, -50%) rotate(-45deg)
}
.expand-toggle.is-open .expand-toggle-icon::after{
  transform:translate(-8%, -50%) rotate(45deg)
}
.stock-hint{
  margin:10px 0 4px;
  padding:12px 14px;
  border-radius:14px;
  background:#f8f1df;
  color:#5d4a22;
  font-size:14px
}
.stock-hint.is-warning{
  background:#fff1df;
  color:#8b4f19
}
.detail-card h3{
  font-family:Georgia,serif;
  font-size:30px;
  color:#172534
}
.detail-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px 24px
}
.detail-notes{
  margin-top:16px;
  color:#566775;
  line-height:1.55
}
.detail-actions{
  margin-top:18px
}
.inline-metric{
  color:#546674;
  font-size:15px
}
.tax-summary-card{
  margin:18px 0;
  padding:18px 20px;
  border-radius:20px;
  border:1px solid #e7d8b8;
  background:linear-gradient(180deg, #fffaf0 0%, #fff6e7 100%);
  display:grid;
  gap:12px
}
.tax-summary-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#495b69
}
.tax-summary-row strong{
  color:#172534;
  font-size:18px
}
.tax-summary-row.total{
  padding-top:12px;
  border-top:1px solid #eadfc6
}
.tax-summary-row.total strong{
  font-size:24px;
  font-family:Georgia,serif
}
.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:120;
  background:rgba(15, 27, 40, .52);
  backdrop-filter:blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px
}
.modal-card{
  width:min(760px, 100%);
  max-height:min(88vh, 860px);
  overflow:auto;
  background:linear-gradient(180deg, #fffdf8 0%, #fff8ec 100%);
  border:1px solid #eadfc7;
  border-radius:var(--radius-lg);
  box-shadow:0 24px 70px rgba(15, 27, 40, .24);
  padding:24px
}
.modal-body{
  margin-top:18px
}
.modal-card h3{
  font-family:Georgia,serif;
  font-size:30px;
  color:#172534
}
.modal-copy{
  margin-bottom:16px;
  color:#546674;
  font-size:16px
}
.payment-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px
}
.payment-chip{
  min-height:40px;
  padding:0 16px;
  background:#f5e7c7;
  color:#453418;
  border:1px solid #ead6ad
}
.payment-chip:hover{
  background:#f0dfb6
}
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  background:#f2e5c6;
  color:#6d5325;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em
}
.pill-danger{
  background:#f6d9ce;
  color:#8c2f1b
}
.lead-contact,.lead-company,.lead-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:170px
}
.lead-contact strong,.lead-company strong{
  line-height:1.25
}
.lead-contact a{
  color:#264867;
  text-decoration:none;
  font-weight:700
}
.lead-contact a:hover{text-decoration:underline}
.lead-contact span,.lead-company span,.lead-meta span,.lead-date{
  color:#6f7d8b;
  font-size:13px
}
.lead-message{
  max-width:340px;
  color:#263546;
  line-height:1.45;
  white-space:normal
}
.lead-meta{
  min-width:220px
}
.lead-status-select{
  min-width:130px;
  padding:10px 12px;
  margin:0
}
.lead-status-new{
  background:#f2e5c6;
  color:#6d5325
}
.lead-status-contacted{
  background:#dfeaf7;
  color:#244f7a
}
.lead-status-qualified{
  background:#dff0df;
  color:#226239
}
.lead-status-closed{
  background:#e9edf2;
  color:#586676
}
.order-line-grid,.po-line-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr auto;
  gap:12px;
  align-items:end
}
.order-entry-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin-top:10px;
  overflow:visible
}
.order-entry-toolbar{
  justify-content:flex-end;
  margin-bottom:8px
}
.order-entry-table th,
.order-entry-table td{
  padding:12px 10px;
  border-bottom:1px solid #eadfc8;
  vertical-align:middle;
  text-align:center;
  overflow:visible
}
.order-entry-table th{
  color:#5a6c79;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase
}
.order-entry-product-cell{
  min-width:280px;
  position:relative;
  text-align:left
}
.order-entry-product-cell.is-open{
  z-index:50
}
.order-entry-combo{
  position:relative;
  display:block;
  width:100%
}
.order-entry-input{
  margin:0;
  min-height:44px;
  direction:ltr !important;
  text-align:left !important;
  unicode-bidi:normal !important;
  writing-mode:horizontal-tb
}
.order-entry-combo .order-entry-input{
  width:100%;
  padding-right:82px
}
.order-entry-clear{
  position:absolute !important;
  top:50%;
  right:44px;
  transform:translateY(-50%);
  z-index:4;
  width:26px;
  min-width:26px;
  height:26px;
  min-height:26px;
  margin:0;
  padding:0;
  border-radius:999px;
  border:1px solid #e6d7b2;
  background:#fff8ea;
  color:#7e6331;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1
}
.order-entry-clear:hover{
  background:#f7ead0
}
.order-entry-input.is-active-cell{
  border-color:#c9a856;
  box-shadow:0 0 0 3px rgba(201, 168, 86, .16);
  background:#fffdf6
}
.order-entry-toggle{
  position:absolute !important;
  top:50%;
  right:8px;
  transform:translateY(-50%);
  z-index:4;
  width:30px;
  min-width:30px;
  height:30px;
  min-height:30px;
  margin:0;
  padding:0;
  border-radius:999px;
  border:1px solid #e3d5b1;
  background:#fbf3e1;
  color:#6f5425;
  display:inline-flex;
  align-items:center;
  justify-content:center
}
.order-entry-toggle:hover{
  background:#f5e7c7
}
.order-entry-input.small{
  min-width:88px;
  width:100%
}
.order-entry-qty-cell{
  display:flex;
  flex-direction:column;
  gap:6px
}
.order-entry-backorder-badge{
  align-self:flex-start;
  min-height:24px;
  padding:0 10px;
  font-size:11px
}
.order-entry-suggestions{
  position:absolute;
  left:0;
  top:calc(100% - 2px);
  z-index:80;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px;
  width:min(980px, calc(100vw - 64px));
  max-height:320px;
  overflow-y:scroll;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  border:1px solid #e4d8bc;
  border-radius:18px;
  background:#fffdf8;
  box-shadow:0 18px 34px rgba(23, 37, 52, .12);
  scrollbar-gutter:stable
}
.order-entry-suggestion{
  display:grid;
  grid-template-columns:130px minmax(320px, 1fr) 150px 150px;
  gap:12px;
  justify-items:start;
  align-items:center;
  width:100%;
  min-height:52px;
  padding:10px 16px;
  border:1px solid #efe3c6;
  border-radius:14px;
  background:#fff;
  color:#223444;
  text-align:left;
  overflow:hidden
}
.order-entry-suggestion span{
  display:block;
  width:100%;
  text-align:left;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.25;
  font-size:12px
}
.order-entry-suggestion-sku{
  font-size:13px !important;
  font-weight:800
}
.order-entry-suggestion-name{
  font-size:13px !important;
  font-weight:600
}
.order-entry-suggestion-barcode{
  color:#6a7b88
}
.order-entry-suggestion-meta{
  text-align:right !important;
  font-weight:700
}
.order-entry-suggestion:hover{
  background:#fff7e9;
  border-color:#d8c08b
}
.order-entry-suggestion.is-active{
  background:#fff4dc;
  border-color:#c9a856;
  box-shadow:0 0 0 1px rgba(201, 168, 86, .24) inset
}
.inline-form{display:flex;gap:8px;align-items:center}
.inline-form input{margin:0;min-width:100px}
.report-grid{align-items:start}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.field-stack{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:14px
}
.field-caption{
  color:#4f6272;
  font-size:13px;
  font-weight:700;
  letter-spacing:.02em
}
.field-help{
  color:#7a8a97;
  font-size:12px;
  line-height:1.4;
  margin-top:2px
}
.input-with-unit{
  position:relative
}
.input-with-unit input{
  padding-right:74px
}
.input-unit{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#f4ead2;
  color:#6f5425;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  pointer-events:none
}
.password-field{
  position:relative
}
.password-field input{
  padding-right:64px
}
.password-toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid #d9c7a0;
  background:#f6ecd7;
  color:#7c5a1f;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  box-shadow:none
}
.password-toggle:hover{
  background:#f0e2c3
}
.password-toggle svg{
  width:20px;
  height:20px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round
}
.password-toggle svg circle{
  fill:none
}
.checkbox-field{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:0 16px;
  margin:0;
  border:1px solid #d6deea;
  border-radius:16px;
  background:#fff;
  color:var(--ink)
}
.checkbox-field input[type="checkbox"]{
  width:auto;
  margin:0
}
.two-col label{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:0 16px;
  margin:0 0 10px;
  border:1px solid #d6deea;
  border-radius:16px;
  background:#fff;
  color:var(--ink)
}
.two-col label input[type="checkbox"]{
  width:auto;
  margin:0
}
.subtle-card{
  background:linear-gradient(180deg, #fffaf0 0%, #fff6ea 100%);
  border-color:#e8ddc5;
  box-shadow:none
}
.shipment-estimate{
  margin:18px 0;
  padding:18px 20px
}
.shipping-option-list{
  display:grid;
  gap:10px;
  margin-top:16px
}
.shipping-option{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border:1px solid #e4d8bc;
  border-radius:18px;
  background:#fffdf8;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease
}
.shipping-option:hover{
  border-color:#d0b77f;
  box-shadow:0 8px 18px rgba(100, 76, 32, .08);
  transform:translateY(-1px)
}
.shipping-option.is-selected{
  border-color:#c9a856;
  background:linear-gradient(180deg, #fffaf0 0%, #fff6e8 100%)
}
.shipping-option input{
  display:none
}
.shipping-option-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#172534
}
.compact-grid{
  gap:10px 18px
}
.stack-list{
  display:grid;
  gap:8px;
  color:#425362;
  line-height:1.45
}
.smart-ops-card{
  background:linear-gradient(180deg, #fffdf7 0%, #fff7ea 100%);
}
.ops-memory-grid{
  margin-top:16px;
}
.ops-memory-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:16px
}
.ops-memory-list{
  display:grid;
  gap:10px;
  margin-top:10px
}
.ops-memory-item{
  padding:12px 14px;
  border:1px solid #eadfc7;
  border-radius:16px;
  background:#fffdfa;
  color:#455765;
  line-height:1.45
}
.ops-memory-item.is-clickable{
  width:100%;
  text-align:left;
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease
}
.ops-memory-item.is-clickable:hover{
  transform:translateY(-1px);
  border-color:#d4b677;
  background:#fff8eb;
  box-shadow:0 8px 20px rgba(23,37,52,.08)
}
.settings-brand-preview{
  display:flex;
  align-items:center;
  gap:18px;
  margin:18px 0 10px
}
.settings-live-preview{
  margin:10px 0 22px
}
.settings-live-header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:10px
}
.settings-live-copy{
  display:flex;
  flex-direction:column;
  gap:6px
}
.product-about-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:14px
}
.product-about-grid div{
  padding:14px;
  border:1px solid #e6dcc5;
  border-radius:16px;
  background:#fffaf0
}
.product-about-grid span{
  display:block;
  color:#6f7f8d;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase
}
.product-about-grid strong{
  display:block;
  margin-top:6px;
  color:var(--ink);
  font-size:16px
}
.crm-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 18px
}
.crm-tabs button{
  min-height:40px;
  background:#eef2f6;
  color:#25394a;
  border:1px solid #d9e2eb
}
.crm-tabs button.is-active{
  background:var(--brand-2);
  color:#fff;
  border-color:var(--brand-2)
}
.status-bad{
  background:#ffe7df;
  color:#8a2f18
}
.kanban-board{
  display:grid;
  grid-template-columns:repeat(7,minmax(220px,1fr));
  gap:14px;
  overflow-x:auto;
  padding:4px 2px 12px
}
.kanban-column{
  min-height:260px;
  padding:14px;
  border:1px solid #e2d4b8;
  border-radius:22px;
  background:#fff8ec
}
.kanban-column h3{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin:0 0 12px;
  font-size:16px
}
.kanban-column h3 span{
  color:#7b8792;
  font-size:13px
}
.kanban-card{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px;
  margin-bottom:10px;
  border:1px solid #dfc895;
  border-radius:16px;
  background:#fff;
  cursor:grab;
  box-shadow:0 8px 18px rgba(23,37,52,.07)
}
.kanban-card span{
  color:#627282;
  font-size:13px
}
.small-button{
  min-height:34px;
  padding:0 14px;
  font-size:13px
}
.crm-memory-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px
}
.memory-line{
  padding:10px 12px;
  border:1px solid #e4d9bf;
  border-radius:14px;
  background:#fffaf0
}
.settings-doc-preview{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #e8ddc5
}
.settings-doc-copy{
  color:#394a57;
  line-height:1.5
}
.settings-doc-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:18px
}
.settings-doc-card{
  padding:16px;
  border:1px solid #e8ddc5;
  border-radius:18px;
  background:rgba(255,255,255,.72)
}
.settings-doc-mock{
  margin-top:8px;
  padding:16px;
  border-radius:16px;
  background:linear-gradient(180deg, #fffdf8 0%, #fff7ea 100%);
  border:1px solid #eadfc7
}
.settings-doc-mock-title{
  font-family:Georgia,serif;
  font-size:22px;
  color:#172534;
  margin-bottom:8px
}
.settings-doc-mock-meta{
  color:#5c6c79;
  line-height:1.45;
  margin-bottom:10px
}
.settings-doc-mock-line{
  color:#8a6a31;
  font-size:13px;
  font-weight:700;
  letter-spacing:.02em
}

.dashboard-shell{
  display:grid;
  grid-template-columns:1.25fr .9fr;
  gap:20px
}
.dashboard-hero{
  background:linear-gradient(140deg, #13263b 0%, #234564 100%);
  color:#fff7ea;
  min-height:246px;
  overflow:hidden;
  position:relative
}
.dashboard-hero::after{
  content:"";
  position:absolute;
  right:-30px;
  top:-36px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(210,162,77,.32) 0%, rgba(210,162,77,0) 68%)
}
.hero-inner{position:relative;z-index:1;max-width:720px}
.hero-title{
  font-family:Georgia,serif;
  font-size:56px;
  line-height:1.03;
  margin-bottom:14px
}
.hero-subtitle{
  color:#cfdbe4;
  font-size:19px;
  line-height:1.6;
  margin-bottom:22px
}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.hero-actions button{
  min-width:160px
}
.hero-actions .primary-action{
  width:auto;
  background:var(--accent-soft)
}
.hero-actions .secondary{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.16)
}
.dashboard-side{
  background:var(--surface-2);
  border-color:#eadbb6;
  min-height:246px
}
.side-label{
  color:#8a6a31;
  font-size:13px;
  font-weight:700;
  letter-spacing:.14em;
  margin-bottom:10px
}
.side-value{
  font-family:Georgia,serif;
  font-size:46px;
  margin-bottom:8px
}
.side-copy{
  color:var(--muted);
  font-size:18px;
  line-height:1.5;
  margin-bottom:20px
}
.progress-track{
  width:100%;
  height:14px;
  border-radius:999px;
  background:#ebdec0;
  overflow:hidden;
  margin-bottom:18px
}
.progress-fill{
  width:74%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #d2a24d 0%, #e7bb6c 100%)
}
.side-list{
  display:grid;
  gap:10px;
  color:#50616e;
  font-size:16px
}
.dashboard-lower{
  margin-top:18px;
  display:grid;
  grid-template-columns:1fr;
  gap:18px
}
.quick-actions{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px
}
.action-pill{
  min-height:54px;
  padding:0 20px;
  border-radius:999px;
  background:#17324b;
  color:#f4f8fb;
  font-size:16px;
  font-weight:700
}
.action-pill.primary{
  background:var(--accent-soft);
  color:#231809
}

.restore-creds-panel{
  position:sticky;
  top:12px;
  z-index:40;
  margin:12px;
  border:2px solid #d2a24d
}
.restore-creds-pre{
  max-height:260px;
  overflow:auto;
  background:#0d1522;
  color:#f8fafc;
  padding:12px;
  border-radius:12px;
  white-space:pre-wrap;
  word-break:break-word
}

@media (max-width:1100px){
  .auth-shell{grid-template-columns:1fr;padding:28px}
  .auth-hero{grid-template-columns:1fr}
  .login-card{justify-self:stretch;width:100%}
  .topbar-row,.dashboard-shell{grid-template-columns:1fr;display:grid}
  .search-shell{width:100%;max-width:none;min-width:0}
  .brand-row{align-items:center}
  .quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
  .two-col,.order-line-grid,.po-line-grid,.dashboard-shell,.auth-hero{grid-template-columns:1fr}
  .detail-grid{grid-template-columns:1fr}
  .ops-memory-columns{grid-template-columns:1fr}
  .settings-doc-grid{grid-template-columns:1fr}
  .product-about-grid{grid-template-columns:1fr}
  .crm-memory-grid{grid-template-columns:1fr}
  .kanban-board{grid-template-columns:repeat(7,220px)}
  .tax-summary-row{align-items:flex-start;flex-direction:column}
  .topbar{padding:20px 16px 16px}
  .topbar h1{font-size:30px}
  .topbar-row{gap:16px}
  .brand-row{gap:14px}
  .brand-mark{width:72px;height:72px;border-radius:20px}
  .nav-pills{display:none}
  .nav-pills.open{
    display:flex;
    flex-direction:column;
    max-height:62vh;
    overflow:auto
  }
  .nav-pills button{flex:1 1 100%;width:100%}
  main,.search-results{padding-left:16px;padding-right:16px}
  .mobile-only{display:inline-flex}
  .header-actions{width:100%;justify-content:stretch;gap:10px}
  .header-actions > *{flex:1 1 100%}
  .search-shell input{font-size:16px}
  .row-actions{gap:10px}
  .row-actions > button{flex:1 1 auto}
  .quick-actions{grid-template-columns:1fr}
  .hero-title,.auth-copy h1{font-size:42px}
  table{min-width:560px}
  th,td{padding:10px;font-size:13px}
  .table-wrap{border-radius:16px}
  .section-title{font-size:30px}
  .kpi h2{font-size:28px}
}
@media (max-width:600px){
  .auth-shell{padding:18px}
  .auth-hero{padding:18px 4px 10px}
  .auth-copy h1{font-size:34px;line-height:1.06}
  .auth-lead{font-size:17px;line-height:1.45}
  .auth-preview{display:none}
  .card{padding:18px}
  .brand-mark{width:64px;height:64px;border-radius:18px}
  .brand-mark.large{width:96px;height:96px;border-radius:26px}
  .topbar h1{font-size:26px}
  .topbar-user{font-size:14px}
  .modal-backdrop{padding:14px}
  .modal-card{padding:18px;border-radius:22px;max-height:92vh}
  .nav-pills button{flex:1 1 100%}
  .hero-title,.auth-copy h1{font-size:36px}
  .preview-actions{grid-template-columns:1fr}
  table{min-width:520px}
  .table-wrap{margin:0 -4px}
  .inline-form{flex-direction:column;align-items:stretch}
  .inline-form input{min-width:0}
  .search-results{padding-top:12px}
  .search-item{padding:11px 12px}
  .header-actions .ghost-button,
  .header-actions .secondary{
    width:100%
  }
  .row-actions{
    flex-direction:column;
    align-items:stretch
  }
  .row-actions.space-between{
    align-items:stretch
  }
  .row-actions > button,
  .row-actions > .expand-toggle,
  .row-actions > .action-pill{
    width:100%
  }
  .create-card h3{font-size:24px}
  .kpi{padding:16px}
  .tax-summary-card{padding:16px}
  .modal-copy{font-size:15px}
  .pill{min-height:26px;padding:0 10px;font-size:11px}
  .payment-chip{flex:1 1 calc(50% - 10px)}
  .detail-card h3,.modal-card h3{font-size:26px}
  .lead-contact,.lead-company,.lead-meta{min-width:150px}
  .lead-message{max-width:260px}
  .compact-filter-bar{align-items:stretch}
  .compact-filter-bar > *{width:100%}
  .filter-pill-group{width:100%}
  .filter-pill{flex:1 1 auto}
}
@media (max-width:420px){
  .topbar{padding:16px 12px 14px}
  main,.search-results{padding-left:12px;padding-right:12px}
  .section-title{font-size:26px}
  .card{padding:16px}
  .search-shell{min-width:0}
  .search-clear{right:6px;width:30px;min-height:30px;font-size:22px}
  .table-wrap{margin:0 -6px;border-radius:14px}
  table{min-width:500px}
  th,td{padding:9px 8px;font-size:12px}
  .payment-chip{flex:1 1 100%}
  .oval-chip{min-width:110px;height:40px;padding:0 16px;font-size:14px}
  .auth-shell{padding:14px}
  .auth-copy h1{font-size:30px}
  .auth-lead{font-size:16px}
  .login-card h2{font-size:34px}
  .brand-mark{width:58px;height:58px;border-radius:16px}
  .brand-mark.large{width:84px;height:84px;border-radius:22px}
  .topbar h1{font-size:23px}
  .topbar-user{font-size:13px}
  .nav-pills{margin-top:16px}
  .nav-pills button{min-height:42px;font-size:13px;padding:0 14px}
  .search-shell input{padding:12px 40px 12px 14px}
  .search-item{padding:10px 11px}
  .search-item .pill{margin-left:6px}
  .section-title{margin:6px 0 14px}
  .kpi h2{font-size:24px}
  .hero-title,.auth-copy h1{font-size:30px}
  .modal-card{padding:14px;border-radius:18px}
  .modal-card h3,.detail-card h3{font-size:22px}
  .detail-grid{gap:10px 14px}
  .two-col{gap:14px}
  .tax-summary-row strong{font-size:16px}
  .tax-summary-row.total strong{font-size:20px}
  .action-pill{min-height:48px;font-size:15px}
}
@media (max-width:375px){
  body{font-size:14px}
  .topbar{padding:14px 10px 12px}
  main,.search-results{padding-left:10px;padding-right:10px}
  .card{padding:14px;border-radius:20px}
  .section-title{font-size:24px}
  .brand-row{gap:10px}
  .brand-mark{width:54px;height:54px;border-radius:15px}
  .topbar h1{font-size:21px}
  .search-shell input,
  input,textarea,select{font-size:15px}
  .table-wrap{margin:0 -8px}
  table{min-width:480px}
  th,td{padding:8px 7px;font-size:11.5px}
  .create-card h3{font-size:22px}
  .modal-backdrop{padding:10px}
  .modal-card{padding:12px}
  .quick-actions{gap:10px}
}
@media (max-width:360px){
  .auth-copy h1{font-size:28px}
  .login-card h2{font-size:30px}
  .topbar h1{font-size:20px}
  .brand-mark{width:50px;height:50px}
  .section-title{font-size:22px}
  .card{padding:12px}
  .nav-pills button{font-size:12px}
  .search-shell input{padding-left:12px}
  .table-wrap{margin:0 -10px}
  table{min-width:460px}
  th,td{padding:8px 6px;font-size:11px}
  .modal-card h3,.detail-card h3{font-size:20px}
  .action-pill{min-height:44px;font-size:14px}
}
