/* Quotes page — desktop operational structure.
   Uses the shared BLC theme, layout and typography tokens without redefining them. */

#quotes.quotes-page .quotes-header-copy{
  min-width:0;
}

#quotes.quotes-page .quotes-overview{
  min-width:0;
}

#quotes.quotes-page .quotes-action-card{
  min-width:0;
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  grid-template-areas:
    "icon copy"
    "button button";
  align-items:center;
  gap:var(--ui-space-3,12px) var(--ui-space-4,16px);
}

#quotes.quotes-page .quotes-action-icon{
  grid-area:icon;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line,var(--border)));
  border-radius:12px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
}

#quotes.quotes-page .quotes-action-icon svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#quotes.quotes-page .quotes-action-copy{
  grid-area:copy;
  min-width:0;
}

#quotes.quotes-page .quotes-action-copy strong,
#quotes.quotes-page .quotes-action-copy small{
  display:block;
}

#quotes.quotes-page .quotes-action-copy strong{
  color:var(--text-primary,var(--text));
  font-size:var(--type-lg);
  line-height:var(--leading-tight);
}

#quotes.quotes-page .quotes-action-copy small{
  margin-top:var(--ui-space-1,4px);
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  line-height:var(--leading-body);
}

#quotes.quotes-page .quotes-action-card #addQuoteBtn{
  grid-area:button;
  width:100%;
  min-height:var(--ui-control-height,40px);
  margin-top:var(--ui-space-1,4px);
}

#quotes.quotes-page .quotes-overview{
  direction:ltr;
}

#quotes.quotes-page .quotes-overview>*{
  direction:rtl;
}

#quotes.quotes-page .quotes-summary-metrics{
  direction:rtl;
}

#quotes.quotes-page .quotes-summary-metrics article{
  min-width:0;
}

#quotes.quotes-page .quotes-kpi-card{
  position:relative;
  overflow:hidden;
  gap:var(--ui-space-2,8px);
  border-color:var(--line,var(--border));
  background:var(--card-bg,var(--surface));
}

#quotes.quotes-page .quotes-kpi-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:2px;
  background:var(--quote-kpi-accent,var(--accent));
  opacity:.82;
}

#quotes.quotes-page .quotes-kpi-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--ui-space-3,12px);
}

#quotes.quotes-page .quotes-kpi-head>span{
  min-width:0;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-sm);
  font-weight:700;
  line-height:var(--leading-ui);
}

#quotes.quotes-page .quotes-kpi-icon{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:color-mix(in srgb,var(--quote-kpi-accent,var(--accent)) 12%,transparent);
  color:var(--quote-kpi-accent,var(--accent));
}

#quotes.quotes-page .quotes-kpi-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#quotes.quotes-page .quotes-kpi-card>strong{
  display:block;
  margin:0;
  color:var(--text-primary,var(--text));
  font-size:var(--type-metric);
  font-weight:800;
  line-height:1.1;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

#quotes.quotes-page .quotes-kpi-context{
  display:block;
  min-height:calc(var(--type-xs) * var(--leading-ui));
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  line-height:var(--leading-ui);
}

#quotes.quotes-page .quotes-kpi-value{
  --quote-kpi-accent:var(--accent);
  background:linear-gradient(145deg,var(--card-bg,var(--surface)),color-mix(in srgb,var(--accent) 7%,var(--card-bg,var(--surface))));
}

#quotes.quotes-page .quotes-kpi-approved{
  --quote-kpi-accent:var(--success);
}

#quotes.quotes-page .quotes-kpi-pending{
  --quote-kpi-accent:var(--warning);
}

#quotes.quotes-page .quotes-kpi-month{
  --quote-kpi-accent:var(--accent);
}

#quotes.quotes-page .quotes-toolbar{
  min-width:0;
  padding:var(--ui-space-3,12px);
  border:1px solid var(--line,var(--border));
  border-radius:var(--ui-toolbar-radius,12px);
  background:var(--card-bg,var(--surface));
  box-shadow:var(--ui-card-shadow);
  transition:border-color .18s ease,box-shadow .18s ease;
}

#quotes.quotes-page .quotes-toolbar.has-active-filters{
  border-color:color-mix(in srgb,var(--accent) 34%,var(--line,var(--border)));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 7%,transparent);
}

#quotes.quotes-page .quotes-toolbar-controls{
  min-width:0;
  display:grid;
  align-items:end;
  gap:var(--ui-space-3,12px);
}

#quotes.quotes-page .quotes-search-field,
#quotes.quotes-page .quotes-filter-field{
  min-width:0;
  margin:0;
  display:grid;
  gap:var(--ui-space-1,4px);
}

#quotes.quotes-page .quotes-control-label{
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  font-weight:700;
  line-height:var(--leading-ui);
}

#quotes.quotes-page .quotes-search-control{
  position:relative;
  display:block;
}

#quotes.quotes-page .quotes-search-control input,
#quotes.quotes-page .quotes-filter-field select{
  width:100%;
  min-height:var(--ui-control-height,40px);
  margin:0;
  background:var(--input-bg,var(--surface));
}

#quotes.quotes-page .quotes-search-control input{
  padding-left:42px;
}

#quotes.quotes-page .quotes-search-control svg{
  position:absolute;
  left:13px;
  top:50%;
  width:18px;
  height:18px;
  transform:translateY(-50%);
  fill:none;
  stroke:var(--text-muted,var(--muted));
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}

#quotes.quotes-page .quotes-reset-btn{
  min-height:var(--ui-control-height,40px);
  margin:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:var(--ui-space-2,8px);
  white-space:nowrap;
}

#quotes.quotes-page .quotes-reset-btn svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#quotes.quotes-page .quotes-toolbar-meta{
  min-height:26px;
  margin-top:var(--ui-space-3,12px);
  padding-top:var(--ui-space-2,8px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--ui-space-3,12px);
  border-top:1px solid var(--line,var(--border));
}

#quotes.quotes-page .quotes-results-count{
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  font-weight:700;
  font-variant-numeric:tabular-nums;
}

#quotes.quotes-page .quotes-active-filters{
  max-width:60%;
  padding:4px 9px;
  overflow:hidden;
  border-radius:999px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
  font-size:var(--type-xs);
  font-weight:700;
  line-height:var(--leading-ui);
  text-overflow:ellipsis;
  white-space:nowrap;
}

#quotes.quotes-page .quotes-table-shell{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--line,var(--border));
  border-radius:var(--ui-card-radius,13px);
  background:var(--card-bg,var(--surface));
  box-shadow:var(--ui-card-shadow);
}

#quotes.quotes-page .quotes-table-scroll{
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-gutter:stable;
}

#quotes.quotes-page .quotes-table{
  width:100%;
  min-width:1080px;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  color:var(--text-primary,var(--text));
  background:transparent;
}

#quotes.quotes-page .quotes-table th,
#quotes.quotes-page .quotes-table td{
  text-align:right;
  vertical-align:middle;
}

#quotes.quotes-page .quotes-table th{
  height:48px;
  padding:10px 12px;
  border-bottom:1px solid var(--line,var(--border));
  background:var(--card-muted,var(--surface-soft));
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs)!important;
  font-weight:800;
  line-height:var(--leading-ui)!important;
  white-space:nowrap;
}

#quotes.quotes-page .quotes-table th:nth-child(1){width:13%}
#quotes.quotes-page .quotes-table th:nth-child(2){width:13%}
#quotes.quotes-page .quotes-table th:nth-child(3){width:15%}
#quotes.quotes-page .quotes-table th:nth-child(4){width:10%}
#quotes.quotes-page .quotes-table th:nth-child(5){width:10%}
#quotes.quotes-page .quotes-table th:nth-child(6){width:10%}
#quotes.quotes-page .quotes-table th:nth-child(7){width:12%}
#quotes.quotes-page .quotes-table th:nth-child(8){width:9%}
#quotes.quotes-page .quotes-table th:nth-child(9){width:8%}

#quotes.quotes-page .quotes-table td{
  height:72px;
  padding:12px;
  border-bottom:1px solid var(--line,var(--border));
  font-size:var(--type-sm)!important;
  line-height:var(--leading-ui)!important;
  transition:background-color .16s ease;
}

#quotes.quotes-page .quote-table-row:last-child td{
  border-bottom:0;
}

#quotes.quotes-page .quote-table-row{
  cursor:pointer;
  outline:0;
}

#quotes.quotes-page .quote-table-row:hover td{
  background:var(--card-hover,var(--surface-soft));
}

#quotes.quotes-page .quote-table-row:focus-visible td{
  background:color-mix(in srgb,var(--accent) 6%,var(--card-bg,var(--surface)));
  box-shadow:inset 0 2px 0 color-mix(in srgb,var(--accent) 46%,transparent),inset 0 -2px 0 color-mix(in srgb,var(--accent) 46%,transparent);
}

#quotes.quotes-page .quote-table-row:focus-visible td:first-child{
  box-shadow:inset -2px 0 0 color-mix(in srgb,var(--accent) 46%,transparent),inset 0 2px 0 color-mix(in srgb,var(--accent) 46%,transparent),inset 0 -2px 0 color-mix(in srgb,var(--accent) 46%,transparent);
}

#quotes.quotes-page .quote-table-row:focus-visible td:last-child{
  box-shadow:inset 2px 0 0 color-mix(in srgb,var(--accent) 46%,transparent),inset 0 2px 0 color-mix(in srgb,var(--accent) 46%,transparent),inset 0 -2px 0 color-mix(in srgb,var(--accent) 46%,transparent);
}

#quotes.quotes-page .quote-number-cell,
#quotes.quotes-page .quote-payment-cell{
  min-width:0;
  display:flex;
  align-items:center;
}

#quotes.quotes-page .quote-number-cell{
  gap:10px;
}

#quotes.quotes-page .quote-number-cell>i{
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
}

#quotes.quotes-page .quote-number-cell svg,
#quotes.quotes-page .quote-table-action svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#quotes.quotes-page .quote-number-cell>span,
#quotes.quotes-page .quote-payment-cell{
  min-width:0;
  flex-direction:column;
  align-items:flex-start;
}

#quotes.quotes-page .quote-number-cell strong,
#quotes.quotes-page .quote-number-cell small,
#quotes.quotes-page .quote-payment-cell strong,
#quotes.quotes-page .quote-payment-cell small{
  display:block;
  max-width:100%;
}

#quotes.quotes-page .quote-number-cell strong{
  overflow:hidden;
  color:var(--accent);
  font-weight:800;
  direction:ltr;
  text-align:right;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#quotes.quotes-page .quote-number-cell small,
#quotes.quotes-page .quote-payment-cell small{
  margin-top:2px;
  overflow:hidden;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  line-height:var(--leading-ui);
  text-overflow:ellipsis;
  white-space:nowrap;
}

#quotes.quotes-page .quote-customer-cell,
#quotes.quotes-page .quote-event-cell,
#quotes.quotes-page .quote-total-cell{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#quotes.quotes-page .quote-customer-cell{
  font-weight:750;
}

#quotes.quotes-page .quote-event-cell,
#quotes.quotes-page .quote-date-cell,
#quotes.quotes-page .quote-empty-value{
  color:var(--text-muted,var(--muted));
}

#quotes.quotes-page .quote-date-cell,
#quotes.quotes-page .quote-total-cell,
#quotes.quotes-page .quote-payment-cell{
  font-variant-numeric:tabular-nums;
}

#quotes.quotes-page .quote-date-cell time{
  white-space:nowrap;
}

#quotes.quotes-page .quote-total-cell,
#quotes.quotes-page .quote-payment-cell strong{
  font-weight:800;
  white-space:nowrap;
}

#quotes.quotes-page .quotes-table .status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  white-space:nowrap;
}

#quotes.quotes-page .quotes-actions-heading{
  text-align:center;
}

#quotes.quotes-page .quote-table-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}

#quotes.quotes-page .quote-table-action{
  width:32px;
  height:32px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:var(--text-muted,var(--muted));
}

#quotes.quotes-page .quote-table-action:hover{
  border-color:var(--line-strong,var(--border-strong));
  background:var(--card-muted,var(--surface-soft));
  color:var(--text-primary,var(--text));
}

#quotes.quotes-page .quote-more-action{
  border-color:var(--line,var(--border));
  background:var(--card-bg,var(--surface));
}

#quotes.quotes-page .quotes-empty-row td{
  height:auto;
  padding:0;
  border-bottom:0;
}

#quotes.quotes-page .quotes-empty-row .empty-state{
  margin:0;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

.quote-modal-card{
  width:min(1120px,calc(100vw - 40px));
  max-height:min(92vh,940px);
  padding:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  border-radius:var(--ui-card-radius,18px);
  background:var(--card-bg,var(--surface));
  color:var(--text-primary,var(--text));
}

.quote-modal-head{
  min-width:0;
  margin:0;
  padding:20px 24px;
  align-items:flex-start;
  gap:var(--ui-space-4,16px);
  border-bottom:1px solid var(--line,var(--border));
  background:var(--card-bg,var(--surface));
}

.quote-modal-head>div{
  min-width:0;
}

.quote-modal-head h3{
  margin:2px 0 0;
  color:var(--text-primary,var(--text));
  font-size:var(--type-xl);
  line-height:var(--leading-tight);
}

.quote-modal-head p{
  margin:6px 0 0;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-sm);
  line-height:var(--leading-body);
}

.quote-modal-form{
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
}

.quote-form-scroll{
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:20px 24px 24px;
  scrollbar-gutter:stable;
}

.quote-modal-form.is-loading .quote-form-scroll{
  opacity:.64;
  pointer-events:none;
}

.quote-form-layout{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,310px);
  gap:var(--ui-space-4,16px);
  align-items:start;
}

.quote-form-main{
  min-width:0;
  display:grid;
  gap:var(--ui-space-4,16px);
}

.quote-form-section,
.quote-summary-panel{
  min-width:0;
  border:1px solid var(--line,var(--border));
  border-radius:var(--ui-card-radius,13px);
  background:var(--card-bg,var(--surface));
  box-shadow:var(--ui-card-shadow);
}

.quote-form-section{
  padding:18px;
}

.quote-section-heading{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:var(--ui-space-3,12px);
  margin-bottom:var(--ui-space-4,16px);
}

.quote-section-heading>span:first-child{
  width:30px;
  height:30px;
  flex:0 0 30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
  font-size:var(--type-xs);
  font-weight:800;
}

.quote-section-heading>div{
  min-width:0;
}

.quote-section-heading strong,
.quote-section-heading small{
  display:block;
}

.quote-section-heading strong{
  color:var(--text-primary,var(--text));
  font-size:var(--type-md);
  line-height:var(--leading-ui);
}

.quote-section-heading small{
  margin-top:3px;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  line-height:var(--leading-body);
}

.quote-basics-grid,
.quote-association-grid,
.quote-adjustments-grid{
  min-width:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--ui-space-3,12px);
}

.quote-adjustments-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.quote-form-wide{
  grid-column:1/-1;
}

.quote-form-field{
  min-width:0;
  margin:0;
  display:grid;
  align-content:start;
  gap:5px;
  color:var(--text-normal,var(--text));
}

.quote-form-field>span{
  color:var(--text-normal,var(--text));
  font-size:var(--type-xs);
  font-weight:700;
  line-height:var(--leading-ui);
}

.quote-form-field input,
.quote-form-field select,
.quote-form-field textarea{
  width:100%;
  margin:0;
  background:var(--input-bg,var(--surface));
}

.quote-form-field textarea{
  min-height:96px;
}

.quote-field-help,
.quote-field-error{
  display:block;
  min-height:calc(var(--type-xs) * var(--leading-ui));
  font-size:var(--type-xs);
  line-height:var(--leading-ui);
}

.quote-field-help{
  color:var(--text-muted,var(--muted));
  font-weight:500;
}

.quote-field-error,
.quote-items-error,
.quote-item-row-error,
.quote-form-error{
  color:var(--danger);
  font-weight:700;
}

.quote-field-error:empty,
.quote-items-error:empty,
.quote-item-row-error:empty,
.quote-form-error:empty{
  min-height:0;
}

.quote-form-field.has-error input,
.quote-form-field.has-error select,
.quote-form-field.has-error textarea,
.quote-item-row input[aria-invalid="true"]{
  border-color:color-mix(in srgb,var(--danger) 64%,var(--line-strong,var(--border-strong)))!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 10%,transparent)!important;
}

.quote-association-summary{
  min-width:0;
  margin-top:var(--ui-space-3,12px);
  padding:11px 13px;
  display:flex;
  align-items:center;
  gap:var(--ui-space-3,12px);
  border:1px solid var(--line,var(--border));
  border-radius:10px;
  background:var(--card-muted,var(--surface-soft));
}

.quote-association-summary.invalid{
  border-color:color-mix(in srgb,var(--danger) 42%,var(--line,var(--border)));
  background:var(--red-panel,var(--danger-soft));
}

.quote-association-icon{
  width:28px;
  height:28px;
  flex:0 0 28px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
  font-weight:800;
}

.quote-association-summary span:last-child{
  min-width:0;
}

.quote-association-summary strong,
.quote-association-summary small{
  display:block;
}

.quote-association-summary strong{
  color:var(--text-primary,var(--text));
  font-size:var(--type-sm);
}

.quote-association-summary small{
  margin-top:2px;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
}

.quote-items-heading{
  align-items:center;
}

.quote-add-item{
  min-height:36px;
  margin-inline-start:auto;
  padding-inline:12px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}

.quote-add-item svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.quote-items-table{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--line,var(--border));
  border-radius:11px;
  background:var(--card-bg,var(--surface));
}

.quote-items-columns,
.quote-item-row{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(150px,2.15fr) minmax(64px,.55fr) minmax(88px,.8fr) minmax(88px,.8fr) minmax(88px,.8fr) 38px;
  gap:8px;
  align-items:center;
}

.quote-items-columns{
  padding:9px 10px;
  border-bottom:1px solid var(--line,var(--border));
  background:var(--card-muted,var(--surface-soft));
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  font-weight:700;
}

.quote-items{
  min-width:0;
  overflow-x:hidden;
  overscroll-behavior-inline:contain;
}

.quote-item-row{
  position:relative;
  padding:9px 10px;
  border-bottom:1px solid var(--line,var(--border));
}

.quote-item-row:last-child{
  border-bottom:0;
}

.quote-item-row.has-error{
  padding-bottom:31px;
  background:color-mix(in srgb,var(--danger) 4%,var(--card-bg,var(--surface)));
}

.quote-item-cell{
  min-width:0;
}

.quote-item-cell input{
  width:100%;
  min-height:38px;
  margin:0;
  padding:8px 10px;
  font-size:var(--type-sm);
}

.quote-item-total{
  color:var(--text-primary,var(--text));
  font-size:var(--type-sm);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.quote-item-actions{
  display:flex;
  justify-content:flex-end;
}

.quote-remove-item{
  width:34px;
  height:34px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid var(--line,var(--border));
  border-radius:9px;
  background:var(--card-bg,var(--surface));
  color:var(--text-muted,var(--muted));
}

.quote-remove-item:hover,
.quote-remove-item:focus-visible{
  border-color:color-mix(in srgb,var(--danger) 38%,var(--line,var(--border)));
  background:var(--red-panel,var(--danger-soft));
  color:var(--danger);
}

.quote-remove-item svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.quote-item-row-error{
  position:absolute;
  right:10px;
  left:10px;
  bottom:7px;
  overflow:hidden;
  font-size:var(--type-xs);
  line-height:var(--leading-ui);
  text-overflow:ellipsis;
  white-space:nowrap;
}

.quote-items-error{
  min-height:0;
  margin:8px 0 0;
  font-size:var(--type-xs);
}

.quote-item-mobile-label{
  display:none;
}

.quote-summary-panel{
  position:sticky;
  top:0;
  overflow:hidden;
}

.quote-summary-head{
  padding:16px;
  display:flex;
  align-items:center;
  gap:var(--ui-space-3,12px);
  border-bottom:1px solid var(--line,var(--border));
  background:linear-gradient(145deg,var(--card-bg,var(--surface)),color-mix(in srgb,var(--accent) 7%,var(--card-bg,var(--surface))));
}

.quote-summary-icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
}

.quote-summary-icon svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.quote-summary-head strong,
.quote-summary-head small{
  display:block;
}

.quote-summary-head strong{
  color:var(--text-primary,var(--text));
  font-size:var(--type-md);
}

.quote-summary-head small{
  margin-top:2px;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
}

.quote-summary-list{
  margin:0;
  padding:8px 16px;
}

.quote-summary-list>div{
  min-height:43px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--ui-space-3,12px);
  border-bottom:1px solid var(--line,var(--border));
}

.quote-summary-list>div:last-child{
  border-bottom:0;
}

.quote-summary-list dt,
.quote-summary-list dd{
  margin:0;
}

.quote-summary-list dt{
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  font-weight:600;
}

.quote-summary-list dd{
  color:var(--text-primary,var(--text));
  font-size:var(--type-sm);
  font-weight:800;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.quote-summary-total{
  min-height:58px!important;
}

.quote-summary-total dt,
.quote-summary-total dd{
  color:var(--accent)!important;
  font-size:var(--type-md)!important;
  font-weight:800!important;
}

.quote-summary-balance dd{
  font-size:var(--type-md)!important;
}

.quote-profit-summary{
  margin:4px 16px 14px;
  padding:13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--ui-space-3,12px);
  border:1px solid color-mix(in srgb,var(--success) 24%,var(--line,var(--border)));
  border-radius:10px;
  background:var(--green-panel,var(--success-soft));
  color:var(--green-text,var(--success));
}

.quote-profit-summary.negative{
  border-color:color-mix(in srgb,var(--danger) 28%,var(--line,var(--border)));
  background:var(--red-panel,var(--danger-soft));
  color:var(--red-text,var(--danger));
}

.quote-profit-summary span{
  min-width:0;
}

.quote-profit-summary strong,
.quote-profit-summary small{
  display:block;
}

.quote-profit-summary strong{
  font-size:var(--type-xs);
}

.quote-profit-summary small{
  margin-top:2px;
  opacity:.82;
  font-size:var(--type-xs);
  font-weight:500;
}

.quote-profit-summary b{
  font-size:var(--type-md);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.quote-summary-note{
  margin:0;
  padding:0 16px 16px;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-xs);
  line-height:var(--leading-body);
}

.quote-form-error{
  min-height:0;
  margin:14px 0 0;
  font-size:var(--type-xs);
  text-align:center;
}

.quote-modal-actions{
  min-height:70px;
  padding:13px 24px;
  display:flex;
  align-items:center;
  gap:var(--ui-space-3,12px);
  border-top:1px solid var(--line,var(--border));
  background:var(--card-bg,var(--surface));
  box-shadow:0 -8px 24px rgba(15,23,42,.04);
}

.quote-actions-spacer{
  flex:1;
}

.quote-modal-actions button{
  min-width:132px;
}

.quote-modal-actions #saveQuoteSentBtn{
  min-width:205px;
}

.quote-modal-form[aria-busy="true"] .quote-modal-actions button[type="submit"]{
  cursor:wait;
}

@media (max-width:900px){
  .quote-modal-card{
    width:min(100%,760px);
  }

  .quote-form-layout{
    grid-template-columns:1fr;
  }

  .quote-summary-panel{
    position:static;
  }
}

@media (min-width:1081px){
  #quotes.quotes-page .quotes-header{
    min-height:64px!important;
    padding-bottom:var(--ui-space-4,16px)!important;
    align-items:center!important;
  }

  #quotes.quotes-page .quotes-header p{
    max-width:62ch!important;
  }

  #quotes.quotes-page .quotes-toolbar-controls{
    grid-template-columns:minmax(300px,1fr) 180px 190px auto;
  }

  #quotes.quotes-page .quotes-reset-btn{
    min-width:132px;
  }

  #quotes.quotes-page .quotes-overview{
    grid-template-columns:minmax(245px,.82fr) minmax(0,2.18fr)!important;
    gap:var(--ui-space-4,16px)!important;
    margin:0!important;
    align-items:stretch!important;
  }

  #quotes.quotes-page .quotes-action-card{
    min-height:136px;
    padding:18px 20px;
    border-radius:var(--ui-card-radius,13px);
    box-shadow:var(--ui-card-shadow);
  }

  #quotes.quotes-page .quotes-summary-metrics{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:var(--ui-space-3,12px)!important;
  }

  #quotes.quotes-page .quotes-summary-metrics article{
    min-height:136px;
    padding:18px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    border-radius:var(--ui-card-radius,13px);
  }

  #quotes.quotes-page .quotes-summary-metrics strong{
    margin:0;
    font-size:clamp(22px,1.75vw,var(--type-metric));
    line-height:1.1;
  }
}

@media (max-width:1080px){
  #quotes.quotes-page .quotes-action-card{
    padding:16px;
  }
}

#quotes.quotes-page .quotes-table-shell[aria-busy="true"]{
  cursor:progress;
}

#quotes.quotes-page .quotes-table-shell[aria-busy="true"] .quotes-table-scroll{
  pointer-events:none;
}

#quotes.quotes-page .quotes-toolbar :disabled{
  cursor:wait;
  opacity:.62;
}

#quotes.quotes-page .quotes-state-region{
  min-height:360px;
  padding:48px 24px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,var(--card-bg,var(--surface)),color-mix(in srgb,var(--accent) 2.5%,var(--card-bg,var(--surface))));
}

#quotes.quotes-page .quotes-system-state{
  width:min(100%,520px);
  display:grid;
  justify-items:center;
  gap:var(--ui-space-3,12px);
  text-align:center;
}

#quotes.quotes-page .quotes-state-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line,var(--border)));
  border-radius:17px;
  background:var(--accent-panel,var(--accent-soft));
  color:var(--accent);
}

#quotes.quotes-page .quotes-state-icon svg{
  width:27px;
  height:27px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#quotes.quotes-page .quotes-system-state h3{
  margin:var(--ui-space-1,4px) 0 0;
  color:var(--text-primary,var(--text));
  font-size:var(--type-xl);
  line-height:var(--leading-tight);
}

#quotes.quotes-page .quotes-system-state p{
  max-width:48ch;
  margin:0;
  color:var(--text-muted,var(--muted));
  font-size:var(--type-sm);
  line-height:var(--leading-body);
}

#quotes.quotes-page .quotes-state-actions{
  margin-top:var(--ui-space-2,8px);
}

#quotes.quotes-page .quotes-state-actions button{
  min-width:176px;
}

#quotes.quotes-page .quotes-state-error .quotes-state-icon{
  border-color:color-mix(in srgb,var(--danger) 28%,var(--line,var(--border)));
  background:var(--red-panel,var(--danger-soft));
  color:var(--red-text,var(--danger));
}

#quotes.quotes-page .quotes-state-filter .quotes-state-icon{
  border-color:color-mix(in srgb,var(--warning) 26%,var(--line,var(--border)));
  background:var(--amber-panel,var(--warning-soft));
  color:var(--amber-text,var(--warning));
}

#quotes.quotes-page .quote-skeleton-row td{
  pointer-events:none;
}

#quotes.quotes-page .quote-skeleton-block,
#quotes.quotes-page .quote-skeleton-line{
  display:block;
  overflow:hidden;
  border-radius:7px;
  background:linear-gradient(90deg,var(--card-muted,var(--surface-soft)) 25%,color-mix(in srgb,var(--text-muted,var(--muted)) 10%,var(--card-muted,var(--surface-soft))) 50%,var(--card-muted,var(--surface-soft)) 75%);
  background-size:220% 100%;
  animation:quotesSkeletonMove 1.25s ease-in-out infinite;
}

#quotes.quotes-page .quote-skeleton-block{
  width:72%;
  height:13px;
}

#quotes.quotes-page .quote-skeleton-block.wide{width:88%}
#quotes.quotes-page .quote-skeleton-block.medium{width:68%}
#quotes.quotes-page .quote-skeleton-block.short{width:48%}
#quotes.quotes-page .quote-skeleton-block.actions{width:58px;height:30px;border-radius:9px}

#quotes.quotes-page .quote-skeleton-line{
  width:54%;
  height:9px;
  margin-top:8px;
  opacity:.76;
}

@keyframes quotesSkeletonMove{
  to{background-position:-220% 0}
}

@media (prefers-reduced-motion:reduce){
  #quotes.quotes-page .quote-skeleton-block,
  #quotes.quotes-page .quote-skeleton-line{
    animation:none;
  }
}

/* Quote view and management workspace — desktop. */
.quote-view-modal-card{
  width:min(1180px,calc(100vw - 40px));
  height:min(900px,calc(100dvh - 40px));
  max-height:calc(100dvh - 40px);
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:var(--card-bg,var(--surface));
}
.quote-view-modal-head{
  flex:0 0 auto;
  margin:0;
  padding:20px 24px 18px;
  border-bottom:1px solid var(--line,var(--border));
}
.quote-view-modal-head>div{min-width:0}
.quote-view-modal-head h3{margin:3px 0 0;font-size:var(--type-2xl);line-height:var(--leading-tight)}
.quote-view-modal-head p{margin:5px 0 0;color:var(--text-muted,var(--muted));font-size:var(--type-sm)}
.quote-view-body{min-height:0;flex:1;display:flex;flex-direction:column}
.quote-view-scroll{min-height:0;flex:1;overflow:auto;padding:20px;background:var(--page-bg,var(--bg));scrollbar-gutter:stable}
.quote-view-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.quote-view-document{
  min-width:0;
  padding:26px;
  border:1px solid var(--line,var(--border));
  border-radius:var(--ui-card-radius,13px);
  background:var(--card-bg,var(--surface));
  box-shadow:var(--ui-card-shadow,var(--shadow-sm));
}
.quote-view-document-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding-bottom:20px;border-bottom:1px solid var(--line,var(--border))}
.quote-view-business{display:flex;align-items:center;gap:12px;min-width:0}
.quote-view-brand-mark{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border-radius:12px;background:var(--surface-strong);color:var(--bg);font-size:var(--type-sm);font-weight:900;letter-spacing:.5px}
.quote-view-business>div,.quote-view-document-id{min-width:0}
.quote-view-business strong,.quote-view-business small,.quote-view-document-id span,.quote-view-document-id strong{display:block}
.quote-view-business strong{font-size:var(--type-lg);line-height:var(--leading-tight)}
.quote-view-business small{margin-top:4px;color:var(--text-muted,var(--muted));font-size:var(--type-xs);line-height:var(--leading-body)}
.quote-view-document-id{text-align:left;display:grid;justify-items:end;gap:4px}
.quote-view-document-id>span{color:var(--text-muted,var(--muted));font-size:var(--type-xs);font-weight:700}
.quote-view-document-id>strong{color:var(--accent);font-size:var(--type-xl);font-variant-numeric:tabular-nums}
.quote-view-document-id .status{margin-top:3px}
.quote-view-recipient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.quote-view-recipient-grid>div,.quote-view-meta-grid>div{min-width:0;padding:14px;border:1px solid var(--line,var(--border));border-radius:11px;background:var(--card-muted,var(--surface-soft))}
.quote-view-recipient-grid span,.quote-view-recipient-grid strong,.quote-view-recipient-grid small,.quote-view-meta-grid span,.quote-view-meta-grid strong{display:block}
.quote-view-recipient-grid span,.quote-view-meta-grid span{color:var(--text-muted,var(--muted));font-size:var(--type-xs);font-weight:700}
.quote-view-recipient-grid strong{margin-top:5px;font-size:var(--type-base)}
.quote-view-recipient-grid small{margin-top:3px;overflow:hidden;color:var(--text-muted,var(--muted));font-size:var(--type-xs);text-overflow:ellipsis;white-space:nowrap}
.quote-view-meta-grid{display:grid;grid-template-columns:150px 150px minmax(0,1fr);gap:10px;margin-top:10px}
.quote-view-meta-grid strong{margin-top:5px;overflow:hidden;font-size:var(--type-sm);text-overflow:ellipsis;white-space:nowrap}
.quote-view-items-section{margin-top:22px}
.quote-view-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.quote-view-section-title strong{font-size:var(--type-lg)}
.quote-view-section-title small{color:var(--text-muted,var(--muted));font-size:var(--type-xs)}
.quote-view-items-table{overflow:hidden;border:1px solid var(--line,var(--border));border-radius:12px}
.quote-view-items-head,.quote-view-item-row{display:grid;grid-template-columns:minmax(0,1fr) 82px 120px 120px;gap:12px;align-items:center}
.quote-view-items-head{min-height:42px;padding:9px 12px;background:var(--card-muted,var(--surface-soft));color:var(--text-muted,var(--muted));font-size:var(--type-xs);font-weight:800}
.quote-view-item-row{min-height:52px;padding:10px 12px;border-top:1px solid var(--line,var(--border));font-size:var(--type-sm)}
.quote-view-item-row>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quote-view-item-row>span:not(:first-child),.quote-view-item-row>strong{font-variant-numeric:tabular-nums;white-space:nowrap}
.quote-view-document-bottom{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,330px);gap:18px;align-items:start;margin-top:20px}
.quote-view-notes{display:grid;gap:10px}
.quote-view-notes>div{padding:14px;border:1px solid var(--line,var(--border));border-radius:11px;background:var(--card-muted,var(--surface-soft))}
.quote-view-notes span{display:block;color:var(--text-muted,var(--muted));font-size:var(--type-xs);font-weight:800}
.quote-view-notes p{margin:6px 0 0;white-space:pre-wrap;color:var(--text-normal,var(--text));font-size:var(--type-sm);line-height:var(--leading-body)}
.quote-view-totals{margin:0;padding:14px;border:1px solid var(--line,var(--border));border-radius:12px;background:var(--card-muted,var(--surface-soft))}
.quote-view-totals>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid var(--line,var(--border))}
.quote-view-totals>div:last-child{border-bottom:0}
.quote-view-totals dt{color:var(--text-muted,var(--muted));font-size:var(--type-sm)}
.quote-view-totals dd{margin:0;font-size:var(--type-sm);font-weight:800;font-variant-numeric:tabular-nums}
.quote-view-totals .grand{margin-top:3px;padding-block:12px}
.quote-view-totals .grand dt,.quote-view-totals .grand dd{color:var(--accent);font-size:var(--type-lg)}
.quote-view-totals .balance dt,.quote-view-totals .balance dd{color:var(--text-primary,var(--text));font-size:var(--type-base)}
.quote-view-sidebar{position:sticky;top:0;display:grid;gap:12px}
.quote-view-management-card{padding:16px;border:1px solid var(--line,var(--border));border-radius:var(--ui-card-radius,13px);background:var(--card-bg,var(--surface));box-shadow:var(--ui-card-shadow,var(--shadow-sm))}
.quote-view-card-head{display:flex;align-items:center;gap:10px}
.quote-view-card-head>div{min-width:0}
.quote-view-card-head strong,.quote-view-card-head small{display:block}
.quote-view-card-head strong{font-size:var(--type-base)}
.quote-view-card-head small{margin-top:2px;color:var(--text-muted,var(--muted));font-size:var(--type-xs)}
.quote-view-card-icon{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:11px;background:var(--accent-panel,var(--accent-soft));color:var(--accent)}
.quote-view-card-icon.finance{background:var(--green-panel,var(--success-soft));color:var(--green-text,var(--success))}
.quote-view-card-icon svg,.quote-view-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.quote-view-status-field{margin-top:15px}
.quote-view-status-field>span{display:block;color:var(--text-muted,var(--muted));font-size:var(--type-xs);font-weight:700}
.quote-view-status-field select{margin-top:6px}
.quote-view-current-status{margin-top:10px}
.quote-status-timeline{position:relative;margin:16px 0 0;padding:0;list-style:none}
.quote-status-timeline::before{content:"";position:absolute;right:6px;top:8px;bottom:9px;width:1px;background:var(--line,var(--border))}
.quote-status-timeline li{position:relative;display:grid;grid-template-columns:13px minmax(0,1fr);gap:10px;padding-bottom:13px}
.quote-status-timeline li:last-child{padding-bottom:0}
.quote-status-timeline li>span{position:relative;z-index:1;width:13px;height:13px;margin-top:2px;border:3px solid var(--card-bg,var(--surface));border-radius:50%;background:var(--text-faint,var(--subtle));box-shadow:0 0 0 1px var(--line,var(--border))}
.quote-status-timeline li.current>span{background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}
.quote-status-timeline strong,.quote-status-timeline small{display:block}
.quote-status-timeline strong{font-size:var(--type-sm)}
.quote-status-timeline small{margin-top:2px;color:var(--text-muted,var(--muted));font-size:var(--type-2xs)}
.quote-view-finance-total{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:18px}
.quote-view-finance-total span{color:var(--text-muted,var(--muted));font-size:var(--type-xs);font-weight:700}
.quote-view-finance-total strong{font-size:var(--type-2xl);font-variant-numeric:tabular-nums}
.quote-view-payment-progress{height:8px;margin-top:12px;overflow:hidden;border-radius:999px;background:var(--card-hover,var(--surface-soft))}
.quote-view-payment-progress i{display:block;width:var(--quote-paid-progress);height:100%;border-radius:inherit;background:var(--success);transition:width .25s ease}
.quote-view-finance-split{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.quote-view-finance-split>span{padding:9px;border:1px solid var(--line,var(--border));border-radius:9px;background:var(--card-muted,var(--surface-soft))}
.quote-view-finance-split small,.quote-view-finance-split strong{display:block}
.quote-view-finance-split small{color:var(--text-muted,var(--muted));font-size:var(--type-2xs)}
.quote-view-finance-split strong{margin-top:2px;font-size:var(--type-sm);font-variant-numeric:tabular-nums}
.quote-view-payment-btn{width:100%;margin-top:12px}
.quote-view-paid-complete{display:block;margin-top:12px;padding:9px;border-radius:9px;background:var(--green-panel,var(--success-soft));color:var(--green-text,var(--success));text-align:center;font-size:var(--type-xs);font-weight:800}
.quote-view-actions{flex:0 0 auto;display:flex;align-items:center;gap:9px;padding:14px 20px;border-top:1px solid var(--line,var(--border));background:var(--card-bg,var(--surface));box-shadow:0 -10px 24px rgba(16,24,40,.04)}
.quote-view-actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.quote-view-actions-spacer{flex:1}
.quote-view-loading,.quote-view-error{min-height:420px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:var(--text-muted,var(--muted))}
.quote-view-loading>span{width:8px;height:8px;margin:3px;border-radius:50%;display:inline-block;background:var(--accent);animation:quoteViewPulse .9s infinite alternate}
.quote-view-loading>span:nth-child(2){animation-delay:.15s}.quote-view-loading>span:nth-child(3){animation-delay:.3s}
.quote-view-loading strong{margin-top:12px;color:var(--text-primary,var(--text));font-size:var(--type-base)}
.quote-view-error>span{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--red-panel,var(--danger-soft));color:var(--red-text,var(--danger));font-size:var(--type-xl);font-weight:900}
.quote-view-error h4{margin:12px 0 4px;font-size:var(--type-xl)}
.quote-view-error p{max-width:460px;margin:0 0 16px;font-size:var(--type-sm)}
@keyframes quoteViewPulse{to{opacity:.25;transform:translateY(-4px)}}
@media(max-width:1100px){
  .quote-view-layout{grid-template-columns:1fr}
  .quote-view-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .quote-view-modal-card{width:min(960px,calc(100vw - 24px));height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}
  .quote-view-scroll{padding:14px}
  .quote-view-document{padding:18px}
  .quote-view-document-bottom{grid-template-columns:1fr}
  .quote-view-actions{flex-wrap:wrap}
  .quote-view-actions-spacer{display:none}
}
@media(prefers-reduced-motion:reduce){.quote-view-loading>span,.quote-view-payment-progress i{animation:none;transition:none}}


/* BLC quotes operational desktop completion */
@media (min-width:1081px){
  #quotes.quotes-page .quotes-header{margin-bottom:18px}
  #quotes.quotes-page .quotes-header h2{font-size:clamp(30px,2.5vw,42px);margin-top:2px}
  #quotes.quotes-page .quotes-header p{max-width:680px}
  #quotes.quotes-page .quotes-overview{gap:14px;margin-bottom:16px}
  #quotes.quotes-page .quotes-action-card,#quotes.quotes-page .quotes-kpi-card{min-height:136px}
  #quotes.quotes-page .quotes-toolbar{padding:16px 18px 12px}
  #quotes.quotes-page .quotes-toolbar-controls{grid-template-columns:minmax(240px,1.45fr) minmax(130px,.72fr) minmax(140px,.78fr) minmax(260px,1.15fr) minmax(130px,.72fr) auto;align-items:end}
  #quotes.quotes-page .quotes-date-filter{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;margin:0;padding:0;border:0;min-width:0}
  #quotes.quotes-page .quotes-date-filter legend{grid-column:1/-1;padding:0}
  #quotes.quotes-page .quotes-date-filter label{min-width:0}
  #quotes.quotes-page .quotes-date-filter input{width:100%;min-height:43px;margin:0;padding:8px 10px;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface);color:var(--text)}
  #quotes.quotes-page .quotes-sort-field{min-width:0}
  #quotes.quotes-page .quotes-table td{height:66px}
}
#quotes.quotes-page .quotes-pagination{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:14px 18px;border-top:1px solid var(--border);background:var(--surface)}
#quotes.quotes-page .quotes-page-size{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px;font-weight:700}
#quotes.quotes-page .quotes-page-size select{width:70px;min-height:36px;margin:0;padding:5px 9px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text)}
#quotes.quotes-page .quotes-page-summary{text-align:center;color:var(--muted);font-size:12px}
#quotes.quotes-page .quotes-page-nav,#quotes.quotes-page .quote-page-numbers{display:flex;align-items:center;gap:5px}
#quotes.quotes-page .quote-page-numbers button,#quotes.quotes-page .quote-page-arrow{width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font-weight:800}
#quotes.quotes-page .quote-page-numbers button:hover,#quotes.quotes-page .quote-page-arrow:hover:not(:disabled){background:var(--surface-soft);color:var(--text);border-color:var(--border)}
#quotes.quotes-page .quote-page-numbers button.active{background:var(--accent);color:#fff}
#quotes.quotes-page .quote-page-arrow:disabled{opacity:.35;cursor:not-allowed}
#quotes.quotes-page .quote-page-gap{color:var(--muted);padding-inline:3px}
#quotes.quotes-page .quotes-table-shell.has-system-state .quotes-pagination{display:none}
#quotes.quotes-page .quotes-system-state{min-height:300px;padding:48px 24px}
#quotes.quotes-page .quotes-state-icon{width:54px;height:54px}
#quotes.quotes-page .quotes-system-state p{max-width:460px}
#quotes.quotes-page .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media (max-width:1360px) and (min-width:1081px){
  #quotes.quotes-page .quotes-toolbar-controls{grid-template-columns:minmax(260px,1.4fr) repeat(2,minmax(135px,.7fr)) minmax(260px,1.1fr) minmax(135px,.7fr)}
  #quotes.quotes-page .quotes-reset-btn{grid-column:auto}
}

/* BLC quotes page — production mobile completion */
@media (max-width:900px){
  #quotes.quotes-page{
    min-width:0;
  }

  #quotes.quotes-page .quotes-header{
    min-height:0!important;
    margin-bottom:14px!important;
    padding-bottom:14px!important;
  }

  #quotes.quotes-page .quotes-header h2{
    margin-top:2px;
    font-size:clamp(28px,8vw,36px);
    line-height:1.08;
  }

  #quotes.quotes-page .quotes-header p{
    max-width:34ch;
    font-size:13px;
    line-height:1.6;
  }

  #quotes.quotes-page .quotes-overview{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    margin:0 0 14px!important;
  }

  #quotes.quotes-page .quotes-action-card{
    min-height:0;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:14px;
  }

  #quotes.quotes-page .quotes-action-card #addQuoteBtn{
    min-width:0;
    min-height:44px;
    padding-inline:14px;
    white-space:nowrap;
  }

  #quotes.quotes-page .quotes-summary-metrics{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }

  #quotes.quotes-page .quotes-summary-metrics article{
    min-height:118px;
    padding:14px;
  }

  #quotes.quotes-page .quotes-kpi-card>strong{
    font-size:clamp(22px,7vw,28px);
  }

  #quotes.quotes-page .quotes-kpi-context{
    font-size:11px;
    line-height:1.4;
  }

  #quotes.quotes-page .quotes-toolbar{
    padding:14px;
    border-radius:14px;
  }

  #quotes.quotes-page .quotes-toolbar-controls{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    align-items:end;
  }

  #quotes.quotes-page .quotes-search-field{
    grid-column:1/-1;
  }

  #quotes.quotes-page .quotes-date-filter{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:8px;
    align-items:center;
    margin:0;
    padding:0;
    border:0;
    min-width:0;
  }

  #quotes.quotes-page .quotes-date-filter legend{
    grid-column:1/-1;
    padding:0;
  }

  #quotes.quotes-page .quotes-date-filter label{
    min-width:0;
  }

  #quotes.quotes-page .quotes-date-filter input{
    width:100%;
    min-height:44px;
    margin:0;
    padding:8px 9px;
    border:1px solid var(--border-strong);
    border-radius:10px;
    background:var(--surface);
    color:var(--text);
  }

  #quotes.quotes-page .quotes-reset-btn{
    grid-column:1/-1;
    width:100%;
    min-height:44px;
  }

  #quotes.quotes-page .quotes-toolbar-meta{
    margin-top:12px;
    padding-top:10px;
    gap:6px;
    align-items:flex-start;
    flex-direction:column;
  }

  #quotes.quotes-page .quotes-table-shell{
    overflow:visible;
    border:0;
    background:transparent;
    box-shadow:none;
  }

  #quotes.quotes-page .quotes-table-scroll{
    overflow:visible;
  }

  #quotes.quotes-page .quotes-table,
  #quotes.quotes-page .quotes-table tbody{
    display:block;
    width:100%;
  }

  #quotes.quotes-page .quotes-table thead{
    display:none;
  }

  #quotes.quotes-page .quotes-table tr{
    display:grid;
    width:100%;
    margin-bottom:12px;
    overflow:hidden;
    border:1px solid var(--border);
    border-radius:14px;
    background:var(--surface);
    box-shadow:var(--shadow-sm);
  }

  #quotes.quotes-page .quotes-table td{
    min-width:0;
    height:auto;
    min-height:48px;
    display:grid;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr);
    align-items:center;
    gap:12px;
    padding:11px 13px;
    border:0;
    border-bottom:1px solid var(--border);
    white-space:normal;
  }

  #quotes.quotes-page .quotes-table td:last-child{
    border-bottom:0;
  }

  #quotes.quotes-page .quotes-table td::before{
    color:var(--muted);
    font-size:11px;
    font-weight:800;
  }

  #quotes.quotes-page .quotes-table td:nth-child(1)::before{content:'מספר הצעה'}
  #quotes.quotes-page .quotes-table td:nth-child(2)::before{content:'לקוח'}
  #quotes.quotes-page .quotes-table td:nth-child(3)::before{content:'אירוע'}
  #quotes.quotes-page .quotes-table td:nth-child(4)::before{content:'תאריך יצירה'}
  #quotes.quotes-page .quotes-table td:nth-child(5)::before{content:'בתוקף עד'}
  #quotes.quotes-page .quotes-table td:nth-child(6)::before{content:'סכום כולל'}
  #quotes.quotes-page .quotes-table td:nth-child(7)::before{content:'תשלומים'}
  #quotes.quotes-page .quotes-table td:nth-child(8)::before{content:'סטטוס'}
  #quotes.quotes-page .quotes-table td:nth-child(9)::before{content:'פעולות'}

  #quotes.quotes-page .quote-number-cell,
  #quotes.quotes-page .quote-payment-cell,
  #quotes.quotes-page .quote-table-actions{
    min-width:0;
    justify-self:stretch;
  }

  #quotes.quotes-page .quote-number-cell small,
  #quotes.quotes-page .quote-event-cell{
    white-space:normal;
    overflow-wrap:anywhere;
  }

  #quotes.quotes-page .quote-table-actions{
    justify-content:flex-start;
  }

  #quotes.quotes-page .quote-table-action{
    width:44px;
    height:44px;
  }

  #quotes.quotes-page .quotes-state-region{
    min-height:280px;
    padding:34px 18px;
    border:1px solid var(--border);
    border-radius:14px;
    background:var(--surface);
  }

  #quotes.quotes-page .quotes-system-state{
    min-height:0;
    padding:0;
  }

  #quotes.quotes-page .quotes-pagination{
    grid-template-columns:1fr;
    justify-items:stretch;
    gap:12px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:14px;
    background:var(--surface);
  }

  #quotes.quotes-page .quotes-page-size,
  #quotes.quotes-page .quotes-page-summary,
  #quotes.quotes-page .quotes-page-nav{
    justify-content:center;
    text-align:center;
  }

  #quotes.quotes-page .quote-page-numbers{
    max-width:100%;
    overflow-x:auto;
    padding-bottom:2px;
  }

  #quotes.quotes-page .quote-page-numbers button,
  #quotes.quotes-page .quote-page-arrow{
    width:42px;
    height:42px;
    flex:0 0 42px;
  }

  .quote-modal-card{
    width:calc(100vw - 16px)!important;
    height:calc(100dvh - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:16px;
  }

  .quote-modal-head{
    padding:16px 16px 14px;
  }

  .quote-form-scroll{
    padding:14px;
  }

  .quote-form-section{
    padding:14px;
  }

  .quote-basics-grid,
  .quote-association-grid,
  .quote-adjustments-grid{
    grid-template-columns:1fr;
  }

  .quote-items-columns{
    display:none;
  }

  .quote-item-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-soft);
  }

  .quote-description-cell,
  .quote-item-total,
  .quote-item-actions,
  .quote-item-row-error{
    grid-column:1/-1;
  }

  .quote-item-mobile-label{
    display:block;
  }

  .quote-modal-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:12px;
  }

  .quote-modal-actions .quote-actions-spacer{
    display:none;
  }

  .quote-modal-actions button,
  .quote-modal-actions #saveQuoteSentBtn{
    width:100%;
    min-width:0;
    min-height:44px;
  }

  .quote-modal-actions #saveQuoteSentBtn{
    grid-column:1/-1;
  }

  .quote-view-sidebar{
    grid-template-columns:1fr;
  }

  .quote-view-document-head,
  .quote-view-recipient-grid,
  .quote-view-meta-grid,
  .quote-view-document-bottom{
    grid-template-columns:1fr;
  }

  .quote-view-document-head{
    display:grid;
  }

  .quote-view-document-id{
    justify-items:start;
    text-align:right;
  }

  .quote-view-items-table{
    overflow-x:auto;
  }

  .quote-view-items-head,
  .quote-view-item-row{
    min-width:560px;
  }

  .quote-view-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .quote-view-actions button{
    width:100%;
    min-height:44px;
  }

  .quote-view-actions #shareQuote{
    grid-column:1/-1;
  }
}

@media (max-width:520px){
  #quotes.quotes-page .quotes-action-card{
    grid-template-columns:auto minmax(0,1fr);
  }

  #quotes.quotes-page .quotes-action-card #addQuoteBtn{
    grid-column:1/-1;
    width:100%;
  }

  #quotes.quotes-page .quotes-summary-metrics{
    grid-template-columns:1fr!important;
  }

  #quotes.quotes-page .quotes-toolbar-controls{
    grid-template-columns:1fr;
  }

  #quotes.quotes-page .quotes-search-field,
  #quotes.quotes-page .quotes-date-filter,
  #quotes.quotes-page .quotes-reset-btn{
    grid-column:1;
  }

  #quotes.quotes-page .quotes-date-filter{
    grid-template-columns:1fr;
  }

  #quotes.quotes-page .quotes-date-filter>span{
    display:none;
  }

  #quotes.quotes-page .quotes-table td{
    grid-template-columns:1fr;
    gap:5px;
  }

  #quotes.quotes-page .quotes-table td::before{
    margin-bottom:1px;
  }

  .quote-modal-actions,
  .quote-view-actions{
    grid-template-columns:1fr;
  }

  .quote-modal-actions #saveQuoteSentBtn,
  .quote-view-actions #shareQuote{
    grid-column:1;
  }
}

@media (max-width:900px){
  .quote-items-table,
  .quote-items,
  .quote-item-row{
    width:100%;
    min-width:0!important;
    max-width:100%;
  }

  .quote-item-row{
    box-sizing:border-box;
  }

  .quote-item-cell{
    width:auto;
    min-width:0;
  }
}
