:root{
  --bg:#0b0c0c;
  --panel:#121515;
  --panel-2:#171b1b;
  --line:#263030;
  --text:#f5f7f7;
  --muted:#9bacac;
  --green:#13b45c;
  --green-soft:rgba(19,180,92,.14);
  --danger:#ef4444;
  --warning:#f59e0b;
  --shadow:0 18px 40px rgba(0,0,0,.28);
  --radius:20px;
}
*{box-sizing:border-box}
body{margin:0;font-family:"Cairo",system-ui,sans-serif;background:linear-gradient(135deg,#080909,#101413 55%,#0b100d);color:var(--text)}
button,input,select,textarea{font:inherit}
img{max-width:100%;display:block}
.hidden{display:none!important}
.app-shell{display:grid;grid-template-columns:320px 1fr;min-height:100vh}
.sidebar{padding:24px;border-left:1px solid rgba(255,255,255,.06);background:rgba(7,10,10,.8);backdrop-filter:blur(18px);position:sticky;top:0;height:100vh;overflow:auto}
.brand-box,.topbar,.panel-card,.product-card,.selection-panel .panel-card,.sidebar-card,.modal-card{background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));border:1px solid rgba(255,255,255,.07);box-shadow:var(--shadow)}
.brand-box{display:flex;gap:14px;align-items:center;padding:16px;border-radius:24px;margin-bottom:20px}
.brand-logo{width:76px;object-fit:contain;border-radius:16px;background:#fff;padding:8px}
.brand-box h1{margin:0;font-size:24px;line-height:1.1}.brand-box p{margin:5px 0 0;color:var(--muted);font-size:13px}
.side-nav{display:grid;gap:10px;margin-bottom:18px}.nav-btn{padding:14px 16px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:#0f1313;color:var(--text);text-align:right;cursor:pointer}.nav-btn.active{background:linear-gradient(135deg,var(--green-soft),rgba(255,255,255,.03));border-color:rgba(19,180,92,.4);color:#fff}
.sidebar-card,.panel-card{border-radius:22px;padding:18px}.compact{padding:16px}.muted-text{color:var(--muted);font-size:14px;line-height:1.8}
.stat-line{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed rgba(255,255,255,.08)}.stat-line:last-child{border-bottom:0}
.main-content{padding:26px;overflow:auto}
.topbar{padding:20px 24px;border-radius:24px;display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:20px}.topbar h2{margin:0;font-size:29px}.topbar p{margin:6px 0 0;color:var(--muted)}.topbar-actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{border:0;cursor:pointer;border-radius:14px;padding:12px 18px;font-weight:700}.btn.primary{background:linear-gradient(135deg,#16c565,#0c8e45);color:#fff}.btn.secondary{background:#151b1b;color:#fff;border:1px solid rgba(255,255,255,.08)}.btn.ghost{background:transparent;color:var(--muted);border:1px dashed rgba(255,255,255,.12)}.btn.full{width:100%}
.badge{display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700}.badge.success{background:rgba(22,197,101,.14);color:#7ef0af}.badge.warning{background:rgba(245,158,11,.14);color:#ffd180}
.view{display:none}.view.active{display:block}
.toolbar,.form-grid,.inline-actions,.panel-head,.summary-row,.quote-header,.quote-summary,.saved-quote-card .head{display:flex;gap:12px;flex-wrap:wrap}.grid-toolbar{display:grid;grid-template-columns:2fr repeat(5,1fr);gap:12px;margin-bottom:18px}
.field{display:flex;flex-direction:column;gap:8px;min-width:0}.field label{color:var(--muted);font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;background:#0d1111;border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:12px;color:var(--text)}.field.wide{grid-column:span 2}
.products-layout{display:grid;grid-template-columns:1fr 320px;gap:18px}.cards-panel{min-width:0}.products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}
.product-card{border-radius:24px;padding:16px;display:flex;flex-direction:column;gap:12px;min-height:310px;position:relative;overflow:hidden}.product-card::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at top left,rgba(19,180,92,.12),transparent 35%);pointer-events:none}
.product-image{height:180px;border-radius:18px;background:#0b0f0f;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(255,255,255,.05)}.product-image img{width:100%;height:100%;object-fit:contain;background:#fff}.product-placeholder{color:var(--muted);font-size:13px}
.product-card h4{margin:0;font-size:18px;line-height:1.3}.product-code{font-size:12px;color:#b7c7c7;background:rgba(255,255,255,.05);padding:5px 9px;border-radius:999px;display:inline-block}
.meta-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.meta-chip{background:#101515;border:1px solid rgba(255,255,255,.06);padding:8px;border-radius:14px;font-size:12px}.meta-chip strong{display:block;color:#fff}
.product-desc{color:#c6d0d0;font-size:13px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.card-actions{display:flex;gap:8px;margin-top:auto}.card-actions button{flex:1}
.mini-list{display:grid;gap:10px;max-height:460px;overflow:auto}.mini-item{padding:10px 12px;border-radius:14px;background:#0e1313;border:1px solid rgba(255,255,255,.06)}.mini-item strong{display:block}
.quote-workspace{display:grid;gap:16px}.quote-preview-wrap{padding:22px;overflow:auto}
.quote-printable{background:#fff;color:#111;min-height:1122px;max-width:794px;margin:auto;border-radius:12px;overflow:hidden;box-shadow:0 8px 30px rgba(0,0,0,.16)}
.quote-header{padding:26px 28px 20px;justify-content:space-between;align-items:flex-start;gap:18px}.quote-client-block p,.quote-meta p{margin:6px 0;font-size:13px}.quote-logo{width:200px;max-width:100%;background:#fff}.quote-table{width:100%;border-collapse:collapse}.quote-table th,.quote-table td{border:1px solid #d7dede;padding:8px;vertical-align:top;font-size:12px}.quote-table th{background:#eef7f1;color:#0f5132}.quote-thumb{width:120px;height:110px;object-fit:contain;background:#fff}.quote-item-input,.quote-item-textarea{width:100%;border:0;background:transparent;font-size:12px;min-width:70px}.quote-item-textarea{resize:vertical;min-height:78px}.quote-number{width:46px;text-align:center}.quote-summary{padding:22px 28px 16px;justify-content:space-between;align-items:flex-start}.summary-notes{max-width:52%}.summary-notes h4{margin:0 0 10px}.summary-totals{min-width:260px;border:1px solid #dce8df;border-radius:16px;overflow:hidden}.summary-row{justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e8eeee}.summary-row:last-child{border-bottom:0}.summary-row.grand{background:#eef7f1;font-size:16px}
.quote-footer{padding:8px 0 0;margin-top:10px}.quote-footer img{width:100%;height:auto;display:block}

.quote-printable{display:flex;flex-direction:column}
.quote-header{padding:24px 26px 14px;display:grid;grid-template-columns:250px 1fr;align-items:end;border-bottom:2px solid #dbe7df}
.quote-brand-block{display:flex;align-items:flex-start;justify-content:flex-start}
.quote-logo{width:230px;max-width:100%;background:#fff}
.quote-client-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;align-content:start}
.quote-client-block p{margin:0;font-size:12.5px;line-height:1.6}
.quote-table-wrap{padding:0 18px}
.quote-table{table-layout:fixed}
.quote-table th,.quote-table td{padding:6px;font-size:11.5px}
.quote-table .col-no{width:34px}
.quote-table .col-image{width:112px}
.quote-table .col-code{width:88px}
.quote-table .col-description{width:auto}
.quote-table .col-watt{width:58px}
.quote-table .col-ip{width:52px}
.quote-table .col-qty{width:54px}
.quote-table .col-price{width:78px}
.quote-table .col-total{width:92px}
.quote-thumb{width:100px;height:auto;max-height:96px;object-fit:contain;background:#fff;margin:0 auto 6px}
.quote-file-input{width:100%;font-size:10px}
.quote-item-input,.quote-item-textarea{border:1px solid #e3ece6;background:#fff;border-radius:6px;padding:6px}
.quote-name-input{font-weight:700;margin-bottom:6px}
.quote-item-textarea{resize:vertical;min-height:100px;line-height:1.45;white-space:pre-wrap;overflow:visible}
.quote-small-input{min-width:0;text-align:center}
.quote-price-input{text-align:center}
.line-total-cell{font-weight:700;white-space:nowrap;text-align:center;vertical-align:middle}
.cell-image{text-align:center}
.cell-description{padding-inline:8px}
.quote-summary{padding:16px 26px 10px;justify-content:space-between;align-items:flex-start;margin-top:auto}
.summary-notes{max-width:56%}
.quote-footer{padding:0;margin-top:auto}
.quote-footer img{width:100%;height:auto;display:block}

.saved-quotes-list{display:grid;gap:14px}.saved-quote-card{border-radius:18px;padding:16px;background:#0f1414;border:1px solid rgba(255,255,255,.07)}.saved-quote-card .head{justify-content:space-between;align-items:center}.saved-quote-card .meta{color:var(--muted);font-size:13px;margin-top:6px}.saved-quote-card .actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.sync-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:18px}.result-box{margin-top:14px;padding:14px;border-radius:14px;background:#0c1111;border:1px dashed rgba(255,255,255,.08);color:var(--muted);min-height:52px;white-space:pre-wrap}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.65);display:flex;align-items:center;justify-content:center;padding:20px;z-index:30}.modal-card{width:min(1100px,100%);max-height:90vh;overflow:auto;padding:20px;border-radius:24px;background:#0f1414}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.icon-btn{border:0;background:#151a1a;color:#fff;width:40px;height:40px;border-radius:999px;cursor:pointer}
.no-print .btn.small,.btn.small{padding:8px 12px;border-radius:10px;font-size:12px}.inline-actions{margin-top:16px}.upload-btn{position:relative;overflow:hidden}
.overline{letter-spacing:.16em;text-transform:uppercase;font-size:11px;color:#3b7d53;font-weight:800}.muted{color:#6b7280}
@media (max-width:1200px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;border-left:0;border-bottom:1px solid rgba(255,255,255,.06)}.products-layout,.sync-grid{grid-template-columns:1fr}.grid-toolbar{grid-template-columns:repeat(2,1fr)}.field.wide{grid-column:auto}}
@media (max-width:760px){.main-content{padding:14px}.topbar{padding:16px}.grid-toolbar{grid-template-columns:1fr}.products-grid{grid-template-columns:1fr}.quote-printable{width:100%;min-height:auto}.quote-header{grid-template-columns:1fr;padding:16px}.quote-summary{padding:16px}.quote-logo{width:150px}.quote-client-grid{grid-template-columns:1fr}.quote-table{display:block;overflow:auto;white-space:nowrap}}
@media print{body{background:#fff}.sidebar,.topbar,.quote-controls,.no-print,.modal{display:none!important}.main-content{padding:0}.panel-card,.quote-preview-wrap{box-shadow:none;border:0;background:transparent;padding:0}.quote-printable{box-shadow:none;border-radius:0;max-width:none;width:100%}}


/* Quote refinements v3 */
.quote-printable{padding-top:42px;min-height:1122px;display:flex;flex-direction:column;}
.quote-header{padding:0 26px 14px;display:grid;grid-template-columns:260px 1fr;align-items:end;border-bottom:2px solid #dbe7df}
.quote-table-wrap{padding:0 14px}
.quote-table{table-layout:fixed;width:100%}
.quote-table th,.quote-table td{padding:6px 5px;font-size:11px}
.quote-table .col-no{width:34px}
.quote-table .col-image{width:116px}
.quote-table .col-code{width:86px}
.quote-table .col-description{width:auto}
.quote-table .col-watt{width:54px}
.quote-table .col-ip{width:48px}
.quote-table .col-qty{width:52px}
.quote-table .col-price{width:72px}
.quote-table .col-total{width:86px}
.quote-table .col-delete{width:26px}
.cell-image{text-align:center}
.quote-thumb{width:100px;max-width:100px;height:auto;max-height:96px;object-fit:contain;background:#fff;margin:0 auto 6px;display:block}
.quote-file-input{width:100%;font-size:10px}
.cell-description{padding-inline:8px}
.quote-name-input{font-weight:700;margin-bottom:6px}
.quote-item-input,.quote-item-textarea{border:1px solid #e3ece6;background:#fff;border-radius:6px;padding:6px;width:100%;box-sizing:border-box}
.quote-item-textarea{resize:vertical;min-height:150px;line-height:1.55;white-space:pre-wrap;overflow:visible;word-break:break-word}
.quote-code-input,.quote-small-input,.quote-price-input{text-align:center}
.quote-small-input{min-width:0}
.line-total-cell{font-weight:700;white-space:nowrap;text-align:center;vertical-align:middle}
.cell-delete{text-align:center}
.delete-icon-btn{background:transparent;border:0;color:#7a7a7a;font-size:14px;line-height:1;padding:4px;cursor:pointer;border-radius:999px;width:20px;height:20px}
.delete-icon-btn:hover{color:#d11a2a;background:#f5f5f5}
.quote-summary{padding:16px 26px 10px;justify-content:space-between;align-items:flex-start}
.summary-notes{max-width:56%}
.quote-footer{padding:0;margin-top:auto;break-inside:avoid;page-break-inside:avoid}
.quote-footer img{width:100%;height:auto;display:block}
@media print{
  .delete-icon-btn,.quote-file-input,.cell-delete,.col-delete{display:none !important}
  .quote-printable{padding-top:42px;min-height:auto;box-shadow:none;border-radius:0;max-width:none;width:100%}
  .quote-header{padding-top:0}
  .quote-footer{margin-top:24px;position:static !important;bottom:auto !important;left:auto !important;width:100%}
  .quote-table th,.quote-table td{font-size:10.5px}
  .quote-item-input,.quote-item-textarea{border:0 !important;padding:0 !important;background:transparent !important;appearance:none}
  .quote-item-textarea{min-height:unset;height:auto;overflow:visible;resize:none}
}


/* v5 refined benchmark quotation layout */
.quote-a4{font-family:Arial,Helvetica,sans-serif;color:#303030;background:#fff;min-height:1122px;padding:18px 28px 0;box-sizing:border-box;display:flex;flex-direction:column;direction:ltr;width:794px;max-width:100%;margin:0 auto}
.quote-company-header{display:grid;grid-template-columns:1.08fr .92fr;gap:22px;align-items:center}
.company-brand-side{display:flex;align-items:center;border-right:2px solid #138047;padding:6px 22px 6px 0;min-height:92px}
.quote-logo{width:420px;max-width:100%;display:block}
.company-info-side{justify-self:end;text-align:left;font-size:14px;line-height:1.32;color:#4b4b4b;max-width:320px}
.company-name-line{font-size:16px;font-weight:800;color:#138047;margin-bottom:4px}
.quote-green-line{height:2px;background:#138047;margin:14px 0 10px}
.quote-meta-top{display:grid;grid-template-columns:1fr 1.02fr .92fr;gap:18px;align-items:start;margin-bottom:12px}
.quotation-title-block{padding:34px 0 0 18px}
.quotation-label{font-size:27px;font-weight:800;letter-spacing:.01em;color:#138047;margin-bottom:8px}
.quotation-no{font-size:18px;font-weight:700;color:#242424}
.quotation-info-box{border:1.5px solid #bcc3be;border-radius:18px;padding:12px 16px;background:#f8f8f8;box-shadow:inset 0 0 0 1px rgba(255,255,255,.65)}
.info-row{display:grid;grid-template-columns:100px 10px 1fr;gap:6px;font-size:13px;line-height:1.3;padding:2px 0}.info-row span{font-weight:700;color:#2e2e2e}.info-row strong{font-weight:500;color:#474747}
.quotation-client-box{padding-top:14px;font-size:13px;line-height:1.42;text-align:left}
.to-label{font-size:16px;line-height:1;font-weight:800;color:#138047;margin-bottom:8px}
.to-name,.to-project,.to-address,.to-company,.to-attn{margin-bottom:4px}
.benchmark-table-wrap{padding:0}
.benchmark-table{width:100%;border-collapse:collapse;table-layout:fixed}
.benchmark-table th{background:#116c39;color:#fff;border:1px solid #8b948e;font-size:12px;font-weight:700;padding:6px 5px;text-align:center;line-height:1.15}
.benchmark-table td{border:1px solid #b6bbb7;padding:7px 8px;font-size:11px;vertical-align:top;background:#fff;line-height:1.28}
.benchmark-table tbody tr:nth-child(even) td{background:#fbfbfb}
.benchmark-table .col-no{width:4%}.benchmark-table .col-description{width:16%}.benchmark-table .col-image{width:15%}.benchmark-table .col-specs{width:24%}.benchmark-table .col-watt{width:7%}.benchmark-table .col-ip{width:6%}.benchmark-table .col-unit{width:6%}.benchmark-table .col-qty{width:5%}.benchmark-table .col-price{width:8.5%}.benchmark-table .col-total{width:10.5%}.benchmark-table .col-delete{width:0.5%}
.quote-number{text-align:center;vertical-align:middle !important;font-size:16px}
.item-main-cell{padding:12px 8px 8px}
.benchmark-name-input{font-weight:400;font-size:12px;line-height:1.35;padding:0 !important;border:0 !important;background:transparent !important;color:#3b3b3b}
.item-code-line{display:none}
.cell-image{text-align:center;vertical-align:middle;padding:6px}
.quote-thumb{width:100%;max-width:104px;max-height:74px;object-fit:contain;display:block;margin:0 auto 6px}
.quote-file-input{width:100%;font-size:10px}
.cell-specs{padding:8px 10px}
.benchmark-specs-input{min-height:96px;line-height:1.36;border:0 !important;background:transparent !important;padding:0 !important;font-size:11px;resize:vertical;overflow:visible}
.quote-small-input,.quote-price-input{text-align:center;border:0 !important;background:transparent !important;padding:0 !important;font-size:12px}
.line-total-cell{text-align:center;vertical-align:middle !important;font-weight:400;white-space:normal;font-size:12px}
.delete-icon-btn{background:transparent;border:0;color:#8c8c8c;font-size:12px;line-height:1;padding:0;cursor:pointer;width:14px;height:14px;display:block;margin:0 auto}
.quote-bottom-area{display:grid;grid-template-columns:1fr 250px;gap:16px;align-items:end;margin-top:10px;break-inside:avoid;page-break-inside:avoid}
.benchmark-notes{max-width:none;padding-left:6px}.benchmark-notes h4{margin:0 0 8px;font-size:16px;color:#138047;font-weight:700}.note-line{font-size:11px;line-height:1.35;margin-bottom:4px;color:#363636}
.benchmark-totals{margin-left:auto;min-width:250px;border:1px solid #b8c1ba;border-radius:0;overflow:hidden;background:#fff}.benchmark-totals .summary-row{padding:8px 12px;font-size:11px;border-bottom:1px solid #cfd6d1}.benchmark-totals .summary-row span{font-weight:700}.benchmark-totals .grand{background:#116c39;color:#fff;font-size:13px;font-weight:800}.benchmark-totals .grand strong,.benchmark-totals .grand span{color:#fff}
.benchmark-footer{margin-top:auto;padding-top:10px;break-inside:avoid;page-break-inside:avoid}.benchmark-footer img{width:100%;display:block}
@media print{
  .quote-a4{padding:16px 24px 0;min-height:auto;width:100%;max-width:none;box-shadow:none;border-radius:0}
  .quote-preview-wrap,.panel-card{box-shadow:none !important}
  .quote-company-header{grid-template-columns:1.06fr .94fr;gap:18px}
  .company-brand-side{min-height:80px;padding-right:18px}
  .quote-logo{width:360px}
  .company-info-side{font-size:12px;max-width:290px}
  .company-name-line{font-size:15px}
  .quote-meta-top{grid-template-columns:.9fr 1.05fr .95fr;gap:14px;margin-bottom:10px}
  .quotation-title-block{padding-top:26px;padding-left:12px}
  .quotation-label{font-size:24px}.quotation-no{font-size:16px}
  .quotation-info-box{padding:10px 12px}
  .info-row{font-size:11px;grid-template-columns:82px 8px 1fr}
  .quotation-client-box{font-size:11.2px;padding-top:10px}
  .benchmark-table th{font-size:10.2px;padding:5px 4px}.benchmark-table td{font-size:9.7px;padding:5px 5px}
  .quote-thumb{max-width:86px;max-height:62px}
  .benchmark-specs-input{min-height:auto;height:auto;overflow:visible;font-size:9.8px}
  .benchmark-name-input,.quote-small-input,.quote-price-input,.line-total-cell{font-size:10px}
  .quote-bottom-area{grid-template-columns:1fr 218px;gap:12px;margin-top:8px}
  .benchmark-notes h4{font-size:14px}.note-line{font-size:10px;margin-bottom:3px}
  .benchmark-totals{min-width:218px}.benchmark-totals .summary-row{font-size:10px;padding:7px 9px}.benchmark-totals .grand{font-size:12px}
  .delete-icon-btn,.quote-file-input,.cell-delete,.col-delete{display:none !important}
}


/* ===== Exact A4 mm quotation layout ===== */
:root{
  --quote-green-dark:#0F3D2E;
  --quote-green:#116c39;
  --quote-border:#9da7a0;
  --quote-grid:#c9cfcb;
  --quote-row:#f7f8f7;
}

@page{
  size:A4;
  margin:15mm 12mm 15mm 12mm;
}

.quote-preview-wrap.panel-card{
  padding:18px;
}

.quote-a4{
  width:186mm;
  min-height:267mm;
  padding:0;
  background:#fff;
  color:#262626;
  font-family:Arial, Helvetica, sans-serif;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:0;
}

.quote-company-header{
  height:40mm;
  display:grid;
  grid-template-columns:50% 50%;
  align-items:start;
  gap:0;
}
.company-brand-side{
  min-height:40mm;
  height:40mm;
  border-right:0.6mm solid var(--quote-green);
  padding:8mm 5mm 5mm 0;
  box-sizing:border-box;
  display:flex;
  align-items:flex-start;
}
.quote-logo{
  width:auto;
  height:20mm;
  max-width:100%;
  object-fit:contain;
}
.company-info-side{
  height:40mm;
  box-sizing:border-box;
  padding-top:2mm;
  text-align:left;
  justify-self:end;
  max-width:78mm;
  font-size:8.7pt;
  line-height:1.36;
  color:#444;
}
.company-name-line{
  font-size:13pt;
  line-height:1.15;
  font-weight:700;
  color:var(--quote-green);
  margin-bottom:1.6mm;
}
.quote-green-line{
  height:0.7mm;
  background:var(--quote-green);
  margin:0 0 5mm 0;
}

.quote-meta-top{
  height:30mm;
  display:grid;
  grid-template-columns:30% 35% 35%;
  gap:6mm;
  align-items:start;
  margin-bottom:4mm;
}
.quotation-title-block{
  height:30mm;
  padding:4mm 0 0 4mm;
  box-sizing:border-box;
}
.quotation-label{
  font-size:18pt;
  line-height:1;
  font-weight:800;
  color:var(--quote-green);
  letter-spacing:0;
  margin:0 0 3mm 0;
}
.quotation-no{
  font-size:12.5pt;
  line-height:1.1;
  font-weight:700;
  color:#1f1f1f;
}
.quotation-info-box{
  height:30mm;
  border:0.45mm solid #b7bbb8;
  border-radius:5mm;
  background:#fafafa;
  box-shadow:none;
  padding:3.5mm 4mm;
  box-sizing:border-box;
}
.info-row{
  display:grid;
  grid-template-columns:27mm 3mm 1fr;
  gap:0.5mm;
  align-items:start;
  font-size:8.5pt;
  line-height:1.28;
  padding:0 0 0.8mm 0;
}
.info-row span{font-weight:700;color:#232323}
.info-row strong{font-weight:500;color:#3d3d3d}
.quotation-client-box{
  height:30mm;
  padding:2mm 0 0 2mm;
  box-sizing:border-box;
  text-align:left;
  font-size:9pt;
  line-height:1.4;
}
.to-label{
  font-size:13.5pt;
  line-height:1;
  font-weight:800;
  color:var(--quote-green);
  margin:0 0 2mm 0;
}
.to-name,.to-project,.to-address,.to-company,.to-attn{margin-bottom:1mm}

.benchmark-table-wrap{
  flex:1 1 auto;
  min-height:0;
  margin-top:0.5mm;
}
.benchmark-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  border:0.35mm solid var(--quote-border);
}
.benchmark-table th,
.benchmark-table td{
  border:0.18mm solid var(--quote-grid);
}
.benchmark-table th{
  background:var(--quote-green-dark);
  color:#fff;
  font-size:8.8pt;
  line-height:1.1;
  font-weight:700;
  text-align:center;
  padding:2.4mm 1.2mm;
  height:11mm;
  box-sizing:border-box;
}
.benchmark-table td{
  background:#fff;
  font-size:8.6pt;
  line-height:1.24;
  padding:1.3mm 1.6mm;
  vertical-align:top;
  box-sizing:border-box;
}
.benchmark-table tbody tr:nth-child(even) td{
  background:var(--quote-row);
}
.benchmark-table tbody tr{
  min-height:19mm;
}
.benchmark-table .col-no{width:2.61%}
.benchmark-table .col-image{width:9.57%}
.benchmark-table .col-description{width:26.09%}
.benchmark-table .col-specs{width:19.57%}
.benchmark-table .col-watt{width:6.52%}
.benchmark-table .col-ip{width:6.52%}
.benchmark-table .col-unit{width:5.22%}
.benchmark-table .col-qty{width:5.22%}
.benchmark-table .col-price{width:8.70%}
.benchmark-table .col-total{width:10%}
.benchmark-table .col-delete{width:0.4%}

.quote-number{
  text-align:center;
  vertical-align:middle !important;
  font-size:9pt;
  padding:0.8mm 0.6mm !important;
}
.item-main-cell{
  padding:2mm 1.8mm !important;
}
.benchmark-name-input{
  font-size:9.4pt;
  line-height:1.26;
  font-weight:400;
  min-height:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.cell-image{
  text-align:center;
  vertical-align:middle !important;
  padding:1.2mm 0.8mm !important;
}
.quote-thumb{
  width:18.5mm;
  max-width:18.5mm;
  max-height:16.5mm;
  height:auto;
  object-fit:contain;
  margin:0 auto 1mm;
  display:block;
}
.quote-file-input{width:100%;font-size:7pt}
.cell-specs{
  padding:1.4mm 2mm !important;
}
.benchmark-specs-input{
  min-height:16mm;
  font-size:8pt;
  line-height:1.22;
  white-space:pre-wrap;
  overflow:visible;
  resize:vertical;
}
.benchmark-specs-input::placeholder{color:#777}
.quote-small-input,
.quote-price-input{
  text-align:center;
  font-size:9pt;
  font-weight:700;
  line-height:1.15;
}
.line-total-cell{
  text-align:center;
  vertical-align:middle !important;
  font-size:9pt;
  font-weight:700;
}
.delete-icon-btn{
  width:3.8mm;
  height:3.8mm;
  font-size:8pt;
  color:#8a8a8a;
}

.quote-bottom-area{
  display:grid;
  grid-template-columns:1fr 70mm;
  gap:5mm;
  align-items:end;
  margin-top:3mm;
  break-inside:avoid;
  page-break-inside:avoid;
}
.benchmark-notes{
  padding-left:1.2mm;
}
.benchmark-notes h4{
  margin:0 0 1.6mm 0;
  font-size:10pt;
  line-height:1;
  color:var(--quote-green);
  font-weight:700;
}
.note-line{
  font-size:8pt;
  line-height:1.35;
  margin-bottom:0.9mm;
}
.benchmark-totals{
  width:70mm;
  min-width:70mm;
  margin-left:auto;
  border:0.35mm solid var(--quote-border);
}
.benchmark-totals .summary-row{
  min-height:8mm;
  padding:1.8mm 3mm;
  font-size:8.8pt;
  line-height:1.15;
  border-bottom:0.18mm solid var(--quote-grid);
}
.benchmark-totals .summary-row span,
.benchmark-totals .summary-row strong{font-weight:700}
.benchmark-totals .grand{
  min-height:14mm;
  background:var(--quote-green-dark);
  color:#fff;
  font-size:10.6pt;
  font-weight:800;
  display:flex;
  align-items:center;
}
.benchmark-totals .grand span,
.benchmark-totals .grand strong{color:#fff}

.benchmark-footer{
  margin-top:auto;
  min-height:27mm;
  padding-top:4mm;
  break-inside:avoid;
  page-break-inside:avoid;
}
.benchmark-footer img{
  width:100%;
  height:auto;
  display:block;
}

.quote-item-input,
.quote-item-textarea{
  border:0 !important;
  background:transparent !important;
  border-radius:0;
  padding:0 !important;
  box-shadow:none !important;
}
.quote-item-textarea{resize:vertical}
.quote-item-input:focus,
.quote-item-textarea:focus{
  outline:0.25mm dashed rgba(15,61,46,.25);
  outline-offset:0.5mm;
}

@media screen and (max-width:1100px){
  .quote-a4{width:100%;min-height:auto}
}

@media print{
  html,body{width:210mm;height:297mm;background:#fff}
  .main-content{padding:0 !important}
  .quote-preview-wrap.panel-card{padding:0 !important}
  .quote-a4{
    width:186mm;
    min-height:267mm;
    margin:0;
    padding:0;
    box-shadow:none !important;
  }
  .quote-company-header{height:40mm}
  .quotation-info-box,.quotation-client-box,.quotation-title-block{height:30mm}
  .benchmark-table th{font-size:8.2pt}
  .benchmark-table td{font-size:8pt}
  .benchmark-specs-input{font-size:7.6pt;min-height:auto;height:auto;overflow:visible;resize:none}
  .benchmark-name-input,.quote-small-input,.quote-price-input,.line-total-cell{font-size:8.4pt}
  .quote-thumb{width:18mm;max-width:18mm;max-height:16mm}
  .delete-icon-btn,.quote-file-input,.cell-delete,.col-delete{display:none !important}
}


/* ===== Screen editing mode + PDF export exact mode ===== */
.quote-workspace{display:grid;gap:16px}
.quote-preview-wrap.panel-card{padding:16px;background:linear-gradient(180deg,#f3f6f4,#eef2ef);overflow:auto}
#quotePrintable.quote-a4{
  width:100%;
  min-height:auto;
  max-width:none;
  padding:14px;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
#quotePrintable .benchmark-table-wrap{overflow:auto}
#quotePrintable .benchmark-table{min-width:1200px}

.pdf-export-root{
  position:fixed;
  left:-10000px;
  top:0;
  width:210mm;
  padding:15mm 12mm;
  background:#fff;
  z-index:-1;
}
.pdf-export-root .quote-a4{
  width:186mm !important;
  min-height:267mm !important;
  max-width:none !important;
  padding:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
}
.pdf-export-root .benchmark-table{min-width:0 !important}
.pdf-export-root .no-print,
.pdf-export-root .col-delete,
.pdf-export-root .cell-delete,
.pdf-export-root .quote-file-input{display:none !important}
.pdf-export-root .quote-item-input,
.pdf-export-root .quote-item-textarea{
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  box-shadow:none !important;
}
.pdf-export-root .quote-item-textarea{resize:none !important; min-height:auto !important}
