:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211d;
  background: #edf0ec;
  font-synthesis: none;
  --green: #173c2d;
  --green-2: #245b43;
  --gold: #f4bf4f;
  --red: #a43b3b;
  --ink: #17211d;
  --line: #d8ded9;
  --muted: #66736d;
}

/* Период и фильтры: две компактные строки, сам фильтр всегда помещается целиком. */
@media (min-width: 901px) {
  #paymentPeriodForm,
  #cashPeriodForm {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 6px;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #paymentPeriodForm > .field,
  #cashPeriodForm > .field { width: 140px; min-width: 140px; }
  #paymentPeriodForm > .primary,
  #cashPeriodForm > .primary { width: 88px !important; min-width: 88px; }
  #paymentPeriodForm > .warehouse-period-shortcuts,
  #cashPeriodForm > .warehouse-period-shortcuts {
    display: grid;
    grid-template-columns: repeat(5, max-content);
    flex: 0 0 auto;
  }
  #cashPeriodForm .cash-filter-grid,
  #paymentPeriodForm .payment-filter-grid {
    display: grid;
    flex: 1 0 100%;
    width: 100%;
    gap: 6px;
    align-items: end;
    padding: 9px;
    border: 1px solid #dfe7e2;
    border-radius: 12px;
    background: #f8faf8;
  }
  #cashPeriodForm .cash-filter-grid {
    grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(90px, 1fr)) minmax(100px, .9fr) repeat(2, minmax(82px, .8fr)) 104px;
  }
  #paymentPeriodForm .payment-filter-grid {
    grid-template-columns: minmax(115px, 1fr) minmax(135px, 1.15fr) repeat(4, minmax(85px, .85fr)) minmax(95px, .9fr) minmax(150px, 1.2fr) 104px;
  }
  #cashPeriodForm .cash-filter-grid > label,
  #paymentPeriodForm .payment-filter-grid > label,
  #cashPeriodForm .cash-filter-grid > button,
  #paymentPeriodForm .payment-filter-grid > button,
  #paymentPeriodForm .payment-amount-filter {
    width: auto;
    min-width: 0;
    margin: 0;
  }
  #cashPeriodForm .cash-filter-grid input,
  #cashPeriodForm .cash-filter-grid select,
  #paymentPeriodForm .payment-filter-grid input,
  #paymentPeriodForm .payment-filter-grid select {
    width: 100%;
    min-width: 0;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #2a6249, #10251d 55%); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 24px; padding: 30px; box-shadow: 0 24px 70px #07140e80; }
.login-brand-logo { display: block; width: min(100%, 310px); height: auto; margin-bottom: 18px; border-radius: 6px; background: #000; }
h1, h2, h3, p { margin-top: 0; }
.login-card h1 { margin: 22px 0 8px; }
.login-card .primary { width:100%;min-height:44px; }
.account-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.account-choice { min-height: 54px; border: 2px solid var(--line); border-radius: 11px; background: #fff; color: #24342d; padding: 8px; font-size: 13px; font-weight: 800; }
.account-choice.active { border-color: var(--green-2); background: #e4f0e9; color: var(--green); box-shadow: 0 0 0 2px #245b4320; }
.muted { color: var(--muted); }
.field { display: grid; gap: 7px; margin: 16px 0; }
.brigade-card [hidden] { display: none !important; }
.field span { font-size: 13px; color: var(--muted); font-weight: 700; }
input, select { width: 100%; min-height: 44px; border: 1px solid #cbd3ce; border-radius: 10px; background: #fff; padding: 9px 11px; color: #17211d; }
input:focus, select:focus { outline: 3px solid #f4bf4f55; border-color: #c28d1d; }
.primary, .secondary, .danger, .quiet { border: 0; border-radius: 10px; min-height: 40px; padding: 8px 14px; font-weight: 800; }
.primary { background: var(--gold); color: #17211d; }
.secondary { background: var(--green); color: #fff; }
.danger { background: #f5dddd; color: #8c2929; }
.quiet { background: #e8ece9; color: #28352f; }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: wait; }
.primary:focus-visible, .secondary:focus-visible, .danger:focus-visible, .quiet:focus-visible { outline: 3px solid #f4bf4f55; outline-offset: 2px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 275px 1fr; }
.sidebar { background: linear-gradient(180deg,#10251d 0%,#0b1d16 100%); color: #fff; padding: 20px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; font-family:"Segoe UI Variable Text","Segoe UI",Inter,sans-serif; }
.sidebar-pin-toggle { align-self:flex-end;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;margin:0 0 10px;padding:5px 9px;border:1px solid #f4bf4f66;border-radius:9px;background:#f4bf4f14;color:#ffd56e;font:800 12px/1.1 "Segoe UI Variable Text","Segoe UI",sans-serif;cursor:pointer;white-space:nowrap; }
.sidebar-pin-toggle:hover,.sidebar-pin-toggle:focus-visible { background:#f4bf4f2b;color:#fff;outline:none; }
.sidebar-pin-icon { display:grid;place-items:center;min-width:18px;font-size:19px;line-height:1; }
.brand { display: grid; justify-items: center; gap: 8px; margin-bottom: 26px; }
.brand-logo { display: block; width: min(100%, 190px); height: auto; border-radius: 4px; background: #000; }
.brand small { color: #b6c9bf; font-weight: 800; text-align: center; }
.nav { display: grid; gap: 10px; }
.nav-group { display: grid; gap: 4px; padding: 7px; border: 1px solid #ffffff0d; border-radius: 12px; background: #ffffff08; }
.nav-group > span { color: #ffd56e; padding: 4px 8px 7px; border-bottom: 1px solid #ffffff12; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.nav button { border: 0; background: transparent; color: #e1e9e5; text-align: left; padding: 10px 12px; border-radius: 9px; font-size: 15px; line-height: 1.35; font-weight: 700; letter-spacing:.005em; }
.nav button.active { color: #17211d; background: var(--gold); box-shadow: 0 4px 14px #00000024; }
.nav button:hover:not(.active) { color: #fff; background: #ffffff13; }
.nav .nav-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; color: #d6e0db; padding: 8px 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.nav .nav-group-toggle:hover { color: #fff; background: #ffffff0b; }
.nav .nav-collapsible > .nav-group-toggle { color: var(--gold); background: #f4bf4f0a; }
.nav .nav-main-group > .nav-group-toggle.active-group { color:#fff; background:#ffffff0d; }
.nav-chevron { font-size: 18px; line-height: 1; transition: transform .18s ease; }
.nav-group-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-group-items { display: grid; gap: 4px; }
.nav-group-items[hidden] { display: none; }
.nav-subitems { display: grid; gap: 3px; margin-left: 12px; padding-left: 9px; border-left: 2px solid #f4bf4f55; }
.nav-subitems button { padding: 9px 12px; font-size: 14px; }
.nav .nav-project-toggle { margin-top: 2px; padding: 8px 12px 6px; }
.nav-reference-section { display: grid; gap: 3px; }
.nav .nav-reference-section-toggle { padding: 8px 12px 6px 24px; color: #d6e0db; font-size: 14px; text-transform: none; letter-spacing: 0; }
.nav .nav-reference-section-toggle.active-group { color: #fff; background: #ffffff0d; }
.nav-reference-subitems { margin-left: 24px; }
.nav-cash-section { display:grid; gap:3px; }
.nav .nav-cash-toggle { padding:10px 12px; color:#e1e9e5; font-size:15px; text-transform:none; letter-spacing:.005em; }
.nav .nav-cash-toggle.active-group { color:#ffd56e; background:#ffffff0d; }
.nav-cash-items { margin-left:12px; }
.sidebar-footer { margin-top: auto; display: grid; gap: 10px; }
.sidebar-user-name { display: block; color: #fff; font-size: 21px; line-height: 1.2; text-align: center; }
.sidebar-footer small { color: #93a79d; text-align: center; }
@media (min-width: 901px) {
  .shell,.sidebar { transition:grid-template-columns .18s ease,width .18s ease,padding .18s ease; }
  .shell.sidebar-collapsed { grid-template-columns:60px minmax(0,1fr); }
  .shell.sidebar-collapsed .sidebar { width:60px;padding:12px 8px;overflow:hidden;z-index:12;box-shadow:6px 0 16px #07140e1f; }
  .shell.sidebar-collapsed .sidebar:hover,.shell.sidebar-collapsed .sidebar:focus-within { width:275px;padding:16px 14px;overflow-y:auto;box-shadow:12px 0 30px #07140e42; }
  .shell.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) > :not(.sidebar-pin-toggle) { opacity:0;visibility:hidden;pointer-events:none; }
  .shell.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-pin-toggle { align-self:center;width:42px;padding-inline:6px; }
  .shell.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-pin-label { display:none; }
  .shell.sidebar-collapsed .content { max-width:none;margin:0;padding-left:10px;padding-right:10px; }
  .nav-group > button:not(.nav-group-toggle),
  .nav .nav-project-toggle,
  .nav-collapsible .nav-group-items button { padding-left: 24px; }
  .nav-group > .nav-cash-section > .nav-cash-toggle { padding-left:24px; }
}
.main { min-width: 0; }
.topbar { min-height: 76px; background: #fff; border-bottom: 1px solid var(--line); padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 2; }
.topbar h1 { font-size: 22px; margin: 0; }
.topbar-actions { display:flex;align-items:center;gap:10px; }
.important-events-button { border:1px solid #e5b849;background:#fff6d8;color:#6f4d06;border-radius:10px;padding:7px 10px;font-weight:800;cursor:pointer; }
.important-events-button strong { display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:5px;border-radius:999px;background:#efc34f;color:#203128; }
.important-events-button.active { background:#efc34f; }
.important-events-popover { position:fixed;top:68px;right:22px;z-index:40;width:min(980px,calc(100vw - 44px));max-height:calc(100vh - 90px);padding:42px 12px 12px;overflow:auto;border:1px solid #d9c173;border-radius:16px;background:#f6f8f6;box-shadow:0 22px 65px #17251f38; }
.important-events-popover-close { position:absolute;top:9px;right:12px;display:grid;place-items:center;width:30px;min-width:30px;height:30px;padding:0;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:22px;line-height:1;cursor:pointer; }
.important-events-popover-close:hover { background:#fff4ce;border-color:#dfbf58; }
.important-events-popover-content { display:grid;gap:12px; }
.important-events-popover-content .card { margin:0;padding:16px; }
.online { padding: 8px 11px; border-radius: 999px; background: #e0f2e7; color: #166039; font-size: 13px; font-weight: 800; }
.content { width: 100%; padding: 20px; max-width: 1680px; margin: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric, .card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.metric { padding: 20px; background: #f2f7f4; border-color: #cadbd1; box-shadow: 0 4px 14px #1734270a; }
.metric span { color: #53675d; font-size: 13px; font-weight: 700; }
.metric strong { display: block; margin-top: 8px; font-size: 30px; }
.metric small { display: block; margin-top: 7px; color: var(--muted); }
.species-metric { display: flex; min-height: 166px; flex-direction: column; gap: 9px; }
.metric-species-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid #edf0ee; }
.metric-species-row small { margin: 0; font-weight: 800; }
.metric-species-row strong { margin: 0; font-size: 20px; line-height: 1.15; text-align: right; }
.metric-species-row em { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-style: normal; text-align: right; }
.metric .metric-note { margin-top: auto; line-height: 1.3; }
.metric.positive { border-color: #8fbda3; background: #e9f5ed; }
.metric.negative { border-color: #dfa1a1; background: #fff1f1; }
.metric.positive strong { color: #196039; }
.metric.negative strong { color: var(--red); }
.card { padding: 20px; margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; align-items: end; }
.form-grid .field { margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e5e9e6; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td input, td select { min-height: 38px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; background: #e6ebe8; }
.badge.green { background: #dff1e5; color: #196039; }
.badge.red { background: #f4dede; color: #8d2929; }
.badge.yellow { background: #fff0c7; color: #74520c; }
.badge.blue { background: #e7f1ff; color: #245d9b; }
.brigade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.brigade-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.brigade-card h3 { margin-bottom: 3px; }
.brigade-card .muted { font-size: 13px; }
.brigade-card-fields { display:grid;grid-template-columns:minmax(0,1.35fr) minmax(86px,.65fr);gap:7px 8px; }
.brigade-card-fields .field { min-width:0; }
.brigade-assignment-comment { display:grid;gap:2px;margin:8px 0;padding:7px 8px;border-radius:8px;background:#f3f7f4; }
.brigade-assignment-comment span { color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase; }
.brigade-assignment-comment strong { overflow:hidden;color:#47564f;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap; }
.size-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.size-row { display: grid; grid-template-columns: 1fr 1fr 80px auto; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid #e7ebe8; }
.audit-list { display: grid; gap: 10px; }
.audit-item { padding: 11px 0; border-bottom: 1px solid #e7ebe8; display: grid; grid-template-columns: 155px 1fr; gap: 12px; }
.audit-item small { color: var(--muted); }
.audit-list { overflow-x:auto; }
.audit-item.audit-item-detailed { display:grid;grid-template-columns:132px 132px minmax(190px,.9fr) minmax(420px,2.2fr) 145px;align-items:center;gap:9px;min-width:1080px;padding:7px 4px;line-height:1.25; }
.audit-item-detailed > * { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.audit-item-detailed time { color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums; }
.audit-item-detailed > strong { font-size:12px; }
.audit-item-detailed .audit-entity { color:#29473a;font-weight:800; }
.audit-item-detailed .audit-changes { color:#43564d; }
.audit-item-detailed .audit-actor { color:var(--muted);font-size:12px;text-align:right; }
.empty { padding: 28px; color: var(--muted); text-align: center; border: 1px dashed #cad3cd; border-radius: 12px; }
.shift-list-filters { display: grid; grid-template-columns: minmax(240px, 460px) minmax(180px, 240px); gap: 12px; align-items: end; }
.shift-list-filters .field { margin: 0; }
.shift-search { max-width: 460px; }
.shift-period-filter form { display: grid; grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) auto; gap: 12px; align-items: end; }
.shift-period-filter .field { margin: 0; }
.shift-period-shortcuts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.shift-period-shortcuts .quiet, .warehouse-period-shortcuts .quiet { width: auto; min-height: 32px; padding: 5px 10px; border: 1px solid #d9dfdb; border-radius: 8px; background: #f2f5f3; color: #46534d; font-size: 12px; line-height: 1.1; white-space: nowrap; }
.shift-period-shortcuts .quiet:hover, .warehouse-period-shortcuts .quiet:hover { border-color: #aebbb3; background: #e7ede9; color: var(--green); }
.shift-period-filter form > .primary[type="submit"], .warehouse-period-filter form > .primary[type="submit"], .accounting-filter form > .primary[type="submit"] { width: 104px; min-height: 40px; padding-inline: 12px; justify-self: start; }
.master-yield-summary table { min-width: 1440px; }
.master-yield-summary th.species-group { text-align: center; color: var(--green); }
.master-yield-summary th.total-group { color: var(--ink); background: #f7f1df; }
.master-yield-summary td:not(:first-child) { white-space: nowrap; }
.sawmill-yield-summary table { min-width: 720px; }
.master-performance-list { display: grid; gap: 18px; }
.master-performance-card { padding: 16px; border: 1px solid #dfe5e1; border-radius: 16px; background: #f8faf9; }
.master-performance-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.master-performance-title small { color: var(--muted); text-transform: uppercase; font-weight: 800; letter-spacing: .06em; }
.master-performance-title h3 { margin: 0; font-size: 22px; }
.master-name-button { padding: 0; border: 0; color: var(--green); background: transparent; font: inherit; font-size: 22px; font-weight: 900; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 5px; cursor: pointer; }
.master-name-button:hover { color: #0f3f2d; }
.master-performance-metrics { margin-bottom: 0; }
.master-shift-details { margin-top: 14px; padding: 14px; border: 1px solid #d7dfda; border-radius: 13px; background: #fff; }
.master-shift-details table { min-width: 820px; }
.shift-number-yield-summary table { min-width: 720px; }
.yield-indicator { display: inline-flex; align-items: center; justify-content: center; font-weight: 900; white-space: nowrap; }
.yield-indicator.red, .yield-indicator.green, .yield-indicator.bright { padding: 5px 9px; border-radius: 999px; }
.yield-indicator.red { background: #f8dddd; color: #a12626; }
.yield-indicator.green { background: #dff1e5; color: #196039; }
.yield-indicator.bright { background: #18a957; color: #fff; box-shadow: 0 4px 12px #18a95733; }
.yield-breakdown { min-width: 150px; }
.yield-breakdown-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #edf0ee; }
.yield-breakdown-row:first-child { margin-top: 4px; border-top: 0; }
.yield-breakdown-row small { display: inline; margin: 0; color: var(--muted); white-space: nowrap; }
.yield-breakdown-value { color: var(--ink) !important; font-weight: 900; white-space: nowrap; }
.yield-breakdown-metric { display: flex; flex-direction: column; }
.yield-breakdown-metric .yield-breakdown { margin-top: 4px; }
.yield-breakdown-metric .yield-indicator.neutral { color: var(--ink); }
.manager-shift-create { margin: 0 0 22px; padding: 18px; border: 1px solid #b8cbbf; border-radius: 14px; background: #f2f8f4; }
.manager-shift-create[hidden] { display: none; }
.manager-shift-grid { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.manager-shift-grid .field { margin: 0; }
.manager-shift-reason { grid-column: span 2; }
.back-button { margin-bottom: 14px; }
.shift-hero { border-top: 5px solid var(--green-2); }
.shift-metrics { margin: 20px 0 0; }
.shift-metrics .metric { background: #f7f9f7; }
.shift-metrics .metric strong { font-size: 26px; }
.shift-metrics small { color: var(--muted); }
.locked-note { padding: 16px 18px; margin-bottom: 18px; border: 1px solid #e7c363; border-radius: 14px; background: #fff3cf; color: #654b0c; font-weight: 700; }
.shift-actions-panel { border-top: 5px solid var(--gold); background: #fffcf3; }
.shift-action-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shift-action-row { display: grid; grid-template-columns: 1fr; gap: 10px; align-content: start; padding: 15px; border: 1px solid #dfe5e1; border-radius: 13px; background: #fff; }
.shift-action-row .field { margin: 0; }
.shift-action-row button { min-height: 44px; }
.shift-action-copy { align-self: center; }
.shift-action-copy strong, .shift-action-copy small { display: block; }
.shift-action-copy small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.shift-action-delete { border-color: #e2aaaa; background: #fff7f7; }
.shift-action-delete .shift-action-copy strong { color: #8c2929; }
.drum-section { border-top: 5px solid var(--gold); }
.drum-specification-entry { border-top:5px solid var(--gold);background:linear-gradient(180deg,#fffdf6 0,#fff 150px); }
.drum-specification-entry > .card-head h2 { color:#183029; }
.drum-specification-common-title { margin:2px 0 0;padding:8px 12px 0;border:1px solid #ead9aa;border-bottom:0;border-radius:12px 12px 0 0;background:#fff8e6;color:#735714;font-size:11px;font-weight:900;letter-spacing:.04em;text-transform:uppercase; }
.drum-specification-head { display:grid;grid-template-columns:minmax(210px,1.45fr) minmax(135px,.9fr) minmax(145px,.95fr) minmax(145px,.95fr);gap:8px;align-items:end;margin-bottom:12px;padding:8px 12px 12px;border:1px solid #ead9aa;border-top:0;border-radius:0 0 12px 12px;background:#fff8e6; }
.drum-specification-head > .field { min-width:0;margin:0; }
.drum-specification-lines { display:grid;gap:7px;overflow-x:auto;padding-bottom:3px; }
.drum-specification-line { display:grid;grid-template-columns:26px minmax(220px,1.35fr) 110px minmax(185px,1fr) minmax(160px,.9fr) 36px;gap:7px;align-items:end;min-width:820px;padding:8px;border:1px solid #dfe7e2;border-radius:11px;background:#f8faf8; }
.drum-specification-line > .field { min-width:0;margin:0; }
.drum-line-number { align-self:end;display:grid;place-items:center;width:24px;height:36px;color:#7b8983;font-size:12px;font-weight:700; }
.drum-line-total { display:grid;gap:4px;align-self:stretch;align-content:end;padding:5px 9px;border-radius:9px;background:#eef4f0; }
.drum-line-total span,.drum-specification-totals span { color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase; }
.drum-line-total strong { white-space:nowrap;min-height:24px; }
.drum-line-remove { width:36px;min-width:36px;height:36px;padding:0;font-size:20px; }
.drum-specification-entry-table { overflow-x:auto;border:1px solid #d7e2dc;border-radius:10px;background:#fff; }
.drum-specification-line-heading { display:grid;grid-template-columns:26px minmax(220px,1.35fr) 110px minmax(185px,1fr) minmax(160px,.9fr) 36px;gap:7px;min-width:820px;padding:8px;background:#eaf1ed;color:#66766f;font-size:10px;font-weight:900;text-transform:uppercase; }
.drum-specification-line-heading > :nth-child(n+3) { text-align:center; }
.drum-specification-entry-table .drum-specification-lines { gap:0;overflow:visible;padding:0; }
.drum-specification-entry-table .drum-specification-line { border:0;border-top:1px solid #e0e8e3;border-radius:0;background:#fff; }
.drum-specification-entry-table .drum-specification-line > .field > span,
.drum-specification-entry-table .drum-line-total > span { display:none; }
.drum-specification-entry-table .drum-line-total { align-self:end;min-height:36px;padding:0 9px;align-content:center;border-radius:7px; }
.drum-specification-entry-table .drum-line-total strong { min-height:0;text-align:right; }
.drum-specification-line.is-shipped { background:#f2f4f3;box-shadow:inset 3px 0 0 #8b9992; }
.drum-specification-line.is-shipped input,.drum-specification-line.is-shipped select { color:#65736c;background:#e8ecea;cursor:not-allowed; }
.drum-line-shipped { display:block;margin-top:2px;color:#6b7771;font-size:9px;font-weight:800;white-space:nowrap; }
.drum-specification-footer { display:flex;align-items:center;gap:10px;margin-top:10px; }
.drum-specification-totals { display:flex;align-items:center;gap:14px;margin-left:auto;padding:7px 12px;border-radius:10px;background:#eef4f0; }
.drum-specification-totals strong { white-space:nowrap; }
.drum-spec-positions { min-width:0;overflow:hidden;border:1px solid #dbe5df;border-radius:9px;background:#fff; }
.drum-spec-position { display:grid;grid-template-columns:22px minmax(70px,1fr) 90px 110px 120px;gap:6px;align-items:center;padding:6px 8px; }
.drum-spec-position + .drum-spec-position { border-top:1px solid #e3e9e5; }
.drum-spec-position > :nth-child(n+3) { text-align:right;white-space:nowrap; }
.drum-spec-position-heading { background:#eef4f0;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase; }
.drum-spec-position-number { color:var(--muted);font-size:12px;font-weight:800;text-align:center; }
.drum-spec-position-totals-row { display:grid;grid-template-columns:1fr 90px 140px;gap:8px;align-items:center;padding:8px;background:#eef4f0;border-top:2px solid #cbdad1; }
.drum-spec-position-totals-row > :first-child { text-align:right; }
.drum-spec-position-totals-row > :not(:first-child) { text-align:right;white-space:nowrap; }
.drum-specifications-table { min-width:1100px;table-layout:fixed; }
.drum-specifications-table th:first-child,.drum-specifications-table td:first-child { width:125px; }
.drum-specifications-table th:nth-child(2),.drum-specifications-table td:nth-child(2) { width:135px; }
.drum-specifications-table th:nth-child(4),.drum-specifications-table td:nth-child(4) { width:105px; }
.drum-specifications-table th:last-child,.drum-specifications-table td:last-child { width:245px; }
.drum-specifications-table td:last-child .actions { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;white-space:normal; }
.drum-specifications-table td:last-child .secondary { width:auto;min-width:105px;padding:8px 10px;font-size:12px; }
.drum-specifications-table td:last-child .badge { flex:0 0 auto;white-space:nowrap; }
.print-brand { align-items:center; }
.print-brand-logo { display:block;width:150px;height:auto;flex:0 0 auto;border-radius:4px;background:#000; }
.drum-overdue-card { border-color:#efb4b4;background:#fffafa; }
.drum-overdue-table { min-width:820px; }
.drum-overdue-table th:nth-child(4),.drum-overdue-table td:nth-child(4) { text-align:center; }
.important-event-item.automatic { border-color:#efb4b4;background:#fff8f8; }
.drum-reference-warning { margin-bottom:10px;background:#fff6df;color:#745515; }
.compact-reference-create { grid-template-columns:minmax(220px,1fr) auto;max-width:650px; }
.work-type-reference-create { grid-template-columns:minmax(220px,1fr) 124px auto;max-width:700px; }
.work-type-reference-table { width:820px;min-width:820px;table-layout:fixed; }
.work-type-reference-table th:first-child,.work-type-reference-table td:first-child { width:380px; }
.work-type-reference-table th:nth-child(2),.work-type-reference-table td:nth-child(2) { width:110px; }
.work-type-reference-table th:nth-child(3),.work-type-reference-table td:nth-child(3) { width:125px; }
.work-type-reference-table th:nth-child(4),.work-type-reference-table td:nth-child(4) { width:190px; }
.work-type-reference-table input,.work-type-reference-table select { width:100%;min-width:0; }
.drum-type-reference-create { grid-template-columns:minmax(190px,1fr) minmax(210px,1fr) minmax(150px,.8fr) auto;max-width:1100px; }
.drum-type-reference-table { min-width:980px; }
.drum-calculation-head { display:grid;grid-template-columns:minmax(210px,1fr) minmax(190px,.8fr) minmax(230px,1fr) auto;gap:10px;align-items:end;margin-bottom:12px; }
.drum-calculation-head .field { margin:0; }
.drum-calculation-total { display:grid;gap:2px;min-height:54px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:#f3f7f4; }
.drum-calculation-total span,.drum-calculation-total small { color:var(--muted); }
.drum-calculation-total strong { font-size:20px; }
.drum-work-calculation-table { width:901px;min-width:901px;table-layout:fixed; }
.drum-work-calculation-table th:first-child,.drum-work-calculation-table td:first-child { width:310px; }
.drum-work-calculation-table th:nth-child(2),.drum-work-calculation-table td:nth-child(2) { width:96px;text-align:center; }
.drum-work-calculation-table th:nth-child(3),.drum-work-calculation-table td:nth-child(3) { width:180px; }
.drum-work-calculation-table th:nth-child(4),.drum-work-calculation-table td:nth-child(4) { width:170px; }
.drum-work-calculation-table th:nth-child(5),.drum-work-calculation-table td:nth-child(5) { width:145px; }
.drum-work-calculation-table input { width:100%;min-width:0; }
.drum-work-unit { display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:5px 9px;border-radius:999px;background:#eef4f0;color:#365c4c;font-size:12px;font-weight:850; }
.important-events-list { display:grid;gap:9px; }
.important-event-item { display:grid;grid-template-columns:145px minmax(0,1fr) auto;gap:14px;align-items:center;padding:11px 13px;border:1px solid #ecd28a;border-left:5px solid #e0ad27;border-radius:12px;background:#fffaf0; }
.important-event-item p { margin:5px 0;color:var(--ink); }
.important-event-body { min-width:0; }
.important-event-action { display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap; }
.important-event-status { display:inline-flex;align-items:center;min-height:30px;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:850;white-space:nowrap; }
.important-event-status.pending { background:#e8f0fb;color:#24548a; }
.important-event-status.acknowledged { background:#fff1bd;color:#755100; }
.important-event-status.confirmed { background:#dff1e5;color:#24633b; }
.important-events-archive { margin-top:12px; }
.important-event-item.archived { border-color:#dce4de;border-left-color:#78a287;background:#f7faf8; }
.drum-summary-layout { display:grid;grid-template-columns:minmax(240px,320px) minmax(520px,1fr);gap:10px;align-items:stretch; }
.drum-summary-total { margin:0;display:grid;align-content:center; }
.drum-summary-total small { font-size:13px;font-weight:900; }
.drum-position-summary { min-width:520px; }
.drum-position-summary th,.drum-position-summary td { padding:7px 9px; }
@media (max-width:900px) { .drum-summary-layout { grid-template-columns:1fr; } .drum-specification-head { grid-template-columns:1fr 1fr; } }
.production-list { display: grid; gap: 9px; }
.production-readonly { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid #e3e8e4; border-radius: 11px; background: #f8faf8; }
.production-readonly span { color: var(--muted); white-space: nowrap; }
.production-row { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)) minmax(95px, auto) auto; gap: 9px; align-items: end; padding: 13px; border: 1px solid #d9e0db; border-radius: 12px; background: #f8faf8; }
.production-row.board { grid-template-columns: repeat(5, minmax(85px, 1fr)) minmax(95px, auto) auto; }
.production-row label { display: grid; gap: 5px; }
.production-row label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.production-row input, .production-row select { min-height: 40px; }
.production-row > strong { padding-bottom: 11px; white-space: nowrap; }
.production-add { margin-top: 18px; padding: 16px; border-radius: 12px; background: #f2f5f3; }
.production-add h3 { margin-bottom: 14px; font-size: 16px; }
.production-add .board-add { grid-template-columns: repeat(5, minmax(90px, 1fr)) auto; }
.shift-material-columns { display:grid;grid-template-columns:minmax(370px,.78fr) minmax(570px,1.22fr);gap:12px;align-items:start; }
.shift-material-card { min-width:0;padding:12px; }
.shift-material-card .card-head { margin-bottom:8px; }
.shift-material-card .production-list { gap:4px;overflow-x:auto; }
.shift-material-card .production-readonly { min-height:32px;padding:5px 8px;border-radius:7px;font-size:12px;line-height:1.15; }
.shift-material-card .production-row { min-width:490px;grid-template-columns:76px 64px 72px 76px auto;gap:5px;padding:6px;border-radius:8px; }
.shift-material-card .production-row.board { min-width:690px;grid-template-columns:68px 68px 64px 58px 72px 76px auto; }
.shift-material-card .production-row label { gap:2px; }
.shift-material-card .production-row label span { font-size:9px;line-height:1; }
.shift-material-card .production-row input,.shift-material-card .production-row select { min-height:31px;padding:4px 6px;border-radius:6px; }
.shift-material-card .production-row > strong { padding-bottom:7px;font-size:12px; }
.shift-material-card .production-row .actions { flex-wrap:nowrap;gap:4px; }
.shift-material-card .production-row .actions button { min-height:31px;padding:4px 7px;font-size:10px; }
.shift-material-card .production-add { margin-top:8px;padding:8px;border-radius:8px; }
.shift-material-card .production-add h3 { margin-bottom:7px;font-size:13px; }
.roundwood-material-card .production-add .form-grid { grid-template-columns:82px 70px 76px 82px;gap:5px; }
.board-material-card .production-add .board-add { grid-template-columns:68px 68px 64px 58px 72px 82px;gap:5px;min-width:500px; }
.shift-material-card .production-add input,.shift-material-card .production-add select { min-height:32px;padding:5px 6px; }
.shift-material-card .production-add .primary { min-height:32px;padding:5px 7px;font-size:10px; }
@media (max-width:1100px) { .shift-material-columns { grid-template-columns:1fr; } }
.warehouse-form { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.warehouse-form .primary { min-height: 40px; }
.compact-movement-form { grid-template-columns:minmax(130px,1.14fr) minmax(132px,1.16fr) minmax(108px,.95fr) minmax(90px,.78fr) minmax(54px,.48fr) minmax(54px,.48fr) minmax(62px,.54fr) minmax(56px,.5fr) minmax(70px,.62fr) minmax(88px,.72fr) minmax(121px,1.06fr);gap:7px;align-items:end;width:100%;overflow-x:auto;padding:9px;border:1px solid #dfe7e2;border-radius:12px;background:#f8faf8; }
.compact-movement-form > .field { min-width:0;margin:0; }
.compact-movement-form > .field > span { font-size:10px;white-space:nowrap; }
.compact-movement-form input,.compact-movement-form select { box-sizing:border-box;width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.compact-movement-form .warehouse-species-switch { display:flex;margin:0;padding:4px;gap:4px;white-space:nowrap; }
.compact-movement-form .warehouse-species-switch button { min-width:65px;padding:7px 8px; }
.content .compact-movement-form > .primary[type="submit"] { width:100%;min-width:0;min-height:36px;padding-inline:6px;align-self:end;justify-self:stretch;white-space:nowrap;font-size:11px; }
.movement-calculated-volume { display:grid;gap:4px;min-width:0; }
.movement-calculated-volume span { color:var(--muted);font-size:10px;font-weight:800;white-space:nowrap; }
.movement-calculated-volume strong { display:flex;align-items:center;min-height:36px;padding:7px 8px;border:1px solid var(--line);border-radius:8px;background:#fff;white-space:nowrap; }
.warehouse-edit-panel { margin-top: 20px; padding: 18px; border: 1px solid #bfd0c5; border-radius: 14px; background: #f4f8f5; }
.warehouse-edit-panel h3 { margin: 0; }
.warehouse-edit-actions { grid-column: 1 / -1; justify-content: space-between; padding-top: 4px; }
.warehouse-period-filter form { display: grid; grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) auto; gap: 12px; align-items: end; }
.warehouse-period-filter .field { margin: 0; }
.warehouse-period-shortcuts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.accounting-filter-row { display: grid; grid-template-columns: minmax(500px, 1fr) minmax(430px, .9fr); gap: 18px; align-items: stretch; }
.accounting-period-controls { align-self: center; }
.accounting-filter form { display: grid; grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) 104px; gap: 12px; align-items: end; }
.accounting-filter .field { margin: 0; }
.accounting-period-controls > small { display: block; margin-top: 10px; }
.accounting-submit { width: 104px; padding-inline: 12px; }
.content form .primary[type="submit"],
.content button[data-save-roundwood],
.content button[data-save-board],
.content button[data-save-enterprise-employee],
.content button[data-save-employee],
.content button[data-save-drum-employee],
.content button[data-save-assignment],
.content button[data-save-size] { width: auto; min-height: 40px; padding: 8px 14px; border-radius: 10px; background: var(--gold); color: #17211d; justify-self: start; }
.content .shift-period-filter form > .primary[type="submit"], .content .warehouse-period-filter form > .primary[type="submit"], .content .accounting-filter form > .primary[type="submit"] { width: 104px; }
.shift-summary { padding: 14px 16px; border: 1px solid #dce5df; border-radius: 14px; background: #f7faf8; }
.shift-summary > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.shift-summary-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shift-summary-stat { padding: 10px; border-radius: 11px; background: #fff; text-align: center; }
button.shift-summary-stat { width: 100%; border: 0; font: inherit; transition: transform .15s ease, box-shadow .15s ease; }
button.shift-summary-stat:hover { transform: translateY(-1px); box-shadow: 0 5px 14px #17342718; }
button.shift-summary-stat:focus-visible { outline: 3px solid #d7a62b66; outline-offset: 2px; }
.shift-summary-stat small { display: block; min-height: 28px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.shift-summary-stat strong { display: block; margin-top: 3px; font-size: 24px; }
.shift-summary-stat.attention { background: #fff6dc; color: #74520c; }
.shift-summary-stat.open { background: #fbe8e8; color: #8d2929; }
.shift-summary-stat.closed { background: #e5f3e9; color: #196039; }
.species-dashboard { margin-bottom: 28px; }
.species-dashboard-title { margin: 0 0 12px 4px; }
.species-dashboard-title p, .species-dashboard-title h2 { margin: 0; }
.species-dashboard-title h2 { margin-top: 2px; font-size: 24px; }
.species-dashboard .accounting-metrics { margin-bottom: 0; }
.lumber-cost-metric { display: flex; flex-direction: column; }
.metric-value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #edf0ee; }
.metric-value-row small, .metric-value-row strong { margin: 0; }
.metric-value-row strong { font-size: 18px; text-align: right; }
.metric-total-row { border-top-color: #d6bc71; }
.metric-total-row small, .metric-total-row strong { color: var(--ink); font-weight: 800; }
.metric-species-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.metric-species-columns > div { display: grid; gap: 4px; padding: 10px; border: 1px solid #e2e7e4; border-radius: 10px; background: #f8faf9; }
.metric-species-columns small { color: var(--muted); font-weight: 700; }
.metric-species-columns strong { font-size: 18px; }
.accounting-metrics.sawmill-summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: stretch; }
.sawmill-summary-grid > .metric { grid-column: span 1; height: 100%; }
.sawmill-summary-grid .average-yield-metric, .sawmill-summary-grid .roundwood-flow-metric { grid-column: span 3; }
.sawmill-summary-grid > .metric:nth-child(-n+6) { min-width: 0; padding: 14px 12px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) > span { display: block; min-height: 33px; font-size: 13px; font-weight: 700; line-height: 1.25; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .metric-value-row { gap: 6px; margin-top: 6px; padding-top: 6px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .metric-value-row small { font-size: 12px; line-height: 1.2; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .metric-value-row strong,
.sawmill-summary-grid > .metric:nth-child(-n+6) .metric-species-columns strong { font-size: clamp(15px, 1.05vw, 18px); font-weight: 700; line-height: 1.2; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .metric-species-columns { gap: 6px; margin-top: 7px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .metric-species-columns > div { gap: 3px; padding: 7px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .yield-position-head,
.sawmill-summary-grid > .metric:nth-child(-n+6) .yield-position-row { grid-template-columns: .8fr repeat(2, minmax(0, 1fr)); gap: 5px; padding: 6px 0; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .yield-position-head { font-size: 10px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .yield-position-head strong { font-size: 10px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .yield-position-row strong { font-size: 12px; }
.sawmill-summary-grid > .metric:nth-child(-n+6) .yield-position-row span { font-size: clamp(13px, .9vw, 16px); }
.sawmill-summary-grid > .metric:nth-child(-n+6) > small { margin-top: 6px; font-size: 11px; line-height: 1.25; }
.sawmill-summary-grid > .metric:nth-child(1):not(.negative),
.sawmill-summary-grid > .metric:nth-child(4):not(.negative) { background: #edf7f0; border-color: #bdd8c7; }
.sawmill-summary-grid > .metric:nth-child(2),
.sawmill-summary-grid > .metric:nth-child(5) { background: #edf5f8; border-color: #bfd5dd; }
.sawmill-summary-grid > .metric:nth-child(3),
.sawmill-summary-grid > .metric:nth-child(6) { background: #fff8e8; border-color: #e4d3a7; }
.sawmill-summary-grid > .average-yield-metric { background: #eef7f3; border-color: #c2dbcf; }
.sawmill-summary-grid > .roundwood-flow-metric { background: #f3f5ec; border-color: #d4d9b9; }
.yield-position-grid { margin-top: 9px; }
.yield-position-head, .yield-position-row { display: grid; grid-template-columns: 1.35fr repeat(2, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #edf0ee; }
.yield-position-head { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
.yield-position-head strong, .yield-position-row strong { font-size: 14px; }
.yield-position-head span, .yield-position-row span { text-align: right; white-space: nowrap; }
.yield-position-row span { font-weight: 800; }
.roundwood-flow-metric { grid-column: span 2; }
.roundwood-flow-row { display: grid; grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #edf0ee; }
.roundwood-flow-row strong { font-size: 14px; }
.roundwood-flow-row span { text-align: right; white-space: nowrap; }
.roundwood-flow-head, .roundwood-flow-head strong { margin-top: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
.roundwood-flow-metric .roundwood-flow-row:not(.roundwood-flow-head) { flex: 1 1 0; min-height: 42px; }
.roundwood-flow-metric .roundwood-flow-row:last-child { padding-bottom: 0; }
@media (max-width: 1100px) and (min-width: 901px) { .accounting-metrics.sawmill-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sawmill-summary-grid > .metric { grid-column: span 1; } .sawmill-summary-grid .average-yield-metric, .sawmill-summary-grid .roundwood-flow-metric { grid-column: span 3; } }
@media (max-width: 900px) { .accounting-metrics.sawmill-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sawmill-summary-grid > .metric, .sawmill-summary-grid .average-yield-metric, .sawmill-summary-grid .roundwood-flow-metric { grid-column: 1 / -1; } }
.accounting-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lumber-sales-analytics > .card-head { margin-bottom: 20px; }
.lumber-sales-analytics .card-head p { margin: 5px 0 0; }
.report-details { margin:4px 0 16px;border:1px solid #d9e2dc;border-radius:12px;background:#fbfcfb;overflow:hidden; }
.report-details > summary { padding:12px 14px;cursor:pointer;font-weight:800;color:var(--ink); }
.report-details[open] > summary { border-bottom:1px solid #d9e2dc; }
.report-details .table-wrap { margin:0; }
.lumber-sales-species + .lumber-sales-species { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.lumber-sales-species-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.lumber-sales-species-title h3 { margin: 0; font-size: 20px; }
.lumber-sales-species-title small { color: var(--muted); }
.sales-analytics-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 0; }
.accounting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.accounting-grid > .card { min-width: 0; }
.accounting-grid table { min-width: 520px; }
.dashboard-activity .card-head > strong { min-width: 42px; padding: 8px 11px; border-radius: 999px; background: #e7eee9; color: var(--green); text-align: center; }
.dashboard-filters { display: grid; grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr) minmax(180px, 240px); gap: 12px; margin-bottom: 16px; }
.dashboard-filters .field { margin: 0; }
.dashboard-table { min-width: 1180px; }
.dashboard-table tr[hidden] { display: none; }
.payroll-pending { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #fff0c7; color: #74520c; font-size: 12px; font-weight: 800; white-space: nowrap; }
.summary-note { padding: 16px 18px; margin-bottom: 18px; border: 1px solid #e7c363; border-radius: 14px; background: #fff8df; color: #654b0c; }
.timesheet-rate { border-top: 5px solid var(--gold); }
.timesheet-subtitle { margin: 24px 0 12px; }
.timesheet-navigation { display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:10px;border:1px solid var(--line);border-radius:15px;background:#fff; }
.timesheet-navigation button { border:0;border-radius:10px;padding:10px 14px;background:#edf2ee;color:var(--muted);font-weight:900; }
.timesheet-navigation button.active { background:var(--green);color:#fff; }
.timesheet-navigation button[data-timesheet-section="accruals"] { background:#f7e4e4;color:#8c3030; }
.timesheet-navigation button[data-timesheet-section="accruals"].active { background:#a94a4a;color:#fff; }
.timesheet-navigation button[data-timesheet-section="payments"] { background:#e0f0e6;color:#196039; }
.timesheet-navigation button[data-timesheet-section="payments"].active { background:#26734b;color:#fff; }
.payroll-entry-form { grid-template-columns: repeat(4,minmax(150px,1fr)); }
.payroll-entry-form [hidden] { display: none !important; }
.payroll-entry-form .inventory-difference-box { min-height: 44px; }
.payroll-payment-scroll { overflow-x:auto;padding-bottom:4px; }
.payroll-payment-form { grid-template-columns:110px minmax(170px,1.15fr) minmax(190px,1.25fr) 115px minmax(150px,1fr) auto;gap:7px;align-items:end;min-width:850px; }
.payroll-payment-form > * { min-width:0;margin:0; }
.payroll-payment-form input,.payroll-payment-form select { width:100%;min-height:36px;padding:7px 8px;border-radius:8px; }
.payroll-payment-form .payroll-balance-box { grid-column:auto;min-height:36px;padding:6px 9px;border-radius:9px;white-space:nowrap;overflow:hidden; }
.payroll-payment-form .payroll-balance-box strong { display:inline;font-size:16px;margin:0 4px; }
.payroll-payment-form .payroll-balance-box span,.payroll-payment-form .payroll-balance-box small { display:block;overflow:hidden;text-overflow:ellipsis; }
.payroll-payment-button { min-height:36px;padding:7px 11px;white-space:nowrap; }
.payroll-accrual-form { grid-template-columns:118px minmax(160px,1.25fr) minmax(125px,.9fr) 100px 65px 65px minmax(140px,1fr) 170px auto;gap:7px;align-items:end;overflow-x:auto;padding-bottom:4px; }
.payroll-accrual-form.stretch-mode { grid-template-columns:118px minmax(160px,1.25fr) minmax(125px,.9fr) 100px 100px minmax(150px,1fr) 170px auto; }
.payroll-accrual-form > .field { min-width:0;margin:0; }
.payroll-accrual-form input,.payroll-accrual-form select { width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.payroll-accrual-form #payrollAccrualPreview { min-height:36px;padding:8px 10px;border-radius:9px;font-size:12px;white-space:nowrap; }
.payroll-accrual-form > button[type="submit"] { min-width:90px;min-height:36px;padding:7px 11px;white-space:nowrap; }
@media (max-width:900px) { .payroll-accrual-form,.payroll-accrual-form.stretch-mode { min-width:1080px; } }
.negative-value { color: var(--red); }
.positive-value { color: var(--green-2); }
.dashboard-period-shortcuts { margin-top: 2px; }
.payroll-project-metrics { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
.payroll-project-card { display:grid;gap:9px;width:100%;padding:12px 13px;border:1px solid #d9e3dd;border-radius:12px;background:#f9fbfa;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.payroll-project-card:hover { transform:translateY(-2px);border-color:#9db9aa;box-shadow:0 8px 20px #173c2d12; }
.payroll-project-card-head { display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:7px;border-bottom:1px solid #e7ece9; }
.payroll-project-card-head strong { font-size:15px; }
.payroll-project-card-head em { color:var(--green);font-size:10px;font-style:normal;font-weight:900;white-space:nowrap; }
.payroll-project-card-lines { display:grid;gap:5px; }
.payroll-project-card-lines > span { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.payroll-project-card-lines small { color:var(--muted);font-size:11px; }
.payroll-project-card-lines b { font-size:13px;white-space:nowrap; }
.payroll-project-card-lines .payroll-accrued-value { color:#52635a;font-weight:700; }
.metric-grid.payroll-summary-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); }
.payroll-summary-metrics > .metric { min-width:0;overflow-wrap:anywhere; }
@media(max-width:1000px) { .metric-grid.payroll-summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .metric-grid.payroll-summary-metrics { grid-template-columns:minmax(0,1fr); } }
.payroll-balance-drilldown { width:100%;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease; }
.payroll-balance-drilldown:hover { transform:translateY(-2px);border-color:#92b5a3;box-shadow:0 8px 20px #173c2d14; }
.payroll-balance-drilldown small { color:var(--green);font-weight:850; }
.payroll-project-allocation-note { margin:9px 0 20px;font-size:11px; }
.payroll-balance-overlay { z-index:180; }
.payroll-balance-dialog { width:min(980px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:20px;border-radius:18px;background:#fff;box-shadow:0 24px 70px #0006; }
.payroll-balance-dialog table { min-width:720px; }
.payroll-balance-total { display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-top:14px;padding:13px 15px;border-radius:12px;background:#eef6f1; }
.payroll-balance-total span { color:var(--muted);font-weight:800; }
.payroll-balance-total strong { font-size:20px; }
.payroll-summary-table { min-width: 1080px; }
.payroll-project-breakdown { display:grid;grid-template-columns:repeat(2,minmax(125px,1fr));gap:3px 12px;min-width:330px; }
.payroll-project-breakdown span { display:flex;justify-content:space-between;gap:8px;padding:4px 0;border-bottom:1px solid #edf0ee; }
.payroll-project-breakdown small { color:var(--muted); }
.payroll-project-breakdown strong { white-space:nowrap; }
.payroll-balance-box { display:grid;gap:4px;grid-column:span 2; }
.payroll-balance-box span,.payroll-balance-box small { display:block;font-size:12px; }
.payroll-balance-box strong { display:block;font-size:24px; }
.employee-payroll-link { display:grid;gap:2px;padding:0;border:0;background:transparent;color:var(--green);font:inherit;font-weight:850;text-align:left;cursor:pointer; }
.employee-payroll-link:hover { text-decoration:underline; }
.employee-payroll-link small { color:var(--muted);font-size:10px;font-weight:700;text-decoration:none; }
.enterprise-employee-head { display:grid;grid-template-columns:minmax(260px,1fr) minmax(240px,360px) auto;align-items:end; }
.enterprise-employee-search { margin:0; }
.table-sort-button { display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:850;white-space:nowrap;cursor:pointer; }
.table-sort-button span { color:#8b9890;font-size:10px; }
.table-sort-button.active { color:var(--green); }
.payroll-employee-card-overlay { place-items:start center;overflow:auto;padding:18px; }
.payroll-employee-card { width:min(1460px,100%);max-height:calc(100vh - 36px);overflow:auto;border-radius:18px;background:#f2f5f3;box-shadow:0 30px 90px #0008; }
.payroll-card-top { position:sticky;top:0;z-index:4;display:flex;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid #dce4df;background:#fff; }
.payroll-card-printable { display:grid;gap:14px;padding:18px; }
.payroll-card-header { display:flex;justify-content:space-between;gap:14px;padding:16px 18px;border-radius:14px;background:linear-gradient(135deg,#123c2e,#1f5b45);color:#fff; }
.payroll-card-header .muted { color:#d6e5dd; }
.payroll-card-header h2 { margin:3px 0;font-size:28px; }
.payroll-card-metrics { margin:0; }
.payroll-card-actions { display:grid;gap:8px; }
.payroll-card-actions details,.payroll-record-editor { border:1px solid #d6e0da;border-radius:12px;background:#fff; }
.payroll-card-actions summary { padding:11px 13px;color:var(--green);font-weight:850;cursor:pointer; }
.payroll-card-form { display:grid;grid-template-columns:118px minmax(125px,.9fr) minmax(125px,.9fr) 95px 90px 80px minmax(150px,1.15fr) auto;gap:7px;align-items:end;padding:0 12px 12px;overflow-x:auto; }
.payroll-card-form label { display:grid;gap:4px;min-width:0;color:var(--muted);font-size:11px;font-weight:750; }
.payroll-card-form input,.payroll-card-form select { width:100%;min-height:36px;padding:7px 8px;border:1px solid #c9d5ce;border-radius:8px;background:#fff;color:var(--ink);font:inherit; }
.payroll-card-form > button,.payroll-card-form > .actions { min-height:36px;white-space:nowrap; }
.payroll-card-payment-form { grid-template-columns:118px 135px minmax(220px,1fr) auto; }
.payroll-work-summary { margin:14px 0; }
.payroll-work-summary .card-head { margin-bottom:8px; }
.payroll-work-summary h3 { margin:0; }
.payroll-card-adjustment-form { grid-template-columns:118px minmax(130px,.8fr) 125px 125px minmax(240px,1fr) auto; }
.payroll-card-history { padding:15px;border:1px solid #d6e0da;border-radius:14px;background:#fff; }
.payroll-card-history table { min-width:980px; }
.payroll-record-editor { padding:14px;box-shadow:0 12px 34px #173c2d18; }
.payroll-record-editor .payroll-card-form { grid-template-columns:repeat(6,minmax(120px,1fr)) minmax(260px,auto);padding:0; }
.payroll-record-editor .actions { flex-wrap:nowrap;align-self:end; }
@media (max-width:900px) { .enterprise-employee-head { grid-template-columns:1fr;align-items:stretch; } .payroll-employee-card-overlay { padding:0; } .payroll-employee-card { max-height:100vh;border-radius:0; } .payroll-card-printable { padding:11px; } .payroll-card-form { min-width:980px; } }
.employee-quick-search { background-color:#fff; }
.employee-search-field select[hidden] { display:none !important; }
.buyer-search-field select[hidden] { display:none !important; }
.inline-directory-control { display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;min-width:0; }
.inline-directory-control > input,.inline-directory-control > select { grid-column:1;grid-row:1;width:100%;min-width:0; }
.inline-directory-control > datalist { display:none; }
.inline-directory-dialog form { display:grid;gap:14px; }
.inline-directory-dialog .field { margin:0; }
.inline-directory-error { min-height:20px;color:#a62323;font-size:13px;font-weight:800; }
select[data-directory-search-input][hidden] { display:none !important; }
.compact-directory-form { grid-template-columns:minmax(260px,520px) max-content;align-items:end; }
.employee-payroll-report { margin:26px 0 24px;padding:18px;border:1px solid #cfdad3;border-radius:14px;background:#f6faf7; }
.employee-report-head { display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px) auto;gap:14px;align-items:end;margin-bottom:16px; }
.employee-report-head h3 { margin:0 0 5px; }
.employee-report-head p { margin:0; }
.employee-report-picker { margin:0; }
.employee-print-button { align-self:end;white-space:nowrap; }
.employee-report-metrics { grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:12px; }
.employee-report-metrics .metric { padding:15px;background:#fff; }
.employee-report-metrics .metric strong { font-size:24px; }
.employee-report-projects { display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px; }
.employee-report-projects span { display:flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid #dce4df;border-radius:9px;background:#fff; }
.employee-report-projects small { color:var(--muted); }
.employee-accrual-table { min-width:860px; }
[data-enterprise-employee] [hidden] { display:none !important; }
.enterprise-employee-select { min-width:170px;max-width:230px; }
.enterprise-employee-create { grid-template-columns:minmax(180px,1.2fr) minmax(145px,.9fr) minmax(140px,.85fr) minmax(130px,.8fr) minmax(125px,.75fr) max-content;align-items:end;gap:7px; }
.compact-reference-form { grid-template-columns:minmax(240px,460px) max-content;align-items:end; }
.salary-employee-required > span { color:#a62828;font-weight:800; }
.salary-employee-required select { border-color:#cf5a5a;background:#fff7f7; }
.enterprise-employee-create > [hidden] { display:none !important; }
.enterprise-pay-edit { display:grid;grid-template-columns:minmax(145px,1fr) 112px;gap:6px;min-width:265px; }
.enterprise-pay-edit .enterprise-employee-select { min-width:145px;max-width:none; }
.enterprise-pay-edit input { min-width:112px;width:112px; }
[data-enterprise-employee] .actions { flex-wrap:nowrap;gap:5px; }
[data-enterprise-employee] .actions button { min-height:36px;padding:7px 10px;font-size:12px;white-space:nowrap; }
@media (max-width:900px) { .enterprise-employee-create { grid-template-columns:1fr 1fr; } }
.warehouse-species-switch { display: inline-flex; gap: 8px; margin: 4px 0 18px; padding: 5px; border-radius: 13px; background: #edf2ee; }
.warehouse-species-switch button { min-width: 120px; border: 0; border-radius: 10px; padding: 10px 16px; background: transparent; color: var(--muted); font-weight: 900; }
.warehouse-species-switch button.active { background: var(--green); color: #fff; }
.warehouse-species-field { width:150px;max-width:100%;min-width:0;justify-self:start; }
.warehouse-species-field .warehouse-species-switch { display:grid!important;grid-template-columns:repeat(2,70px);gap:5px;width:150px!important;max-width:100%;margin:4px 0 0;padding:4px;white-space:nowrap; }
.warehouse-species-field .warehouse-species-switch button { width:100%;min-width:0!important;padding:8px 7px!important; }
.drum-aspen-cost-summary { display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px;padding:10px 12px;border:1px solid #dce7df;border-radius:11px;background:#f7faf8; }
.drum-aspen-cost-summary > div { display:flex;align-items:center;gap:12px;min-width:0; }
.drum-aspen-cost-summary span,.drum-aspen-cost-summary small { color:var(--muted);font-weight:800; }
.drum-aspen-cost-summary strong { color:var(--green);font-size:17px;white-space:nowrap; }
.drum-aspen-cost-summary.missing strong { color:#a34b43; }
/* Separate compact balances for softwood and aspen. */
.warehouse-stocks-page { width:100%;max-width:1460px;min-width:0; }
.warehouse-stocks-heading { padding:0 2px; }
.warehouse-stocks-totals { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:16px; }
.warehouse-stocks-totals .metric { min-width:0;padding:12px 14px; }
.warehouse-stocks-totals .metric strong { font-size:24px;overflow-wrap:anywhere; }
.warehouse-stocks-totals .metric small { line-height:1.4; }
@media (max-width:480px) { .warehouse-stocks-totals { grid-template-columns:1fr;gap:10px; } }
.warehouse-stocks-columns { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start; }
.warehouse-stocks-columns > .warehouse-stocks-card { margin-bottom:0; }
@media (max-width:1000px) { .warehouse-stocks-columns { grid-template-columns:1fr; } }
@media (max-width:480px) { .warehouse-stocks-heading { flex-wrap:wrap; } }
.warehouse-stocks-card { width:100%;max-width:720px;min-width:0; }
.warehouse-stocks-card .card-head { gap:12px; }
.warehouse-stocks-card .warehouse-stock-metrics { gap:10px;margin-bottom:16px; }
.warehouse-stocks-card .metric { padding:12px 14px;min-width:0; }
.warehouse-stocks-card .metric strong { margin-top:6px;font-size:24px;overflow-wrap:anywhere; }
.warehouse-stocks-card .metric small { line-height:1.4; }
.warehouse-stocks-card .warehouse-stock-toolbar { gap:12px;flex-wrap:wrap; }
.warehouse-stocks-card .warehouse-stock-toolbar .field { width:250px;max-width:100%; }
.warehouse-stocks-card table { min-width:0; }
.warehouse-stocks-card th,.warehouse-stocks-card td { padding:9px 8px; }
.warehouse-stocks-card th:nth-child(n+3),.warehouse-stocks-card td:nth-child(n+3) { text-align:right; }
.warehouse-stocks-card td:not([colspan]) { white-space:nowrap; }
@media (max-width:480px) {
  .warehouse-stocks-card { padding:14px; }
  .warehouse-stocks-card .card-head { flex-wrap:wrap; }
  .warehouse-stocks-card .warehouse-stock-metrics { grid-template-columns:1fr; }
  .warehouse-stocks-card .warehouse-stock-toolbar .field { width:100%; }
  .warehouse-stocks-card th,.warehouse-stocks-card td { padding:8px 5px;font-size:12px; }
}
.warehouse-stock-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.warehouse-stock-metrics .metric { background: #f7faf8; }
.warehouse-stock-toolbar { display:flex;align-items:end;justify-content:space-between;gap:16px;margin:4px 0 10px; }
.warehouse-stock-toolbar .timesheet-subtitle { margin:0 0 3px; }
.warehouse-stock-toolbar .field { width:min(360px,100%);margin:0; }
.warehouse-stock-toolbar input[type="search"] { min-height:38px; }
.lumber-sale-header { display:grid;grid-template-columns:200px minmax(260px,360px) 90px minmax(150px,180px);gap:8px;align-items:end;justify-content:start;width:100%;margin-bottom:12px; }
.lumber-sale-header > .field { margin:0;min-width:0; }
.lumber-sale-header .buyer-search-field { width:auto;min-width:0; }
.lumber-sale-header .lumber-sale-species,.lumber-sale-header .lumber-sale-source { width:auto;min-width:0; }
.lumber-sale-header .warehouse-species-switch { display:flex;margin:4px 0 0;white-space:nowrap; }
.lumber-sale-header .warehouse-species-switch button { min-width:78px;padding:8px 12px; }
.lumber-sale-lines { display:grid;gap:8px;overflow-x:auto;padding:2px 0 5px; }
.lumber-sale-line { display:grid;grid-template-columns:minmax(72px,.62fr) minmax(72px,.62fr) minmax(78px,.67fr) minmax(70px,.6fr) minmax(86px,.72fr) minmax(100px,.88fr) minmax(108px,.96fr) minmax(82px,.72fr) minmax(112px,1fr) 34px;gap:7px;align-items:end;width:100%;min-width:900px;padding:9px;border:1px solid #dfe7e2;border-radius:12px;background:#f8faf8; }
.lumber-sale-line label { display:grid;gap:4px;min-width:0; }
.lumber-sale-line label > span,.lumber-sale-calculated > span { color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.02em;white-space:nowrap; }
.lumber-sale-line input,.lumber-sale-line select { width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.lumber-sale-calculated { display:grid;align-content:end;gap:4px;min-height:59px;padding:7px 9px;border-radius:9px;background:#e8f1eb; }
.lumber-sale-calculated strong { font-size:14px;line-height:1.2;white-space:nowrap; }
.lumber-sale-calculated.amount { background:#fff3cf; }
.lumber-line-remove { width:34px;min-width:34px;height:36px;padding:0;font-size:21px;line-height:1; }
.lumber-line-remove:disabled { opacity:.35;cursor:not-allowed; }
.lumber-sale-footer { display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px; }
.lumber-sale-footer > .actions { margin-left:auto; }
.lumber-sale-total { display:flex;align-items:center;gap:12px;padding:9px 13px;border-radius:11px;background:#eef4f0; }
.lumber-sale-total span { color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase; }
.lumber-sale-total strong { white-space:nowrap; }
.invoice-print-icon { display:inline-grid;place-items:center;width:40px;min-width:40px;height:40px;padding:0;font-size:18px; }
.compact-roundwood-sale-form { display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:7px;align-items:end;width:100%;max-width:100%; }
.compact-roundwood-sale-form > .field { min-width:0;margin:0; }
.compact-roundwood-sale-form .roundwood-sale-date { grid-column:span 2; }
.compact-roundwood-sale-form .roundwood-sale-batch { grid-column:span 3; }
.compact-roundwood-sale-form .roundwood-sale-species { grid-column:span 2; }
.compact-roundwood-sale-form .roundwood-sale-purchase { grid-column:span 3; }
.compact-roundwood-sale-form .roundwood-sale-percent { grid-column:span 2; }
.compact-roundwood-sale-form .roundwood-sale-vat { grid-column:span 2; }
.compact-roundwood-sale-form .roundwood-sale-buyer { grid-column:span 4; }
.compact-roundwood-sale-form .roundwood-sale-total { grid-column:span 3; }
.compact-roundwood-sale-form .roundwood-sale-unit { grid-column:span 3; }
.compact-roundwood-sale-form input[readonly],.compact-roundwood-sale-form select:disabled { color:#183029;background:#edf3ef;font-weight:850;opacity:1;cursor:default; }
.roundwood-sale-actions { display:flex;flex-wrap:nowrap;grid-column:span 4;gap:5px;align-items:stretch;margin:0; }
.roundwood-sale-actions button { min-height:36px;padding:6px 10px;white-space:nowrap; }
.stock-warning-dialog { width:min(760px,100%); }
.stock-warning-list { display:grid;gap:8px;margin:0 0 18px;max-height:50vh;overflow:auto; }
.stock-warning-list > div { display:grid;gap:5px;padding:11px 13px;border:1px solid #efc8c8;border-radius:11px;background:#fff5f5; }
.stock-warning-list span { color:var(--muted);font-size:13px; }
.stock-warning-list em { color:#9a2f2f;font-size:13px;font-style:normal;font-weight:900; }
.compact-receipt-form { display:grid;gap:10px; }
.compact-receipt-header { display:grid;grid-template-columns:max-content minmax(180px,220px) minmax(220px,1fr) minmax(180px,240px);gap:10px;align-items:end; }
.compact-receipt-header.roundwood { grid-template-columns:max-content minmax(180px,220px) minmax(240px,1fr); }
.compact-receipt-header.lumber-document-header { grid-template-columns:minmax(155px,190px) minmax(105px,.62fr) 108px minmax(155px,.82fr);max-width:760px;padding:9px;border:1px solid #dfe7e2;border-radius:12px;background:#f8faf8; }
.compact-receipt-header > .field { margin:0;min-width:0; }
.compact-receipt-header .warehouse-species-switch { display:flex;margin:4px 0 0;white-space:nowrap; }
.compact-receipt-header .warehouse-species-switch button { min-width:78px;padding:8px 12px; }
.compact-receipt-line { display:grid;gap:7px;align-items:end;padding:9px;border:1px solid #dfe7e2;border-radius:12px;background:#f8faf8;overflow-x:auto; }
.compact-receipt-line.roundwood { grid-template-columns:repeat(3,minmax(150px,1fr)); }

.compact-receipt-line.roundwood.all-fields { grid-template-columns:minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,1.35fr) minmax(0,.7fr) minmax(0,.85fr) minmax(0,.75fr) minmax(0,.75fr);width:100%;min-width:900px;overflow-x:auto; }
.compact-receipt-line.roundwood.all-fields.edit { grid-template-columns:minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,1.25fr) minmax(0,1fr) minmax(0,.66fr) minmax(0,.8fr) minmax(0,.7fr) minmax(0,.7fr);width:100%;min-width:1020px;overflow-x:auto; }
.compact-receipt-line.roundwood.all-fields .warehouse-species-switch { display:flex;margin:4px 0 0;padding:4px;gap:5px;white-space:nowrap; }
.compact-receipt-line.roundwood.all-fields .warehouse-species-switch button { min-width:69px;padding:8px 9px; }
.lumber-receipt-lines { display:grid;gap:8px;overflow-x:auto;padding:2px 0 5px; }
.compact-lumber-receipt-material { display:grid;grid-template-columns:minmax(240px,1fr) 150px;gap:8px;align-items:end;max-width:560px;padding:9px;border:1px solid #dfe7e2;border-radius:12px;background:#f8faf8; }
.compact-lumber-receipt-material > .field { min-width:0;margin:0; }
.lumber-receipt-line { display:grid;grid-template-columns:minmax(60px,.6fr) minmax(60px,.6fr) minmax(68px,.68fr) minmax(58px,.58fr) minmax(74px,.74fr) minmax(82px,.82fr) minmax(88px,.88fr) minmax(78px,.78fr) minmax(66px,.66fr) minmax(100px,1fr) minmax(98px,.98fr) 34px;gap:7px;align-items:end;width:100%;min-width:0;padding:9px;border:1px solid #dfe7e2;border-radius:12px;background:#f8faf8; }
.lumber-receipt-line .receipt-calculated { min-width:0; }

#wasteSaleForm { grid-template-columns:minmax(150px,1fr) minmax(185px,1.35fr) minmax(120px,.78fr) minmax(112px,.72fr) minmax(140px,.9fr) minmax(145px,.95fr);gap:8px;width:100%; }
.lumber-receipt-line label { display:grid;gap:4px;min-width:0; }
.lumber-receipt-line label > span { color:var(--muted);font-size:10px;font-weight:900;white-space:nowrap; }
.lumber-receipt-line input,.lumber-receipt-line select { width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.payment-status-button { border:0;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:900;white-space:nowrap;cursor:pointer; }
.payment-status-button.awaiting { color:#8f2626;background:#f7dede; }
.payment-status-button.awaiting:hover { background:#efc8c8; }
.payment-status-button.received { color:#12643b;background:#d9f0e2; }
.payment-status-button.received:hover { background:#c3e6d0; }
.negative-stock-dashboard { border-color:#e3aaaa;background:#fffafa; }
.negative-stock-dashboard-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
.negative-stock-dashboard-list h3 { grid-column:1 / -1;margin:7px 0 1px;color:#8f2d2d;font-size:13px; }
.negative-stock-dashboard-list button { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border:1px solid #efc5c5;border-radius:11px;background:#fff;color:var(--ink);text-align:left;cursor:pointer; }
.negative-stock-dashboard-list button:hover { border-color:#c96d6d;background:#fff2f2; }
.negative-stock-dashboard-list span { color:#9a2f2f;font-weight:900;white-space:nowrap; }
.cash-total { display:grid;gap:3px;text-align:right; }
.cash-total small { color:var(--muted);font-weight:800; }
.cash-total strong { color:var(--green);font-size:24px; }
.cash-page { color:var(--ink);font-size:14px; }
.cash-page > .card { margin-bottom:20px; }
.cash-page .card-head { margin-bottom:18px; }
.cash-page .card-head h2 { font-size:18px;letter-spacing:-.01em; }
.cash-page .card-head p { margin:5px 0 0;font-size:13px;line-height:1.45; }
.cash-page table { font-size:13px; }
.cash-page th { font-size:11px;font-weight:900;letter-spacing:.055em; }
.cash-page input,.cash-page select,.cash-page button { font-size:13px; }
.cash-dashboard-metrics { grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:18px; }
.cash-dashboard-metric { display:flex;min-height:158px;flex-direction:column;padding:20px; }
.cash-dashboard-metric > span { min-height:34px;font-size:13px;font-weight:700;line-height:1.3; }
.cash-dashboard-metric > strong { margin-top:10px;font-size:28px;line-height:1.1;font-variant-numeric:tabular-nums;white-space:nowrap; }
.cash-dashboard-metric > small { margin-top:auto;padding-top:12px;font-size:12px;font-weight:700;line-height:1.35; }
.cash-metric-details { display:grid;gap:5px;margin-top:auto;padding-top:12px;border-top:1px solid #e1e8e3; }
.cash-metric-details > div { display:flex;align-items:baseline;justify-content:space-between;gap:8px; }
.cash-metric-details span { color:var(--muted);font-size:11px;font-weight:800; }
.cash-metric-details b { color:var(--ink);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap; }
.cash-dashboard-metric.positive .cash-metric-details { border-color:#d6e7dc; }
.cash-dashboard-metric.negative .cash-metric-details { border-color:#eddcdc; }
.cash-balance-metric,.cash-received-metric,.cash-spent-metric,.cash-shortage-metric { background:#fff; }
.cash-shortage-metric.is-shortage,.cash-planned-expense-metric { border-color:#e5b0b0;background:#fff0f0; }
.cash-planned-income-metric { border-color:#a9d4ba;background:#eef9f2; }
.cash-received-metric > strong { color:#197244; }
.cash-spent-metric > strong,.cash-shortage-metric.is-shortage > strong,.cash-planned-expense-metric > strong { color:#a12f2f; }
.cash-shortage-metric:not(.is-shortage) > strong { color:var(--ink); }
.cash-alert-metrics { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:-6px 0 24px; }
.cash-alert-metric { min-height:124px; }
.cash-awaiting-income { border-color:#e8b6b6; }
.cash-awaiting-actions { display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap; }
.cash-awaiting-actions .compact-apply { min-height:34px;padding:6px 10px;white-space:nowrap; }
@media (max-width:600px) { .cash-awaiting-income .card-head { align-items:stretch;flex-direction:column; } .cash-awaiting-actions { justify-content:flex-start; } }
.cash-advance-heading { display:grid;gap:6px;justify-items:start;min-width:126px; }
.cash-advance-heading .compact-apply { min-height:30px;padding:4px 8px;white-space:nowrap; }
.cash-mode-card { display:none; }
.cash-mode-switch { margin:2px 0 0; }
.cash-filter-grid { grid-column:1 / -1;display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;padding-top:10px;border-top:1px solid #e3e8e4; }
.cash-filter-grid label { display:grid;gap:4px;min-width:0; }
.cash-filter-grid label > span { color:var(--muted);font-size:10px;font-weight:900;white-space:nowrap; }
.cash-filter-grid input,.cash-filter-grid select { min-height:36px;padding:7px 8px;border-radius:8px; }
.cash-filter-grid > button { align-self:end;justify-self:start;min-height:36px; }
.cash-sale-details { display:grid;gap:4px;min-width:440px; }
.cash-sale-details > span { color:var(--muted);font-size:11px; }
.cash-sale-details b { color:var(--ink); }
.cash-expense-form { display:grid;grid-template-columns:100px 105px minmax(150px,1fr) minmax(130px,.8fr) minmax(145px,1fr) minmax(135px,.9fr) minmax(150px,1fr) 125px 125px 112px auto;gap:7px;align-items:end;overflow-x:auto;padding-bottom:5px; }
.cash-expense-form > label { display:grid;gap:4px;min-width:0; }
.cash-expense-form > label[hidden] { display:none; }
.cash-expense-form > label > span { color:var(--muted);font-size:10px;font-weight:900;white-space:nowrap; }
.cash-expense-form input,.cash-expense-form select { width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.cash-expense-status-field { width:112px; }
.cash-expense-form > button { min-width:112px;min-height:36px;white-space:nowrap; }
.cash-income-form { grid-template-columns:80px minmax(120px,1fr) minmax(100px,.8fr) minmax(115px,.95fr) minmax(105px,.85fr) minmax(120px,1fr) 112px 195px 112px;min-width:1143px;overflow-x:auto; }
.cash-income-form > button { padding-inline:10px;font-size:12px; }
.cash-payment-action { display:flex;gap:6px;min-width:0;align-items:center;justify-content:flex-start; }
.cash-payment-action input,.cash-payment-action select { min-height:34px;padding:6px 8px;border-radius:8px; }
.cash-payment-action input { width:105px;min-width:105px; }
.cash-payment-action select { width:120px;min-width:120px; }
.cash-payment-action .compact-apply { width:100px;min-width:100px;min-height:34px;padding:6px 10px;justify-self:start; }
.cash-plan-action-buttons { display:grid;gap:5px;width:100px;min-width:100px; }
.cash-plan-action-buttons .compact-apply,.cash-plan-action-buttons .compact-delete { width:100%;min-width:0;min-height:34px;padding:6px 10px; }
.cash-expense-status,#cashExpenseStatus { font-weight:900;transition:background-color .15s,border-color .15s,color .15s; }
.cash-expense-status.status-awaiting_payment,#cashExpenseStatus:not(.status-urgent):not(.status-paid),#cashExpenseStatus.status-awaiting_payment { color:#225ca3;border-color:#a9c9ee;background:#eaf3ff; }
.cash-expense-status.status-urgent,#cashExpenseStatus.status-urgent { color:#9a2f2f;border-color:#e1a5a5;background:#ffe9e9; }
.cash-expense-status.status-paid,#cashExpenseStatus.status-paid { color:#17663d;border-color:#a8d5b9;background:#e5f5eb; }
.cash-income-create-status.status-awaiting_receipt { color:#225ca3;border-color:#a9c9ee;background:#eaf3ff;font-weight:900; }
.cash-income-create-status.status-received { color:#17663d;border-color:#a8d5b9;background:#e5f5eb;font-weight:900; }
.cash-urgent-row { background:#fff0f0; }
.cash-expense-edit-row input,.cash-expense-edit-row select { min-width:125px;min-height:34px;padding:6px 8px;border-radius:8px; }
.cash-expense-edit-row input[type="date"] { min-width:128px; }
.cash-expense-edit-row input[type="number"], .cash-expense-edit-row .readable-number-input { min-width:105px; }
.cash-expense-edit-row > td:last-child > button { min-height:34px;padding:6px 10px;white-space:nowrap; }
.cash-paid-edit-actions { display:flex;gap:5px;align-items:center;white-space:nowrap; }
.cash-paid-edit-actions[hidden] { display:none; }
.cash-paid-edit-actions button { min-height:34px;padding:6px 9px;white-space:nowrap; }
.cash-income-actions { display:flex;gap:6px;align-items:center;white-space:nowrap; }
.cash-income-actions[hidden] { display:none; }
.cash-income-actions .payment-status-button,.cash-income-actions .secondary { min-height:34px;padding:6px 9px; }
.cash-partial-receipt { width:118px;min-width:118px;min-height:34px;padding:6px 8px;border-radius:8px; }
.cash-action-cell { position:sticky;right:0;z-index:2;background:#fff;box-shadow:-8px 0 12px rgba(28,54,42,.06); }
th.cash-action-cell { z-index:3;background:#fff; }
.cash-urgent-row .cash-action-cell { background:#fff0f0; }
.compact-ledger-card { overflow:hidden;border-color:#cadbd1;background:linear-gradient(145deg,#f8fbf9,#edf4f0); }
.compact-ledger-card .card-head { margin-bottom:9px; }
.compact-ledger-card .table-wrap { overflow-x:hidden;border:1px solid #d5e1da;border-radius:11px;background:#fff; }
.compact-ledger-table { width:100%;min-width:0!important;table-layout:fixed;line-height:1.08; }
.compact-ledger-table th,.compact-ledger-table td { padding:6px 5px; }
.compact-ledger-table thead th { background:#e6efe9;color:#42564b;font-size:9px;letter-spacing:.025em; }
.compact-ledger-table tbody tr:nth-child(odd)>td { background:#fbfdfb; }
.compact-ledger-table tbody tr:nth-child(even)>td { background:#f0f5f2; }
.compact-ledger-table tbody tr:hover>td { background:#e8f2ec; }
.compact-ledger-table td { overflow:hidden;text-overflow:ellipsis;font-size:11px; }
.compact-ledger-table input,.compact-ledger-table select { width:100%;min-width:0!important;min-height:30px!important;padding:4px 5px!important;border-radius:7px!important;font-size:11px!important; }
.compact-ledger-table td:nth-child(2),.compact-ledger-table .money-cell,.compact-ledger-table td:nth-child(2) input { font-weight:900; }
.cash-planned-expense-table td:nth-child(3),.cash-planned-expense-table td:nth-child(3) input { font-weight:900; }
.cash-planned-expense-table .planned-order-cell { min-width:0;gap:3px; }
.cash-planned-expense-table .planned-drag-handle { gap:2px; }
.cash-planned-income-table th:nth-child(1),.cash-planned-income-table td:nth-child(1) { width:108px; }
.cash-planned-income-table th:nth-child(2),.cash-planned-income-table td:nth-child(2) { width:84px; }
.cash-planned-income-table th:nth-child(3),.cash-planned-income-table td:nth-child(3) { width:132px; }
.cash-planned-income-table th:nth-child(4),.cash-planned-income-table td:nth-child(4) { width:86px; }
.cash-planned-income-table th:nth-child(5),.cash-planned-income-table td:nth-child(5) { width:128px; }
.cash-planned-income-table th:nth-child(6),.cash-planned-income-table td:nth-child(6) { width:118px; }
.cash-planned-income-table th:nth-child(7),.cash-planned-income-table td:nth-child(7) { width:132px; }
.cash-planned-income-table th:nth-child(8),.cash-planned-income-table td:nth-child(8) { width:84px; }
.cash-planned-income-table th:nth-child(9),.cash-planned-income-table td:nth-child(9) { width:86px; }
.cash-planned-income-table th:nth-child(10),.cash-planned-income-table td:nth-child(10) { width:225px; }
.compact-ledger-table .cash-action-cell { background:#f5f9f6!important;box-shadow:-5px 0 9px rgba(28,54,42,.05); }
.compact-ledger-table .cash-payment-action { display:grid;grid-template-columns:54px 78px minmax(91px,1fr);align-items:center;gap:3px; }
.compact-ledger-table .cash-payment-action>input { width:54px;min-width:54px!important; }
.compact-ledger-table .cash-payment-action>select { width:78px;min-width:78px!important; }
.compact-ledger-table .cash-plan-action-buttons { display:flex;width:auto;min-width:0;gap:4px; }
.compact-ledger-table .cash-plan-action-buttons .compact-apply,.compact-ledger-table .cash-plan-action-buttons .compact-delete { width:auto;min-width:0;min-height:30px;padding:4px 3px;font-size:9px;white-space:nowrap; }
.compact-ledger-table .cash-income-actions { gap:4px; }
.compact-ledger-table .cash-income-actions button { min-width:0;min-height:30px;padding:4px 6px;font-size:10px; }
@media (max-width:900px) { .cash-sale-details { min-width:320px; } .cash-expense-form { min-width:1390px; } }
@media (max-width:1100px) { .cash-filter-grid { grid-template-columns:repeat(2,minmax(150px,1fr)); } }
@media (max-width:1350px) { .cash-dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .cash-dashboard-metrics,.cash-alert-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .cash-dashboard-metrics,.cash-alert-metrics { grid-template-columns:1fr; } }
@media (max-width:900px) { .negative-stock-dashboard-list { grid-template-columns:1fr; } .print-preview-toolbar { align-items:flex-start;flex-direction:column; } }
.compact-receipt-line.lumber { grid-template-columns:72px 72px 78px 72px 86px 100px 125px 95px 86px;min-width:900px; }
.compact-receipt-line .field { display:grid;gap:4px;min-width:0;margin:0; }
.compact-receipt-line .field > span,.receipt-calculated > span { color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.02em;white-space:nowrap; }
.compact-receipt-line input,.compact-receipt-line select { width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.receipt-calculated { display:grid;align-content:center;gap:3px;min-width:150px;min-height:51px;padding:7px 11px;border-radius:9px;background:#e8f1eb; }
.receipt-calculated strong { font-size:14px;white-space:nowrap; }
.receipt-calculated.volume { min-width:0;min-height:59px;align-content:end; }
.receipt-calculated.total { background:#fff3cf; }
.compact-receipt-footer { display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:9px; }
.compact-receipt-footer > button,.compact-receipt-footer > .warehouse-edit-actions { margin-left:4px; }
.lumber-sale-invoice { display:none; }
.invoice-brand { display:flex;align-items:baseline;justify-content:space-between;margin-bottom:20px;border-bottom:2px solid #1f593f;padding-bottom:10px; }
.invoice-brand strong { color:#1f593f;font-size:26px; }
.invoice-brand span { font-size:20px;font-weight:900; }
.invoice-meta { display:grid;grid-template-columns:180px 1fr 160px;gap:16px;margin-bottom:20px; }
.invoice-meta div { display:grid;gap:4px; }
.invoice-meta small { color:#66756d;font-weight:800; }
.lumber-sale-invoice table { width:100%;border-collapse:collapse; }
.lumber-sale-invoice th,.lumber-sale-invoice td { padding:9px 8px;border:1px solid #b8c4bd;text-align:left; }
.lumber-sale-invoice tfoot th { background:#eef3ef; }
.invoice-signatures { display:flex;justify-content:space-between;margin-top:38px;font-weight:700; }
@media (max-width: 1100px) { .lumber-sale-header { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 1100px) { .drum-calculation-head { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 1100px) { .compact-receipt-header,.compact-receipt-header.roundwood { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 1250px) { .compact-roundwood-sale-form { grid-template-columns:repeat(2,minmax(0,1fr)); } .compact-roundwood-sale-form > .field { grid-column:auto; } .roundwood-sale-actions { grid-column:1 / -1;justify-content:flex-end; } }
@media (max-width: 650px) { .compact-roundwood-sale-form { grid-template-columns:1fr; } .roundwood-sale-actions { grid-column:auto;justify-content:stretch; } .roundwood-sale-actions button { flex:1;min-width:0; } }
@media (max-width: 650px) { .lumber-sale-header { grid-template-columns:1fr; } .lumber-sale-footer { align-items:stretch; } .lumber-sale-total { order:2;justify-content:space-between;width:100%; } .lumber-sale-footer > .actions { order:3;margin-left:0; } }
@media (max-width: 650px) { .drum-calculation-head { grid-template-columns:1fr; }.important-event-item{grid-template-columns:1fr}.important-event-action{justify-content:flex-start}.topbar-actions{gap:5px}.important-events-button{font-size:12px;padding:6px}.important-events-popover{top:62px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 70px);padding:40px 8px 8px}.online{display:none} }

.negative-stock-row { background: #fff1f1; color: #982f2f; }
.manager-inventory-table { min-width: 820px; }
.manager-inventory-table input,.manager-inventory-table select { min-width: 95px; }
.inventory-difference-box { align-self: end; padding: 12px 14px; border-radius: 12px; background: #e5f3e9; color: #196039; font-weight: 900; }
.inventory-difference-box.mismatch,[data-manager-inventory-difference].mismatch,[data-manager-inventory-value].mismatch,.manager-inventory-table td.mismatch { background: #fff0f0; color: #9a2f2f; font-weight: 900; }
.inventory-history-row td { vertical-align:middle; }
.inventory-history-row td.mismatch { color:#9a2f2f;background:#fff7f5; }
.inventory-history-row button { min-height:32px;padding:6px 10px;white-space:nowrap; }
.inventory-history-detail { padding:14px;background:#fbfaf6;border:1px solid var(--line);border-radius:12px;display:grid;gap:12px; }
.inventory-history-detail-head { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.inventory-history-detail-head span { color:var(--muted);font-size:12px; }
.inventory-history-summary { display:grid;grid-template-columns:repeat(4,minmax(135px,1fr));gap:8px; }
.inventory-history-summary.lumber { grid-template-columns:repeat(3,minmax(150px,1fr)); }
.inventory-history-summary > div { display:grid;gap:4px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:10px; }
.inventory-history-summary span { color:var(--muted);font-size:11px;font-weight:800; }
.inventory-history-summary strong { font-size:16px; }
.inventory-history-summary small { color:var(--muted);font-size:10px; }
.inventory-history-summary > div.mismatch { border-color:#e9b4aa;background:#fff3f0;color:#9a2f2f; }
.inventory-history-detail-table { min-width:820px; }
.inventory-history-detail-table td.mismatch { color:#9a2f2f;font-weight:850;background:#fff7f5; }
.inventory-history-note { margin:0;padding:9px 11px;background:#fff;border-radius:9px;border:1px solid var(--line); }
@media (max-width:900px) { .inventory-history-summary,.inventory-history-summary.lumber { grid-template-columns:1fr 1fr; } }
.inventory-add-button { margin: 14px 0; }
.confirmation-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(9, 24, 18, .58); backdrop-filter: blur(3px); }
.print-preview-overlay { position:fixed;inset:0;z-index:160;display:grid;place-items:center;padding:18px;background:rgba(9,24,18,.68);backdrop-filter:blur(4px); }
.print-preview-dialog { width:min(1160px,100%);max-height:calc(100vh - 36px);overflow:auto;border-radius:16px;background:#edf1ee;box-shadow:0 28px 90px #0008; }
.print-preview-toolbar { position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border-bottom:1px solid #d8e0db;background:#fff; }
.print-preview-toolbar > div:first-child { display:grid;gap:2px; }
.print-preview-toolbar small { color:var(--muted); }
.print-preview-sheet { width:calc(100% - 28px);min-height:620px;margin:14px;padding:28px;color:#17221d;background:#fff;font:14px/1.35 Arial,sans-serif;box-shadow:0 8px 24px #173c2d18; }
.print-preview-sheet .print-brand { display:flex;align-items:baseline;justify-content:space-between;margin-bottom:18px;padding-bottom:10px;border-bottom:2px solid #1f593f; }
.print-preview-sheet .print-brand strong { color:#1f593f;font-size:25px; }
.print-preview-sheet .print-brand span { font-size:19px;font-weight:800; }
.print-preview-sheet .print-brand span { min-width:0;font-size:14px;white-space:nowrap;text-align:right; }
.print-preview-sheet.pdf-exporting { box-sizing:border-box!important;height:auto!important;max-height:none!important;padding:16px!important;overflow:visible!important;font-size:12px!important; }
.print-preview-sheet.pdf-exporting.portrait { width:718px!important;max-width:718px!important; }
.print-preview-sheet.pdf-exporting.landscape { width:1060px!important;max-width:1060px!important; }
.print-preview-sheet.pdf-exporting * { box-sizing:border-box!important; }
.print-preview-sheet.pdf-exporting .print-brand { margin-bottom:8px!important;padding-bottom:6px!important; }
.print-preview-sheet.pdf-exporting .print-brand-logo { width:120px!important; }
.print-preview-sheet.pdf-exporting .payroll-employee-card,
.print-preview-sheet.pdf-exporting .payroll-card-printable,
.print-preview-sheet.pdf-exporting .payroll-card-history,
.print-preview-sheet.pdf-exporting .table-wrap { height:auto!important;max-height:none!important;overflow:visible!important; }
.print-preview-sheet.pdf-exporting .payroll-employee-card { width:100%!important;max-width:100%!important;min-width:0!important; }
.print-preview-sheet.pdf-exporting .payroll-card-printable { gap:8px!important;padding:10px!important; }
.print-preview-sheet.pdf-exporting .payroll-card-header { padding:10px 12px!important; }
.print-preview-sheet.pdf-exporting .payroll-card-header h2 { font-size:24px!important; }
.print-preview-sheet.pdf-exporting .payroll-work-summary { margin:6px 0!important; }
.print-preview-sheet.pdf-exporting .payroll-card-history { padding:8px!important; }
.print-preview-sheet.pdf-exporting .payroll-card-history .card-head { margin-bottom:4px!important; }
.print-preview-sheet.pdf-exporting .payroll-card-history table { width:100%!important;min-width:0!important;table-layout:fixed; }
.print-preview-sheet.pdf-exporting .payroll-card-history th,
.print-preview-sheet.pdf-exporting .payroll-card-history td { padding:5px!important;overflow-wrap:anywhere; }
.print-preview-sheet.pdf-exporting .payroll-card-history th:nth-child(1) { width:13%; }
.print-preview-sheet.pdf-exporting .payroll-card-history th:nth-child(2) { width:22%; }
.print-preview-sheet.pdf-exporting .payroll-card-history th:nth-child(3) { width:27%; }
.print-preview-sheet.pdf-exporting .payroll-card-history th:nth-child(4) { width:18%; }
.print-preview-sheet.pdf-exporting .payroll-card-history th:nth-child(5) { width:20%; }
.print-preview-sheet.pdf-exporting .payroll-card-history .badge { padding:4px 6px!important;font-size:11px!important; }
.print-preview-sheet.pdf-exporting .payroll-card-metrics { grid-template-columns:repeat(4,minmax(0,1fr))!important; }
.print-preview-sheet.pdf-exporting .payroll-card-metrics .metric { min-width:0;padding:10px!important; }
.print-preview-sheet.pdf-exporting .payroll-card-metrics .metric strong { font-size:24px!important; }
.print-preview-sheet.pdf-exporting tr,
.print-preview-sheet.pdf-exporting .metric,
.print-preview-sheet.pdf-exporting .payroll-card-header,
.print-preview-sheet.pdf-exporting .payroll-work-summary { break-inside:avoid!important;page-break-inside:avoid!important; }
.print-preview-sheet .invoice-meta { display:grid;grid-template-columns:180px 1fr 160px;gap:16px;margin-bottom:18px; }
.print-preview-sheet .invoice-meta div { display:grid;gap:4px; }
.print-preview-sheet .invoice-meta small { color:#66756d; }
.print-preview-sheet table { width:100%;border-collapse:collapse; }
.print-preview-sheet th,.print-preview-sheet td { padding:8px 7px;border:1px solid #b8c4bd;text-align:left;vertical-align:top; }
.print-preview-sheet thead th,.print-preview-sheet tfoot th { background:#eef3ef; }
.print-preview-sheet .invoice-signatures { display:flex;justify-content:space-between;margin-top:36px;font-weight:700; }
.confirmation-dialog { width: min(430px, 100%); padding: 24px; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px #0006; }
.confirmation-dialog h2 { margin: 0 0 10px; }
.confirmation-dialog p { margin: 0 0 22px; color: var(--muted); font-size: 16px; }
.confirmation-dialog .actions { justify-content: flex-end; }
.confirmation-dialog textarea { width:100%; min-height:88px; box-sizing:border-box; padding:10px 12px; border:1px solid #d6ddd9; border-radius:12px; font:inherit; color:inherit; resize:vertical; }
.confirmation-dialog .field { display:block; margin:0 0 16px; }
[data-reopen-endpoint] { margin-top:6px; }
.drum-shifts-list.awaiting { border-color:#c9d8e6; background:#f5f9fc; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #10251d; color: #fff; padding: 13px 18px; border-radius: 12px; box-shadow: 0 15px 40px #0004; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s; z-index: 20; }
.toast.show { opacity: 1; transform: none; }
@media (max-width: 1200px) {
  .accounting-filter-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar-pin-toggle { display:none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px; }
  .brand { margin-bottom: 12px; }
  .nav { display: flex; overflow-x: auto; gap: 8px; }
  .nav-group { display: flex; gap: 4px; }
  .nav-group > span { display: none; }
  .nav button { white-space: nowrap; }
  .nav-collapsible { display: grid; min-width: max-content; }
  .nav .nav-group-toggle { min-height: 42px; color: #b9c8c1; font-size: 13px; text-transform: none; letter-spacing: 0; }
  .nav-group-items { display: flex; }
  .nav-reference-section { display: grid; }
  .nav-reference-subitems { display: grid; }
  .nav-cash-section { display:grid; min-width:max-content; }
  .nav-cash-items { display:grid; }
  .sidebar-footer { display: none; }
  .topbar { position: static; padding: 15px 18px; }
  .content { padding: 18px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-project-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .accounting-filter-row, .shift-list-filters, .shift-period-filter form, .form-grid, .brigade-grid, .size-groups, .warehouse-form, .warehouse-period-filter form, .accounting-filter form, .accounting-grid, .dashboard-filters, .manager-shift-grid { grid-template-columns: 1fr; }
  .manager-shift-reason { grid-column: auto; }
  .shift-action-list { grid-template-columns: 1fr; }
  .production-row, .production-row.board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-row .actions, .production-row > strong { grid-column: 1 / -1; }
  .production-add .board-add { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .audit-item { grid-template-columns: 1fr; gap: 4px; }
  .account-choices { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 14px; }
  .metric strong { font-size: 24px; }
  .production-readonly { align-items: flex-start; flex-direction: column; }
  .shift-table { min-width: 0; }
  .shift-table thead { display: none; }
  .shift-table tbody { display: grid; gap: 12px; }
  .shift-table tr[data-shift-row] { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border: 1px solid #dfe5e1; border-radius: 13px; background: #f8faf8; }
  .shift-table tr[data-shift-row] td { display: block; min-width: 0; padding: 0; border: 0; }
  .shift-table tr[data-shift-row] td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
  .shift-table tr[data-shift-row] td:nth-child(1),
  .shift-table tr[data-shift-row] td:nth-child(2),
  .shift-table tr[data-shift-row] td:last-child { grid-column: 1 / -1; }
  .shift-table tr[data-shift-row] td:last-child::before { display: none; }
  .shift-table tr[data-shift-row] td:last-child .secondary { width: 100%; }
  .employee-report-head { grid-template-columns:1fr; }
  .employee-report-metrics { grid-template-columns:1fr; }
  .payroll-project-metrics,.compact-receipt-header { grid-template-columns:1fr; }
  .compact-receipt-footer { justify-content:stretch; }
  .compact-receipt-footer > button { width:100%; }
}
@media print {
  @page { size:A4 portrait; margin:12mm; }
  body.printing-preview { background:#fff; }
  body.printing-preview * { visibility:hidden !important; }
  body.printing-preview .print-preview-overlay,
  body.printing-preview .print-preview-dialog,
  body.printing-preview .print-preview-sheet,
  body.printing-preview .print-preview-sheet * { visibility:visible !important; }
  body.printing-preview .print-preview-overlay { position:absolute;inset:0;display:block;padding:0;background:#fff; }
  body.printing-preview .print-preview-dialog { width:100%;max-height:none;overflow:visible;border-radius:0;background:#fff;box-shadow:none; }
  body.printing-preview .print-preview-toolbar { display:none !important; }
  body.printing-preview .print-preview-sheet { width:100%;height:auto;max-height:none;min-height:0;margin:0;padding:0;overflow:visible;box-shadow:none; }
  body.printing-preview .print-preview-sheet .payroll-employee-card,
  body.printing-preview .print-preview-sheet .payroll-card-printable,
  body.printing-preview .print-preview-sheet .payroll-card-history,
  body.printing-preview .print-preview-sheet .table-wrap { height:auto;max-height:none;overflow:visible; }
  body.printing-preview .print-preview-sheet .payroll-card-history table { width:100%;min-width:0;table-layout:fixed; }
  body.printing-preview .print-preview-sheet .payroll-card-history th,
  body.printing-preview .print-preview-sheet .payroll-card-history td { overflow-wrap:anywhere; }
  body.printing-preview .print-preview-sheet .payroll-card-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body.printing-preview .print-preview-sheet .payroll-card-metrics .metric { min-width:0;padding:10px; }
  body.printing-preview .print-preview-sheet .payroll-card-metrics .metric strong { font-size:24px; }
  body.printing-preview .print-preview-sheet tr,
  body.printing-preview .print-preview-sheet .metric,
  body.printing-preview .print-preview-sheet .payroll-card-header,
  body.printing-preview .print-preview-sheet .payroll-work-summary { break-inside:avoid;page-break-inside:avoid; }
  body.printing-preview .print-preview-sheet tr { break-inside:avoid; }
  body.printing-lumber-invoice { background:#fff; }
  body.printing-lumber-invoice * { visibility:hidden !important; }
  body.printing-lumber-invoice .lumber-sale-invoice,
  body.printing-lumber-invoice .lumber-sale-invoice * { visibility:visible !important; }
  body.printing-lumber-invoice .lumber-sale-invoice { display:block !important;position:absolute;inset:0 auto auto 0;width:100%;color:#17221d;background:#fff; }
  body.printing-lumber-invoice .lumber-sale-invoice tr { break-inside:avoid; }
  body.printing-employee-payroll { background:#fff; }
  body.printing-employee-payroll * { visibility:hidden !important; }
  body.printing-employee-payroll .employee-payroll-report,
  body.printing-employee-payroll .employee-payroll-report * { visibility:visible !important; }
  body.printing-employee-payroll .employee-payroll-report { position:absolute;inset:0 auto auto 0;width:100%;margin:0;padding:0;border:0;background:#fff; }
  body.printing-employee-payroll .employee-report-picker,
  body.printing-employee-payroll .employee-print-button { display:none !important; }
  body.printing-employee-payroll .employee-report-head { display:block;margin-bottom:12px; }
  body.printing-employee-payroll .employee-report-metrics { grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:10px; }
  body.printing-employee-payroll .employee-report-metrics .metric { padding:10px;break-inside:avoid; }
  body.printing-employee-payroll .employee-report-metrics .metric strong { font-size:20px; }
  body.printing-employee-payroll .employee-payroll-report .table-wrap { overflow:visible; }
  body.printing-employee-payroll .employee-accrual-table { min-width:0; }
  body.printing-employee-payroll .employee-accrual-table th,
  body.printing-employee-payroll .employee-accrual-table td { padding:7px 6px;font-size:11px; }
  body.printing-employee-payroll .employee-accrual-table tr { break-inside:avoid; }
}
.access-intro { border-left: 4px solid var(--accent, #e0b33d); }
.access-user-card { margin-top: 14px; }
.access-permissions { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 8px 14px; }
.access-permission { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 7px 10px; border: 1px solid rgba(33,55,45,.12); border-radius: 9px; background: rgba(255,255,255,.55); }
.access-permission input { width: 17px; height: 17px; }
.role-access-list,.employee-account-list{display:grid;gap:10px}.role-access-card,.legacy-access-card{margin:0}.role-access-card{padding:0;overflow:hidden}.account-cabinet-grid{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:8px}.cabinet-access-field{display:grid;gap:5px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.55)}.cabinet-access-field span{font-size:12px;font-weight:800;color:var(--muted)}.cabinet-access-field select{min-width:0}.role-mobile-note{margin:10px 0 0;color:#9a6a00;font-size:13px;font-weight:700}.employee-account-row{border:1px solid var(--line);border-radius:14px;background:var(--card);overflow:hidden}.employee-account-summary{display:grid;grid-template-columns:minmax(220px,1.2fr) minmax(180px,.8fr) auto;gap:14px;align-items:center;padding:14px 16px}.employee-account-summary>div{display:grid;gap:5px}.employee-account-summary small{color:var(--muted)}.employee-account-actions{display:flex!important;grid-auto-flow:column;grid-template-columns:auto auto;gap:8px!important}.employee-account-settings{padding:14px 16px 16px;border-top:1px solid var(--line);background:#f7faf8}.account-credentials{display:grid;grid-template-columns:minmax(180px,1fr) minmax(200px,1fr) minmax(170px,.8fr);gap:10px;align-items:end;margin-bottom:10px}.account-role-access{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.account-role-access small{color:var(--muted)}.account-device-list{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.device-chip{padding:6px 9px;border-radius:999px;border:1px solid var(--line);font-size:12px}.device-chip.active{color:var(--green-2);border-color:#a9d8bf}.device-chip.blocked{color:#a13c3c;border-color:#e8b9b3}
.access-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px;background:#eef5f1}.access-overview>div{display:grid;gap:3px;padding:13px 15px;border:1px solid #cbdcd2;border-radius:12px;background:#fff}.access-overview span{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.access-overview strong{font-size:26px}.access-overview small{color:var(--muted)}
.access-page-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 14px;padding:7px;border:1px solid var(--line);border-radius:14px;background:#edf2ee}.access-page-tabs button{border:0;border-radius:10px;padding:11px 14px;background:transparent;color:var(--muted);font-weight:900}.access-page-tabs button.active{background:#fff;color:var(--ink);box-shadow:0 3px 12px #17342712}
.role-access-summary{display:grid;grid-template-columns:minmax(0,1fr) 110px 130px;gap:14px;align-items:center;width:100%;padding:15px 18px;border:0;background:#fff;color:var(--ink);text-align:left;cursor:pointer}.role-access-summary:hover{background:#f4f8f5}.role-access-summary[aria-expanded="true"]{background:#eef5f1;border-bottom:1px solid var(--line)}.role-access-summary-main{display:grid;gap:4px}.role-access-summary-main>strong{font-size:17px}.role-access-summary-main small{overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.role-access-summary-stats{display:grid;gap:2px;text-align:center}.role-access-summary-stats b{font-size:20px;color:var(--green)}.role-access-summary-stats small{color:var(--muted);font-size:11px}.role-access-summary-action{display:flex;justify-content:flex-end;gap:8px;align-items:center;color:#76570c;font-weight:900}.role-access-summary-action i{font-size:18px;font-style:normal}.role-access-body{padding:18px}.role-access-body>.card-head{padding-bottom:14px;border-bottom:1px solid var(--line)}
.manager-access-tree{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.manager-access-section{overflow:hidden;border:1px solid #d7e2dc;border-radius:12px;background:#fff}.manager-access-section-head{display:grid;grid-template-columns:minmax(0,1fr) 185px;gap:10px;align-items:center;padding:12px;background:#eef5f1}.manager-access-section-head>label{display:flex;gap:10px;align-items:flex-start;cursor:pointer}.manager-access-section-head input,.manager-subsection-choice input{width:18px;height:18px;margin:1px 0 0;accent-color:#c89a1e}.manager-access-section-head label>span{display:grid;gap:2px}.manager-access-section-head strong{font-size:14px}.manager-access-section-head small{color:var(--muted);font-size:11px;line-height:1.25}.manager-access-section-head select{min-width:0;height:38px;padding:7px 30px 7px 9px;font-size:12px}.manager-subsection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:7px}.manager-subsection-choice{display:flex;gap:8px;align-items:flex-start;min-width:0;padding:8px;border-radius:8px;cursor:pointer}.manager-subsection-choice:hover{background:#f5f8f6}.manager-subsection-choice:has(input:checked){background:#fff7df;color:#5f480d}.manager-subsection-choice span{font-size:12px;font-weight:750;line-height:1.25}
@media(max-width:1050px){.account-cabinet-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.employee-account-summary{grid-template-columns:1fr auto}.employee-account-actions{grid-column:1/-1}.account-credentials{grid-template-columns:1fr 1fr}.account-role-access{grid-column:1/-1}}
@media(max-width:680px){.account-cabinet-grid,.account-credentials,.employee-account-summary{grid-template-columns:1fr}.employee-account-actions{display:grid!important;grid-template-columns:1fr}.employee-account-actions button{width:100%}}
.accounting-import-form { margin-top: 18px; align-items: end; }
.bank-period-card form{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.bank-period-card .field{width:150px}.bank-summary{background:linear-gradient(145deg,#fff,#f2f7f4)}
.bank-balance-grid{display:grid;grid-template-columns:repeat(5,minmax(145px,1fr));gap:8px}.bank-balance-card{display:grid;gap:6px;min-height:105px;padding:14px;border:1px solid #cedbd3;border-radius:13px;background:#fff}.bank-balance-card span{font-size:13px;font-weight:800}.bank-balance-card strong{font-size:21px}.bank-balance-card small{color:var(--muted)}
.bank-account-card details>summary{cursor:pointer;font-weight:800}.bank-account-card form{margin-top:14px}.bank-transactions-table{min-width:1540px}.bank-transactions-table th,.bank-transactions-table td{vertical-align:top}.bank-purpose{min-width:230px;max-width:330px;white-space:normal}.bank-mapping-summary{display:block;margin-top:5px;line-height:1.35}.bank-allocation{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:5px;min-width:300px}.bank-allocation select,.bank-allocation input,.bank-allocation button{min-height:34px}.bank-rule-choice{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:700}.bank-rule-choice input{min-height:auto;width:auto}.bank-allocation button{grid-column:1/-1}
.bank-column-filters th{padding:6px 5px;background:#edf4ef;vertical-align:middle}.bank-column-filters input,.bank-column-filters select{width:100%;min-width:92px;height:34px;padding:5px 7px;border:1px solid #c8d6cd;border-radius:8px;background:#fff;font-size:12px;color:var(--ink)}.bank-column-filters th:nth-child(4) input{min-width:155px}.bank-column-filters th:nth-child(5) input{min-width:190px}.bank-column-filters th:nth-child(8) input{min-width:170px}.bank-filter-amount{display:grid;grid-template-columns:1fr 1fr;gap:4px;min-width:150px}.bank-filter-reset{margin-left:8px;white-space:nowrap}
.bank-current-only-note{grid-column:1/-1;color:var(--muted);line-height:1.3}.bank-current-position-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:5px}.bank-allocation .bank-current-position-actions button{grid-column:auto;width:100%}
.bank-rule-edit-row td{vertical-align:top;background:#fffaf0}.bank-rule-edit-row input,.bank-rule-edit-row select{width:100%;min-width:120px;min-height:34px;padding:6px 8px}.bank-rule-edit-condition,.bank-rule-edit-target{display:grid;gap:5px}.bank-rule-edit-condition{grid-template-columns:repeat(2,minmax(145px,1fr));min-width:300px}.bank-rule-edit-target{min-width:170px}.bank-rule-edit-row .table-edit-actions{grid-template-columns:1fr;min-width:120px}.bank-rule-edit-row .table-edit-actions button{width:100%}
@media(max-width:1200px){.bank-balance-grid{grid-template-columns:repeat(3,minmax(145px,1fr))}}@media(max-width:720px){.bank-balance-grid{grid-template-columns:1fr 1fr}.bank-period-card form{display:grid;grid-template-columns:1fr 1fr}.bank-period-card .field{width:auto}.bank-period-card .shift-period-shortcuts{grid-column:1/-1}}
.payment-period-filter form { display:flex;flex-wrap:wrap;align-items:end;gap:8px; }
.payment-period-filter form > .field { margin:0;min-width:150px; }
.payment-period-filter .warehouse-period-shortcuts { flex-basis:100%; }
.payment-plan-form { display:grid;grid-template-columns:110px minmax(135px,.8fr) minmax(155px,1fr) minmax(135px,.8fr) minmax(150px,1fr) minmax(135px,.8fr) minmax(150px,1fr) 125px 150px 170px auto;gap:7px;align-items:end;overflow-x:auto;padding-bottom:5px; }
.payment-plan-form > label { display:grid;gap:4px;min-width:0; }
.payment-plan-form > label > span { color:var(--muted);font-size:10px;font-weight:900;white-space:nowrap; }
.payment-plan-form input,.payment-plan-form select { width:100%;min-width:0;min-height:36px;padding:7px 8px;border-radius:8px; }
.payment-plan-form > button { min-height:36px;white-space:nowrap; }
.form-warning { margin:12px 0 0;padding:9px 11px;border-radius:9px;background:#fff0c7;color:#74520c;font-weight:700; }
.payment-status-control { display:flex;align-items:center;gap:5px;min-width:210px; }
.payment-status-control select { min-height:34px;padding:6px 8px;border-radius:8px;font-weight:800; }
.payment-status-control .quiet { min-height:34px;padding:6px 9px; }
.payment-plan-form.registry-create-form { grid-template-columns:80px minmax(115px,.9fr) minmax(125px,1fr) minmax(100px,.8fr) minmax(120px,.95fr) minmax(105px,.85fr) minmax(130px,1fr) 112px 165px;min-width:1108px;overflow-x:auto; }
.compact-registry-add { width:auto;min-width:155px;max-width:165px;padding:7px 10px!important; }
.payment-approval-button { min-width:108px;min-height:34px;border:0;border-radius:999px;padding:7px 11px;font-size:11px;font-weight:900;cursor:pointer; }
.payment-approval-button.pending { color:#8f5c00;background:#fff0c4; }
.payment-approval-button.approved { color:#12643b;background:#d9f0e2; }
.registry-payment-action { display:flex;align-items:center;gap:6px;min-width:222px; }
.registry-payment-action .primary { min-height:34px;padding:6px 10px; }
.registry-payment-action .primary:disabled { cursor:not-allowed;opacity:.42; }
.conduct-payment-button { min-width:104px;min-height:34px;border:0;border-radius:999px;padding:7px 11px;color:#6f7772;background:#e7ebe8;font-size:11px;font-weight:900;white-space:nowrap;cursor:not-allowed; }
.conduct-payment-button.ready { color:#fff;background:#197244;box-shadow:0 5px 14px rgba(25,114,68,.2);cursor:pointer; }
.conduct-payment-button.ready:hover { background:#125f37; }
.registry-note-input { min-width:150px;min-height:34px!important;padding:6px 8px!important;border-radius:8px!important;transition:background .15s,border-color .15s,color .15s; }
.registry-note-input.has-note,.note-alert { background:#ffe7e7!important;border-color:#d88f8f!important;color:#922d2d!important; }
.registry-planned-table select,.registry-planned-table input { min-width:130px;min-height:34px;padding:6px 8px;border-radius:8px; }
.registry-planned-table input[type="date"] { min-width:128px; }
.registry-planned-table input[type="number"], .registry-planned-table .readable-number-input { min-width:105px; }
.registry-planned-table .payment-status-control { min-width:205px; }
.registry-planned-table .compact-save-details { min-height:34px;padding:6px 9px;white-space:nowrap; }
.registry-payment-action { min-width:220px; }
.registry-payment-action .conduct-payment-button { min-width:104px; }
.registry-paid-table { min-width:1320px; }
.registry-paid-edit-row input,.registry-paid-edit-row select { min-width:125px;min-height:34px;padding:6px 8px;border-radius:8px; }
.registry-paid-edit-row input[type="date"] { min-width:128px; }
.registry-paid-edit-row input[type="number"], .registry-paid-edit-row .readable-number-input { min-width:105px; }
.registry-paid-action-cell { position:sticky;right:0;z-index:2;background:#fff;box-shadow:-8px 0 12px rgba(28,54,42,.06);white-space:nowrap; }
th.registry-paid-action-cell { z-index:3; }
.registry-paid-incomplete > td { background:#ffe3e3;color:#7b1f1f;border-bottom-color:#efb5b5; }
.registry-paid-incomplete > td.registry-paid-action-cell { background:#ffe3e3; }
.registry-paid-incomplete:hover > td { background:#ffd7d7; }
.registry-ledger-card .registry-planned-table,.registry-ledger-card .registry-paid-table { min-width:0!important; }
.registry-ledger-card .registry-planned-table th:nth-child(1),.registry-ledger-card .registry-planned-table td:nth-child(1) { width:42px; }
.registry-ledger-card .registry-planned-table th:nth-child(2),.registry-ledger-card .registry-planned-table td:nth-child(2) { width:105px; }
.registry-ledger-card .registry-planned-table th:nth-child(3),.registry-ledger-card .registry-planned-table td:nth-child(3) { width:78px;font-weight:900; }
.registry-ledger-card .registry-planned-table th:nth-child(4),.registry-ledger-card .registry-planned-table td:nth-child(4) { width:82px; }
.registry-ledger-card .registry-planned-table th:nth-child(5),.registry-ledger-card .registry-planned-table td:nth-child(5) { width:118px; }
.registry-ledger-card .registry-planned-table th:nth-child(6),.registry-ledger-card .registry-planned-table td:nth-child(6) { width:82px; }
.registry-ledger-card .registry-planned-table th:nth-child(7),.registry-ledger-card .registry-planned-table td:nth-child(7) { width:112px; }
.registry-ledger-card .registry-planned-table th:nth-child(8),.registry-ledger-card .registry-planned-table td:nth-child(8) { width:102px; }
.registry-ledger-card .registry-planned-table th:nth-child(9),.registry-ledger-card .registry-planned-table td:nth-child(9) { width:110px; }
.registry-ledger-card .registry-planned-table th:nth-child(10),.registry-ledger-card .registry-planned-table td:nth-child(10) { width:100px; }
.registry-ledger-card .registry-planned-table th:nth-child(11),.registry-ledger-card .registry-planned-table td:nth-child(11) { width:160px; }
.registry-ledger-card .registry-planned-table th:nth-child(12),.registry-ledger-card .registry-planned-table td:nth-child(12) { width:70px; }
.registry-ledger-card .registry-planned-table th:nth-child(13),.registry-ledger-card .registry-planned-table td:nth-child(13) { width:68px; }
.registry-ledger-card .registry-planned-action-cell { text-align:center;background:#f5f9f6!important; }
.registry-ledger-card .compact-registry-delete { width:100%;min-width:0;min-height:30px;padding:4px 5px;font-size:10px; }
.registry-ledger-card .planned-order-cell { gap:2px; }
.registry-ledger-card .priority-color-control { transform:scale(.82);transform-origin:left center; }
.registry-ledger-card .payment-approval-button { width:100%;min-width:0;min-height:30px;padding:4px 5px;font-size:10px; }
.registry-ledger-card .registry-payment-action { min-width:0;gap:4px; }
.registry-ledger-card .registry-payment-action input { width:65px!important;min-width:65px!important; }
.registry-ledger-card .registry-payment-action .conduct-payment-button { width:91px;min-width:91px;min-height:30px;padding:4px 5px;font-size:10px; }
.registry-ledger-card .registry-paid-table th:nth-child(2),.registry-ledger-card .registry-paid-table td:nth-child(2) { font-weight:900; }
.registry-ledger-card .registry-paid-action-cell { background:#f5f9f6!important; }
.payment-analytics { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-bottom:14px; }
.payment-analytic { display:grid;align-content:center;gap:5px;min-height:104px;padding:15px 17px;border:1px solid #dbe4de;border-radius:14px;background:#fff;box-shadow:0 7px 22px #173c2d0d; }
.payment-analytic span,.payment-analytic small { display:block;color:var(--muted);font-size:11px;font-weight:800; }
.payment-analytic strong { display:block;font-size:23px; }
.payment-analytic.planned strong { color:#225ca3; }
.payment-analytic.for_payment strong { color:#9a6a00; }
.payment-analytic.paid strong { color:#197244; }
.payment-filter-card .payment-filter-grid { border-top:1px solid #e3e8e4;padding-top:10px; }
.payment-amount-filter > div { display:grid;grid-template-columns:1fr 1fr;gap:7px;min-width:0; }
.payment-amount-filter input { min-width:0;width:100%; }
.status-planned { color:#225ca3;border-color:#a9c9ee!important;background:#eaf3ff!important; }
.status-for_payment { color:#74520c;border-color:#e8c967!important;background:#fff4ce!important; }
.status-paid { color:#196039;border-color:#9bcfac!important;background:#e4f4e9!important; }
.status-discuss { color:#8d2929;border-color:#dfaaaa!important;background:#f8e6e6!important; }
.profit-report-filter { padding:14px 16px; }
.profit-report-filter form { display:flex;flex-wrap:nowrap;align-items:end;gap:8px;overflow-x:auto; }
.profit-report-filter .field { flex:0 0 152px; }
.profit-report-filter .shift-period-shortcuts { display:flex;flex:0 0 auto;gap:6px; }
.profit-report-table-card { padding:0;overflow:hidden; }
.profit-report-table-card .table-wrap { max-height:calc(100vh - 205px);overflow:auto; }
.profit-report-table { min-width:1260px;table-layout:fixed; }
.profit-report-table th,.profit-report-table td { padding:11px 10px;text-align:right;vertical-align:middle;white-space:nowrap; }
.profit-report-table th { position:sticky;top:0;z-index:2;background:#edf3ef;text-align:center;white-space:normal;line-height:1.2; }
.profit-report-table th:first-child,.profit-report-table td:first-child { position:sticky;left:0;width:190px;text-align:left;background:#fff;z-index:1; }
.profit-report-table th:first-child { z-index:3;background:#edf3ef; }
.profit-report-administrative td { border-top:2px solid #e1c66e;background:#fff8dc!important; }
.profit-report-total td { border-top:2px solid #aac0b3;background:#eef5f0!important;font-weight:900; }
.profit-report-table td.profit-report-shared-value { text-align:center;vertical-align:middle;background:#f7faf8;font-weight:900;font-size:16px;border-left:1px solid #dbe5df;border-right:1px solid #dbe5df; }
.profit-report-drill-button { width:100%;padding:5px 8px;border:1px solid #c9d9cf;border-radius:8px;background:#f3f8f5;cursor:pointer;text-align:right; }
.profit-report-drill-button:hover { border-color:#d1a928;background:#fff8dc; }
.profit-report-detail-card { scroll-margin-top:18px; }
.profit-report-detail-card .table-wrap { max-height:360px;overflow:auto; }
.profit-expense-articles { display:grid;gap:8px; }
.profit-expense-article { border:1px solid #d7e1da;border-radius:9px;background:#fff;overflow:hidden; }
.profit-expense-article summary { position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:10px 12px;cursor:pointer;list-style:none; }
.profit-expense-article summary::-webkit-details-marker { display:none; }
.profit-expense-article summary::before { content:"›";position:absolute;transform:rotate(0deg);font-size:20px;color:#5b7466; }
.profit-expense-article[open] summary::before { transform:rotate(90deg); }
.profit-expense-article summary strong:first-child { padding-left:14px; }
.profit-expense-article summary strong:last-child { white-space:nowrap;text-align:right; }
.profit-expense-article .table-wrap { margin:0 8px 8px;border-top:1px solid #e3ebe5; }
.profit-report-detail-card table { min-width:720px; }
.profit-report-detail-card th { position:sticky;top:0;z-index:1;background:#edf3ef; }
.profit-report-detail-card th:last-child,.profit-report-detail-card td:last-child { text-align:right; }
.profit-report-mode-card { padding:10px 12px; }
.profit-report-mode-switch { display:inline-flex;min-width:220px; }
.profit-report-mode-switch button { min-width:104px; }
.profit-percentage-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }
.profit-percentage-person { margin-bottom:0;padding:20px; }
.profit-percentage-person h2 { margin:0 0 16px;font-size:21px; }
.profit-percentage-person dl { display:grid;gap:0;margin:0; }
.profit-percentage-person dl>div { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #e4eae6; }
.profit-percentage-person dt { color:var(--muted);font-weight:800; }
.profit-percentage-person dd { margin:0;font-size:17px;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap; }
.profit-percentage-person .profit-percentage-total { margin-top:4px;border-bottom:0; }
.profit-percentage-person .profit-percentage-total dd { color:var(--green);font-size:20px; }
.profit-percentage-person .profit-percentage-position { margin-top:6px;padding:13px 12px;border:1px solid #e1c66e;border-radius:10px;background:#fff8dc; }
.profit-percentage-person .profit-percentage-position dt { color:var(--ink); }
.profit-percentage-person .profit-percentage-catchup { border-bottom:0; }
.profit-position-gap { color:#b33b2e; }
.profit-position-leader { display:inline-flex;padding:4px 8px;border-radius:999px;background:#dcefe2;color:#176d3b;font-size:13px;font-weight:900; }
.profit-card-edit { width:100%;margin-top:14px; }
.profit-card-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px; }
.profit-card-actions button { width:100%; }
.profit-card-input { display:flex;align-items:center;justify-content:flex-end;gap:6px; }
.profit-card-input input { width:140px;min-width:0;padding:8px 9px;text-align:right;font:inherit;font-weight:900;border:1px solid #cbd6cf;border-radius:8px;background:#fff; }
.profit-card-input span { color:var(--ink);font-weight:900; }
.profit-percentage-summary { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px; }
.profit-percentage-summary>div { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #e4eae6;border-radius:10px;background:#f8faf9; }
.profit-percentage-summary span { font-weight:800; }
.profit-percentage-summary strong { color:var(--green);font-size:22px;white-space:nowrap; }
.profit-percentage-summary>small { grid-column:1/-1;color:var(--muted);font-weight:800; }
@media (max-width: 1050px) { .profit-percentage-grid { grid-template-columns:1fr; } .profit-percentage-summary { grid-template-columns:1fr; } }
@media (max-width: 900px) { .payment-plan-form { min-width:1380px; } .payment-plan-form.registry-create-form { grid-template-columns:80px 115px 125px 100px 120px 105px 130px 112px 165px;min-width:1108px; } .cash-income-form { grid-template-columns:80px 120px 100px 115px 105px 120px 112px 195px 112px;min-width:1153px; } .payment-analytics { grid-template-columns:repeat(2,minmax(150px,1fr)); } }
@media (max-width: 760px) { .access-user-card .card-head { align-items: stretch; } .access-permissions { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .warehouse-stock-toolbar { align-items:stretch;flex-direction:column; } .warehouse-stock-toolbar .field { width:100%; } }

/* Генеральная проверка: единая компактная плотность настольных кабинетов. */
@media (min-width: 901px) {
  body { font-size: 14px; }
  .sidebar { padding: 16px 14px; }
  .brand { margin-bottom: 22px; }
  .nav { gap: 10px; }
  .nav button { padding: 9px 12px; }
  .topbar { min-height: 68px; padding: 12px 24px; }
  .content { max-width: 1500px; padding: 16px 18px 36px; }
  .card { padding: 17px; margin-bottom: 14px; }
  .card-head { margin-bottom: 12px; }
  .metric-grid { gap: 12px; margin-bottom: 18px; }
  .metric { padding: 16px; }
  .field { gap: 5px; margin: 12px 0; }
  input, select { min-height: 40px; padding: 7px 10px; }
  .primary, .secondary, .danger, .quiet { min-height: 36px; padding: 7px 12px; }
  th, td { padding: 9px 8px; }
  .empty { padding: 22px; }
}
.inventory-discrepancy-card .card-head {
  margin-bottom: 12px;
}

.inventory-discrepancy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inventory-discrepancy-species {
  padding: 14px;
  border: 1px solid #dce5df;
  border-radius: 14px;
  background: #f7faf8;
}

.inventory-discrepancy-species h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.inventory-discrepancy-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inventory-discrepancy-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e0e6e2;
  border-radius: 11px;
  background: #fff;
}

.inventory-discrepancy-metric span,
.inventory-discrepancy-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.inventory-discrepancy-metric strong {
  font-size: 19px;
  line-height: 1.2;
}

.inventory-discrepancy-metric.shortage {
  border-color: #e7aaa2;
  background: #fff3f0;
  color: #9a2f2f;
}

.planned-order-controls { display:inline-grid;grid-template-columns:28px 22px 28px;align-items:center;gap:3px;white-space:nowrap; }
.planned-order-controls span { color:var(--muted);font-size:11px;font-weight:900;text-align:center; }
.planned-order-controls button { width:28px;min-width:28px;min-height:28px!important;padding:2px!important;border-radius:7px;font-size:15px;line-height:1; }
.planned-order-controls button:disabled { opacity:.3;cursor:not-allowed; }
.planned-drag-handle { display:inline-flex;align-items:center;gap:6px;color:#66756d;font-weight:900;cursor:grab;user-select:none;white-space:nowrap; }
.planned-drag-handle:active { cursor:grabbing; }
tr[draggable="true"].is-dragging { opacity:.45; }
tr[draggable="true"].is-drag-over { outline:2px solid var(--gold);outline-offset:-2px;background:#fff8dc; }

.planned-order-cell { display:flex;align-items:center;gap:8px;min-width:76px;white-space:nowrap; }
.planned-order-number { display:inline-flex;align-items:center;min-width:24px;color:var(--muted);font-weight:900; }
.priority-color-control { position:relative;display:inline-flex;align-items:center; }
.priority-color-current,.priority-color-choice { flex:0 0 auto;width:20px!important;min-width:20px!important;height:20px!important;min-height:20px!important;margin:0!important;padding:0!important;border:1px solid #8d9a92!important;border-radius:5px!important;box-shadow:inset 0 0 0 1px #ffffff80;cursor:pointer; }
.priority-color-current:disabled { opacity:.8;cursor:default; }
.priority-color-palette { position:absolute;left:26px;top:50%;z-index:40;display:flex;gap:5px;padding:6px;border:1px solid #d7dfd9;border-radius:9px;background:#fff;box-shadow:0 8px 24px #10251d2b;transform:translateY(-50%); }
.priority-color-palette[hidden] { display:none!important; }
.priority-color-choice { width:18px!important;min-width:18px!important;height:18px!important;min-height:18px!important; }
.priority-none { background:#fff!important; }
.priority-clear { color:#7b8780!important;background:#f2f4f2!important;font-size:15px!important;font-weight:900;line-height:1; }
.priority-blue { background:#4f8fd8!important; }
.priority-green { background:#4ca66a!important; }
.priority-yellow { background:#f2cf4a!important; }
.priority-orange { background:#ed913f!important; }
.priority-red { background:#d9534f!important; }
/* Компактные настольные окна: примерно вдвое меньше пустых внутренних полей. */
@media (min-width: 901px) {
  .topbar { min-height:60px;padding:8px 14px; }
  .content { max-width:1650px;padding:8px 10px 20px; }
  .card { padding:9px 10px;margin-bottom:7px; }
  .card-head { margin-bottom:6px; }
  .metric-grid { gap:6px;margin-bottom:9px; }
  .metric { padding:10px; }
  .form-grid { gap:6px; }
  .field { gap:4px;margin:6px 0; }
  input,select { min-height:36px;padding:6px 8px; }
  .primary,.secondary,.danger,.quiet { min-height:34px;padding:6px 10px; }
  th,td { padding:6px 7px; }
  .empty { padding:12px; }
}

.inventory-discrepancy-metric.surplus {
  border-color: #aad4ba;
  background: #eef9f2;
  color: #197244;
}

.drum-costing-editor-card { background:linear-gradient(135deg,#f7faf8 0%,#eef5f1 100%); }
.drum-costing-create-table { overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 1px 0 rgba(24,55,42,.03); }
.drum-costing-create-heading,.drum-costing-create-table .drum-costing-create { display:grid;grid-template-columns:minmax(160px,1.4fr) minmax(110px,1fr) 65px 85px minmax(90px,1fr) 70px 70px 65px 80px minmax(100px,1fr);gap:8px;min-width:1030px; }
.drum-costing-create-heading { align-items:center;padding:8px 10px;border-bottom:1px solid var(--line);background:#edf3ef;color:#355348;font-size:11px;font-weight:900;line-height:1.2;text-align:center; }
.drum-costing-create-table .drum-costing-create { align-items:center;padding:9px 10px;overflow:visible; }
.drum-costing-create-table .drum-costing-create .field { min-width:0;margin:0; }
.drum-costing-create-table .drum-costing-create .field > span { display:none; }
.drum-costing-create-table .drum-costing-create input,.drum-costing-create-table .drum-costing-create button { width:100%;min-width:0;min-height:38px; }
.drum-costing-create-table .drum-costing-create input { text-align:center;font-variant-numeric:tabular-nums;background:#fff; }
.drum-costing-create-table .drum-costing-create .field:first-child input { text-align:left;font-weight:850; }
.drum-costing-edit-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;align-self:stretch; }
.drum-costing-edit-actions button { min-height:0!important;padding:5px 7px;font-size:10px;line-height:1.1;white-space:normal; }
.drum-create-total { display:flex;min-height:38px;align-items:center;justify-content:center;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:#f7faf8;text-align:center; }
.drum-costing-create-table .drum-create-total span { display:none; }
.drum-create-total strong { font-size:14px;white-space:nowrap; }
.drum-edit-hint { margin:0 0 8px; }
.drum-costing-toolbar { display:flex;align-items:end;gap:8px;margin-bottom:8px; }
.drum-costing-toolbar .field { width:min(290px,100%);margin:0; }
.drum-costing-toolbar .field:last-child { width:170px; }
.drum-costing-table { width:100%;min-width:1120px;table-layout:fixed;border-spacing:0; }
.drum-costing-scroll { max-height:calc(100vh - 230px);overflow:auto;border:1px solid #dce5df;border-radius:12px;background:#fff; }
.drum-costing-table th { position:sticky;top:0;z-index:4;padding:10px 6px;white-space:normal;text-align:center;font-size:10px;line-height:1.25;vertical-align:middle;background:#eaf1ed;border-right:1px solid #d3dfd7;border-bottom:2px solid #b8cbbf;box-shadow:0 2px 4px rgba(16,37,29,.08); }
.drum-costing-table td { padding:8px 6px;white-space:nowrap;text-align:center;font-size:12px;vertical-align:middle;border-right:1px solid #e0e8e3;border-bottom:1px solid #e4e9e6; }
.drum-costing-table th:last-child,.drum-costing-table td:last-child { border-right:0; }
.drum-costing-table tbody tr:nth-child(even) td { background:#f8faf8; }
.drum-costing-table tbody tr:hover td { background:#f8fbf9; }
.drum-costing-table input,.drum-costing-table select { width:100%;min-width:0;padding-inline:8px; }
.drum-costing-table th:nth-child(1) { width:30px; }
.drum-costing-table th:nth-child(2) { width:64px; }
.drum-costing-table th:nth-child(3) { width:82px; }
.drum-costing-table th:nth-child(4) { width:58px; }
.drum-costing-table th:nth-child(5) { width:72px; }
.drum-costing-table th:nth-child(6) { width:75px; }
.drum-costing-table th:nth-child(7) { width:78px; }
.drum-costing-table th:nth-child(8),.drum-costing-table th:nth-child(9) { width:70px; }
.drum-costing-table th:nth-child(10),.drum-costing-table th:nth-child(11) { width:60px; }
.drum-costing-table th:nth-child(12) { width:76px; }
.drum-costing-table th:nth-child(13) { width:90px; }
.drum-costing-table th:nth-child(14) { width:60px; }
.drum-costing-table th:nth-child(15) { width:82px; }
.drum-costing-table th:nth-child(16) { width:92px; }
.drum-costing-table.editing-mode { min-width:1200px; }
.drum-costing-table.editing-mode th:nth-child(1) { width:28px; }
.drum-costing-table.editing-mode th:nth-child(2) { width:60px; }
.drum-costing-table.editing-mode th:nth-child(3) { width:72px; }
.drum-costing-table.editing-mode th:nth-child(4) { width:48px; }
.drum-costing-table.editing-mode th:nth-child(5),.drum-costing-table.editing-mode th:nth-child(6) { width:66px; }
.drum-costing-table.editing-mode th:nth-child(7) { width:70px; }
.drum-costing-table.editing-mode th:nth-child(8) { width:68px; }
.drum-costing-table.editing-mode th:nth-child(9) { width:62px; }
.drum-costing-table.editing-mode th:nth-child(10),.drum-costing-table.editing-mode th:nth-child(11) { width:50px; }
.drum-costing-table.editing-mode th:nth-child(12) { width:66px; }
.drum-costing-table.editing-mode th:nth-child(13) { width:80px; }
.drum-costing-table.editing-mode th:nth-child(14) { width:48px; }
.drum-costing-table.editing-mode th:nth-child(15) { width:72px; }
.drum-costing-table.editing-mode th:nth-child(16) { width:245px; }
.drum-costing-table.editing-mode td { height:58px; }
.drum-costing-table.editing-mode input,.drum-costing-table.editing-mode .readable-number-input { min-height:36px;font-size:12px;text-align:center; }
.drum-costing-table.editing-mode .actions { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:3px; }
.drum-costing-table.editing-mode .actions button { width:100%;min-width:0;padding:5px 3px;font-size:9px;white-space:normal;line-height:1.05; }
.drum-costing-table.editing-mode [data-save-new-drum-reference] { min-width:0;white-space:normal;line-height:1.05;padding-block:3px; }
.drum-costing-table [data-drum-reference-name] { width:100%; }
.drum-costing-table [data-drum-order] { width:38px;text-align:center;color:var(--muted);font-weight:900; }
.drum-costing-table [data-drum-cost] { color:#197244;font-size:15px; }
.drum-costing-table [data-drum-planned-price] { color:#197244;font-size:15px; }
.drum-costing-table .drum-costing-view-value { display:inline-block;color:var(--ink);font-size:12px;font-weight:750;line-height:1.25;font-variant-numeric:tabular-nums;white-space:nowrap; }
.drum-costing-table .drum-costing-drum-number { display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;color:#183029;font-size:14px;font-weight:750;line-height:1.35; }
.drum-costing-table .drum-costing-name-cell { background:#fffaf0;text-align:center; }
.drum-costing-table tbody tr:not(.editing) td { height:46px; }
.drum-costing-table tbody tr:not(.editing) td:first-child { color:#6b7b73;font-weight:850; }
.drum-costing-table tbody tr.editing td { background:#fffdf6; }
.drum-costing-table input:disabled,.drum-costing-table select:disabled { color:var(--ink);background:#f7faf8;opacity:1; }
.drum-costing-table .actions { flex-wrap:nowrap;gap:4px; }
.drum-costing-table .actions button { padding:6px 7px;font-size:10px; }
.drum-overview-metrics { margin-bottom:16px; }
.drum-overview-metrics .metric { min-height:132px;display:flex;flex-direction:column; }
.drum-overview-metrics .metric strong { margin-top:8px;font-size:25px;white-space:nowrap; }
.drum-overview-metrics .metric small { margin-top:auto;padding-top:8px;color:var(--muted); }
.drum-overview-table th,.drum-overview-table td { font-variant-numeric:tabular-nums; }

@media (max-width: 900px) {
  .drum-costing-create-heading,.drum-costing-create-table .drum-costing-create { min-width:1120px; }
  .drum-costing-toolbar { align-items:stretch;flex-direction:column; }
  .drum-costing-toolbar .field,.drum-costing-toolbar .field:last-child { width:100%; }
}

@media (max-width: 900px) {
  .inventory-discrepancy-grid,
  .inventory-discrepancy-values {
    grid-template-columns: 1fr;
  }
}
/* Единые табличные строки ввода для настольных кабинетов. */
@media (min-width: 901px) {
  #paymentPeriodForm,
  #cashPeriodForm {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-rows: auto;
    align-items: end;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    padding: 9px;
    border: 1px solid #dfe7e2;
    border-radius: 12px;
    background: #f8faf8;
  }
  #paymentPeriodForm > .field,
  #cashPeriodForm > .field { width: 135px; min-width: 135px; margin: 0; }
  #paymentPeriodForm > .primary,
  #cashPeriodForm > .primary { width: 86px !important; min-width: 86px; }
  #paymentPeriodForm > .warehouse-period-shortcuts,
  #cashPeriodForm > .warehouse-period-shortcuts {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(5, max-content);
    align-items: end;
    gap: 4px;
    min-width: max-content;
  }
  #paymentPeriodForm .cash-filter-grid,
  #cashPeriodForm .cash-filter-grid { display: contents; }
  #paymentPeriodForm .cash-filter-grid > label,
  #cashPeriodForm .cash-filter-grid > label { width: 138px; min-width: 138px; margin: 0; }
  #paymentPeriodForm .cash-filter-grid > button,
  #cashPeriodForm .cash-filter-grid > button { width: 108px; min-width: 108px; justify-self: stretch; }
  #paymentPeriodForm .payment-amount-filter { width: 178px; min-width: 178px; }
  .payment-filter-card .payment-filter-grid { border-top: 0; padding-top: 0; }

  .brigade-create {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(145px, .95fr) 92px minmax(145px, 1fr) minmax(145px, 1fr) 132px;
    gap: 7px;
    align-items: end;
    padding: 9px;
    border: 1px solid #dfe7e2;
    border-radius: 12px;
    background: #f8faf8;
  }
  .brigade-create .field { min-width: 0; margin: 0; }
  .brigade-create input,
  .brigade-create select { min-height: 36px; padding: 7px 8px; border-radius: 8px; }
  .brigade-create > .primary { width: 100%; min-height: 36px; padding-inline: 6px; font-size: 11px; }
  .brigade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .brigade-card { padding: 12px; border-radius: 12px; }
  .brigade-card .field { margin: 7px 0; }
  .brigade-card input,
  .brigade-card select { min-height: 36px; padding: 7px 8px; }
  .brigade-card .actions { gap: 5px; }
  .brigade-card .actions button { min-height: 34px; padding: 6px 9px; font-size: 11px; }

  #roundwoodSaleForm,
  #wasteSaleForm,
  .lumber-sale-header {
    padding: 9px;
    border: 1px solid #dfe7e2;
    border-radius: 12px;
    background: #f8faf8;
  }
  #roundwoodSaleForm > .field,
  #wasteSaleForm > .field,
  .lumber-sale-header > .field { margin: 0; }
  #roundwoodSaleForm input,
  #roundwoodSaleForm select,
  #wasteSaleForm input,
  #wasteSaleForm select,
  .lumber-sale-header input,
  .lumber-sale-header select { min-height: 36px; padding: 7px 8px; border-radius: 8px; }
  .compact-receipt-line,
  .compact-movement-form,
  .lumber-receipt-line,
  .lumber-sale-line,
  .lumber-sale-header { box-shadow: inset 0 1px 0 #fff; }

  .drum-work-saved-wrap { border: 1px solid #dce5df; border-radius: 12px; }
  .drum-work-saved-table { width: 100%; min-width: 760px; table-layout: fixed; border-spacing: 0; }
  .drum-work-saved-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 8px;
    text-align: center;
    background: #eaf1ed;
    border-right: 1px solid #d3dfd7;
    border-bottom: 2px solid #b8cbbf;
  }
  .drum-work-saved-table td {
    padding: 8px;
    text-align: center;
    border-right: 1px solid #e0e8e3;
    border-bottom: 1px solid #e4e9e6;
  }
  .drum-work-saved-table th:first-child,
  .drum-work-saved-table td:first-child { width: 120px; text-align: left; }
  .drum-work-saved-table th:nth-child(5),
  .drum-work-saved-table td:nth-child(5) { width: 185px; }
  .drum-work-saved-table th:last-child,
  .drum-work-saved-table td:last-child { width: 125px; border-right: 0; }
  .drum-work-saved-table tbody tr:nth-child(even) td { background: #f8faf8; }
  .drum-work-saved-table .secondary { width: 100%; min-height: 34px; padding: 6px 9px; }
}

@media (min-width: 901px) {
  #paymentPeriodForm,
  #cashPeriodForm {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 6px;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #paymentPeriodForm > .field,
  #cashPeriodForm > .field { width: 140px; min-width: 140px; }
  #paymentPeriodForm > .primary,
  #cashPeriodForm > .primary { width: 88px !important; min-width: 88px; }
  #paymentPeriodForm > .warehouse-period-shortcuts,
  #cashPeriodForm > .warehouse-period-shortcuts {
    display: grid;
    grid-template-columns: repeat(5, max-content);
    flex: 0 0 auto;
  }
  #cashPeriodForm .cash-filter-grid,
  #paymentPeriodForm .payment-filter-grid {
    display: grid;
    flex: 1 0 100%;
    width: 100%;
    gap: 6px;
    align-items: end;
    padding: 9px;
    border: 1px solid #dfe7e2;
    border-radius: 12px;
    background: #f8faf8;
  }
  #cashPeriodForm .cash-filter-grid {
    grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(90px, 1fr)) minmax(100px, .9fr) repeat(2, minmax(82px, .8fr)) 104px;
  }
  #paymentPeriodForm .payment-filter-grid {
    grid-template-columns: minmax(115px, 1fr) minmax(135px, 1.15fr) repeat(4, minmax(85px, .85fr)) minmax(95px, .9fr) minmax(150px, 1.2fr) 104px;
  }
  #cashPeriodForm .cash-filter-grid > label,
  #paymentPeriodForm .payment-filter-grid > label,
  #cashPeriodForm .cash-filter-grid > button,
  #paymentPeriodForm .payment-filter-grid > button,
  #paymentPeriodForm .payment-amount-filter {
    width: auto;
    min-width: 0;
    margin: 0;
  }
  #cashPeriodForm .cash-filter-grid input,
  #cashPeriodForm .cash-filter-grid select,
  #paymentPeriodForm .payment-filter-grid input,
  #paymentPeriodForm .payment-filter-grid select { width: 100%; min-width: 0; }
}

/* Производственное задание по подписанным спецификациям барабанов. */
.drum-shifts-specifications-wrap { max-height: 570px; border: 1px solid #dce5df; border-radius: 12px; }
.drum-shifts-specifications-table { width: 100%; min-width: 1100px; table-layout: fixed; border-spacing: 0; }
.drum-shifts-specifications-table th,
.drum-shifts-specifications-table td { vertical-align: middle; }
.drum-shifts-specifications-table th { position: sticky; top: 0; z-index: 2; padding: 9px 7px; text-align: center; background: #eaf1ed; border-right: 1px solid #d3dfd7; border-bottom: 2px solid #b8cbbf; }
.drum-shifts-specifications-table td { padding: 8px 7px; text-align: center; border-right: 1px solid #e0e8e3; border-bottom: 1px solid #e4e9e6; }
.drum-shifts-specifications-table th:first-child,
.drum-shifts-specifications-table td:first-child { width: 120px; text-align: left; }
.drum-shifts-specifications-table th:nth-child(2),
.drum-shifts-specifications-table td:nth-child(2) { width: 100px; text-align: left; }
.drum-shifts-specifications-table th:nth-child(3),
.drum-shifts-specifications-table td:nth-child(3) { width: 95px; text-align: left; }
.drum-shifts-specifications-table th:nth-child(4),
.drum-shifts-specifications-table td:nth-child(4) { width: 85px; }
.drum-shifts-specifications-table th:nth-child(5),
.drum-shifts-specifications-table td:nth-child(5) { width: 90px; }
.drum-shifts-specifications-table th:nth-child(6),
.drum-shifts-specifications-table td:nth-child(6),
.drum-shifts-specifications-table th:nth-child(7),
.drum-shifts-specifications-table td:nth-child(7) { width: 85px; }
.drum-shifts-specifications-table th:nth-child(8),
.drum-shifts-specifications-table td:nth-child(8) { width: 110px; }
.drum-shifts-specifications-table th:nth-child(9),
.drum-shifts-specifications-table td:nth-child(9) { width: 80px; }
.drum-shifts-specifications-table th:nth-child(10),
.drum-shifts-specifications-table td:nth-child(10) { width: 105px; }
.drum-shifts-specifications-table th:last-child,
.drum-shifts-specifications-table td:last-child { width: 100px; border-right: 0; }
.drum-shifts-specifications-table tbody tr:nth-child(even) td { background: #f8faf8; }
.drum-spec-link { display: block; padding: 0; border: 0; background: none; color: var(--green-2); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.drum-spec-link:hover { color: #b67a08; text-decoration: underline; }
.drum-shift-spec-row small { display: block; margin-top: 3px; color: #69766f; }
.drum-shift-position { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid #e8eeea; }
.drum-shift-position:last-child { border-bottom: 0; }
.drum-shift-position span { white-space: nowrap; color: #58675f; }
.drum-calculation-link { min-height: 32px; padding: 6px 10px; border: 1px solid #a9cdbb; border-radius: 9px; color: #15573b; background: #e7f4ec; font: inherit; font-weight: 800; cursor: pointer; }
.drum-calculation-link:hover { color: #fff; background: var(--green-2); }
.drum-shift-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.drum-shift-drums-wrap { border: 1px solid #dce5df; border-radius: 12px; }
.drum-shift-drums-table { min-width: 1040px; table-layout: fixed; border-spacing: 0; }
.drum-shift-drums-table th,
.drum-shift-drums-table td { text-align: center; }
.drum-shift-drums-table th { position: sticky; top: 0; z-index: 2; background: #eaf1ed; border-bottom: 2px solid #b8cbbf; }
.drum-shift-drums-table td { border-bottom: 1px solid #e4e9e6; }
.drum-shift-drums-table th:first-child,
.drum-shift-drums-table td:first-child { text-align: left; }
.drum-shift-work-wrap { max-height: 560px; border: 1px solid #dce5df; border-radius: 12px; }
.drum-shift-work-table { min-width: 1280px; table-layout: fixed; border-spacing: 0; }
.drum-shift-work-table th { position: sticky; top: 0; z-index: 2; background: #eaf1ed; text-align: center; border-bottom: 2px solid #b8cbbf; }
.drum-shift-work-table td { text-align: center; border-bottom: 1px solid #e4e9e6; }
.drum-shift-work-table th:nth-child(2),
.drum-shift-work-table td:nth-child(2) { width: 28%; text-align: left; }
.drum-shift-work-table tbody tr:nth-child(even) td { background: #f8faf8; }
.drum-calculation-updated { display: block; margin-top: 4px; color: var(--muted); white-space: nowrap; }
.drum-work-plan-missing td { color: #a13c3c; background: #fff3f1 !important; text-align: left; }
.drum-shift-progress-note { margin: 10px 2px 0; }
.drum-shipment-create-wrap { border:1px solid var(--line);border-radius:12px; }
.drum-shipment-create { display:grid;grid-template-columns:130px minmax(360px,1.8fr) 140px minmax(220px,1fr) 130px;gap:8px;align-items:end;min-width:1040px;padding:10px; }
.drum-shipment-create .field { min-width:0;margin:0; }
.drum-shipment-create button { min-height:42px; }
.drum-shipments-table input { min-width:110px; }
.drum-shifts-list.fulfilled { border-color:#b9d8c7;background:#f6fbf8; }
.drum-work-edit { margin-left:8px;white-space:nowrap; }
.table-edit-input { width:100%;min-width:92px;height:36px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;background:#fff; }
.table-edit-inline { display:grid;grid-template-columns:minmax(90px,120px) 1fr;gap:8px;align-items:center; }
.table-edit-actions { display:grid;grid-template-columns:repeat(3,minmax(82px,1fr));gap:6px;min-width:300px; }
.table-edit-actions button { min-height:36px;padding:6px 8px; }

/* Роли, доступы и учётные записи сотрудников. */
.access-role-create { display:grid;grid-template-columns:minmax(260px,1fr) 180px;gap:10px;align-items:end;max-width:680px; }
.access-role-create .field { margin:0; }
.access-role-create button { min-height:42px; }
.role-access-title { min-width:0;flex:1; }
.role-access-editor-head { align-items:center; }
.role-access-editor { min-width:0;margin:0;padding:0;border:0; }
.role-access-editor:disabled .role-portal-choice,.role-access-editor:disabled .manager-access-section-head>label,.role-access-editor:disabled .manager-subsection-choice { cursor:default; }
.role-access-editor:disabled input,.role-access-editor:disabled select { opacity:1;color:var(--ink); }
.role-access-title>p:first-child { margin:0 0 3px; }
.role-access-title>h2 { margin:0 0 5px; }
.role-name-field { max-width:440px;margin:0 0 7px; }
.role-name-field[hidden] { display:none; }
.role-view-actions { flex:0 0 180px; }
.role-view-actions button { width:100%; }
.role-edit-actions { display:grid;grid-template-columns:repeat(2,minmax(135px,1fr));gap:7px;flex:0 0 min(440px,48%); }
.role-edit-actions[hidden] { display:none; }
.role-edit-actions button { min-height:40px;white-space:normal; }
.role-access-editing .role-access-body { background:#fbfcfb; }
.role-access-title-row { display:flex;gap:10px;align-items:center; }
.role-access-title-row h2 { margin:0; }
.role-name-edit-button { min-height:30px;padding:4px 9px;font-size:12px; }
.role-name-edit { display:grid;grid-template-columns:minmax(220px,1fr) auto auto auto;gap:7px;align-items:center;margin-top:9px; }
.role-name-edit[hidden] { display:none; }
.role-name-edit input,.role-name-edit button { min-height:36px; }
.manager-cabinet-switch { display:grid;grid-template-columns:minmax(280px,1fr) 230px;gap:14px;align-items:center;padding:12px 14px;border:1px solid #d8e2dc;border-radius:12px;background:#f4f8f5; }
.manager-cabinet-switch > span { display:grid;gap:3px; }
.manager-cabinet-switch small { color:var(--muted); }
.role-portal-access{display:grid;gap:10px;padding:12px 0}.role-portal-grid{display:grid;grid-template-columns:repeat(3,minmax(190px,1fr));gap:8px}.role-portal-choice{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#f7faf8;cursor:pointer}.role-portal-choice:has(input:checked){border-color:#d4aa32;background:#fff8df;box-shadow:inset 0 0 0 1px rgba(212,170,50,.16)}.role-portal-choice input{width:18px;height:18px;margin:2px 0 0;accent-color:#c89a1e}.role-portal-choice span{display:grid;gap:3px}.role-portal-choice small{color:var(--muted);line-height:1.25}.role-portal-choice.unavailable{opacity:.5;cursor:not-allowed}.manager-section-access{margin-top:8px;padding-top:12px;border-top:1px solid var(--line)}
.manager-section-access { margin-top:10px;padding:12px;border:1px solid #d8e2dc;border-radius:12px;background:#fbfcfb; }
.manager-section-access.manager-access-unavailable { background:#f2f4f2;border-style:dashed; }
.manager-section-access.manager-access-unavailable .manager-access-tree { opacity:.64; }
.manager-section-access-head { display:flex;justify-content:space-between;gap:16px;align-items:baseline;margin-bottom:10px; }
.manager-section-access-head small { color:var(--muted); }
.employee-access-intro { margin-top:20px; }
.employee-account-credentials { grid-template-columns:minmax(180px,.8fr) minmax(180px,.8fr) minmax(210px,1fr) minmax(260px,1.4fr); }
.employee-account-credentials .account-role-access small { line-height:1.35; }
@media(max-width:1150px){.employee-account-credentials{grid-template-columns:1fr 1fr}.employee-account-credentials .account-role-access{grid-column:1/-1}}
@media(max-width:1000px){.role-portal-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}.role-access-editor-head{align-items:stretch;flex-direction:column}.role-view-actions,.role-edit-actions{width:100%;max-width:none;flex-basis:auto}}@media(max-width:680px){.access-role-create,.manager-cabinet-switch,.employee-account-credentials,.role-name-edit,.role-portal-grid,.role-edit-actions{grid-template-columns:1fr}.manager-section-access-head{display:grid;gap:4px}.role-access-title-row{align-items:flex-start;flex-direction:column}}
@media(max-width:1100px){.manager-access-tree{grid-template-columns:1fr}.role-access-summary{grid-template-columns:minmax(0,1fr) 90px 120px}}
@media(max-width:680px){.access-overview{grid-template-columns:1fr}.access-page-tabs{grid-template-columns:1fr}.role-access-summary{grid-template-columns:1fr auto}.role-access-summary-stats{display:none}.role-access-summary-action{grid-column:2;grid-row:1;align-self:start}.role-access-summary-main small{white-space:normal}.role-access-body{padding:13px}.manager-access-section-head{grid-template-columns:1fr}.manager-subsection-grid{grid-template-columns:1fr}}
@media (max-width: 900px) {
  .drum-shift-metrics { grid-template-columns: 1fr 1fr; }
}

/* Аренда: компактные справочники объектов, помещений и счётчиков. */
.rental-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rental-create-card { border-top: 4px solid var(--yellow); }
.rental-property-create { display:grid;grid-template-columns:minmax(280px,1fr) 190px;gap:10px;align-items:end; }
.rental-space-create { display:grid;grid-template-columns:minmax(190px,1.15fr) minmax(220px,1.25fr) minmax(140px,.65fr) 190px;gap:8px;align-items:end; }
.rental-meter-create { display:grid;grid-template-columns:minmax(260px,1.6fr) 160px minmax(220px,1.3fr) 145px 180px;gap:8px;align-items:end; }
.rental-meter-replacement-create { grid-template-columns:220px 130px 180px 82px 132px 110px 190px 125px 115px;min-width:1340px; }
.rental-meter-replacement-create .field[hidden] { display:none; }
.rental-property-create .field,
.rental-space-create .field,
.rental-meter-create .field { min-width:0;margin:0; }
.rental-property-create button,
.rental-space-create button,
.rental-meter-create button { min-height:42px; }
.rental-form-total { min-height:42px;padding:6px 10px;border:1px solid var(--line);border-radius:9px;background:#f5f8f6;display:flex;flex-direction:column;justify-content:center; }
.rental-form-total span { color:var(--muted);font-size:12px;font-weight:700; }
.rental-form-total strong { margin-top:2px;color:var(--green-2);font-size:16px;white-space:nowrap; }
.rental-table { min-width:880px;table-layout:fixed; }
.rental-table th,.rental-table td { text-align:center;vertical-align:middle; }
.rental-table th:first-child,.rental-table td:first-child { text-align:left; }
.rental-table input,.rental-table select { width:100%;min-width:0;height:38px; }
.rental-table input:disabled,.rental-table select:disabled { color:var(--text);opacity:1;background:#f7f9f7;border-color:transparent; }
.rental-spaces-table { min-width:760px; }
.rental-spaces-table th:nth-child(1) { width:28%; }
.rental-spaces-table th:nth-child(2) { width:28%; }
.rental-spaces-table th:nth-child(3) { width:18%; }
.rental-spaces-table th:last-child { width:26%; }
.rental-meters-table { min-width:1080px; }
.rental-meters-table th:first-child { width:28%; }
.rental-meters-table th:nth-child(2) { width:14%; }
.rental-meters-table th:nth-child(3) { width:22%; }
.rental-meters-table th:nth-child(4) { width:7%; }
.rental-meters-table th:nth-child(5) { width:12%; }
.rental-meters-table th:last-child { width:17%; }
.rental-meter-history-table { min-width:1380px; }
.rental-meter-history-table th:first-child { width:20%; }
.rental-meter-history-table th:nth-child(2) { width:10%; }
.rental-meter-history-table th:nth-child(3) { width:16%; }
.rental-meter-history-table th:nth-child(4) { width:5%; }
.rental-meter-history-table th:nth-child(5) { width:7%; }
.rental-meter-history-table th:nth-child(6) { width:14%; }
.rental-meter-history-table th:nth-child(7) { width:15%; }
.rental-meter-history-table th:last-child { width:13%; }
.meter-replaced-note { display:block;margin-top:4px;color:var(--muted);line-height:1.25; }
.rental-meter-search { width:min(340px,100%);margin:0; }
.coefficient-warning,.coefficient-warning input { background:#fff1a8 !important;color:#5e4900 !important; }
.rental-dashboard-period .accounting-period-controls { max-width:820px; }
.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard { margin-bottom:28px; }
.rental-grand-total { border-color:#d8b452;background:#fff9e8; }
.rental-grand-total strong { color:#6f5207; }
.rental-utility-dashboard .metric,.rental-area-dashboard .metric { min-height:148px; }
.rental-utility-dashboard .rent-value.positive { color:#196039; }
.rental-utility-dashboard .rent-value.negative { color:var(--red); }
.rental-dashboard-properties { min-width:900px; }
.rental-dashboard-properties th:first-child { width:28%; }
.rental-dashboard-properties tfoot th { padding:13px 10px;border-top:2px solid #cbdad1;background:#eef4f0;color:var(--ink);font-size:13px;letter-spacing:0;text-transform:none; }
.rental-dashboard-tenants { min-width:1500px; }
.rental-dashboard-tenants th:first-child { width:17%; }
.rental-dashboard-tenants th:nth-child(2) { width:9%; }
.rental-dashboard-tenants th:nth-child(3) { width:11%; }
.rental-dashboard-tenants th:nth-child(n+4) { width:9%; }
.rental-dashboard-tenants .rent-paid { color:#196039;font-weight:900; }
.rental-dashboard-tenants .rent-debt { color:var(--red);font-weight:900;background:#fff5f5; }
.rental-date-filter { display:grid;grid-template-columns:170px auto;gap:8px;align-items:end; }
.rental-date-filter .field { margin:0; }
.rental-billing-filter .accounting-period-controls { max-width:820px; }
.rental-active-areas-card { display:grid;gap:12px; }
.rental-active-areas-card > .card-head { margin-bottom:0; }
.rental-active-property { overflow:hidden;border:1px solid #d6e0da;border-radius:12px;background:#fff; }
.rental-active-property-head { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 13px;background:#edf4ef;border-bottom:1px solid #d6e0da;text-align:left; }
.rental-active-property-head h3 { margin:0;color:#173c2d;font-size:17px; }
.rental-active-property-head span { color:#53675b;font-size:12px;font-weight:800;white-space:nowrap; }
.rental-overview-table { min-width:980px; }
.rental-overview-table th,.rental-overview-table td { vertical-align:middle; }
.rental-overview-table th:nth-child(1),.rental-overview-table td:nth-child(1),.rental-overview-table th:nth-child(2),.rental-overview-table td:nth-child(2) { text-align:left !important; }
.rental-overview-table th:nth-child(1) { width:19%; }
.rental-overview-table th:nth-child(2) { width:27%; }
.rental-overview-table th:nth-child(3) { width:14%; }
.rental-overview-table th:nth-child(4) { width:13%; }
.rental-overview-table th:nth-child(5) { width:15%; }
.rental-overview-table th:nth-child(6) { width:12%; }
.rental-property-total td { border-top:2px solid #a9c3b4;background:#f5f9f6;font-weight:800; }
.rental-active-grand-total { display:flex;justify-content:flex-end;align-items:center;gap:28px;padding:13px 15px;border-radius:12px;background:#173c2d;color:#fff;font-size:14px; }
.rental-active-grand-total strong { margin-left:6px;color:#ffd55a;font-size:17px;white-space:nowrap; }
.rental-tenancy-head { display:grid;grid-template-columns:170px minmax(240px,1fr) minmax(240px,1fr) 190px;gap:8px;align-items:end;margin-bottom:12px; }
.rental-tenancy-head .field { margin:0; }
.rental-tenancy-wrap { border:1px solid var(--line);border-radius:12px; }
.rental-tenancy-table { min-width:1120px; }
.rental-tenancy-table th:first-child { width:27%; }
.rental-tenancy-table th:nth-child(2) { width:11%; }
.rental-tenancy-table th:nth-child(3) { width:13%; }
.rental-tenancy-table th:nth-child(4) { width:14%; }
.rental-tenancy-table th:nth-child(5) { width:27%; }
.rental-tenancy-table th:last-child { width:8%; }
.rental-opening-list { display:grid;gap:5px;text-align:left; }
.rental-opening-list label { display:grid;grid-template-columns:minmax(150px,1fr) 120px;gap:6px;align-items:center; }
.rental-opening-list span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
.rental-opening-list input { height:34px; }
.rental-tenancy-actions { display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:12px; }
.rental-tenancy-actions strong { margin-right:auto; }
.rental-history-wrap { position:relative;overflow:auto; }
.rental-history-table { min-width:1260px; }
.rental-history-table th,.rental-history-table td { text-align:left !important;vertical-align:top; }
.rental-history-table th:nth-child(1) { width:9%; }
.rental-history-table th:nth-child(2) { width:14%; }
.rental-history-table th:nth-child(3) { width:15%; }
.rental-history-table th:nth-child(4) { width:15%; }
.rental-history-table th:nth-child(5) { width:10%; }
.rental-history-table th:nth-child(6) { width:10%; }
.rental-history-table th:nth-child(7) { width:12%; }
.rental-history-table th:last-child { width:260px;min-width:260px; }
.rental-history-table th:last-child,.rental-history-table td:last-child { position:sticky;right:0;z-index:2;background:#fff;box-shadow:-8px 0 12px -12px #173c2d99; }
.rental-history-table th:last-child { z-index:3;background:#edf3ef; }
.rental-history-table tr:nth-child(even) td:last-child { background:#f8faf8; }
.rental-history-table .table-edit-actions { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;min-width:0;justify-content:stretch;flex-wrap:nowrap; }
.rental-history-table .table-edit-actions button { min-width:0;padding:7px 6px;font-size:11px;white-space:nowrap; }
.rental-reading-view-switch { display:inline-flex;align-items:center;gap:4px;margin:0 0 10px;padding:4px;border:1px solid #c9d6ce;border-radius:12px;background:#edf3ef;box-shadow:0 4px 14px #173c2d12; }
.rental-reading-view-switch button { min-height:36px;padding:7px 16px;border:0;border-radius:9px;background:transparent;color:#4b5c52;font-size:13px;font-weight:800;white-space:nowrap;cursor:pointer; }
.rental-reading-view-switch button:hover { background:#fff;color:#173c2d; }
.rental-reading-view-switch button.active { background:#173c2d;color:#fff;box-shadow:0 3px 9px #173c2d35; }
[data-rental-reading-panel][hidden] { display:none !important; }
.rental-reading-head { display:grid;grid-template-columns:165px 180px 190px minmax(310px,1fr);gap:8px;align-items:end;justify-content:start; }
.rental-reading-head .field { margin:0;width:auto; }
.rental-reading-head .field span { white-space:nowrap;font-size:12px; }
.rental-reading-head button { width:auto;min-width:150px; }
.rental-reading-header-actions { display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0; }
.rental-reading-header-actions small { color:var(--muted);font-size:11px;font-weight:800;white-space:nowrap; }
.rental-reading-supplement-note { margin-top:7px;color:#755b10;font-size:12px;font-weight:750; }
.reading-previous-edit { display:grid;grid-template-columns:minmax(92px,1fr) 125px;gap:5px;min-width:225px; }
.reading-previous-edit input { min-width:0 !important;width:100%; }
.reading-previous-static { display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap; }
.reading-previous-static small { color:var(--muted);font-size:10px;font-weight:700; }
.reading-row-save { min-width:132px;padding-inline:10px;font-size:11px;white-space:nowrap; }
.rental-site-meter-table [data-reading-rate] { min-width:86px;width:100%;text-align:right; }
.rental-abk-input { border-top:4px solid #e4b83f; }
.rental-abk-input .card-head { background:#fff9e6;margin:-20px -20px 14px;padding:14px 20px;border-bottom:1px solid #ecd98f; }
.rental-reading-tenant { padding:0;overflow:hidden; }
.rental-tenant-heading { display:flex;align-items:center;gap:12px;padding:13px 16px;background:linear-gradient(90deg,#173c2d,#245b43);color:#fff;border-bottom:3px solid var(--yellow); }
.rental-tenant-heading > span { display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:10px;background:var(--yellow);color:#15251e;font-size:17px;font-weight:900; }
.rental-tenant-heading h2 { margin:0;color:#fff;font-size:19px; }
.rental-tenant-heading p { margin:2px 0 0;color:#d9e8df;font-size:12px; }
.rental-tariff-copy { margin:8px 0 0;padding:7px 10px;border-left:4px solid #c79218;border-radius:7px;background:#fff5ce;color:#665014;font-weight:700; }
.rental-readings-table { min-width:1480px; }
.rental-readings-table th:first-child { width:20%; }
.rental-readings-table th:nth-child(2) { width:16%; }
.rental-readings-table input { text-align:right; }
.rental-shared-reading { padding:0;overflow:hidden;border:2px solid #d7a928;box-shadow:0 8px 24px #8f6a1618; }
.rental-shared-heading { display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 18px;background:linear-gradient(100deg,#fff8dc,#fffdf4);border-bottom:3px solid var(--yellow); }
.rental-shared-heading h2 { margin:7px 0 2px;font-size:22px;color:#173c2d; }
.rental-shared-heading p { margin:0;color:#5d665f;font-size:13px; }
.rental-shared-area-summary { display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:7px;min-width:470px; }
.rental-shared-area-summary span { padding:8px 10px;border:1px solid #e9d58d;border-radius:9px;background:#fff;color:#5b5540;font-size:12px; }
.rental-shared-area-summary strong { display:block;margin-top:2px;color:#173c2d;font-size:15px; }
.rental-shared-meter-table { min-width:980px; }
.rental-shared-meter-table th,.rental-shared-meter-table td { text-align:center;vertical-align:middle; }
.rental-shared-meter-table th:first-child,.rental-shared-meter-table td:first-child { text-align:left; }
.rental-shared-meter-table input { min-width:150px;text-align:right; }
.rental-site-readings { padding:0;overflow:hidden; }
.rental-site-readings .card-head { margin:0;padding:14px 17px;border-bottom:1px solid var(--line); }
.rental-site-meter-table { min-width:1320px; }
.rental-site-meter-table th,.rental-site-meter-table td { text-align:center;vertical-align:middle; }
.rental-site-meter-table th:first-child,.rental-site-meter-table td:first-child { text-align:left; }
.rental-site-meter-table input { min-width:145px;text-align:right; }
.rental-site-meter-name { display:block;margin-top:3px;color:var(--muted);font-size:11px;font-weight:600; }
.rental-shared-allocation-title { margin:14px 18px 8px;font-size:15px;color:#173c2d; }
.rental-shared-allocation-table { min-width:900px; }
.rental-shared-allocation-table th,.rental-shared-allocation-table td { text-align:left;vertical-align:middle; }
.rental-shared-allocation-table th:nth-child(n+3),.rental-shared-allocation-table td:nth-child(n+3) { text-align:right; }
.rental-abk-tenant-row td { background:#fffaf0 !important;border-top:1px dashed #e4b83f; }
.rental-abk-tenant-row td:first-child,.rental-abk-tenant-row td:nth-child(2) { font-weight:700; }
.rental-tenant-total td { border-top:2px solid #adc8b8;font-weight:800; }
.rental-tenant-total.electricity td { background:#fff8d8 !important; }
.rental-tenant-total.gas td { background:#e9f4ee !important; }
.reading-missing td { background:#fff3d9 !important; }
.reading-missing input { border:2px solid #d8861c !important;background:#fffaf0 !important;box-shadow:0 0 0 3px #f7bf6840; }
.reading-invalid td { background:#ffe5e1 !important; }
.rental-billing-table { min-width:1120px; }
.rental-billing-table th,.rental-billing-table td { text-align:left;vertical-align:middle; }
.rental-billing-row td { white-space:nowrap; }
.rental-billing-detail td { padding:14px;background:#f5f8f6; }
.rental-billing-detail-grid { display:grid;grid-template-columns:1fr 1.25fr;gap:14px; }
.rental-billing-detail-grid section { min-width:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff; }
.rental-billing-detail-grid h3 { margin:0 0 9px;font-size:15px; }
.rental-billing-detail-actions { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px; }
@media (max-width:1100px) {
  .rental-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rental-space-create,.rental-meter-create,.rental-tenancy-head,.rental-reading-head { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rental-billing-detail-grid { grid-template-columns:1fr; }
  .rental-shared-heading { align-items:flex-start;flex-direction:column; }
  .rental-shared-area-summary { width:100%;min-width:0; }
}
@media (max-width:700px) {
  .rental-metrics,.rental-property-create,.rental-space-create,.rental-meter-create,.rental-tenancy-head,.rental-reading-head,.rental-date-filter { grid-template-columns:1fr; }
  .rental-shared-area-summary { grid-template-columns:1fr; }
  .rental-tenancy-actions { align-items:stretch;flex-direction:column; }
  .rental-tenancy-actions strong { margin:0; }
}

/* Buyers and stretch trading */
.buyer-directory-form { display:grid;grid-template-columns:minmax(230px,1.3fr) minmax(420px,2fr) auto;gap:12px;align-items:end; }
.buyer-category-field { min-width:0;margin:0;padding:7px 10px 9px;border:1px solid var(--line);border-radius:10px;background:#fbfcfb; }
.buyer-category-field legend { padding:0 5px;color:var(--muted);font-size:12px;font-weight:800; }
.buyer-category-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px; }
.buyer-category-grid label { display:flex;align-items:center;gap:6px;min-height:32px;padding:5px 8px;border:1px solid #dfe8e2;border-radius:8px;background:#fff;font-size:13px;font-weight:700;white-space:nowrap; }
.buyer-category-grid input { width:16px;height:16px;margin:0;accent-color:var(--green); }
.buyer-category-badges { display:flex;flex-wrap:wrap;gap:5px; }
.profit-report-mode-card { display:flex;justify-content:flex-start; }
.profit-report-mode-switch { margin:0; }
.stretch-entry-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.stretch-entry-grid > .card { min-width:0;margin:0; }
.stretch-entry-form { display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:9px;align-items:end; }
.stretch-entry-form .buyer-search-field,.stretch-entry-form .supplier-search-field { grid-column:span 2; }
.stretch-entry-form output { display:flex;align-items:center;min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#f5f8f6;font-weight:900;white-space:nowrap; }
.stretch-entry-form .stretch-note { grid-column:span 3; }
.stretch-form-actions { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;grid-column:1/-1; }
.stretch-buyers-table { min-width:1050px; }
.stretch-buyers-table th,.stretch-buyers-table td { text-align:right;white-space:nowrap; }
.stretch-buyers-table th:first-child,.stretch-buyers-table td:first-child { text-align:left; }
.stretch-buyers-table tfoot th { border-top:2px solid #adc8b8;background:#f3f8f5; }
@media (max-width:1250px) { .stretch-entry-grid { grid-template-columns:1fr; } }
@media (max-width:900px) { .buyer-directory-form { grid-template-columns:1fr; }.buyer-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.stretch-entry-form { grid-template-columns:repeat(2,minmax(0,1fr)); }.stretch-entry-form .stretch-note { grid-column:span 2; } }

/* Employee accounts table */
.employee-account-table { overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:0 5px 18px rgba(24,53,39,.06); }
.employee-account-table-head,.employee-account-summary { display:grid;grid-template-columns:minmax(190px,1.3fr) minmax(145px,1fr) minmax(125px,.8fr) minmax(155px,.9fr) minmax(125px,.75fr) minmax(220px,auto);min-width:1080px;gap:0;align-items:stretch; }
.employee-account-table-head { position:sticky;top:0;z-index:2;background:#e8f1ec;border-bottom:1px solid #bfd1c7; }
.employee-account-table-head span { display:flex;align-items:center;min-height:44px;padding:10px 13px;border-right:1px solid #cfddd5;color:#496257;font-size:11px;font-weight:900;letter-spacing:.035em;text-transform:uppercase; }
.employee-account-table-head span:last-child { border-right:0; }
.employee-account-list { gap:0;min-width:1080px; }
.employee-account-row { border:0;border-radius:0;border-bottom:1px solid var(--line); }
.employee-account-row:last-child { border-bottom:0; }
.employee-account-row:hover .employee-account-summary { background:#fbfdfc; }
.employee-account-summary { padding:0; }
.employee-account-summary>div { min-width:0;padding:11px 13px;border-right:1px solid #e1e9e4; }
.employee-account-summary>div:last-child { border-right:0; }
.employee-account-cell { display:flex!important;flex-direction:column;justify-content:center;gap:4px!important; }
.employee-account-cell strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px; }
.employee-account-name strong { font-size:15px;color:var(--ink); }
.employee-account-devices strong { font-size:18px;color:var(--green); }
.employee-account-status { align-items:flex-start; }
.employee-account-actions { display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:6px!important; }
.employee-account-actions button { min-width:0;min-height:34px;padding:7px 9px;font-size:11px;white-space:nowrap; }
.employee-account-settings { min-width:1080px; }
@media(max-width:780px){
  .employee-account-table { overflow:visible;border:0;background:transparent;box-shadow:none; }
  .employee-account-table-head { display:none; }
  .employee-account-list,.employee-account-settings { min-width:0; }
  .employee-account-list { gap:10px; }
  .employee-account-row { border:1px solid var(--line);border-radius:13px; }
  .employee-account-summary { grid-template-columns:repeat(2,minmax(0,1fr));min-width:0; }
  .employee-account-summary>div { position:relative;min-height:74px;padding:27px 11px 10px;border-bottom:1px solid #e1e9e4; }
  .employee-account-summary>div::before { content:attr(data-label);position:absolute;top:9px;left:11px;color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.04em;text-transform:uppercase; }
  .employee-account-summary>div:nth-child(even) { border-right:0; }
  .employee-account-actions { grid-column:1/-1;min-height:60px!important; }
}
@media(max-width:480px){
  .employee-account-summary { grid-template-columns:1fr; }
  .employee-account-summary>div { border-right:0; }
}
.rental-shared-status{min-width:104px;border:1px solid transparent;border-radius:999px;padding:7px 12px;font:inherit;font-weight:700;cursor:pointer;transition:filter .16s ease,transform .16s ease}
.rental-shared-status:hover:not(:disabled){filter:brightness(.97);transform:translateY(-1px)}
.rental-shared-status:disabled{cursor:default;opacity:.68}
.rental-shared-status.included{background:#e5f5eb;border-color:#9bc9aa;color:#185b34}
.rental-shared-status.excluded{background:#fff0ed;border-color:#e8b4aa;color:#9a2e22}
.rental-shared-excluded td{color:#765b56}
.rental-shared-excluded td:nth-child(5),.rental-shared-excluded td:nth-child(6),.rental-shared-excluded td:nth-child(7){background:#fff7f5}
.rental-shared-tenant-summary th,.rental-shared-tenant-summary td{text-align:left}
.bank-organization-name{min-height:20px}.bank-account-list{display:grid;gap:5px}.bank-account-balance{display:flex;align-items:center;justify-content:space-between;gap:7px;width:100%;min-height:auto;padding:6px 0;border:0;border-bottom:1px solid #e6ede8;border-radius:0;background:transparent;color:inherit;text-align:left}.bank-account-balance:disabled{opacity:1;cursor:default}.bank-account-balance.can-switch{cursor:pointer}.bank-account-balance span{font-size:11px}.bank-account-balance strong{font-size:14px;white-space:nowrap}.bank-organization-total{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:6px}.bank-organization-total strong{font-size:18px}

/* Opening a shift: crew first, then production details and a full comment row. */
.manager-shift-create { container-type: inline-size; padding: 12px; }
.manager-shift-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.manager-shift-crew { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.manager-shift-details { display: grid; grid-template-columns: minmax(180px, 1fr) 150px 96px 220px; gap: 12px; }
.manager-shift-footer { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: end; }
.manager-shift-grid .field { min-width: 0; margin: 0; }
.manager-shift-grid input, .manager-shift-grid select { width: 100%; min-width: 0; min-height: 38px; padding: 8px; border-radius: 8px; }
.manager-shift-reason { grid-column: auto; }
.manager-shift-footer > .primary { width: 100%; min-height: 38px; padding-inline: 8px; }
@container (max-width: 700px) {
  .manager-shift-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #managerShiftSpecies { max-width: 110px; }
}
@container (max-width: 560px) {
  .manager-shift-crew, .manager-shift-details, .manager-shift-footer { grid-template-columns: minmax(0, 1fr); }
  #managerShiftNumber { max-width: 170px; }
  #managerShiftOpenedAt { max-width: 220px; }
}

/* All shift fields share one row in the desktop cabinet. */
@media (min-width: 901px) {
  .manager-shift-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.05fr) minmax(0,.9fr) minmax(0,.55fr) minmax(0,.5fr) minmax(150px,1.35fr) minmax(0,1.4fr) minmax(0,.85fr); gap: 6px; align-items: end; }
  .manager-shift-crew, .manager-shift-details, .manager-shift-footer { display: contents; }
  .manager-shift-grid .field > span { font-size: clamp(10px, 1.05cqi, 12px); line-height: 1.2; }
  .manager-shift-grid input, .manager-shift-grid select { height: 36px; min-height: 36px; padding: 6px 4px; font-size: clamp(10px, 1.05cqi, 12px); }
  #managerShiftCreate .manager-shift-footer > .primary { width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 4px; font-size: clamp(10px, 1.05cqi, 12px); line-height: 1.15; }
  #managerShiftNumber, #managerShiftSpecies, #managerShiftOpenedAt { max-width: none; }
}

.employee-account-filter-toolbar { display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0; }
.employee-account-filter-toolbar > span { color:var(--muted);font-size:13px; }
.employee-account-filters { display:grid;grid-template-columns:minmax(190px,1.3fr) minmax(145px,1fr) minmax(125px,.8fr) minmax(155px,.9fr) minmax(125px,.75fr) minmax(220px,auto);min-width:1080px;background:#f3f7f4;border-bottom:1px solid var(--line); }
.employee-account-filters > label { min-width:0;padding:7px 8px;border-right:1px solid var(--line); }
.employee-account-filters > label > span { display:none; }
.employee-account-filters input,.employee-account-filters select { width:100%;min-width:0;min-height:34px;padding:6px;font-size:12px; }
.employee-account-row[hidden],#accountFiltersEmpty[hidden] { display:none!important; }
@media(max-width:780px){
  .employee-account-filters { min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:12px;border:1px solid var(--line);border-radius:12px; }
  .employee-account-filters > label > span { display:block;font-size:11px;color:var(--muted);margin-bottom:5px; }
}
@media(max-width:480px){.employee-account-filters{grid-template-columns:minmax(0,1fr);}}

.profit-report-detail-card .profit-expense-note { white-space:pre-wrap;overflow-wrap:anywhere;min-width:180px;max-width:380px; }

/* Percentage report: calm typography and aligned comparison tables. */
.percentage-view { font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.5; }
.percentage-view .percentage-panel { padding:20px;margin-bottom:14px;min-width:0; }
.percentage-heading { display:flex;align-items:baseline;justify-content:space-between;gap:12px; }
.percentage-heading h2 { margin:0;font-size:21px;font-weight:600; }
.percentage-heading>span,.percentage-note { color:#596860;font-size:14px;font-weight:400; }
.percentage-view .percentage-note { margin:10px 0 16px;line-height:1.55; }
.percentage-view summary { cursor:pointer;font-size:16px;font-weight:600;padding:2px 0; }
.percentage-view details[open]>summary { margin-bottom:16px; }
.percentage-view .percentage-table { width:100%;border-collapse:collapse;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.45; }
.percentage-view .percentage-table th,.percentage-view .percentage-table td { padding:15px 18px;border-bottom:1px solid #dde5e0;text-align:right;white-space:nowrap;font-weight:400;font-variant-numeric:tabular-nums lining-nums;letter-spacing:normal; }
.percentage-view .percentage-table thead th { background:#f0f4f1;color:#48594f;font-size:13px;font-weight:600;text-transform:none;white-space:normal; }
.percentage-view .percentage-table th:first-child { text-align:left; }
.percentage-view .percentage-table tbody th { font-weight:600;text-transform:none;color:#233b2b; }
.percentage-view .percentage-table tbody tr:nth-child(even) { background:#f8faf9; }
.percentage-view .percentage-table .percentage-position { background:#eaf3ed;color:#173e2b;font-weight:600; }
.percentage-view .percentage-overview { min-width:0; }
.percentage-view .percentage-overview td { font-size:18px; }
.percentage-view .percentage-overview tbody th { font-size:17px; }
.percentage-view .profit-position-leader { font-family:inherit;font-weight:600;font-size:14px;padding:4px 12px; }
.percentage-view .profit-percentage-summary { display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 18px;margin:0;background:#f0f4f1;border-radius:0 0 8px 8px; }
.percentage-view .profit-percentage-summary span { font-weight:400; }
.percentage-view .profit-percentage-summary strong { font-size:20px;font-weight:600;font-variant-numeric:tabular-nums; }
.percentage-view .percentage-payment-details .table-wrap { margin-top:14px; }
.percentage-view .profit-card-actions { margin-top:8px; }
.percentage-view [data-edit-profit-card] { display:block;margin:6px 0 0 auto;font-size:12px;font-weight:400;padding:4px 8px; }
.percentage-view .profit-card-input input { font-weight:400; }
.percentage-view .percentage-months { font-size:14px; }
.percentage-view .percentage-months th,.percentage-view .percentage-months td { padding:12px 16px; }
.percentage-view .percentage-months th:first-child { position:sticky;left:0;background:#fff;z-index:1;box-shadow:1px 0 #dde5e0; }
.percentage-view .percentage-months thead th:first-child { background:#f0f4f1; }
.percentage-view .percentage-months tr:nth-child(even) th:first-child { background:#f8faf9; }
.percentage-view .percentage-months .percentage-emphasis { font-weight:600; }
.percentage-view .percentage-group-start th,.percentage-view .percentage-group-start td { border-top:2px solid #bfcfc4; }
.percentage-history-channels { margin-top:20px; }
@media(max-width:650px) {
 .percentage-heading { display:block; }.percentage-heading>span { display:block;margin-top:4px; }
 .percentage-view .percentage-panel { padding:14px; }
 .percentage-view .percentage-overview thead { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
 .percentage-view .percentage-overview,.percentage-view .percentage-overview tbody,.percentage-view .percentage-overview tr { display:block; }
 .percentage-view .percentage-overview tbody tr { padding:10px 0;border-bottom:1px solid #dde5e0;background:#fff; }
 .percentage-view .percentage-overview tbody th { display:block;padding:8px 10px;border:0; }
 .percentage-view .percentage-overview td { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;font-size:16px;border:0; }
 .percentage-view .percentage-overview td:before { content:attr(data-label);font-size:13px;color:#596860;white-space:normal;text-align:left; }
 .percentage-view .profit-percentage-summary { flex-wrap:wrap;padding:14px 10px; }
}


.percentage-view .profit-report-filter form { flex-wrap:wrap;overflow:visible; }
.percentage-view .profit-report-filter .shift-period-shortcuts { flex:1 1 100%;flex-wrap:wrap; }

/* Dismissed personnel remain readable in both directories and accounts. */
tr.employee-dismissed > td, .employee-account-row.employee-dismissed { background:#fff0f0; }
tr.employee-dismissed > td:first-child, .employee-account-row.employee-dismissed { border-left:3px solid #cc5555; }
tr.employee-dismissed:hover > td { background:#ffe4e4; }
.account-device-row { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:10px 12px; border:1px solid #dce3e9; border-radius:8px; background:#f8fafc; }
.account-device-row > div { min-width:0; }
.account-device-row small { display:block; color:#536270; overflow-wrap:anywhere; }
.account-device-row.blocked { background:#fff0f0; border-color:#e9b6b6; }
.account-device-row button { flex-shrink:0; }
@media(max-width:600px){.account-device-row { flex-wrap:wrap; }.account-device-row button { margin-left:auto; }}

.employee-account-row.employee-dismissed .employee-account-summary { background:#fff0f0; }

.account-device-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-left:auto; }

.registry-counterparty-dialog{border:1px solid #cbd5e1;border-radius:14px;padding:24px;max-width:460px;width:calc(100% - 32px);color:#17263c}.registry-counterparty-dialog::backdrop{background:#14243980}.registry-counterparty-dialog label{display:grid;gap:8px}.registry-counterparty-dialog input{width:100%;box-sizing:border-box;min-height:40px}.registry-counterparty-dialog .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.registry-party-control{box-sizing:border-box;min-width:0;position:relative;padding-right:34px!important}.registry-counterparty-add{position:absolute;right:2px;bottom:4px;min-width:28px!important;width:28px;padding:3px!important;font-size:20px;line-height:24px}.registry-counterparty-add[hidden]{display:none!important}

/* Local cash ledger trial: quiet rows, explicit editing. */
.cash-ledger-preview .cash-planned-expense-table {font-family:Arial,"Segoe UI",sans-serif;line-height:1.4;table-layout:fixed!important;}
.cash-ledger-preview .cash-planned-expense-table th {font-family:inherit;font-size:11px!important;line-height:1.4;letter-spacing:0!important;text-transform:none;white-space:normal;}
.cash-ledger-preview .cash-planned-expense-table td {font-family:inherit;font-size:13px!important;font-weight:400;line-height:1.4;padding:12px 9px!important;vertical-align:middle;}
.cash-ledger-preview .cash-planned-expense-table .money-cell {font-variant-numeric:tabular-nums;font-weight:700!important;white-space:nowrap;}
.cash-ledger-preview .cash-plan-readable:not(.is-editing) .cash-plan-value>:not([data-cash-plan-display]),
.cash-ledger-preview .cash-plan-readable:not(.is-editing) .cash-payment-action {display:none!important;}
.cash-ledger-preview .cash-plan-readable.is-editing [data-cash-plan-display] {display:none!important;}
.cash-ledger-preview .cash-plan-readable [data-cash-plan-display] {overflow-wrap:anywhere;}
.cash-ledger-preview .cash-plan-summary-actions {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.cash-ledger-preview .cash-plan-summary-actions button {padding:7px 10px;font-size:12px;white-space:nowrap;}
.cash-ledger-preview .cash-plan-status {font-size:11px;color:#53675d;white-space:nowrap;}
.cash-ledger-preview .cash-plan-status.is-urgent {color:#a9432b;font-weight:700;}
.cash-ledger-preview .cash-planned-expense-table .cash-action-cell {position:static;box-shadow:none;background:inherit!important;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-action-buttons {display:flex;flex-wrap:wrap;gap:4px;}
.cash-ledger-preview .cash-planned-expense-table .is-editing td {background:#fff8e5!important;}
.cash-ledger-preview .cash-planned-expense-table td:nth-child(2) {white-space:nowrap;font-weight:400!important;}
.cash-ledger-preview .cash-plan-readable [data-cash-plan-display] {font-family:inherit!important;}

/* Align the percentage total with the amount column. */
.percentage-view tfoot.profit-percentage-summary { display:table-footer-group; }
.percentage-view .profit-percentage-summary th,.percentage-view .profit-percentage-summary td { background:#f0f4f1;font-weight:600; }
@media(max-width:650px) {
 .percentage-view tfoot.profit-percentage-summary { display:block; }
 .percentage-view .profit-percentage-summary th,.percentage-view .profit-percentage-summary .percentage-total-empty { display:none; }
}

.registry-counterparty-dialog { position:fixed;inset:0;margin:auto;box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 24px 70px #0004; }

/* Registry: preserve room for amounts and counterparty, group conducting with author. */
.registry-ledger-card .registry-author-action { display:flex;flex-direction:column;align-items:stretch;gap:6px; }
.registry-ledger-card .registry-author-action span { white-space:normal;overflow-wrap:anywhere; }
.registry-ledger-card .registry-author-action button { min-width:0;width:100%;min-height:30px;padding:4px;font-size:11px; }
.registry-ledger-card .registry-payment-action input { width:100%!important;min-width:0!important; }
.registry-ledger-card .registry-planned-table th:nth-child(1),.registry-ledger-card .registry-planned-table td:nth-child(1) { width:3%; }
.registry-ledger-card .registry-planned-table th:nth-child(2),.registry-ledger-card .registry-planned-table td:nth-child(2) { width:9%; }
.registry-ledger-card .registry-planned-table th:nth-child(3),.registry-ledger-card .registry-planned-table td:nth-child(3) { width:9%; }
.registry-ledger-card .registry-planned-table th:nth-child(4),.registry-ledger-card .registry-planned-table td:nth-child(4) { width:7%; }
.registry-ledger-card .registry-planned-table th:nth-child(5),.registry-ledger-card .registry-planned-table td:nth-child(5) { width:13%; }
.registry-ledger-card .registry-planned-table th:nth-child(6),.registry-ledger-card .registry-planned-table td:nth-child(6) { width:5%; }
.registry-ledger-card .registry-planned-table th:nth-child(7),.registry-ledger-card .registry-planned-table td:nth-child(7) { width:8%; }
.registry-ledger-card .registry-planned-table th:nth-child(8),.registry-ledger-card .registry-planned-table td:nth-child(8) { width:6%; }
.registry-ledger-card .registry-planned-table th:nth-child(9),.registry-ledger-card .registry-planned-table td:nth-child(9) { width:7%; }
.registry-ledger-card .registry-planned-table th:nth-child(10),.registry-ledger-card .registry-planned-table td:nth-child(10) { width:7%; }
.registry-ledger-card .registry-planned-table th:nth-child(11),.registry-ledger-card .registry-planned-table td:nth-child(11) { width:10%; }
.registry-ledger-card .registry-planned-table th:nth-child(12),.registry-ledger-card .registry-planned-table td:nth-child(12) { width:10%; }
.registry-ledger-card .registry-planned-table th:nth-child(13),.registry-ledger-card .registry-planned-table td:nth-child(13) { width:6%; }


.payment-plan-form.registry-create-form { min-width:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.6fr) minmax(0,.85fr) minmax(0,1fr) minmax(0,.8fr) minmax(0,1.2fr) 108px 112px;gap:8px; }
.payment-plan-form.registry-create-form>* { min-width:0; }
.payment-plan-form.registry-create-form input,.payment-plan-form.registry-create-form select { min-width:0;width:100%; }
.payment-plan-form.registry-create-form button[type=submit] { min-width:0;white-space:normal; }
.registry-ledger-card .registry-planned-table th { white-space:normal;overflow-wrap:anywhere;text-transform:none;letter-spacing:0;font-size:11px;line-height:1.25;padding:8px 3px; }
.registry-ledger-card .registry-planned-table td { padding:9px 3px; }
.registry-ledger-card .registry-planned-table input[type=date] { padding:4px 1px;font-size:11px; }
.registry-ledger-card td.registry-party-control .registry-counterparty-add { top:50%;bottom:auto;transform:translateY(-50%); }
@media(max-width:1100px) { .payment-plan-form.registry-create-form { grid-template-columns:repeat(3,minmax(0,1fr)); } }

.registry-ledger-card .registry-payment-action { display:block; }
.registry-ledger-card .registry-planned-table input[type=date] { padding:4px 1px!important;font-size:10px!important; }
.registry-ledger-card .registry-planned-table input[type=date]::-webkit-calendar-picker-indicator { width:10px;margin:0;padding:1px; }

/* Planned registry uses the same readable rows as the cash ledger. */
.registry-planned-table { font-family:Arial,"Segoe UI",sans-serif;line-height:1.4;table-layout:auto!important; }
.registry-planned-table th { font-family:inherit;font-size:11px!important;line-height:1.4;letter-spacing:0!important;text-transform:none;white-space:normal; }
.registry-planned-table td { font-family:inherit;font-size:13px!important;font-weight:400;line-height:1.4;padding:12px 9px!important;vertical-align:middle; }
.registry-planned-table th,.registry-planned-table td { width:auto!important; }
.registry-readable:not(.is-editing) [data-registry-value]>:not([data-registry-display]) { display:none!important; }
.registry-readable.is-editing [data-registry-display],.registry-readable.is-editing [data-edit-registry-plan],.registry-readable:not(.is-editing) [data-save-registry-plan],.registry-readable:not(.is-editing) [data-cancel-registry-plan] { display:none!important; }
.registry-readable [data-registry-display] { overflow-wrap:anywhere; }
.registry-ledger-money { font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap; }
.registry-ledger-actions { display:flex;flex-wrap:wrap;gap:4px;margin-top:6px; }
.registry-ledger-actions button { padding:7px 10px;font-size:12px;white-space:nowrap; }
.registry-readable.is-editing td { background:#fff8e5!important; }
.registry-planned-table .registry-planned-action-cell { position:static;box-shadow:none;background:inherit!important; }

.registry-planned-table .registry-ledger-date,.registry-planned-table .registry-ledger-date span { white-space:nowrap!important;font-weight:400!important; }
.registry-planned-table .registry-ledger-date { min-width:86px; }

/* Registry layout: full color control, centered columns, explicit edit actions. */
.registry-ledger-card .registry-planned-table { width:100%;min-width:1280px!important;table-layout:fixed!important;border-collapse:separate;border-spacing:0; }
.registry-ledger-card .registry-planned-table :is(th,td) { box-sizing:border-box;text-align:center!important;vertical-align:middle;padding:8px 5px!important;border-right:1px solid #e0e8e3;border-bottom:1px solid #e4e9e6; }
.registry-ledger-card .registry-planned-table th { background:#eaf1ed;line-height:1.3;overflow-wrap:normal;word-break:normal; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(1) { width:6%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(2) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(3),.registry-ledger-card .registry-planned-table :is(th,td):nth-child(9),.registry-ledger-card .registry-planned-table :is(th,td):nth-child(11),.registry-ledger-card .registry-planned-table :is(th,td):nth-child(12) { width:8%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(4) { width:5%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(5) { width:12%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(6),.registry-ledger-card .registry-planned-table :is(th,td):nth-child(7),.registry-ledger-card .registry-planned-table :is(th,td):nth-child(8),.registry-ledger-card .registry-planned-table :is(th,td):nth-child(10) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(13) { width:10%!important; }
.registry-ledger-card .planned-order-cell { min-width:0;gap:6px;justify-content:center; }
.registry-ledger-card .priority-color-control { transform:none;flex:0 0 20px; }
.registry-ledger-card .registry-ledger-date { min-width:0; }
.registry-ledger-card .registry-ledger-actions { justify-content:center; }
.registry-readable:not(.is-editing) .registry-delete-on-edit { display:none!important; }
.registry-ledger-card .registry-planned-action-cell { text-align:center!important; }
.registry-ledger-card .registry-planned-action-cell>button { margin:4px auto; }
.registry-ledger-card .registry-author-action { align-items:center; }
.registry-ledger-card .registry-planned-table input:not([type=checkbox]),.registry-ledger-card .registry-planned-table select { box-sizing:border-box;max-width:100%;min-width:0!important;width:100%; }
.registry-ledger-card .registry-planned-table input[type=date] { font-size:10px!important;padding:4px 0!important; }
.payment-plan-form.registry-create-form { grid-template-columns:minmax(80px,1fr) minmax(65px,.7fr) minmax(120px,1.5fr) repeat(3,minmax(80px,1fr)) minmax(100px,1.2fr) 105px 105px!important;gap:0;min-width:950px;border:1px solid #d3dfd7;border-radius:8px; }
.payment-plan-form.registry-create-form>label { padding:6px;border-right:1px solid #e0e8e3;margin:0;min-width:0; }
.payment-plan-form.registry-create-form>label>span { display:block;text-align:center; }
.payment-plan-form.registry-create-form>button { margin:6px;align-self:end; }

.payment-plan-form.registry-create-form :is(input,select,.readable-number-input) { width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box; }
.registry-ledger-card .registry-planned-table th { white-space:normal!important;overflow-wrap:normal!important; }
.registry-ledger-card .registry-planned-table td>button { max-width:100%;white-space:normal; }

.presence-group{display:flex;gap:4px;background:transparent;border:0;padding:0;cursor:pointer}.presence-avatar{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:#deeee5;color:#174b35;border:2px solid #fff;font:600 11px Arial;box-shadow:0 0 0 1px #8dbda1}.presence-dialog{position:fixed;inset:0;margin:auto;border:1px solid #cbd8cf;border-radius:14px;padding:22px;max-width:440px;width:calc(100% - 32px);max-height:75vh;overflow:auto}.presence-dialog::backdrop{background:#14243970}.presence-dialog>button{display:block;margin:16px 0 0 auto}.topbar-actions{flex-wrap:wrap;justify-content:flex-end}.topbar{gap:10px}.topbar h1{min-width:0}@media(max-width:650px){.presence-avatar{width:24px;height:24px;font-size:10px}}

.cash-metric-link{cursor:pointer}.cash-metric-link:hover{box-shadow:0 0 0 2px #8dbda1}.cash-metric-link:focus-visible{outline:3px solid #28734e;outline-offset:2px}.cash-planned-card{scroll-margin-top:90px}.cash-receipt-summary{position:fixed;inset:0;margin:auto;border:1px solid #cbd8cf;border-radius:14px;padding:22px;width:min(650px,calc(100% - 32px));max-height:80vh;overflow:auto;box-sizing:border-box}.cash-receipt-summary::backdrop{background:#14243970}.cash-receipt-summary p{font-size:13px;color:#53675d}.cash-receipt-summary table{width:100%;min-width:0}.cash-receipt-summary td:last-child{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}.cash-receipt-summary th:first-child{text-align:left}.cash-receipt-summary button{display:block;margin:16px 0 0 auto}

/* Compact advance dialog: it is a standalone form, not a cash-table row. */
.cash-receipt-summary:has(.cash-advance-form){width:min(600px,calc(100% - 32px));padding:20px;overflow-x:hidden;}
.cash-advance-form{display:grid;gap:14px;}
.cash-advance-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;}
.cash-advance-form-head h2{margin:0;}
.cash-advance-form-head p{margin:6px 0 0;line-height:1.4;}
.cash-advance-form .cash-advance-close{display:grid;place-items:center;flex:0 0 36px;width:36px;min-height:36px;margin:0;padding:0;font-size:22px;line-height:1;}
.cash-advance-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 16px;align-items:end;}
.cash-advance-grid label{display:grid;gap:6px;min-width:0;margin:0;}
.cash-advance-grid label>span{color:var(--muted);font-size:12px;font-weight:900;}
.cash-advance-grid input,.cash-advance-grid select{width:100%;min-width:0;min-height:40px;padding:8px 10px;border-radius:9px;}
.cash-advance-grid .cash-advance-date input,.cash-advance-grid .cash-advance-amount input{width:150px;}
.cash-advance-grid .cash-advance-note{grid-column:1 / -1;}
.cash-advance-validation{margin:0!important;color:#a43b3b!important;font-size:12px!important;font-weight:800;}
.cash-advance-actions{justify-content:flex-end;padding-top:14px;border-top:1px solid #e5e9e6;}
.cash-advance-actions button{display:block;margin:0!important;}
.cash-advance-confirmation{width:min(430px,calc(100% - 32px));margin:auto;border:0;border-radius:18px;padding:24px;background:#fff;box-shadow:0 24px 70px #0006;box-sizing:border-box;}
.cash-advance-confirmation::backdrop{background:rgba(9,24,18,.58);backdrop-filter:blur(3px);}
.cash-advance-confirmation h2{margin:0 0 10px;}
.cash-advance-confirmation p{margin:0 0 22px;color:var(--muted);font-size:16px;line-height:1.4;}
.cash-advance-confirmation .actions{justify-content:flex-end;}
.cash-advance-confirmation button{margin:0!important;}
@media(max-width:600px){.cash-receipt-summary:has(.cash-advance-form){width:calc(100% - 24px);max-height:calc(100vh - 24px);padding:18px;}.cash-advance-grid{grid-template-columns:1fr;gap:12px;}.cash-advance-grid .cash-advance-note{grid-column:auto;}.cash-advance-grid .cash-advance-date input,.cash-advance-grid .cash-advance-amount input{width:100%;}.cash-advance-actions{position:sticky;bottom:-18px;background:#fff;padding:14px 0 2px;}}

/* One column model for planned cash expenses; headers and editable rows share it. */
.cash-ledger-preview .cash-planned-expense-table { table-layout:fixed!important;width:100%;max-width:1400px;min-width:1280px!important;border-spacing:0; }
.cash-ledger-preview .cash-planned-expense-table :is(th,td) { width:auto;box-sizing:border-box;padding:8px 5px!important;text-align:left;vertical-align:middle; }
.cash-ledger-preview .cash-planned-expense-table th { white-space:normal;overflow-wrap:normal;word-break:normal; }
.cash-ledger-preview .cash-planned-expense-table td { white-space:normal;overflow-wrap:anywhere; }
.cash-ledger-preview .cash-planned-expense-table td:nth-child(2),.cash-ledger-preview .cash-planned-expense-table td:nth-child(3) { white-space:nowrap; }
.cash-ledger-preview .cash-planned-expense-table .planned-order-cell { min-width:0;gap:4px; }
.cash-ledger-preview .cash-planned-expense-table .cash-plan-summary-actions { gap:6px;justify-content:flex-start;flex-wrap:wrap; }
.cash-ledger-preview .cash-planned-expense-table :is(input,select) { box-sizing:border-box;width:100%;max-width:100%;min-width:0!important; }
.cash-ledger-preview .cash-planned-expense-table button { max-width:100%;white-space:normal; }
.cash-ledger-preview .cash-planned-expense-table .cash-plan-action-buttons { justify-content:flex-start; }
.cash-planned-card>.table-wrap { overflow-x:auto; }

.cash-ledger-preview .cash-planned-expense-table .cash-payment-action { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px; }
.cash-ledger-preview .cash-planned-expense-table .cash-plan-action-buttons { grid-column:1 / -1;display:flex;flex-wrap:wrap;width:100%;min-width:0; }
.cash-ledger-preview .cash-planned-expense-table .cash-plan-action-buttons button { flex:1 1 75px;min-width:0; }

/* Product names and specification actions remain inside their cells. */
.drum-costing-table th:nth-child(2),.drum-costing-table.editing-mode th:nth-child(2) { width:110px; }
.drum-product-unit { display:block;margin-top:3px;color:var(--muted);font-size:11px; }
.drum-specifications-table td:last-child button { width:180px;max-width:100%;min-width:0;white-space:normal;line-height:1.3;text-align:center; }
.drum-specifications-table th:last-child,.drum-specifications-table td:last-child { width:200px;text-align:center; }
.drum-spec-position > :nth-child(2) { min-width:0;white-space:normal;overflow-wrap:anywhere; }
.drum-costing-create #newDrumSalesUnit { margin-top:4px;font-size:11px;min-width:0;width:100%; }

.drum-specification-line [data-product-unit] { position:relative; }
.drum-specification-line [data-product-unit]::after { content:attr(data-product-unit);position:absolute;right:8px;bottom:11px;font-size:11px;color:var(--muted);pointer-events:none; }
.drum-specification-line [data-product-unit] .readable-number-input { padding-right:30px; }

/* Approval and execution are distinct steps. */
.registry-planned-table .conduct-payment-button.ready { background:#ffcf63;color:#593c00;border-color:#e2ae38; }
.registry-planned-table .payment-approval-button.approved,.registry-planned-table .badge.green { background:#dff2e5;color:#176738; }
.registry-waiting { display:block;color:#79847d;font-size:11px;line-height:1.3;text-align:center; }
.registry-author-action { display:flex;flex-direction:column;align-items:center;gap:6px; }

/* Payment controls stay in the existing final column; earlier columns are unchanged. */
.cash-ledger-preview .cash-plan-readable:not(.is-editing) .cash-payment-action {display:grid!important;}
.cash-ledger-preview .cash-planned-expense-table .cash-payment-action label {display:grid;gap:4px;min-width:0;font-size:10px;line-height:1.25;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-confirm {grid-column:1 / -1;}
.cash-ledger-preview .cash-plan-readable:not(.is-editing) .cash-plan-action-buttons {display:none!important;}
.cash-ledger-preview .cash-plan-readable.is-editing .cash-payment-action>label,
.cash-ledger-preview .cash-plan-readable.is-editing .cash-plan-confirm {display:none!important;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-action-buttons {flex-wrap:nowrap;gap:3px;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-action-buttons button {flex:1 1 0;padding:7px 3px;font-size:10px;white-space:nowrap;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-summary-actions {margin-top:7px;}

/* One horizontal payment row, extending to the right edge. */
.cash-planned-card>.table-wrap {container-type:inline-size;}
.cash-ledger-preview .cash-planned-expense-table {max-width:none;min-width:calc(1285px + clamp(180px,calc(100cqw - 1100px),300px))!important;}
.cash-ledger-preview .cash-planned-expense-table col:nth-child(9) {width:clamp(180px,calc(100cqw - 1100px),300px);}
.cash-ledger-preview .cash-planned-expense-table col:last-child {width:auto!important;}
.cash-payment-inline,.cash-payment-inline-head {display:grid;grid-template-columns:minmax(100px,1fr) 85px 90px 76px;gap:6px;align-items:center;}
.cash-ledger-preview .cash-plan-readable:not(.is-editing) .cash-payment-action,
.cash-ledger-preview .cash-plan-readable:not(.is-editing) .cash-plan-summary-actions {display:contents!important;}
.cash-ledger-preview .cash-planned-expense-table .cash-payment-action label>span,
.cash-ledger-preview .cash-payment-inline .cash-plan-status {display:none;}
.cash-ledger-preview .cash-payment-inline .cash-plan-confirm {grid-column:auto;}
.cash-ledger-preview .cash-payment-inline :is(input,select,button) {height:34px;min-height:34px;margin:0;box-sizing:border-box;}
.cash-ledger-preview .cash-payment-inline button {white-space:nowrap;font-size:11px;padding:6px!important;}
.cash-ledger-preview .cash-plan-readable.is-editing .cash-payment-action {grid-column:1 / -1;display:block;}
.cash-ledger-preview .cash-payment-inline-head {text-align:center;}

/* Linked electricity meter: keep the deduction visible in the directory. */
.rental-meters-table tr.rental-meter-deduction > td { background: #fff4ce; }
.rental-deduction-note { display:block; margin-top:4px; color:#795500; font-size:12px; line-height:1.35; white-space:normal; }

/* Continue the ledger stripe through the payment controls. */
.cash-ledger-preview .cash-planned-expense-table .cash-plan-readable:not(.is-editing):nth-child(odd) > .cash-action-cell {background:#fbfdfb!important;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-readable:not(.is-editing):nth-child(even) > .cash-action-cell {background:#f0f5f2!important;}
.cash-ledger-preview .cash-planned-expense-table .cash-plan-readable:not(.is-editing):hover > .cash-action-cell {background:#e8f2ec!important;}
.cash-ledger-preview .cash-planned-expense-table thead .cash-action-cell {background:#e6efe9!important;}

/* Palettes use the browser top layer, outside table clipping and stacking. */
.priority-color-palette[popover] { position:fixed;inset:auto;margin:0;transform:none; }
.payment-analytic[data-registry-summary] { cursor:pointer;text-align:left;font:inherit;width:100%; }
.payment-analytic[data-registry-summary]:hover,.payment-analytic[data-registry-summary]:focus-visible { outline:2px solid var(--gold,#b68b39);outline-offset:2px; }
.priority-color-palette[popover]:not(:popover-open) { display:none!important; }

/* Compact master summaries: two balanced cards, shared metric headings. */
.master-performance-list { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start; }
.master-performance-card { min-width:0;padding:10px 12px;border-radius:12px; }
.master-performance-title { gap:8px;margin-bottom:7px;flex-wrap:wrap; }
.master-performance-title small { font-size:11px;letter-spacing:0; }
.master-performance-title .master-name-button { min-height:0;font-family:Arial,sans-serif;font-size:18px;font-weight:600;line-height:1.25;overflow-wrap:anywhere;text-align:left; }
.master-performance-table-wrap { overflow-x:auto; }
.master-yield-summary .master-performance-table { width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;font-family:Arial,sans-serif;font-variant-numeric:tabular-nums; }
.master-performance-table th,.master-performance-table td { padding:5px 4px;line-height:1.2;text-align:right;font-size:14px; }
.master-performance-table thead th { font-size:12px;font-weight:600;white-space:normal;text-transform:none;letter-spacing:0; }
.master-performance-table th:first-child { text-align:left;width:14%; }
.master-performance-table tbody th { font-weight:400; }
.master-performance-table .master-total th,.master-performance-table .master-total td { font-weight:700;background:#f4f0e4;border-top:1px solid #d6bc71; }
.master-performance-card:has(.master-shift-details) { grid-column:1 / -1; }
@media(max-width:1100px){.master-performance-list { grid-template-columns:minmax(0,1fr); }}
@media(max-width:480px){.master-performance-card { padding:8px; }.master-performance-table th,.master-performance-table td { font-size:12px;padding:5px 2px; }.master-performance-table thead th { font-size:10px; }}

/* Keep the native date control inside its own payroll column. */

.payroll-payment-form input,.payroll-payment-form select { min-width:0;max-width:100%;box-sizing:border-box; }


.payroll-payment-form { grid-template-columns:144px minmax(170px,1.15fr) 112px minmax(140px,1fr) 100px minmax(130px,1fr) 70px;min-width:930px;gap:8px; }
.customer-allocation-select { display:block;width:200px!important;min-width:0!important;max-width:100%;height:34px;min-height:34px!important;padding:5px 7px!important;margin-top:5px;font-size:12px; }
.payroll-payment-form .payroll-payment-button { min-width:0;width:100%;padding:8px;font-size:13px;box-sizing:border-box; }
.payroll-payment-form .payroll-balance-box { min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.2; }

#shiftDateForm { display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:14px; }
#shiftDateForm .field { flex:0 0 160px;min-width:0; }
#shiftDateForm input { box-sizing:border-box;width:100%;min-width:0; }

.cash-balance-metric[role=button]{cursor:pointer}.cash-balance-metric:focus-visible{outline:2px solid #28745b;outline-offset:3px}
.cash-transfer-dialog,.cash-transfer-confirm{width:min(440px,calc(100vw - 32px));max-height:90vh;overflow:auto;border:0;border-radius:16px;padding:24px}.cash-transfer-dialog::backdrop,.cash-transfer-confirm::backdrop{background:#0006}.cash-transfer-dialog form{display:grid;gap:12px}.cash-transfer-dialog label{display:grid;gap:6px}.cash-transfer-dialog input,.cash-transfer-dialog select{width:100%;min-width:0}.cash-transfer-dialog [data-error]{color:#a02828}.cash-transfer-dialog p{margin:4px 0}.cash-transfer-dialog details{margin-top:16px}

/* Compact rental overview; property and tenant tables keep their existing layout. */
.rental-dashboard-period.card { padding:12px 16px;margin-bottom:14px; }
.rental-dashboard-period .accounting-period-controls { max-width:none;width:100%; }
.rental-dashboard-period form { display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px; }
.rental-dashboard-period .field { flex:0 1 156px;min-width:140px;margin:0;gap:4px; }
.rental-dashboard-period input,.rental-dashboard-period button { min-height:34px;padding:6px 10px;font-size:13px; }
.rental-dashboard-period .dashboard-period-shortcuts { margin:0;gap:5px;flex-wrap:wrap; }
.rental-dashboard-period .accounting-period-controls > small { margin-top:6px;font-size:12px; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) { margin-bottom:14px; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .species-dashboard-title { margin:0 0 6px 2px;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .species-dashboard-title p { font-size:12px; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .species-dashboard-title h2 { margin:0;font-size:17px;line-height:1.3; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .metric-grid { gap:8px; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .metric { min-height:0;padding:10px 12px;border-radius:10px; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .metric strong { margin-top:4px;font-size:21px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
:is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .metric small { margin-top:4px;font-size:12px;line-height:1.3; }
.rental-utility-dashboard .metric-value-row { margin-top:4px;padding-top:4px;gap:6px;align-items:baseline; }
.rental-utility-dashboard .metric-value-row strong { margin:0;font-size:17px; }
.rental-utility-dashboard .metric-value-row small { margin:0; }
@media(max-width:1100px) {
 :is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:480px) {
 :is(.rental-total-dashboard,.rental-utility-dashboard,.rental-area-dashboard) .metric-grid { grid-template-columns:minmax(0,1fr); }
 .rental-dashboard-period .field { flex:1 1 140px; }
}

.bank-registry-dialog{width:min(680px,calc(100vw - 32px));max-height:85vh;overflow:auto;border:0;border-radius:16px;padding:24px}.bank-registry-dialog::backdrop{background:#0006}.bank-registry-option{display:block;padding:12px;margin:10px 0;border:1px solid #dce3df;border-radius:8px}.bank-registry-option input[type=radio]{width:auto}.bank-registry-option p{margin:5px 0;overflow-wrap:anywhere}.bank-registry-dialog button{margin:8px 8px 0 0}

.rental-payment-dialog { width:min(760px,calc(100vw - 24px));max-height:88vh;overflow:auto;padding:20px;border:1px solid #c9d7cf;border-radius:14px;color:#20382b; }
.rental-payment-dialog::backdrop {background:#15251e77;}
.rental-payment-dialog table {width:100%;min-width:0;table-layout:fixed;}
.rental-payment-dialog th,.rental-payment-dialog td {white-space:normal;overflow-wrap:anywhere;padding:8px;text-align:left;}
.rental-payment-dialog input {width:100%;min-width:0;}
.rental-payment-dialog .actions {display:flex;gap:8px;flex-wrap:wrap;}
.rental-payment-dialog [data-rental-error] {color:#a12828;}
.rental-settlement-line {padding:10px 0;border-bottom:1px solid #d9e2dc;}
.rental-settlement-line small {display:block;margin-top:4px;}

/* Rental ending balance: one aligned total and a compact read-only breakdown. */
.rental-dashboard-tenants .rental-debt-link { width:100%; padding:6px 2px; border:0; background:transparent; color:inherit; font:inherit; font-variant-numeric:tabular-nums; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.rental-dashboard-tenants .rental-debt-link:hover { background:#e7eee8; border-radius:5px; }
.rental-dashboard-tenants .rental-debt-link:focus-visible { outline:2px solid #28714b; outline-offset:-2px; }
.rental-dashboard-tenants tfoot th { padding:12px 8px; background:#e8f0e9; border-top:2px solid #bbcebe; font-variant-numeric:tabular-nums; }
.rental-dashboard-tenants tfoot small { display:block; font-weight:400; }
.rental-debt-dialog h2 { margin-top:0; }
.rental-debt-dialog th:first-child { width:29%; }
.rental-debt-dialog th:last-child { width:29%; }
.rental-debt-dialog td:last-child,.rental-debt-dialog th:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.rental-debt-dialog tfoot th { background:#e8f0e9; border-top:2px solid #bbcebe; }
.rental-debt-dialog tfoot th:first-child { text-align:left; }
.rental-debt-dialog .actions { margin-top:16px; justify-content:flex-end; }

@media(max-width:520px) {
  .rental-debt-dialog { padding:16px; }
  .rental-debt-dialog table { font-size:14px; }
  .rental-debt-dialog th:first-child { width:26%; }
  .rental-debt-dialog th:last-child { width:32%; }
}

/* Rental report: keep the same spacing and alignment as the property table. */
.rental-summary-card .card-head { flex-wrap:wrap; }
.rental-summary-card .card-head small { color:var(--muted); }
.rental-summary-table { width:100%; min-width:880px; table-layout:fixed; }
.rental-summary-table th,.rental-summary-table td { padding:11px 10px; text-align:center; vertical-align:middle; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
.rental-summary-table thead th { white-space:normal; }
.rental-summary-table tbody td { white-space:nowrap; }
.rental-summary-table th:first-child,.rental-summary-table td:first-child { text-align:left; }
.rental-summary-table small { display:block; margin-top:4px; font-size:12px; font-weight:400; color:var(--muted); line-height:1.35; white-space:normal; }
.rental-summary-table .rental-summary-total { background:#eef4f0; }
.rental-resources-table { min-width:1120px; table-layout:auto; }
.rental-resources-table thead tr:first-child th { border-bottom:1px solid #cbd8cf; }
.rental-resources-table thead tr:nth-child(2) th { text-align:center; }
.rental-resources-table tbody th { min-width:180px; text-align:left; font-size:14px; text-transform:none; letter-spacing:0; }
.rental-resources-table tbody td { min-width:118px; }
.rental-resources-table tbody td:last-child { min-width:90px; }
.rental-resources-table tbody td:nth-child(2),.rental-resources-table tbody td:nth-child(4),.rental-resources-table tbody td:nth-child(6),.rental-resources-table tbody td:nth-child(8) { border-left:1px solid #e5e9e6; }
.rental-summary-table .positive { color:#196039; }
.rental-summary-table .negative { color:var(--red); }

.warehouse-stocks-page > .warehouse-species-switch { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:480px;box-sizing:border-box; }
.warehouse-stocks-page > .warehouse-species-switch button { min-width:0;white-space:normal; }

/* Each product occupies one real row: all progress values stay aligned. */
.production-position-table { table-layout: fixed; min-width: 1160px; }
.production-position-table th, .production-position-table td { width: auto !important; text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
.production-position-table th:nth-child(3), .production-position-table td:nth-child(3) { width: 170px !important; text-align: left; }
.production-position-table th:nth-child(2), .production-position-table td:nth-child(2) { width: 140px !important; }
.production-position-table .drum-production-total th, .production-position-table .drum-production-total td { background: #e6eee8; font-weight: 700; border-top: 2px solid #b7cbbd; border-bottom: 2px solid #b7cbbd; }
.production-position-table .drum-production-total th { text-align: left; }


.production-position-table thead th { overflow-wrap: normal; word-break: normal; font-size: 11px; }

.drum-buyers-summary{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.drum-buyers-summary th,.drum-buyers-summary td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}.drum-buyers-summary th:first-child{width:32%;text-align:left;white-space:normal;overflow-wrap:anywhere}.drum-buyers-summary tbody th{font-size:14px;letter-spacing:0;text-transform:none}.drum-buyers-summary tfoot{font-weight:800;background:#edf3ef}.drum-buyers-summary tbody tr:nth-child(even){background:#f6f9f7}.drum-overview .drum-overview-metrics .metric strong{font-size:clamp(18px,1.7vw,25px);white-space:normal;overflow-wrap:anywhere}

.drum-overview .drum-overview-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}.drum-buyers-summary small{display:block;max-width:180px;white-space:normal}.drum-buyers-summary{min-width:860px}@media(max-width:1100px){.drum-overview .drum-overview-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:640px){.drum-overview .drum-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.warehouse-shop-lumber-only .warehouse-stocks-totals, .warehouse-shop-lumber-only .warehouse-stock-metrics { grid-template-columns:minmax(0,1fr); }

.warehouse-shop-balance { display:grid;gap:10px;padding:16px 0 4px; }
.warehouse-shop-balance > span { color:var(--muted); }
.warehouse-shop-balance > strong { font-size:28px;overflow-wrap:anywhere; }

/* Keep the name and unit inside the existing first costing column. */
.drum-costing-create .field:has(> #newDrumReferenceName) { display:grid; grid-template-columns:minmax(0,1fr) 98px; column-gap:5px; align-items:center; }
.drum-costing-create .field:has(> #newDrumReferenceName) > span { grid-column:1 / -1; }
.drum-costing-create #newDrumReferenceName { min-width:0; width:100%; }
.drum-costing-create #newDrumSalesUnit { margin:0; width:98px; min-width:0; height:38px; min-height:38px; padding:5px 2px; font-size:10px; }
.party-directory-filters { display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:16px; }
.party-directory-filters > .field { flex:1 1 170px;min-width:0; }
.party-directory-filters > fieldset { flex:3 1 420px; }
.party-directory-filters .buyer-category-grid { display:flex;flex-wrap:wrap; }
.party-directory-filters .buyer-category-grid label { white-space:normal; }

.supplier-directory-form { display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr) auto;align-items:end;gap:12px; }
.supplier-directory-form .buyer-category-grid { display:flex;flex-wrap:wrap; }
@media(max-width:900px) { .supplier-directory-form { grid-template-columns:1fr; } }

/* Buyer creation: a single compact desktop row, stretch-only underweight. */
#buyerCreate { grid-template-columns:minmax(150px,1fr) minmax(0,3fr) auto;gap:10px; }
#buyerCreate:has(#newBuyerUnderweightField:not([hidden])) { grid-template-columns:minmax(150px,1fr) minmax(0,3fr) 100px auto; }
#buyerCreate .buyer-category-field { padding:4px 6px 6px; }
#buyerCreate .buyer-category-grid { display:flex;flex-wrap:nowrap;gap:4px; }
#buyerCreate .buyer-category-grid label { padding:4px 5px;min-height:30px;font-size:12px;gap:4px; }
#buyerCreate .buyer-category-grid input { min-height:16px;width:16px;flex:0 0 16px; }
#buyerCreate > button { align-self:end; }
#newBuyerUnderweightField[hidden] { display:none; }
@media(max-width:1100px) {
  #buyerCreate, #buyerCreate:has(#newBuyerUnderweightField:not([hidden])) { grid-template-columns:1fr; }
  #buyerCreate .buyer-category-grid { flex-wrap:wrap; }
}

#buyerCreate > .field { margin:0; }

.account-production-access { display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;padding:10px 0; }
.account-production-switches { display:flex;flex-wrap:wrap;gap:10px 18px; }
.production-switch { position:relative;display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:700; }
.production-switch input { position:absolute;z-index:1;opacity:0;width:38px;height:24px;min-height:0;margin:0; }
.production-switch-track { width:38px;height:22px;border-radius:12px;background:#a4aea8;border:1px solid #89968e;position:relative;flex:none; }
.production-switch-track::after { content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:white;transition:transform .12s; }
.production-switch input:checked + .production-switch-track { background:var(--green);border-color:var(--green); }
.production-switch input:checked + .production-switch-track::after { transform:translateX(16px); }
.production-switch input:focus-visible + .production-switch-track { outline:2px solid var(--gold);outline-offset:3px; }
.production-switch:has(input:disabled) { opacity:.6;cursor:wait; }

/* Column filters retain ledger widths and do not change row positions. */
.ledger-column-filtered thead tr[data-ledger-filters] th{padding:4px!important;vertical-align:middle}
.ledger-column-filtered [data-ledger-filters] input{width:100%;min-width:0;max-width:100%;height:28px;box-sizing:border-box;padding:3px 5px;font-size:11px}
.ledger-column-filtered tbody tr[hidden]{display:none!important}
.ledger-column-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0;font-size:12px;color:#64748b}
.ledger-column-filter-summary button{font-size:12px;padding:4px 8px;min-height:28px}

.bank-split-dialog{width:min(1560px,calc(100vw - 24px));max-height:92vh;border:0;border-radius:16px;padding:16px;color:#173c30;overflow:auto}.bank-split-dialog::backdrop{background:#10251c88}.bank-split-dialog h2{margin:0 0 6px;font-size:21px}.bank-split-dialog header p{margin:0 0 6px;font-size:13px;overflow-wrap:anywhere}.bank-split-dialog fieldset{min-width:0;border:1px solid #dbe4df;border-radius:10px;margin:7px 0;padding:8px;overflow-x:auto}.bank-split-dialog legend{font-size:12px}.bank-split-dialog .bank-split-grid{display:grid;grid-template-columns:minmax(140px,.85fr) minmax(195px,1.2fr) minmax(140px,.85fr) 118px minmax(200px,1.15fr) minmax(300px,1.7fr) max-content!important;gap:8px;align-items:end;min-width:1250px}.bank-split-grid label{display:grid;gap:3px;min-width:0;font-size:12px}.bank-split-grid input,.bank-split-grid select{width:100%;min-width:0;height:38px;box-sizing:border-box}.bank-split-remove{height:38px;white-space:nowrap;align-self:end}.bank-split-remove-spacer{width:105px}.bank-split-dialog footer{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.bank-split-error{color:#a52a21}.bank-split-open{margin-top:6px}.bank-split-dialog input[readonly]{background:#f1f5f2;font-weight:700}@media(max-width:700px){.bank-split-dialog{padding:12px}}

/* Highlight the approved partial amount at payment. */
.registry-planned-table td.registry-payment-reduced { background:#fff0c2!important;box-shadow:inset 3px 0 #b77900;color:#714600; }
.registry-planned-table .registry-payment-reduced .registry-ledger-money,.registry-planned-table .registry-payment-reduced>strong { color:#714600;font-weight:800; }
.registry-planned-table .registry-payment-reduced::after { content:attr(data-payment-warning);display:block;margin-top:5px;color:#714600;font-size:11px;font-weight:700;line-height:1.3;white-space:normal; }

.registry-invoice{min-width:100px}.registry-invoice small{display:block;font-size:11px;white-space:normal;margin-top:5px}.registry-invoice button{min-height:36px}

/* Invoice column keeps every ledger action inside its own visible cell. */
.registry-ledger-card .registry-planned-table { min-width:1400px!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(1) { width:5%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(2) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(3) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(4) { width:5%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(5) { width:11%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(6) { width:6%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(7) { width:6%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(8) { width:6%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(9) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(10) { width:8%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(11) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(12) { width:7%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(13) { width:8%!important; }
.registry-ledger-card .registry-planned-table :is(th,td):nth-child(14) { width:10%!important; }

/* The standalone iPhone status bar is outside the page's usable content area. */
@media (display-mode:standalone) {
 body { padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px); }
 .sidebar { top:env(safe-area-inset-top,0px);height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); }
 .topbar { top:env(safe-area-inset-top,0px); }
 .login-page { min-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); }
}

.inventory-report-filter{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:18px}.inventory-report-filter .field{margin:0}.inventory-report-filter .shift-period-shortcuts{flex-basis:100%}.inventory-day{border:1px solid var(--line,#d8ded9);border-radius:12px;margin:12px 0;overflow:hidden}.inventory-day>summary{padding:14px;cursor:pointer;overflow-wrap:anywhere}.inventory-day>summary>span,.inventory-day>summary>small{display:block;margin-top:6px}.inventory-day>summary>small{color:var(--muted,#66736d)}

button.inventory-discrepancy-metric{width:100%;font:inherit;text-align:left;cursor:pointer}button.inventory-discrepancy-metric:hover{border-color:#47765b}button.inventory-discrepancy-metric:focus-visible{outline:3px solid #f4bf4f;outline-offset:2px}.inventory-discrepancy-metric em{font-size:12px;font-style:normal;text-decoration:underline}.inventory-detail-dialog{width:min(1050px,calc(100vw - 24px));max-width:none;max-height:90dvh;padding:0;border:1px solid #d8ded9;border-radius:16px;color:#17211d;background:#fff}.inventory-detail-dialog::backdrop{background:#071b16a6}.inventory-detail-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid #d8ded9}.inventory-detail-dialog h2{margin:0;font-size:20px}.inventory-detail-dialog [data-inventory-close]{min-width:44px;min-height:44px;font-size:24px}.inventory-detail-body{padding:20px;overflow:auto}.inventory-detail-dialog .inventory-history-summary{grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr))}.inventory-detail-dialog .inventory-history-detail-head{flex-wrap:wrap}.inventory-detail-dialog table{min-width:0;width:100%;font-variant-numeric:tabular-nums}.inventory-detail-dialog th,.inventory-detail-dialog td{white-space:nowrap}.inventory-detail-dialog tfoot{font-weight:800;background:#f3f7f4}@media(max-width:500px){.inventory-detail-body{padding:12px}.inventory-detail-dialog>header{padding:12px}.inventory-detail-dialog h2{font-size:18px}}

@media(max-width:500px){.inventory-detail-dialog [data-inventory-discrepancy-table]{font-size:12px}.inventory-detail-dialog [data-inventory-discrepancy-table] th,.inventory-detail-dialog [data-inventory-discrepancy-table] td{padding:8px 4px;white-space:normal;overflow-wrap:anywhere}.inventory-detail-dialog [data-inventory-discrepancy-table] th{font-size:10px}}

/* Keep the multiline invoice note inside its column while editing. */
.registry-ledger-card .registry-planned-table textarea.registry-note-input { box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;min-height:120px!important;resize:vertical;font:inherit;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere; }
.registry-ledger-card .registry-planned-table:has(tr.is-editing textarea[data-registry-note]) :is(th,td):nth-child(9) { width:300px!important; }

/* Drum report: buyer totals and accessible drill-down. */
.drum-report-metric h3{font-size:14px;min-height:38px;margin:0 0 12px}
.drum-report-metric-value{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;padding:10px 4px;background:transparent;border:0;border-top:1px solid #dbe4de;text-align:left;color:inherit;cursor:pointer;border-radius:0}
.drum-report-metric-value span{font-size:12px}.drum-report-metric-value strong{font-size:16px;white-space:nowrap}
.drum-report-metric-value:hover{background:#eef5ee}.drum-report-metric-value:focus-visible{outline:2px solid #b78210;outline-offset:2px}
.drum-report-metric-value[data-drum-buyer="all"]{font-weight:700}.drum-report-metric-value[data-drum-buyer="all"] strong{font-size:19px}
.drum-report-dialog{width:min(1120px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid #cbd8ce;border-radius:18px;color:#17342a;background:#fff;box-sizing:border-box}
.drum-report-dialog::backdrop{background:#102a20a6}.drum-report-dialog header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.drum-report-dialog h2{margin:0}.drum-report-groups{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.drum-report-detail-total{display:flex;justify-content:space-between;gap:16px;padding:16px;background:#eff5ef;border-radius:10px}.drum-report-detail-total strong{font-size:22px}
.drum-report-spec{padding:14px 0;border-top:1px solid #dbe4de}.drum-report-spec>summary{cursor:pointer;line-height:1.7}.drum-report-spec>summary>span{float:right;font-weight:700}.drum-report-dialog table{min-width:800px;width:100%}.drum-report-dialog th,.drum-report-dialog td{padding:10px;text-align:left}
@media(max-width:700px){.drum-overview-metrics{grid-template-columns:1fr!important}.drum-report-dialog{width:calc(100vw - 16px);padding:14px;max-height:calc(100dvh - 16px)}.drum-report-dialog header{flex-wrap:wrap}.drum-report-spec>summary>span{display:block;float:none}.drum-report-metric h3{min-height:0}.drum-report-dialog .table-wrap{overflow:auto}}

.drum-report-table-value{background:transparent;border:0;padding:8px 0;color:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}.drum-report-table-value:focus-visible{outline:2px solid #b78210}.drum-report-metric-value{flex-wrap:wrap}.drum-report-metric-value strong{font-size:clamp(14px,1.15vw,18px)}.drum-report-metric-value[data-drum-buyer='all'] strong{font-size:clamp(16px,1.3vw,20px)}

/* Stretch: keep the three VAT totals readable on phone screens. */
#stretchVatSummary{min-width:0;width:100%;table-layout:fixed;font-variant-numeric:tabular-nums}
#stretchVatSummary th,#stretchVatSummary td{width:auto;padding:12px 8px;white-space:normal;overflow-wrap:anywhere;text-align:right}
#stretchVatSummary th:first-child{width:34%;text-align:left}
#stretchVatSummary tbody th{font-size:13px;letter-spacing:0;text-transform:none}
#stretchVatSummary [data-stretch-summary="profitRub"]{font-weight:800;background:#edf3ef}
#stretchVatSummary:has([data-vat-group="unclassified"]){min-width:560px}
@media(max-width:500px){#stretchVatSummary th,#stretchVatSummary td{padding:9px 4px;font-size:12px}#stretchVatSummary thead th{font-size:11px}}
.warehouse-type-picker .warehouse-species-switch { max-width:100%;flex-wrap:wrap; }
.service-sales-card .card-head { flex-wrap:wrap;gap:12px; }
.service-sales-card .card-head > div { min-width:0;flex:1 1 240px; }
#serviceSaleForm output { display:flex;align-items:center;min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#f5f8f6;font-weight:700; }
@media (max-width:700px) {
  .warehouse-type-picker .warehouse-species-switch { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%; }
  .warehouse-type-picker .warehouse-species-switch button { min-width:0;white-space:normal; }
}

.shift-sync-problem { margin-top: 8px; max-width: 620px; white-space: normal; overflow-wrap: anywhere; }
.shift-sync-problem summary { cursor: pointer; }
.shift-sync-problem p { margin: 8px 0; }
.shift-sync-problem > div { border-top: 1px solid #e5e7eb; padding: 8px 0; }

/* Keep current/period drum report labels readable without squeezing buyers. */
.drum-buyers-summary{table-layout:fixed;min-width:1000px}.drum-buyers-summary th:first-child{width:20%;overflow-wrap:break-word}.drum-buyers-summary thead th{white-space:normal;overflow-wrap:break-word}

/* Stretch report: compact totals and a clear stock entry point. */
.stretch-total-dashboard{max-width:1120px;box-sizing:border-box}
.stretch-summary-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}
.stretch-summary-main,.stretch-summary-side{min-width:0}
.stretch-summary-main #stretchVatSummary th,.stretch-summary-main #stretchVatSummary td{padding:10px 8px}
.stretch-summary-main #stretchVatSummary th:first-child{width:35%}
.stretch-summary-main #stretchVatSummary thead th{font-size:11px;letter-spacing:.02em}
.stretch-summary-main #stretchVatSummary td{font-size:14px}
.stretch-summary-main #stretchVatSummary td:last-child{font-weight:700;background:#f3f7f4}
.stretch-summary-main #stretchVatSummary [data-stretch-summary="profitRub"] td{background:#e8f1eb;font-size:16px}
.stretch-summary-help{margin-top:14px;font-size:12px;line-height:1.6}
.stretch-summary-help summary{cursor:pointer;color:#52645a;text-decoration:underline;text-underline-offset:3px}
.stretch-summary-side{display:grid;gap:16px;font-variant-numeric:tabular-nums}
.stretch-stock-card{padding:16px;background:#edf4ee;border:1px solid #ceded1;border-radius:12px}
.stretch-summary-label,.stretch-summary-group h3{font-size:13px;font-weight:700;margin:0 0 8px}
.stretch-stock-button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;margin:5px 0 12px;padding:0;background:transparent;border:0;color:#194f35;text-align:left;cursor:pointer}
.stretch-stock-button strong{font-size:28px;line-height:1.3;font-variant-numeric:tabular-nums}
.stretch-stock-button span{font-size:12px;text-decoration:underline;text-underline-offset:3px}
.stretch-stock-button:hover{color:#0b3220}.stretch-stock-button:focus-visible{outline:2px solid #397553;outline-offset:4px;border-radius:4px}
.stretch-summary-group{padding:0 4px}.stretch-summary-group+.stretch-summary-group{padding-top:14px;border-top:1px solid #dde5df}
.stretch-summary-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:4px 0;font-size:13px;line-height:1.5}
.stretch-summary-line>span{color:#58665e}.stretch-summary-line strong{text-align:right;white-space:nowrap;font-weight:600}
@media(max-width:1000px){.stretch-summary-layout{grid-template-columns:minmax(0,1fr);gap:18px}.stretch-summary-side{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.stretch-summary-group+.stretch-summary-group{padding-top:0;border-top:0}.stretch-summary-line{flex-wrap:wrap;gap:2px 8px}}
@media(max-width:600px){.stretch-summary-side{grid-template-columns:minmax(0,1fr)}.stretch-summary-group+.stretch-summary-group{padding-top:12px;border-top:1px solid #dde5df}.stretch-summary-main #stretchVatSummary th,.stretch-summary-main #stretchVatSummary td{padding:9px 4px;font-size:12px}.stretch-summary-main #stretchVatSummary [data-stretch-summary="profitRub"] td{font-size:13px}.stretch-summary-line{flex-wrap:nowrap}.stretch-stock-button strong{font-size:26px}}
@media(max-width:600px){
 .stretch-summary-main #stretchVatSummary:not(:has([data-vat-group="unclassified"])) tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 .stretch-summary-main #stretchVatSummary:not(:has([data-vat-group="unclassified"])) thead th:first-child{display:none}
 .stretch-summary-main #stretchVatSummary:not(:has([data-vat-group="unclassified"])) tbody th{grid-column:1/-1;width:auto;padding-bottom:3px;border-bottom:0}
 .stretch-summary-main #stretchVatSummary:not(:has([data-vat-group="unclassified"])) td{white-space:nowrap;overflow-wrap:normal;padding-top:3px;font-size:12px}
 .stretch-summary-main #stretchVatSummary:not(:has([data-vat-group="unclassified"])) thead th{width:auto}
}

/* Rental summary: visible cells and distinct resource groups. */
.rental-summary-card { border:1px solid #cbd8cf; overflow:hidden; }
.rental-summary-card > .card-head { margin:-1px -1px 16px; padding:14px 16px; background:#edf3ef; border-bottom:1px solid #bdcec2; }
.rental-summary-card > .card-head h2 { margin:0; font-size:18px; }
.rental-summary-card .table-wrap { border:1px solid #bdcec2; border-radius:8px; }
.rental-summary-table { border-collapse:separate; border-spacing:0; }
.rental-summary-table th,.rental-summary-table td { border-right:1px solid #bdcec2; border-bottom:1px solid #cbd8cf; }
.rental-summary-table tr > :last-child { border-right:0; }
.rental-summary-table tbody tr:last-child > * { border-bottom:0; }
.rental-summary-table thead th { background:#e8eeea; color:#35483c; font-weight:700; line-height:1.45; }
.rental-summary-table tbody td { background:#fff; padding:16px 12px; font-size:16px; }
.rental-summary-table tbody tr:nth-child(even) > * { background:#f5f8f6; }
.rental-summary-table .rental-summary-total { background:#e2eee5; border-left:1px solid #8dac97; color:#214c32; font-size:19px; }
.rental-income-table { min-width:600px; }
.rental-income-table thead th:last-child { background:#dce9df; }
.rental-resources-table thead tr:first-child th { border-bottom:1px solid #9fb5a7; }
.rental-resources-table thead tr:first-child th:nth-child(2),.rental-resources-table thead tr:nth-child(2) th:nth-child(-n+2) { background:#e7eef4; }
.rental-resources-table thead tr:first-child th:nth-child(3),.rental-resources-table thead tr:nth-child(2) th:nth-child(3),.rental-resources-table thead tr:nth-child(2) th:nth-child(4) { background:#e6efe9; }
.rental-resources-table thead tr:first-child th:nth-child(n+4),.rental-resources-table thead tr:nth-child(2) th:nth-child(n+5) { background:#f2ebdc; }
.rental-resources-table tbody th { background:#edf3ef; padding:16px 12px; }
.rental-resources-table tbody td:nth-child(2),.rental-resources-table tbody td:nth-child(4),.rental-resources-table tbody td:nth-child(6),.rental-resources-table tbody td:nth-child(8) { border-left:1px solid #8fa99a; }
.rental-resources-table tbody td:nth-child(3),.rental-resources-table tbody td:nth-child(5),.rental-resources-table tbody td:nth-child(7) { font-weight:700; }
@media(max-width:640px) { .rental-summary-card > .card-head { gap:6px; padding:12px; } .rental-summary-table tbody td { font-size:14px; } }
.rental-resources-table tbody th strong { font-weight:800; }
.rental-resources-table tfoot th,.rental-resources-table tfoot td { font-weight:700; background:#e2ede6; border-top:2px solid #8fa99a; }

/* Rental history: readable groups, fixed numeric rhythm, and a distinct period total. */
.rental-summary-card .rental-dashboard-tenants { min-width:1900px; table-layout:auto; font-variant-numeric:tabular-nums; }
.rental-summary-card .rental-dashboard-tenants th,.rental-summary-card .rental-dashboard-tenants td { padding:10px 12px; white-space:nowrap; font-weight:700; }
.rental-summary-card .rental-dashboard-tenants thead th { background:#e5efe8; color:var(--ink); font-weight:900; border-bottom:1px solid #9fb8a7; }
.rental-summary-card .rental-dashboard-tenants thead tr:first-child th { background:#cfe0d4; letter-spacing:.01em; }
.rental-summary-card .rental-dashboard-tenants th:first-child { width:150px; text-align:left; }
.rental-summary-card .rental-dashboard-tenants th:nth-child(4),.rental-summary-card .rental-dashboard-tenants th:nth-child(7),.rental-summary-card .rental-dashboard-tenants th:nth-child(10),.rental-summary-card .rental-dashboard-tenants th:nth-child(13) { border-right:2px solid #9fb8a7; }
.rental-summary-card .rental-dashboard-tenants tbody tr:last-child > * { background:#e0eee5; border-top:2px solid #7fa28a; font-weight:900; }
.rental-summary-card .rental-dashboard-tenants .profit-report-drill-button { min-width:112px; font-weight:800; }
.rental-history-filters { display:grid; grid-template-columns:repeat(3,minmax(190px,1fr)); gap:12px; align-items:end; }
.rental-history-filters .field { margin:0; }
@media(max-width:760px) { .rental-history-filters { grid-template-columns:1fr; } }

/* Rental history: separate electricity, gas, and rent without visual noise. */
.rental-summary-card .rental-dashboard-tenants thead tr:first-child th:nth-child(2),.rental-summary-card .rental-dashboard-tenants thead tr:first-child th:nth-child(3) { background:#e7f0fb; }
.rental-summary-card .rental-dashboard-tenants thead tr:first-child th:nth-child(4),.rental-summary-card .rental-dashboard-tenants thead tr:first-child th:nth-child(5) { background:#fff3df; }
.rental-summary-card .rental-dashboard-tenants thead tr:first-child th:last-child { background:#e8f4eb; }
.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(2),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(3),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(4),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(5),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(6),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(7) { background:#f7fbff; }
.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(8),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(9),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(10),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(11),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(12),.rental-summary-card .rental-dashboard-tenants tbody td:nth-child(13) { background:#fffaf2; }
.rental-summary-card .rental-dashboard-tenants tbody td:last-child { background:#f4faf5; }
.rental-summary-card .rental-dashboard-tenants tr > :nth-child(4),.rental-summary-card .rental-dashboard-tenants tr > :nth-child(7),.rental-summary-card .rental-dashboard-tenants tr > :nth-child(10),.rental-summary-card .rental-dashboard-tenants tr > :nth-child(13) { border-right:3px solid #91a99a; }

/* Services: one aligned entry row with separate actions underneath. */
.service-sales-card { container-type:inline-size; }
#serviceSaleForm { grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px 8px;align-items:start; }
#serviceSaleForm > .field { min-width:0; }
#serviceSaleForm > .field > span:first-child { display:flex;align-items:center;height:40px;min-height:40px;box-sizing:border-box;padding:4px 5px!important;font-size:12px;line-height:16px;word-break:normal;overflow-wrap:normal; }
#serviceSaleForm :is(input,select,output,.buyer-search-input) { width:100%;min-width:0;box-sizing:border-box; }
#serviceSaleForm output { min-height:40px;overflow-wrap:anywhere; }
#serviceSaleForm > .actions { grid-column:1 / -1!important;display:flex;flex-wrap:wrap;gap:8px;padding-top:4px; }
@container (min-width:920px) {
 #serviceSaleForm { grid-template-columns:115px minmax(100px,1.4fr) minmax(100px,1.4fr) minmax(84px,.8fr) 66px minmax(96px,1fr) 94px minmax(100px,1fr) minmax(90px,1.2fr)!important; }
}
@container (max-width:480px) {
 #serviceSaleForm { grid-template-columns:minmax(0,1fr)!important; }
}
/* Keep source actions quiet and on the same line as the payment channel. */
.profit-report-detail-card .profit-source-inline { display:inline-flex;align-items:center;gap:8px;white-space:nowrap; }
.profit-report-detail-card .profit-source-link { display:inline-flex;align-items:center;min-width:0;min-height:24px;padding:2px 0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#66746e;font-size:12px;font-weight:400;line-height:16px;white-space:nowrap;cursor:pointer; }
.profit-report-detail-card .profit-source-link:hover { background:transparent;color:#354e43;text-decoration:underline; }
.profit-report-detail-card .profit-source-link:focus-visible { outline:2px solid #748c80;outline-offset:3px; }

/* Employee salary card: aligned controls and centered detail dialogs. */
.payroll-employee-card-overlay{align-items:center;padding:20px;background:rgba(24,42,35,.34)}
.payroll-employee-card-overlay>.payroll-employee-card{width:min(1280px,100%);max-height:calc(100dvh - 40px);overflow:auto;border-radius:18px;box-shadow:0 20px 70px #12332626}
.payroll-card-loading{padding:24px;min-height:160px}
.payroll-employee-card-overlay[aria-busy=true] #cardPeriodForm{opacity:.65;pointer-events:none}
.payroll-card-metrics{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important}
.payroll-card-metrics .metric{min-width:0;border:1px solid #dfe8e2;border-radius:12px;padding:15px;text-align:left;background:#edf5f0}
.payroll-card-metrics [data-card-detail=bonus]{background:#f6f0df}.payroll-card-metrics [data-card-detail=penalty]{background:#f8ece9}.payroll-card-metrics [data-card-detail=paid]{background:#eaf1f8}.payroll-card-metrics [data-card-detail=balance]{background:#eeedf6}
.payroll-card-metrics .metric strong{font-size:clamp(18px,2vw,27px);white-space:nowrap}
#cardPeriodForm{display:flex;align-items:end;gap:8px;flex-wrap:nowrap;margin:16px 0}
#cardPeriodForm>label{flex:0 0 135px;min-width:0}#cardPeriodForm .shift-period-shortcuts{display:flex;gap:5px;flex-wrap:wrap;align-self:center}
#cardPeriodForm .payroll-card-debts{margin-left:auto;align-self:center;font-weight:400;white-space:nowrap;background:#edf0e9;border:1px solid #e0e6da;color:#55635b;padding:9px 16px}
#cardPayrollPaymentForm{display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:12px 0}
#cardPayrollPaymentForm label{margin:0!important}
#cardPayrollPaymentForm>label{flex:1 1 115px;min-width:0}#cardPayrollPaymentForm>label:has(#cardPaymentNotes){flex:2 1 160px}
#cardPayrollPaymentForm>button{flex:0 0 auto;white-space:nowrap}
.payroll-debt-fields{padding:10px;border:1px solid #dfe8e2;border-radius:10px;grid-column:1/-1}
#cardPayrollPaymentForm .payroll-debt-fields{display:contents}
#cardPayrollPaymentForm .payroll-debt-fields>label{flex:1 1 140px;min-width:0}
#cardPayrollPaymentForm .payroll-debt-fields>button{white-space:nowrap}
#cardPayrollPaymentForm [data-payroll-debt-preview]{order:10;flex-basis:100%;font-size:12px;color:#63746b;margin:4px 0 0}
#cardPayrollPaymentForm .payroll-debt-fields>small{display:none!important}
#cardPayrollPaymentForm input,#cardPayrollPaymentForm select,#cardPayrollPaymentForm button{height:40px;box-sizing:border-box}
.payroll-metric-dialog{position:fixed;inset:0;margin:auto;width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid #dce7df;border-radius:18px;background:#fafcfb;box-shadow:0 24px 80px #17372b33;overflow:auto;color:#183329}
.payroll-metric-dialog::backdrop{background:#19392a55;backdrop-filter:blur(3px)}
.payroll-metric-content{padding:24px}.payroll-metric-content>button{float:right;font-weight:400}.payroll-metric-content h2{font-size:20px;margin:6px 85px 16px 0}.payroll-metric-content table{width:100%}.payroll-metric-content tfoot{background:#edf4ef}
@media(max-width:1050px){#cardPeriodForm{flex-wrap:wrap}#cardPeriodForm .shift-period-shortcuts{flex:1 1 330px}.payroll-card-metrics .metric{padding:10px}}
@media(max-width:640px){.payroll-employee-card-overlay{padding:8px}.payroll-employee-card-overlay>.payroll-employee-card{max-height:calc(100dvh - 16px)}.payroll-card-metrics{overflow-x:auto;grid-template-columns:repeat(5,minmax(120px,1fr))!important;padding-bottom:6px}#cardPeriodForm>label{flex:1 1 110px}#cardPayrollPaymentForm{flex-wrap:nowrap;overflow-x:auto;align-items:end;padding-bottom:12px}#cardPayrollPaymentForm>label,#cardPayrollPaymentForm .payroll-debt-fields>label{flex:0 0 140px}#cardPayrollPaymentForm [data-payroll-debt-preview]{grid-column:1/-1}.payroll-metric-content{padding:16px}}

/* Enterprise employee directory: same card/grid language as the surrounding payroll UI. */
.enterprise-employee-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:16px}
.enterprise-employee-search{margin:0;min-width:min(360px,100%)}
.enterprise-employee-toolbar-actions{display:grid;gap:8px;justify-items:end}
.enterprise-employee-toolbar-actions button{min-width:220px}
.employee-card-link{border:0;padding:0;background:transparent;color:var(--green);font:inherit;font-weight:850;text-align:left;cursor:pointer}
.employee-card-link:hover{text-decoration:underline}
.employee-card-modal{width:min(1040px,100%);padding:18px}
.employee-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px;border:1px solid #d6e0da;border-radius:14px;background:#fff}
.employee-card-grid .field{margin:0}
.employee-card-grid [data-card-rate-field][hidden]{display:none!important}
.employee-timesheet-field,.employee-salary-readonly{min-height:70px;padding:10px;border:1px solid #d6e0da;border-radius:10px;background:#f7faf8;display:grid;align-content:center;gap:5px}
.employee-timesheet-field>span:first-child,.employee-salary-readonly>span{color:var(--muted);font-size:12px;font-weight:800}
.employee-salary-readonly strong{font-size:18px}.employee-salary-readonly small{color:var(--muted)}
.employee-card-section{margin-top:14px;padding:14px;border:1px solid #d6e0da;border-radius:14px;background:#fff}.employee-card-section h3{margin:0 0 10px;font-size:15px}
.employee-history{display:grid;gap:6px}.employee-history>div{display:grid;grid-template-columns:minmax(150px,1fr) 120px minmax(160px,1fr);gap:10px;padding:9px;border-top:1px solid #edf1ee}
.employee-document{display:grid;grid-template-columns:180px minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px;border-top:1px solid #edf1ee}.employee-document:first-of-type{border-top:0}.employee-document em{color:var(--muted)}
.employee-card-actions{justify-content:flex-end;margin-top:16px}
@media(max-width:900px){.enterprise-employee-toolbar{align-items:stretch;flex-direction:column}.enterprise-employee-toolbar-actions{justify-items:stretch}.enterprise-employee-toolbar-actions button{width:100%}.employee-card-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.employee-card-grid{grid-template-columns:1fr}.employee-history>div,.employee-document{grid-template-columns:1fr;gap:4px}}

/* Period presets below dates; payment controls stay inside their frame. */
#cardPeriodForm{display:grid;grid-template-columns:135px 135px max-content minmax(0,1fr)!important;align-items:end;min-width:0;max-width:100%;box-sizing:border-box}
#cardPeriodForm>label{grid-row:1;margin:0}#cardPeriodForm>button[type=submit]{grid-column:3;grid-row:1}
#cardPeriodForm .shift-period-shortcuts{grid-column:1/-1;grid-row:2;justify-content:flex-start;align-self:start;margin-top:2px}
#cardPeriodForm .payroll-card-debts{grid-column:4;grid-row:1;justify-self:end;align-self:center;display:flex;gap:8px;align-items:center;margin-left:0;font-weight:400}
#cardPeriodForm [data-card-debt-total]{font-weight:400;font-size:12px;color:#66736b}
.payroll-card-actions>details{min-width:0}
#cardPayrollPaymentForm{display:grid;grid-template-columns:minmax(110px,1fr) minmax(110px,1fr) minmax(140px,1.1fr) max-content minmax(110px,1fr) minmax(145px,1.4fr) max-content!important;min-width:0;max-width:100%;width:100%;box-sizing:border-box;padding:8px 12px 12px;overflow-x:auto}
#cardPayrollPaymentForm>label,#cardPayrollPaymentForm .payroll-debt-fields>label{flex:1 0 110px}
#cardPayrollPaymentForm>label:has(#cardPaymentNotes){flex:2 0 145px}
#cardPayrollPaymentForm .payroll-debt-fields>button{flex:0 0 auto}
#cardPayrollPaymentForm [data-payroll-debt-preview]{display:none}
#cardPayrollPaymentForm .readable-number-field{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:640px){#cardPeriodForm{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}#cardPeriodForm>button[type=submit]{grid-column:1;grid-row:2;justify-self:start}#cardPeriodForm .payroll-card-debts{grid-column:2;grid-row:2}#cardPeriodForm .shift-period-shortcuts{grid-row:3}#cardPayrollPaymentForm>label,#cardPayrollPaymentForm .payroll-debt-fields>label{flex:0 0 140px}}

#cardPeriodForm .shift-period-shortcuts{width:100%;min-width:0;box-sizing:border-box}#cardPeriodForm .shift-period-shortcuts>button{flex:0 0 auto;white-space:nowrap}

.lumber-sales-analytics { line-height:1.18; }
.lumber-sales-analytics .card-head { margin-bottom:8px; }
.lumber-sales-analytics .card-head h2 { margin-bottom:2px; }
.lumber-sales-analytics .card-head p { margin:0; line-height:1.2; }
.lumber-cost-comparison-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap:10px; align-items:stretch; }
.lumber-cost-comparison-grid > .metric { min-width:0; padding:12px 10px; }
.lumber-cost-comparison-grid > .metric > span { display:block; min-height:30px; font-size:13px; line-height:1.15; }
.lumber-sales-analytics .metric-value-row { gap:6px; margin-top:5px; padding-top:5px; line-height:1.1; }
.lumber-sales-analytics .metric-value-row strong { font-size:16px; }
.lumber-sales-analytics .raw-material-species + .raw-material-species { margin-top:6px; padding-top:6px; }
.lumber-sales-analytics small.muted { display:block; margin-top:6px; line-height:1.2; }
.payroll-metric-dialog .payroll-metric-content { padding:16px; }
.payroll-metric-dialog .payroll-metric-content h2 { margin-bottom:8px; }
.payroll-metric-dialog .payroll-metric-content table { line-height:1.15; }
.payroll-metric-dialog .payroll-metric-content th,
.payroll-metric-dialog .payroll-metric-content td { padding:6px 8px; }
.payroll-metric-dialog .payroll-metric-content small { line-height:1.15; }
.processing-cost-row { width:100%; border:0; border-radius:4px; padding:5px 0; background:transparent; color:inherit; text-align:left; cursor:pointer; font:inherit; }
.processing-cost-row:hover { background:rgba(85,110,90,.07); }
.processing-cost-row:focus-visible { outline:2px solid #557b66; outline-offset:2px; }
.raw-material-species + .raw-material-species { border-top:1px solid #dce4de; margin-top:10px; padding-top:10px; }
.raw-material-species > strong { font-size:14px; }
.processing-formula { line-height:1.25; margin:6px 0; }
@media(max-width:1100px) { .lumber-cost-comparison-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .lumber-cost-comparison-grid { grid-template-columns:1fr; } .lumber-sales-analytics .metric-value-row { padding-top:4px; margin-top:4px; } }
.one-c-connection-card .card-head{align-items:flex-start}.one-c-connection-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:max-content}.one-c-settings{position:relative}.one-c-settings summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:0 10px;cursor:pointer;border:1px solid var(--line);border-radius:8px;color:var(--ink);font-weight:700;background:var(--card)}.one-c-settings summary::-webkit-details-marker{display:none}.one-c-settings[open]{width:min(100%,980px)}.one-c-settings[open] summary{margin-left:auto}.one-c-connection-form{display:grid;grid-template-columns:minmax(260px,1.3fr) minmax(220px,1fr) minmax(260px,1.3fr) auto;align-items:end;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.one-c-connection-form .field{min-width:0}.odata-password-control{display:flex;align-items:center;width:100%}.odata-password-control input{min-width:0;flex:1}.odata-password-toggle{flex:0 0 42px;width:42px;height:38px;margin-left:6px;padding:0;line-height:1}.one-c-period-card form{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.one-c-period-card .field{min-width:180px}@media(max-width:1100px){.one-c-connection-form{grid-template-columns:repeat(2,minmax(220px,1fr))}}@media(max-width:680px){.one-c-connection-actions{align-items:stretch;width:100%}.one-c-settings[open]{width:100%}.one-c-settings[open] summary{margin-left:0}.one-c-connection-form{grid-template-columns:1fr}.one-c-connection-card .card-head{flex-direction:column}}
.odata-counterparty{margin:8px 0;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.odata-counterparty>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 15px;cursor:pointer;font-weight:800}.odata-sale-document{padding:0 15px 15px}.odata-sale-document>div:first-child{display:flex;justify-content:space-between;gap:12px;margin:4px 0 8px;color:var(--muted)}.odata-sale-document table{min-width:760px}.odata-sale-document td:nth-last-child(-n+3),.odata-sale-document th:nth-last-child(-n+3){text-align:right}
.closed-drum-shifts-wrap{overflow:auto}.closed-drum-shifts-table{min-width:1360px;table-layout:fixed}.closed-drum-shifts-table col:nth-child(1),.closed-drum-shifts-table col:nth-child(2){width:9%}.closed-drum-shifts-table col:nth-child(3){width:11%}.closed-drum-shifts-table col:nth-child(4){width:13%}.closed-drum-shifts-table col:nth-child(5){width:12%}.closed-drum-shifts-table col:nth-child(6){width:14%}.closed-drum-shifts-table col:nth-child(7){width:10%}.closed-drum-shifts-table col:nth-child(8){width:11%}.closed-drum-shifts-table col:nth-child(9){width:11%}.closed-drum-shift-filter-grid{display:grid;grid-template-columns:9% 9% 11% 13% 12% 14% 10% 11% 11%;min-width:1360px;background:#f3f7f4;border-bottom:1px solid var(--line)}.closed-drum-shift-filter-grid>label,.closed-drum-shift-filter-grid>div{min-width:0;padding:7px 8px;border-right:1px solid var(--line)}.closed-drum-shift-filter-grid>:last-child{border-right:0}.closed-drum-shift-filter-grid input{box-sizing:border-box;width:100%;min-width:0;height:34px;padding:6px 8px;font-size:12px}.closed-drum-shift-filter-empty{background:#f8faf8}.closed-drum-shifts-table th,.closed-drum-shifts-table td{padding:10px 8px}.closed-drum-shift-cell-line+.closed-drum-shift-cell-line{margin-top:5px;padding-top:5px;border-top:1px solid #e5e9e6}

@media(max-width:700px){.profit-realization-card table{min-width:0;width:100%}.profit-realization-card td,.profit-realization-card th{white-space:normal;overflow-wrap:anywhere}.profit-realization-card td:last-child,.profit-realization-card th:last-child{white-space:nowrap;width:40%}}

.profit-project-toggle{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.profit-project-toggle input{margin:0}tr.profit-row-off td:not(:first-child),td.profit-row-off{filter:blur(4px);opacity:.5;user-select:none}tr.profit-row-off td:first-child{opacity:.55}

/* Взаиморасчёты: выбор контрагентов и просрочка — как в ОПиУ. */
.settlement-check { width: 36px; }
.settlement-deferral { width: 76px; }
[data-settlement-overdue] { white-space: nowrap; }
.settlement-row-off td:not(:first-child), td.settlement-row-off { filter: blur(4px); opacity: .5; user-select: none; }
.settlement-row-off td:first-child { opacity: .55; }

/* Перетаскивание контрагентов — за первую букву названия. */
.settlement-drag { cursor: grab; user-select: none; }
[data-odata-settlements] tbody tr.settlement-dragging { opacity: .45; }

/* Акцент на общей и просроченной задолженности. */
.metric.settlement-accent { border-color: #c9a86a; box-shadow: 0 0 0 2px #c9a86a33; background: #fffaf0; }
.metric.settlement-accent strong { color: #8a6a2f; }
.receipts-filter { max-width: 420px; margin: 8px 0 14px; }
