/* LMF v3.1 shell (lane 2.1): design tokens, the button system, icons, the six-item navigation and the page frame.
   Values come from the approved concept (crm-concept-20261116/index.html: tokens, the alignment pass fable/align/NOTES.md and the
   buttons and controls pass) and D:/Projects/FOREST/DESIGN.md. Every v3.1 module uses these tokens instead of its own numbers.
   Nothing here restyles the Browser table or the Forest data tab: rules are scoped to v3.1 classes, the navigation items marked
   data-v31-nav, and the v3.1 page frame. */

/* ===== tokens ===== */
:root{
  /* colour: one calm neutral background, section colour only as a quiet accent */
  --v31-bg:#f2f4f0;              /* page background, every page */
  --v31-surface:#ffffff;         /* cards, sheets, the property window */
  --v31-surface-2:#eef2ec;       /* tinted bands, a disabled button */
  --v31-line:#dde4db;            /* borders between things */
  --v31-line-strong:#c3cdc1;
  --v31-text:#20382d;            /* body text */
  --v31-text-2:#526158;          /* secondary text */
  --v31-muted:#66736a;           /* hints, dates, counts */
  --v31-home:#20382d;            /* Šodien, Plānotājs */
  --v31-forest:#285c43;          /* Pārlūks, Izbraukumi, the Mežs tab */
  --v31-forest-hover:#1c4833;
  --v31-forest-tint:#dbe9dc;
  --v31-forest-soft:#f0f6ef;
  --v31-crm:#2b5a76;             /* Darījumi, Partneri, the Darījums tab ("lake" in the concept) */
  --v31-crm-hover:#1f465d;
  --v31-crm-tint:#d9e6f0;
  --v31-crm-soft:#f1f6fa;
  --v31-crm-ink:#1d4157;
  --v31-crm-line:#cddbe5;        /* the fine line of a lake band (the deal card's now band and its rows) */
  --v31-late:#a33832;            /* overdue, refusal, "Nezvanīt" */
  --v31-late-bg:#f9e5e3;
  --v31-warn:#7a4d00;            /* waiting, needs a look */
  --v31-warn-bg:#fcefd3;
  --v31-warn-line:#ecd9ab;       /* the fine line of a waiting band */
  --v31-ok:#285c43;              /* done */
  --v31-ok-bg:#dbe9dc;
  --v31-focus:#2b5a76;           /* one focus colour */
  --v31-accent:var(--v31-home);  /* set per section below */

  /* shape and depth */
  --v31-r-ctl:10px;              /* buttons, fields, small controls */
  --v31-r:12px;                  /* cards and panels */
  --v31-r-lg:16px;               /* sheets and windows */
  --v31-sh-1:0 1px 1px rgba(22,40,30,.04),0 2px 4px -1px rgba(22,40,30,.09);
  --v31-sh-2:0 1px 2px rgba(22,40,30,.06),0 6px 12px -4px rgba(22,40,30,.16);
  --v31-sh-in:inset 0 1px 2px rgba(22,40,30,.16);
  --v31-sh-pop:0 18px 40px -8px rgba(22,40,30,.22),0 4px 10px -2px rgba(22,40,30,.10);
  --v31-sh-overlay:0 24px 60px rgba(22,40,30,.24),0 2px 8px rgba(22,40,30,.10);
  --v31-ease:cubic-bezier(.16,1,.3,1);
  --v31-t-ctl:.14s var(--v31-ease);

  /* spacing: multiples of 4 */
  --v31-s-1:4px; --v31-s-2:8px; --v31-s-3:12px; --v31-s-4:16px; --v31-s-5:20px; --v31-s-6:24px; --v31-s-8:32px; --v31-s-10:40px;

  /* the card grid (fable/align/NOTES.md): at most two left edges, the card edge and the text column */
  --v31-pad:20px;                /* padding of a card */
  --v31-gut:40px;                /* the icon gutter; a leading icon sits centred in it */
  --v31-gap:12px;                /* icon to text, and between the columns of a row */
  --v31-tx:72px;                 /* pad + gutter + gap: the text column */
  --v31-row:56px;                /* a list row */
  --v31-act:160px;               /* the action column of a deal card: every button in it is this wide (160: "Sākt darījumu" fits, gate zero M4) */

  /* controls: two button heights; fields and square icon buttons are the small height */
  --v31-btn:40px;                /* main button */
  --v31-ctl:36px;                /* small button, field, square icon button (the plan's "control height 36 px") */
  --v31-min-target:32px;         /* nothing pressable is smaller */

  /* type: one scale, three weights, three line heights, tabular numbers */
  --v31-font:Manrope,"Segoe UI",system-ui,sans-serif;
  --v31-fs-xs:12px; --v31-fs-sm:13px; --v31-fs:15px; --v31-fs-md:17px; --v31-fs-lg:20px; --v31-fs-xl:22px;
  --v31-fw:500; --v31-fw-bold:700; --v31-fw-heavy:800;
  --v31-lh-head:1.25; --v31-lh-row:1.3; --v31-lh:1.4;
}
[data-v31-section="home"]{--v31-accent:var(--v31-home)}
[data-v31-section="forest"]{--v31-accent:var(--v31-forest)}
[data-v31-section="crm"]{--v31-accent:var(--v31-crm)}

/* ===== icons ===== */
.v31-i{display:inline-block;width:18px;height:18px;flex:none;vertical-align:middle;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.v31-i--sm{width:15px;height:15px}
.v31-i--lg{width:20px;height:20px}

/* ===== the kit guard (lane K2) =====
   The app styles its own buttons and fields with selectors that carry ids, up to three of them
   (#content .catalogue-controls-row button, #detail-dialog .parcel-aside button, #app #content :is(input,select),
   #detail-dialog:not(.contacts-workspace) #detail-body>#contact-form button). A plain .v31-btn loses to all of them.
   Every rule of the kit components below (buttons, fields, chips, the state kit) therefore carries the guard
   :not(#v31-kit#v31-kit#v31-kit#v31-kit): it always matches (no element has that id four times over) and adds the weight
   of four ids, so the kit wins over every app rule that can reach a kit control, without !important.
   It only ever matches elements that carry a kit class, so no existing screen changes.
   Rules for module authors:
   - the kit owns the look (height, padding, border, corners, colours, font, shadow) and a field's margin (0: space fields
     with the container's gap); a button's placement (margin, width, flex, order, position) is left to the module, so
     ".my-card .v31-btn{margin-left:auto;width:var(--v31-act)}" works as usual; a field's width and flex too;
   - to change the look of one kit control (rarely needed: pick a variant first), repeat the guard on the module's selector.
   Keep the same guard string everywhere: the unit test looks for it. */

/* ===== BEGIN buttons (one replaceable block) =====
   Fable's buttons and controls pass (concept, 16 Nov 2026), renamed to v3.1 classes:
   v31-btn = an action (white with a fine line); --primary = the main action on forest pages, --crm = the main action inside a deal;
   --ghost = quiet (close, more, previous, next, "Atcelt" beside a main action); --tonal = the one named action of the people panel;
   --sm = the small height; --icon = a square icon button (needs aria-label and title). aria-pressed="true" stays pressed.
   To take a newer button system, replace everything between BEGIN and END; class names are the contract; keep the guard. */
:root{
  --v31-ctl-line:rgba(32,56,45,.62);         /* ink at 62% (Fable's button pass): 3.3:1 to 3.9:1 on white and on the tinted bands */
  --v31-ctl-line-hover:rgba(32,56,45,.82);
  --v31-ctl-fill:#ffffff;
  --v31-ctl-fill-hover:#f4f7f3;
  --v31-ctl-fill-press:#e8eee7;
  --v31-ctl-sheen:linear-gradient(180deg,rgba(255,255,255,0) 45%,rgba(32,56,45,.03));
  --v31-ctl-gloss:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,0) 60%);
}
/* placement default, without the guard so a module's own class can move the control */
.v31-btn{margin:0}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit){
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  box-sizing:border-box;height:var(--v31-btn);min-height:var(--v31-btn);max-height:none;padding:0 16px;
  border:1px solid var(--v31-ctl-line);border-radius:var(--v31-r-ctl);
  background-color:var(--v31-ctl-fill);background-image:var(--v31-ctl-sheen);color:var(--v31-text);
  font:var(--v31-fw-bold) var(--v31-fs)/1.2 var(--v31-font);letter-spacing:-.005em;text-transform:none;text-align:center;text-decoration:none;text-shadow:none;
  white-space:nowrap;vertical-align:middle;opacity:1;filter:none;outline-offset:2px;
  box-shadow:var(--v31-sh-1);cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;
  transition:background-color var(--v31-t-ctl),border-color var(--v31-t-ctl),color var(--v31-t-ctl),box-shadow var(--v31-t-ctl),transform var(--v31-t-ctl);
}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit) .v31-i{width:16px;height:16px;stroke-width:2;color:var(--v31-crm);transition:color var(--v31-t-ctl)}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit):hover{background-color:var(--v31-ctl-fill-hover);background-image:var(--v31-ctl-sheen);border-color:var(--v31-ctl-line-hover);color:var(--v31-text);text-decoration:none;box-shadow:var(--v31-sh-2)}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit):active{background-color:var(--v31-ctl-fill-press);background-image:none;border-color:var(--v31-ctl-line-hover);box-shadow:var(--v31-sh-in);transform:translateY(1px)}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit):focus{outline:none}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit):focus-visible{outline:2px solid var(--v31-focus);outline-offset:2px}
.v31-btn--sm:not(#v31-kit#v31-kit#v31-kit#v31-kit){height:var(--v31-ctl);min-height:var(--v31-ctl);padding:0 12px;font-size:var(--v31-fs-sm)}
.v31-btn--icon:not(#v31-kit#v31-kit#v31-kit#v31-kit){width:var(--v31-ctl);min-width:var(--v31-ctl);max-width:var(--v31-ctl);height:var(--v31-ctl);min-height:var(--v31-ctl);padding:0}
.v31-btn--icon:not(#v31-kit#v31-kit#v31-kit#v31-kit) .v31-i{width:18px;height:18px;stroke-width:1.8}

.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit),.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit){
  --v31-p:var(--v31-crm);--v31-p-hover:var(--v31-crm-hover);--v31-p-press:#183a4e;--v31-p-line:#1a3e54;--v31-p-sh:18,42,58;
  background-color:var(--v31-p);background-image:var(--v31-ctl-gloss);border-color:var(--v31-p-line);color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 1px 2px rgba(var(--v31-p-sh),.26),0 5px 12px -4px rgba(var(--v31-p-sh),.42);
}
.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit){--v31-p:var(--v31-forest);--v31-p-hover:var(--v31-forest-hover);--v31-p-press:#153b29;--v31-p-line:#17402c;--v31-p-sh:18,48,32}
.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit) .v31-i,.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit) .v31-i{color:#fff}
.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit):hover,.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit):hover{background-color:var(--v31-p-hover);background-image:var(--v31-ctl-gloss);border-color:var(--v31-p-line);color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 2px 3px rgba(var(--v31-p-sh),.28),0 9px 18px -6px rgba(var(--v31-p-sh),.5)}
.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit):active,.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit):active{background-color:var(--v31-p-press);background-image:none;border-color:var(--v31-p-press);box-shadow:inset 0 2px 4px rgba(0,0,0,.28);transform:translateY(1px)}

.v31-btn--ghost:not(#v31-kit#v31-kit#v31-kit#v31-kit){border-color:transparent;background-color:transparent;background-image:none;box-shadow:none}
.v31-btn--ghost:not(#v31-kit#v31-kit#v31-kit#v31-kit) .v31-i{color:currentColor}
.v31-btn--ghost:not(#v31-kit#v31-kit#v31-kit#v31-kit):hover{background-color:rgba(32,56,45,.07);background-image:none;border-color:transparent;box-shadow:none}
.v31-btn--ghost:not(#v31-kit#v31-kit#v31-kit#v31-kit):active{background-color:rgba(32,56,45,.13);border-color:transparent;box-shadow:none;transform:none}

.v31-btn--tonal:not(#v31-kit#v31-kit#v31-kit#v31-kit){background-color:var(--v31-crm-soft);background-image:var(--v31-ctl-sheen);border-color:var(--v31-crm);color:var(--v31-crm-ink);
  box-shadow:0 1px 1px rgba(18,42,58,.05),0 2px 5px -1px rgba(18,42,58,.14)}
.v31-btn--tonal:not(#v31-kit#v31-kit#v31-kit#v31-kit):hover{background-color:var(--v31-crm-tint);border-color:var(--v31-crm-hover);color:var(--v31-crm-ink);box-shadow:0 1px 2px rgba(18,42,58,.08),0 6px 12px -4px rgba(18,42,58,.24)}
.v31-btn--tonal:not(#v31-kit#v31-kit#v31-kit#v31-kit):active{background-color:#c9dbe8;background-image:none;box-shadow:inset 0 1px 2px rgba(18,42,58,.22)}

.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[aria-pressed="true"]{background-color:var(--v31-forest-tint);background-image:none;border-color:var(--v31-forest);color:var(--v31-forest);box-shadow:inset 0 1px 2px rgba(18,48,32,.14)}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[aria-pressed="true"] .v31-i{color:currentColor}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[aria-pressed="true"]:hover{background-color:#cfe2d1;border-color:var(--v31-forest-hover)}

.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled],.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled]:hover,.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled]:active{opacity:1;cursor:not-allowed;transform:none;box-shadow:none;background-image:none;
  background-color:var(--v31-surface-2);border-color:var(--v31-line-strong);color:#7d8a81}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled] .v31-i{color:currentColor}
.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled],.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled]:hover{background-color:#d3dfe7;border-color:#d3dfe7;color:#5e7888}
.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled],.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled]:hover{background-color:#d5e2d7;border-color:#d5e2d7;color:#5d7a68}
@media (prefers-reduced-motion:reduce){.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit),.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit):active{transition:none;transform:none}}
@media (forced-colors:active){.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit){border-color:ButtonText}.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled]{color:GrayText;border-color:GrayText}}
/* ===== END buttons ===== */

/* ===== fields: one look for input, select and textarea; single-line fields are exactly --v31-ctl (36 px) ===== */
/* a field has no outer margin of its own (the app gives inputs 4 to 6 px on top); its container spaces it with gap or grid */
.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:block;box-sizing:border-box;margin:0;min-height:var(--v31-ctl);padding:8px 12px;border:1px solid var(--v31-ctl-line);border-radius:var(--v31-r-ctl);
  background-color:var(--v31-surface);background-image:none;color:var(--v31-text);
  font:var(--v31-fw) var(--v31-fs)/var(--v31-lh-row) var(--v31-font);letter-spacing:0;text-transform:none;text-align:start;text-shadow:none;vertical-align:middle;
  align-items:center;gap:0;opacity:1;filter:none;outline-offset:2px;
  box-shadow:inset 0 1px 2px rgba(22,40,30,.06);caret-color:var(--v31-crm);
  transition:border-color var(--v31-t-ctl),box-shadow var(--v31-t-ctl)}
/* a single-line field: the height is the box (border included), the text centres itself */
.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit):not(textarea):not([type=checkbox]):not([type=radio]){height:var(--v31-ctl);max-height:var(--v31-ctl);padding-top:0;padding-bottom:0}
select.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit){appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2320382d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px}
textarea.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit){min-height:calc(var(--v31-ctl) * 2);resize:vertical}
.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit)::placeholder{color:var(--v31-muted);opacity:1}
.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit):hover{border-color:var(--v31-ctl-line-hover)}
.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit):focus,.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit):focus-visible{outline:none;border-color:var(--v31-crm);box-shadow:inset 0 1px 2px rgba(22,40,30,.04),0 0 0 1px var(--v31-crm),0 0 0 4px rgba(43,90,118,.2)}
.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit):disabled{background-color:var(--v31-surface-2);border-color:var(--v31-line-strong);color:#7d8a81;box-shadow:none;cursor:not-allowed}
@media (forced-colors:active){.v31-input:not(#v31-kit#v31-kit#v31-kit#v31-kit){border-color:FieldText}}

/* ===== chips: an outlined chip can be pressed, a flat tinted chip only tells a state ===== */
.v31-chip:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:inline-flex;align-items:center;gap:5px;box-sizing:border-box;min-height:22px;padding:2px 8px;border:0;border-radius:999px;
  background-color:var(--v31-surface-2);background-image:none;color:var(--v31-text-2);box-shadow:none;
  font:var(--v31-fw-bold) var(--v31-fs-xs)/18px var(--v31-font);letter-spacing:0;text-transform:none;text-align:start;white-space:nowrap;vertical-align:middle;opacity:1}
.v31-chip--late:not(#v31-kit#v31-kit#v31-kit#v31-kit){background-color:var(--v31-late-bg);color:var(--v31-late)}
.v31-chip--warn:not(#v31-kit#v31-kit#v31-kit#v31-kit){background-color:var(--v31-warn-bg);color:var(--v31-warn)}
.v31-chip--ok:not(#v31-kit#v31-kit#v31-kit#v31-kit){background-color:var(--v31-ok-bg);color:var(--v31-ok)}
.v31-chip--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit){background-color:var(--v31-crm-tint);color:var(--v31-crm-ink)}

/* ===== BEGIN state kit (lane ST: lanes/ST/STATES.md section 2, mockups/states.css part 1, with the guard) =====
   Six components carry every state; no lane invents a seventh: notice, empty block and empty line, skeleton, busy button,
   toast line, Nezvanīt mark. Timings and wording live in STATES.md; class names are the contract. */

/* 1. Notice: one sentence and at most one action, in the place where the thing happened. Never a pop-up.
      Icon in the gutter, text on the text column. Tones: plain (something to know), --warn (needs a look), --late (refused or failed). */
.v31-notice:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:flex;align-items:center;gap:var(--v31-gap);box-sizing:border-box;min-height:var(--v31-row);padding:8px var(--v31-pad);
  background:var(--v31-crm-soft);border:1px solid #cddbe5;border-radius:var(--v31-r-ctl);color:var(--v31-text);
  font:var(--v31-fw) var(--v31-fs)/var(--v31-lh) var(--v31-font);text-align:start}
.v31-notice:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-i{flex:none;width:20px;height:20px;margin:0 10px;color:var(--v31-crm)}
.v31-notice:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-notice-tx{flex:1;min-width:0;margin:0;text-wrap:pretty}
.v31-notice:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-notice-tx b{font-weight:var(--v31-fw-bold)}
.v31-notice-sub:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:block;color:var(--v31-text-2);font-size:var(--v31-fs-sm)}
.v31-notice:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-btn{flex:none}
.v31-notice--warn:not(#v31-kit#v31-kit#v31-kit#v31-kit){background:var(--v31-warn-bg);border-color:#ecd9ab}
.v31-notice--warn:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-i{color:var(--v31-warn)}
.v31-notice--late:not(#v31-kit#v31-kit#v31-kit#v31-kit){background:var(--v31-late-bg);border-color:#ecc8c4}
.v31-notice--late:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-i{color:var(--v31-late)}
.v31-notice--flat:not(#v31-kit#v31-kit#v31-kit#v31-kit){border-radius:0;border-width:1px 0}      /* across a card, between two rows */
.v31-notice--sm:not(#v31-kit#v31-kit#v31-kit#v31-kit){min-height:var(--v31-btn);padding:6px 12px;font-size:var(--v31-fs-sm)}
.v31-notice--sm:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-i{width:16px;height:16px;margin:0}

/* 2. Empty block: what will be here, one line why, one button. One per screen, never one per list. */
.v31-empty:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:grid;grid-template-columns:var(--v31-gut) minmax(0,1fr) auto;gap:4px var(--v31-gap);align-items:center;box-sizing:border-box;
  padding:var(--v31-pad);background:var(--v31-surface);border:1px solid var(--v31-line);border-radius:var(--v31-r);text-align:start}
.v31-empty:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-empty-i{grid-row:1 / span 2;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--v31-crm-tint);color:var(--v31-crm-ink)}
.v31-empty:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-empty-i .v31-i{width:20px;height:20px}
.v31-empty-t:not(#v31-kit#v31-kit#v31-kit#v31-kit){margin:0;grid-column:2;font:var(--v31-fw-heavy) var(--v31-fs-lg)/var(--v31-lh-head) var(--v31-font);letter-spacing:-.01em;color:var(--v31-text)}
.v31-empty-s:not(#v31-kit#v31-kit#v31-kit#v31-kit){margin:0;grid-column:2;max-width:64ch;color:var(--v31-text-2);font:var(--v31-fw) var(--v31-fs)/var(--v31-lh) var(--v31-font);text-wrap:pretty}
.v31-empty:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-btn{grid-column:3;grid-row:1 / span 2;min-width:var(--v31-act)}
/* a quiet one-line empty inside a list that is normally full ("Viss izdarīts") */
.v31-empty-line:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:flex;align-items:center;gap:var(--v31-gap);min-height:var(--v31-row);padding:0 var(--v31-pad) 0 16px;color:var(--v31-text-2);font:var(--v31-fw) var(--v31-fs)/var(--v31-lh-row) var(--v31-font)}
.v31-empty-line:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-i{flex:none;width:20px;height:20px;margin:0 6px;color:var(--v31-forest)}

/* 3. Skeleton: the shape of what is coming, in the rows' own height. No spinner in the middle of a page. */
.v31-skel-row:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:flex;align-items:center;gap:var(--v31-gap);min-height:var(--v31-row);padding:0 var(--v31-pad) 0 16px;border-bottom:1px solid var(--v31-line)}
.v31-skel-row:not(#v31-kit#v31-kit#v31-kit#v31-kit):last-child{border-bottom:0}
.v31-skel:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,#e6ebe4 0%,#f1f4ef 45%,#e6ebe4 90%);background-size:220% 100%;animation:v31-skel 1.4s linear infinite}
.v31-skel--dot:not(#v31-kit#v31-kit#v31-kit#v31-kit){flex:none;width:22px;height:22px;border-radius:50%;margin:0 5px}
@keyframes v31-skel{from{background-position:120% 0}to{background-position:-100% 0}}

/* 4. Busy: a pressed button while the server answers. Same width, same words, the leading icon becomes a ring, no second press. */
.v31-busy:not(#v31-kit#v31-kit#v31-kit#v31-kit){flex:none;display:inline-block;box-sizing:border-box;width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;opacity:.9;animation:v31-busy .7s linear infinite}
@keyframes v31-busy{to{transform:rotate(360deg)}}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit)[aria-busy="true"]{cursor:progress;pointer-events:none;box-shadow:none;transform:none}
.v31-btn--crm:not(#v31-kit#v31-kit#v31-kit#v31-kit)[aria-busy="true"],.v31-btn--primary:not(#v31-kit#v31-kit#v31-kit#v31-kit)[aria-busy="true"]{background-image:none;filter:saturate(.7) brightness(1.12)}
.v31-btn--ghost:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled],.v31-btn--ghost:not(#v31-kit#v31-kit#v31-kit#v31-kit)[disabled]:hover{background-color:transparent;border-color:transparent}
.v31-btn:not(#v31-kit#v31-kit#v31-kit#v31-kit):not(.v31-btn--crm):not(.v31-btn--primary)[aria-busy="true"]{background-color:var(--v31-surface-2);background-image:none;color:var(--v31-text-2)}

/* 5. Toast line: what the last press did, with Atsaukt while undo is possible. Bottom centre, one at a time. */
.v31-toast:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:flex;align-items:center;gap:12px;box-sizing:border-box;min-height:44px;max-width:min(720px,calc(100vw - 48px));padding:6px 6px 6px 16px;border-radius:12px;
  background:var(--v31-text);color:#fff;box-shadow:var(--v31-sh-overlay);font:var(--v31-fw-bold) var(--v31-fs)/var(--v31-lh-row) var(--v31-font)}
.v31-toast:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-toast-tx{flex:1;min-width:0;padding:4px 0;text-wrap:pretty}
.v31-toast:not(#v31-kit#v31-kit#v31-kit#v31-kit)>button{flex:none;box-sizing:border-box;height:auto;min-height:32px;margin:0;padding:0 12px;border:0;border-radius:8px;background:rgba(255,255,255,.18);color:#fff;
  font:var(--v31-fw-heavy) var(--v31-fs)/1 var(--v31-font);letter-spacing:0;box-shadow:none;cursor:pointer}
.v31-toast:not(#v31-kit#v31-kit#v31-kit#v31-kit)>button:hover{background:rgba(255,255,255,.28)}
.v31-toast:not(#v31-kit#v31-kit#v31-kit#v31-kit)>button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.v31-toast--refused:not(#v31-kit#v31-kit#v31-kit#v31-kit){background:#5d2622}
.v31-toast:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-i{flex:none;color:#fff}
/* The toast region (loop check 3.5, moved from workspace-deal-tab.css): every module that shows a toast (deal tab, sheet, board,
 * Partneri, people panel) puts it in #v31-toast-region, so its place belongs to the kit. Bottom centre on PC; on a window up to
 * 720 px wide it docks at the top (JS sets the offset under the header). With the kit guard like every kit rule, so the same lines
 * left in workspace-deal-tab.css change nothing and can go. */
.v31-toast-region:not(#v31-kit#v31-kit#v31-kit#v31-kit){position:fixed;left:50%;bottom:24px;z-index:2147483000;transform:translateX(-50%);display:flex;justify-content:center;pointer-events:none;width:max-content;max-width:calc(100vw - 32px)}
.v31-toast-region.is-top:not(#v31-kit#v31-kit#v31-kit#v31-kit){bottom:auto;top:8px}
.v31-toast-region:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-toast{pointer-events:auto}
@media (prefers-reduced-motion:no-preference){.v31-toast-region:not(#v31-kit#v31-kit#v31-kit#v31-kit)>.v31-toast{animation:v31-toast-in .22s var(--v31-ease)}}
@keyframes v31-toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* 6. Nezvanīt: the same mark wherever the person appears. A state, so a flat chip; red is reserved for it, lateness and refusal. */
.v31-dnc:not(#v31-kit#v31-kit#v31-kit#v31-kit){display:inline-flex;align-items:center;gap:5px;box-sizing:border-box;min-height:22px;padding:2px 9px 2px 7px;border-radius:999px;background:var(--v31-late-bg);color:var(--v31-late);
  font:var(--v31-fw-bold) var(--v31-fs-xs)/18px var(--v31-font);white-space:nowrap;vertical-align:middle}
.v31-dnc:not(#v31-kit#v31-kit#v31-kit#v31-kit) .v31-i{width:13px;height:13px;stroke-width:2.2}

@media (prefers-reduced-motion:reduce){
  .v31-skel:not(#v31-kit#v31-kit#v31-kit#v31-kit){animation:none}
  .v31-busy:not(#v31-kit#v31-kit#v31-kit#v31-kit){animation:none;border-right-color:currentColor;border-style:dotted}
}
@media (forced-colors:active){.v31-notice:not(#v31-kit#v31-kit#v31-kit#v31-kit),.v31-empty:not(#v31-kit#v31-kit#v31-kit#v31-kit){border-color:CanvasText}.v31-dnc:not(#v31-kit#v31-kit#v31-kit#v31-kit){border:1px solid CanvasText}}
/* ===== END state kit ===== */

/* ===== the page frame (every page the shell renders) ===== */
#content.v31-content{background:var(--v31-bg)}
.v31-page{box-sizing:border-box;min-height:calc(100vh - 64px);padding:var(--v31-s-6) var(--v31-s-8) var(--v31-s-8);background:var(--v31-bg);color:var(--v31-text);
  font:var(--v31-fw) var(--v31-fs)/var(--v31-lh) var(--v31-font);font-variant-numeric:tabular-nums}
.v31-page *,.v31-page *::before,.v31-page *::after{box-sizing:border-box}
.v31-page-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--v31-s-3);min-height:var(--v31-btn);margin:0 0 var(--v31-s-5)}
.v31-page-title{margin:0;margin-right:auto;color:var(--v31-text);font:var(--v31-fw-heavy) var(--v31-fs-xl)/var(--v31-lh-head) var(--v31-font);letter-spacing:-.01em}
.v31-page-title:focus{outline:none}
.v31-page-title:focus-visible{outline:2px solid var(--v31-focus);outline-offset:4px;border-radius:4px}
.v31-page-body{min-width:0}
.v31-page-empty,.v31-page-error{margin:0;padding:var(--v31-s-5) var(--v31-pad);border:1px solid var(--v31-line);border-radius:var(--v31-r);background:var(--v31-surface);color:var(--v31-text-2)}
.v31-page-error{border-color:var(--v31-late-bg);color:var(--v31-late)}
.v31-page :focus-visible{outline:2px solid var(--v31-focus);outline-offset:2px}
@media (max-width:900px){.v31-page{padding:var(--v31-s-4)}}

/* ===== navigation: six items with icons, More always reachable ===== */
/* a page that is not enabled (not registered, or registered with enabled:false) has no navigation item; the shell sets data-v31-off */
#workspace-navigation [data-v31-off],#more-dialog [data-v31-off]{display:none!important}
/* language buttons (data-lmf-lang) stand in for the select, which stays in the page and keeps working */
.v31-lang{display:inline-flex;gap:4px}
[data-language-control].v31-lang-on>select[data-language-select]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#workspace-navigation [data-v31-nav]>.v31-nav-icon{width:18px;height:18px;stroke-width:2}
#workspace-navigation>nav>#nav-more{display:inline-flex}
/* the three new items are also listed in More, shown there only when the bar is too narrow for them */
#more-dialog nav>a.v31-more-compact{display:none}
#more-dialog nav>a[data-v31-nav]>.v31-nav-icon{width:18px;height:18px}

/* the current page: a light tab that opens onto the page, its icon in the section colour (concept header) */
@media (min-width:1121px){
  #workspace-navigation>nav>a.active[data-v31-nav],
  #workspace-navigation #browse-toggle.search-parent-current[data-v31-nav]{
    align-self:flex-end;min-height:48px;border-radius:10px 10px 0 0;background:var(--v31-bg);color:var(--v31-text);font-weight:var(--v31-fw-bold)}
  #workspace-navigation>nav>a.active[data-v31-nav]::after,
  #workspace-navigation #browse-toggle.search-parent-current[data-v31-nav]::after{content:none}
  #workspace-navigation>nav>a.active[data-v31-nav]>.v31-nav-icon,
  #workspace-navigation #browse-toggle.search-parent-current[data-v31-nav]>.v31-nav-icon{color:var(--v31-accent)}
  #workspace-navigation>nav>a.active[data-v31-nav]:hover,
  #workspace-navigation #browse-toggle.search-parent-current[data-v31-nav]:hover{background:var(--v31-bg);color:var(--v31-text)}
  #workspace-navigation>nav>a.active[data-v31-nav]:focus-visible,
  #workspace-navigation #browse-toggle.search-parent-current[data-v31-nav]:focus-visible{outline-color:var(--v31-focus)}
}
/* narrower than the six items need: Izbraukumi, Darījumi and Partneri move into More */
@media (max-width:1120px){
  #workspace-navigation>nav>a[data-v31-nav="trips"],
  #workspace-navigation>nav>a[data-v31-nav="deals"],
  #workspace-navigation>nav>a[data-v31-nav="partners"]{display:none}
  #more-dialog nav>a.v31-more-compact{display:flex}
}
/* phone: Šodien, Plānotājs, Pārlūks and More in the bar (was five columns with Contacts) */
@media (max-width:900px){
  #workspace-navigation>nav{grid-template-columns:repeat(4,minmax(0,1fr))}
  #workspace-navigation [data-v31-nav]>.v31-nav-icon{width:20px;height:20px}
}
@media (forced-colors:active){
  #workspace-navigation>nav>a.active[data-v31-nav],#workspace-navigation #browse-toggle.search-parent-current[data-v31-nav]{background:Highlight;color:HighlightText}
}
