/* ==========================================================================
   BS® Business + Construction Management — styles
   Loaded last. Selectors start with ":is(#erp#erp#erp#erp#erp, html) body"
   so they win over the earlier !important layers (same technique as
   responsive.css, one ID heavier). Visual language follows the existing app.
   ========================================================================== */
:root {
  --erp-ink: #1d1d1f;
  --erp-muted: #6e6e73;
  --erp-line: rgba(0, 0, 0, .08);
  --erp-soft: #f5f5f7;
  --erp-surface: #fff;
  --erp-blue: #0a84ff;
  --erp-green: #30a46c;
  --erp-orange: #ff9f0a;
  --erp-red: #ff3b30;
  --erp-purple: #8e5cf7;
  --erp-radius: 18px;
}

/* ---------- Sidebar: scroll area, compact items, group headings ---------- */
@media (min-width: 901px) { :is(#erp#erp#erp#erp#erp, html) body .sidebar { display: flex !important; flex-direction: column !important; } }
:is(#erp#erp#erp#erp#erp, html) body .erp-sidebar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -6px; padding: 0 6px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
:is(#erp#erp#erp#erp#erp, html) body .erp-sidebar-scroll::-webkit-scrollbar { width: 6px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 6px; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar #nav,
:is(#erp#erp#erp#erp#erp, html) body .sidebar #erp-nav { display: flex !important; flex-direction: column !important; gap: 2px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: visible !important; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-sidebar-scroll .nav-item:not([hidden]) {
  min-height: 40px !important; height: 40px !important; padding: 0 12px !important; gap: 12px !important;
  border-radius: 11px !important; font-size: 14px !important; line-height: 1.15 !important; margin: 0 !important;
}
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-sidebar-scroll .nav-item .nav-label { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-sidebar-scroll .nav-item .nav-icon,
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-sidebar-scroll .nav-item .nav-icon svg { width: 19px !important; height: 19px !important; flex: 0 0 19px !important; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-heading {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin: 16px 0 4px; padding: 0 12px; border: 0; background: none; color: rgba(255,255,255,.42);
  font: 700 10.5px/1.2 inherit; letter-spacing: .09em; text-transform: uppercase; text-align: left; cursor: default;
}
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-sidebar-scroll > .erp-nav-heading:first-child { margin-top: 0; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-toggle { cursor: pointer; min-height: 24px; border-radius: 8px; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-toggle:hover { color: rgba(255,255,255,.8); }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .2s ease; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-group.collapsed .erp-nav-toggle svg { transform: rotate(-90deg); }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-group.collapsed .erp-nav-items { display: none; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-items { display: flex; flex-direction: column; gap: 2px; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-group[hidden] { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-item { position: relative !important; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-badge {
  margin-left: auto !important; min-width: 20px !important; width: auto !important; height: 20px !important; padding: 0 6px !important;
  border-radius: 999px; background: var(--erp-red); color: #fff; font-size: 11px !important; font-weight: 750; line-height: 20px; text-align: center;
}
:is(#erp#erp#erp#erp#erp, html) body .sidebar .erp-nav-badge[hidden] { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-bottom { flex: 0 0 auto !important; margin-top: 10px !important; }

/* Collapsed (icons only) sidebar */
:is(#erp#erp#erp#erp#erp, html) body .app-shell.sidebar-collapsed .erp-nav-heading { height: 1px; min-height: 1px; margin: 10px auto; padding: 0; width: 40px; background: rgba(255,255,255,.14); font-size: 0; }
:is(#erp#erp#erp#erp#erp, html) body .app-shell.sidebar-collapsed .erp-nav-heading svg { display: none; }
:is(#erp#erp#erp#erp#erp, html) body .app-shell.sidebar-collapsed .erp-nav-group.collapsed .erp-nav-items { display: flex; }
:is(#erp#erp#erp#erp#erp, html) body .app-shell.sidebar-collapsed .sidebar .erp-sidebar-scroll .nav-item:not([hidden]) { height: 44px !important; min-height: 44px !important; justify-content: center !important; padding: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .app-shell.sidebar-collapsed .sidebar .erp-nav-badge { position: absolute !important; top: 3px; right: 6px; min-width: 16px !important; height: 16px !important; line-height: 16px; font-size: 9.5px !important; padding: 0 4px !important; }

/* Topbar: hide the documents button in ERP views */
:is(#erp#erp#erp#erp#erp, html) body.erp-view-active #new-invoice { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body #erp-new-button[hidden] { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .btn svg, :is(#erp#erp#erp#erp#erp, html) body .btn-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
:is(#erp#erp#erp#erp#erp, html) body .btn:has(svg) { display: inline-flex; align-items: center; gap: 7px; justify-content: center; }

/* ---------- KPI cards ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0 0 18px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi.erp-kpi {
  display: flex !important; align-items: center !important; gap: 14px !important; min-height: 0 !important; height: auto !important;
  padding: 18px 20px !important; border-radius: var(--erp-radius) !important; border: 1px solid var(--erp-line) !important;
  background: var(--erp-surface) !important; box-shadow: 0 8px 24px rgba(20,25,35,.05) !important; min-width: 0 !important;
}
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi.erp-kpi::after { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi.erp-kpi.kpi-action { cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi.erp-kpi.kpi-action:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(20,25,35,.09) !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi-icon { width: 46px !important; height: 46px !important; min-width: 46px !important; flex: 0 0 46px !important; border-radius: 14px !important; display: grid !important; place-items: center !important; font-size: 15px !important; font-weight: 800 !important; margin: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi-icon.red { background: #ffe9e7 !important; color: #d70015 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) { display: flex !important; flex-direction: column !important; min-width: 0 !important; gap: 2px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) span { order: 1; margin: 0 !important; font-size: 10.5px !important; font-weight: 700 !important; letter-spacing: .06em !important; text-transform: uppercase !important; color: var(--erp-muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) strong { order: 2; margin: 0 !important; font-size: 22px !important; line-height: 1.2 !important; font-weight: 700 !important; letter-spacing: -.02em !important; color: var(--erp-ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) small { order: 3; margin: 0 !important; font-size: 12px !important; color: var(--erp-muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Toolbar ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 10px !important; padding: 12px !important; margin: 0 0 18px !important; border-radius: var(--erp-radius) !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar > * { flex: 0 1 auto !important; width: auto !important; min-width: 0 !important; margin: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar .erp-search { flex: 1 1 240px !important; max-width: 420px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar select { flex: 0 1 200px !important; max-width: 230px !important; height: 42px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar .btn { height: 42px !important; min-height: 42px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-spacer { flex: 1 1 auto !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-mode-switch { display: inline-flex !important; margin-left: auto !important; padding: 3px; gap: 2px; border-radius: 12px; background: var(--erp-soft); border: 1px solid var(--erp-line); }
:is(#erp#erp#erp#erp#erp, html) body .erp-mode-switch button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--erp-muted); font: 600 13px/1 inherit; cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-mode-switch button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
:is(#erp#erp#erp#erp#erp, html) body .erp-mode-switch button.active { background: #fff; color: var(--erp-ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ---------- Panels and tables ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-panel { margin: 0 0 18px !important; border-radius: var(--erp-radius) !important; overflow: hidden; min-width: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-panel .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-table tbody tr.erp-row { cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-table tbody tr.erp-row:hover td { background: rgba(10,132,255,.035); }
:is(#erp#erp#erp#erp#erp, html) body .erp-table td { vertical-align: middle; }
:is(#erp#erp#erp#erp#erp, html) body .erp-table tfoot td { background: var(--erp-soft); font-weight: 700; }
:is(#erp#erp#erp#erp#erp, html) body .table-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--erp-muted); font-weight: 400; }
:is(#erp#erp#erp#erp#erp, html) body .erp-actions-head { width: 1%; }
:is(#erp#erp#erp#erp#erp, html) body .erp-row-actions { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-row-actions .icon-btn,
:is(#erp#erp#erp#erp#erp, html) body .erp-project-foot .icon-btn { width: 34px !important; height: 34px !important; min-width: 34px !important; display: inline-grid !important; place-items: center !important; padding: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-row-actions .icon-btn svg,
:is(#erp#erp#erp#erp#erp, html) body .erp-project-foot .icon-btn svg,
:is(#erp#erp#erp#erp#erp, html) body .erp-icon-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:is(#erp#erp#erp#erp#erp, html) body .erp-icon-link { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--erp-soft); color: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-icons { display: flex; gap: 4px; align-items: center; }
.erp-empty { padding: 46px 20px !important; text-align: center; }
.erp-empty strong { display: block; margin-bottom: 6px; font-size: 16px; color: var(--erp-ink); }
.erp-empty span { display: block; color: var(--erp-muted); font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-text-danger { color: #d70015 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-text-warn { color: #c25e00 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-text-ok { color: #1f8a4c !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-text-info { color: #006edb !important; }
:is(#erp#erp#erp#erp#erp, html) body .badge.erp-badge { display: inline-flex; align-items: center; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .badge.erp-badge.info { background: #e8f2ff !important; color: #006edb !important; }
:is(#erp#erp#erp#erp#erp, html) body .badge.erp-badge.danger { background: #ffe9e7 !important; color: #d70015 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bar { display: block; width: 100%; min-width: 70px; height: 7px; border-radius: 99px; background: rgba(0,0,0,.07); overflow: hidden; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bar.ok i { background: var(--erp-green); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bar.warn i { background: var(--erp-orange); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bar.danger i { background: var(--erp-red); }
:is(#erp#erp#erp#erp#erp, html) body td.right .erp-bar { margin: 6px 0 0 auto; max-width: 140px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
:is(#erp#erp#erp#erp#erp, html) body .erp-two-col.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
/* A table with many columns needs the whole width: squeezed into half of a two-column
   row, the worker payments table had its amount column cut off. */
:is(#erp#erp#erp#erp#erp, html) body .erp-wide-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
:is(#erp#erp#erp#erp#erp, html) body #view-inventory .erp-two-col { grid-template-columns: minmax(0, 1fr); }
:is(#erp#erp#erp#erp#erp, html) body .erp-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--erp-soft); color: var(--erp-muted); font-size: 13px; }

/* ---------- Kanban board ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-board-scroll { overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; min-width: min-content; }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-col { display: flex; flex-direction: column; gap: 10px; min-height: 260px; padding: 12px; border-radius: var(--erp-radius); background: rgba(0,0,0,.035); border: 1px solid transparent; transition: border-color .15s, background .15s; }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-col.drop-target { border-color: var(--erp-blue); background: rgba(10,132,255,.06); }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-col header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px; font-size: 13px; font-weight: 700; color: var(--erp-ink); }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-col header b { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; background: #fff; font-size: 12px; line-height: 22px; text-align: center; }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-total { padding: 0 4px; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-cards { display: flex; flex-direction: column; gap: 9px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-board-empty { padding: 18px; text-align: center; color: rgba(0,0,0,.25); }
:is(#erp#erp#erp#erp#erp, html) body .erp-card { display: flex; flex-direction: column; gap: 5px; padding: 13px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--erp-line); box-shadow: 0 2px 8px rgba(0,0,0,.04); cursor: pointer; transition: transform .15s, box-shadow .15s; }
:is(#erp#erp#erp#erp#erp, html) body .erp-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
:is(#erp#erp#erp#erp#erp, html) body .erp-card.dragging { opacity: .45; }
:is(#erp#erp#erp#erp#erp, html) body .erp-card strong { font-size: 14px; line-height: 1.3; color: var(--erp-ink); }
:is(#erp#erp#erp#erp#erp, html) body .erp-card > span { font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-card-top, :is(#erp#erp#erp#erp#erp, html) body .erp-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-card-foot { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--erp-line); font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-card-foot b { color: var(--erp-ink); font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #000; color: #fff; font-size: 10px; font-weight: 700; }

/* ---------- Apartment stacking plan ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-plan .panel-head { flex-wrap: wrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-plan-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-plan-legend span { display: inline-flex; align-items: center; gap: 6px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-plan-legend i { width: 12px; height: 12px; border-radius: 4px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-stack-scroll { overflow-x: auto; padding: 0 22px 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-stack { display: flex; flex-direction: column; gap: 8px; min-width: min-content; }
:is(#erp#erp#erp#erp#erp, html) body .erp-stack-row { display: grid; grid-template-columns: 110px auto; gap: 10px; align-items: stretch; }
:is(#erp#erp#erp#erp#erp, html) body .erp-stack-floor { display: flex; align-items: center; padding: 0 12px; border-radius: 12px; background: var(--erp-soft); font-size: 12.5px; font-weight: 700; color: var(--erp-ink); }
:is(#erp#erp#erp#erp#erp, html) body .erp-stack-units { display: flex; gap: 8px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-unit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 128px; min-height: 76px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; text-align: left; cursor: pointer; font: inherit; transition: transform .15s, box-shadow .15s; }
:is(#erp#erp#erp#erp#erp, html) body .erp-unit:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.1); }
:is(#erp#erp#erp#erp#erp, html) body .erp-unit strong { font-size: 14px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-unit span, :is(#erp#erp#erp#erp#erp, html) body .erp-unit small { font-size: 11.5px; opacity: .8; }
:is(#erp#erp#erp#erp#erp, html) body .apt-available { background: #e8f8ee !important; color: #136c3a !important; border-color: #bfe9cf !important; }
:is(#erp#erp#erp#erp#erp, html) body .apt-reserved { background: #fff3e1 !important; color: #8a4b00 !important; border-color: #ffd9a0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .apt-sold { background: #ffe9e7 !important; color: #9d0b18 !important; border-color: #ffc4be !important; }
:is(#erp#erp#erp#erp#erp, html) body .apt-notForSale { background: #f0f1f4 !important; color: #5f6570 !important; border-color: #dfe1e6 !important; }

/* ---------- Progress matrix ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-matrix th.center, :is(#erp#erp#erp#erp#erp, html) body .erp-matrix td.center { text-align: center; }
:is(#erp#erp#erp#erp#erp, html) body .erp-matrix th { white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-cell-pct { position: relative; width: 58px; height: 34px; border: 0; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.05); color: var(--erp-muted); font: 700 12px/34px inherit; cursor: pointer; isolation: isolate; }
:is(#erp#erp#erp#erp#erp, html) body .erp-cell-pct::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); background: rgba(10,132,255,.18); z-index: -1; }
:is(#erp#erp#erp#erp#erp, html) body .erp-cell-pct.started { color: #005bb5; }
:is(#erp#erp#erp#erp#erp, html) body .erp-cell-pct.done { background: #e8f8ee; color: #136c3a; }
:is(#erp#erp#erp#erp#erp, html) body .erp-cell-pct.done::before { background: transparent; }
:is(#erp#erp#erp#erp#erp, html) body .erp-matrix td.right .erp-bar { margin-top: 6px; }

/* ---------- Gallery ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 0 22px 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--erp-soft); cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo:hover img { transform: scale(1.04); }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo figcaption { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo figcaption strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo figcaption span { font-size: 11px; opacity: .85; }
:is(#erp#erp#erp#erp#erp, html) body .erp-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo-large { display: block; margin: 0 0 18px; border-radius: 16px; overflow: hidden; background: #000; }
:is(#erp#erp#erp#erp#erp, html) body .erp-photo-large img { display: block; width: 100%; max-height: 60vh; object-fit: contain; }

/* ---------- Lists, feeds, alerts ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-feed, :is(#erp#erp#erp#erp#erp, html) body .erp-alerts, :is(#erp#erp#erp#erp#erp, html) body .erp-mini-list, :is(#erp#erp#erp#erp#erp, html) body .erp-timeline { list-style: none; margin: 0; padding: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed { padding: 0 12px 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li.erp-row { cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li:hover { background: var(--erp-soft); }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li.unread strong { color: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li strong, :is(#erp#erp#erp#erp#erp, html) body .erp-alerts strong { display: block; font-size: 14px; font-weight: 650; color: var(--erp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li small, :is(#erp#erp#erp#erp#erp, html) body .erp-alerts small { display: block; margin-top: 2px; font-size: 12px; color: var(--erp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed li b { font-size: 13px; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--erp-soft); color: var(--erp-muted); font-weight: 800; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed-icon.in { background: #e8f2ff; color: #006edb; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed-icon.out { background: #fff3e1; color: #b45309; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed-icon.adjust { background: #f0e9ff; color: #6d3fd9; }
:is(#erp#erp#erp#erp#erp, html) body .erp-feed-icon.late { background: #ffe9e7; color: #d70015; }
:is(#erp#erp#erp#erp#erp, html) body .erp-alerts { padding: 0 12px 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-alert { display: grid; grid-template-columns: 10px minmax(0, 1fr) 14px; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-alert:hover { background: var(--erp-soft); }
:is(#erp#erp#erp#erp#erp, html) body .erp-alert-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-alert.danger .erp-alert-dot { background: var(--erp-red); box-shadow: 0 0 0 4px rgba(255,59,48,.14); }
:is(#erp#erp#erp#erp#erp, html) body .erp-alert.warn .erp-alert-dot { background: var(--erp-orange); box-shadow: 0 0 0 4px rgba(255,159,10,.15); }
:is(#erp#erp#erp#erp#erp, html) body .erp-alert-go { color: rgba(0,0,0,.3); font-size: 20px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-mini-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--erp-line); font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-mini-list li small { color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-timeline li { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--erp-line); margin-left: 5px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-timeline li::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-timeline b { display: block; font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-timeline small { display: block; color: var(--erp-muted); font-size: 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-timeline p { margin: 5px 0; font-size: 13px; }

/* ---------- Charts ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-chart { padding: 0 22px 18px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart svg { display: block; width: 100%; height: 200px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-grid line { stroke: rgba(0,0,0,.07); stroke-width: 1; vector-effect: non-scaling-stroke; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-axis text { fill: var(--erp-muted); font-size: 11px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-legend i.budget { background: rgba(10,132,255,.25); }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-legend i.actual { background: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-legend i.over { background: var(--erp-red); }
:is(#erp#erp#erp#erp#erp, html) body .erp-hbars { display: flex; flex-direction: column; gap: 12px; padding: 0 22px 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-hbars > div { display: grid; grid-template-columns: minmax(110px, 160px) minmax(60px, 1fr) auto; gap: 12px; align-items: center; font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-hbars > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-hbars b { font-weight: 650; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva { display: flex; flex-direction: column; gap: 16px; padding: 4px 22px 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px; gap: 14px; align-items: center; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-label strong { display: block; font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-label small { font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-bars { display: flex; flex-direction: column; gap: 4px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-bars span { display: block; height: 9px; border-radius: 99px; min-width: 2px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-bars .budget { background: rgba(10,132,255,.25); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-bars .actual { background: var(--erp-blue); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-bars .actual.over { background: var(--erp-red); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-values { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-bva-values b { color: var(--erp-ink); font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-aging { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 22px 18px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-aging > div { padding: 12px; border-radius: 12px; background: var(--erp-soft); border-top: 3px solid var(--erp-green); min-width: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-aging > div.warn { border-top-color: var(--erp-orange); }
:is(#erp#erp#erp#erp#erp, html) body .erp-aging > div.danger { border-top-color: var(--erp-red); }
:is(#erp#erp#erp#erp#erp, html) body .erp-aging span { display: block; font-size: 11px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-aging strong { display: block; margin-top: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-ring { --p: 0; position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--erp-blue) calc(var(--p) * 1%), rgba(0,0,0,.07) 0); }
:is(#erp#erp#erp#erp#erp, html) body .erp-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
:is(#erp#erp#erp#erp#erp, html) body .erp-ring strong { position: relative; font-size: 12px; }

/* ---------- Dashboard section ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-dashboard { margin-top: 26px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dashboard[hidden] { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash-head { margin: 0 0 14px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash-head h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.02em; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash-head p { margin: 0; color: var(--erp-muted); font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash-grid .erp-panel { margin: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-building-list { display: flex; flex-direction: column; padding: 0 12px 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-building-list > div { display: grid; grid-template-columns: minmax(0, 1fr) 54px 70px; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-building-list strong { display: block; font-size: 14px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-building-list small { display: block; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-building-sales { text-align: right; }
:is(#erp#erp#erp#erp#erp, html) body .erp-building-sales span { display: block; font-weight: 700; font-size: 15px; }

/* ---------- Projects portfolio ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-portfolio { margin-bottom: 18px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-portfolio .panel-head .btn { flex: 0 0 auto; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; padding: 0 22px 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--erp-line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-card.selected { border-color: #000; box-shadow: 0 0 0 1px #000; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-top strong { display: block; font-size: 15px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-top small { display: block; margin-top: 2px; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-stats div { padding: 8px; border-radius: 10px; background: var(--erp-soft); min-width: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-stats span { display: block; font-size: 10px; color: var(--erp-muted); text-transform: uppercase; letter-spacing: .05em; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-stats b { display: block; margin-top: 2px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-bar { display: grid; grid-template-columns: 116px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-bar small { text-align: right; font-weight: 650; color: var(--erp-ink); }
:is(#erp#erp#erp#erp#erp, html) body .erp-project-foot { display: flex; justify-content: space-between; align-items: center; min-height: 34px; font-size: 12px; color: var(--erp-muted); }

/* ---------- Modal: form ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-modal .dialog.erp-dialog { width: min(980px, calc(100vw - 32px)) !important; max-width: 980px !important; max-height: calc(100dvh - 40px) !important; display: flex !important; flex-direction: column !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-modal .dialog.erp-dialog > form { display: flex !important; flex-direction: column !important; min-height: 0 !important; flex: 1 1 auto !important; padding: 0 !important; overflow: hidden !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-form-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; padding: 24px 28px 28px; align-content: start; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field { display: flex !important; flex-direction: column !important; gap: 7px !important; min-width: 0; margin: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field[hidden] { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field.span-2 { grid-column: span 2; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field.span-full, :is(#erp#erp#erp#erp#erp, html) body .erp-form-section { grid-column: 1 / -1; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field-label { font-size: 12px; font-weight: 600; color: #58616c; letter-spacing: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field-hint { font-size: 11.5px; color: var(--erp-muted); line-height: 1.35; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field input:not([type=checkbox]):not([type=file]),
:is(#erp#erp#erp#erp#erp, html) body .erp-field select,
:is(#erp#erp#erp#erp#erp, html) body .erp-field textarea { width: 100% !important; min-width: 0 !important; min-height: 42px; padding: 10px 12px !important; border: 1px solid rgba(60,60,67,.18) !important; border-radius: 11px !important; background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; transform: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field textarea { min-height: 84px; resize: vertical; line-height: 1.4 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field input:focus, :is(#erp#erp#erp#erp#erp, html) body .erp-field select:focus, :is(#erp#erp#erp#erp#erp, html) body .erp-field textarea:focus { border-color: var(--erp-blue) !important; box-shadow: 0 0 0 3px rgba(10,132,255,.14) !important; outline: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field.invalid input, :is(#erp#erp#erp#erp#erp, html) body .erp-field.invalid select, :is(#erp#erp#erp#erp#erp, html) body .erp-field.invalid textarea, :is(#erp#erp#erp#erp#erp, html) body .erp-field.invalid .erp-table-editor, :is(#erp#erp#erp#erp#erp, html) body .erp-field.invalid .erp-file-field { border-color: var(--erp-red) !important; box-shadow: 0 0 0 3px rgba(255,59,48,.12) !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-field.invalid .erp-field-label { color: #d70015; }
:is(#erp#erp#erp#erp#erp, html) body .erp-form-section { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--erp-line); }
:is(#erp#erp#erp#erp#erp, html) body .erp-form-section strong { font-size: 14px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-form-section span { font-size: 12px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-check { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; font-size: 14px; color: var(--erp-ink); }
:is(#erp#erp#erp#erp#erp, html) body .erp-check input { width: 19px; height: 19px; accent-color: #000; }
:is(#erp#erp#erp#erp#erp, html) body .erp-form-actions { display: flex !important; align-items: center !important; gap: 10px !important; padding: 16px 28px !important; border-top: 1px solid var(--erp-line) !important; position: static !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-form-actions .btn[hidden] { display: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-actions { display: flex !important; flex-wrap: wrap; justify-content: flex-end !important; gap: 10px !important; padding: 16px 28px !important; border-top: 1px solid var(--erp-line) !important; position: static !important; }

/* Table editor (lines, payments, installments) */
:is(#erp#erp#erp#erp#erp, html) body .erp-table-editor { border: 1px solid rgba(60,60,67,.14); border-radius: 14px; overflow: hidden; background: #fff; }
:is(#erp#erp#erp#erp#erp, html) body .erp-table-editor .table-wrap { border-radius: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table { width: 100%; border-collapse: collapse; }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table th { padding: 9px 8px !important; font-size: 10px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table td { padding: 6px 6px !important; border-bottom: 1px solid var(--erp-line); }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table input:not([type=checkbox]), :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table select { width: 100% !important; min-width: 64px; height: 36px !important; min-height: 36px !important; padding: 6px 9px !important; font-size: 13px !important; border: 1px solid rgba(60,60,67,.14) !important; border-radius: 9px !important; background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; transform: none !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table td.right input { text-align: right; }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table input[type=checkbox] { width: 18px; height: 18px; accent-color: #000; }
:is(#erp#erp#erp#erp#erp, html) body .erp-edit-table .erp-computed { display: block; min-width: 90px; font-weight: 650; font-size: 13px; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-row-remove-cell { width: 40px; text-align: center; }
:is(#erp#erp#erp#erp#erp, html) body .erp-row-remove { width: 30px !important; height: 30px !important; min-width: 30px !important; padding: 0 !important; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-table-editor-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px; background: var(--erp-soft); }
:is(#erp#erp#erp#erp#erp, html) body .erp-totals { margin: 0; display: grid; gap: 4px; min-width: 220px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-totals div { display: flex; justify-content: space-between; gap: 18px; font-size: 13px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-totals dt { color: var(--erp-muted); margin: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-totals dd { margin: 0; font-weight: 650; }
:is(#erp#erp#erp#erp#erp, html) body .erp-totals .grand { padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--erp-line); font-size: 15px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-totals .grand dd { font-weight: 800; }
:is(#erp#erp#erp#erp#erp, html) body .erp-plan-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--erp-muted); }

/* Files */
:is(#erp#erp#erp#erp#erp, html) body .erp-file-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; border: 1px dashed rgba(60,60,67,.25); border-radius: 12px; background: #fff; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-list { display: flex; flex-wrap: wrap; gap: 8px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-list:empty { display: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 5px 8px 5px 5px; border-radius: 10px; background: var(--erp-soft); font-size: 12.5px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-chip img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-chip > svg { width: 22px; height: 22px; margin-left: 4px; fill: none; stroke: var(--erp-blue); stroke-width: 2; flex: 0 0 auto; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-chip a { color: var(--erp-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-file-remove { border: 0; background: none; color: var(--erp-muted); font-size: 18px; cursor: pointer; padding: 0 2px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-upload-btn { cursor: pointer; }
:is(#erp#erp#erp#erp#erp, html) body .erp-upload-btn.loading { opacity: .55; pointer-events: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-static { min-height: 0; }

/* ---------- Modal: detail ---------- */
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 28px 28px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid > div { padding: 12px 14px; border-radius: 12px; background: var(--erp-soft); min-width: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid > div:empty { display: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid > div.span-full { grid-column: 1 / -1; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--erp-muted); font-weight: 650; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid strong { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-section { margin-top: 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-section h3 { margin: 0 0 10px; font-size: 15px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-section .table-wrap { border: 1px solid var(--erp-line); border-radius: 12px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-body > .erp-table-summary, :is(#erp#erp#erp#erp#erp, html) body .erp-detail-section .erp-table-summary { display: flex; justify-content: flex-end; padding: 10px 4px 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-link-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-link-stats div { padding: 12px; border-radius: 12px; border: 1px solid var(--erp-line); }
:is(#erp#erp#erp#erp#erp, html) body .erp-link-stats span { display: block; font-size: 11px; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-link-stats strong { display: block; margin-top: 3px; font-size: 16px; }

/* ---------- Laptop ---------- */
@media (max-width: 1280px) {
  :is(#erp#erp#erp#erp#erp, html) body .erp-two-col, :is(#erp#erp#erp#erp#erp, html) body .erp-two-col.wide-left, :is(#erp#erp#erp#erp#erp, html) body #view-inventory .erp-two-col, :is(#erp#erp#erp#erp#erp, html) body .erp-dash-grid { grid-template-columns: minmax(0, 1fr); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Tablet portrait + phones (bottom dock) ---------- */
@media (max-width: 900px) {
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .erp-sidebar-scroll { display: contents !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .erp-sidebar-scroll > .erp-nav-heading { display: none !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .erp-sidebar-scroll .nav-item:not([hidden]) { height: 56px !important; min-height: 56px !important; padding: 4px 2px !important; gap: 3px !important; font-size: 10.5px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar #nav { flex-direction: row !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .sidebar-bottom #erp-nav { display: flex !important; flex-direction: column !important; gap: 2px !important; width: 100% !important; padding: 0 0 8px !important; margin: 0 0 4px !important; border-bottom: 1px solid rgba(255,255,255,.1) !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .sidebar-bottom .erp-nav-heading { margin: 10px 0 4px; padding: 0 12px; color: rgba(255,255,255,.45); }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .sidebar-bottom .erp-nav-items .nav-item:not([hidden]) { height: 44px !important; min-height: 44px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .sidebar-bottom .erp-nav-badge { margin-left: auto !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell .sidebar .sidebar-bottom .erp-nav-items .nav-icon svg { width: 20px !important; height: 20px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi.erp-kpi { padding: 14px !important; gap: 10px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi-icon { width: 38px !important; height: 38px !important; min-width: 38px !important; flex-basis: 38px !important; border-radius: 12px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) strong { font-size: 17px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar .erp-search { flex: 1 1 100% !important; max-width: none !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar select { flex: 1 1 140px !important; max-width: none !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-mode-switch { margin-left: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-form-grid { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-field.span-2 { grid-column: auto; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-detail-body { padding: 18px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-form-actions, :is(#erp#erp#erp#erp#erp, html) body .erp-detail-actions { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-modal .dialog.erp-dialog { width: 100vw !important; max-width: 100vw !important; max-height: 100dvh !important; height: 100dvh !important; border-radius: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-bva-row { grid-template-columns: 110px minmax(0, 1fr); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-bva-values { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-stack-row { grid-template-columns: 82px auto; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-unit { width: 108px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 0 14px 14px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-board { grid-auto-columns: 82vw; }
  :is(#erp#erp#erp#erp#erp, html) body #erp-new-button span { white-space: nowrap; }
  /* Mobile tables become cards */
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table thead { display: none; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table, :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody, :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tr, :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table td { display: block; width: 100% !important; }
  /* Once the rows are cards they must fit the screen: the global 700px table floor
     made every card scroll sideways with its values parked off the right edge. */
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table { min-width: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table td:first-child { min-width: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--erp-line); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody td { padding: 3px 0 !important; border: 0 !important; text-align: left !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody td:first-child { font-size: 15px; }
  /* A card row without its column heading was a stack of bare values. The heading now
     sits on the same line as the value, so the card stays short and still reads. */
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody td:not(:first-child):not(.erp-actions-cell) {
    display: flex !important; align-items: baseline; justify-content: flex-start; gap: 8px;
  }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody td:not(:first-child):not(.erp-actions-cell)::before {
    content: attr(data-label); flex: 0 0 auto; max-width: 48%; font-size: 10.5px; font-weight: 700;
    color: var(--erp-muted); text-transform: uppercase; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tbody td[data-label=""]::before { content: none; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table td.right .erp-bar { margin-left: 0; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table .erp-row-actions { justify-content: flex-start; margin-top: 6px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-view .erp-table tfoot { display: block; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table thead { display: none; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table, :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table tbody { display: block; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; border-bottom: 1px solid var(--erp-line); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table td { display: flex; flex-direction: column; gap: 3px; padding: 0 !important; border: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table td::before { content: attr(data-label); font-size: 10.5px; color: var(--erp-muted); text-transform: uppercase; letter-spacing: .05em; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table td.erp-row-remove-cell { grid-column: 1 / -1; align-items: flex-end; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-edit-table td.erp-row-remove-cell::before { display: none; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-table-editor-foot { flex-direction: column; align-items: stretch; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-project-grid { padding: 0 14px 14px; grid-template-columns: minmax(0, 1fr); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-chart { padding: 0 12px 14px; }
}
@media (max-width: 640px) {
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) span { font-size: 9.5px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) small { font-size: 11px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid { grid-template-columns: minmax(0, 1fr); }
  :is(#erp#erp#erp#erp#erp, html) body .erp-mode-switch button span { display: none; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-project-bar { grid-template-columns: 96px minmax(0, 1fr) 40px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-hbars > div { grid-template-columns: minmax(80px, 110px) minmax(40px, 1fr) auto; }
}
@media (max-width: 380px) {
  :is(#erp#erp#erp#erp#erp, html) body .erp-kpis { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Print popups never show ERP chrome ---------- */
@media print {
  .erp-toolbar, .erp-row-actions, #erp-new-button { display: none !important; }
}

/* ---------- Desktop: compact bottom block so the menu has room ---------- */
@media (min-width: 901px) {
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-bottom { gap: 6px !important; padding-top: 10px !important; border-top: 1px solid rgba(255,255,255,.1) !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-bottom::before, :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-bottom::after { display: none !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-admin-nav { display: flex !important; flex-direction: column !important; gap: 2px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-admin-nav .nav-item:not([hidden]) { height: 40px !important; min-height: 40px !important; padding: 0 12px !important; gap: 12px !important; font-size: 14px !important; margin: 0 !important; border-radius: 11px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-admin-nav .nav-item .nav-icon svg { width: 19px !important; height: 19px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-language { min-height: 44px !important; height: 44px !important; margin: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .sidebar-user { min-height: 50px !important; height: 50px !important; margin: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .sidebar .logout-button { min-height: 38px !important; height: 38px !important; margin: 0 !important; }
  :is(#erp#erp#erp#erp#erp, html) body .app-shell.sidebar-collapsed .sidebar .sidebar-admin-nav .nav-item:not([hidden]) { justify-content: center !important; padding: 0 !important; }
}

/* HTML bar chart */
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-area { position: relative; display: flex; align-items: stretch; gap: 6px; padding-bottom: 22px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-lines { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-lines i { display: block; border-top: 1px dashed rgba(0,0,0,.08); }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-bars { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-bars span { display: block; width: min(18px, 40%); border-radius: 5px 5px 2px 2px; transition: opacity .15s; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-bars span:hover { opacity: .75; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-col small { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--erp-muted); white-space: nowrap; overflow: hidden; }
:is(#erp#erp#erp#erp#erp, html) body .erp-chart-max { margin-left: auto; }
:is(#erp#erp#erp#erp#erp, html) body #view-dashboard .erp-kpis .kpi.erp-kpi, :is(#erp#erp#erp#erp#erp, html) body #view-dashboard .erp-kpis .kpi > div:not(.kpi-icon) { text-align: left !important; justify-content: flex-start !important; align-items: center !important; }
:is(#erp#erp#erp#erp#erp, html) body #view-dashboard .erp-kpis .kpi > div:not(.kpi-icon) { align-items: flex-start !important; }
:is(#erp#erp#erp#erp#erp, html) body #view-dashboard .erp-kpis .kpi > div:not(.kpi-icon) > * { text-align: left !important; align-self: flex-start !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash-grid { align-items: start; }
@media (min-width: 901px) { :is(#erp#erp#erp#erp#erp, html) body #erp-dashboard .erp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 901px) { :is(#erp#erp#erp#erp#erp, html) body .erp-sidebar-scroll { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); } }
:is(#erp#erp#erp#erp#erp, html) body .erp-matrix td:first-child, :is(#erp#erp#erp#erp#erp, html) body .erp-matrix th:first-child { min-width: 170px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-matrix td, :is(#erp#erp#erp#erp#erp, html) body .erp-matrix th { padding-left: 8px !important; padding-right: 8px !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-table td:first-child { min-width: 160px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-view td.right, :is(#erp#erp#erp#erp#erp, html) body .erp-detail-body td.right { white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid > div > strong span, :is(#erp#erp#erp#erp#erp, html) body .erp-detail-grid > div > strong a { display: inline; font-size: inherit; text-transform: none; letter-spacing: 0; color: inherit; font-weight: inherit; }
:is(#erp#erp#erp#erp#erp, html) body .erp-req { margin-left: 3px; color: #d70015; font-weight: 700; }

:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) { flex: 1 1 auto !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) > * { position: static !important; transform: none !important; }
@media (max-width: 900px) {
  :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar { padding: 10px !important; gap: 8px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar > select, :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar > .erp-filter { flex: 1 1 calc(50% - 4px) !important; width: auto !important; max-width: none !important; height: 44px !important; min-height: 44px !important; max-height: 44px !important; padding: 0 30px 0 12px !important; font-size: 14px !important; line-height: 44px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar > .erp-search { flex: 1 1 100% !important; width: 100% !important; height: 44px !important; min-height: 44px !important; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-toolbar > .btn { flex: 1 1 auto !important; }
}
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar { flex-direction: row !important; justify-content: flex-start !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon), :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) > * { text-align: left !important; align-items: flex-start !important; align-self: flex-start !important; margin-left: 0 !important; }
:is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi.erp-kpi { overflow: hidden !important; }
@media (max-width: 640px) { :is(#erp#erp#erp#erp#erp, html) body .erp-kpis .kpi > div:not(.kpi-icon) strong { font-size: 15px !important; } }
:is(#erp#erp#erp#erp#erp, html) body .erp-toolbar-total { font-size: 14px; white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body #erp-payments-ledger .panel-head { align-items: center; }
.erp-boot-error { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: #f4f5f7; }
.erp-boot-error .login-card { max-width: 420px; width: 100%; padding: 32px; border-radius: 24px; background: #fff; box-shadow: 0 18px 45px rgba(20,25,35,.08); text-align: center; }
.erp-boot-error img { width: 110px; margin: 0 auto 18px; display: block; }
.erp-boot-error h2 { margin: 0 0 8px; font-size: 20px; }
.erp-boot-error p { margin: 0 0 20px; color: #6e6e73; font-size: 14px; line-height: 1.45; }
.erp-hosting-notice { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9000; max-width: min(760px, calc(100vw - 24px)); padding: 10px 16px; border-radius: 14px; background: #fff3e1; color: #8a4b00; border: 1px solid #ffd9a0; box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: 13px; line-height: 1.4; }
@media (max-width: 900px) { .erp-hosting-notice { bottom: calc(88px + env(safe-area-inset-bottom)); } }
:is(#erp#erp#erp#erp#erp, html) body .erp-dash { color: #a1a1a6; }

/* Settings → Projects reordering */
#project-list .project-row{gap:10px;border-top:2px solid transparent;border-bottom-width:1px}
#project-list .project-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#project-list .project-drag{cursor:grab;color:#9aa8b3;font-size:14px;letter-spacing:-3px;padding:0 4px;user-select:none}
#project-list .project-row[draggable="true"]{cursor:grab}
#project-list .project-row-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
#project-list .project-order{display:inline-flex;gap:4px}
#project-list .project-order[hidden]{display:none}
#project-list .move-project{font-size:15px;font-weight:700;line-height:1}
#project-list .move-project:disabled{opacity:.35;cursor:default}
#project-list .project-row.dragging{opacity:.45}
#project-list .project-row.drop-before{border-top-color:var(--blue,#2f80ed)}
#project-list .project-row.drop-after{border-bottom:2px solid var(--blue,#2f80ed)!important}

/* Payments register (merged documents + payments) */
#agreement-register .panel-head{padding:20px 22px 6px}
.agreement-last-payment{display:block;margin-top:5px;color:var(--muted,#7b8794);font-size:11px;line-height:1.35;max-width:150px}
#agreement-register td:nth-child(6){white-space:nowrap}
#agreement-register .agreement-eur{display:block;margin-top:3px;color:var(--muted,#7b8794);font-size:11px;font-weight:500}

/* Global search results ("Kërko kudo") */
.global-search{position:relative!important;overflow:visible!important}
.gs-panel{position:absolute;top:calc(100% + 8px);right:0;width:min(560px,calc(100vw - 32px));max-height:min(70vh,620px);overflow:auto;z-index:1200;background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:16px;box-shadow:0 18px 48px rgba(15,23,42,.18);padding:8px;text-align:left}
.gs-panel[hidden]{display:none!important}
.gs-group+.gs-group{border-top:1px solid #eef1f4;margin-top:6px;padding-top:6px}
.gs-group header{display:flex;justify-content:space-between;align-items:center;padding:6px 10px 4px;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#8a96a3}
.gs-group header b{font-size:10.5px;color:#8a96a3;background:#f2f4f7;border-radius:999px;padding:1px 8px}
.gs-item{display:flex;gap:11px;align-items:flex-start;padding:9px 10px;border-radius:11px;cursor:pointer}
.gs-item.active{background:#f2f6fb}
.gs-icon{flex:0 0 30px;height:30px;border-radius:9px;background:#eef3f8;position:relative}
.gs-icon::after{content:"";position:absolute;inset:8px;border-radius:3px;border:2px solid #5b6b79}
.gs-icon-firm{background:#eaf2ff}.gs-icon-firm::after{border-color:#2f6fdc;border-radius:50% 50% 3px 3px}
.gs-icon-doc{background:#f1f5f9}.gs-icon-doc::after{inset:7px 9px}
.gs-icon-project{background:#ecfdf3}.gs-icon-project::after{border-color:#1f9d55}
.gs-icon-material{background:#fff6e5}.gs-icon-material::after{border-color:#c9851a;transform:rotate(45deg);inset:9px}
.gs-icon-erp{background:#f4f0ff}.gs-icon-erp::after{border-color:#7a5cd6;border-radius:50%}
.gs-body{display:grid;gap:3px;min-width:0;flex:1}
.gs-title{display:flex;align-items:center;gap:8px;min-width:0}
.gs-title strong{font-size:13.5px;font-weight:700;color:#1d1d1f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gs-title em{font-style:normal;font-size:10.5px;flex-shrink:0}
.gs-body small{font-size:11.5px;color:#7b8794;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gs-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}
.gs-chip{border:1px solid #d9e2ec;background:#fff;border-radius:999px;padding:4px 10px;font:inherit;font-size:11.5px;font-weight:700;color:#2f6fdc;cursor:pointer}
.gs-chip:hover{background:#eaf2ff;border-color:#b9d0f5}
.gs-more{padding:4px 10px 6px 51px;font-size:11.5px;color:#8a96a3}
.gs-empty{display:grid;gap:4px;padding:18px;text-align:center}
.gs-empty span{font-size:12px;color:#7b8794}
@media(max-width:700px){.gs-panel{position:fixed;top:120px;left:16px;right:16px;width:auto}}

/* Payments: direction tabs (payments we make / payments made to us) */
.payments-direction{display:inline-flex;gap:4px;padding:4px;margin:0 0 14px;background:#fff;border:1px solid rgba(0,0,0,.07);border-radius:14px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.payments-direction .pd-tab{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:10px;padding:9px 16px;font:inherit;font-size:13px;font-weight:600;color:#5b6b79;cursor:pointer;transition:background .15s,color .15s}
.payments-direction .pd-tab:hover{background:#f2f5f8;color:#1d1d1f}
.payments-direction .pd-tab.active{background:#000;color:#fff}
.payments-direction .pd-arrow{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:6px;background:rgba(127,127,127,.15);font-size:12px}
.payments-direction .pd-tab[data-direction="in"].active .pd-arrow{background:#22c55e;color:#fff}
.payments-direction .pd-tab[data-direction="out"].active .pd-arrow{background:#f59e0b;color:#fff}
@media(max-width:700px){.payments-direction{display:flex}.payments-direction .pd-tab{flex:1;justify-content:center;padding:9px 8px}}

/* ==========================================================================
   Account menu in the top bar (desktop). On phones/tablets (<=900px) the
   existing "More" sheet keeps Admin, Settings, language and log out.
   ========================================================================== */
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-user{position:relative;flex:0 0 auto}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-avatar{width:46px;height:46px;border-radius:50%;border:1px solid rgba(0,0,0,.08);background:#fff;padding:3px;cursor:pointer;display:grid;place-items:center;box-shadow:0 8px 24px rgba(0,0,0,.06);transition:box-shadow .15s,border-color .15s}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-avatar span{width:100%;height:100%;border-radius:50%;background:#1d1d1f;color:#fff;display:grid;place-items:center;font-size:15px;font-weight:600;letter-spacing:0}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-avatar:hover,
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-user.open .topbar-avatar{border-color:#1d1d1f;box-shadow:0 0 0 3px rgba(0,0,0,.08)}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu{position:absolute;top:calc(100% + 10px);right:0;width:260px;z-index:1300;background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:16px;box-shadow:0 18px 48px rgba(15,23,42,.18);padding:8px;text-align:left}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu[hidden]{display:none!important}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-head{display:flex;align-items:center;gap:11px;padding:8px 8px 12px;border-bottom:1px solid #eef1f4;margin-bottom:6px}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-avatar{flex:0 0 36px;height:36px;border-radius:50%;background:#1d1d1f;color:#fff;display:grid;place-items:center;font-weight:600}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-head strong{display:block;font-size:14px;font-weight:600;color:#1d1d1f}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-head small{display:block;font-size:12px;color:#7b8794;margin-top:1px}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-item{width:100%;display:flex;align-items:center;gap:10px;border:0;background:transparent;border-radius:10px;padding:9px 10px;font:inherit;font-size:13.5px;font-weight:500;color:#1d1d1f;cursor:pointer;text-align:left}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-item[hidden]{display:none!important}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-item:hover{background:#f2f5f8}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-item svg{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:#5b6b79}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-language{display:flex!important;align-items:center;justify-content:space-between;gap:10px;margin:6px 0;padding:8px 10px;border-top:1px solid #eef1f4;border-bottom:1px solid #eef1f4;font-size:13px!important;font-weight:500!important;color:#5b6b79}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-language select{width:auto!important;min-width:110px;height:34px!important;padding:0 28px 0 10px!important;border-radius:10px!important;font-size:13px!important}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-logout{color:#c0392b}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-logout svg{color:#c0392b}
:is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-menu-logout:hover{background:#fdecea}
@media (min-width: 901px){
  :is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .app-shell .sidebar .sidebar-bottom{display:none!important}
}
@media (max-width: 900px){
  :is(#tb#tb#tb#tb#tb#tb#tb#tb, html) body .topbar-user{display:none!important}
}

/* ==========================================================================
   Business → Documents: folder view
   ========================================================================== */
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-head{align-items:center}
:is(#df#df#df#df#df#df#df#df, html) body .doc-total{display:inline-flex;align-items:baseline;gap:5px;padding:7px 14px;border-radius:999px;background:#f2f5f8;font-size:12.5px;color:#5b6b79;white-space:nowrap}
:is(#df#df#df#df#df#df#df#df, html) body .doc-total strong{font-size:15px;font-weight:600;color:#1d1d1f}
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:0 22px 16px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumb{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(0,0,0,.08);background:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-size:12.5px;font-weight:600;color:#1d1d1f;cursor:pointer}
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumb:hover{background:#f2f5f8}
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumb svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumb.current,
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumb[aria-current="page"]{background:#000;color:#fff;border-color:#000;cursor:default}
:is(#df#df#df#df#df#df#df#df, html) body .doc-crumb-sep{color:#9aa7b1;font-size:14px}

:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;padding:0 22px 22px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder{--f:#F5A524;position:relative;display:flex;flex-direction:column;align-items:stretch;gap:14px;text-align:left;border:1px solid rgba(0,0,0,.06);background:linear-gradient(180deg,color-mix(in srgb,var(--f) 7%,#fff),#fff 55%);border-radius:18px;padding:18px 18px 16px;font:inherit;color:#1d1d1f;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(15,23,42,.09);border-color:color-mix(in srgb,var(--f) 40%,transparent)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder:focus-visible{outline:2px solid var(--f);outline-offset:2px}

/* folder illustration */
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-art{position:relative;display:block;width:64px;height:50px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-back{position:absolute;left:0;top:4px;width:64px;height:44px;border-radius:7px;background:color-mix(in srgb,var(--f) 78%,#000 0%)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-back::before{content:"";position:absolute;left:0;top:-5px;width:26px;height:9px;border-radius:5px 5px 0 0;background:inherit}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-paper{position:absolute;left:8px;top:2px;width:48px;height:30px;border-radius:4px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.12);transform:rotate(-3deg);transition:transform .2s ease}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder:hover .doc-folder-paper{transform:translateY(-5px) rotate(-5deg)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-front{position:absolute;left:0;bottom:0;width:64px;height:34px;border-radius:7px;background:linear-gradient(180deg,color-mix(in srgb,var(--f) 70%,#fff),var(--f));display:grid;place-items:center;color:#fff;box-shadow:0 -1px 0 rgba(255,255,255,.35) inset}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-front svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.95}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-count{position:absolute;right:-8px;top:-4px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#1d1d1f;color:#fff;font-size:11px;font-weight:600;display:grid;place-items:center;box-shadow:0 0 0 3px #fff}

:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-text{display:grid;gap:4px;min-width:0}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-text strong{font-size:14.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-text small{font-size:12px;color:#7b8794}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-chip{--c:#64748B;display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:999px;background:color-mix(in srgb,var(--c) 12%,#fff);color:color-mix(in srgb,var(--c) 75%,#000);font-size:11px;font-weight:600;max-width:100%}
:is(#df#df#df#df#df#df#df#df, html) body .doc-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:is(#df#df#df#df#df#df#df#df, html) body .doc-chip b{font-weight:700}

/* empty folders: softer */
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty{background:#fbfcfd}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty .doc-folder-back,
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty .doc-folder-front{background:color-mix(in srgb,var(--f) 28%,#fff)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty .doc-folder-paper{opacity:0}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty .doc-folder-text strong{color:#5b6b79}

/* empty categories inside a project */
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-folders{margin:0 22px 22px;padding:14px 16px;border:1px dashed rgba(0,0,0,.12);border-radius:16px;background:#fbfcfd}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-label{display:block;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#8a96a3;margin-bottom:10px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-folders > div{display:flex;flex-wrap:wrap;gap:8px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip{--c:#64748B;display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(0,0,0,.08);background:#fff;border-radius:999px;padding:7px 12px 7px 9px;font:inherit;font-size:12.5px;font-weight:600;color:#1d1d1f;cursor:pointer;transition:border-color .15s,background .15s}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip svg{width:16px;height:16px;fill:none;stroke:var(--c);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip b{color:#9aa7b1;font-weight:600}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip:hover{border-color:var(--c);background:color-mix(in srgb,var(--c) 8%,#fff)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip:hover b{color:var(--c)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-none .erp-empty{margin:0 22px 16px}

/* recent documents under the project folders */
:is(#df#df#df#df#df#df#df#df, html) body .doc-recent{border-top:1px solid #eef1f4}
:is(#df#df#df#df#df#df#df#df, html) body .doc-recent-head{padding:16px 22px 4px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-recent-head h3{margin:0;font-size:15px!important;font-weight:600!important}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-panel > .erp-empty{margin:0 22px 22px}

@media (max-width: 640px){
  :is(#df#df#df#df#df#df#df#df, html) body .doc-folder-grid{grid-template-columns:1fr 1fr;gap:10px;padding:0 14px 14px}
  :is(#df#df#df#df#df#df#df#df, html) body .doc-crumbs{padding:0 14px 12px}
  :is(#df#df#df#df#df#df#df#df, html) body .doc-folder{padding:14px;gap:10px}
  :is(#df#df#df#df#df#df#df#df, html) body .doc-empty-folders{margin:0 14px 14px}
  :is(#df#df#df#df#df#df#df#df, html) body .doc-total{display:none}
}

/* Documents folders — v3: neutral grey folders, spacing under the header, own folders */
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-panel .doc-folders-body{padding-top:18px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-panel .doc-crumbs{padding:16px 22px 0}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-panel .doc-crumbs + .doc-folders-body{padding-top:14px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-panel .doc-folders-body > .erp-empty{margin:0 22px 22px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folders-panel .doc-folders-body > .table-wrap{margin-top:-4px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-none .erp-empty{margin:0 22px 14px}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-wrap{position:relative;display:flex;min-width:0}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-wrap > .doc-folder{flex:1;min-width:0}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder{--f:#A3ADB8;background:#fff}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder:hover{border-color:rgba(0,0,0,.16)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-back{background:#B5BEC8}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-front{background:linear-gradient(180deg,#C3CAD3,#A3ADB8)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty .doc-folder-back{background:#DDE2E7}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder.is-empty .doc-folder-front{background:linear-gradient(180deg,#E6EAEE,#D3D9DF)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-chip{background:#f1f3f5;color:#4b5866}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip svg{stroke:#8a96a3}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip:hover{border-color:#1d1d1f;background:#f6f7f9}
:is(#df#df#df#df#df#df#df#df, html) body .doc-empty-chip:hover b{color:#1d1d1f}
/* "New folder" tile */
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-new{border:1.5px dashed rgba(0,0,0,.16);background:#fbfcfd;justify-content:center}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-new:hover{border-color:#1d1d1f;background:#fff;transform:translateY(-2px)}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-new-icon{width:50px;height:50px;border-radius:14px;background:#f1f3f5;display:grid;place-items:center;color:#4b5866}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-new-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-new:hover .doc-folder-new-icon{background:#1d1d1f;color:#fff}
/* "⋯" on own folders */
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-menu{position:absolute;top:10px;right:10px;width:32px;height:32px;border-radius:10px;border:1px solid transparent;background:transparent;color:#7b8794;display:grid;place-items:center;cursor:pointer;z-index:2}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-menu svg{width:18px;height:18px;fill:currentColor;stroke:none}
:is(#df#df#df#df#df#df#df#df, html) body .doc-folder-menu:hover{background:#f1f3f5;border-color:rgba(0,0,0,.08);color:#1d1d1f}

/* Action history: time under the date */
:is(#au#au#au#au#au#au#au#au, html) body #audit-log-body td.audit-time{white-space:nowrap}
:is(#au#au#au#au#au#au#au#au, html) body #audit-log-body .audit-clock{display:block;margin-top:2px;font-variant-numeric:tabular-nums;color:#7b8794}

/* ==========================================================================
   Work days: mark every worker for the chosen day (full day / half / absent)
   ========================================================================== */
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-toolbar { gap: 10px; flex-wrap: wrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-date { display: flex; align-items: center; gap: 8px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-datefield { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-datefield input { height: 38px; min-width: 150px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-datefield span { padding-left: 2px; font-size: 11px; color: var(--erp-muted); text-transform: capitalize; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-date .icon-btn { width: 38px; height: 38px; flex: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-date .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

:is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 18px 26px 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts span { padding: 5px 11px; border-radius: 999px; background: var(--erp-soft); font-size: 12px; font-weight: 600; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts .full { background: rgba(48, 164, 108, .12); color: #1d7a4c; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts .half { background: rgba(255, 159, 10, .14); color: #9a5b00; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts .absent { background: rgba(255, 59, 48, .1); color: #b3261e; }

/* Two worker cards per row on a wide screen: one per row left a strip of dead space
   between the name and its buttons, and showed half as many workers. */
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 8px; padding: 0 26px 24px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 10px 12px; border: 1px solid var(--erp-line); border-radius: 12px; background: var(--erp-surface); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-row.marked.full { border-color: rgba(48, 164, 108, .45); background: rgba(48, 164, 108, .05); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-row.marked.half { border-color: rgba(255, 159, 10, .5); background: rgba(255, 159, 10, .06); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-row.marked.absent { border-color: rgba(255, 59, 48, .4); background: rgba(255, 59, 48, .05); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-who { display: grid; gap: 1px; min-width: 0; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-who strong { font-size: 14px; font-weight: 600; overflow-wrap: break-word; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-buttons { display: flex; gap: 6px; flex: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn { min-height: 38px; padding: 0 11px; border: 1px solid var(--erp-line); border-radius: 10px; background: var(--erp-surface); color: var(--erp-ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn:hover:not(:disabled) { background: var(--erp-soft); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn:disabled { opacity: .5; cursor: default; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn.full.active { background: var(--erp-green); border-color: var(--erp-green); color: #fff; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn.half.active { background: var(--erp-orange); border-color: var(--erp-orange); color: #4a2c00; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn.absent.active { background: var(--erp-red); border-color: var(--erp-red); color: #fff; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-recent li small { text-transform: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 8px; padding: 0 26px 24px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border: 1px solid var(--erp-line); border-radius: 12px; background: var(--erp-surface); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum-stats { display: flex; gap: 20px; flex: none; text-align: right; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum-stats > div { min-width: 56px; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum-stats > div span { display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--erp-muted); }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum-stats > div strong { font-size: 15px; font-weight: 650; }
:is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum-stats > div small { display: block; font-size: 10.5px; color: var(--erp-muted); }

@media (max-width: 760px) {
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-list { grid-template-columns: minmax(0, 1fr); padding: 0 18px 18px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-summary { grid-template-columns: minmax(0, 1fr); padding: 0 18px 18px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum { flex-direction: column; align-items: stretch; gap: 8px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-sum-stats { gap: 14px; justify-content: space-between; text-align: left; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts { padding: 0 18px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn { padding: 0 6px; font-size: 12px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-date { width: 100%; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-datefield { flex: 1; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-datefield input { min-width: 0; width: 100%; }
}

/* Phones: tighter work-day rows so more workers fit on one screen */
@media (max-width: 640px) {
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-list { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0 18px 18px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-row { padding: 8px 10px; gap: 6px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-who strong { font-size: 13.5px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-who .table-sub { font-size: 11px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-btn { min-height: 34px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts { gap: 6px; margin-bottom: 10px; }
  :is(#erp#erp#erp#erp#erp, html) body .erp-workday-counts span { padding: 4px 9px; font-size: 11px; }
}

/* Proof of payment: one small link per uploaded file, inside the payments table. */
:is(#erp#erp#erp#erp#erp, html) body .erp-proof-cell { white-space: nowrap; }
:is(#erp#erp#erp#erp#erp, html) body .erp-proof-link { display: inline-flex; align-items: center; gap: 3px; margin-right: 4px; padding: 3px 8px 3px 6px; border: 1px solid var(--erp-line); border-radius: 999px; color: var(--erp-ink); font-size: 11.5px; font-weight: 650; text-decoration: none; }
:is(#erp#erp#erp#erp#erp, html) body .erp-proof-link:hover { background: var(--erp-soft); }
:is(#erp#erp#erp#erp#erp, html) body .erp-proof-link svg { width: 13px; height: 13px; }
