:root {
  --ink: #17181c;
  --ink-soft: #52545b;
  --muted: #85868b;
  --line: #e7e5df;
  --paper: #f7f6f2;
  --panel: #ffffff;
  --gold: #c89239;
  --gold-deep: #9d6b19;
  --gold-pale: #fbf4e5;
  --green: #2f8e69;
  --green-pale: #edf8f1;
  --red: #ae4d4d;
  --shadow: 0 16px 40px rgba(29, 25, 16, 0.055);
  --radius: 18px;
}

.is-hidden, [hidden] { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, rgba(242,198,111,.12), transparent 35%), #17181c; }
.login-card { width: min(100%, 560px); padding: 34px; border-radius: 24px; background: #fffdf8; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.login-brand { margin-bottom: 22px; }
.login-card h1 { margin: 8px 0 10px; font-size: clamp(28px, 5vw, 38px); letter-spacing: -.04em; }
.login-copy { color: #66676b; margin: 0 0 18px; line-height: 1.55; }
.login-form { display: grid; gap: 16px; }
.login-submit { width: 100%; justify-content: center; margin-top: 4px; }
.login-error { color: #a43b36; margin: 0; font-size: 13px; }
.login-footnote { border-top: 1px solid #e8e4da; margin-top: 26px; padding-top: 16px; color: #898a8c; font-size: 12px; line-height: 1.5; }
.public-price-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 14px 0 8px; }
.public-price-strip article { display: grid; gap: 7px; min-width: 0; padding: 12px 11px; border: 1px solid #eee8da; border-radius: 14px; background: #fbf8f0; }
.public-price-strip article span { color: #77736a; font-size: 11px; font-weight: 650; }
.public-price-strip article strong { color: #24221d; font-size: clamp(13px, 2.6vw, 17px); line-height: 1.2; white-space: nowrap; }
.public-price-note { display: flex; align-items: center; gap: 7px; min-height: 18px; margin: 0 0 18px; color: #88847b; font-size: 11px; }
.public-price-note #publicPriceUpdated { margin-left: auto; white-space: nowrap; }
.public-price-note .live-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a7a49c; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 0 0 18px; padding: 4px; border-radius: 12px; background: #f1eee7; }
.auth-tab { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: #666; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.auth-tab.is-active { background: #fffdf8; color: #24221d; box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.active-business-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #e7e1d4; border-radius: 12px; color: #34322d; font-size: 13px; font-weight: 700; }
.owner-login-toggle { display: block; margin: 13px auto 0; }
.signup-note { margin: -4px 0 18px; color: #73716c; font-size: 13px; line-height: 1.55; }
.staff-pins-reveal { margin-top: 18px; padding: 16px; border: 1px solid #d7c28e; border-radius: 14px; background: #fbf5e5; color: #363127; }
.staff-pins-reveal > strong { display: block; font-size: 14px; }
.staff-pins-reveal > p { margin: 6px 0 12px; color: #716c60; font-size: 12px; line-height: 1.5; }
.staff-pin-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(100,82,40,.12); font-size: 13px; }
.staff-pin-row code { font: 700 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; }
.staff-pins-reveal .button { width: 100%; justify-content: center; margin-top: 12px; }
.google-settings-block { margin-top: 26px; padding-top: 24px; border-top: 1px solid #e8e4da; }
.google-settings-block h3 { margin: 7px 0 6px; font-size: 19px; letter-spacing: -.02em; }
.google-settings-block > p { max-width: 720px; margin: 0 0 18px; color: #72716e; font-size: 13px; line-height: 1.55; }
.google-settings-grid { grid-template-columns: 1fr 1fr; }
.google-script-field, .google-settings-grid .settings-note { grid-column: 1 / -1; }
.google-connector-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.connector-code-output { display: block; width: 100%; min-height: 180px; margin-top: 12px; padding: 12px; border: 1px solid #d8d3c8; border-radius: 10px; background: #f5f2eb; color: #35332e; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.connector-steps { margin-top: 12px !important; font-size: 12px !important; }
@media (max-width: 600px) {
  .login-screen { place-items: start center; padding: 14px; }
  .login-card { padding: 23px 19px; border-radius: 18px; }
  .public-price-strip { gap: 6px; }
  .public-price-strip article { padding: 10px 8px; }
  .public-price-strip article span { font-size: 10px; }
  .public-price-note { flex-wrap: wrap; }
  .google-settings-grid { grid-template-columns: 1fr; }
  .google-script-field, .google-settings-grid .settings-note { grid-column: auto; }
}
.logout-button { margin: 16px 0 10px; }
.profile-menu-wrap { position: relative; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 170px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; box-shadow: 0 16px 32px rgba(29,25,16,.16); }
.profile-menu-title { padding: 7px 9px 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.profile-menu button { display: block; width: 100%; border: 0; border-radius: 9px; padding: 9px; background: transparent; color: var(--ink); text-align: left; font-size: 12px; cursor: pointer; }
.profile-menu button:hover, .profile-menu button:focus { background: var(--gold-pale); color: var(--gold-deep); }
.settings-account-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 10px; padding: 16px; border: 1px solid #e9e5db; border-radius: 14px; background: #fcfbf7; }
.settings-account-card strong { display: block; margin-top: 4px; font-size: 14px; }
.settings-account-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .settings-account-card { align-items: flex-start; flex-direction: column; } }
.compact-heading { margin-top: 22px; }
.settings-note-text { color: #77787b; font-size: 13px; line-height: 1.5; }
.user-management-table-wrap { overflow-x: auto; border: 1px solid #e9e5db; border-radius: 14px; }
.user-management-table { min-width: 720px; width: 100%; border-collapse: collapse; }
.user-management-table th, .user-management-table td { padding: 10px; text-align: left; border-bottom: 1px solid #eeeae1; font-size: 12px; white-space: nowrap; }
.user-management-table th { color: #77787b; font-weight: 600; }
.user-management-table tr:last-child td { border-bottom: 0; }
.user-management-table input { width: 100%; min-width: 150px; padding: 9px 10px; border: 1px solid #ddd9cf; border-radius: 8px; background: #fff; color: #1b1c20; }
.admin-login-note { display: inline-flex; align-items: center; min-height: 34px; color: #77787b; font-size: 11px; }
.user-role { color: #8c6a25; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: 248px;
  background: #1d1e22;
  color: #f8f6f0;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 20px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
}

.brand-lockup, .mobile-brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2c971, #9f6b1a);
  color: #1e1b15;
  font-family: Georgia, serif;
  font-size: 20px;
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 3px 11px rgba(205, 153, 59, .18);
}
.brand-name { font-family: Georgia, serif; font-size: 20px; letter-spacing: -.02em; }
.brand-caption { color: #9b9ba0; text-transform: uppercase; font-size: 9px; letter-spacing: .18em; margin-top: 1px; }

.workspace-chip {
  margin: 45px 7px 22px;
  padding: 8px 10px;
  border: 1px solid #34353b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9b9bd;
  font-size: 11px;
}
.status-dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 0 3px rgba(47, 142, 105, .12); }
.live-dot { width: 6px; height: 6px; box-shadow: none; }

.nav-stack { display: grid; gap: 4px; }
.nav-item {
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #9b9ba0;
  padding: 12px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  transition: background .2s, color .2s;
}
.nav-item:hover { color: #f8f6f0; background: #28292e; }
.nav-item.is-active { color: #fffaf0; background: #34343a; box-shadow: inset 3px 0 var(--gold); }
.nav-market-link { color: #e5b760; text-decoration: none; }
.nav-market-link:hover { color: #f8f6f0; }
.nav-icon { width: 18px; font-size: 17px; text-align: center; opacity: .86; }
.nav-count { margin-left: auto; min-width: 21px; padding: 2px 6px; border-radius: 20px; background: #44454b; color: #e9e8e2; text-align: center; font-size: 11px; }

.sidebar-footer { margin-top: auto; }
.scale-mini-card { padding: 14px; border: 1px solid #37383d; border-radius: 12px; background: #242529; }
.scale-mini-topline { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #e1dfd8; }
.scale-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #17181c; background: #e4b65f; font-size: 18px; line-height: 1; }
.mini-status { margin-left: auto; color: #98c9ab; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.scale-mini-card p { color: #99999e; font-size: 11px; line-height: 1.45; margin: 11px 0 9px; }
.text-button { border: 0; background: none; padding: 0; color: #e5b760; font-size: 11px; }
.text-button:hover { color: #f4d58f; }
.sidebar-meta { color: #67686d; font-size: 10px; padding: 17px 5px 0; }

.main-content { margin-left: 248px; min-width: 0; width: calc(100% - 248px); }
.topbar { min-height: 78px; padding: 18px 5.5%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(247,246,242,.82); }
.mobile-brand { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.market-ticker { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; padding-right: 6px; }
.market-ticker-label { color: var(--ink-soft); font-size: 11px; display: flex; gap: 7px; align-items: center; grid-row: span 2; }
.market-ticker strong { font-size: 14px; line-height: 1; }
.market-source { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; line-height: 1; }
.icon-button, .avatar-button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); }
.icon-button { font-size: 19px; }
.icon-button:hover { color: var(--gold-deep); border-color: #d7c197; transform: rotate(-25deg); }
.avatar-button { border: 0; background: #25262b; color: #f6e2b8; font-weight: 600; font-size: 11px; }

.page-wrap { width: min(1260px, 90%); margin: 0 auto; padding: 42px 0 28px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow, .panel-kicker { color: var(--gold-deep); font-size: 10px; letter-spacing: .16em; font-weight: 700; }
.eyebrow span { color: #c2c0b8; margin: 0 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.035em; }
h1 { font-size: clamp(31px, 3vw, 44px); line-height: 1.05; margin: 12px 0 8px; }
h2 { font-size: 22px; line-height: 1.15; margin: 6px 0 0; }
h3 { font-size: 13px; font-weight: 650; margin: 0; }
.page-heading p { color: var(--ink-soft); margin-bottom: 0; font-size: 14px; }
.heading-actions, .form-actions, .recent-actions { display: flex; align-items: center; gap: 10px; }
.button { border: 1px solid transparent; border-radius: 9px; padding: 10px 14px; font-weight: 650; font-size: 12px; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--ink); color: #fffdf6; box-shadow: 0 5px 12px rgba(23,24,28,.12); }
.button-primary:hover { background: #2b2c32; box-shadow: 0 7px 18px rgba(23,24,28,.17); }
.button-secondary, .button-outline { color: var(--ink); background: #fff; border-color: var(--line); }
.button-secondary:hover, .button-outline:hover { border-color: #cfc6b4; background: #fffdf9; }
.button-quiet { color: var(--ink-soft); background: transparent; }
.button-quiet:hover { background: #eeece5; }
.button-small { padding: 8px 11px; font-size: 11px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 26px; }
.metric-card { min-height: 123px; padding: 18px 19px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: 0 4px 15px rgba(26,22,12,.025); }
.metric-card-dark { background: var(--ink); border-color: var(--ink); color: #f6f2e7; }
.metric-label { color: var(--ink-soft); font-size: 11px; margin-bottom: 12px; }
.metric-card-dark .metric-label { color: #b5b4b2; }
.metric-value { font-family: Georgia, serif; font-size: 25px; letter-spacing: -.03em; line-height: 1; }
.metric-unit { font-family: Inter, sans-serif; color: var(--muted); font-size: 13px; margin-left: 2px; }
.metric-value-status { font-family: Inter, sans-serif; font-size: 14px; display: flex; align-items: center; gap: 7px; padding-top: 3px; }
.metric-card-dark .metric-value { color: #f3c971; }
.metric-foot { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 15px; white-space: nowrap; }
.metric-card-dark .metric-foot { color: #8d8c8d; }
.metric-badge { padding: 3px 6px; border-radius: 4px; font-weight: 700; font-size: 9px; letter-spacing: .03em; }
.badge-green { color: #86c4a1; background: rgba(76, 165, 116, .15); }
.badge-gold { color: #9b6b23; background: var(--gold-pale); }
.badge-neutral { color: #66676e; background: #f1f0ec; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(310px, .82fr); gap: 14px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.quote-panel { padding: 27px 29px 24px; }
.panel-heading, .offer-panel-head, .recent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.quote-id { color: var(--muted); font-size: 10px; letter-spacing: .1em; padding-top: 5px; }
.form-section { padding-top: 27px; }
.form-section:first-of-type { padding-top: 25px; }
.section-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.required-note { color: var(--muted); font-size: 10px; }
.field-grid { display: grid; gap: 12px; }
.field-grid-two { grid-template-columns: 1fr 1fr; }
.field-grid-three { grid-template-columns: 1fr 1fr 1fr; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.field em { color: var(--gold-deep); font-style: normal; }
.field input, .field select, .field textarea, .search-box input { width: 100%; border: 1px solid #deddd7; outline: 0; border-radius: 8px; background: #fcfcfa; color: var(--ink); padding: 10px 11px; font-size: 12px; transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { resize: vertical; min-height: 54px; }
.field input::placeholder, .field textarea::placeholder { color: #b2b1ae; }
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus { border-color: #c99b4d; box-shadow: 0 0 0 3px rgba(201,155,77,.12); background: #fff; }
.input-suffix-wrap { position: relative; }
.input-suffix-wrap input { padding-right: 27px; }
.input-suffix-wrap > span { position: absolute; right: 11px; top: 50%; color: var(--muted); font-size: 11px; transform: translateY(-50%); }
.field-readonly input { color: var(--gold-deep); font-weight: 700; background: var(--gold-pale); border-color: #ead9b3; }
.form-divider { height: 1px; background: var(--line); }
.scale-strip { display: flex; align-items: center; gap: 10px; border: 1px solid #ece9df; border-radius: 9px; background: #faf9f5; padding: 10px 11px; margin-top: 4px; }
.scale-strip-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #ece9df; color: #767068; font-size: 17px; }
.scale-strip-copy { display: grid; gap: 1px; flex: 1; min-width: 0; }
.scale-strip-copy strong { font-size: 11px; font-weight: 650; }
.scale-strip-copy span { color: var(--muted); font-size: 10px; }
.camera-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(200px, .82fr); gap: 12px; align-items: stretch; }
.camera-card { min-width: 0; }
.camera-frame { position: relative; display: block; min-height: 210px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid #35363b; border-radius: 11px; background: #18191d; }
.camera-frame video, .camera-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #18191d; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; max-width: none; padding: 18px; color: #d8d4ca; text-align: center; }
.camera-placeholder strong { font-size: 11px; font-weight: 650; }
.camera-placeholder span { color: #97969a; font-size: 10px; line-height: 1.45; }
.camera-placeholder-icon { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #5a5b60; border-radius: 50%; color: #e2b866; font-size: 22px; }
.camera-overlay { position: absolute; inset: 12% 10%; border: 1px dashed rgba(247, 207, 126, .75); border-radius: 8px; pointer-events: none; }
.camera-controls { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 9px; }
.photo-guidance { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 100%; padding: 14px; border: 1px solid #ece9df; border-radius: 10px; background: #faf9f5; }
.photo-status { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.photo-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a2a1a0; }
.photo-status.is-attached { color: var(--green); }
.photo-status.is-attached .photo-status-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(47, 142, 105, .12); }
.photo-guidance p { color: var(--muted); font-size: 10px; line-height: 1.55; margin: auto 0; }
.photo-note { display: flex; gap: 7px; align-items: flex-start; color: var(--gold-deep); font-size: 10px; line-height: 1.4; }
.compact-section { padding-bottom: 21px; }
.policy-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid #ece9df; border-radius: 9px; padding: 10px 12px; }
.policy-copy { display: flex; align-items: center; gap: 10px; }
.policy-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--gold-deep); background: var(--gold-pale); font-weight: 700; }
.policy-copy div { display: grid; gap: 1px; }
.policy-copy strong { font-size: 11px; }
.policy-copy small { color: var(--muted); font-size: 10px; }
.rate-input { position: relative; width: 75px; }
.rate-input input { width: 100%; border: 1px solid #deddd7; outline: 0; border-radius: 7px; padding: 8px 24px 8px 9px; text-align: right; font-weight: 700; background: #fff; }
.rate-input span { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.form-actions { justify-content: flex-end; padding-top: 20px; }

.offer-panel { padding: 27px 25px 0; overflow: hidden; position: sticky; top: 18px; }
.estimate-pill { border-radius: 20px; padding: 5px 8px; color: var(--gold-deep); background: var(--gold-pale); font-size: 10px; font-weight: 700; }
.offer-hero { margin: 30px -25px 0; padding: 23px 25px 25px; background: var(--ink); color: #f7f1e2; }
.offer-hero span { color: #ada9a2; font-size: 11px; }
.offer-hero strong { display: block; color: #f2c66f; font-family: Georgia, serif; font-size: 47px; font-weight: 400; letter-spacing: -.05em; line-height: 1; margin: 10px 0 8px; }
.offer-hero small { color: #8b8a8b; font-size: 10px; }
.calculation-list { padding: 16px 0 5px; }
.calculation-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; color: var(--ink-soft); font-size: 11px; border-bottom: 1px solid #f0eee8; }
.calculation-row strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.calculation-row-final { border-bottom: 0; color: var(--gold-deep); }
.calculation-row-final strong { color: var(--gold-deep); }
.calculation-note { display: flex; gap: 8px; margin: 11px 0 20px; padding: 11px; border-radius: 8px; background: #faf9f5; color: var(--muted); }
.note-icon { flex: 0 0 auto; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #e6e2d8; color: #777269; font-size: 10px; font-weight: 700; }
.calculation-note p, .settings-note p { margin: 0; font-size: 10px; line-height: 1.45; }
.offer-panel-footer { margin: 0 -25px; padding: 13px 25px; color: #888781; background: #fbfaf7; border-top: 1px solid #f0eee8; font-size: 10px; }
.secure-icon { color: var(--green); margin-right: 4px; }

.recent-panel { margin-top: 28px; padding: 27px 29px 0; }
.recent-head { align-items: center; margin-bottom: 20px; }
.search-box { width: 180px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #deddd7; border-radius: 8px; background: #fcfcfa; color: var(--muted); }
.search-box input { border: 0; box-shadow: none; background: transparent; padding: 8px 0; }
.search-box input:focus { box-shadow: none; }
.table-wrap { margin: 0 -29px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 680px; }
th { padding: 10px 29px; background: #fbfaf7; color: #99968f; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 29px; border-top: 1px solid #f0eee8; color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
td:first-child { color: var(--ink); font-weight: 650; }
.quote-offer { color: var(--gold-deep); font-weight: 700; }
.table-action { border: 0; background: transparent; color: var(--muted); font-size: 16px; padding: 0 3px; }
.table-action:hover { color: var(--ink); }
.empty-state { display: grid; place-items: center; padding: 42px 20px 47px; text-align: center; }
.empty-icon { width: 35px; height: 35px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; color: var(--gold-deep); background: var(--gold-pale); }
.empty-state strong { font-size: 13px; }
.empty-state p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }

.settings-panel { margin-top: 28px; padding: 27px 29px 24px; }
.settings-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 12px; align-items: end; margin-top: 24px; }
.settings-note { display: flex; gap: 8px; grid-column: 1 / -1; padding: 11px; border-radius: 8px; background: #faf9f5; color: var(--muted); }
.save-hint { margin-right: auto; color: var(--green); font-size: 11px; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 26px 3px 6px; color: #99978f; font-size: 10px; }

.toast { position: fixed; right: 25px; bottom: 25px; z-index: 20; pointer-events: none; opacity: 0; transform: translateY(10px); padding: 12px 15px; border-radius: 9px; color: #fff; background: #28292e; box-shadow: 0 10px 25px rgba(0,0,0,.18); font-size: 12px; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #8f4141; }

.print-receipt, .print-label { display: none; }

@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .offer-panel { position: static; }
  .offer-hero { margin-top: 22px; }
}

@media (max-width: 760px) {
  .sidebar { width: 64px; padding: 18px 10px; align-items: center; }
  .brand-lockup { justify-content: center; }
  .brand-lockup > div:not(.brand-mark), .workspace-chip, .nav-item:not(.is-active)::after, .nav-item { font-size: 0; }
  .brand-name, .brand-caption, .scale-mini-card, .sidebar-meta, .nav-count { display: none; }
  .nav-stack { margin-top: 40px; width: 100%; }
  .nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .nav-icon { font-size: 18px; }
  .main-content { margin-left: 64px; width: calc(100% - 64px); }
  .topbar { padding: 14px 5%; }
  .mobile-brand { display: flex; font-family: Georgia, serif; font-size: 17px; }
  .mobile-brand .brand-mark { width: 29px; height: 29px; font-size: 17px; }
  .market-ticker-label, .market-source { display: none; }
  .market-ticker { display: block; }
  .market-ticker strong { font-size: 13px; }
  .page-wrap { width: 90%; padding-top: 29px; }
  .page-heading { display: block; }
  .heading-actions { margin-top: 19px; }
  .heading-actions .button { flex: 1; }
  .metrics-grid { gap: 8px; }
  .metric-card { padding: 14px; min-height: 113px; }
  .metric-value { font-size: 21px; }
  .metric-foot { display: block; margin-top: 11px; line-height: 1.5; white-space: normal; }
  .metric-badge { display: inline-block; margin-right: 3px; }
  .quote-panel, .recent-panel, .settings-panel { padding-left: 17px; padding-right: 17px; }
  .table-wrap { margin-left: -17px; margin-right: -17px; }
  th { padding-left: 17px; padding-right: 17px; }
  td { padding-left: 17px; padding-right: 17px; }
  .field-grid-two, .field-grid-three, .settings-grid { grid-template-columns: 1fr; }
  .camera-layout { grid-template-columns: 1fr; }
  .camera-frame { min-height: 205px; }
  .recent-head { display: block; }
  .recent-actions { margin-top: 14px; }
  .search-box { flex: 1; width: auto; }
  .app-footer { display: block; line-height: 1.8; }
}

@media print {
  body { background: #fff; }
  body > *:not(.print-receipt):not(.print-label) { display: none !important; }
  body.print-label-mode > *:not(.print-label) { display: none !important; }
  body.print-invoice-mode > *:not(.print-receipt) { display: none !important; }
  .print-receipt { display: block; width: 100%; max-width: 680px; margin: 0 auto; padding: 20px; color: #17181c; }
  .print-brand { display: flex; align-items: center; gap: 10px; }
  .print-brand .brand-mark { width: 36px; height: 36px; }
  .print-brand strong, .print-brand span { display: block; }
  .print-brand strong { font-family: Georgia, serif; font-size: 18px; }
  .print-brand span { color: #666; font-size: 11px; margin-top: 2px; }
  .print-meta { display: flex; justify-content: space-between; margin-top: 28px; color: #666; font-size: 11px; }
  .print-rule { height: 1px; background: #ddd; margin: 12px 0 17px; }
  .print-customer { display: flex; justify-content: space-between; font-size: 13px; }
  .print-customer span { color: #666; }
  .print-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 25px; }
  .print-grid span, .print-notes > span { display: block; color: #666; font-size: 10px; }
  .print-grid strong { display: block; margin-top: 3px; font-size: 12px; }
  .print-photo { margin-top: 24px; text-align: center; }
  .print-photo img { max-width: 100%; max-height: 260px; }
  .print-photo span { color: #666; font-size: 10px; }
  .print-offer { margin-top: 25px; padding: 18px; background: #f7f1e4; text-align: center; }
  .print-offer span, .print-offer strong, .print-offer small { display: block; }
  .print-offer span { font-size: 11px; }
  .print-offer strong { margin: 6px 0; color: #9d6b19; font-family: Georgia, serif; font-size: 31px; font-weight: 400; }
  .print-offer small { color: #666; font-size: 10px; }
  .print-notes { margin-top: 25px; }
  .print-notes p { min-height: 40px; margin: 6px 0; font-size: 11px; }
  .print-disclaimer { margin-top: 22px; color: #666; font-size: 10px; line-height: 1.45; }
  .print-signature { display: flex; justify-content: space-between; gap: 60px; margin-top: 50px; color: #666; font-size: 10px; }
  .print-signature span { flex: 1; border-top: 1px solid #999; padding-top: 5px; }
  .print-label { display: none; }
  body.print-label-mode .print-label { display: block; box-sizing: border-box; width: 58mm; height: 35mm; padding: 2.5mm; overflow: hidden; color: #000; font-family: Arial, sans-serif; }
  body.print-label-mode .print-receipt { display: none !important; }
  .label-brand { font-size: 8pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .label-order { margin-top: 1mm; font-size: 10pt; font-weight: 800; letter-spacing: .04em; }
  .label-item { margin-top: .8mm; font-size: 8.5pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .label-line { display: flex; justify-content: space-between; gap: 2mm; margin-top: 1.1mm; font-size: 7.5pt; line-height: 1.1; }
  .label-line span:last-child { text-align: right; }
  .label-line b { font-weight: 800; }
  .label-foot { margin-top: 1.6mm; padding-top: 1mm; border-top: .25mm solid #000; font-size: 6.3pt; font-weight: 700; letter-spacing: .12em; }
}
