/* Offertes and Marges: the planning's portal (styles.css) plus these. */
.q-page .content h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; margin-bottom: .9rem; }
.card h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.card h4 { margin: 1rem 0 .4rem; font-size: .95rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.warn-text { color: var(--warn); }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .8rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem .8rem; margin-bottom: .7rem; }
.q-page label { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; font-size: .86rem; font-weight: 650; color: #33463f; }
.q-page label small { font-weight: 400; color: var(--muted); }
.q-page label.inline, .q-page .inline { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; }
.q-page input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .q-page select, .q-page textarea {
  width: 100%; min-height: 38px; padding: .4rem .55rem; border: 1px solid #c5cfc9; border-radius: 8px; background: #fff; font: inherit; color: var(--ink); }
.q-page input:disabled, .q-page select:disabled { background: #f4f6f4; color: #55625d; }
.q-page textarea { resize: vertical; }
.button.small { min-height: 34px; padding: .35rem .7rem; font-size: .88rem; }
.button:not(.secondary):not(.subtle-action):not(.ghost) { background: var(--brand); color: #fff; }
.button.secondary { border: 1px solid var(--brand); }
.link { border: 0; background: none; color: var(--brand-2); font: inherit; font-weight: 700; cursor: pointer; padding: .2rem .3rem; text-decoration: underline; }

.q-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.q-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.q-list { padding: .4rem; max-height: calc(100vh - 170px); overflow-y: auto; position: sticky; top: 1rem; }
.q-row { display: grid; gap: .2rem; width: 100%; padding: .65rem .7rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.q-row:hover { background: #f4f7f5; }
.q-row.selected { background: #e7efe9; }
.q-row-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.q-row-mid { font-size: .88rem; }
.q-row-bot { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.q-row-chips { display: flex; flex-wrap: wrap; gap: .25rem; }

.badge-s, .chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.badge-s.new, .chip.new { background: #e3eefc; color: #1f4e79; }
.badge-s.ok, .chip.ok { background: #e1f3e8; color: #17603d; }
.badge-s.warn, .chip.warn { background: #fdf0d5; color: #7a5200; }
.badge-s.wait, .chip.wait { background: #ece9f8; color: #46378a; }
.badge-s.bad, .chip.bad { background: #fbe4e0; color: #8c352c; }
.badge-s.muted, .chip.muted { background: #eef1ef; color: #55625d; }

.d-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.d-head h2 { margin: 0 0 .2rem; }
.d-head p { margin: 0; }
.alert { border-left: 5px solid var(--line); border-radius: 0 14px 14px 0; }
.alert.warn { border-left-color: var(--accent); background: #fffaf0; }
.alert.bad { border-left-color: var(--bad); background: #fdf3f1; }
.alert.ok { border-left-color: var(--good); background: #f1f9f4; }
.alert ul { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.advice { border-left: 5px solid var(--brand-2); border-radius: 0 14px 14px 0; }
.advice ul { margin: .4rem 0; padding-left: 1.2rem; }

.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.scenario { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; align-content: start; min-width: 0; }
.scenario.chosen { border: 2px solid var(--brand); }
.scenario.below { background: #fffaf7; }
.s-top { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.s-price input { font-size: 1.35rem !important; font-weight: 800; }
.scenario dl { display: grid; grid-template-columns: auto auto; gap: .15rem .6rem; margin: .2rem 0; font-size: .88rem; }
.scenario dt { color: var(--muted); }
.scenario dd { margin: 0; text-align: right; font-weight: 700; }
.s-warn { margin: 0; min-height: 1.1em; color: var(--bad); font-size: .8rem; font-weight: 700; }

.actions { display: grid; gap: .6rem; }
.outcome summary { cursor: pointer; font-weight: 700; color: var(--brand-2); }
.outcome .row { margin-top: .5rem; }
.outcome select, .outcome input { width: auto !important; }
.d-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; align-items: start; }
.d-grid > .card { margin-bottom: 0; }
.d-grid + * { margin-top: .9rem; }
.lines { display: grid; gap: .4rem; margin: .6rem 0 .3rem; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: .4rem; align-items: center; }
.facts { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; }
.src { color: var(--muted); font-size: .76rem; }
.mail { border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .5rem; }
.mail pre { white-space: pre-wrap; font: inherit; font-size: .88rem; margin: 0; max-height: 280px; overflow: auto; }
.mail.uit { opacity: .8; }
.log { margin: 0; padding-left: 1rem; display: grid; gap: .25rem; font-size: .88rem; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary h3 { display: inline; }
.d-foot { margin-top: 1rem; }
.new-form { max-width: 760px; }
.new-form textarea { min-height: 120px; }

.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.t th { text-align: left; color: var(--muted); font-size: .78rem; font-weight: 750; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.t td { padding: .45rem .5rem; border-bottom: 1px solid #edf1ee; vertical-align: top; }
.t .num { text-align: right; white-space: nowrap; }
.t tr.total td { font-weight: 800; }
.t input, .t select { min-height: 32px !important; }
.table-wrap { overflow-x: auto; }
.t.comp input { min-width: 90px; }

.q-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.q-metrics .metric strong { display: block; font-size: 1.6rem; letter-spacing: -.03em; }

.modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; background: rgba(13,48,41,.45); }
.modal-card { width: min(760px, 100%); max-height: 90vh; overflow: auto; }
.mail-preview { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; margin: .6rem 0; background: #fff; }
.toast-holder { position: fixed; right: 1rem; bottom: 1rem; z-index: 3000; display: grid; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { padding: .7rem .9rem; border-radius: 10px; background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.2); font-weight: 650; }
.toast.error { background: var(--bad); }
.login-card { max-width: 380px; margin: 3rem auto; display: grid; gap: .7rem; }

/* Marges */
.upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; align-items: center; }
.upload p { margin: 0; }
.upload #preview { grid-column: 1 / -1; }
.upload #preview .alert { padding: .7rem .9rem; border-radius: 0 10px 10px 0; }
.upload #preview .row { margin-top: .5rem; }
.file-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.whatif-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.whatif-row select { width: auto !important; }
.whatif-row input[type=range] { flex: 1 1 220px; accent-color: var(--brand); }
.whatif-row b { min-width: 3.5rem; font-size: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.chip-button { min-height: 36px; padding: .3rem .8rem; border: 1px solid #c8d2cc; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip-button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.mbar { position: relative; min-width: 110px; height: 24px; border-radius: 6px; background: #eef1ef; overflow: hidden; }
.mbar-fill { position: absolute; inset: 0 auto 0 0; background: #b9c5bf; }
.mbar-fill.ok { background: #9fd3b4; }
.mbar-fill.warn { background: #f3cf7f; }
.mbar-fill.bad { background: #ef9d90; }
.mbar-text { position: relative; padding-left: .45rem; line-height: 24px; font-weight: 800; font-size: .85rem; }
.advice-line { font-size: .84rem; margin-bottom: .25rem; }
.advice-line.verhogen b, .advice-line.fout b { color: #8c352c; }
.advice-line.ruimte { color: #17603d; }
.advice-line.let-op { color: var(--warn); }
.m-table td:first-child { min-width: 220px; }
.m-table td:last-child { min-width: 240px; }

@media (max-width: 1100px) {
  .q-layout { grid-template-columns: minmax(0, 1fr); }
  .q-list { position: static; max-height: 46vh; }
}
@media (max-width: 860px) {
  .q-page .nav-item[href] { display: flex; }
  .q-page .sidebar-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .scenarios, .d-grid, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .upload { grid-template-columns: minmax(0, 1fr); }
  /* On a phone every table row of the margins becomes a small card. */
  .m-table thead { display: none; }
  .m-table, .m-table tbody, .m-table tr, .m-table td { display: block; width: 100%; }
  .m-table tr { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .m-table td { border: 0; padding: .15rem 0; text-align: left !important; }
  .m-table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .m-table td:first-child, .m-table td:last-child { min-width: 0; }
}
@media print { .sidebar, .q-list, .actions, .d-foot { display: none; } .portal { display: block; } }

/* Instellingen: my proposals first, the full forms folded away. */
.p-head { justify-content: space-between; margin-bottom: .4rem; }
.p-head h3 { margin: 0; }
.proposals td { padding: .6rem .5rem; }
.proposals .p-group td { padding-top: 1rem; font-weight: 800; color: var(--brand-2); border-bottom: 2px solid var(--line); }
.proposals .p-value { font-weight: 750; min-width: 180px; }
.proposals .p-act { text-align: right; white-space: nowrap; }
.proposals tr.p-used { opacity: .7; }
.stock-input { display: inline-block !important; width: 110px !important; }
.self-edit > summary h3 { display: inline; }
.self-edit .card { border: 0; padding: .8rem 0 0; margin: 0; border-top: 1px solid var(--line); border-radius: 0; }
@media (max-width: 860px) {
  .proposals tr { display: grid; grid-template-columns: minmax(0, 1fr); }
  .proposals .p-act { text-align: left; }
}
.tiers span { display: block; font-size: .82rem; white-space: nowrap; }
.tiers span.low { color: #8c352c; font-weight: 750; }

/* Te doen, aan de slag, volgende stap */
.todo { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; }
.todo-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.todo-item strong { font-size: 1.5rem; line-height: 1; min-width: 1.6rem; text-align: center; }
.todo-item span { display: grid; font-weight: 750; }
.todo-item small { font-weight: 500; color: var(--muted); }
.todo-item.outlook strong { color: var(--good); }
.todo-item.reply strong, .todo-item.look strong { color: var(--warn); }
.todo-item.call strong, .todo-item.order strong { color: var(--bad); }
.todo-item.active { border: 2px solid var(--brand); }
.todo-empty { color: var(--muted); padding: .4rem 0; }
.setup summary { cursor: pointer; }
.steps { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .45rem; }
.steps li { display: flex; align-items: center; gap: .6rem; }
.steps li span:nth-child(2) { display: grid; }
.steps li small { color: var(--muted); }
.steps .tick { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid #c5cfc9; display: grid; place-items: center; font-weight: 900; color: #fff; flex: none; }
.steps li.done .tick { background: var(--good); border-color: var(--good); }
.steps li.done { color: var(--muted); }
.next { border-left: 5px solid var(--good); border-radius: 0 14px 14px 0; }
.next.warn { border-left-color: var(--accent); background: #fffaf0; }
.next p { margin: .2rem 0 0; }
details.fold > summary h3 { display: inline; }
details.fold .d-grid { margin-top: .8rem; }
details.fold > .card { border: 0; padding: .6rem 0 0; margin: 0; }
.d-head { flex-wrap: wrap; }
.d-head > div { flex: 1 1 240px; min-width: 0; }
