:root { --ink:#17232c; --muted:#68757e; --line:#dbe1e3; --soft:#f3f6f5; --accent:#d54e43; --green:#184b48; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:#e8eeec; font-family:"DM Sans",Arial,sans-serif; }
button,input,textarea { font:inherit; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:270px 1fr; }
.editor-panel { background:var(--green); color:#fff; padding:42px 30px; }
.brand-mark { display:flex; align-items:center; gap:10px; margin-bottom:74px; letter-spacing:.16em; font-size:11px; font-weight:700; }
.brand-mark span { border:1px solid #a2bbb7; width:36px; height:36px; display:grid; place-items:center; font-size:13px; letter-spacing:0; }
.brand-mark small { font-size:10px; color:#c6d5d2; }
.editor-panel h1 { font-family:"Playfair Display",Georgia,serif; font-size:32px; line-height:1.05; margin:0 0 14px; }
.intro { color:#c6d5d2; font-size:14px; line-height:1.6; margin:0 0 30px; }
.action-stack { display:grid; gap:10px; }
button { cursor:pointer; border:0; border-radius:2px; font-weight:700; }
.primary-action { background:#f7f3e9; color:var(--green); padding:15px; text-align:left; display:flex; justify-content:space-between; }
.primary-action span { font-size:18px; line-height:12px; }
.pdf-action { background:var(--accent); color:#fff; padding:14px 15px; text-align:left; display:flex; justify-content:space-between; }
.pdf-action span { font-size:18px; line-height:12px; }
.secondary-action { background:transparent; color:#dbe7e4; border:1px solid #6f9791; padding:13px; }
.tip { border-top:1px solid #55807a; margin-top:32px; padding-top:20px; }
.saved-section { border-top:1px solid #55807a; margin-top:22px; padding-top:20px; }
.saved-section > strong { font-size:12px; text-transform:uppercase; letter-spacing:.12em; }
.saved-list { margin-top:14px; display:grid; gap:8px; max-height:340px; overflow-y:auto; padding-right:4px; }
.saved-empty { color:#c6d5d2; font-size:12px; margin:0; }
.saved-item { display:flex; align-items:stretch; gap:6px; }
.saved-item.active .saved-open { border-color:#f7f3e9; }
.saved-open { flex:1; min-width:0; background:#ffffff12; border:1px solid #6f9791; color:#fff; text-align:left; padding:9px 11px; display:grid; gap:3px; font-weight:400; }
.saved-open:hover { background:#ffffff22; }
.saved-open strong { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.saved-open span { font-size:11px; color:#c6d5d2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.saved-delete { background:transparent; border:1px solid #6f9791; color:#dbe7e4; width:30px; font-size:16px; line-height:1; }
.saved-delete:hover { background:var(--accent); border-color:var(--accent); color:#fff; }
.tip strong { font-size:12px; text-transform:uppercase; letter-spacing:.12em; }.tip p { color:#c6d5d2; font-size:12px; line-height:1.55; }
.workspace { padding:42px; overflow:auto; display:flex; justify-content:center; align-items:flex-start; }
.quote-page { width:820px; min-height:1120px; background:#fff; box-shadow:0 12px 36px #52605d33; padding:60px 64px 38px; }
.quote-header { display:flex; justify-content:space-between; align-items:flex-start; border-bottom:3px solid var(--ink); padding-bottom:27px; }
.eyebrow,.section-label { color:var(--accent); text-transform:uppercase; letter-spacing:.15em; font-size:10px; font-weight:700; margin:0 0 7px; }.quote-header h2 { margin:0; font-family:"Playfair Display",Georgia,serif; font-size:48px; line-height:1; }.quote-subtitle { color:var(--muted); margin:8px 0 0; font-size:13px; }.company-logo { width:158px; height:auto; object-fit:contain; }
.client-section,.cost-section,.details-section,.materials-section { padding-top:29px; }.client-grid { display:grid; grid-template-columns:1fr 1fr; gap:19px 28px; }.client-grid label,.completion-line label,.job-notes { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }.client-grid input,.completion-line input,.job-notes textarea,.other-material input[type=text] { display:block; width:100%; border:0; border-bottom:1px solid #aeb9bc; padding:7px 0 6px; outline:0; color:var(--ink); background:transparent; font-size:14px; text-transform:none; letter-spacing:0; }.client-grid input:focus,.completion-line input:focus,.job-notes textarea:focus,.other-material input[type=text]:focus { border-color:var(--accent); }.client-grid input::placeholder,input::placeholder,textarea::placeholder { color:#a4afb2; }
.section-heading { display:flex; justify-content:space-between; align-items:end; }.section-heading h3 { font-family:"Playfair Display",Georgia,serif; margin:0; font-size:23px; }.currency-pill { background:var(--green); color:#fff; font-size:11px; font-weight:700; letter-spacing:.1em; padding:7px 10px; }.cost-table { margin-top:18px; }.cost-row,.total-row { display:grid; grid-template-columns:1fr 140px; align-items:center; }.cost-row { grid-template-columns:1fr 80px 130px 28px; gap:8px; }.column-head .qty-head { text-align:center; }.column-head .amount-head { text-align:right; }.column-head { color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; padding:0 10px 7px; }.cost-row:not(.column-head) { min-height:38px; background:var(--soft); margin-bottom:3px; padding:0 10px; }.cost-row input { border:0; background:transparent; outline:0; padding:8px 0; width:100%; color:var(--ink); }.cost-row .item-name { font-weight:600; }.amount-input { text-align:right; }.total-row { padding:14px 10px 0; font-size:16px; font-weight:700; text-transform:uppercase; }.total-row strong { text-align:right; color:var(--accent); font-size:20px; }
.line-row .item-name { line-height:1.25; padding:6px 0; }
.item-name small { display:block; color:var(--muted); font-weight:400; font-size:11px; margin-top:2px; }
.qty-input { width:100%; text-align:center; border:1px solid var(--line); border-radius:2px; background:#fff; padding:6px 2px; outline:0; color:var(--ink); }
.qty-input:focus { border-color:var(--accent); }
.qty-input::-webkit-outer-spin-button,.qty-input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.qty-input[type=number] { -moz-appearance:textfield; appearance:textfield; }
.line-total { text-align:right; font-weight:600; }
.remove-line { background:transparent; color:var(--muted); font-size:17px; line-height:1; padding:4px; border-radius:2px; }
.remove-line:hover { background:var(--accent); color:#fff; }
.custom-line .name-input { border:0; border-bottom:1px solid #aeb9bc; background:transparent; outline:0; width:100%; padding:3px 0; font-weight:600; color:var(--ink); }
.custom-line .name-input:focus { border-color:var(--accent); }
.custom-line .price-input { border:0; border-bottom:1px solid #aeb9bc; background:transparent; outline:0; width:64px; padding:1px 0; font-size:11px; color:var(--ink); }
.custom-line .price-input:focus { border-color:var(--accent); }
#costRows:empty::after { content:"No items yet — tap items in the price list below to add them."; display:block; color:var(--muted); font-size:12px; padding:10px; background:var(--soft); }
.catalog { margin-top:20px; border:1px dashed #aeb9bc; border-radius:2px; padding:14px 14px 4px; background:#fbfcfc; }
.catalog-hint { margin:0 0 12px; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); }
.catalog-group { margin-bottom:12px; }
.catalog-title { margin:0 0 6px; font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.catalog-items { display:flex; flex-wrap:wrap; gap:6px; }
.catalog-item { background:#fff; border:1px solid var(--line); border-radius:2px; padding:6px 10px; text-align:left; font-weight:600; font-size:12px; color:var(--ink); display:grid; gap:1px; }
.catalog-item small { color:var(--muted); font-weight:400; font-size:10px; }
.catalog-item:hover { border-color:var(--accent); }
.catalog-item.in-quote { border-color:var(--green); background:#eaf2ef; }
.catalog-item.in-quote span::before { content:"✓ "; color:var(--green); }
.compact { justify-content:flex-start; }.completion-line { margin-top:18px; }.completion-line input { display:inline-block; width:175px; margin-left:10px; }.job-notes { display:block; margin-top:20px; }.job-notes textarea { resize:vertical; line-height:1.4; padding-top:9px; }.materials-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:18px; }.material-check,.other-material { display:flex; gap:8px; align-items:center; font-size:13px; }.material-check input,.other-material input[type=checkbox] { accent-color:var(--accent); width:15px; height:15px; }.other-material { margin-top:16px; width:50%; border-bottom:1px solid var(--line); padding-bottom:5px; }.other-material span { white-space:nowrap; }.other-material input[type=text] { padding:3px 0; border-bottom:0; }
.quote-footer { display:flex; justify-content:space-between; align-items:flex-end; border-top:1px solid var(--line); margin-top:42px; padding-top:18px; color:var(--muted); font-size:10px; line-height:1.5; }.quote-footer strong { color:var(--ink); display:block; font-size:11px; }.quote-number { font-size:10px; color:var(--muted); letter-spacing:.1em; }.quote-number input { border:0; border-bottom:1px solid var(--line); width:70px; padding:2px; color:var(--ink); font-weight:700; outline:0; }
@media (max-width:800px) {
  .app-shell{grid-template-columns:1fr}.editor-panel{padding:24px}.brand-mark{margin-bottom:28px}.workspace{padding:12px}.quote-page{width:100%;min-height:0;padding:28px 16px}.company-logo{width:120px}.quote-header h2{font-size:39px}.client-grid,.materials-grid{grid-template-columns:1fr}.other-material{width:100%}
  /* Phone-friendly cost table & price list */
  .cost-row { grid-template-columns:1fr 62px 88px 26px; gap:6px; }
  .cost-row .item-name { font-size:13px; }
  .line-total { font-size:13px; }
  .qty-input { font-size:16px; padding:10px 2px; }
  .client-grid input,.completion-line input,.job-notes textarea,.custom-line .name-input,.custom-line .price-input { font-size:16px; }
  .catalog { padding:12px 10px 2px; }
  .catalog-item { padding:11px 12px; font-size:13px; min-height:44px; }
  .catalog-item small { font-size:11px; }
  .remove-line { padding:8px 6px; font-size:19px; }
}
@page { size:A4 portrait; margin:0; }
@media print {
  html,body { width:210mm; height:297mm; background:#fff; overflow:hidden; }
  .no-print { display:none!important; }
  .app-shell,.workspace { display:block; margin:0; padding:0; }
  .quote-page { width:210mm; min-height:0; height:297mm; overflow:hidden; box-shadow:none; padding:10mm 12mm 7mm; }
  .quote-header { padding-bottom:14px; }
  .quote-header h2 { font-size:36px; }
  .quote-subtitle { margin-top:4px; font-size:11px; }
  .company-logo { width:112px; flex:0 0 112px; }
  .client-section,.cost-section,.details-section,.materials-section { padding-top:13px; }
  .client-grid { gap:11px 22px; }
  .client-grid label,.completion-line label,.job-notes { font-size:9px; }
  .client-grid input,.completion-line input,.job-notes textarea,.other-material input[type=text] { padding:4px 0; font-size:12px; }
  .section-heading h3 { font-size:18px; }
  .section-label { font-size:8px; margin-bottom:4px; }
  .currency-pill { font-size:9px; padding:5px 8px; }
  .cost-table { margin-top:9px; }
  .cost-row,.total-row { grid-template-columns:1fr 112px; }
  .cost-row { grid-template-columns:1fr 60px 100px; gap:6px; }
  .item-name small { font-size:9px; margin-top:0; }
  .line-row .item-name { padding:3px 0; }
  .qty-input { border:0; background:transparent; padding:4px 0; font-size:12px; }
  .line-total { font-size:12px; }
  .custom-line .price-input { border-bottom:0; font-size:9px; }
  .custom-line .name-input { border-bottom:0; font-size:12px; }
  #costRows:empty::after { content:none; }
  .column-head { padding:0 8px 4px; font-size:8px; }
  .cost-row:not(.column-head) { min-height:24px; margin-bottom:2px; padding:0 8px; }
  .cost-row input { padding:4px 0; font-size:12px; }
  .cost-row .item-name { font-size:12px; }
  .total-row { padding:8px 8px 0; font-size:13px; }
  .total-row strong { font-size:16px; }
  .completion-line { margin-top:9px; }
  .completion-line input { width:130px; margin-left:6px; }
  .job-notes { margin-top:10px; }
  .job-notes textarea { min-height:30px; max-height:30px; line-height:1.25; padding-top:5px; }
  .materials-grid { grid-template-columns:repeat(3,1fr); gap:7px 10px; margin-top:10px; }
  .material-check,.other-material { gap:5px; font-size:11px; }
  .material-check input,.other-material input[type=checkbox] { width:12px; height:12px; }
  .other-material { margin-top:9px; padding-bottom:3px; }
  .quote-footer { margin-top:14px; padding-top:10px; font-size:8px; }
  .quote-footer strong { font-size:9px; }
  .quote-number { font-size:8px; }
}
