Files
Khaemhat/src/Khaemhat.Web/wwwroot/app.css
T
Alby96andClaude Opus 5.5 caa33a2cee feat: guided import and export for parties, items, prices, opening stock and chart of accounts (#44)
Companies starting on Khaemhat need to bring their master data from another
system or a spreadsheet, and the chart of accounts has no Italian exchange
standard, so SPEC 12.12 asks for a guided wizard and an own layout.

- Administration > Import / export: CSV (separator and encoding guessed),
  XLSX (in-house reader, first sheet) and JSON, automatic column mapping with
  aliases, row-by-row check, error report, import confirmation and log entry.
- Rows go through PartyService, ItemService and PriceListService, so the
  import has exactly the rules, error codes and history of the forms; options
  cover existing and missing codes, VIES and city from postal code.
- Export writes the same columns as the import, plus empty templates.
- Opening stock and the chart of accounts (khaemhat-coa layout, natura, tipo,
  flag) are check-only until M6 and M7 add the ledgers to write into.
- PartyService.SaveAsync takes an explicit VIES switch for the import.
- ADR 0031, wiki Import-Export, CHANGELOG and STATUS updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:52:59 +01:00

358 lines
27 KiB
CSS

/* Khaemhat: styles of the pages built so far, on top of css/tokens.css and css/components.css. Colours come from the
tokens, so every page follows the theme, the accent and the text size of the user. */
/* Without data-accent (a page rendered before the preferences are known) the default accent applies. */
:root:not([data-accent]) { --kh-accent: #1F5FA8; --kh-accent-strong: #174A85; --kh-accent-soft: #E3ECF8; --kh-accent-text: #174A85; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--kh-font); font-size: var(--kh-fs); background: var(--kh-bg); color: var(--kh-text); -webkit-font-smoothing: antialiased; }
#blazor-error-ui { background: var(--kh-err-soft); color: var(--kh-err-text); bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
/* ---- the page shown while the instance starts or is in maintenance (Middleware, without the theme files) ---- */
.kh-unavailable { min-height: 100vh; display: grid; place-items: center; padding: 32px; text-align: center; color: #E8EDF5;
background: radial-gradient(1200px 600px at 20% 10%, #243A5E 0%, #17243A 55%, #0F1826 100%); font-family: "Segoe UI", system-ui, sans-serif; }
.kh-unavailable section { max-width: 560px; }
.kh-unavailable img { border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.kh-unavailable h1 { font-size: 36px; margin: 22px 0 8px; font-weight: 650; }
.kh-unavailable p { margin: 0; padding: 12px 16px; border-radius: 10px; color: #D5DEEB; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
/* ---- messages: not found, access denied, error, coming soon ---- */
.kh-message { max-width: 560px; margin: 48px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.kh-message > svg.i.lg { width: 40px; height: 40px; color: var(--kh-accent); }
.kh-message h1 { font-size: var(--kh-fs-xl); margin: 4px 0 0; font-weight: 650; }
.kh-message .lead { color: var(--kh-text-2); line-height: 1.5; margin: 0; }
.kh-auth .kh-message { margin: 0 auto; }
.kh-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.kh-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.muted { color: var(--kh-text-3); }
/* ---- home ---- */
.kh-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.kh-area { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--kh-border); border-radius: var(--kh-radius-lg);
color: var(--kh-text); text-decoration: none; background: var(--kh-surface); }
.kh-area:hover { border-color: var(--kh-accent); background: var(--kh-row-hover); }
.kh-area .ico-box { width: 30px; height: 30px; }
.kh-area .grow { font-weight: 500; }
/* ---- profile (mockup 008) ---- */
fieldset.fgroup { margin: 0; padding: 0; min-width: 0; }
fieldset.fgroup > legend.fgh { float: left; width: 100%; }
fieldset.fgroup > legend + * { clear: both; }
fieldset.fgroup > :not(legend) { margin: 10px 11px; }
.kh-choices { display: flex; flex-wrap: wrap; gap: 10px; }
button.themecard { padding: 0; text-align: left; color: var(--kh-text); background: var(--kh-surface); }
.themecard .pv .tb { display: block; } .themecard .pv .sb { display: block; } .themecard .pv .ct { background: var(--pv-bg); }
.themecard .pv .tb { background: var(--pv-top); } .themecard .pv .sb { background: var(--pv-side); border-right: 1px solid var(--pv-line); }
.themecard .pv .ct i { background: var(--pv-line); } .themecard .pv .ct i:first-child { width: 60%; background: var(--kh-accent); }
.themecard .lbl .muted { margin-left: auto; font-size: 11px; }
.kh-pv-light { --pv-top: #17243A; --pv-side: #FFFFFF; --pv-bg: #F3F5F8; --pv-line: #DDE3EA; }
.kh-pv-dark { --pv-top: #0E131A; --pv-side: #171C23; --pv-bg: #12161C; --pv-line: #2E3744; }
.kh-pv-auto { --pv-top: #17243A; --pv-side: #FFFFFF; --pv-bg: linear-gradient(135deg, #F3F5F8 50%, #12161C 50%); --pv-line: #9AA6B4; }
.kh-pv-high-contrast { --pv-top: #000000; --pv-side: #FFFFFF; --pv-bg: #FFFFFF; --pv-line: #000000; }
button.sw { text-align: left; color: var(--kh-text); }
.sw .c.kh-acc-nilo { background: #1F5FA8; } .sw .c.kh-acc-lapislazzuli { background: #3F51B5; } .sw .c.kh-acc-malachite { background: #1E8E5A; }
.sw .c.kh-acc-turchese { background: #0F8A96; } .sw .c.kh-acc-ocra { background: #C27A1A; } .sw .c.kh-acc-corniola { background: #C2453A; }
.sw .c.kh-acc-ametista { background: #7E57C2; } .sw .c.kh-acc-grafite { background: #4B5563; }
.kh-seg { display: inline-flex; border: 1px solid var(--kh-border-strong); border-radius: var(--kh-radius); overflow: hidden; align-self: flex-start; }
.kh-seg button { border: 0; border-right: 1px solid var(--kh-border); background: var(--kh-surface); color: var(--kh-text-2); font: inherit; font-size: 12.5px;
padding: 6px 12px; cursor: pointer; }
.kh-seg button:last-child { border-right: 0; }
.kh-seg button.on { background: var(--kh-accent-soft); color: var(--kh-accent-text); font-weight: 600; }
.kh-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4px 16px; }
.kh-switch-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--kh-border);
background: transparent; font: inherit; color: var(--kh-text); text-align: left; cursor: pointer; }
.kh-switch-row .t { display: block; font-weight: 500; }
.kh-switch-row .s { display: block; font-size: var(--kh-fs-sm); color: var(--kh-text-3); }
.kh-radios { display: flex; flex-direction: column; gap: 2px; }
.kh-radios .chk { cursor: pointer; }
.kh-pick { max-width: 360px; }
.kh-input { height: 30px; border: 1px solid var(--kh-border-strong); border-radius: var(--kh-radius); background: var(--kh-input); color: var(--kh-text);
padding: 0 8px; font: inherit; }
.kh-inset { margin: 0 14px 14px; }
.kh-h2 { font-size: var(--kh-fs-lg); font-weight: 600; margin: 6px 0 0; }
/* Profile forms (issue #31): actions at the end of a form, read-only facts. */
.form .kh-formactions, .kh-formactions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.kh-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; padding: 12px 14px; font-size: 12.5px; }
.kh-facts dt { color: var(--kh-text-2); }
.kh-facts dd { margin: 0; }
.fgroup .pb > p:first-child { margin-top: 0; }
.kh-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kh-table th { text-align: left; font-weight: 600; color: var(--kh-text-2); font-size: var(--kh-fs-sm); padding: 6px 10px; border-bottom: 1px solid var(--kh-border-strong); }
.kh-table td { padding: 7px 10px; border-bottom: 1px solid var(--kh-border); vertical-align: middle; }
.kh-table td kbd + kbd { margin-left: 6px; }
.kh-table .badge { margin-left: 6px; }
.kh-nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* The heading focused after navigation (FocusOnNavigate) is not a control: no focus ring. */
h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }
/* ---- sign-in pages (mockups 001-003): brand panel on the left, form card on the right ---- */
.kh-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 52%) 1fr; color: var(--kh-text); }
.kh-auth .side { display: flex; flex-direction: column; justify-content: space-between; padding: 48px 44px 36px; color: #E8EDF5;
background: radial-gradient(1100px 620px at 15% 0%, #243A5E 0%, #17243A 55%, #0F1826 100%); }
.kh-auth .side .mark { border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.kh-auth .side h2 { font-size: 30px; letter-spacing: -.5px; margin: 18px 0 10px; font-weight: 650; }
.kh-auth .side p { max-width: 460px; color: #B8C5DA; font-size: 14px; line-height: 1.5; margin: 0; }
.kh-auth .features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kh-auth .features li { padding: 10px 12px; border-radius: 8px; font-size: 11.5px; color: #B8C5DA; line-height: 1.4;
background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.kh-auth .features strong { display: block; color: #E8EDF5; font-weight: 600; margin-bottom: 2px; }
.kh-auth .form-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; background: var(--kh-bg); }
.kh-auth .card { width: 100%; max-width: 380px; }
.kh-auth h1 { font-size: 20px; margin: 0 0 4px; font-weight: 650; }
.kh-auth .sub { color: var(--kh-text-2); margin: 0 0 18px; line-height: 1.45; }
.kh-auth footer { margin-top: 28px; font-size: 11.5px; color: var(--kh-text-3); }
.kh-auth footer a { color: var(--kh-accent-text); text-decoration: none; }
.kh-form { display: flex; flex-direction: column; gap: 4px; }
.kh-form label { font-size: 11.5px; font-weight: 600; color: var(--kh-text-2); margin-top: 8px; }
.kh-form input[type=text], .kh-form input[type=password], .kh-form input:not([type]), .kh-form select {
height: 32px; padding: 0 10px; border: 1px solid var(--kh-border-strong); border-radius: 6px; background: var(--kh-input); font: inherit; color: inherit; }
.kh-form input:focus, .kh-form select:focus { outline: 2px solid var(--kh-accent); outline-offset: -1px; border-color: var(--kh-accent); }
.kh-form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--kh-text); margin-top: 12px; }
.kh-form .otp { height: 44px; font-size: 22px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.kh-form .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.kh-form .row .kh-btn { margin-top: 0; }
.kh-form .hint { font-size: 11.5px; color: var(--kh-text-3); }
.kh-btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 14px; margin-top: 16px; border-radius: 6px;
border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.kh-btn.primary { background: var(--kh-accent); color: #FFF; align-self: flex-start; }
.kh-btn.primary:hover { background: var(--kh-accent-strong); }
.kh-alert { padding: 10px 12px; border-radius: 6px; margin: 12px 0; line-height: 1.45; font-size: 12.5px; }
.kh-alert.err { background: var(--kh-err-soft); color: var(--kh-err-text); }
.kh-alert.warn { background: var(--kh-warn-soft); color: var(--kh-warn-text); margin-top: 20px; }
.kh-alert.info { background: var(--kh-info-soft); color: var(--kh-info-text); margin-top: 20px; }
.kh-rules { margin: 10px 0 0; padding-left: 18px; color: var(--kh-text-2); font-size: 11.5px; line-height: 1.6; }
.kh-secret { margin: 0 0 6px; }
.kh-secret dt { font-size: 11.5px; font-weight: 600; color: var(--kh-text-2); margin-top: 8px; }
.kh-secret dd { margin: 4px 0 0; }
.kh-secret code { font-size: 15px; letter-spacing: 1px; word-break: break-all; }
.kh-codes { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kh-codes code { display: block; padding: 6px 8px; background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: 6px; text-align: center; font-size: 14px; }
@media (max-width: 760px) {
.kh-auth { grid-template-columns: 1fr; }
.kh-auth .side { padding: 24px; }
.kh-auth .features { display: none; }
.cols-3 { grid-template-columns: 1fr; }
}
/* ---- dashboard (issue #30, mockups 004 and 006) ---- */
.kh-home.kh-with-drawer { margin-right: 420px; }
.kh-home-off { align-items: center; margin-bottom: var(--kh-gap); }
.kh-home-off .grow { flex: 1; }
.kh-wgrid { margin-bottom: var(--kh-gap); }
.kh-wgrid.kh-editing .widget { cursor: grab; }
.kh-wgrid.kh-editing .widget .wb { pointer-events: none; opacity: .75; }
.widget.kh-over { outline-style: solid; background: var(--kh-accent-soft); }
.widget .wh .badge { font-size: 10.5px; }
.kh-wlist { overflow: auto; max-height: 320px; }
.kh-wlist .li .s { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kh-wlist a.li, a.deadline { color: var(--kh-text); text-decoration: none; }
.kh-wlist a.li[href]:hover, a.deadline[href]:hover { background: var(--kh-row-hover); }
.kh-wlist a[aria-disabled="true"] { cursor: default; }
.kh-wempty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 12px; font-size: 12.5px; color: var(--kh-text-2); }
.kh-wempty svg.i { color: var(--kh-ok); }
.kh-tone { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--kh-text-3); }
.kh-tone.ok { background: var(--kh-ok); } .kh-tone.info { background: var(--kh-info, var(--kh-accent)); }
.kh-tone.warn { background: var(--kh-warn); } .kh-tone.err { background: var(--kh-err); }
.kh-status .li { padding: 7px 12px; }
.kh-status .li .s { text-align: right; }
.chk-row input[type="checkbox"] { margin: 0; accent-color: var(--kh-accent); }
.kh-rowx { opacity: 0; }
.chk-row:hover .kh-rowx, .kh-rowx:focus-visible { opacity: 1; }
.kh-wadd { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--kh-border); color: var(--kh-text-3); }
.kh-wadd .kh-input { flex: 1; min-width: 0; }
.kh-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.kh-shortcut { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--kh-border);
border-radius: var(--kh-radius-lg); color: var(--kh-text); text-decoration: none; font-size: 12px; text-align: center; }
.kh-shortcut:hover { border-color: var(--kh-accent); background: var(--kh-row-hover); }
.kh-shortcut .ico-box { width: 30px; height: 30px; }
.kh-picklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 50vh; overflow: auto; }
.kh-picklist .chk { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 0; }
.kh-wcoming { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12.5px; }
.kh-wcoming > svg.i { color: var(--kh-text-3); }
.kh-wcoming p { margin: 0; }
.kh-wcoming .s { color: var(--kh-text-3); font-size: 11.5px; }
.kh-dsec { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--kh-border); }
.kh-dsec:last-child { border-bottom: 0; }
.kh-dsec h3 { margin: 0; }
.kh-dsec p { margin: 0; }
.kh-dsec .f { display: flex; flex-direction: column; gap: 4px; }
.kh-wpick-row { border-bottom: 1px solid var(--kh-border); }
.kh-wpick-row .kh-switch-row { border-bottom: 0; }
.kh-wpick-row.off .kh-switch-row .t { color: var(--kh-text-2); }
.kh-wpick-tools { display: flex; align-items: center; gap: 4px; padding: 0 4px 8px; }
.kh-wpick-tools select { flex: 1; height: 26px; font-size: 12px; }
.kh-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1279px) { .kh-home.kh-with-drawer { margin-right: 0; } }
@media (max-width: 999px) { .kh-wgrid > .widget { grid-column: 1 / -1; } }
@media (max-width: 599px) { .kh-wlist .badge { display: none; } }
/* ---- notifications panel (issue #32, mockup 010) ---- */
.kh-notif-filter { margin-bottom: 4px; }
.kh-notifs { list-style: none; margin: 0 -16px; padding: 0; }
.kh-notif { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--kh-border); }
.kh-notif.unread { background: var(--kh-accent-soft); }
.kh-notif .ico-box { width: 28px; height: 28px; flex: none; }
.kh-notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; border: 0; background: none; padding: 0; text-align: left;
font: inherit; color: var(--kh-text); cursor: pointer; }
.kh-notif-main .t { font-size: 12.5px; }
.kh-notif.unread .kh-notif-main .t { font-weight: 600; }
.kh-notif-main .s { font-size: 11.5px; color: var(--kh-text-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kh-notif-main .m { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--kh-text-3); }
.kh-notif-main:focus-visible { outline: 2px solid var(--kh-accent); outline-offset: 2px; border-radius: 4px; }
/* ---- help (issue #32, mockup 011) ---- */
.kh-help { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--kh-gap); align-items: start; margin-top: var(--kh-gap); }
.kh-help-index { padding: 8px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; max-height: calc(100vh - 190px); overflow: auto; }
.kh-help-group { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--kh-text-3); padding: 10px 8px 4px; }
.kh-help-link { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--kh-radius); color: var(--kh-text); text-decoration: none; font-size: 12.5px; }
.kh-help-link svg.i { color: var(--kh-text-3); }
.kh-help-link:hover { background: var(--kh-row-hover); }
.kh-help-link.on { background: var(--kh-accent-soft); color: var(--kh-accent-text); font-weight: 600; }
.kh-help-link.on svg.i { color: var(--kh-accent); }
.kh-help-body { padding: 22px 26px 28px; font-size: 13.5px; line-height: 1.6; color: var(--kh-text); min-width: 0; }
.kh-help-body h1 { font-size: 22px; font-weight: 650; margin: 0 0 10px; }
.kh-help-body h2 { font-size: 16px; font-weight: 600; margin: 26px 0 8px; }
.kh-help-body h3 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; }
.kh-help-body p, .kh-help-body ul, .kh-help-body ol { margin: 0 0 10px; }
.kh-help-body ul, .kh-help-body ol { padding-left: 22px; }
.kh-help-body li { margin: 2px 0; }
.kh-help-body a { color: var(--kh-accent-text); }
.kh-help-body code { font-family: var(--kh-font-mono, ui-monospace, Consolas, monospace); font-size: .92em; background: var(--kh-surface-3); border-radius: 4px; padding: 1px 4px; }
.kh-help-body pre { background: var(--kh-surface-2); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); padding: 10px 12px; overflow: auto; font-size: 12px; line-height: 1.45; }
.kh-help-body pre code { background: none; padding: 0; }
.kh-help-body img { max-width: 100%; border: 1px solid var(--kh-border); border-radius: var(--kh-radius); margin: 6px 0; }
.kh-help-body hr { border: 0; border-top: 1px solid var(--kh-border); margin: 18px 0; }
.kh-help-body .callout { margin: 10px 0; font-size: 13px; }
.kh-help-body .callout p:last-child { margin-bottom: 0; }
.kh-help-meta { font-size: 12px; color: var(--kh-text-3); margin-bottom: 14px; }
.kh-help-meta p { margin: 0; }
.kh-help-table { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--kh-border); border-radius: var(--kh-radius); }
.kh-help-table table.grid { width: 100%; }
.kh-help-table table.grid td { white-space: normal; height: auto; padding: 6px 10px; max-width: none; vertical-align: top; }
.kh-help-table table.grid th { white-space: normal; text-align: left; }
/* Global search (mockup 009): the page a help section belongs to. */
.palette .hit .d { color: var(--kh-text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.palette .hit > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .hit .d:last-child { margin-left: auto; }
@media (max-width: 899px) { .kh-help { grid-template-columns: 1fr; } .kh-help-index { position: static; max-height: 240px; } }
/* Attachments and generated files (SPEC §9.4, mockup 024). */
.kh-tab-body { padding: 14px 16px; }
/* Parties (issue #41): the lists of details of a record and the choice of a municipality from its postal code. */
.kh-detailfoot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.kh-endrow { display: flex; align-items: flex-end; justify-content: flex-end; }
.kh-places { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kh-att { display: flex; flex-direction: column; gap: 10px; }
.kh-att-head { display: flex; align-items: center; gap: 8px; }
.kh-att-title, .kh-att-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--kh-text-3); font-weight: 600; }
.kh-att-section { margin-top: 6px; }
.kh-att-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--kh-border); border-radius: 8px; }
.kh-att-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--kh-border); }
.kh-att-row:last-child { border-bottom: 0; }
.kh-att-row.old { opacity: .72; }
.kh-att-type { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 7px; display: grid; place-items: center; font: 600 10px var(--kh-mono); letter-spacing: .3px; background: var(--kh-surface-2); color: var(--kh-text-2); }
.kh-att-type.pdf { background: var(--kh-err-soft); color: var(--kh-err); }
.kh-att-type.xml { background: var(--kh-info-soft); color: var(--kh-info); }
.kh-att-type.sheet { background: var(--kh-ok-soft); color: var(--kh-ok); }
.kh-att-type.img { background: var(--kh-warn-soft); color: var(--kh-warn); }
.kh-att-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kh-att-main .t { font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; }
.kh-att-main .m { color: var(--kh-text-3); font-size: 12px; }
.kh-att-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.kh-att-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-att-upload { cursor: pointer; }
.kh-att-upload input[type="file"] { display: none; }
.kh-att-upload.disabled { opacity: .6; pointer-events: none; }
/* Preview of a file (mockup 024). */
.kh-preview { min-height: 200px; }
.kh-preview-frame { width: 100%; height: 70vh; border: 1px solid var(--kh-border); border-radius: 6px; background: #fff; }
.kh-preview-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.kh-preview-text { max-height: 70vh; overflow: auto; margin: 0; padding: 12px; background: var(--kh-surface-2); border-radius: 6px; font: 12px/1.5 var(--kh-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.kh-preview-table { max-height: 70vh; overflow: auto; }
.kh-preview-table td { white-space: nowrap; }
/* History of a record (SPEC §7.4). */
.kh-audit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.kh-audit-item { display: flex; gap: 10px; align-items: flex-start; }
.kh-audit-main { flex: 1; min-width: 0; }
.kh-audit-main .t { font-weight: 600; margin-bottom: 4px; }
.kh-audit-main .t .muted { font-weight: 400; }
.kh-audit-changes { border-collapse: collapse; font-size: 12.5px; }
.kh-audit-changes th { text-align: left; font-weight: 600; color: var(--kh-text-3); padding: 2px 14px 2px 0; }
.kh-audit-changes td { padding: 2px 14px 2px 0; overflow-wrap: anywhere; }
.kh-audit-changes td.old { color: var(--kh-text-3); text-decoration: line-through; }
/* Print preview (SPEC §9.4, mockup 025): an A4 sheet; printing shows the sheet only. */
.kh-print { display: flex; flex-direction: column; gap: 12px; }
.kh-print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kh-print-stage { background: var(--kh-surface-2); border: 1px solid var(--kh-border); border-radius: 8px; padding: 24px; overflow: auto; }
.kh-sheet { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 18mm 16mm; background: #fff; color: #1d2433; box-shadow: 0 2px 12px rgba(0,0,0,.12); font: 10pt/1.45 var(--kh-font, system-ui), sans-serif; box-sizing: border-box; }
.kh-sheet-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #1F5F8B; padding-bottom: 10px; margin-bottom: 14px; }
.kh-sheet-company { font-size: 15pt; font-weight: 700; }
.kh-sheet-muted { color: #6b7280; font-size: 9pt; }
.kh-sheet-title { text-align: right; }
.kh-sheet-title .k { font-size: 16pt; font-weight: 700; color: #1F5F8B; }
.kh-sheet-title .n { color: #6b7280; }
.kh-sheet-intro { margin: 0 0 14px; }
.kh-sheet-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.kh-sheet-table th { background: #eceff3; text-align: left; padding: 5px 6px; }
.kh-sheet-table td { padding: 5px 6px; border-bottom: 1px solid #d9dde3; }
.kh-sheet-table .num { text-align: right; white-space: nowrap; }
.kh-sheet-table .mono { font-family: var(--kh-mono); }
.kh-sheet-table tfoot td { border-bottom: 0; padding-top: 8px; }
.kh-sheet-foot { margin-top: 24px; color: #6b7280; font-size: 8.5pt; }
@media (max-width: 899px) { .kh-print-stage { padding: 8px; } .kh-sheet { width: 100%; min-height: 0; padding: 16px; } }
@media print {
@page { size: A4; margin: 0; }
body * { visibility: hidden; }
.kh-sheet, .kh-sheet * { visibility: visible; }
.kh-sheet { position: absolute; left: 0; top: 0; zoom: 1 !important; width: 210mm; min-height: 0; box-shadow: none; margin: 0; }
}
/* Price grid (mockup 018): filter bar, cells changed and not saved, prices derived from another list. */
.kh-pricebar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.kh-pricebar .grow { flex: 1; }
.kh-pricebar > .f { min-width: 200px; }
.kh-pricebar-date { width: 160px; }
.kh-pricebar-party { width: 340px; max-width: 100%; }
.kh-pricebar-check { display: flex; gap: 6px; align-items: center; height: 30px; font-size: 12.5px; }
/* The filter bar and the hint take room: the grid is shorter than in the other radars and the radar does not shrink under the hint. */
.kh-radar.kh-pricegrid { flex: none; }
.kh-pricegrid .kh-radarpanel .kh-gridwrap { height: calc(100vh - 470px); min-height: 240px; }
.kh-pricehint { margin-top: 10px; }
.kh-pricefoot { margin-left: 14px; }
/* Stronger than the striped and hovered rows, so every pending cell shows. */
.grid tbody tr td.kh-changed { background: var(--kh-warn-soft); font-weight: 600; }
.grid td.kh-derived { color: var(--kh-text-2); font-style: italic; }
/* Guided import and export (mockup 077): the wizard and the export on the left, mapping or preview on the right. */
.kh-import { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: var(--kh-gap); align-items: start; }
.kh-import-side { display: flex; flex-direction: column; gap: var(--kh-gap); }
.kh-import-main { min-width: 0; }
.kh-import-options { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--kh-border); }
.kh-import-options .f { display: flex; flex-direction: column; gap: 4px; }
.kh-import-options input[type=file].in { padding: 4px; height: auto; }
.kh-import-lead { margin: 0 0 10px; }
.kh-import-list { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.kh-import-h { font-size: 13px; margin: 14px 0 8px; }
.kh-import-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kh-import-chips .chip.soft { background: var(--kh-surface-3); color: var(--kh-text-2); }
.kh-import-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.kh-import-callout { margin: 0 12px 10px; }
.kh-import-map td select.in { min-width: 220px; }
.kh-import-preview td.kh-import-outcome { white-space: normal; min-width: 220px; }
.kh-import-msg { display: block; font-size: 11.5px; margin-top: 3px; }
.kh-import-msg.err { color: var(--kh-err); }
.kh-import-msg.warn { color: var(--kh-warn-text, var(--kh-text-2)); }
.grid tbody tr td.kh-import-cell-err { background: var(--kh-err-soft); }
.grid tbody tr td.kh-import-cell-warn { background: var(--kh-warn-soft); }
@media (max-width: 1100px) { .kh-import { grid-template-columns: 1fr; } }