:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #232633;
  background: #f7f7fa;
  font-synthesis: none;
  --accent: #fa693b;
  --ink: #202331;
  --muted: #727581;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #ed784f;
  outline-offset: 4px;
}
.shell { display: grid; grid-template-columns: 246px 1fr; min-height: 100dvh; }
.sidebar {
  background: #202331;
  color: #fff;
  padding: 38px 24px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.brand { font-size: 25px; font-weight: 750; letter-spacing: -1.2px; }
.brand span { color: #ff946c; }
.eyebrow { font-size: 9px; letter-spacing: 1.5px; font-weight: 600; }
.sidebar > .eyebrow { color: #acafc0; margin: 12px 0 45px; }
.sidebar nav button, .new-chat {
  display: flex; align-items: center; gap: 12px; padding: 14px 13px;
  border: 0; border-radius: 10px; text-align: left; font-size: 13px;
}
.new-chat { background: var(--accent); color: #201c1a; font-weight: 650; box-shadow: 0 6px 24px #fa693b20; }
.new-chat:hover { background: #ff865c; }
.sidebar nav button { background: transparent; color: #b6b8c6; }
.sidebar nav small { margin-left: auto; font-size: 9px; color: #a2a5b8; }
.sidebar-note { margin-top: auto; padding-top: 24px; border-top: 1px solid #ffffff18; font-size: 11px; color: #d6d8e2; }
.sidebar-note p { line-height: 1.8; color: #9da1b4; margin-top: 14px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff926b; margin-right: 7px; }
main { height: 100dvh; display: flex; flex-direction: column; min-width: 0; background: radial-gradient(ellipse at 85% 30%, #ffe9df66, transparent 55%), #f9f9fb; }
header { padding: 22px 34px; border-bottom: 1px solid #e9e9ef; background: #ffffffb3; position: relative; z-index: 2; }
header strong { font-size: 14px; }
header p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; background: #ffebe3; color: #ba451f; border: 1px solid #ffd7c7; border-radius: 13px; font-size: 21px; font-weight: 700; }
.help { position: relative; }
.help summary { list-style: none; font-size: 12px; font-weight: 600; padding: 10px 14px; border: 1px solid #dddfe6; border-radius: 9px; background: white; }
.help summary::-webkit-details-marker { display: none; }
.help summary span { margin-left: 12px; color: #c44d26; }
.help[open] summary { border-color: #f39b7d; }
.help-panel { position: absolute; right: 0; top: 49px; width: min(320px, 80vw); padding: 22px; background: #fff; border: 1px solid #e7e7ed; border-radius: 14px; box-shadow: 0 14px 45px #20233120; font-size: 13px; line-height: 1.6; }
.help-panel p { font-size: 12px; margin-top: 12px; }
.help-panel .help-example { padding: 12px; background: #fff3ed; color: #77371e; border-radius: 8px; }
.chat { flex: 1; overflow-y: auto; padding: 46px max(28px, calc((100% - 740px)/2)); scroll-behavior: smooth; }
.welcome { padding: 6px 0 24px; }
.intro-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; color: #8b4931; background: #fff0e8; border: 1px solid #f9ddce; padding: 7px 11px; border-radius: 6px; }
.intro-tag span { font-size: 15px; color: #d6572d; }
h1 { font-size: clamp(34px, 4.3vw, 58px); line-height: 1.12; letter-spacing: -2.3px; margin: 23px 0 18px; color: var(--ink); font-weight: 700; }
h1 em { font-style: normal; color: #d95127; }
.welcome > p:not(.start-label) { font-size: 14px; color: #6e7180; line-height: 1.8; }
.start-label { font-size: 9px; font-weight: 650; letter-spacing: 1.5px; color: #787b89; margin-top: 32px; margin-bottom: 13px; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.suggestions button { background: #fff; border: 1px solid #e4e4ec; border-radius: 13px; padding: 18px; text-align: left; font-size: 13px; font-weight: 600; color: #363947; box-shadow: 0 3px 8px #262b3e03; transition: border-color .15s, transform .15s, box-shadow .15s; }
.suggestions button:hover { border-color: #f49c7d; transform: translateY(-3px); box-shadow: 0 8px 20px #262b3e09; }
.suggestions span { display: flex; align-items: center; gap: 9px; font-size: 9px; font-weight: 600; color: #7b7e8c; letter-spacing: .6px; margin-bottom: 14px; }
.suggestions i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #fff0e8; color: #c6532c; font-size: 18px; font-style: normal; }
.suggestions button:nth-child(2) i { background: #efedfc; color: #7260ad; }
.suggestions b { float: right; color: #9c9eab; font-size: 16px; margin-left: 6px; }
.composer-area { padding: 10px max(28px, calc((100% - 740px)/2)) 18px; }
.demo-note, .footer-note { font-size: 10px; text-align: center; color: #737785; line-height: 1.5; }
.demo-note { margin-bottom: 10px; }
.composer-area form { background: white; border: 1px solid #dedfe7; border-radius: 16px; padding: 15px; box-shadow: 0 8px 30px #292d4010; }
.composer-area form:focus-within { border-color: #ed9b7e; box-shadow: 0 0 0 3px #fa693b0c, 0 8px 30px #292d4009; }
textarea { width: 100%; border: 0; background: transparent; resize: vertical; min-height: 48px; max-height: 150px; color: var(--ink); font-size: 14px; padding: 5px; }
textarea::placeholder { color: #898c98; }
.attach { color: #777c88; background: transparent; border: 0; font-size: 11px; padding: 8px 0; }
.attach small { margin-left: 5px; font-size: 9px; }
.send { border: 0; border-radius: 9px; background: var(--accent); color: #241c18; font-weight: 700; font-size: 12px; padding: 11px 19px; }
.send:hover { background: #ff865c; }
.send:disabled { opacity: .5; }
.footer-note { margin-top: 12px; font-size: 9px; }
.message { margin: 18px 0; padding: 18px 20px; border-radius: 12px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.message p { white-space: pre-wrap; margin: 8px 0 0; }
.message.user { background: #fff0e8; border: 1px solid #f6d9c9; margin-left: 45px; }
.message.assistant { background: white; border: 1px solid #e4e4ed; }
.message-label { font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.mock-label { color: #777b88; font-size: 8px; margin-left: 10px; }
#chat-error { font-size: 12px; color: #9c3928; }
#sending { font-size: 11px; margin: 3px 0; }
.htmx-indicator { display: none; }
.htmx-request.htmx-indicator { display: block; }
@media (min-width: 1400px) { .chat { padding-top: 70px; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { padding: 17px 20px; display: block; }
  .sidebar > .eyebrow, .sidebar-note, .sidebar nav button { display: none; }
  .sidebar nav { float: right; }
  .new-chat { padding: 9px; font-size: 11px; }
  .brand { font-size: 21px; }
  main { height: calc(100dvh - 71px); }
  header { padding: 14px 20px; }
  .help summary { font-size: 11px; padding: 9px 10px; }
  .chat { padding: 28px 20px; }
  h1 { font-size: 39px; letter-spacing: -1.7px; }
  .composer-area { padding: 8px 20px 13px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestions button { padding: 14px; }
  .suggestions span { margin-bottom: 8px; }
  .intro-tag { font-size: 8px; letter-spacing: .5px; }
  .welcome { padding-top: 0; }
  .demo-note { font-size: 9px; }
  .message.user { margin-left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat { scroll-behavior: auto; }
  .suggestions button { transition: none; }
}

.purchase-draft { margin-top: 18px; border-top: 1px solid #e4e4ed; padding-top: 15px; }
.purchase-draft h2 { font-size: 17px; font-weight: 650; }
.draft-note { color: #727581; font-size: 11px; }
.draft-item { margin: 12px 0; padding: 12px; border-radius: 9px; background: #f7f7fa; }
.draft-item p { font-size: 12px; }
.spec-tag { display: inline-block; margin: 5px 5px 0 0; padding: 3px 8px; background: #fff0e8; border-radius: 5px; font-size: 11px; }

.brand { display: flex; align-items: center; gap: 9px; font-size: 22px; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.brand .brand-name { color: #fff; white-space: nowrap; }
.avatar img { width: 32px; height: 32px; object-fit: contain; }
@media (max-width: 760px) { .brand { display: inline-flex; font-size: 19px; gap: 6px; } .brand-logo { width: 28px; height: 28px; } }

.send small { display: block; font-size: 9px; font-weight: 400; margin-top: 2px; }
.requests-nav { display: flex; gap: 12px; padding: 14px 13px; font-size: 13px; color: #dddfea; border-radius: 10px; }
.requests-nav:hover { background: #ffffff10; }
.request-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.request-header nav { font-size: 13px; }
.request-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.request-content { display: block; height: auto; max-width: 1150px; margin: auto; padding: 36px 24px; background: none; }
.request-content h1 { font-size: 36px; overflow-wrap: anywhere; }
.request-content > p { color: #727581; }
.request-card, .edit-card { display: block; margin: 20px 0; padding: 22px; background: white; border: 1px solid #e4e4ed; border-radius: 14px; }
.request-card span { display: block; margin-top: 8px; font-size: 12px; color: #727581; }
.request-card p { margin: 12px 0 24px; }
.edit-card label { display: block; font-size: 12px; font-weight: 600; margin: 15px 0; }
.edit-card input, .edit-card textarea { display: block; width: 100%; margin-top: 7px; padding: 10px; border: 1px solid #dcdde6; border-radius: 7px; font-size: 14px; background: #fafafb; }
.edit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.edit-card summary { font-weight: 600; overflow-wrap: anywhere; }
.edit-card summary span { float: right; font-size: 12px; color: #bd481f; }
.table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid #e4e4ed; margin: 28px 0; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 12px; background: white; }
.table-scroll th, .table-scroll td { text-align: left; padding: 14px; border-bottom: 1px solid #eee; min-width: 110px; }
.table-scroll th { background: #fff0e8; }
.edit-heading { font-size: 22px; font-weight: 650; }
@media (max-width: 760px) { .edit-grid { grid-template-columns: 1fr; } .request-header { flex-wrap: wrap; } .sidebar .requests-nav { display: none; } }

@media (max-width: 760px) { .sidebar .requests-nav { display: inline-flex; padding: 9px; font-size: 11px; } .sidebar nav { flex-direction: row; gap: 3px; } .sidebar { padding: 17px 12px; } .brand { font-size: 17px; } }

#document { font-size: 11px; max-width: 100%; color: #727581; }
.attach { cursor: pointer; }
.supplier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.supplier-grid .request-card { margin: 0; }
.supplier-grid h2 { font-size: 20px; font-weight: 650; }
.supplier-grid a { color: #a94322; }
.supplier-grid p { font-size: 12px; }
.edit-card select { display: block; padding: 10px; border: 1px solid #dcdde6; border-radius: 7px; margin-top: 7px; width: 100%; background: #fafafb; }
.form-error { color: #a52d20; background: #fff0ed; padding: 15px; border-radius: 8px; }
.form-notice { background: #fff0e8; padding: 15px; border-radius: 8px; }
@media (max-width: 760px) { .supplier-grid { grid-template-columns: 1fr; } .sidebar nav { float: none; flex-wrap: wrap; margin-top: 12px; } main { height: calc(100dvh - 130px); } .request-content { height: auto; } }
.request-content > .send { display: inline-block; margin-top: 18px; }
.supplier-filter { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; gap: 18px; align-items: end; }
.supplier-filter label { margin: 0; }
.supplier-filter .send { margin-bottom: 1px; }
@media (max-width: 760px) { .supplier-filter { grid-template-columns: 1fr; } }
.source-choice { display: inline-flex !important; align-items: center; gap: 7px; margin: 9px 18px 9px 0 !important; }
.source-choice input { width: auto; display: inline; margin: 0; }
.price-search-form fieldset { margin: 14px 0; }
.price-search-form button { margin: 4px 0; }

.source-chips{display:flex;gap:14px;flex-wrap:wrap;border:0;padding:8px 0}.source-chips label{border:1px solid #d7e0df;border-radius:20px;padding:8px 12px}.source-settings{display:flex;gap:12px;flex-wrap:wrap;font-size:12px}.store-options{max-height:180px;overflow:auto}.store-options label{display:block}.matrix-summary{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.matrix-summary>div{flex:1;min-width:150px;padding:18px;background:#edf3f2;border-radius:12px}.matrix-summary strong,.matrix-summary small{display:block}.matrix-summary strong{font-size:20px;margin-top:7px}.matrix-scroll{overflow:auto;max-height:70vh}.price-matrix{border-collapse:collapse;width:100%;font-size:13px}.price-matrix td,.price-matrix th{padding:12px;border:1px solid #d7e0df;min-width:90px}.price-matrix th{background:#e8f0ee;text-align:left}.price-matrix thead{position:sticky;top:0}.price-matrix td:nth-child(2){min-width:240px}.price-matrix small{display:block;font-size:10px}.matrix-low{background:#dcfce7;color:#14532d}.matrix-high{background:#fee2e2;color:#7f1d1d}.matrix-warning{color:#92400e}.quote-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.quote-form label{display:flex;flex-direction:column;gap:5px}.quote-form input,.quote-form select{padding:9px;border:1px solid #ccd8d5;border-radius:7px}.manual-choices{grid-column:1/-1}.matrix-downloads{display:flex;align-items:center;gap:20px;margin:24px 0}.composer-area{max-height:65vh;overflow:auto}

.composer-area form>label,.composer-area form>input[type=file]{display:block;margin:8px 0}.source-settings label{display:flex;align-items:center;gap:5px}.composer-area form>input[type=file]{max-width:100%;font-size:12px}.source-chips input{accent-color:#eb6838}.composer-area .draft-note{margin:4px 0}.composer-area .source-settings select{max-width:150px}.quote-form button{align-self:end}.matrix-downloads a:not(.send){color:#b4441c}
