.mg-view { max-width:1220px; margin-inline:auto; color:var(--v7-inkt); }
.mg-view *, .mg-view *::before, .mg-view *::after { box-sizing:border-box; }
.mg-view h1, .mg-view h2, .mg-view h3, .mg-view p, .mg-view dl, .mg-view dd { margin:0; }
.mg-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:24px; }
.mg-heading h1 { font-size:clamp(28px,3vw,40px); letter-spacing:-.055em; font-weight:650; line-height:1.13; }
.mg-heading p, .mg-panel header p, .mg-check p { color:var(--v7-inkt-2); font-size:14px; line-height:1.55; margin-top:8px; }
.mg-view button, .mg-view input, .mg-view select { font:inherit; }
.mg-view button { cursor:pointer; }
.mg-view :is(input,select,button):focus-visible { outline:3px solid var(--v7-accent); outline-offset:2px; }
.mg-view .btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 16px; border-radius:8px; font-weight:600; font-size:14px; }
.mg-view .btn:not(.primary) { background:var(--v7-vlak); border:1px solid var(--v7-lijn-sterk); color:var(--v7-inkt); }
.mg-icon { display:inline-block; vertical-align:middle; width:20px; height:20px; flex:none; }
.mg-view h2 { font-size:20px; line-height:1.3; font-weight:640; letter-spacing:-.035em; }
.mg-view h3 { font-size:15px; line-height:1.4; font-weight:620; }
.mg-panel { background:var(--v7-vlak); border-radius:12px; min-width:0; }
.mg-panel-title, .mg-list-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 24px; }
.mg-month-panel { margin-bottom:20px; }
.mg-month-select, .mg-search { display:flex; align-items:center; border:1px solid var(--v7-lijn-sterk); background:var(--v7-vlak); border-radius:8px; color:var(--v7-inkt-2); min-width:0; padding-left:12px; }
.mg-month-select .mg-icon, .mg-search .mg-icon { width:17px; height:17px; }
.mg-view select { border-radius:8px; background:var(--v7-vlak); color:var(--v7-inkt); border:1px solid var(--v7-lijn-sterk); min-height:44px; font-size:14px; padding:0 9px; max-width:100%; }
.mg-month-select select, .mg-search input { background:transparent; border:0; min-height:44px; max-width:100%; color:var(--v7-inkt); }
.mg-metrics { display:grid; grid-template-columns:1.3fr 1fr 1fr; padding:4px 24px 24px; }
.mg-metric { min-width:0; padding:4px 24px; border-left:1px solid var(--v7-lijn); }
.mg-metric:first-child { padding-left:0; border-left:0; }
.mg-metric dt { color:var(--v7-inkt-2); font-size:14px; font-weight:550; }
.mg-metric dd { font-size:clamp(23px,2.3vw,34px); font-weight:600; letter-spacing:-.055em; line-height:1.4; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.mg-metric small, .mg-draft-ref { color:var(--v7-inkt-3); font-size:12px; }
.mg-list-head { flex-wrap:wrap; }
.mg-filters { display:flex; gap:8px; }
.mg-search input { min-width:0; padding:0 8px; font-size:14px; width:230px; }
.mg-search input::placeholder { color:var(--v7-inkt-3); opacity:1; }
.mg-quotes, .mg-prices { width:100%; border-collapse:collapse; font-size:14px; }
.mg-quotes th, .mg-prices thead th { color:var(--v7-inkt-2); font-size:12px; font-weight:550; text-align:left; }
.mg-quotes thead { background:var(--v7-vlak-2); }
.mg-quotes th { padding:10px 8px; }
.mg-quotes td { padding:6px 8px; border-top:1px solid var(--v7-lijn); }
.mg-quotes td:first-child, .mg-quotes th:first-child { padding-left:24px; }
.mg-quotes td:last-child, .mg-quotes th:last-child { padding-right:16px; }
.mg-quotes .mg-align-end, .mg-sum-cell { text-align:right; }
.mg-action-cell { text-align:right; }
.mg-client-cell { font-weight:580; max-width:26ch; overflow-wrap:anywhere; }
.mg-date-cell { color:var(--v7-inkt-2); }
.mg-sum-cell { font-variant-numeric:tabular-nums; font-weight:580; }
.mg-unpriced, .mg-live-amount strong.mg-unpriced { color:var(--v7-rood-tekst); font-size:14px; font-weight:600; letter-spacing:normal; }
.mg-quote-link, .mg-text-button, .mg-icon-button { min-height:44px; min-width:44px; color:var(--v7-accent-tekst); border:0; background:transparent; }
.mg-quote-link { text-align:left; padding:4px 0; font-size:13px!important; font-weight:600!important; }
.mg-quote-link small { display:block; font-size:11px; font-weight:450; color:var(--v7-inkt-3); margin-top:2px; }
.mg-text-button { display:inline-flex; align-items:center; gap:8px; font-size:14px!important; font-weight:600!important; padding:0 2px; }
.mg-icon-button { display:inline-grid; place-items:center; border-radius:8px; }
.mg-icon-button:hover, .mg-text-button:hover, .mg-quote-link:hover { color:var(--v7-accent); }
.mg-icon-button:hover { background:var(--v7-hover); }
.mg-status { --status-bg:var(--v7-grijs-vlak); --status-fg:var(--v7-grijs-tekst); --status-dot:var(--v7-grijs); display:inline-flex; align-items:center; position:relative; max-width:100%; color:var(--status-fg); }
.mg-status.sent { --status-bg:var(--v7-geel-vlak); --status-fg:var(--v7-geel-tekst); --status-dot:var(--v7-geel); }
.mg-status.accepted { --status-bg:var(--v7-groen-vlak); --status-fg:var(--v7-groen-tekst); --status-dot:var(--v7-groen); }
.mg-status.declined { --status-bg:var(--v7-rood-vlak); --status-fg:var(--v7-rood-tekst); --status-dot:var(--v7-rood); }
.mg-status::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--status-dot); position:absolute; left:9px; pointer-events:none; }
.mg-status::after { content:''; position:absolute; left:0; right:0; top:6px; bottom:6px; background:var(--status-bg); border-radius:6px; pointer-events:none; z-index:0; }
.mg-status::before { z-index:1; }
.mg-status select, .mg-status > span { position:relative; z-index:1; background:transparent; color:inherit; border:0; padding:0 6px 0 21px; min-height:44px; font-size:12px; font-weight:600; }
.mg-status select { cursor:pointer; }
.mg-status option { color:var(--v7-inkt); background:var(--v7-vlak); }
.mg-status > span { display:inline-flex; align-items:center; }
.mg-empty { text-align:center; padding:32px!important; }
.mg-empty p { margin:6px 0 12px; color:var(--v7-inkt-2); }
.mg-only-sr { position:absolute; height:1px; width:1px; overflow:hidden; clip-path:inset(50%); }

.mg-rules-layout { display:grid; grid-template-columns:minmax(0,1.95fr) minmax(245px,.85fr); gap:18px; align-items:start; }
.mg-rate-column, .mg-side { display:grid; gap:16px; min-width:0; }
.mg-price-panel { padding:20px 24px; }
.mg-price-panel header { margin-bottom:14px; }
.mg-prices th, .mg-prices td { padding:9px 8px; }
.mg-prices th { text-align:left; }
.mg-prices td { width:27%; min-width:0; }
.mg-prices tbody tr { border-top:1px solid var(--v7-lijn); }
.mg-prices tbody th { font-weight:550; }
.mg-prices th:first-child { padding-left:0; }
.mg-prices td:last-child { padding-right:0; }
.mg-product-name { display:flex; align-items:center; gap:12px; }
.mg-product-mark { background:var(--v7-accent-vlak); color:var(--v7-accent-tekst); width:40px; height:40px; border-radius:8px; display:grid; place-items:center; flex:none; }
.mg-product-mark .mg-icon { width:26px; height:26px; }
.mg-input-unit { position:relative; display:block; min-width:0; }
.mg-input-unit input { border:1px solid var(--v7-lijn-sterk); background:var(--v7-vlak); color:var(--v7-inkt); padding:0 28px 0 10px; min-height:44px; width:100%; min-width:0; border-radius:8px; font-size:14px; font-variant-numeric:tabular-nums; appearance:textfield; -moz-appearance:textfield; }
.mg-input-unit input::-webkit-inner-spin-button, .mg-input-unit input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.mg-input-unit > span { position:absolute; right:10px; top:50%; transform:translateY(-50%); color:var(--v7-inkt-3); font-size:12px; pointer-events:none; }
.mg-input-unit input[aria-invalid=true] { border-color:var(--v7-rood); }
.mg-error { display:block; color:var(--v7-rood-tekst); line-height:1.45; font-size:12px; grid-column:1/-1; }
.mg-error[hidden] { display:none; }
.mg-option-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.mg-option-grid h3 { padding:10px 0 12px; color:var(--v7-inkt-2); }
.mg-setting { display:grid; grid-template-columns:minmax(0,1fr) minmax(75px,.55fr); align-items:center; gap:6px 12px; border-top:1px solid var(--v7-lijn); padding:9px 0; font-size:14px; line-height:1.4; }
.mg-travel-settings .mg-setting { grid-template-columns:minmax(0,1fr) minmax(90px,23%); }
.mg-tier, .mg-tier-labels { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px; gap:12px; align-items:start; }
.mg-tier { border-top:1px solid var(--v7-lijn); padding:8px 0; }
.mg-tier-labels { font-size:12px; color:var(--v7-inkt-2); padding-bottom:8px; }
.mg-check, .mg-live { padding:22px; }
.mg-live { background:var(--v7-accent-vlak); }
.mg-side h2 { display:flex; align-items:center; gap:9px; font-size:17px; }
.mg-side h2 .mg-icon { color:var(--v7-accent-tekst); }
.mg-live-client { margin:20px 0 4px; font-weight:600; overflow-wrap:anywhere; }
.mg-live-amount { display:grid; gap:3px; margin-top:18px; padding-top:16px; border-top:1px solid color-mix(in srgb,var(--v7-accent) 23%, transparent); }
.mg-live-amount span { color:var(--v7-inkt-2); font-size:13px; }
.mg-live-amount strong { font-size:clamp(23px,2.2vw,32px); line-height:1.22; letter-spacing:-.045em; font-weight:640; overflow-wrap:anywhere; }
.mg-live .mg-text-button { margin-top:8px; }
.mg-draft-ref { color:var(--v7-inkt-2); }
.mg-check .btn { margin-top:14px; }
.mg-check h3.mg-check-result { display:flex; gap:6px; align-items:flex-start; color:var(--v7-inkt); margin-top:16px; }
.mg-check-result .mg-icon { color:var(--v7-groen-tekst); }
.mg-check-cases { list-style:none; padding:0; margin:12px 0 0; }
.mg-check-cases li { border-top:1px solid var(--v7-lijn); padding:12px 0; font-size:12px; color:var(--v7-inkt-2); }
.mg-check-cases strong { display:block; color:var(--v7-inkt); font-size:13px; margin-bottom:4px; }
.mg-check-cases span { display:flex; justify-content:space-between; gap:8px; }
.mg-check-cases b { font-weight:550; }
.mg-check-cases small { display:block; margin-top:4px; color:var(--v7-groen-tekst); }
.mg-check-cases [data-check-ok=false] small { color:var(--v7-rood-tekst); }
@media (max-width:980px) {
  .mg-rules-layout { grid-template-columns:minmax(0,1.65fr) minmax(220px,.9fr); gap:14px; }
  .mg-option-grid { grid-template-columns:1fr; gap:12px; }
  .mg-prices td { width:25%; }
  .mg-prices th, .mg-prices td { padding-inline:5px; }
  .mg-list-head { align-items:flex-start; }
}
@media (max-width:760px) {
  .mg-rules-layout { display:flex; flex-direction:column; }
  .mg-rate-column, .mg-side { width:100%; }
  .mg-rate-column, .mg-side { display:contents; }
  .mg-rules-layout > :is(.mg-rate-column,.mg-side) > * { width:100%; }
  .mg-price-panel, .mg-check, .mg-live { padding:16px; }
  .mg-price-panel:first-child { order:0; }
  .mg-live { order:1; }
  .mg-check { order:2; }
  .mg-price-panel:not(:first-child) { order:3; }
  .mg-heading { align-items:flex-start; margin-bottom:16px; }
  .mg-metrics { padding:2px 16px 16px; grid-template-columns:1fr 1fr; gap:10px 0; }
  .mg-metric { padding:2px 0 2px 12px; }
  .mg-metric:first-child { grid-column:1/-1; border:0; padding-bottom:8px; }
  .mg-metric:nth-child(2) { padding-left:0; border:0; }
  .mg-metric:first-child dd { font-size:32px; }
  .mg-metric small { font-size:11px; line-height:1.4; display:block; }
  .mg-panel-title, .mg-list-head { padding:14px 16px; }
  .mg-panel-title { flex-wrap:wrap; }
  .mg-month-panel { margin-bottom:14px; }
  .mg-filters { flex-wrap:wrap; width:100%; }
  .mg-search { flex:1 1 160px; }
  .mg-search input { width:100%; }
  #quote-status-filter { flex:1 0 105px; }
  .mg-quotes, .mg-quotes tbody { display:block; }
  .mg-quotes thead { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  .mg-quotes tbody tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,auto) 44px; grid-template-areas:"ref status actions" "client client sum" "date date sum"; gap:2px 4px; align-items:center; border-top:1px solid var(--v7-lijn); padding:8px 12px 12px 16px; }
  .mg-quotes td, .mg-quotes td:first-child, .mg-quotes td:last-child { display:block; padding:0; border:0; }
  .mg-number-cell { grid-area:ref; } .mg-status-cell { grid-area:status; } .mg-action-cell { grid-area:actions; }
  .mg-client-cell { grid-area:client; max-width:none; } .mg-date-cell { grid-area:date; font-size:12px; }
  .mg-quotes .mg-sum-cell { grid-area:sum; grid-column:2 / 4; align-self:end; }
  .mg-quotes .mg-client-cell, .mg-quotes .mg-date-cell { grid-column:1; }
  .mg-quotes .mg-empty { grid-column:1/-1; }
}
@media (max-width:460px) {
  .mg-prices thead { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  .mg-prices, .mg-prices tbody { display:block; }
  .mg-prices tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; padding:10px 0; }
  .mg-prices tbody th, .mg-prices tbody td { padding:0; width:auto; display:block; }
  .mg-prices tbody th { grid-column:1/-1; }
  .mg-product-name { gap:6px; }
  .mg-product-mark { width:25px; height:25px; border-radius:4px; }
  .mg-product-mark .mg-icon { width:19px; height:19px; }
  .mg-prices td::before { content:attr(data-label); color:var(--v7-inkt-2); display:block; font-size:12px; margin-bottom:4px; }
  .mg-view h2 { font-size:18px; }
  .mg-list-head, .mg-panel-title { gap:8px; }
}
