/* ExpertOfferBiller: the pages without a session (sign-in, register) and small helpers for MudBlazor's pages. */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --bg: #f1f5f9;
  --accent: #1d4ed8;
  --error: #b3261e;
  --ok: #2e7d32;
}

html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Roboto, "Segoe UI", Arial, sans-serif; }

.entry-page { max-width: 420px; margin: 6vh auto; padding: 32px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-sizing: border-box; }
.entry-page.wide { max-width: 560px; }
.entry-page h1 { font-size: 1.6rem; font-weight: 600; margin: 4px 0 18px; }
.entry-page p { line-height: 1.5; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.entry-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.entry-form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.entry-form input { font: inherit; color: var(--ink); padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
/* Blazor moves the focus to the page title after each navigation (for screen readers); no frame drawn around it. */
h1:focus, h1:focus-visible, h1[tabindex="-1"]:focus { outline: none; }
.entry-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.entry-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.entry-form legend { font-weight: 600; padding: 0 6px; }
.primary-button { font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 8px; padding: 12px 18px; cursor: pointer; }
.primary-button:hover { filter: brightness(1.08); }
.text-link { display: block; margin-top: 10px; color: var(--accent); text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.form-error { color: var(--error); background: #fdecea; border-radius: 8px; padding: 10px 12px; margin: 0; }
.form-ok { color: var(--ok); background: #e8f5e9; border-radius: 8px; padding: 10px 12px; }
.hint { font-size: .82rem; color: var(--muted); margin: -6px 0 0; }
.language-links { margin-top: 22px; font-size: .85rem; }
.language-links a { color: var(--muted); }

/* Inside a company. */
.page { min-height: calc(100vh - 48px); }
.muted { color: var(--muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The year and month side by side, each only as wide as its field. */
.month-pick > .mud-select { flex: 0 0 auto; width: auto; }
/* /companii: what each company needs this month, under its name. */
.work-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 0 16px 10px; }
.grow { flex: 1 1 280px; }
.inline-form { display: inline; margin: 0; }
.clickable { cursor: pointer; }
.num { text-align: right; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
/* The ledger: its tabs, wide tables that scroll sideways on a phone, and the rows that sum others. */
.ledger-nav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--mud-palette-lines-default); padding-bottom: 6px; }
.table-scroll { overflow-x: auto; }
.balance-table td, .balance-table th { font-size: 0.82rem; }
.subtotal-row td { font-weight: 600; background: var(--mud-palette-background-gray); }
.total-row td { font-weight: 700; border-top: 2px solid var(--mud-palette-text-primary); }
.offbalance-row td { color: var(--muted); font-style: italic; }
.chart-grade1 td { font-weight: 600; }
.entry-lines td { vertical-align: top; padding: 2px 4px !important; }
.entry-lines .decimal-field { min-width: 110px; }
/* Bank: the bank's own long description, under the line's type and party. */
.bank-description { font-size: 0.75rem; max-width: 560px; overflow-wrap: anywhere; }
.price-cell { max-width: 160px; }
.stat { border-left: 4px solid var(--accent); }
.next-steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.next-steps a { color: var(--accent); }
.drawer-foot { padding: 12px 16px; border-top: 1px solid var(--line); margin-top: auto; }
.company-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
code.columns { display: inline-block; background: #eef2ff; padding: 4px 8px; border-radius: 6px; font-size: .85rem; overflow-wrap: anywhere; }
.mono textarea { font-family: Consolas, "Courier New", monospace; font-size: .85rem; }

/* Invoices. */
.stat-warn { border-left-color: #a14e00; }
.stat-error { border-left-color: #b3261e; }
.full-height { height: 100%; }
.party-box { background: var(--bg); border-radius: 8px; padding: 10px 12px; line-height: 1.5; }
.invoice-line { border-bottom: 1px solid var(--line); padding: 8px 0 4px; }
.invoice-line:last-of-type { border-bottom: 0; }
.line-total { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.totals-box .row-between { padding: 3px 0; }
.totals-box .grand { font-size: 1.25rem; font-weight: 700; }
.totals-box.view { max-width: 380px; margin-left: auto; }
.payment-row { border-bottom: 1px dashed var(--line); padding: 4px 0; }
.small { font-size: .85rem; }

/* The invoice designs to choose from (Settings): a small drawing of each. */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.template-card { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.template-pick { width: 100%; display: flex; flex-direction: column; align-items: stretch; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 10px; cursor: pointer; font: inherit; }
.template-card.chosen .template-pick { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.template-name { margin-top: 8px; font-weight: 600; }
.template-sample { font-size: .85rem; color: var(--muted); }
.mini { width: 100%; aspect-ratio: 210 / 297; background: #fff; border: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 7px; padding: 10px; overflow: hidden; position: relative; }
.mini-head { display: flex; justify-content: space-between; align-items: center; }
.mini-logo { width: 26px; height: 12px; background: #cbd5e1; border-radius: 2px; }
.mini-title { font-size: 9px; font-weight: 800; letter-spacing: .05em; color: #111827; }
.mini-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini-parties span { height: 22px; background: #f1f5f9; border-radius: 2px; }
.mini-table { display: flex; flex-direction: column; gap: 3px; }
.mini-table span { height: 7px; background: #f1f5f9; }
.mini-table span:first-child { background: #cbd5e1; }
.mini-total { margin-left: auto; width: 55%; height: 14px; background: #cbd5e1; margin-top: auto; }
.t-classic .mini { border-top: 6px solid var(--accent); }
.t-classic .mini-title { color: var(--accent); font-family: Georgia, serif; }
.t-classic .mini-total { background: #fff; border: 2px solid var(--accent); }
.t-modern .mini-head { margin: -10px -10px 0; padding: 10px; background: color-mix(in srgb, var(--accent) 10%, #fff); }
.t-modern .mini-title { color: var(--accent); }
.t-modern .mini-table span:first-child, .t-modern .mini-total { background: var(--accent); border-radius: 3px; }
.t-minimal .mini-head { border-bottom: 1px solid var(--accent); padding-bottom: 5px; }
.t-minimal .mini-title { font-weight: 300; letter-spacing: .3em; }
.t-minimal .mini-table span:first-child { background: #111827; height: 2px; }
.t-minimal .mini-total { background: #fff; border-top: 2px solid var(--accent); }
.t-bold .mini-head { margin: -10px -10px 0; padding: 12px 10px; background: var(--accent); }
.t-bold .mini-title { color: #fff; font-weight: 900; }
.t-bold .mini-logo { background: #fff; }
.t-bold .mini-table span:first-child, .t-bold .mini-total { background: #111827; }
.t-bold .mini-total { border-left: 4px solid var(--accent); }
.colour-field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.colour-field input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: #fff; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.logo-preview { max-height: 48px; max-width: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: #fff7d6; box-shadow: 0 -1px 4px rgba(0,0,0,.2); z-index: 2000; }
#blazor-error-ui a { color: var(--accent); margin-left: 8px; }

@media (max-width: 600px) {
  .entry-page { margin: 0; border-radius: 0; border-left: 0; border-right: 0; min-height: 100vh; }
}

.decimal-field input { text-align: right; }

.warn-text { color: #a14e00; }

.line-dialog-total { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 1.1rem; }
.nowrap { white-space: nowrap; }

.pre-line { white-space: pre-line; }

.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.uit-box { border-left: 6px solid var(--ok); }


/* Deadlines: overdue and due within days. */
.row-late td { background: #fdecea; }
.row-soon td { background: #fff4e5; }
/* A request's thread. */
.message { border-left: 3px solid #cbd5e1; padding: 6px 12px; margin-bottom: 12px; }
.message.mine { border-left-color: var(--accent); }
.figure { font-size: 1.6rem; font-weight: 600; }

@media print { .no-print, .mud-appbar, .mud-drawer { display: none !important; } .mud-main-content { padding: 0 !important; } }

/* The owner's reports (Components/Reports): tiles, sentences, charts with their figures. */
.report-tile .figure a { color: inherit; text-decoration: none; }
.change-good { color: #1b6e2a; }
.change-bad { color: #a14e00; }
.saying { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; line-height: 1.5; }
.saying .mud-icon-root { margin-top: 3px; flex: none; }
.equation { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 1.05rem; }
.equation .mud-typography { flex-basis: 100%; }
.dotted { border-bottom: 1px dotted var(--muted); cursor: help; }
.report-card { height: 100%; }
.chart-card .chart-body { overflow-x: auto; }
.chart-card .chart-body svg text { font-size: 11px; }
.chart-table { margin-top: 8px; }
.print-only { display: none; }
@media print {
    .print-only { display: block; }
    .chart-card, .report-tile { break-inside: avoid; }
    .mud-tooltip-root, .mud-popover { display: none !important; }
}
/* A car's colour beside its name (the same colour as in its chart). */
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: baseline; }
/* The reports' tabs in two rows, each with its label (what happened; for decisions). */
.reports-nav { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--mud-palette-lines-default); padding-bottom: 6px; }
.reports-nav-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.reports-nav-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; min-width: 110px; }
/* A share as a bar (the ceiling used, a customer's part). */
.meter { height: 10px; border-radius: 5px; background: var(--mud-palette-lines-default); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 5px; background: var(--mud-palette-primary); }
.meter.warn > span { background: var(--mud-palette-warning); }
.meter.bad > span { background: var(--mud-palette-error); }
/* The reports' tools beside the tabs: the euro switch and print. */
.reports-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* The value shown over a chart's point (MudChart's svg-tooltip): white with a blue border, dark text, the series and day
   the value on the first line, the day in grey on the second. MudChart sizes the box for its own 12px text, so the text keeps
   that size and weight (larger or bold text would spill out of the box): the whole box is scaled instead. */
/* Larger, from its bottom (it stays over its point); the chart lets it show above its top edge. */
.mud-chart svg { overflow: visible; }
.mud-chart svg .svg-tooltip { transform-box: fill-box; transform-origin: center bottom; transform: scale(1.4); }
.mud-chart svg .svg-tooltip rect { fill: #ffffff !important; stroke: #1d4ed8 !important; stroke-width: 1.5px !important; }
.mud-chart svg .svg-tooltip polygon { fill: #1d4ed8 !important; stroke: none !important; }
.mud-chart svg .svg-tooltip text, .mud-chart svg .svg-tooltip tspan { fill: #0f172a !important; }
/* Two lines: the value on top, dark; under it the day (and the series), in grey. */
.mud-chart svg .svg-tooltip tspan:last-child:not(:first-child) { fill: #475569 !important; }

/* Curs BNR: several currencies at once, one row each (code and rate, the amount, remove). */
.fx-multi-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--mud-palette-lines-default); }
.fx-multi-row:last-of-type { border-bottom: none; }
.fx-multi-code { flex: 0 0 120px; min-width: 0; line-height: 1.2; }
.fx-multi-input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1.2rem; font-variant-numeric: tabular-nums; text-align: right;
  padding: 6px 10px; border: 1px solid var(--mud-palette-lines-inputs); border-radius: 4px; background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); }
.fx-multi-input:focus { outline: none; border-color: var(--mud-palette-primary); box-shadow: 0 0 0 1px var(--mud-palette-primary); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 12px; }
/* A date picker whose field is narrower than its calendar (310px): the popup keeps the calendar's width, not the field's. */
.mud-picker-popover-paper:has(.mud-picker-calendar-container) { min-width: 310px; width: auto !important; max-width: none !important; }
