/* BEG Design System 360 — Core tokens */
:root {
  --beg-ds-primary: #0755c8;
  --beg-ds-primary-hover: #0645a6;
  --beg-ds-accent: #00bde8;
  --beg-ds-surface: #ffffff;
  --beg-ds-background: #f5f8fd;
  --beg-ds-text: #132847;
  --beg-ds-muted: #64748b;
  --beg-ds-border: #dce6f2;

  --beg-ds-radius-sm: 8px;
  --beg-ds-radius-md: 12px;
  --beg-ds-radius-lg: 16px;

  --beg-ds-space-1: 4px;
  --beg-ds-space-2: 8px;
  --beg-ds-space-3: 12px;
  --beg-ds-space-4: 16px;
  --beg-ds-space-6: 24px;

  --beg-ds-shadow:
    0 4px 18px rgba(10, 38, 84, 0.055);
}

/* P409A_APPROVED_DESIGN_TOKENS */
:root {
  --beg-brand-navy: #0A1F44;
  --beg-brand-blue: #2563EB;
  --beg-brand-blue-hover: #1D4ED8;
  --beg-brand-gold: #C9A84C;
  --beg-brand-cyan: #00BDE8;

  --beg-brand-paper: #FBFAF8;
  --beg-brand-ink: #1F2937;
  --beg-brand-white: #FFFFFF;

  --beg-state-success: #059669;
  --beg-state-warning: #D97706;
  --beg-state-danger: #DC2626;
  --beg-state-info: #2563EB;

  --beg-ds-primary: var(--beg-brand-blue);
  --beg-ds-primary-hover: var(--beg-brand-blue-hover);
  --beg-ds-accent: var(--beg-brand-cyan);

  --beg-ds-radius-sm: 8px;
  --beg-ds-radius-md: 12px;
  --beg-ds-radius-lg: 16px;
}
/* BEG ERP V194 — Unified CSS Foundation
 * Phase 1: canonical consolidation only.
 * Source order is preserved exactly from main.tsx to avoid visual/cascade changes.
 * Do not deduplicate or reorder rules until the V194 consolidation gate is GREEN.
 */


/* ===== V194 SOURCE 01/17: frontend-src/src/styles/app.css ===== */
:root {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  color: #13283d;
  background: #f4f7fa;
  --bg: #f4f7fa;
  --panel: #fff;
  --line: #d9e4ed;
  --text: #13283d;
  --muted: #708397;
  --brand: #0e5d91;
  --brand2: #46a4d7;
  --side: #08283a;
  --soft: #edf5fa;
  --danger: #b42318;
  --green: #16814b;
  --orange: #d97706;
}
* {
  box-sizing: border-box;
}
html[data-theme='dark'] {
  --bg: #111b22;
  --panel: #172630;
  --line: #345064;
  --text: #e6f1f7;
  --muted: #9db1bf;
  --soft: #1d3442;
  --side: #061f2f;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.app.collapsed {
  grid-template-columns: 82px 1fr;
}
.app > aside {
  background: var(--side);
  color: #dcebf4;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: auto;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
}
.brand > b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #0b4a70;
  color: #fff;
}
.brand > div {
  display: grid;
}
.brand small {
  color: #8eb0c5;
}
.collapsed .brand > div,
.app.collapsed > aside nav span,
.collapsed .aside-bottom span {
  display: none;
}
.collapse {
  margin: 14px 0;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.collapse svg {
  width: 20px;
}
.app > aside nav {
  display: grid;
  gap: 6px;
}
.app > aside nav button,
.aside-bottom button {
  border: 0;
  background: transparent;
  color: #c8dbe7;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}
.app > aside nav button.active,
.app > aside nav button:hover,
.aside-bottom button:hover {
  background: #0c4b70;
  color: #fff;
}
.app > aside nav svg,
.aside-bottom svg {
  width: 20px;
}
.aside-bottom {
  margin-top: auto;
  display: grid;
  gap: 6px;
}
.app > main {
  min-width: 0;
}
.topbar {
  height: 80px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 {
  margin: 0;
  font-size: 22px;
}
.topbar small {
  color: var(--muted);
}
.user-chip {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 14px;
  display: grid;
}
.user-chip b {
  font-size: 11px;
  color: var(--muted);
}
.content {
  padding: 28px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}
.page-head h2 {
  margin: 0;
}
.page-head p {
  margin: 5px 0;
  color: var(--muted);
}
button {
  font: inherit;
}
.page-head button,
.primary {
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
}
.page-head button svg,
.primary svg {
  width: 18px;
}
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
th {
  background: var(--soft);
  font-size: 13px;
}
td {
  font-size: 14px;
}
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  padding: 6px;
}
.icon-btn svg {
  width: 20px;
}
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}
.status.paid,
.status.received {
  color: var(--green);
}
.status.unpaid,
.status.overdue {
  color: var(--danger);
}
.status.partial,
.status.partial_received,
.status.pending {
  color: var(--orange);
}
.modal-backdrop,
.nested-backdrop {
  position: fixed;
  inset: 0;
  background: #0b1b28a6;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
}
.modal {
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: var(--panel);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 25px 80px #0005;
}
.modal-wide {
  width: min(1100px, 96vw);
}
.modal > header,
.payment-dialog > header,
.receive-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal h2,
.payment-dialog h2,
.receive-dialog h2 {
  margin: 0;
}
.modal-body {
  padding: 22px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  display: grid;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.metric b {
  font-size: 18px;
  margin-top: 6px;
}
.items {
  min-width: 650px;
}
.qty-pill {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 44px;
  padding: 0 14px;
  border: 2px solid #cfe1ee;
  border-radius: 15px;
  background: var(--panel);
  font-size: 18px;
  font-weight: 900;
}
.actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
}
.nested-backdrop {
  z-index: 130;
}
.payment-dialog {
  width: min(1180px, 96vw);
  height: min(860px, 94vh);
  max-height: 94vh;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: 0 28px 90px #0006;
}
.payment-dialog > .payment-header {
  position: relative;
  z-index: 3;
  background: var(--panel);
  padding: 16px 22px;
}
.payment-header > div {
  display: grid;
  gap: 3px;
}
.payment-header .remaining {
  font-size: 14px;
  color: var(--muted);
}
.payment-header .remaining b {
  color: var(--brand);
  font-size: 16px;
}
.payment-close {
  font-size: 28px;
  line-height: 1;
}
.payment-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 18px;
  padding: 18px 22px;
}
.payment-form,
.payment-summary {
  display: grid;
  gap: 11px;
  align-content: start;
  min-width: 0;
}
.payment-summary {
  background: color-mix(in srgb, var(--soft) 65%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.payment-summary h3 {
  margin: 0 0 2px;
}
.payment-form label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}
.payment-form input,
.payment-form select,
.payment-form textarea,
.receive-dialog input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
  min-height: 48px;
}
.payment-form textarea {
  min-height: 82px;
  resize: vertical;
}
.amount-input {
  height: 68px !important;
  font-size: 34px !important;
  font-weight: 800;
  border: 2px solid #2d7ef0 !important;
}
.payment-fields-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.remaining {
  font-size: 18px;
}
.credit-alert {
  border: 1px solid #9ed8b8;
  background: #eaf8ef;
  color: #166534;
  padding: 12px 14px;
  border-radius: 12px;
}
.sum {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sum b {
  white-space: nowrap;
}
.sum.blue b {
  color: #2563eb;
}
.sum.green b {
  color: var(--green);
}
.sum.orange b {
  color: var(--orange);
}
.credit-options {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.credit-options label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.disabled {
  opacity: 0.55;
}
.payment-footer {
  position: relative;
  z-index: 3;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) minmax(260px, 1.45fr);
  gap: 12px;
  padding: 14px 22px;
}
.secondary-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}
.big-btn {
  justify-content: center;
  min-height: 52px;
}
.receive-dialog {
  width: min(900px, 96vw);
  background: var(--panel);
  border-radius: 20px;
  border: 1px solid var(--line);
  padding-bottom: 22px;
}
.receive-list {
  padding: 18px;
  display: grid;
  gap: 10px;
}
.receive-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 15px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.receive-row div {
  display: grid;
}
.receive-row small {
  color: var(--muted);
  margin-top: 4px;
}
.qty-input {
  height: 54px !important;
  font-size: 20px !important;
  font-weight: 800;
  text-align: center;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 18px 18px;
}
.two label {
  display: grid;
  gap: 6px;
}
.receive-dialog > .primary {
  margin: 0 18px;
  width: calc(100% - 36px);
}
.error {
  background: #fff0f0;
  color: var(--danger);
  border: 1px solid #ffcaca;
  padding: 10px;
  border-radius: 10px;
}
.login-page,
.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  width: min(460px, 96vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  display: grid;
  gap: 17px;
}
.login-card label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.login-card input {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  padding: 13px;
}
.brand.big {
  margin-bottom: 10px;
}
.welcome {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
  min-height: 420px;
}
.welcome h2 {
  font-size: 32px;
  margin: 18px 0 8px;
}
.welcome p {
  color: var(--muted);
  max-width: 740px;
}
.version {
  display: inline-block;
  background: var(--soft);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.cards > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
}
.cards strong {
  font-size: 20px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 82px 1fr;
  }
  .brand > div,
  .app > aside nav span,
  .aside-bottom span {
    display: none;
  }
  .content {
    padding: 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .detail-grid,
  .cards {
    grid-template-columns: 1fr;
  }
  .nested-backdrop {
    padding: 8px;
  }
  .payment-dialog {
    width: 100%;
    height: min(940px, 98vh);
    max-height: 98vh;
    border-radius: 16px;
  }
  .payment-dialog > .payment-header {
    padding: 13px 15px;
  }
  .payment-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 15px;
  }
  .payment-summary {
    order: 2;
  }
  .payment-fields-two {
    grid-template-columns: 1fr;
  }
  .payment-footer {
    grid-template-columns: 1fr 1.5fr;
    padding: 12px 15px;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .receive-row {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 8px;
  }
}
@media (max-width: 560px) {
  .payment-dialog {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .payment-grid {
    padding: 10px 12px;
  }
  .payment-summary {
    padding: 12px;
  }
  .amount-input {
    height: 62px !important;
    font-size: 30px !important;
  }
  .payment-footer {
    grid-template-columns: 1fr;
    padding: 10px 12px;
  }
  .payment-footer .secondary-btn {
    order: 2;
  }
  .payment-footer .primary {
    order: 1;
  }
  .sum {
    padding: 10px;
  }
  .credit-options {
    font-size: 13px;
  }
}

/* V182.1 Auth + MFA */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 85% 15%, rgba(14, 116, 144, 0.14), transparent 34%),
    var(--bg, #0d1720);
}
.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 26px;
  align-items: stretch;
}
.login-hero,
.login-card {
  border: 1px solid var(--line, #29485a);
  border-radius: 28px;
  background: var(--panel, #13232e);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}
.login-hero {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
}
.login-hero h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.15;
  margin: 20px 0 16px;
}
.login-hero > p {
  font-size: 18px;
  line-height: 1.9;
  max-width: 680px;
  color: var(--muted, #9fb4c2);
}
.hero-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}
.hero-points > div {
  border: 1px solid var(--line, #29485a);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 6px;
}
.hero-points span {
  color: var(--muted, #9fb4c2);
  font-size: 13px;
  line-height: 1.6;
}
.login-card {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand.big {
  margin-bottom: 28px;
}
.brand.big > b {
  font-size: 22px;
  min-width: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
}
.brand.big strong {
  font-size: 22px;
}
.brand.big small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #9fb4c2);
}
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-form h2 {
  margin: 0;
  font-size: 28px;
}
.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
.auth-form input:not([type='checkbox']) {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line, #36586c);
  background: var(--input, #1b3040);
  color: var(--text, #eef7fb);
  border-radius: 14px;
  padding: 0 15px;
  font: inherit;
  outline: none;
}
.auth-form input:focus {
  border-color: #3ca8df;
  box-shadow: 0 0 0 3px rgba(60, 168, 223, 0.16);
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  font-weight: 500 !important;
}
.check-row input {
  width: 18px;
  height: 18px;
}
.muted {
  color: var(--muted, #9fb4c2);
  line-height: 1.8;
  margin: 0;
}
.auth-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(47, 147, 199, 0.15);
  font-size: 30px;
}
.auth-icon.success {
  background: rgba(39, 174, 96, 0.16);
  color: #3ecf7d;
}
.otp-input {
  font-size: 28px !important;
  letter-spacing: 0.18em;
  text-align: center;
  font-weight: 800;
  direction: ltr;
}
.secret-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed #4e7e98;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.secret-box code {
  direction: ltr;
  flex: 1;
  word-break: break-all;
  font-size: 16px;
}
.secret-box button,
.link-button,
.otpauth-link {
  color: #55b7e8;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.otpauth-link {
  border: 1px solid #31576c;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.technical-details {
  color: var(--muted, #9fb4c2);
}
.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.backup-grid code {
  direction: ltr;
  text-align: center;
  border: 1px solid var(--line, #36586c);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.error,
.notice {
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.6;
}
.error {
  background: rgba(185, 28, 28, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #ff8e8e;
}
.notice {
  background: rgba(3, 105, 161, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #87d8ff;
}
.session-toast {
  position: fixed;
  inset-inline: 20px;
  bottom: 20px;
  margin: auto;
  max-width: 560px;
  padding: 13px 18px;
  border-radius: 14px;
  background: #7f1d1d;
  color: white;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}
@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-hero {
    display: none;
  }
  .login-card {
    max-width: 560px;
    width: 100%;
    margin: auto;
  }
  .hero-points {
    grid-template-columns: 1fr;
  }
  .login-page {
    padding: 14px;
  }
  .login-card {
    padding: 24px;
    border-radius: 22px;
  }
}

/* V182.3 Dashboard + Inventory + Projects */
.state-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 30px;
  text-align: center;
  color: var(--muted);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  align-items: center;
}
.kpi-icon {
  grid-row: 1/4;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--brand);
}
.kpi-card > span {
  font-size: 13px;
  color: var(--muted);
}
.kpi-card > strong {
  font-size: 22px;
}
.kpi-card > small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}
.kpi-card small svg {
  width: 15px;
}
.trend-up {
  color: var(--green) !important;
}
.trend-down {
  color: var(--danger) !important;
}
.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.panel-card h3 {
  margin: 0 0 14px;
}
.panel-rows {
  display: grid;
}
.panel-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.panel-rows > div:first-child {
  border-top: 0;
}
.panel-rows span {
  color: var(--muted);
}
.warn-text {
  color: var(--orange);
}
.mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.mini-kpis > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
}
.mini-kpis svg {
  grid-row: 1/3;
  color: var(--brand);
}
.mini-kpis span {
  color: var(--muted);
  font-size: 12px;
}
.mini-kpis b {
  font-size: 18px;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 9px 12px;
  margin-bottom: 14px;
}
.search-bar svg {
  color: var(--muted);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
  font: inherit;
  padding: 8px;
}
.search-bar.compact {
  margin: 0;
}
.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.qty-low {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
  color: #b91c1c !important;
}
.project-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px auto;
  gap: 10px;
  margin-bottom: 14px;
}
.project-filters > select {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
}
.projects-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 17px;
  min-width: 0;
}
.project-card > header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.project-card h3 {
  margin: 4px 0;
  font-size: 18px;
}
.project-card small {
  color: var(--muted);
}
.project-no {
  font-size: 12px;
  color: var(--brand);
  font-weight: 900;
}
.risk-badge {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.risk-badge.low {
  background: #dcfce7;
  color: #166534;
}
.risk-badge.medium {
  background: #fef3c7;
  color: #92400e;
}
.risk-badge.high {
  background: #fee2e2;
  color: #991b1b;
}
.project-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 15px;
}
.project-stats > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
}
.project-stats span {
  color: var(--muted);
  font-size: 11px;
}
.project-stats b {
  margin-top: 4px;
}
.progress {
  height: 8px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}
.project-card > footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-card > footer span {
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
  padding: 6px 8px;
  border-radius: 999px;
}
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .kpi-grid,
  .mini-kpis,
  .projects-kpis {
    grid-template-columns: 1fr;
  }
  .project-filters {
    grid-template-columns: 1fr;
  }
  .project-filters > select {
    min-height: 48px;
  }
  .project-stats {
    grid-template-columns: 1fr;
  }
  .project-card > header {
    flex-direction: column;
  }
  .risk-badge {
    align-self: flex-start;
  }
}

/* V182.4 Finance + Reports */
.date-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.date-filter label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.date-filter input {
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  padding: 0 11px;
}
.accounting-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.finance-section {
  margin-top: 16px;
}
.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.control-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.control-item.ok {
  background: color-mix(in srgb, #22c55e 7%, var(--panel));
}
.control-item.bad {
  background: color-mix(in srgb, #ef4444 7%, var(--panel));
  border-color: #fecaca;
}
.control-item.bad b {
  color: var(--danger);
}
.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-period-presets { display: flex; gap: 6px; align-items: end; }
.report-period-presets button { min-height: 42px; padding: 0 12px; }
.report-advanced-filter {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(190px, 260px) auto;
  gap: 10px;
  align-items: center;
  margin: -4px 0 14px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.report-advanced-filter input,
.report-advanced-filter select { min-height: 43px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); padding: 0 12px; }
.report-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.report-tabs button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  cursor: pointer;
}
.report-tabs button svg {
  width: 17px;
}
.report-tabs button.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.report-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  min-height: 520px;
}
.report-sheet,
.report-sheet table {
  font-size: 14px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
.report-sheet th {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.report-sheet td {
  color: var(--text);
  font-weight: 600;
  vertical-align: middle;
}
.report-sheet td b { font-weight: 900; }
.report-source-banner {
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 7%, var(--panel));
  color: var(--text);
  font-weight: 800;
}
.report-audit-table { overflow: auto; }
.report-audit-table table { min-width: 1320px; }
.movement-badge {
  display: inline-flex;
  min-width: 110px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
  background: var(--soft);
}
.movement-badge.in { color: #087443; background: #e8f8ef; }
.movement-badge.out { color: #b42318; background: #fff0ee; }
.movement-in { color: #087443; font-size: 16px; }
.movement-out { color: #b42318; font-size: 16px; }
.report-sheet > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.report-sheet > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-sheet > header svg {
  color: var(--brand);
}
.report-sheet > header small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.report-sheet > footer {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.report-signatures { display: none; }
.audit-details { max-width: 480px; white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.report-summary > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  display: grid;
}
.report-summary span {
  font-size: 11px;
  color: var(--muted);
}
.report-summary b {
  font-size: 17px;
  margin-top: 5px;
}
.two-report {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.triple-report {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.report-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
}
.report-box h3 {
  padding: 13px;
  margin: 0;
  background: var(--soft);
}
.report-box table {
  min-width: 440px;
}
.report-box th,
.report-box td {
  padding: 10px;
}
.report-aging-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.report-aging-grid .report-box {
  padding: 13px;
  display: grid;
  gap: 5px;
  overflow: hidden;
}
.report-aging-grid span {
  color: var(--muted);
  font-size: 11px;
}
.report-aging-grid b {
  font-size: 16px;
}
@media (max-width: 1050px) {
  .accounting-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .control-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .triple-report {
    grid-template-columns: 1fr;
  }
  .two-report {
    grid-template-columns: 1fr;
  }
  .report-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .report-aging-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .accounting-kpis,
  .control-grid,
  .report-summary {
    grid-template-columns: 1fr;
  }
  .report-aging-grid {
    grid-template-columns: 1fr;
  }
  .report-sheet {
    padding: 12px;
    border-radius: 14px;
  }
  .report-sheet > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .report-actions {
    width: 100%;
  }
  .report-actions button {
    flex: 1;
    justify-content: center;
  }
  .report-advanced-filter { grid-template-columns: 1fr; }
}
@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }
  .app > aside,
  .topbar,
  .page-head,
  .report-tabs,
  .report-filter {
    display: none !important;
  }
  .report-advanced-filter { display: none !important; }
  .app,
  .app.collapsed {
    display: block !important;
  }
  .content {
    padding: 0 !important;
  }
  .report-sheet {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 8mm !important;
    color: #111 !important;
    background: #fff !important;
  }
  .report-sheet * {
    color: #111 !important;
  }
  .report-sheet .table-card,
  .report-box,
  .report-summary > div {
    border-color: #d7dee5 !important;
  }
  .report-sheet th {
    background: #eef3f7 !important;
  }
  .report-audit-table { overflow: visible !important; }
  .report-audit-table table { min-width: 0 !important; font-size: 8.5pt !important; }
  .report-sheet thead { display: table-header-group; }
  .report-sheet tr { break-inside: avoid; }
  .report-sheet footer { position: running(reportFooter); }
  .report-sheet > footer { display: grid; gap: 8mm; }
  .report-signatures { display: flex !important; justify-content: space-between; gap: 16mm; padding-top: 4mm; color: #111 !important; }
  .report-link { color: #111 !important; text-decoration: none !important; }
  @page {
    size: A4 landscape;
    margin: 10mm;
  }
}

/* V182.5 HR + Maintenance + Operations */
.ops-list {
  display: grid;
  gap: 9px;
}
.ops-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
}
.ops-list article > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ops-list small {
  color: var(--muted);
  white-space: normal;
}
.ops-list .secondary-btn {
  white-space: nowrap;
}
.kpi-grid > .kpi-card:nth-child(n + 4) {
  min-width: 0;
}
@media (max-width: 700px) {
  .ops-list article {
    align-items: flex-start;
    flex-direction: column;
  }
  .ops-list .secondary-btn {
    width: 100%;
    justify-content: center;
  }
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.permission-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.json-view {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  max-height: 520px;
  overflow: auto;
  background: var(--soft);
  padding: 16px;
  border-radius: 12px;
  font-size: 12px;
}

/* V183.1 clean-source expansion */
.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.info-banner {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 14px;
}
.inline-progress {
  min-width: 120px;
  position: relative;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}
.inline-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--primary);
  opacity: 0.18;
}
.inline-progress span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  line-height: 24px;
  font-weight: 700;
}
.table-card {
  margin-top: 16px;
}
.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.table-title h3 {
  margin: 0;
}
.table-title span {
  color: var(--muted);
}
@media (max-width: 768px) {
  .head-actions {
    width: 100%;
  }
  .head-actions button {
    flex: 1;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .table-card {
    border-radius: 12px;
  }
  .table-wrap {
    overflow: auto;
  }
  .table-wrap table {
    min-width: 760px;
  }
}
@media (max-width: 430px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: stretch;
  }
  .page-head > button {
    width: 100%;
  }
}

/* V183.2 commercial, contract and print source workspaces */
.workspace-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.workspace-tabs button {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
}
.workspace-tabs button svg {
  width: 18px;
}
.workspace-tabs button.active {
  background: var(--brand);
  color: #fff;
}
.sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}
.sub-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sub-head svg {
  width: 19px;
  color: var(--brand);
}
.sub-head span {
  font-size: 12px;
  color: var(--muted);
  background: var(--soft);
  padding: 4px 8px;
  border-radius: 999px;
}
.secondary-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  cursor: pointer;
}
.secondary-btn svg {
  width: 17px;
}
.contract-selector,
.print-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(260px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.contract-selector {
  grid-template-columns: minmax(260px, 520px);
}
.contract-selector label,
.print-toolbar label,
.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.contract-selector select,
.print-toolbar select,
.field input,
.field select,
.field textarea,
.clause-row input,
.clause-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  padding: 11px;
  font: inherit;
}
.field textarea,
.clause-row textarea {
  min-height: 88px;
  resize: vertical;
}
.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.clause-list {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}
.clause-list h3 {
  margin-top: 0;
}
.clause-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.success-banner {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 12px;
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.document-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.document-card > svg {
  width: 28px;
  color: var(--brand);
}
.document-card > div {
  display: grid;
  gap: 3px;
}
.document-card span,
.document-card small {
  color: var(--muted);
}
@media (max-width: 950px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .document-grid {
    grid-template-columns: 1fr;
  }
  .contract-selector,
  .print-toolbar {
    grid-template-columns: 1fr;
  }
  .clause-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .workspace-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .document-card {
    grid-template-columns: auto 1fr;
  }
  .document-card .primary {
    grid-column: 1/-1;
    justify-content: center;
  }
}

/* Dedicated print route - V183.2 */
.print-page {
  direction: rtl;
  background: #fff !important;
  color: #111 !important;
  min-height: 100vh;
  width: 210mm;
  margin: 0 auto;
  padding: 12mm;
  font-family: Tahoma, Arial, sans-serif;
}
.print-doc-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 3px solid #0e5d91;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.print-doc-header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.print-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0e5d91;
  color: #fff;
  font-size: 20px;
}
.print-doc-header h1 {
  margin: 0 0 3px;
  font-size: 23px;
}
.print-doc-header span {
  color: #667;
}
.print-doc-header > section {
  display: grid;
  text-align: left;
  align-content: center;
}
.print-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.print-meta > div,
.print-contract-grid > div {
  border: 1px solid #d9e4ed;
  border-radius: 9px;
  padding: 10px;
  display: grid;
}
.print-meta span,
.print-contract-grid span {
  font-size: 10px;
  color: #667;
}
.print-items {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}
.print-items th,
.print-items td {
  border: 1px solid #d9e4ed;
  padding: 9px;
  text-align: right;
}
.print-items th {
  background: #eef4f8;
}
.print-totals {
  width: 82mm;
  margin: 18px 0 0 auto;
  display: grid;
  gap: 6px;
}
.print-totals > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 6px;
}
.print-totals .grand {
  background: #eef4f8;
  border: 1px solid #cbdde8;
  border-radius: 8px;
  font-size: 16px;
}
.print-contract-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.print-text,
.print-clauses {
  margin-top: 15px;
}
.print-text h2,
.print-clauses h2 {
  font-size: 16px;
  border-bottom: 1px solid #d9e4ed;
  padding-bottom: 6px;
}
.print-text p,
.print-clauses p {
  white-space: pre-wrap;
  line-height: 1.8;
}
.print-clauses article {
  break-inside: avoid;
  margin-bottom: 10px;
}
.print-doc-footer {
  margin-top: 20mm;
  padding-top: 8px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #667;
}
.print-error {
  border: 1px solid #ef4444;
  color: #991b1b;
  padding: 14px;
  border-radius: 10px;
}
@media print {
  .print-page {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
  }
  .print-doc-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}

/* V183.3 workflow completion */
.workflow-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.danger-outline {
  border-color: #efb4b4 !important;
  color: #a61b1b !important;
}
.workflow-items {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 14px 0;
  overflow: hidden;
}
.workflow-item-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.workflow-item-row label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.workflow-item-row input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 9px;
  padding: 9px;
}
.permission-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.permission-table table {
  min-width: 620px;
}
.permission-table input[type='checkbox'],
.permission-grid input[type='checkbox'] {
  width: 18px;
  height: 18px;
}
.capability-groups {
  display: grid;
  gap: 12px;
  max-height: 440px;
  overflow: auto;
  padding-inline-end: 4px;
}
.capability-groups section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.capability-groups h4 {
  margin: 0 0 9px;
}
.permission-grid label {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.sticky-actions {
  position: sticky;
  bottom: -18px;
  background: var(--panel);
  padding: 12px 0 0;
  z-index: 2;
}
.month-input {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 15px 0;
}
.upload-tile {
  border: 1px dashed var(--brand);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  background: var(--soft);
}
.upload-tile input {
  display: none;
}
.signature-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-top: 14px;
}
.signature-box h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.signature-pad {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.signature-pad canvas {
  width: 100%;
  height: 180px;
  background: #fff;
  border: 1px solid #ccd8e1;
  border-radius: 10px;
  touch-action: none;
}
.signature-pad .secondary-btn {
  justify-self: start;
}
@media (max-width: 850px) {
  .workflow-item-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .workflow-item-row,
  .evidence-grid {
    grid-template-columns: 1fr;
  }
  .workflow-actions > * {
    flex: 1;
    justify-content: center;
  }
}

/* V183.8 - Professional Sales Invoice Workspace */
.sales-editor-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.invoice-meta-card,
.invoice-items-card,
.invoice-notes-card,
.invoice-summary-card {
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  border-radius: 18px;
  overflow: visible;
}
.invoice-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.invoice-section-title h3,
.invoice-summary-card h3 {
  margin: 0;
  font-size: 18px;
}
.invoice-section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.draft-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--soft, #eef6fb);
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
}
.invoice-meta-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr;
  gap: 14px;
  padding: 16px 18px;
}
.invoice-meta-grid .field {
  min-width: 0;
}
.search-control,
.product-picker {
  position: relative;
}
.lookup-menu {
  position: absolute;
  z-index: 50;
  inset-inline: 0;
  top: calc(100% + 6px);
  max-height: 300px;
  overflow: auto;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 6px;
}
.lookup-menu button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  text-align: right;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
}
.lookup-menu button:hover {
  background: var(--soft, #f3f7fa);
}
.lookup-menu b {
  display: block;
}
.lookup-menu small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.lookup-empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}
.invoice-items-card {
  overflow: visible;
}
.add-line-btn svg {
  width: 17px;
}
.invoice-items-table {
  overflow-x: auto;
  padding: 0 0 4px;
}
.invoice-row {
  display: grid;
  grid-template-columns: 42px minmax(260px, 2.3fr) 90px 90px 80px 120px 95px 125px 38px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  min-width: 1020px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.invoice-row-head {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: var(--soft, #f7fafc);
  border-top: 0;
}
.invoice-row input {
  width: 100%;
  min-width: 0;
}
.line-no {
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}
.stock-pill {
  display: inline-flex;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-weight: 800;
  font-size: 12px;
}
.stock-pill.low {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}
.unit-cell {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.line-total {
  white-space: nowrap;
  text-align: center;
}
.remove-line {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
}
.remove-line:hover {
  background: rgba(239, 68, 68, 0.09);
}
.product-menu {
  min-width: 460px;
}
.product-menu button > span:first-child {
  text-align: right;
}
.product-price {
  text-align: left;
  font-weight: 800;
  white-space: nowrap;
}
.cost-warning {
  display: block;
  color: #b91c1c;
  margin-top: 5px;
}
.below-cost-row {
  background: rgba(239, 68, 68, 0.025);
}
.below-cost-alert {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.07);
  color: #991b1b;
  border-radius: 14px;
}
.below-cost-alert span {
  font-size: 13px;
}
.invoice-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}
.invoice-notes-card {
  padding: 16px 18px;
}
.invoice-summary-card {
  padding: 16px 18px;
}
.invoice-summary-card h3 {
  margin-bottom: 12px;
}
.invoice-summary-card > div,
.invoice-summary-card > label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.invoice-summary-card > label input {
  width: 130px;
}
.invoice-summary-card .grand-total {
  border-bottom: 0;
  margin-top: 5px;
  padding-top: 14px;
  font-size: 17px;
}
.invoice-summary-card .grand-total b {
  font-size: 22px;
  color: var(--primary);
}
.invoice-editor-footer {
  position: sticky;
  bottom: -1px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -2px -2px;
  padding: 13px 2px 2px;
  background: linear-gradient(to top, var(--panel, #fff) 72%, transparent);
}
.footer-hint {
  color: var(--muted);
  font-size: 13px;
}
.invoice-editor-footer .actions {
  margin: 0;
}
.invoice-editor-footer .big-btn {
  min-width: 150px;
}
html[data-theme='dark'] .invoice-meta-card,
html[data-theme='dark'] .invoice-items-card,
html[data-theme='dark'] .invoice-notes-card,
html[data-theme='dark'] .invoice-summary-card,
html[data-theme='dark'] .lookup-menu {
  background: #12242e;
}
html[data-theme='dark'] .invoice-row-head {
  background: #152b36;
}
html[data-theme='dark'] .below-cost-alert {
  color: #fecaca;
}
html[data-theme='dark'] .invoice-editor-footer {
  background: linear-gradient(to top, #0f2029 72%, transparent);
}
@media (max-width: 1100px) {
  .invoice-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  .invoice-bottom-grid {
    grid-template-columns: 1fr;
  }
  .invoice-summary-card {
    order: -1;
  }
}
@media (max-width: 680px) {
  .invoice-meta-grid {
    grid-template-columns: 1fr;
  }
  .invoice-section-title {
    align-items: flex-start;
  }
  .product-menu {
    min-width: 320px;
  }
  .invoice-editor-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .invoice-editor-footer .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .invoice-editor-footer button {
    width: 100%;
  }
}

/* V183.9 — UI/UX hardening for commercial and HR workspaces */
.modal-wide {
  width: min(1380px, 97vw);
}
.modal > header {
  position: sticky;
  top: 0;
  z-index: 35;
  background: var(--panel);
  backdrop-filter: blur(8px);
}
.modal-wide .modal-body {
  padding: 18px 20px 22px;
}
.field {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--text);
}
.field > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}
.field input,
.field select,
.field textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    background 0.16s;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--brand2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand2) 18%, transparent);
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.secondary-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 800;
  cursor: pointer;
}
.secondary-btn:hover {
  background: var(--soft);
}
.secondary-btn svg,
.big-btn svg {
  width: 18px;
  height: 18px;
}
.document-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.editor-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: visible;
}
.editor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.editor-card-head h3 {
  margin: 0;
  font-size: 17px;
}
.editor-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 15px 16px;
  margin: 0;
}
.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 15px 16px;
  margin: 0;
}
.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.full-span {
  grid-column: 1/-1;
}
.editor-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 14px;
}
.editor-notes {
  padding: 15px;
}
.editor-summary {
  padding: 15px 16px;
}
.editor-summary h3 {
  margin: 0 0 8px;
}
.editor-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.editor-summary .grand-total {
  border-bottom: 0;
  margin-top: 4px;
  padding-top: 13px;
  font-size: 17px;
}
.editor-summary .grand-total b {
  color: var(--brand);
  font-size: 21px;
}
.po-lines {
  overflow-x: auto;
  padding-bottom: 4px;
}
.po-line {
  display: grid;
  grid-template-columns: 38px minmax(280px, 2fr) 80px 100px 130px 125px 42px;
  gap: 9px;
  align-items: center;
  min-width: 900px;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
}
.po-line-head {
  border-top: 0;
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.po-line input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
}
.po-line .remove-line {
  display: grid;
  place-items: center;
}
.po-line .remove-line svg {
  width: 17px;
}
.input-with-icon {
  position: relative;
}
.input-with-icon > svg {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  color: var(--muted);
  pointer-events: none;
}
.input-with-icon > input {
  padding-right: 36px !important;
}
.sales-editor-v2 .invoice-meta-card,
.sales-editor-v2 .invoice-items-card,
.sales-editor-v2 .invoice-notes-card,
.sales-editor-v2 .invoice-summary-card {
  border-color: var(--line);
}
.sales-editor-v2 .invoice-meta-grid {
  padding: 14px 16px;
  gap: 12px;
}
.sales-editor-v2 .invoice-row {
  grid-template-columns: 38px minmax(300px, 2.5fr) 86px 95px 72px 118px 90px 120px 38px;
  padding: 9px 12px;
}
.sales-editor-v2 .invoice-row-head {
  position: sticky;
  top: 0;
  z-index: 8;
}
.sales-editor-v2 .invoice-items-table {
  max-height: 360px;
  overflow: auto;
}
.sales-editor-v2 .invoice-bottom-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.sales-editor-v2 .invoice-editor-footer,
.document-editor .invoice-editor-footer {
  position: sticky;
  bottom: -22px;
  background: linear-gradient(to top, var(--panel) 78%, transparent);
  padding: 16px 0 2px;
  z-index: 24;
}
.lookup-menu {
  border-color: var(--line) !important;
}
.table-card {
  box-shadow: 0 8px 28px rgba(15, 35, 50, 0.04);
}
.workspace-tabs {
  position: sticky;
  top: 80px;
  z-index: 9;
  background: var(--bg);
  padding-block: 6px;
}
@media (max-width: 1180px) {
  .form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editor-bottom,
  .sales-editor-v2 .invoice-bottom-grid {
    grid-template-columns: 1fr;
  }
  .editor-summary,
  .sales-editor-v2 .invoice-summary-card {
    order: -1;
  }
}
@media (max-width: 850px) {
  .content {
    padding: 16px;
  }
  .modal-backdrop {
    padding: 8px;
  }
  .modal-wide {
    width: 99vw;
    max-height: 96vh;
  }
  .modal-wide .modal-body {
    padding: 12px;
  }
  .form-grid-3,
  .form-grid-4,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .head-actions {
    width: 100%;
  }
  .head-actions button {
    flex: 1;
  }
  .workspace-tabs {
    top: 72px;
    overflow: auto;
    flex-wrap: nowrap;
  }
  .workspace-tabs button {
    white-space: nowrap;
  }
  .invoice-editor-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .invoice-editor-footer .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .invoice-editor-footer .actions button {
    width: 100%;
  }
}
@media (max-width: 560px) {
  .content {
    padding: 12px;
  }
  .topbar {
    padding-inline: 14px;
  }
  .modal > header {
    padding: 14px 16px;
  }
  .modal > header h2 {
    font-size: 18px;
  }
  .sales-editor-v2 .invoice-section-title,
  .editor-card-head {
    padding: 12px;
  }
  .sales-editor-v2 .invoice-meta-grid {
    padding: 12px;
  }
  .product-menu {
    min-width: 280px;
  }
}

/* V184.0 — Commercial workspace restored from V181.6 functional reference */
.commercial-editor-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 118px);
  margin: -6px -2px 0;
  background: var(--bg);
  color: var(--text);
}
.commercial-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  position: sticky;
  top: 72px;
  z-index: 30;
  box-shadow: 0 7px 24px rgba(15, 23, 42, 0.05);
}
.editor-title-block,
.editor-title-line,
.editor-toolbar,
.lines-actions,
.line-status,
.footer-actions,
.footer-validation {
  display: flex;
  align-items: center;
}
.editor-title-block {
  gap: 12px;
}
.editor-doc-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  color: #176bb0;
  border: 1px solid #cfe2f4;
}
.editor-doc-icon svg {
  width: 25px;
}
.editor-title-line {
  gap: 10px;
}
.editor-title-line h1 {
  font-size: 24px;
  margin: 0;
}
.editor-title-block small {
  color: var(--muted);
}
.editor-toolbar {
  gap: 8px;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.tool-btn svg {
  width: 17px;
}
.tool-btn:hover {
  background: var(--soft);
}
.tool-btn.icon-only {
  width: 42px;
  padding: 0;
}
.tool-btn.danger {
  color: #b91c1c;
}
.commercial-meta-strip {
  display: grid;
  grid-template-columns: 1.7fr 1.2fr 1fr 1fr 1.1fr 0.9fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.smart-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.smart-field > span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.smart-field input,
.smart-field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 0 11px;
}
.commercial-lines-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: visible;
}
.commercial-lines-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.lines-actions {
  gap: 8px;
  flex-wrap: wrap;
}
.line-status {
  gap: 10px;
  font-weight: 800;
}
.warning-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  background: #fff7ed;
  color: #b45309;
  padding: 8px 11px;
  font-size: 12px;
}
.commercial-product-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 11px;
  height: 46px;
  background: var(--bg);
}
.commercial-product-search svg {
  width: 18px;
  color: var(--muted);
}
.commercial-product-search input {
  border: 0 !important;
  background: transparent !important;
  outline: none;
  flex: 1;
  height: 42px;
}
.commercial-grid-wrap {
  overflow: auto;
  max-height: 460px;
  border-top: 1px solid var(--line);
}
.commercial-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1320px;
}
.commercial-grid-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--soft);
  font-size: 12px;
  color: var(--muted);
  height: 42px;
  border-bottom: 1px solid var(--line);
}
.commercial-grid-table th,
.commercial-grid-table td {
  padding: 7px;
  border-inline-start: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  text-align: center;
}
.commercial-grid-table td {
  border-bottom: 1px solid var(--line);
  height: 58px;
}
.commercial-grid-table input,
.commercial-grid-table select {
  height: 38px;
  width: 100%;
  min-width: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 8px;
}
.commercial-grid-table .product-cell {
  min-width: 260px;
  text-align: right;
}
.commercial-grid-table .row-index {
  font-weight: 800;
  color: var(--muted);
  width: 44px;
}
.commercial-grid-table .line-total {
  color: #057a45;
  font-weight: 900;
}
.commercial-grid-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.row-delete {
  border: 0;
  background: #fff1f2;
  color: #dc2626;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.row-delete svg {
  width: 16px;
}
.add-row-wide {
  display: flex;
  width: calc(100% - 24px);
  margin: 8px 12px 12px;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #7fb3d6;
  border-radius: 9px;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}
.add-row-wide svg {
  width: 16px;
}
.commercial-bottom-panels {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.15fr 1.15fr;
  gap: 12px;
}
.commercial-bottom-panels article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px;
  min-height: 190px;
}
.commercial-bottom-panels h3 {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--primary);
}
.summary-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
}
.summary-panel .summary-grand {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}
.summary-grand b {
  font-size: 23px;
  color: #0d67bd;
}
.tax-panel label {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.tax-panel input,
.tax-panel select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  padding: 0 9px;
}
.money-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.money-input input {
  border: 0;
  flex: 1;
}
.money-input em {
  font-style: normal;
  padding: 0 8px;
  color: var(--muted);
}
.tax-note {
  display: flex;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
}
.tax-note svg {
  width: 17px;
}
.notes-panel textarea,
.terms-panel textarea {
  width: 100%;
  min-height: 135px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 10px;
}
.commercial-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  position: sticky;
  bottom: 8px;
  z-index: 25;
  box-shadow: 0 -10px 35px rgba(15, 23, 42, 0.06);
}
.footer-actions {
  gap: 8px;
}
.issue-btn {
  min-width: 170px;
}
.footer-validation {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.footer-validation svg {
  width: 17px;
  color: #0e7490;
}
.commercial-error {
  margin: 0;
}

/* ISP NOC */
.isp-noc-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.isp-noc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.isp-noc-head h2 {
  margin: 0;
  font-size: 25px;
}
.isp-noc-head p {
  margin: 5px 0 0;
  color: var(--muted);
}
.noc-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.noc-kpi {
  min-height: 122px;
  position: relative;
  overflow: hidden;
}
.noc-kpi:after {
  content: '';
  position: absolute;
  inset: auto -25px -45px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.05;
}
.noc-kpi.violet {
  color: #7c3aed;
}
.noc-kpi.blue {
  color: #0f6fd7;
}
.noc-kpi.green {
  color: #059669;
}
.noc-kpi.orange {
  color: #ea580c;
}
.noc-kpi.cyan {
  color: #0891b2;
}
.noc-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}
.noc-sessions-card,
.noc-session-detail,
.noc-events,
.noc-servers {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}
.noc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.noc-search input {
  width: 310px;
  max-width: 40vw;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  padding: 0 10px;
}
.noc-table-wrap {
  overflow: auto;
  max-height: 480px;
}
.noc-table-wrap table {
  min-width: 980px;
}
.noc-table-wrap tr.selected td {
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
}
.profile-pill {
  display: inline-flex;
  background: #e9f2ff;
  color: #0c61b7;
  border-radius: 7px;
  padding: 5px 8px;
  font-weight: 800;
  font-size: 12px;
}
.noc-session-detail {
  padding: 15px;
}
.session-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.session-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #1d4ed8;
  font-weight: 900;
  font-size: 22px;
}
.session-user h3 {
  margin: 5px 0 2px;
}
.session-user small {
  color: var(--muted);
}
.online-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
}
.session-data {
  display: grid;
  gap: 9px;
  padding: 14px 0;
}
.session-data > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
}
.session-data span {
  color: var(--muted);
  font-size: 12px;
}
.session-data b {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.coa-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
}
.coa-actions button {
  border: 0;
  border-radius: 9px;
  height: 39px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.danger-action {
  background: #dc2626;
}
.warning-action {
  background: #d97706;
}
.success-action {
  background: #059669;
}
.empty-session {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
}
.empty-session svg {
  width: 44px;
  height: 44px;
}
.noc-bottom-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.event-row,
.server-row {
  display: grid;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.event-row {
  grid-template-columns: 14px 150px 1fr 150px;
}
.event-row small {
  color: var(--muted);
  text-align: left;
}
.event-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
}
.event-dot.bad {
  background: #dc2626;
}
.server-row {
  grid-template-columns: 28px 1fr auto;
}
.server-row svg {
  width: 20px;
  color: var(--muted);
}
.server-row div {
  display: grid;
}
.server-row small {
  color: var(--muted);
}
html[data-theme='dark'] .editor-doc-icon {
  background: linear-gradient(145deg, #10283a, #12345a);
  border-color: #234a68;
}
.dark .warning-chip,
html[data-theme='dark'] .warning-chip {
  background: #3d2a13;
  color: #fdba74;
}
html[data-theme='dark'] .row-delete {
  background: #3c1b23;
  color: #fca5a5;
}
html[data-theme='dark'] .profile-pill {
  background: #122f50;
  color: #93c5fd;
}
@media (max-width: 1250px) {
  .commercial-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .commercial-bottom-panels {
    grid-template-columns: 1fr 1fr;
  }
  .noc-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .noc-main-grid {
    grid-template-columns: 1fr;
  }
  .noc-session-detail {
    min-height: auto;
  }
}
@media (max-width: 850px) {
  .commercial-editor-topbar {
    top: 66px;
    align-items: flex-start;
  }
  .editor-toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .editor-toolbar .tool-btn:not(.icon-only) {
    font-size: 0;
    width: 42px;
    padding: 0;
  }
  .editor-toolbar .tool-btn svg {
    margin: 0;
  }
  .commercial-meta-strip {
    grid-template-columns: 1fr 1fr;
  }
  .commercial-bottom-panels {
    grid-template-columns: 1fr;
  }
  .commercial-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .footer-actions {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    width: 100%;
  }
  .noc-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .noc-bottom-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .commercial-meta-strip {
    grid-template-columns: 1fr;
  }
  .editor-title-line h1 {
    font-size: 19px;
  }
  .editor-doc-icon {
    display: none;
  }
  .commercial-editor-topbar {
    padding: 10px;
  }
  .commercial-lines-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .noc-kpis {
    grid-template-columns: 1fr;
  }
  .noc-search input {
    width: 100%;
    max-width: none;
  }
  .footer-actions {
    grid-template-columns: 1fr;
  }
  .commercial-editor-footer {
    position: static;
  }
}

/* V184.2 — commercial workspace viewport/layout correction */
.commercial-editor-shell {
  gap: 10px;
  min-height: auto;
  margin: -10px -10px 0;
  overflow: visible;
}
.commercial-editor-topbar {
  position: relative;
  top: auto;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: none;
}
.editor-title-line h1 {
  font-size: 22px;
}
.commercial-editor-topbar small {
  font-size: 11px;
}
.commercial-meta-strip {
  grid-template-columns: minmax(240px, 1.8fr) repeat(5, minmax(125px, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
}
.smart-field {
  gap: 4px;
}
.smart-field input,
.smart-field select {
  height: 38px;
  border-radius: 8px;
}
.commercial-lines-card {
  border-radius: 12px;
  overflow: visible;
}
.commercial-lines-toolbar {
  padding: 8px 10px;
}
.commercial-product-search {
  margin: 8px 10px;
  height: 40px;
}
.commercial-product-search input {
  height: 36px;
}
.commercial-grid-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  scrollbar-gutter: auto;
}
.commercial-grid-table {
  min-width: 1180px;
  table-layout: fixed;
}
.commercial-grid-table th {
  position: static;
  height: 36px;
  padding: 5px 6px;
}
.commercial-grid-table td {
  height: 48px;
  padding: 5px 6px;
}
.commercial-grid-table input,
.commercial-grid-table select {
  height: 34px;
  min-width: 0;
  padding: 0 6px;
}
.commercial-grid-table th:nth-child(1) {
  width: 38px;
}
.commercial-grid-table th:nth-child(2) {
  width: 250px;
}
.commercial-grid-table th:nth-child(3) {
  width: 120px;
}
.commercial-grid-table th:nth-child(4) {
  width: 78px;
}
.commercial-grid-table th:nth-child(5) {
  width: 82px;
}
.commercial-grid-table th:nth-child(6) {
  width: 105px;
}
.commercial-grid-table th:nth-child(7) {
  width: 78px;
}
.commercial-grid-table th:nth-child(8) {
  width: 112px;
}
.commercial-grid-table th:nth-child(9) {
  width: 92px;
}
.commercial-grid-table th:nth-child(10) {
  width: 105px;
}
.commercial-grid-table th:nth-child(11) {
  width: 42px;
}
.commercial-grid-table .product-cell {
  min-width: 0;
  text-align: right;
}
.product-picker {
  position: relative;
}
.product-menu {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 5px);
  width: min(440px, 70vw);
  max-height: 260px;
  overflow: auto;
  z-index: 80;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}
.add-row-wide {
  margin: 6px 10px 9px;
  width: calc(100% - 20px);
  height: 34px;
}
.commercial-bottom-panels {
  grid-template-columns: 1.05fr 1fr 1.15fr 1.15fr;
  gap: 8px;
}
.commercial-bottom-panels article {
  padding: 10px 12px;
  min-height: 155px;
}
.commercial-bottom-panels h3 {
  margin-bottom: 9px;
}
.notes-panel textarea,
.terms-panel textarea {
  min-height: 100px;
}
.commercial-editor-footer {
  position: relative;
  bottom: auto;
  padding: 9px 12px;
  border-radius: 11px;
  box-shadow: none;
}
.issue-btn {
  min-width: 155px;
}
@media (max-width: 1450px) {
  .commercial-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .commercial-bottom-panels {
    grid-template-columns: 1fr 1fr;
  }
  .commercial-grid-table {
    min-width: 1120px;
  }
}
@media (max-width: 1000px) {
  .commercial-meta-strip {
    grid-template-columns: 1fr 1fr;
  }
  .commercial-bottom-panels {
    grid-template-columns: 1fr;
  }
  .commercial-editor-shell {
    margin: -6px;
  }
  .commercial-grid-wrap {
    overflow-x: auto;
  }
}

/* V184.3 — quotations + purchasing use the same full commercial workspace */
.purchase-meta-strip {
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1.1fr) repeat(4, minmax(130px, 1fr));
}
.purchase-grid-table {
  min-width: 980px;
}
.purchase-grid-table th:nth-child(1) {
  width: 42px;
}
.purchase-grid-table th:nth-child(2) {
  width: 360px;
}
.purchase-grid-table th:nth-child(3) {
  width: 95px;
}
.purchase-grid-table th:nth-child(4) {
  width: 100px;
}
.purchase-grid-table th:nth-child(5) {
  width: 130px;
}
.purchase-grid-table th:nth-child(6) {
  width: 130px;
}
.purchase-grid-table th:nth-child(7) {
  width: 48px;
}
.purchase-bottom-panels {
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.5fr);
  justify-content: end;
}
.purchase-notes textarea {
  min-height: 120px;
}
.quotation-meta-strip {
  grid-template-columns: minmax(300px, 2fr) repeat(2, minmax(170px, 1fr));
  max-width: 980px;
}
.quotation-grid-table {
  min-width: 1080px;
}
.quotation-grid-table th:nth-child(1) {
  width: 42px;
}
.quotation-grid-table th:nth-child(2) {
  width: 390px;
}
.quotation-grid-table th:nth-child(3) {
  width: 90px;
}
.quotation-grid-table th:nth-child(4) {
  width: 100px;
}
.quotation-grid-table th:nth-child(5) {
  width: 130px;
}
.quotation-grid-table th:nth-child(6) {
  width: 100px;
}
.quotation-grid-table th:nth-child(7) {
  width: 140px;
}
.quotation-grid-table th:nth-child(8) {
  width: 48px;
}
.quotation-bottom-panels {
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr) minmax(320px, 1fr);
}
@media (max-width: 1200px) {
  .purchase-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .purchase-bottom-panels,
  .quotation-bottom-panels {
    grid-template-columns: 1fr 1fr;
  }
  .quotation-meta-strip {
    grid-template-columns: 1.5fr 1fr 1fr;
    max-width: none;
  }
}
@media (max-width: 800px) {
  .purchase-meta-strip,
  .quotation-meta-strip {
    grid-template-columns: 1fr 1fr;
  }
  .purchase-bottom-panels,
  .quotation-bottom-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .purchase-meta-strip,
  .quotation-meta-strip {
    grid-template-columns: 1fr;
  }
}

/* V184.4 — unified purchase / quotation / returns full workspaces */
.return-meta-strip {
  grid-template-columns: minmax(320px, 2fr) minmax(170px, 0.8fr) minmax(240px, 1.2fr);
}
.return-icon {
  background: linear-gradient(145deg, #fff1f2, #ffe4e6);
  color: #be123c;
}
html[data-theme='dark'] .return-icon {
  background: linear-gradient(145deg, #3b1721, #4b1f2a);
  color: #fda4af;
}
.return-lines-card .source-summary {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.return-grid-table {
  min-width: 1080px;
}
.return-grid-table th:nth-child(1) {
  width: 44px;
}
.return-grid-table th:nth-child(2) {
  width: 390px;
}
.return-grid-table th:nth-child(3) {
  width: 95px;
}
.return-grid-table th:nth-child(4) {
  width: 125px;
}
.return-grid-table th:nth-child(5) {
  width: 135px;
}
.return-grid-table th:nth-child(6) {
  width: 130px;
}
.return-grid-table th:nth-child(7) {
  width: 145px;
}
.return-grid-table .product-cell {
  display: grid;
  gap: 4px;
}
.return-grid-table .product-cell small {
  color: var(--muted);
  font-size: 11px;
}
.qty-reference {
  display: inline-flex;
  min-width: 54px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  font-weight: 800;
}
.return-qty-input {
  font-weight: 900;
  text-align: center;
}
.return-selected-row td {
  background: color-mix(in srgb, var(--brand) 5%, var(--panel));
}
.empty-commercial-row {
  text-align: center !important;
  padding: 34px !important;
  color: var(--muted);
}
.return-bottom-panels {
  grid-template-columns: minmax(320px, 0.9fr) minmax(500px, 1.5fr);
  justify-content: end;
}
.return-issue-btn {
  min-width: 210px;
}
.request-meta-strip {
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) minmax(320px, 1.6fr);
}
.request-grid-table {
  min-width: 1040px;
}
.request-grid-table th:nth-child(1) {
  width: 42px;
}
.request-grid-table th:nth-child(2) {
  width: 390px;
}
.request-grid-table th:nth-child(3) {
  width: 95px;
}
.request-grid-table th:nth-child(4) {
  width: 105px;
}
.request-grid-table th:nth-child(5) {
  width: 150px;
}
.request-grid-table th:nth-child(6) {
  width: 155px;
}
.request-grid-table th:nth-child(7) {
  width: 48px;
}
.request-bottom-panels {
  grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.6fr);
  justify-content: end;
}
.supplier-invoice-meta {
  grid-template-columns: minmax(360px, 2fr) minmax(220px, 1fr) repeat(2, minmax(170px, 0.8fr));
}
.supplier-invoice-panels {
  grid-template-columns: minmax(360px, 0.8fr) minmax(560px, 1.5fr);
  justify-content: end;
}
.invoice-values-panel label {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.invoice-values-panel input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}
@media (max-width: 1100px) {
  .return-meta-strip,
  .request-meta-strip,
  .supplier-invoice-meta {
    grid-template-columns: 1fr 1fr;
  }
  .return-bottom-panels,
  .request-bottom-panels,
  .supplier-invoice-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .return-meta-strip,
  .request-meta-strip,
  .supplier-invoice-meta {
    grid-template-columns: 1fr;
  }
}

/* V184.5 — transaction workspaces: sales orders, collections, GRN, supplier payments */
.transaction-workspace {
  gap: 10px;
}
.transaction-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.transaction-kpis article {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  min-height: 78px;
}
.transaction-kpis span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.transaction-kpis b {
  font-size: 19px;
  color: var(--text);
}
.transaction-kpis .accent-warning {
  border-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 7%, var(--panel));
}
.transaction-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 10px;
  align-items: start;
}
.transaction-form-card,
.transaction-summary-card,
.transaction-note-card,
.credit-ledger-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px;
}
.transaction-form-card h2,
.transaction-summary-card h2,
.credit-ledger-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
}
.transaction-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.transaction-form-grid .span-2 {
  grid-column: 1/-1;
}
.transaction-form-card textarea,
.transaction-note-card textarea {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  padding: 10px;
  resize: vertical;
}
.transaction-amount {
  font-size: 25px !important;
  font-weight: 900 !important;
  text-align: center;
  color: var(--brand) !important;
}
.transaction-summary-card {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 7px;
}
.transaction-summary-card .sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
}
.transaction-summary-card .sum b {
  font-size: 16px;
}
.transaction-summary-card .sum.blue b {
  color: #2563eb;
}
.transaction-summary-card .sum.green b {
  color: #059669;
}
.transaction-summary-card .sum.orange b {
  color: #d97706;
}
.transaction-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  margin-top: 4px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.transaction-method > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
  color: var(--brand);
}
.transaction-method svg {
  width: 21px;
}
.transaction-method div {
  display: grid;
  gap: 3px;
}
.transaction-method small {
  color: var(--muted);
}
.transaction-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 8%, var(--panel));
  color: #b45309;
}
.transaction-alert svg {
  width: 22px;
  flex: 0 0 auto;
}
.transaction-alert div {
  display: grid;
  gap: 3px;
}
.transaction-alert span {
  font-size: 12px;
}
.credit-ledger-card {
  padding: 0;
  overflow: hidden;
}
.credit-ledger-card .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.credit-ledger-card .section-title h2 {
  margin: 0;
}
.credit-ledger-card .section-title span {
  font-size: 12px;
  color: var(--muted);
}
.credit-ledger-card .table-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}
.grn-grid {
  min-width: 980px;
}
.grn-grid th:nth-child(1) {
  width: 44px;
}
.grn-grid th:nth-child(2) {
  width: 320px;
}
.grn-grid th:nth-child(n + 3) {
  width: 105px;
}
.grn-grid .completed-line {
  opacity: 0.58;
}
.grn-grid .completed-line td {
  background: var(--soft);
}
.transaction-note-card {
  padding: 12px;
}
.transaction-note-card .smart-field textarea {
  width: 100%;
}
.compact-bottom-panels {
  grid-template-columns: minmax(300px, 0.8fr) minmax(480px, 1.4fr);
  justify-content: end;
}
.compact-bottom-panels .notes-panel p {
  color: var(--muted);
  line-height: 1.8;
}
html[data-theme='dark'] .transaction-alert {
  color: #fbbf24;
}
.danger-outline {
  color: #dc2626 !important;
  border-color: color-mix(in srgb, #dc2626 45%, var(--line)) !important;
}
@media (max-width: 1200px) {
  .transaction-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .transaction-layout {
    grid-template-columns: 1fr;
  }
  .transaction-summary-card {
    position: static;
  }
  .compact-bottom-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .transaction-kpis {
    grid-template-columns: 1fr;
  }
  .transaction-form-grid {
    grid-template-columns: 1fr;
  }
  .transaction-form-grid .span-2 {
    grid-column: auto;
  }
}

/* V184.6 — quotation full workspace hardening */
.quotation-full-workspace .quotation-grid-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}
.quotation-meta-v1846 {
  grid-template-columns: minmax(280px, 1.8fr) repeat(4, minmax(140px, 1fr));
  max-width: none;
}
.quotation-grid-v1846 {
  min-width: 1380px;
}
.quotation-grid-v1846 th:nth-child(2) {
  min-width: 330px;
}
.quotation-grid-v1846 .below-cost-row {
  background: color-mix(in srgb, #ef4444 5%, var(--panel));
}
.quotation-bottom-v1846 {
  grid-template-columns: minmax(260px, 0.75fr) minmax(260px, 0.75fr) minmax(300px, 1fr) minmax(
      320px,
      1fr
    );
}
.customer-lookup {
  position: relative;
}
.customer-menu {
  inset-inline: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
}
.quotation-full-workspace .commercial-editor-footer {
  z-index: 12;
}
@media (max-width: 1350px) {
  .quotation-meta-v1846 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quotation-bottom-v1846 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 850px) {
  .quotation-meta-v1846 {
    grid-template-columns: 1fr 1fr;
  }
  .quotation-bottom-v1846 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .quotation-meta-v1846 {
    grid-template-columns: 1fr;
  }
}

/* V184.7 — commercial document detail workspaces */
.document-detail-workspace {
  min-height: calc(100vh - 136px);
}
.detail-meta-strip {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}
.detail-grid-table {
  min-width: 980px;
}
.detail-grid-table th:nth-child(2) {
  min-width: 260px;
}
.detail-subline {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}
.empty-document-lines {
  text-align: center !important;
  color: var(--muted);
  padding: 34px !important;
}
.detail-bottom-panels {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr) minmax(280px, 0.8fr);
}
.document-trace-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
}
.document-trace-list b {
  color: var(--text);
}
@media (max-width: 1100px) {
  .detail-meta-strip {
    grid-template-columns: 1fr 1fr;
  }
  .detail-bottom-panels {
    grid-template-columns: 1fr 1fr;
  }
  .detail-bottom-panels .terms-panel {
    grid-column: 1/-1;
  }
}
@media (max-width: 700px) {
  .detail-meta-strip,
  .detail-bottom-panels {
    grid-template-columns: 1fr;
  }
  .detail-bottom-panels .terms-panel {
    grid-column: auto;
  }
}

/* V187 — DataTable وConfirmDialog المشتركان */
.table-loading,
.table-empty {
  text-align: center !important;
  color: var(--muted);
  padding: 28px !important;
}
.confirm-dialog {
  display: grid;
  gap: 14px;
  text-align: center;
  padding: 6px 4px;
}
.confirm-dialog p {
  margin: 0;
  color: var(--text);
  line-height: 1.8;
}
.confirm-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  color: var(--brand);
}
.confirm-icon.danger {
  color: var(--danger);
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
button.danger {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
}
button.danger:hover {
  filter: brightness(0.9);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--panel);
}
.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-box input {
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  min-width: 220px;
}

/* V187 — جرس التنبيهات */
.notif-bell-wrap {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.notif-badge.danger {
  background: var(--danger);
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 340px;
  max-height: 420px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  z-index: 60;
}
.notif-dropdown header {
  padding: 10px 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.notif-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notif-dropdown li button {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: start;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: inherit;
}
.notif-dropdown li button:hover {
  background: var(--soft);
}
.notif-icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
}
.notif-icon.danger {
  color: var(--danger);
}
.notif-icon.warning {
  color: var(--orange);
}
.notif-icon.info {
  color: var(--brand);
}
.notif-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

/* V187 — بطاقات إحصائية صغيرة (تُستخدم في صحة الكاميرات وغيرها) */
.stat-cards {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 120px;
}
.stat-card svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.stat-card b {
  font-size: 1.4rem;
}
.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
}
.danger-text {
  color: var(--danger);
}

/* V187 — محادثة واتساب */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding: 10px;
  background: var(--soft);
  border-radius: 10px;
  margin-bottom: 10px;
}
.chat-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.chat-bubble.out {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border: none;
}
.chat-bubble p {
  margin: 0 0 4px;
}
.chat-bubble small {
  opacity: 0.7;
  font-size: 0.7rem;
}
.chat-compose {
  display: flex;
  gap: 8px;
}
.chat-compose input {
  flex: 1;
}

/* V187 — تجميع أيقونة التنبيهات مع شارة المستخدم في الترويسة */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* V186.2-merged — clearer invoice approve/pay flow (SourceDriven) */
.status.pending_approval,
.status.pending_cancellation {
  color: var(--orange);
}
.status.completed {
  color: var(--brand);
}
.status.rejected,
.status.cancelled {
  color: var(--danger);
}
.status-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.row-actions {
  display: flex;
  gap: 2px;
  align-items: center;
}
.row-actions .icon-btn.approve {
  color: var(--green);
}
.row-actions .icon-btn.danger {
  color: var(--danger);
}
.inv-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.inv-step {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
}
.inv-step-n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--soft);
  font-size: 12px;
}
.inv-step.done {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
}
.inv-step.done .inv-step-n {
  background: var(--green);
  color: #fff;
}
.inv-step.current {
  color: var(--brand);
  border-color: var(--brand);
}
.inv-step.current .inv-step-n {
  background: var(--brand);
  color: #fff;
}
.inv-step.bad {
  color: var(--danger);
  border-color: var(--danger);
}
.inv-step.bad .inv-step-n {
  background: var(--danger);
  color: #fff;
}
.source-ref {
  margin-bottom: 12px;
  color: var(--muted);
}
.source-ref b {
  color: var(--text);
}
.history-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 18px 0 10px;
}
.history-head svg {
  width: 18px;
}
.history-head span {
  color: var(--muted);
  font-size: 12px;
}
.history-card {
  margin-bottom: 6px;
}
.confirm-bar {
  border: 1px solid var(--orange);
  background: color-mix(in srgb, var(--orange) 8%, var(--panel));
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.confirm-bar > div:first-child {
  display: grid;
  gap: 4px;
}
.confirm-bar span {
  color: var(--muted);
  font-size: 13px;
}
.amount-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.amount-chips .chip {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
}
.amount-chips .chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.pay-customer {
  font-size: 13px;
  color: var(--muted);
}
.credit-balance-banner {
  border: 1px solid #9ed8b8;
  background: #eaf8ef;
  color: #166534;
  padding: 12px 14px;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.credit-balance-banner small {
  font-size: 12px;
}
@media (max-width: 700px) {
  .inv-steps {
    gap: 6px;
  }
  .inv-step {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* V186.2-merged — professional products list + product form */
.filter-chips {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.filter-chips button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
}
.filter-chips button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.profit-pos {
  color: var(--green);
}
.profit-neg {
  color: var(--danger);
}
.inline-add {
  display: flex;
  gap: 8px;
}
.inline-add input {
  flex: 1;
}
.margin-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 14px;
  background: var(--soft);
}
.margin-preview span {
  color: var(--muted);
  font-size: 13px;
}
.margin-preview b {
  font-size: 18px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}
.field.check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}
.field.check input {
  width: auto !important;
  min-height: 0 !important;
}
.check-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.check-inline input {
  width: auto !important;
  min-height: 0 !important;
}

/* V186.2-fix — actionable schema-migration banner (409 database_migration_required) */
.migration-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--panel));
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.migration-banner > svg {
  width: 26px;
  height: 26px;
  color: var(--danger);
  flex: none;
}
.migration-banner > div {
  display: grid;
  gap: 6px;
}
.migration-banner b {
  font-size: 15px;
}
.migration-banner span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.migration-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.migration-actions svg {
  width: 17px;
}

/* V186.2-merged — projects quick actions + recent table */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px;
}
.section-head h3 {
  margin: 0;
  font-size: 17px;
}
.section-head small {
  color: var(--muted);
}
.quick-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}
.qcard {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 20px 14px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--text);
}
.qcard svg {
  width: 30px;
  height: 30px;
}
.qcard b {
  font-size: 15px;
}
.qcard small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.qcard:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}
.qcard.violet svg {
  color: #8b5cf6;
}
.qcard.blue svg {
  color: #3b82f6;
}
.qcard.green svg {
  color: var(--green);
}
.qcard.orange svg {
  color: var(--orange);
}
.qcard.cyan svg {
  color: #06b6d4;
}
.recent-card {
  margin-bottom: 8px;
}
@media (max-width: 1100px) {
  .quick-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .quick-cards {
    grid-template-columns: 1fr 1fr;
  }
  .section-head {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* V186.2-merged — grouped nav + command palette + quick expense */
.quick-expense-btn {
  margin: 10px 0 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 11px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  font-size: 13px;
}
.quick-expense-btn svg {
  width: 18px;
}
.quick-expense-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.nav-group {
  margin-bottom: 2px;
}
.nav-group-title {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.nav-group-title svg {
  width: 17px;
}
.nav-group-title.has-current {
  color: var(--text);
}
.nav-group-title .chev {
  margin-inline-start: auto;
  width: 15px;
  transition: transform 0.15s ease;
}
.nav-group-title .chev.open {
  transform: rotate(180deg);
}
.nav-sub {
  margin: 2px 8px 6px 0;
  border-right: 2px solid var(--line);
  padding-right: 6px;
  display: grid;
  gap: 3px;
}
.nav-sub button {
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.nav-sub button svg {
  width: 17px;
}
.nav-sub button:hover {
  background: var(--soft);
}
.nav-sub button.active {
  background: var(--brand);
  color: #fff;
}
.collapsed .nav-group-title span,
.collapsed .nav-group-title .chev {
  display: none;
}
.collapsed .quick-expense-btn span {
  display: none;
}
.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 20, 0.55);
  z-index: 400;
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: 12vh;
}
.cmd-palette {
  width: min(560px, 94vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.cmd-palette .search-bar {
  margin: 0;
  border: 0;
}
.cmd-palette .search-bar input {
  border: 0;
  min-height: 56px;
  font-size: 16px;
}
.cmd-list {
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 2px;
}
.cmd-item {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  text-align: right;
}
.cmd-item svg {
  width: 18px;
  color: var(--brand);
}
.cmd-item:hover {
  background: var(--soft);
}
.cmd-empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
}
.cmd-section {
  padding: 10px 12px 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.cmd-item.hit small {
  display: block;
}
.hit-cat {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  background: var(--soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.cmd-item:disabled {
  opacity: 0.6;
  cursor: default;
}
@media (max-width: 700px) {
  .nav-sub {
    margin-right: 4px;
  }
}

/* V186.2-merged — Comfort identity ported from legacy design (CSS only, no logic change) */
:root {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  --bg: #f3f6f9;
  --panel: #fbfcfd;
  --line: #c6d8e5;
  --text: #243647;
  --muted: #6b7f91;
  --brand: #327eaf;
  --brand2: #4f93c3;
  --soft: #eaf3f9;
  --shadow: 0 10px 30px rgba(39, 76, 105, 0.08);
}
html[data-theme='dark'] {
  --bg: #172330;
  --panel: #203142;
  --line: #3d5870;
  --text: #dce8f0;
  --muted: #9db0bf;
  --brand: #6aa9d2;
  --brand2: #83badd;
  --soft: #24384b;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}
body {
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}
html[data-theme='light'] .app > aside {
  background: #e5f0f7;
  color: #15283a;
  border-left: 1px solid var(--line);
}
html[data-theme='light'] .app > aside .brand strong,
html[data-theme='light'] .app > aside .brand b {
  color: #15283a;
}
html[data-theme='light'] .app > aside nav button,
html[data-theme='light'] .aside-bottom button {
  color: #243647;
}
html[data-theme='light'] .app > aside nav button:hover,
html[data-theme='light'] .aside-bottom button:hover {
  background: #dceefa;
  color: #15283a;
}
html[data-theme='light'] .app > aside nav button.active {
  background: var(--brand);
  color: #fff;
}
html[data-theme='dark'] .app > aside {
  background: linear-gradient(180deg, #0c2538, #091b2a);
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.2);
}
.table-card,
.kpi-card,
.metric,
.panel-card,
.modal,
.payment-dialog,
.login-card {
  box-shadow: var(--shadow);
}
tbody tr:hover td {
  background: var(--soft);
}
.content input:focus,
.content select:focus,
.content textarea:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.payment-form input:focus,
.payment-form select:focus,
.payment-form textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent) !important;
  outline: none;
}
.content input::placeholder,
.content textarea::placeholder {
  color: var(--muted);
}
.primary:hover {
  background: var(--brand2);
}
* {
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
*::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
@media print {
  html,
  body,
  #root,
  .print-page {
    background: #fff !important;
    color: #111827 !important;
  }
  .print-page * {
    box-shadow: none !important;
  }
}

/* V186.2-merged — sales overview ported from executive workspace */
.sales-cycle-banner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.cycle-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
}
.sales-cycle-banner h2 {
  margin: 6px 0 4px;
  font-size: 20px;
}
.sales-cycle-banner p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.cycle-steps {
  margin-bottom: 0;
}
.sales-kpis {
  margin-bottom: 14px;
}
.quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.secondary-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-bar select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
  min-height: 48px;
  font: inherit;
  font-weight: 700;
}
.filter-bar .search-bar {
  flex: 1;
  min-width: 220px;
}
.sales-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .sales-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .filter-bar {
    flex-direction: column;
  }
  .sales-cycle-banner h2 {
    font-size: 17px;
  }
}

/* V186.2 UX refresh — unified shell, forms, tables and mobile navigation */
:root {
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
body {
  min-width: 320px;
  line-height: 1.55;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.content {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
}
.topbar {
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 1px 0 var(--line);
}
.topbar-title {
  min-width: 0;
}
.topbar-title h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
}
.mobile-menu-btn svg {
  width: 21px;
}
.mobile-nav-backdrop {
  display: none;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  min-width: 0;
}
.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand2));
  font-weight: 900;
}
.user-meta {
  display: grid;
  min-width: 0;
}
.user-meta strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.user-meta b {
  font-size: 11px;
  color: var(--muted);
}
.page-head {
  padding-block: 2px;
}
.page-head h2 {
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.02em;
}
.table-card {
  border-radius: var(--radius-lg);
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  letter-spacing: 0.01em;
}
tbody tr {
  transition: background-color 0.15s ease;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.primary,
.secondary-btn,
.page-head button {
  min-height: 42px;
  justify-content: center;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    background-color 0.15s ease;
}
.primary:active,
.secondary-btn:active,
.page-head button:active {
  transform: translateY(1px);
}
.primary:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-inline-end: 72px !important;
}
.password-field button {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  padding: 6px 9px;
  color: var(--brand);
  background: var(--soft);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.login-hero {
  overflow: hidden;
  position: relative;
}
.login-hero::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  inset-inline-start: -150px;
  bottom: -190px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  pointer-events: none;
}
.login-card .primary {
  width: 100%;
}

@media (max-width: 900px) {
  .app,
  .app.collapsed {
    grid-template-columns: 1fr;
  }
  .app > aside {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(310px, 88vw);
    height: 100dvh;
    z-index: 210;
    transform: translateX(110%);
    transition: transform 0.22s ease;
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.28);
  }
  [dir='ltr'] .app > aside {
    transform: translateX(-110%);
  }
  .app.mobile-nav-open .app > aside {
    transform: translateX(0);
  }
  .app > aside .brand > div,
  .app > aside nav span,
  .app > aside .aside-bottom span,
  .app > aside .quick-expense-btn span,
  .app > aside .nav-group-title span,
  .app > aside .nav-group-title .chev {
    display: initial;
  }
  .app aside .collapse {
    display: none;
  }
  .mobile-menu-btn {
    display: grid;
  }
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    border: 0;
    background: rgba(5, 16, 25, 0.58);
    backdrop-filter: blur(2px);
  }
  .topbar {
    height: 72px;
    gap: 10px;
  }
  .topbar-title {
    flex: 1;
  }
  .topbar-title h1 {
    font-size: 18px;
  }
  .topbar-title small {
    display: none;
  }
  .user-meta {
    display: none;
  }
  .user-chip {
    border: 0;
    padding: 0;
  }
  .topbar-actions {
    gap: 8px;
  }
}
@media (max-width: 560px) {
  .content {
    padding: 12px;
  }
  .page-head {
    gap: 12px;
  }
  .page-head button,
  .head-actions {
    width: 100%;
  }
  .modal {
    width: 100%;
    max-height: 100dvh;
    border-radius: 16px;
  }
  .login-page {
    padding: 10px;
  }
  .login-card {
    padding: 22px 18px;
    border-radius: 20px;
  }
  .auth-form h2 {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* V186.2 purchase + AI workflow refresh */

/* V186.3: the first commercial line is deliberately large and readable. */
.commercial-grid-table tbody tr {
  min-height: 76px;
}
.commercial-grid-table td {
  height: 76px;
  padding: 10px 8px;
}
.commercial-grid-table .product-cell input,
.commercial-grid-table input,
.commercial-grid-table select {
  min-height: 52px;
  font-size: 16px;
  padding-inline: 12px;
}
.commercial-grid-table th {
  height: 46px;
  font-size: 14px;
  padding: 9px 8px;
}
.commercial-grid-table {
  min-width: 1500px;
}
.commercial-grid-table th:nth-child(2) {
  width: 430px;
}
.commercial-grid-table th:nth-child(3) {
  width: 170px;
}
.commercial-grid-table th:nth-child(4) {
  width: 115px;
}
.commercial-grid-table th:nth-child(5) {
  width: 120px;
}
.commercial-grid-table th:nth-child(6) {
  width: 145px;
}
.commercial-grid-table th:nth-child(7) {
  width: 105px;
}
.commercial-grid-table th:nth-child(8) {
  width: 140px;
}
.commercial-grid-table th:nth-child(9) {
  width: 120px;
}
.commercial-grid-table th:nth-child(10) {
  width: 145px;
}
.commercial-grid-table .product-menu {
  width: min(620px, 82vw);
  max-height: 360px;
  font-size: 15px;
}
.commercial-grid-table .product-menu button {
  min-height: 64px;
  padding: 10px 14px;
}
.selected-file-name {
  display: block;
  margin-top: 7px;
  color: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.table-title h3 {
  margin: 0 0 3px;
}
.inline-message {
  margin: 0 14px 12px;
}
.ai-create-result {
  display: grid;
  gap: 12px;
}
.ai-create-result > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.8;
}
.ai-create-result svg {
  flex: none;
  margin-top: 3px;
}
.result-links {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.result-links button {
  min-width: 170px;
}
.duplicate-existing-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--warning) 55%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--warning) 9%, var(--panel));
}
.duplicate-existing-card > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.duplicate-existing-card > div:first-child > svg {
  color: var(--warning);
  flex: none;
}
.duplicate-existing-card b,
.duplicate-existing-card span {
  display: block;
}
.duplicate-existing-card span {
  color: var(--muted);
  margin-top: 5px;
}
.duplicate-existing-card .result-links svg {
  width: 16px;
}
.report-amount-due {
  color: var(--danger);
}
.report-link {
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.report-link:hover {
  text-decoration: underline;
}
.report-summary.compact {
  margin-bottom: 14px;
}
.statement-table {
  max-height: 60vh;
}
.amount-in {
  color: var(--green);
  font-weight: 800;
}
.amount-out {
  color: var(--danger);
  font-weight: 800;
}

.report-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.8;
}
.vat-report {
  max-width: 760px;
}
.commercial-page-head {
  margin-bottom: 14px;
  align-items: flex-start;
}
.commercial-status {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 800;
  background: var(--panel);
}
.workspace-tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}
.workspace-tabs button {
  white-space: nowrap;
}
.commercial-list-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 0.35fr));
  gap: 10px;
}
@media (max-width: 760px) {
  .commercial-list-filters {
    grid-template-columns: 1fr 1fr;
  }
  .commercial-list-filters input:first-child {
    grid-column: 1 / -1;
  }
  .commercial-status {
    display: none;
  }
}
.commercial-editor .items,
.commercial-editor .items table {
  width: 100%;
}
.commercial-editor .items tbody tr {
  height: 52px;
}
.commercial-editor .items input,
.commercial-editor .items select {
  min-height: 38px;
}
@media (max-width: 620px) {
  .table-title {
    align-items: flex-start;
  }
  .table-title small {
    display: block;
  }
  .result-links {
    display: grid;
    grid-template-columns: 1fr;
  }
  .result-links button {
    width: 100%;
  }
}

/* V187.1 — Projects / Maintenance executive UX */
.project-executive-workspace{display:grid;gap:18px}.executive-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.executive-actions button{display:inline-flex;align-items:center;gap:7px}.executive-actions svg{width:17px;height:17px}.executive-kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.executive-kpi{border:1px solid var(--border);background:var(--card);border-radius:16px;padding:16px;display:grid;gap:6px;box-shadow:var(--shadow-sm)}.executive-kpi span{font-size:12px;color:var(--muted)}.executive-kpi strong{font-size:20px;line-height:1.25}.executive-kpi small{color:var(--muted);font-size:11px}.executive-panel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.executive-panel{border:1px solid var(--border);background:var(--card);border-radius:16px;padding:16px}.executive-panel>header{display:flex;gap:10px;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--border)}.executive-panel>header svg{width:20px;height:20px}.executive-panel h3{margin:0;font-size:15px}.executive-panel header small{color:var(--muted)}.executive-lines{display:grid;gap:0}.executive-lines>div,.print-executive-lines>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px dashed var(--border)}.executive-lines>div:last-child,.print-executive-lines>div:last-child{border-bottom:0}.executive-lines span,.print-executive-lines span{color:var(--muted);font-size:12px}.executive-lines b,.print-executive-lines b{text-align:left}.maintenance-filters{display:grid;grid-template-columns:minmax(260px,1fr) 180px 180px auto;gap:10px;align-items:center;margin:12px 0 16px}.maintenance-filters select{min-height:42px;border:1px solid var(--border);border-radius:10px;background:var(--input-bg);color:var(--text);padding:0 10px}.print-executive-grid{grid-template-columns:repeat(3,1fr)}.print-executive-lines{display:grid;grid-template-columns:repeat(2,1fr);column-gap:24px}.print-executive-lines>div{break-inside:avoid}
@media(max-width:1100px){.executive-kpi-grid,.executive-panel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-filters{grid-template-columns:1fr 1fr}.maintenance-filters .search-bar{grid-column:1/-1}}
@media(max-width:700px){.executive-kpi-grid,.executive-panel-grid,.maintenance-filters{grid-template-columns:1fr}.maintenance-filters .search-bar{grid-column:auto}.executive-actions{justify-content:stretch}.executive-actions button{flex:1;justify-content:center}.print-executive-lines{grid-template-columns:1fr}}
@media print{.no-print{display:none!important}.project-executive-workspace{display:block}.executive-kpi-grid,.executive-panel-grid{grid-template-columns:repeat(3,1fr);gap:8px}.executive-kpi,.executive-panel{box-shadow:none;break-inside:avoid}}

/* V187.2 — Hidden Backend Features Activation */
.enterprise-tabs{flex-wrap:wrap}.enterprise-stack{display:grid;gap:18px}.enterprise-panel{overflow:hidden}.enterprise-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.enterprise-panel-head h3{margin:0 0 4px}.enterprise-panel-head p{margin:0;color:var(--muted,#667085)}.enterprise-object-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:10px 0 14px}.enterprise-object-grid>div{border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:12px;background:var(--surface-2,#fafafa);display:grid;gap:5px}.enterprise-object-grid span{font-size:12px;color:var(--muted,#667085)}.enterprise-object-grid b{font-size:15px;overflow-wrap:anywhere}.enterprise-kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0}.enterprise-alert{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:11px 12px;margin:8px 0}.enterprise-alert svg{width:18px;flex:0 0 auto}.enterprise-alert>div{display:grid;gap:3px;flex:1}.enterprise-alert span,.enterprise-alert small{color:var(--muted,#667085)}.enterprise-health{display:flex;align-items:center;gap:16px;margin:10px 0 16px}.health-score{font-size:38px;font-weight:800;line-height:1}.health-score small{font-size:14px;font-weight:600;color:var(--muted,#667085)}.form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:850px){.form-grid-3{grid-template-columns:1fr}.enterprise-panel-head{flex-direction:column}.enterprise-panel-head>div+*{width:100%}}

/* V187.6 — BEG clean enterprise navigation + dashboard redesign */
:root {
  --beg-navy: #0d2d55;
  --beg-blue: #1673b7;
  --beg-blue-2: #2d8bc7;
  --beg-sidebar: #eef7fc;
  --beg-sidebar-2: #e4f1f9;
  --beg-card-border: #dce8f1;
  --beg-canvas: #f7f9fc;
}
html[data-theme='light'] body { background: var(--beg-canvas); }
.app { grid-template-columns: 292px minmax(0, 1fr); }
.app.collapsed { grid-template-columns: 82px minmax(0, 1fr); }
html[data-theme='light'] .app > aside {
  background: linear-gradient(180deg, #f3f9fd 0%, #e7f3fa 100%);
  color: var(--beg-navy);
  border-left: 1px solid #cfe1ec;
  box-shadow: 8px 0 28px rgba(31, 75, 108, .06);
}
.app > aside { padding: 18px 16px 14px; }
.brand { gap: 12px; padding: 2px 2px 10px; }
.brand > b {
  order: -1;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0e4d7d, #0872b3);
  box-shadow: 0 8px 18px rgba(14, 93, 145, .2);
  font-size: 18px;
}
.brand > div strong { font-size: 15px; color: var(--beg-navy) !important; }
.brand small { color: #6c8ba3; font-size: 11px; margin-top: 2px; }
.sidebar-head-actions { display: flex; justify-content: flex-start; }
.collapse {
  margin: 0 0 8px;
  width: 38px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #244b68;
}
.collapse:hover { background: #dbeaf4; }
.sidebar-search-trigger {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c9dce9;
  background: rgba(255,255,255,.8);
  color: #607f96;
  border-radius: 12px;
  padding: 0 11px;
  display: flex;
  gap: 9px;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(45, 86, 117, .04);
  margin-bottom: 9px;
}
.sidebar-search-trigger svg { width: 18px; }
.sidebar-search-trigger span { flex: 1; text-align: right; font-size: 12px; }
.sidebar-search-trigger kbd {
  direction: ltr;
  border: 1px solid #d2e2ec;
  background: #f5f9fc;
  border-radius: 7px;
  padding: 3px 7px;
  color: #42647c;
  font-size: 10px;
}
.quick-expense-btn {
  min-height: 43px;
  margin: 0 0 10px;
  border: 1px solid #c8dce9;
  background: rgba(255,255,255,.78);
  color: var(--beg-navy);
  border-radius: 12px;
  justify-content: center;
  box-shadow: none;
}
.quick-expense-btn:hover { background: #fff; border-color: var(--beg-blue); color: var(--beg-blue); }
.app > aside nav { gap: 3px; }
.nav-group { margin: 0; }
.nav-group-title {
  min-height: 42px;
  padding: 9px 10px;
  color: #173953;
  font-size: 13px;
  border-radius: 11px;
  gap: 10px;
}
.nav-group-title:hover { background: rgba(255,255,255,.72); }
.nav-group-title.has-current { background: #dcedf8; color: #0b4e7d; }
.nav-group-title svg { width: 18px; height: 18px; color: #244c69; }
.nav-group-title .chev { width: 14px; }
.nav-sub {
  margin: 2px 21px 5px 0;
  padding-right: 8px;
  border-right: 1px solid #c9dce9;
  gap: 2px;
}
.nav-sub button {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 12px;
  color: #29485f;
}
.nav-sub button svg { width: 15px; height: 15px; opacity: .86; }
.nav-sub button.active {
  background: linear-gradient(135deg, #1673b7, #2b8bc7);
  box-shadow: 0 5px 14px rgba(22, 115, 183, .17);
}
.aside-bottom { gap: 2px; padding-top: 7px; }
.aside-divider { height: 1px; background: #cbdde9; margin: 4px 5px 7px; }
.aside-bottom button {
  min-height: 39px;
  padding: 8px 10px;
  color: #173953 !important;
  font-size: 12px;
  border-radius: 10px;
}
.aside-bottom button svg { width: 17px; height: 17px; }
html[data-theme='light'] .aside-bottom button:hover { background: rgba(255,255,255,.72); }

.topbar {
  height: 68px;
  padding: 0 24px;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid #e3ebf1;
  box-shadow: 0 2px 14px rgba(31, 70, 98, .04);
}
.topbar-title h1 { font-size: 17px; color: var(--beg-navy); }
.topbar-title small { font-size: 10px; color: #8297a8; }
.user-chip { border: 0; background: transparent; }
.user-avatar { border-radius: 50%; background: linear-gradient(145deg,#0f67a5,#4ca4d8); }
.content { padding: 16px 20px 26px; }

.executive-dashboard-v1876 { display: grid; gap: 15px; }
.dashboard-welcome {
  min-height: 174px;
  border: 1px solid #d8e6f0;
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(244,249,253,.9) 50%, rgba(189,219,239,.5) 100%),
    linear-gradient(135deg,#edf6fc,#b9d8ed);
  box-shadow: 0 8px 26px rgba(42, 83, 113, .07);
}
.dashboard-welcome::after {
  content: '';
  position: absolute;
  left: -30px;
  bottom: -58px;
  width: 46%;
  height: 155px;
  opacity: .32;
  background:
    linear-gradient(90deg, transparent 0 3%, #77a8c8 3% 9%, transparent 9% 13%, #5f94ba 13% 20%, transparent 20% 24%, #8db4cf 24% 30%, transparent 30% 35%, #5d8fb4 35% 41%, transparent 41% 46%, #8eb8d4 46% 51%, transparent 51% 56%, #5f91b5 56% 63%, transparent 63% 68%, #7ca8c5 68% 76%, transparent 76%);
  clip-path: polygon(0 100%,0 75%,6% 75%,6% 35%,10% 35%,10% 70%,17% 70%,17% 15%,22% 15%,22% 68%,30% 68%,30% 45%,37% 45%,37% 10%,43% 10%,43% 72%,51% 72%,51% 38%,58% 38%,58% 18%,64% 18%,64% 73%,72% 73%,72% 42%,80% 42%,80% 5%,87% 5%,87% 70%,94% 70%,94% 28%,100% 28%,100% 100%);
}
.dashboard-welcome > * { position: relative; z-index: 1; }
.welcome-eyebrow { color: #5081a3; font-size: 11px; font-weight: 800; }
.dashboard-welcome h2 { margin: 8px 0 5px; font-size: clamp(25px, 3vw, 38px); color: #0f315d; letter-spacing: -.03em; }
.dashboard-welcome p { margin: 0; color: #547188; font-size: 14px; }
.welcome-date {
  min-width: 172px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  text-align: center;
  color: #244761;
}
.welcome-date small { color: #718da2; }
.welcome-date strong { font-size: 12px; }
.welcome-date span { color: #0f6ea9; font-weight: 900; }

.dashboard-module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.dashboard-module-card {
  min-height: 142px;
  border: 1px solid var(--beg-card-border);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 56px 1fr 28px;
  align-items: center;
  gap: 12px;
  text-align: right;
  color: var(--beg-navy);
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(36, 74, 101, .055);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-module-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(36,74,101,.1); border-color: #c5dce9; }
.module-icon, .module-arrow {
  display: grid;
  place-items: center;
  border-radius: 14px;
}
.module-icon { width: 54px; height: 54px; }
.module-icon svg { width: 27px; height: 27px; }
.module-arrow { width: 27px; height: 27px; border-radius: 50%; margin-inline-start: auto; }
.module-arrow svg { width: 14px; }
.module-copy { display: grid; gap: 7px; }
.module-copy strong { font-size: 16px; }
.module-copy small { color: #72889a; line-height: 1.65; font-size: 11px; }
.tone-blue .module-icon,.tone-blue .module-arrow,.kpi-modern.tone-blue .kpi-icon{background:#e4f2ff;color:#1675c1}
.tone-green .module-icon,.tone-green .module-arrow,.kpi-modern.tone-green .kpi-icon{background:#e2f7ec;color:#15945a}
.tone-orange .module-icon,.tone-orange .module-arrow,.kpi-modern.tone-orange .kpi-icon{background:#fff0de;color:#e27013}
.tone-violet .module-icon,.tone-violet .module-arrow{background:#eee6ff;color:#7341d3}
.tone-mint .module-icon,.tone-mint .module-arrow{background:#e4f8f0;color:#15956c}
.tone-red .module-icon,.tone-red .module-arrow{background:#ffe7e5;color:#d73b35}
.tone-sky .module-icon,.tone-sky .module-arrow{background:#e3f2ff;color:#2678c6}
.tone-cyan .module-icon,.tone-cyan .module-arrow{background:#def8f6;color:#159c95}
.tone-purple .module-icon,.tone-purple .module-arrow,.kpi-modern.tone-purple .kpi-icon{background:#efe5ff;color:#7137cf}
.tone-slate .module-icon,.tone-slate .module-arrow{background:#e8eef4;color:#31506c}

.dashboard-toolbar { display:flex; align-items:center; justify-content:space-between; gap:15px; padding-top:4px; }
.dashboard-toolbar h3 { margin:0; color:var(--beg-navy); }
.dashboard-toolbar p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.dashboard-kpi-strip { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.kpi-modern { min-height:110px; box-shadow:0 6px 20px rgba(36,74,101,.05); border-color:#e1eaf0; }
.kpi-modern .kpi-icon { border-radius:12px; }
.dashboard-summary-panels { gap:12px; }
.dashboard-summary-panels .panel-card { border-color:#e0e9ef; box-shadow:0 7px 22px rgba(36,74,101,.05); }
.panel-title-row { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:10px; margin-bottom:5px; }
.panel-title-row h3 { margin:0; }
.panel-title-row svg { width:19px; color:var(--brand); }
.dashboard-tip { display:flex; align-items:center; gap:12px; border:1px solid #d8eafb; background:#edf7ff; border-radius:15px; padding:13px 17px; color:#174f79; }
.dashboard-tip > span { width:35px; height:35px; border-radius:50%; display:grid; place-items:center; background:#dcefff; }
.dashboard-tip strong { font-size:13px; }
.dashboard-tip p { margin:2px 0 0; font-size:11px; color:#5d7c94; }

html[data-theme='dark'] .dashboard-module-card,
html[data-theme='dark'] .dashboard-welcome,
html[data-theme='dark'] .welcome-date { background: var(--panel); border-color: var(--line); }
html[data-theme='dark'] .dashboard-welcome h2,
html[data-theme='dark'] .module-copy strong { color: var(--text); }
html[data-theme='dark'] .dashboard-welcome::after { display:none; }
html[data-theme='dark'] .dashboard-tip { background:var(--soft); border-color:var(--line); color:var(--text); }

@media (max-width: 1280px) {
  .app { grid-template-columns: 270px minmax(0,1fr); }
  .dashboard-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .dashboard-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-kpi-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .dashboard-welcome { min-height:auto; padding:20px; align-items:flex-start; flex-direction:column; }
  .welcome-date { min-width:0; width:100%; }
  .dashboard-module-grid { grid-template-columns: 1fr; }
  .dashboard-module-card { min-height:112px; }
  .dashboard-kpi-strip { grid-template-columns:1fr; }
  .dashboard-toolbar { align-items:stretch; flex-direction:column; }
}

/* V187.6.1 — final visual alignment with the approved BEG mockup */
.app {
  direction: ltr;
  grid-template-columns: 304px minmax(0, 1fr);
  background: #f7f9fc;
}
.app > aside,
.app > main { direction: rtl; }
.app > main { min-width: 0; background: #f7f9fc; }
.app.collapsed { grid-template-columns: 86px minmax(0,1fr); }

html[data-theme='light'] .app > aside {
  background: linear-gradient(180deg,#f5faff 0%,#eaf5fb 58%,#e4f1f8 100%);
  border-left: 0;
  border-right: 1px solid #d9e7f0;
  box-shadow: 10px 0 34px rgba(25,69,101,.07);
}
.app > aside {
  scrollbar-width: thin;
  scrollbar-color: #bfd8e8 transparent;
}
.app > aside::-webkit-scrollbar { width: 6px; }
.app > aside::-webkit-scrollbar-thumb { background:#bfd8e8; border-radius:99px; }
.brand { min-height: 70px; justify-content: flex-start; }
.brand > div { text-align: right; }
.brand > div strong { font-size:16px; line-height:1.35; }
.brand small { font-size:11px; }
.sidebar-head-actions { position:absolute; top:76px; left:15px; z-index:2; }
.sidebar-search-trigger { margin-top: 7px; }

.nav-group-title { font-size:13px; font-weight:800; }
.nav-group-title.has-current {
  background: linear-gradient(135deg,#dff0fb,#d3eaf8);
  box-shadow: inset 0 0 0 1px rgba(30,111,166,.05);
}
.nav-sub button { font-weight:700; }
.nav-sub button.active { color:#fff; }
.aside-bottom { padding-bottom:4px; }

.topbar {
  direction: rtl;
  height:72px;
  display:grid;
  grid-template-columns:minmax(190px,auto) minmax(260px,520px) minmax(190px,auto);
  align-items:center;
  gap:20px;
  padding:0 24px;
}
.topbar-title { justify-self:start; }
.topbar-search {
  justify-self:center;
  width:min(100%,520px);
  height:40px;
  border:1px solid #dce8f0;
  background:#f0f6fb;
  border-radius:13px;
  color:#6b8295;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 13px;
  cursor:pointer;
}
.topbar-search:hover { background:#e9f3fa; border-color:#c8deec; }
.topbar-search svg { width:18px; height:18px; color:#285d87; }
.topbar-search span { flex:1; text-align:right; font-size:12px; }
.topbar-search kbd { direction:ltr; font-size:10px; padding:3px 7px; border:1px solid #d5e3ed; border-radius:7px; background:#fff; color:#547086; }
.topbar-actions { justify-self:end; }
.user-chip { display:flex; align-items:center; gap:9px; padding:4px 6px; }
.user-avatar { width:38px; height:38px; display:grid; place-items:center; color:#fff; font-weight:900; }
.user-meta { display:grid; gap:1px; }
.user-meta strong { font-size:12px; }
.user-meta b { font-size:10px; }

.content { padding:14px 22px 28px; max-width:1720px; width:100%; margin:0 auto; }
.executive-dashboard-v1876 { gap:14px; }
.dashboard-welcome {
  min-height:166px;
  border-radius:18px;
  padding:24px 30px;
  background:
    radial-gradient(circle at 12% 22%,rgba(255,255,255,.95) 0 5%,transparent 28%),
    linear-gradient(100deg,rgba(255,255,255,.98),rgba(236,246,253,.93) 58%,rgba(182,214,236,.72));
}
.dashboard-welcome::after { left:-10px; width:48%; opacity:.25; }
.dashboard-module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.dashboard-module-card {
  min-height:132px;
  border-radius:17px;
  padding:15px;
  grid-template-columns:54px minmax(0,1fr) 28px;
}
.dashboard-module-card .module-copy { min-width:0; }
.dashboard-module-card .module-copy small { display:block; }
.dashboard-kpi-strip .kpi-card { border-radius:16px; }
.dashboard-summary-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dashboard-summary-panels .panel-card { min-height:220px; border-radius:16px; }

/* Keep older generic dashboard/card rules from overpowering the new dashboard. */
.executive-dashboard-v1876 .cards,
.executive-dashboard-v1876 .dashboard-panels { width:100%; }
.executive-dashboard-v1876 .dashboard-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }

html[data-theme='dark'] .app > main { background:var(--bg); }
html[data-theme='dark'] .topbar-search { background:var(--soft); border-color:var(--line); color:var(--muted); }
html[data-theme='dark'] .topbar-search kbd { background:var(--panel); border-color:var(--line); color:var(--muted); }

@media (min-width: 1500px) {
  .app { grid-template-columns: 310px minmax(0,1fr); }
  .content { padding-inline:28px; }
  .dashboard-module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .app { grid-template-columns:270px minmax(0,1fr); }
  .topbar { grid-template-columns:auto minmax(220px,1fr) auto; padding-inline:16px; }
  .dashboard-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .app,.app.collapsed { direction:rtl; grid-template-columns:1fr; }
  .app aside { inset-inline-start:0; inset-inline-end:auto; width:min(320px,90vw); }
  .topbar { display:flex; height:68px; padding-inline:14px; }
  .topbar-search { display:none; }
  .content { padding:12px; }
  .dashboard-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-summary-panels,.executive-dashboard-v1876 .dashboard-panels { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  .dashboard-module-grid { grid-template-columns:1fr; }
  .dashboard-welcome { padding:18px; border-radius:15px; }
  .dashboard-welcome h2 { font-size:25px; }
}

/* V187.6.2 — UI polish: denser dashboard, stronger typography, true accordion sidebar */
:root {
  --v18762-radius: 16px;
  --v18762-shadow: 0 8px 24px rgba(30, 72, 102, .065);
}

/* Sidebar polish */
.app { grid-template-columns: 292px minmax(0,1fr); }
.app > aside { padding: 13px 14px 16px; }
.brand { min-height: 66px; gap: 10px; }
.brand > b { width: 46px; height: 46px; border-radius: 13px; font-size: 15px; }
.brand > div strong { font-size: 16.5px; font-weight: 900; }
.brand small { font-size: 10.5px; letter-spacing: .01em; }
.sidebar-head-actions { top: 70px; }
.sidebar-search-trigger { min-height: 40px; border-radius: 11px; }
.sidebar-search-trigger span { font-size: 12.5px; }
.quick-expense-btn { min-height: 42px; margin-block: 8px 7px; border-radius: 11px; font-size: 13px; }
.app > aside nav { gap: 3px; }
.nav-group-title {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 11px;
  font-size: 14px;
  gap: 9px;
}
.nav-group-title svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-group-title .chev { margin-inline-start: auto; }
.nav-sub { gap: 2px; padding: 3px 7px 5px 0; margin-inline-start: 6px; }
.nav-sub button {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  gap: 9px;
}
.nav-sub button svg { width: 16px; height: 16px; }
.aside-bottom button { min-height: 39px; padding: 8px 10px; font-size: 12.5px; }
.aside-divider { margin-block: 6px; }

/* Header polish */
.topbar { height: 68px; padding-inline: 20px; gap: 16px; }
.topbar h1 { font-size: 19px; font-weight: 900; }
.topbar-title small { font-size: 10.5px; }
.topbar-search { height: 39px; max-width: 500px; }
.topbar-search span { font-size: 12.5px; }
.topbar-actions { gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 11px; }
.user-meta strong { font-size: 12.5px; }

/* Prevent any stray shortcut badge from entering page content. */
.content > kbd,
.executive-dashboard-v1876 > kbd { display: none !important; }

/* Dashboard density and readability */
.content { max-width: 1840px; padding: 12px 18px 24px; }
.executive-dashboard-v1876 { gap: 12px; }
.dashboard-welcome {
  min-height: 145px;
  padding: 20px 28px;
  border-radius: var(--v18762-radius);
  box-shadow: var(--v18762-shadow);
  overflow: hidden;
}
.dashboard-welcome > div:first-child { max-width: 760px; position: relative; z-index: 1; }
.welcome-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .02em; }
.dashboard-welcome h2 { margin: 8px 0 4px; font-size: clamp(27px, 2.2vw, 39px); line-height: 1.15; }
.dashboard-welcome p { margin: 0; font-size: 13px; line-height: 1.75; }
.welcome-date { min-width: 180px; padding: 12px 14px; border-radius: 14px; }
.welcome-date small { font-size: 11px; }
.welcome-date strong { font-size: 12.5px; }
.welcome-date span { font-size: 14px; }

.dashboard-module-grid { gap: 10px; }
.dashboard-module-card {
  min-height: 112px;
  border-radius: var(--v18762-radius);
  padding: 13px 14px;
  grid-template-columns: 50px minmax(0,1fr) 26px;
  gap: 11px;
  box-shadow: var(--v18762-shadow);
}
.module-icon { width: 48px; height: 48px; border-radius: 13px; }
.module-icon svg { width: 25px; height: 25px; }
.module-arrow { width: 25px; height: 25px; }
.module-copy { gap: 5px; }
.module-copy strong { font-size: 17px; line-height: 1.25; }
.module-copy small { font-size: 12px; line-height: 1.55; }

.dashboard-toolbar { padding-top: 2px; }
.dashboard-toolbar h3 { font-size: 19px; }
.dashboard-toolbar p { font-size: 11.5px; }
.dashboard-toolbar .secondary-btn { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.dashboard-kpi-strip { gap: 9px; }
.kpi-modern { min-height: 92px; padding: 13px; border-radius: 15px; }
.kpi-modern > span { font-size: 11.5px; }
.kpi-modern > strong { font-size: 20px; }
.kpi-modern > small { font-size: 11px; }
.kpi-modern .kpi-icon { width: 39px; height: 39px; }
.dashboard-summary-panels { gap: 10px; }
.dashboard-summary-panels .panel-card { min-height: 190px; border-radius: 15px; padding: 15px 16px; }
.panel-title-row h3 { font-size: 16px; }
.panel-rows > div { min-height: 35px; font-size: 12.5px; }
.panel-rows > div b { font-size: 13px; }
.dashboard-tip { padding: 11px 14px; border-radius: 13px; }
.dashboard-tip strong { font-size: 12.5px; }
.dashboard-tip p { font-size: 11px; }

/* Ultra-wide desktop: fit more information without looking tiny. */
@media (min-width: 1680px) {
  .app { grid-template-columns: 294px minmax(0,1fr); }
  .content { padding-inline: 22px; }
  .dashboard-module-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1360px) and (min-width: 901px) {
  .app { grid-template-columns: 268px minmax(0,1fr); }
  .brand > div strong { font-size: 15px; }
  .nav-group-title { font-size: 13px; }
  .dashboard-module-card { min-height: 108px; }
  .module-copy strong { font-size: 15.5px; }
  .module-copy small { font-size: 11px; }
}
@media (max-width: 900px) {
  .app,.app.collapsed { grid-template-columns: 1fr; }
  .content { padding: 10px; }
  .dashboard-welcome { min-height: auto; }
}
@media (max-width: 620px) {
  .dashboard-module-card { min-height: 100px; }
  .module-copy strong { font-size: 16px; }
  .module-copy small { font-size: 11.5px; }
}

/* V187.6.3 — Final UI Compact: compact shell, fixed sidebar tools, denser above-the-fold dashboard */
.app { grid-template-columns: 276px minmax(0,1fr); }
.app > aside {
  padding: 10px 12px 10px;
  overflow: hidden;
}
.brand { min-height: 58px; gap: 9px; }
.brand > b { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
.brand > div strong { font-size: 15px; }
.brand small { font-size: 9.5px; }
.sidebar-head-actions { top: 58px; left: 12px; }
.sidebar-search-trigger { min-height: 36px; margin-top: 5px; border-radius: 10px; padding: 7px 9px; }
.sidebar-search-trigger span { font-size: 11.5px; }
.sidebar-search-trigger kbd,
.topbar-search kbd,
body > kbd,
#root > kbd,
.app > kbd,
main > kbd,
.content kbd { display: none !important; }
.quick-expense-btn { min-height: 38px; margin-block: 6px; border-radius: 10px; font-size: 12.5px; }
.app > aside nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline-end: 2px;
  scrollbar-width: thin;
  scrollbar-color: #bfd8e8 transparent;
}
.nav-group-title { min-height: 37px; padding: 7px 9px; border-radius: 9px; font-size: 12.8px; gap: 8px; }
.nav-group-title svg { width: 16px; height: 16px; }
.nav-sub { padding: 2px 6px 3px 0; margin-inline-start: 4px; }
.nav-sub button { min-height: 31px; padding: 5px 9px; border-radius: 8px; font-size: 11.5px; gap: 8px; }
.nav-sub button svg { width: 14px; height: 14px; }
.aside-bottom {
  flex: 0 0 auto;
  margin-top: 6px;
  padding-top: 6px;
  background: linear-gradient(180deg, rgba(233,245,252,.88), #e8f4fb 22%);
  border-top: 1px solid #cfe2ef;
  gap: 1px;
  position: relative;
  z-index: 3;
}
.aside-bottom button { min-height: 32px; padding: 5px 8px; border-radius: 8px; font-size: 11.5px; }
.aside-bottom button svg { width: 15px; height: 15px; }
.aside-divider { display: none; }

.topbar { height: 60px; padding-inline: 16px; gap: 13px; }
.topbar h1 { font-size: 17px; }
.topbar-title small { font-size: 9.5px; }
.topbar-search { height: 35px; max-width: 470px; border-radius: 11px; }
.topbar-search span { font-size: 11.5px; }
.user-avatar { width: 33px; height: 33px; border-radius: 10px; }
.user-meta strong { font-size: 11.5px; }
.user-meta b { font-size: 9px; }

.content { max-width: 1880px; padding: 10px 16px 20px; }
.executive-dashboard-v1876 { gap: 9px; }
.dashboard-welcome {
  min-height: 112px;
  padding: 15px 23px;
  border-radius: 15px;
}
.dashboard-welcome::after { opacity: .2; }
.welcome-eyebrow { font-size: 10px; }
.dashboard-welcome h2 { margin: 5px 0 2px; font-size: clamp(24px,1.75vw,32px); }
.dashboard-welcome p { font-size: 11.5px; line-height: 1.55; }
.welcome-date { min-width: 165px; padding: 9px 12px; border-radius: 12px; }
.welcome-date small { font-size: 10px; }
.welcome-date strong { font-size: 11px; }
.welcome-date span { font-size: 12.5px; }
.dashboard-module-grid { gap: 8px; }
.dashboard-module-card {
  min-height: 92px;
  padding: 10px 12px;
  border-radius: 14px;
  grid-template-columns: 43px minmax(0,1fr) 23px;
  gap: 9px;
}
.module-icon { width: 42px; height: 42px; border-radius: 11px; }
.module-icon svg { width: 22px; height: 22px; }
.module-arrow { width: 22px; height: 22px; }
.module-arrow svg { width: 12px; }
.module-copy { gap: 3px; }
.module-copy strong { font-size: 15px; }
.module-copy small { font-size: 10.5px; line-height: 1.4; }
.dashboard-toolbar { min-height: 40px; padding-top: 0; }
.dashboard-toolbar h3 { font-size: 17px; }
.dashboard-toolbar p { margin-top: 1px; font-size: 10.5px; }
.dashboard-toolbar .secondary-btn { min-height: 34px; padding: 6px 11px; font-size: 11px; }
.dashboard-kpi-strip { gap: 7px; }
.kpi-modern { min-height: 78px; padding: 10px 11px; border-radius: 13px; }
.kpi-modern .kpi-icon { width: 34px; height: 34px; }
.kpi-modern > span { font-size: 10.5px; }
.kpi-modern > strong { font-size: 18px; }
.kpi-modern > small { font-size: 10px; }
.dashboard-summary-panels { gap: 8px; }
.dashboard-summary-panels .panel-card { min-height: 166px; padding: 12px 14px; border-radius: 13px; }
.panel-title-row h3 { font-size: 14.5px; }
.panel-rows > div { min-height: 29px; font-size: 11.5px; }
.panel-rows > div b { font-size: 12px; }
.dashboard-tip { padding: 8px 11px; border-radius: 11px; }
.dashboard-tip strong { font-size: 11.5px; }
.dashboard-tip p { font-size: 10px; }

@media (min-width: 1680px) {
  .app { grid-template-columns: 276px minmax(0,1fr); }
  .dashboard-module-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1360px) and (min-width: 901px) {
  .app { grid-template-columns: 254px minmax(0,1fr); }
  .nav-group-title { font-size: 12px; }
  .dashboard-module-card { min-height: 88px; }
  .module-copy strong { font-size: 14px; }
  .module-copy small { font-size: 10px; }
}
@media (max-height: 820px) and (min-width: 901px) {
  .brand { min-height: 52px; }
  .sidebar-search-trigger { min-height: 33px; }
  .quick-expense-btn { min-height: 34px; }
  .nav-group-title { min-height: 34px; padding-block: 6px; }
  .nav-sub button { min-height: 28px; padding-block: 4px; }
  .aside-bottom button { min-height: 29px; padding-block: 4px; }
  .dashboard-welcome { min-height: 102px; }
  .dashboard-module-card { min-height: 84px; }
  .kpi-modern { min-height: 72px; }
}
@media (max-width: 900px) {
  .app,.app.collapsed { grid-template-columns:1fr; }
  .app > aside { overflow-y:auto; }
  .app > aside nav { overflow:visible; flex:none; }
  .aside-bottom { position:static; background:transparent; }
  .content { padding:9px; }
  .dashboard-welcome { min-height:auto; }
}

/* V187.6.4 — Visual & UX Final Polish */
:root { --v18764-text:#16324a; --v18764-muted:#5f788c; }
body { color:var(--v18764-text); font-size:15px; }
.app { grid-template-columns: 304px minmax(0,1fr); }
.app > aside { padding-inline:14px; }
.brand > div strong { font-size:17px; }
.brand small { font-size:10.5px; }
.sidebar-search-trigger span { font-size:13.5px; }
.quick-expense-btn { font-size:14px; font-weight:800; }
.nav-group-title { min-height:40px; font-size:14.5px; font-weight:850; }
.nav-group-title svg { width:18px; height:18px; }
.nav-sub button { min-height:34px; font-size:13.5px; font-weight:700; }
.nav-sub button svg { width:16px; height:16px; }
.aside-bottom button { min-height:34px; font-size:13px; }
.topbar { height:64px; }
.topbar h1 { font-size:20px; }
.topbar-title small { font-size:11px; }
.topbar-search span { font-size:13px; }
.user-meta strong { font-size:13.5px; }
.content { padding:12px 20px 24px; }
.dashboard-welcome { min-height:104px; padding:14px 22px; }
.dashboard-welcome h2 { font-size:clamp(27px,1.8vw,34px); }
.dashboard-welcome p { font-size:13.5px; color:var(--v18764-muted); }
.welcome-eyebrow { font-size:11.5px; }
.welcome-date small { font-size:11px; }
.welcome-date strong { font-size:12.5px; }
.welcome-date span { font-size:14px; font-weight:800; }
.dashboard-module-card { min-height:94px; padding:11px 13px; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.dashboard-module-card:hover { transform:translateY(-2px); box-shadow:0 10px 26px rgba(37,89,124,.12); border-color:#b8d7e9; }
.module-copy strong { font-size:17px; }
.module-copy small { font-size:12.5px; color:#657f93; }
.dashboard-toolbar h3 { font-size:20px; }
.dashboard-toolbar p { font-size:12.5px; color:#647e91; }
.last-updated { display:inline-block; margin-inline-start:8px; color:#2c719d; font-weight:800; }
.kpi-modern { min-height:86px; }
.kpi-modern > span { font-size:12.5px; }
.kpi-modern > strong { font-size:22px; line-height:1.15; }
.kpi-modern > small { font-size:11.5px; }
.panel-title-row h3 { font-size:17px; }
.panel-rows > div { min-height:33px; font-size:13.5px; }
.panel-rows > div b { font-size:14px; font-variant-numeric:tabular-nums; }
.dashboard-tip strong { font-size:13px; }
.dashboard-tip p { font-size:11.5px; }
.dashboard-quick-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.dashboard-quick-actions button { min-height:58px; border:1px solid #d6e5ef; border-radius:13px; background:#fff; color:#183b57; display:flex; align-items:center; gap:10px; padding:9px 12px; cursor:pointer; text-align:right; box-shadow:0 3px 10px rgba(38,82,112,.045); }
.dashboard-quick-actions button:hover { border-color:#a9cfe4; background:#f8fcff; transform:translateY(-1px); }
.dashboard-quick-actions svg { width:21px; height:21px; color:#2581b7; flex:0 0 auto; }
.dashboard-quick-actions span { display:grid; gap:1px; }
.dashboard-quick-actions b { font-size:13.5px; }
.dashboard-quick-actions small { font-size:10.5px; color:#6a8294; }
.dashboard-skeleton { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.dashboard-skeleton span { height:86px; border-radius:13px; background:linear-gradient(90deg,#edf4f8 25%,#f8fbfd 50%,#edf4f8 75%); background-size:200% 100%; animation:v18764-shimmer 1.25s infinite linear; }
@keyframes v18764-shimmer { to { background-position:-200% 0; } }
/* Defensive cleanup: shortcut hints should never render as floating UI. */
kbd { position:static !important; }
body > kbd,#root > kbd,.app > kbd,main > kbd,.content > kbd { display:none !important; }
@media (min-width:1680px) { .app { grid-template-columns:304px minmax(0,1fr); } }
@media (max-width:1360px) and (min-width:901px) {
  .app { grid-template-columns:278px minmax(0,1fr); }
  .nav-group-title { font-size:13.5px; }
  .nav-sub button { font-size:12.5px; }
  .module-copy strong { font-size:16px; }
  .module-copy small { font-size:11.5px; }
}
@media (max-width:900px) { .dashboard-quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .dashboard-quick-actions { grid-template-columns:1fr; } }
html[data-theme='dark'] .dashboard-quick-actions button { background:var(--panel); border-color:var(--line); color:var(--text); }


/* V187.8.0 — Main ERP UI Integration */
:root {
  --v1878-sidebar: 316px;
  --v1878-sidebar-laptop: 288px;
}
.app { grid-template-columns: var(--v1878-sidebar) minmax(0, 1fr); }
.app > aside { padding-inline: 15px; }
.brand > div strong { font-size: 17.5px; }
.brand small { font-size: 11px; letter-spacing: .01em; }
.nav-group-title { min-height: 42px; font-size: 15px; }
.nav-sub button { min-height: 36px; font-size: 13.75px; }
.nav-sub .expense-center-nav {
  margin-top: 3px;
  border: 1px solid #bcdced;
  background: linear-gradient(180deg, #f7fcff, #edf8fd);
  color: #176b9a;
  font-weight: 850;
}
.nav-sub .expense-center-nav:hover { background: #e6f5fd; border-color: #8fc4df; }
.nav-sub .expense-center-nav svg { color: #1682bb; }
.topbar { height: 66px; }
.topbar h1 { font-size: 21px; }
.topbar-title small { font-size: 11.5px; color: #6d8495; }
.topbar-search { max-width: 520px; }
.topbar-search span { font-size: 13.5px; }
.content { max-width: 1920px; padding: 14px 22px 26px; }
.module-copy strong { font-size: 17.5px; }
.module-copy small { font-size: 12.75px; line-height: 1.5; }
.kpi-modern > strong { font-size: 23px; }
.panel-rows > div { font-size: 13.75px; }
/* Shortcut remains keyboard-only; never render shortcut badges as floating UI. */
kbd { display: none !important; position: static !important; }
@media (max-width: 1360px) and (min-width: 901px) {
  .app { grid-template-columns: var(--v1878-sidebar-laptop) minmax(0,1fr); }
  .nav-group-title { font-size: 14px; }
  .nav-sub button { font-size: 12.75px; }
}
@media (max-width: 900px) {
  .app, .app.collapsed { grid-template-columns: 1fr; }
}
html[data-theme='dark'] .nav-sub .expense-center-nav {
  background: rgba(26, 126, 179, .12);
  border-color: rgba(107, 187, 226, .3);
  color: #bfe9ff;
}

/* V187.8.1 — Production Stabilization & Internal Pages Unification */
:root {
  --ui-radius: 14px;
  --ui-radius-lg: 18px;
  --ui-shadow: 0 8px 24px rgba(30, 72, 99, .07);
  --ui-shadow-hover: 0 12px 30px rgba(30, 72, 99, .11);
  --ui-surface-soft: color-mix(in srgb, var(--panel) 86%, var(--soft));
}
.content > .page-head,
.content .page-head {
  min-height: 70px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-lg);
  background: linear-gradient(180deg, var(--panel), var(--ui-surface-soft));
  box-shadow: var(--ui-shadow);
}
.page-head > div:first-child { min-width: 0; }
.page-head h2 { font-size: clamp(22px, 1.5vw, 28px); font-weight: 900; color: var(--text); }
.page-head p { margin: 4px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.head-actions,.report-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.page-head button,.head-actions button,.report-actions button,.secondary-btn {
  min-height: 40px;
  border-radius: 11px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}
.workspace-tabs,.report-tabs {
  position: sticky;
  top: 72px;
  z-index: 12;
  margin: 0 0 14px;
  padding: 7px;
  border-radius: var(--ui-radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 5px 18px rgba(30,72,99,.055);
  backdrop-filter: blur(12px);
}
.workspace-tabs { overflow-x:auto; flex-wrap:nowrap; scrollbar-width:thin; }
.workspace-tabs button,.report-tabs button {
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.workspace-tabs button:hover,.report-tabs button:hover,.filter-chips button:hover { transform: translateY(-1px); }
.workspace-tabs button.active,.report-tabs button.active { box-shadow: 0 5px 14px color-mix(in srgb, var(--brand) 25%, transparent); }

.mini-kpis,.accounting-kpis,.kpi-grid {
  gap: 10px;
  margin-bottom: 14px;
}
.mini-kpis > div,.kpi-card {
  min-height: 92px;
  padding: 14px 15px;
  border-radius: var(--ui-radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(30,72,99,.045);
}
.mini-kpis > div:hover,.kpi-card:hover { box-shadow: var(--ui-shadow-hover); border-color: color-mix(in srgb, var(--brand) 24%, var(--line)); }
.mini-kpis span { font-size: 12.5px; }
.mini-kpis b { font-size: 20px; font-variant-numeric: tabular-nums; }

.search-bar,.project-filters,.report-advanced-filter,.date-filter {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--panel);
  box-shadow: 0 3px 14px rgba(30,72,99,.04);
}
.search-bar { min-height: 48px; padding: 7px 10px; }
.project-filters,.report-advanced-filter,.date-filter { padding: 10px; }
.search-bar input,.project-filters input,.project-filters select,.report-advanced-filter input,.report-advanced-filter select,.date-filter input,
.content input,.content select,.content textarea {
  font-size: 13.5px;
}
.content input:not([type='checkbox']):not([type='radio']),.content select { min-height: 42px; }
.content textarea { min-height: 92px; line-height: 1.65; }
.filter-chips { margin: 10px 0 14px; }
.filter-chips button { min-height: 34px; padding: 7px 13px; font-size: 12.5px; }

.table-card,.report-sheet {
  border-radius: var(--ui-radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--ui-shadow);
}
.table-card { margin-top: 12px; }
.table-card table,.report-sheet table { font-variant-numeric: tabular-nums; }
.table-card th,.report-sheet th {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 44px;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--soft) 88%, var(--panel));
  color: var(--text);
  font-size: 12.5px;
  font-weight: 850;
  border-bottom: 1px solid var(--line);
}
.table-card td,.report-sheet td { padding: 11px 13px; font-size: 13px; line-height: 1.55; }
.table-card tbody tr:nth-child(even),.report-sheet tbody tr:nth-child(even) { background: color-mix(in srgb, var(--soft) 28%, transparent); }
.table-card tbody tr:hover,.report-sheet tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, var(--panel)); }
.row-actions { white-space: nowrap; }
.row-actions button,.icon-btn { border-radius: 9px; }
.status {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: color-mix(in srgb, currentColor 8%, var(--panel));
  line-height: 1.2;
}
.error,.success-banner,.warning-banner,.info-banner {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
}
.error { border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }

.unified-data-table { overflow: hidden; }
.unified-table-scroll { overflow: auto; max-width: 100%; }
.unified-table-caption { padding: 12px 14px; font-weight: 850; border-bottom: 1px solid var(--line); background: var(--ui-surface-soft); }
.unified-table-error { margin: 10px; }
.unified-data-table .actions-head { width: 1%; white-space: nowrap; }
.unified-data-table.is-dense td,.unified-data-table.is-dense th { padding-block: 8px; }
.table-empty { height: 180px; text-align: center !important; color: var(--muted); }
.table-empty strong,.table-empty span { display: block; }
.table-empty strong { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.skeleton-row td { height: 48px; }
.table-skeleton-line {
  display:block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--soft) 20%, color-mix(in srgb,var(--soft) 50%,#fff) 50%, var(--soft) 80%);
  background-size: 200% 100%;
  animation: v18781-shimmer 1.2s linear infinite;
}
@keyframes v18781-shimmer { to { background-position: -200% 0; } }

.commercial-status {
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, var(--panel));
  color: var(--brand);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.report-sheet { padding: 16px; min-height: 430px; }
.report-sheet th { opacity: 1; }

@media (max-width: 1100px) {
  .workspace-tabs,.report-tabs { top: 66px; }
  .page-head { align-items:flex-start; }
  .commercial-status { white-space: normal; }
  .mini-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .content .page-head { padding: 12px; border-radius: 14px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .head-actions,.report-actions { width:100%; }
  .head-actions button,.report-actions button { flex:1 1 auto; }
  .workspace-tabs,.report-tabs { position: static; overflow-x:auto; flex-wrap:nowrap; }
  .mini-kpis { grid-template-columns: 1fr; }
  .project-filters,.report-advanced-filter { grid-template-columns:1fr; }
  .table-card td,.report-sheet td { padding: 10px 11px; }
}
html[data-theme='dark'] .content .page-head,
html[data-theme='dark'] .workspace-tabs,
html[data-theme='dark'] .report-tabs,
html[data-theme='dark'] .search-bar,
html[data-theme='dark'] .project-filters,
html[data-theme='dark'] .report-advanced-filter,
html[data-theme='dark'] .date-filter,
html[data-theme='dark'] .table-card,
html[data-theme='dark'] .report-sheet { box-shadow: none; }

/* V187.8.2 — Readability Pass: larger typography without breaking layout */
:root {
  --v18782-body-font: 15px;
  --v18782-small-font: 13px;
  --v18782-control-font: 14.5px;
  --v18782-table-font: 14px;
}
body { font-size: var(--v18782-body-font); }
.content { font-size: var(--v18782-body-font); }
.page-head h2 { font-size: clamp(24px, 1.65vw, 30px); }
.page-head p { font-size: 14px; }
.page-head button,.head-actions button,.report-actions button,.secondary-btn,
.workspace-tabs button,.report-tabs button { font-size: 14px; }
.mini-kpis span { font-size: 13.5px; }
.mini-kpis b { font-size: 22px; }
.search-bar input,.project-filters input,.project-filters select,
.report-advanced-filter input,.report-advanced-filter select,.date-filter input,
.content input,.content select,.content textarea { font-size: var(--v18782-control-font); }
.filter-chips button { font-size: 13.5px; }
.table-card th,.report-sheet th { font-size: 13.5px; }
.table-card td,.report-sheet td { font-size: var(--v18782-table-font); }
.status,.commercial-status,.error,.success-banner,.warning-banner,.info-banner { font-size: 13.5px; }
.unified-table-caption { font-size: 15px; }
.table-empty strong { font-size: 16px; }
.table-empty span { font-size: 13.5px; }
.sidebar, .topbar { font-size: 14px; }
.sidebar button,.sidebar a,.sidebar .nav-item { font-size: 14px; }
@media (max-width: 760px) {
  :root { --v18782-body-font: 14px; --v18782-control-font: 14px; --v18782-table-font: 13.5px; }
  .page-head h2 { font-size: 23px; }
}

/* V187.8.3 — Commercial & Stock Workflow Stabilization */
.purchase-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); }
.commercial-list-filters.filter-bar { display:grid; grid-template-columns:minmax(280px,1fr) 210px auto; align-items:center; gap:10px; margin:0 0 14px; }
.commercial-list-filters .search-bar { margin:0; }
.table-loading-state { min-height:112px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:var(--muted); font-weight:750; }
.table-loading-state .table-skeleton-line { width:min(440px,70%); }
.table-card tbody tr { transition:background .14s ease, box-shadow .14s ease; }
.table-card tbody tr:focus-within { outline:2px solid color-mix(in srgb,var(--brand) 36%,transparent); outline-offset:-2px; }
@media (max-width: 1200px) { .purchase-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 760px) { .purchase-kpis { grid-template-columns:1fr 1fr; } .commercial-list-filters.filter-bar { grid-template-columns:1fr; } }


/* V187.8.4 — Projects, Contracts & Finance Stabilization */
.projects-kpis { grid-template-columns: repeat(6, minmax(0,1fr)); }
.project-filters { grid-template-columns:minmax(260px,1.4fr) repeat(4,minmax(150px,.72fr)) auto auto; align-items:center; }
.project-filters .search-bar { margin:0; }
.contract-kpis { grid-template-columns:repeat(6,minmax(0,1fr)); }
.contract-workspace { margin-top:12px; }
.finance-health-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
.finance-health-strip > div { border:1px solid var(--line); border-radius:14px; padding:12px 14px; background:var(--panel); display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; }
.finance-health-strip span { color:var(--muted); font-size:13.5px; font-weight:800; }
.finance-health-strip b { font-size:16px; font-weight:900; color:var(--text); }
.finance-health-strip .ok { border-color:color-mix(in srgb,#22c55e 35%,var(--line)); background:color-mix(in srgb,#22c55e 5%,var(--panel)); }
.finance-health-strip .warn { border-color:color-mix(in srgb,#f59e0b 38%,var(--line)); background:color-mix(in srgb,#f59e0b 6%,var(--panel)); }
.project-card footer { gap:8px; align-items:center; flex-wrap:wrap; }
.project-card footer .secondary-btn { margin-inline-start:auto; }
@media (max-width:1450px){ .project-filters{grid-template-columns:minmax(240px,1fr) repeat(2,minmax(160px,1fr));} .project-filters button{min-width:0;} .projects-kpis,.contract-kpis{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media (max-width:1000px){ .finance-health-strip{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:760px){ .project-filters{grid-template-columns:1fr;} .projects-kpis,.contract-kpis,.finance-health-strip{grid-template-columns:1fr 1fr;} }
@media (max-width:520px){ .projects-kpis,.contract-kpis,.finance-health-strip{grid-template-columns:1fr;} }


/* V187.8.5 — Maintenance, HR & Executive Reports Stabilization */
.maintenance-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
.maintenance-filters { display:grid; grid-template-columns:minmax(300px,1.3fr) 190px 190px auto auto; gap:10px; align-items:center; margin:0 0 14px; }
.maintenance-filters .search-bar { margin:0; }
.hr-list-tools { display:grid; grid-template-columns:minmax(300px,1fr) 210px auto auto; gap:10px; align-items:center; margin:0 0 14px; }
.hr-list-tools .search-bar { margin:0; }
.hr-inline-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:520px; }
.report-executive-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
.report-executive-strip > div { min-height:70px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--panel); display:flex; flex-direction:column; justify-content:center; gap:4px; box-shadow:0 4px 14px rgba(30,72,99,.045); }
.report-executive-strip span { color:var(--muted); font-size:13.5px; font-weight:800; }
.report-executive-strip b { color:var(--text); font-size:15px; font-weight:900; overflow-wrap:anywhere; }
.status.critical,.status.breached { color:#dc2626; }
.status.high,.status.warning,.status.pending { color:#d97706; }
.status.completed,.status.approved,.status.ok,.status.active { color:#15803d; }
.status.cancelled,.status.rejected,.status.inactive { color:#64748b; }
@media (max-width:1250px){ .maintenance-filters,.hr-list-tools{grid-template-columns:1fr 1fr auto;} .maintenance-filters .search-bar,.hr-list-tools .search-bar{grid-column:1/-1;} .report-executive-strip{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:760px){ .maintenance-kpis,.report-executive-strip{grid-template-columns:1fr 1fr;} .maintenance-filters,.hr-list-tools{grid-template-columns:1fr;} .maintenance-filters .search-bar,.hr-list-tools .search-bar{grid-column:auto;} .hr-inline-kpis{grid-template-columns:1fr 1fr;max-width:none;} }
@media (max-width:500px){ .maintenance-kpis,.report-executive-strip,.hr-inline-kpis{grid-template-columns:1fr;} }


/* V187.8.7 — tax mode + 10 visible commercial rows */
.tax-mode-field { min-width: 250px; }
.tax-mode-switch { display:grid; grid-template-columns:1fr 1fr; gap:6px; min-height:38px; }
.tax-mode-switch button { border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--text); font-weight:700; padding:7px 9px; cursor:pointer; }
.tax-mode-switch button.active { border-color:#3189be; background:#e8f5fc; color:#0b5f91; box-shadow:0 0 0 1px rgba(49,137,190,.08) inset; }
.tax-mode-switch button.active.no-vat { border-color:#d69a2d; background:#fff8e8; color:#8a5b00; }
[data-theme="dark"] .tax-mode-switch button.active { background:#103b55; color:#bfe8ff; }
[data-theme="dark"] .tax-mode-switch button.active.no-vat { background:#4b3914; color:#ffe19a; }
.commercial-grid-wrap { max-height: 560px; overflow-y:auto; }
.commercial-grid-table th { position:sticky; top:0; z-index:5; }
.commercial-grid-table tbody tr { min-height:48px; }
@media (max-height:850px){ .commercial-grid-wrap{max-height:500px;} }
@media (max-width:900px){ .tax-mode-field{min-width:0;} .commercial-grid-wrap{max-height:480px;} }
/* V188.0 Partners & Commerce */
.two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:16px;align-items:start}.list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--border,#dbe7ef)}.list-row small{display:block;color:var(--muted,#6c8091);margin-top:4px}.list-row .btn{display:inline-flex;align-items:center;gap:6px;text-decoration:none;padding:9px 12px;border:1px solid var(--border,#cbdbe6);border-radius:10px;color:inherit}.panel-card textarea{min-height:92px}.form-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:12px}.form-actions label{display:flex;align-items:center;gap:6px}.commerce-order-actions{display:flex;gap:6px;flex-wrap:wrap}@media(max-width:980px){.two-col{grid-template-columns:1fr}}

/* V188.2 Commerce operations */
.link-button{background:transparent!important;color:var(--primary,#0b73b8)!important;padding:0!important;border:0!important;box-shadow:none!important}
.commerce-detail-overlay{position:fixed;inset:0;background:#071a2b88;z-index:120;display:flex;justify-content:flex-start;backdrop-filter:blur(2px)}
.commerce-detail-drawer{width:min(760px,96vw);height:100vh;overflow:auto;background:var(--surface,#fff);padding:22px;box-shadow:20px 0 60px #0003}
.commerce-detail-drawer h4{margin:22px 0 10px}.timeline-list{display:grid;gap:8px}.timeline-list .state-card{display:grid;gap:6px}.timeline-list small{color:var(--muted,#64748b)}
@media(max-width:760px){.commerce-detail-drawer{width:100%;padding:14px}}

/* V189.2 Service 360 */
.service360-head > div:first-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.service360-head svg{width:19px;height:19px}.service360-tabs{margin-bottom:14px}.service360-kpis{grid-template-columns:repeat(6,minmax(120px,1fr))}.service360-kpis small,.service360-table td small{display:block;margin-top:4px;color:var(--muted,#6b7280);font-size:11px}.service360-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.service360-insights{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:10px;margin:14px 0}.service360-insight{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line,#dce5ec);border-radius:14px;padding:13px;background:var(--panel,#fff)}.service360-insight svg{width:20px;height:20px;flex:0 0 auto}.service360-insight div{display:grid;gap:4px}.service360-insight span{font-size:12px;color:var(--muted,#6b7280)}.service360-insight.critical{border-inline-start:4px solid #c92a2a}.service360-insight.high{border-inline-start:4px solid #e67700}.service360-insight.medium{border-inline-start:4px solid #1971c2}.service360-insight.low{border-inline-start:4px solid #2b8a3e}.service360-quick-action{display:flex;gap:8px;min-width:min(460px,100%)}.service360-quick-action input{flex:1}.checkbox-field{display:flex!important;align-items:center;gap:8px;justify-content:flex-start}.checkbox-field input{width:auto!important}.status.replacement_due,.status.degraded,.status.breached,.status.critical{font-weight:700}.status.on_site,.status.active,.status.on_track,.status.done{font-weight:700}@media(max-width:1200px){.service360-kpis{grid-template-columns:repeat(3,1fr)}.service360-grid{grid-template-columns:1fr}.service360-insights{grid-template-columns:1fr 1fr}}@media(max-width:720px){.service360-kpis,.service360-insights{grid-template-columns:1fr}.service360-quick-action{min-width:0;flex-direction:column}}


/* AI Project Intelligence foundation */
.project-intelligence-foundation {
  display: grid;
  gap: 14px;
}
.project-intelligence-header,
.project-intelligence-profile,
.project-intelligence-grid > section {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
}
.project-intelligence-header {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--panel)), var(--panel));
}
.project-intelligence-eyebrow { color: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.project-intelligence-header h3 { margin: 5px 0; }
.project-intelligence-header p { margin: 0; color: var(--muted); }
.project-intelligence-guard { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 800; white-space: nowrap; }
.project-intelligence-guard svg { width: 18px; }
.project-intelligence-profile { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.project-intelligence-profile > div { padding: 14px; display: grid; gap: 3px; border-inline-start: 1px solid var(--line); }
.project-intelligence-profile > div:first-child { border-inline-start: 0; }
.project-intelligence-profile svg { width: 18px; color: var(--brand); }
.project-intelligence-profile span,.project-intelligence-grid small { color: var(--muted); font-size: 12px; }
.project-intelligence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.project-intelligence-grid > section { padding: 16px; }
.project-intelligence-grid header { display: flex; align-items: center; gap: 8px; }
.project-intelligence-grid header h4 { margin: 0; }
.project-intelligence-grid header small { margin-inline-start: auto; background: var(--soft); border-radius: 999px; padding: 3px 9px; }
.project-intelligence-grid ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.project-intelligence-grid li { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: var(--soft); }
.project-intelligence-grid li span { font-size: 13px; color: var(--brand); font-weight: 700; }
.project-intelligence-foundation > footer { color: var(--muted); font-size: 12px; padding: 0 4px; }
@media (max-width: 760px) {
  .project-intelligence-header { flex-direction: column; }
  .project-intelligence-profile,.project-intelligence-grid { grid-template-columns: 1fr; }
  .project-intelligence-profile > div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .project-intelligence-profile > div:first-child { border-top: 0; }
}


/* Hybrid Project Foundation Intake */
.project-foundation-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.project-foundation-editor > section { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--soft); }
.project-foundation-editor > section > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.project-foundation-editor > section > header .secondary-btn { padding: 6px 10px; min-height: 34px; }
.project-foundation-row { display: grid; grid-template-columns: minmax(100px,.7fr) minmax(0,1.3fr) auto; gap: 8px; margin-top: 8px; }
.project-foundation-row input { min-width: 0; }
.project-foundation-row .secondary-btn { padding: 7px 10px; min-height: 38px; }
@media (max-width: 760px) { .project-foundation-editor { grid-template-columns: 1fr; } .project-foundation-row { grid-template-columns: 1fr 1fr; } .project-foundation-row .secondary-btn { grid-column: 1 / -1; } }


/* Project Documents */
.project-documents-workspace { display:grid; gap:14px; }
.project-documents-workspace > header { display:flex; justify-content:space-between; gap:16px; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.project-documents-workspace h3 { margin:5px 0; display:flex; align-items:center; gap:8px; }
.project-documents-workspace h3 svg { width:20px; color:var(--brand); }
.project-documents-workspace header p { margin:0; color:var(--muted); }
.project-documents-workspace > header > span { display:inline-flex; align-items:center; gap:6px; color:var(--green); font-weight:800; white-space:nowrap; }
.project-documents-workspace > header > span svg { width:18px; }
.project-documents-upload { display:grid; grid-template-columns:220px minmax(0,1fr) auto; align-items:center; gap:10px; padding:14px; border:1px dashed color-mix(in srgb,var(--brand) 40%,var(--line)); border-radius:14px; background:color-mix(in srgb,var(--soft) 70%,var(--panel)); }
.project-documents-upload input,.project-documents-upload select { min-width:0; }
.project-documents-list { display:grid; gap:8px; }
.project-documents-list > article { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.project-documents-list article div { display:grid; gap:4px; min-width:0; }
.project-documents-list b { overflow-wrap:anywhere; }
.project-documents-list small { color:var(--muted); }
.project-documents-list a { display:inline-flex; align-items:center; gap:6px; text-decoration:none; white-space:nowrap; }
.project-documents-list a svg { width:16px; }
@media (max-width:760px) { .project-documents-workspace > header { flex-direction:column; } .project-documents-upload { grid-template-columns:1fr; } .project-documents-list > article { align-items:flex-start; flex-direction:column; } }


.project-record-workspace { display:grid; gap:16px; }
.project-record-header, .project-closeout-card, .project-record-grid > article, .project-record-financials, .project-record-redacted {
  border:1px solid var(--line, #2b526c); border-radius:18px; background:var(--panel, #172938); padding:18px;
}
.project-record-header { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.project-record-header h3, .project-record-workspace h4 { margin:4px 0 8px; }
.project-record-header span:last-child { color:#58e0aa; font-weight:700; display:flex; gap:8px; align-items:center; }
.project-record-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.project-record-grid article p { display:flex; flex-direction:column; gap:4px; }
.project-record-grid small { color:var(--muted, #adc0cd); }
.project-record-chip { display:inline-block; margin:0 0 7px 7px; padding:6px 9px; border-radius:999px; background:#243d50; color:#d9eafa; font-size:.88rem; }
.project-closeout-card { display:grid; gap:8px; }
.project-document-card { border-bottom:1px solid var(--line, #2b526c); }
.project-document-card:last-child { border-bottom:0; }
.project-document-card summary { display:flex; align-items:center; gap:12px; padding:13px 0; cursor:pointer; list-style:none; }
.project-document-card summary::-webkit-details-marker { display:none; }
.project-document-card summary b { min-width:140px; }
.project-document-card summary span { color:#60d9b1; }
.project-document-card summary em { margin-inline-start:auto; color:var(--muted, #adc0cd); font-style:normal; }
.project-document-card[open] summary { border-bottom:1px solid var(--line, #2b526c); }
.project-closeout-row { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line, #2b526c); }
.project-closeout-row:last-child { border-bottom:0; }
.project-closeout-row span { color:#60d9b1; }
.project-record-control-row { align-items:center; flex-wrap:wrap; }
.project-record-control-row b { min-width:160px; }
.project-record-control-row select { min-width:140px; padding:8px 10px; border:1px solid var(--line, #2b526c); border-radius:9px; background:var(--panel, #172938); color:inherit; }
.project-record-control-row .secondary-btn { padding:8px 12px; }
.project-closeout-evidence { display:grid; gap:5px; color:var(--muted, #adc0cd); font-size:.84rem; }
.project-closeout-evidence input, .project-closeout-evidence select { min-width:150px; padding:8px 10px; border:1px solid var(--line, #2b526c); border-radius:9px; background:var(--panel, #172938); color:inherit; }
.project-document-detail-fields { width:100%; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; padding:10px 0 2px; }
.project-document-detail-fields label { display:grid; gap:5px; color:var(--muted, #adc0cd); font-size:.84rem; }
.project-document-detail-fields small { color:var(--muted, #adc0cd); line-height:1.35; }
.project-document-detail-fields input, .project-document-detail-fields select { width:100%; min-width:0; box-sizing:border-box; }
.project-record-financials h4 { color:#f3c969; }
.project-record-financials > div { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.project-record-financials span { display:grid; gap:6px; color:var(--muted, #adc0cd); }
.project-record-financials b { color:#fff; }
.project-record-redacted { display:flex; align-items:center; gap:10px; color:#d7e3ed; }
@media (max-width:900px) {
  .project-record-grid, .project-record-financials > div, .project-document-detail-fields { grid-template-columns:1fr; }
  .project-record-header { flex-direction:column; }
}

/* ===== END SOURCE 01/17 ===== */


/* ===== V194 SOURCE 02/17: frontend-src/src/styles/v1902-approved.css ===== */
.app-v1902 {
  direction: ltr;
  grid-template-columns: 320px minmax(0, 1fr);
  background: #f7fbff;
}
.app-v1902.collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.app-v1902 > main,
.sidebar-v1902 { direction: rtl; }

.sidebar-v1902 {
  background: linear-gradient(180deg, #f7fbff 0%, #eef8ff 100%);
  color: #0d2d5c;
  border-inline-end: 1px solid #d9e8f4;
  box-shadow: 8px 0 28px rgba(26, 89, 135, .08);
  padding: 22px 18px 16px;
}
.sidebar-v1902 .brand {
  padding: 0 6px 16px;
  border-bottom: 1px solid #d8e7f2;
}
.sidebar-v1902 .brand > b {
  background: linear-gradient(145deg, #1274bd, #064b81);
  width: 60px;
  height: 60px;
  border-radius: 16px;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(20, 112, 180, .2);
}
.sidebar-v1902 .brand strong { color: #102f59; font-size: 18px; }
.sidebar-v1902 .brand small { color: #557596; margin-top: 5px; }
.sidebar-v1902 .collapse { color: #163b67; margin: 8px 2px 6px; }
.sidebar-v1902 .sidebar-search-trigger {
  width: 100%;
  min-height: 50px;
  border: 1px solid #c8ddea;
  background: #fff;
  color: #355b7d;
  border-radius: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 82, 121, .05);
}
.sidebar-search-trigger kbd {
  margin-inline-start: auto;
  border: 1px solid #d5e1eb;
  background: #eef5fa;
  border-radius: 7px;
  padding: 4px 7px;
  font: inherit;
  font-size: 12px;
}

.compact-nav-v1902 {
  display: grid;
  gap: 3px;
  margin-top: 15px;
}
.compact-nav-v1902 button {
  min-height: 46px;
  padding: 9px 12px;
  color: #15345d;
  border-radius: 9px;
  background: transparent;
  display: grid;
  grid-template-columns: 24px 1fr 16px;
  align-items: center;
  gap: 9px;
  text-align: right;
}
.compact-nav-v1902 button svg { width: 22px; height: 22px; }
.compact-nav-v1902 button:hover { background: #e8f4fc; color: #0869ac; }
.compact-nav-v1902 button.active {
  background: linear-gradient(90deg, #1787d0, #2476b6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 124, 191, .18);
}
.compact-nav-v1902 .nav-chevron { font-size: 25px; line-height: 1; text-align: left; }

.sidebar-quick-v1902 {
  border-top: 1px solid #cddfeb;
  margin-top: 12px;
  padding-top: 11px;
  display: grid;
  gap: 6px;
}
.sidebar-section-title {
  color: #22466b;
  font-weight: 800;
  padding: 5px 8px;
}
.sidebar-quick-v1902 button {
  border: 1px solid #e2edf5;
  background: rgba(255,255,255,.82);
  color: #173b65;
  border-radius: 9px;
  min-height: 40px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.sidebar-quick-v1902 button:hover { background: #fff; border-color: #bdd8e9; }
.sidebar-quick-v1902 svg { width: 18px; height: 18px; }

.sidebar-v1902 .aside-bottom {
  border-top: 1px solid #ccdeea;
  padding-top: 12px;
  margin-top: auto;
}
.sidebar-v1902 .aside-bottom button {
  color: #15345d;
  padding: 9px 10px;
}
.sidebar-v1902 .aside-bottom button:hover { background: #e4f2fb; color: #0869ac; }
.sidebar-version {
  display: block;
  border-top: 1px solid #d4e4ef;
  color: #6c89a4;
  text-align: center;
  line-height: 1.7;
  padding-top: 12px;
  margin-top: 5px;
}

.app-v1902.collapsed .sidebar-v1902 .brand > div,
.app-v1902.collapsed .compact-nav-v1902 span,
.app-v1902.collapsed .sidebar-quick-v1902,
.app-v1902.collapsed .sidebar-v1902 .aside-bottom span,
.app-v1902.collapsed .sidebar-version { display: none; }
.app-v1902.collapsed .compact-nav-v1902 button { grid-template-columns: 1fr; justify-items: center; padding: 10px; }

.topbar-v1902 {
  height: 72px;
  background: linear-gradient(90deg, #123d6a, #0b3157);
  border-bottom: 0;
  color: #fff;
  box-shadow: 0 5px 16px rgba(9, 46, 80, .14);
}
.topbar-v1902 .topbar-title small { color: #c5d7e7; }
.topbar-v1902 .topbar-search {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
}
.topbar-v1902 .user-chip {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
}
.topbar-v1902 .user-chip b { color: #c8d8e6; }

.approved-dashboard-v1902 { max-width: 1280px; margin: 0 auto; }
.approved-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 4px 0 24px;
}
.approved-dashboard-head h2 {
  color: #0f2d59;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.2;
  margin: 0 0 8px;
}
.approved-dashboard-head p { color: #63809c; font-size: 18px; margin: 0; }
.dashboard-brand-mark {
  min-width: 110px;
  min-height: 110px;
  border-radius: 16px;
  background: #f1f7fb;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
}
.dashboard-brand-mark b {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(145deg, #1374ba, #064b80);
}
.dashboard-brand-mark span { color: #24496f; font-weight: 800; font-size: 12px; }

.approved-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.approved-module-card {
  border: 1px solid #dce8f1;
  background: #fff;
  border-radius: 16px;
  min-height: 138px;
  padding: 20px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 17px;
  align-items: start;
  text-align: right;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(18, 70, 111, .035);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.approved-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(18, 70, 111, .10);
  border-color: #bdd8ea;
}
.approved-module-card .module-icon {
  width: 64px;
  height: 64px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.approved-module-card .module-icon svg { width: 32px; height: 32px; }
.approved-module-card .module-copy { display: grid; gap: 10px; }
.approved-module-card .module-copy strong { color: #102e59; font-size: 20px; }
.approved-module-card .module-copy small { color: #557695; line-height: 1.8; font-size: 14px; }
.approved-module-card.tone-blue .module-icon { background: #deefff; color: #0876d6; }
.approved-module-card.tone-green .module-icon { background: #dcf6e8; color: #078b5e; }
.approved-module-card.tone-orange .module-icon { background: #fff0d8; color: #dc6d07; }
.approved-module-card.tone-violet .module-icon { background: #eee3ff; color: #6731ca; }
.approved-module-card.tone-mint .module-icon { background: #dff7ec; color: #15926b; }
.approved-module-card.tone-red .module-icon { background: #ffe1df; color: #d72119; }
.approved-module-card.tone-sky .module-icon { background: #ddf0ff; color: #096ed1; }
.approved-module-card.tone-cyan .module-icon { background: #dff8f7; color: #0b948f; }
.approved-module-card.tone-purple .module-icon { background: #efe5ff; color: #6832c7; }
.approved-module-card.tone-slate .module-icon { background: #e8edf2; color: #274969; }

.approved-quick-strip {
  margin-top: 18px;
  border: 1px solid #dce9f2;
  border-radius: 16px;
  background: linear-gradient(90deg, #f4faff, #eef7fd);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.quick-strip-title { display: flex; align-items: center; gap: 12px; color: #183d66; }
.quick-strip-title > span:last-child { display: grid; gap: 3px; }
.quick-strip-title small { color: #6c879f; }
.quick-strip-icon { width: 44px; height: 44px; border-radius: 50%; background: #dceeff; display: grid; place-items: center; font-size: 24px; }
.quick-strip-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-strip-actions button {
  border: 1px solid #d5e5ef;
  background: #fff;
  color: #244b72;
  border-radius: 9px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.quick-strip-actions svg { width: 16px; }

.approved-live-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.approved-live-summary > div {
  background: #fff;
  border: 1px solid #dfeaf2;
  border-radius: 13px;
  padding: 13px 15px;
  display: grid;
  gap: 5px;
}
.approved-live-summary span, .approved-live-summary small { color: #6b859d; font-size: 12px; }
.approved-live-summary b { color: #123d6b; font-size: 18px; }

.approved-benefits {
  margin-top: 18px;
  border: 1px solid #bfe7d1;
  border-radius: 16px;
  background: linear-gradient(90deg, #f0fcf5, #ecfaf3);
  padding: 18px 22px;
}
.benefits-title { display: flex; align-items: center; gap: 10px; color: #0f8053; font-size: 18px; }
.benefits-title svg { width: 28px; height: 28px; }
.benefits-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 26px; }
.benefits-grid span { display: flex; align-items: center; gap: 8px; color: #426b5a; }
.benefits-grid svg { width: 18px; color: #159765; }
.approved-info {
  margin-top: 14px;
  border: 1px solid #d4e7f5;
  background: #eef7ff;
  color: #416887;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  text-align: center;
}
.approved-info svg { color: #1278d0; flex: 0 0 auto; }

html[data-theme='dark'] .sidebar-v1902 {
  background: #102331;
  color: #e7f2f8;
  border-color: #284454;
}
html[data-theme='dark'] .sidebar-v1902 .brand strong,
html[data-theme='dark'] .compact-nav-v1902 button,
html[data-theme='dark'] .sidebar-v1902 .aside-bottom button { color: #e3eef5; }
html[data-theme='dark'] .sidebar-v1902 .sidebar-search-trigger,
html[data-theme='dark'] .sidebar-quick-v1902 button { background: #172f3f; border-color: #315064; color: #dcecf5; }
html[data-theme='dark'] .approved-module-card,
html[data-theme='dark'] .approved-live-summary > div { background: var(--panel); border-color: var(--line); }
html[data-theme='dark'] .approved-dashboard-head h2,
html[data-theme='dark'] .approved-module-card .module-copy strong,
html[data-theme='dark'] .approved-live-summary b { color: var(--text); }
html[data-theme='dark'] .approved-dashboard-head p,
html[data-theme='dark'] .approved-module-card .module-copy small { color: var(--muted); }

@media (max-width: 1100px) {
  .approved-module-grid { grid-template-columns: 1fr; }
  .approved-live-summary { grid-template-columns: repeat(2, 1fr); }
  .approved-quick-strip { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 780px) {
  .app-v1902 { display: block; direction: rtl; }
  .app-v1902 .sidebar-v1902 { width: min(330px, 88vw); position: fixed; inset: 0 auto 0 0; transform: translateX(-110%); z-index: 100; transition: transform .2s ease; }
  .app-v1902.mobile-nav-open .sidebar-v1902 { transform: translateX(0); }
  .approved-dashboard-head { align-items: flex-start; }
  .dashboard-brand-mark { display: none; }
  .approved-module-card { grid-template-columns: 54px 1fr; min-height: 115px; padding: 15px; }
  .approved-module-card .module-icon { width: 50px; height: 50px; }
  .approved-module-card .module-copy strong { font-size: 17px; }
  .approved-live-summary, .benefits-grid { grid-template-columns: 1fr; }
  .topbar-v1902 .topbar-search span, .topbar-v1902 .topbar-title small { display: none; }
}

/* ===== END SOURCE 02/17 ===== */


/* ===== V194 SOURCE 03/17: frontend-src/src/styles/sales-invoice-v1902.css ===== */
/* V190.2 approved sales invoice treatment. Scoped to the existing commercial editor. */
.commercial-editor-shell {
  --invoice-blue: #0b68c8;
  --invoice-navy: #0f2d59;
  --invoice-line: #d8e6f2;
  --invoice-soft: #f7fbff;
  background: #f5faff;
  color: var(--invoice-navy);
  border: 1px solid #dceaf4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(31, 88, 132, .08);
}

.commercial-editor-topbar {
  min-height: 74px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  border-bottom: 1px solid var(--invoice-line);
}
.editor-title-block { display: flex; align-items: center; gap: 12px; }
.editor-doc-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #154b86, #0a315f);
  color: #fff;
}
.editor-doc-icon svg { width: 24px; height: 24px; }
.editor-title-line { display: flex; align-items: center; gap: 9px; }
.editor-title-line h1 { margin: 0; font-size: 24px; color: var(--invoice-navy); }
.editor-title-block small { color: #6f879f; }
.draft-badge {
  border-radius: 999px;
  padding: 4px 9px;
  background: #eaf4ff;
  color: #146ab7;
  font-size: 11px;
  font-weight: 800;
}
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 7px; }
.editor-toolbar .tool-btn,
.commercial-lines-toolbar .tool-btn,
.add-row-wide {
  border: 1px solid #d3e1ec;
  background: #fff;
  color: #24496e;
  border-radius: 9px;
  min-height: 38px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.editor-toolbar svg,
.commercial-lines-toolbar svg { width: 17px; height: 17px; }

.commercial-meta-strip {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--invoice-line);
}
.smart-field { display: grid; gap: 6px; min-width: 0; }
.smart-field > span { font-size: 12px; font-weight: 800; color: #153c67; }
.smart-field input,
.smart-field select,
.search-control input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbddea;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: #183b61;
}
.customer-picker { grid-column: span 2; }
.tax-mode-field { grid-column: span 2; }
.tax-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tax-mode-switch button {
  min-height: 40px;
  border: 1px solid #cbddea;
  background: #fff;
  color: #315a80;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}
.tax-mode-switch button.active { background: #eaf4ff; border-color: #69a9e4; color: #0867bb; }
.tax-mode-switch button.no-vat.active { background: #fff5e8; border-color: #f0bd73; color: #a55d00; }

.commercial-lines-card {
  margin: 12px;
  background: #fff;
  border: 1px solid var(--invoice-line);
  border-radius: 12px;
  overflow: hidden;
}
.commercial-lines-toolbar {
  min-height: 54px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--invoice-line);
  background: #fbfdff;
}
.lines-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lines-actions .primary { min-height: 38px; border-radius: 8px; }
.line-status { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.warning-chip { background: #fff3e3; color: #a95d00; padding: 5px 8px; border-radius: 999px; font-size: 11px; }
.commercial-product-search {
  margin: 8px 10px;
  min-height: 40px;
  border: 1px solid #cdddea;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  background: #fff;
}
.commercial-product-search > input { flex: 1; border: 0; outline: 0; min-width: 0; background: transparent; }
.commercial-grid-wrap { overflow: auto; }
.commercial-grid-table { min-width: 1180px; table-layout: fixed; }
.commercial-grid-table th {
  padding: 7px 6px;
  font-size: 11px;
  white-space: nowrap;
  background: #eef6fc;
  color: #315a80;
}
.commercial-grid-table tbody tr { min-height: 42px; height: 42px; }
.commercial-grid-table td { padding: 3px 5px; font-size: 12px; vertical-align: middle; }
.commercial-grid-table td input,
.commercial-grid-table td select {
  width: 100%;
  min-height: 32px;
  height: 32px;
  border: 1px solid #cdddea;
  border-radius: 6px;
  background: #fff;
  color: #183b61;
  padding: 3px 6px;
}
.commercial-grid-table .row-index { width: 36px; text-align: center; font-weight: 800; }
.commercial-grid-table .product-cell { min-width: 230px; }
.commercial-grid-table .line-total { font-weight: 900; color: #0c4f93; white-space: nowrap; }
.row-delete { border: 0; background: transparent; color: #e23c3c; cursor: pointer; }
.row-delete svg { width: 17px; height: 17px; }
.add-row-wide { margin: 8px 10px 10px; width: calc(100% - 20px); justify-content: center; border-style: dashed; }

.commercial-bottom-panels {
  margin: 12px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 10px;
}
.commercial-bottom-panels > article {
  min-height: 150px;
  background: #fff;
  border: 1px solid var(--invoice-line);
  border-radius: 10px;
  padding: 12px;
}
.commercial-bottom-panels h3 { margin: 0 0 10px; font-size: 14px; color: #11365f; }
.summary-panel > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.summary-grand { margin-top: 5px; padding: 8px !important; background: #e8f3ff; border-radius: 7px; color: #075cb3; }
.summary-grand b { font-size: 18px; }
.payment-info-panel { display: grid; align-content: start; gap: 8px; }
.payment-info-panel label,
.tax-panel label { display: grid; gap: 5px; margin-bottom: 8px; }
.payment-info-panel label > span,
.tax-panel label > span { font-size: 12px; font-weight: 800; color: #315a80; }
.payment-info-panel select,
.tax-panel input,
.tax-panel select,
.notes-panel textarea,
.terms-panel textarea { width: 100%; border: 1px solid #cfdfea; border-radius: 7px; padding: 8px; background: #fff; color: #183b61; }
.payment-info-panel small { color: #6d879e; line-height: 1.6; }
.notes-panel textarea,
.terms-panel textarea { min-height: 96px; resize: vertical; }
.tax-note { font-size: 11px; line-height: 1.6; color: #5c7892; display: flex; gap: 6px; align-items: flex-start; }

.commercial-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--invoice-line);
  box-shadow: 0 -6px 18px rgba(22, 70, 108, .06);
  backdrop-filter: blur(8px);
}
.footer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.commercial-editor-footer .primary { min-width: 170px; justify-content: center; }
.commercial-editor-footer .tool-btn {
  min-height: 40px;
  border: 1px solid #cedeea;
  background: #fff;
  color: #21496f;
  border-radius: 8px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}
.commercial-editor-footer .tool-btn svg { width: 17px; height: 17px; }
.commercial-editor-footer .print-btn { min-width: 142px; }
.commercial-editor-footer .cancel-btn { color: #5e7185; background: #f5f8fa; }
.footer-validation { color: #678198; display: flex; align-items: center; gap: 7px; font-size: 12px; }
.footer-validation svg { width: 17px; height: 17px; color: #19805c; }

html[data-theme='dark'] .commercial-editor-shell,
html[data-theme='dark'] .commercial-meta-strip,
html[data-theme='dark'] .commercial-lines-card,
html[data-theme='dark'] .commercial-bottom-panels > article,
html[data-theme='dark'] .commercial-editor-footer { background: var(--panel); border-color: var(--line); color: var(--text); }
html[data-theme='dark'] .editor-title-line h1,
html[data-theme='dark'] .smart-field > span,
html[data-theme='dark'] .commercial-bottom-panels h3,
html[data-theme='dark'] .payment-info-panel label > span,
html[data-theme='dark'] .tax-panel label > span { color: var(--text); }

@media (min-width: 1400px) {
  .commercial-bottom-panels .notes-panel,
  .commercial-bottom-panels .terms-panel { min-height: 150px; }
}
@media (max-width: 1200px) {
  .commercial-meta-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commercial-bottom-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .commercial-editor-topbar,
  .commercial-lines-toolbar,
  .commercial-editor-footer { align-items: stretch; flex-direction: column; }
  .commercial-meta-strip,
  .commercial-bottom-panels { grid-template-columns: 1fr; }
  .customer-picker,
  .tax-mode-field { grid-column: auto; }
  .editor-toolbar,
  .lines-actions,
  .footer-actions { width: 100%; }
  .commercial-editor-footer .tool-btn,
  .commercial-editor-footer .primary { flex: 1 1 160px; }
}

@media print {
  .sidebar-v1902,
  .topbar-v1902,
  .editor-toolbar,
  .commercial-lines-toolbar,
  .commercial-product-search,
  .add-row-wide,
  .commercial-editor-footer,
  .row-delete { display: none !important; }
  .commercial-editor-shell { border: 0; box-shadow: none; background: #fff; }
  .commercial-lines-card { margin: 6px 0; }
  .commercial-bottom-panels { margin: 8px 0; }
}

/* V191 modern sales invoice workspace */
.invoice-modern-workspace{max-width:1560px;margin:0 auto;padding:18px;min-height:calc(100vh - 72px);background:#f6f8fc;color:#102a43}.invoice-command-bar{min-height:70px;display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #e5ebf5;border-radius:18px;padding:12px 18px;margin-bottom:16px;box-shadow:0 8px 28px rgba(15,42,67,.05)}.invoice-command-title,.invoice-command-actions,.picker-heading,.cart-list-head,.context-panel-head,.invoice-total-lines>div,.invoice-cart-row,.cart-product,.cart-quantity>div,.context-pair{display:flex;align-items:center}.invoice-command-title{gap:12px}.invoice-command-title h1{font-size:21px;margin:0}.invoice-command-title small{color:#6e7e93}.invoice-command-actions{gap:8px}.invoice-command-actions .tool-btn{min-height:36px}.invoice-modern-layout{display:grid;grid-template-columns:250px minmax(0,1fr) 290px;gap:16px;align-items:start;direction:ltr}.invoice-modern-layout>*{direction:rtl}.invoice-total-rail{position:sticky;top:14px;display:grid;gap:12px}.invoice-total-card{background:linear-gradient(145deg,#0d2845,#153c63);color:#fff;border-radius:20px;padding:22px;box-shadow:0 20px 42px rgba(12,42,69,.18)}.invoice-total-card>span{color:#bfd1e4;font-weight:700}.invoice-total-card>b{display:block;font-size:32px;line-height:1.25;margin:10px 0 22px;letter-spacing:-1px}.invoice-total-card>b em{font-style:normal;font-size:14px;color:#bcd1e5}.invoice-total-lines{border-top:1px solid rgba(255,255,255,.16);border-bottom:1px solid rgba(255,255,255,.16);padding:10px 0;margin-bottom:18px}.invoice-total-lines>div{justify-content:space-between;padding:6px 0;color:#c8d6e4;font-size:13px}.invoice-total-lines strong{color:#fff}.invoice-total-card .issue-btn{width:100%;justify-content:center;margin:0;border-radius:12px;min-height:48px}.invoice-print-btn{width:100%;margin-top:9px;background:transparent;border:1px solid rgba(255,255,255,.35);border-radius:12px;padding:11px;color:#fff;font:inherit;cursor:pointer}.invoice-guard-card{display:flex;gap:10px;padding:14px;background:#fff;border:1px solid #e4ebf5;border-radius:15px;font-size:12px}.invoice-guard-card svg{color:#0f7bce;flex:none}.invoice-guard-card b,.invoice-guard-card span{display:block}.invoice-guard-card span{color:#738196;line-height:1.5;margin-top:2px}.invoice-cart-zone{min-width:0;display:grid;gap:14px}.invoice-item-picker,.invoice-cart-list,.invoice-context-panel{background:#fff;border:1px solid #e4ebf5;border-radius:18px;box-shadow:0 8px 24px rgba(15,42,67,.035)}.invoice-item-picker{padding:18px}.picker-heading{justify-content:space-between;margin-bottom:14px}.picker-heading span:first-child{font-size:12px;color:#718198;font-weight:700}.picker-heading h2,.cart-list-head h2,.context-panel-head h2{font-size:17px;margin:3px 0 0}.picker-count{background:#e8f4ff;color:#0872c9;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800}.picker-input-wrap{display:flex;align-items:center;gap:9px;border:2px solid #1976ed;border-radius:13px;padding:5px 7px 5px 5px}.picker-input-wrap>svg{color:#1976ed}.picker-input-wrap>svg:first-child{padding-left:8px;border-left:1px solid #dce6f3}.picker-input-wrap input{border:0;outline:0;flex:1;min-width:0;font:inherit;padding:10px;color:#132c4b}.picker-input-wrap .primary{min-height:39px;border-radius:9px;white-space:nowrap}.invoice-product-results{margin-top:9px;border:1px solid #e0e9f4;border-radius:12px;overflow:hidden}.invoice-product-results button{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto auto 22px;align-items:center;gap:12px;border:0;border-bottom:1px solid #edf1f6;background:#fff;text-align:right;padding:10px 13px;cursor:pointer;color:#102a43}.invoice-product-results button:last-child{border:0}.invoice-product-results button:hover{background:#f4f9ff}.product-result-name b,.product-result-name small{display:block}.product-result-name small{font-size:11px;color:#7b899c;margin-top:2px}.item-availability{background:#dff7e9;color:#087943;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;white-space:nowrap}.invoice-product-results strong{white-space:nowrap;font-size:13px}.invoice-product-results svg{color:#1878ec}.invoice-cart-list{padding:17px}.cart-list-head{justify-content:space-between;gap:12px;padding-bottom:14px;border-bottom:1px solid #e8eef6}.cart-list-head span{display:block;font-size:12px;color:#718198;margin-top:4px}.cart-list-head .tool-btn{min-height:34px;white-space:nowrap}.invoice-cart-row{gap:12px;padding:14px 2px;border-bottom:1px solid #edf1f6}.cart-product{gap:10px;min-width:190px;flex:1.35}.cart-product-mark{width:36px;height:36px;border-radius:11px;background:#eaf3ff;color:#1677e8;display:grid;place-items:center;font-weight:900}.cart-product b,.cart-product small{display:block}.cart-product small{color:#7c899a;font-size:11px;margin:2px 0 5px}.cart-product .item-availability{display:inline-block}.cart-quantity,.cart-price,.cart-discount,.cart-line-total{display:grid;gap:5px}.cart-quantity>span,.cart-price>span,.cart-discount>span,.cart-line-total>span{font-size:11px;color:#77869a;font-weight:700}.cart-quantity>div{border:1px solid #dce6f2;border-radius:9px;overflow:hidden}.cart-quantity button{border:0;background:#f5f8fc;color:#1778eb;font-size:19px;width:27px;height:32px;cursor:pointer}.cart-quantity input{width:35px;text-align:center;border:0;border-right:1px solid #e1e8f1;border-left:1px solid #e1e8f1;outline:0;height:32px}.cart-price input,.cart-discount input{width:82px;border:1px solid #dce6f2;border-radius:9px;padding:8px;outline:0;font:inherit}.cart-line-total{min-width:100px}.cart-line-total b{color:#113d69;white-space:nowrap}.cart-line-total small{font-size:10px;color:#718198}.invoice-cart-row .row-delete{margin-right:auto;border:0;background:#fff1f2;color:#e5484d;padding:8px;border-radius:9px;cursor:pointer}.invoice-add-more,.invoice-empty-cart{width:100%;border:1px dashed #a9c9ef;color:#1677e8;background:#f8fbff;border-radius:13px;cursor:pointer;font:inherit}.invoice-add-more{margin-top:13px;padding:12px;font-weight:800}.invoice-empty-cart{padding:32px;display:grid;justify-items:center;gap:7px}.invoice-empty-cart svg{width:25px;height:25px}.invoice-empty-cart span{color:#718198;font-size:12px}.invoice-context-panel{padding:17px;position:sticky;top:14px}.context-panel-head{justify-content:space-between;border-bottom:1px solid #e8eef6;padding-bottom:14px;margin-bottom:12px}.context-panel-head span{font-size:11px;color:#738196}.context-field{display:grid;gap:6px;margin:12px 0}.context-field>span{font-size:12px;font-weight:800;color:#35516d}.context-field input,.context-field select,.context-field textarea{border:1px solid #dbe5f0;border-radius:10px;padding:10px;background:#fff;font:inherit;outline:0;color:#183653;width:100%;box-sizing:border-box}.context-field textarea{min-height:70px;resize:vertical}.context-pair{gap:9px}.context-pair>*{flex:1}.context-tax-switch{display:flex;gap:6px;border-radius:10px;background:#f1f5f9;padding:4px}.context-tax-switch button{flex:1;border:0;background:transparent;border-radius:8px;padding:8px 5px;font:inherit;font-size:12px;color:#64758a;cursor:pointer}.context-tax-switch button.active{background:#1677e8;color:#fff;box-shadow:0 2px 6px rgba(22,119,232,.25)}@media(max-width:1180px){.invoice-modern-layout{grid-template-columns:minmax(0,1fr) 280px}.invoice-total-rail{grid-column:1/-1;position:static;display:grid;grid-template-columns:1fr 1fr}.invoice-cart-row{flex-wrap:wrap}.cart-product{min-width:45%}}@media(max-width:760px){.invoice-modern-workspace{padding:10px}.invoice-command-bar{padding:10px 12px}.invoice-command-actions .tool-btn:not(.icon-only){display:none}.invoice-modern-layout{display:flex;flex-direction:column}.invoice-context-panel,.invoice-total-rail{position:static;width:100%}.invoice-total-rail{display:flex;flex-direction:column}.picker-input-wrap{flex-wrap:wrap}.picker-input-wrap input{min-width:72%}.picker-input-wrap .primary{width:100%;justify-content:center}.invoice-product-results button{grid-template-columns:minmax(0,1fr) auto}.invoice-product-results strong,.invoice-product-results svg{display:none}.cart-list-head{align-items:flex-start}.cart-list-head .tool-btn{display:none}.invoice-cart-row{align-items:flex-end;gap:10px}.cart-product{flex-basis:100%}.cart-price input,.cart-discount input{width:100%}.invoice-context-panel{order:3}.invoice-total-rail{order:2}.invoice-cart-zone{order:1}}

/* V191.1 — Full-width workspace and isolated printable invoice */
.invoice-modern-workspace{max-width:none;width:100%;margin:0;padding:14px 8px 24px;}
.invoice-modern-layout{width:100%;grid-template-columns:minmax(220px,.7fr) minmax(620px,2.15fr) minmax(250px,.85fr);}
.invoice-print-overlay{position:fixed;inset:0;z-index:1000;overflow:auto;padding:28px;background:rgba(8,32,50,.5);direction:rtl;}
.invoice-print-sheet{width:min(920px,100%);margin:auto;background:#fff;color:#122a40;box-shadow:0 18px 60px rgba(5,25,42,.28);padding:38px;min-height:100%;font-family:'Segoe UI',Tahoma,Arial,sans-serif;}
.invoice-print-actions{display:flex;gap:10px;justify-content:flex-start;margin-bottom:22px}.invoice-print-actions button{border:1px solid #bdd1df;border-radius:8px;background:#fff;color:#173a58;padding:9px 14px;font:inherit;font-weight:800;cursor:pointer}.invoice-print-actions .primary{background:#1570a6;color:#fff;border-color:#1570a6}
.invoice-print-sheet header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #1570a6;padding-bottom:20px;margin-bottom:20px}.invoice-print-sheet header b{font-size:20px}.invoice-print-sheet header small{display:block;color:#6b8090;margin-top:4px}.invoice-print-sheet h1{margin:0;font-size:28px}.invoice-print-sheet header span{color:#6b8090;font-size:13px}
.invoice-print-meta{display:grid;grid-template-columns:repeat(2,1fr);gap:10px 28px;padding:16px 0 22px}.invoice-print-meta h2{grid-column:1/-1;margin:0;font-size:17px}.invoice-print-meta div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #e5eef4;padding:8px 0}.invoice-print-meta span{color:#63798a}.invoice-print-sheet table{width:100%;min-width:0;border-collapse:collapse;margin:0}.invoice-print-sheet th,.invoice-print-sheet td{padding:11px 8px;border-bottom:1px solid #dce7ee;text-align:right;font-size:13px}.invoice-print-sheet th{background:#edf6fa;color:#173a58}.invoice-print-notes{margin-top:18px;padding:13px 15px;border:1px solid #d9e8f1;background:#f7fbfd;border-radius:8px}.invoice-print-notes b{font-size:14px}.invoice-print-notes p{margin:7px 0 0;color:#40596c;white-space:pre-wrap}.invoice-print-sheet footer{display:flex;justify-content:flex-start;margin-top:22px}.invoice-print-sheet footer>div{width:min(320px,100%);display:grid;gap:9px;padding:16px;border:1px solid #bfd9e8;border-radius:10px;background:#f7fbfd}.invoice-print-sheet footer h2{margin:0 0 4px;font-size:17px}.invoice-print-sheet footer span,.invoice-print-sheet footer strong{display:flex;justify-content:space-between;gap:16px}.invoice-print-sheet footer strong{border-top:1px solid #bcd5e4;padding-top:12px;color:#0c5d8d;font-size:17px}
@media print{ @page{size:A4;margin:10mm} body{background:#fff!important}.invoice-print-overlay{position:static!important;display:block!important;overflow:visible!important;padding:0!important;background:#fff!important}.invoice-print-sheet{width:100%!important;min-height:0!important;margin:0!important;padding:0!important;box-shadow:none!important}.invoice-print-actions{display:none!important}.invoice-print-sheet table{page-break-inside:auto}.invoice-print-sheet tr{page-break-inside:avoid;page-break-after:auto}.invoice-print-sheet thead{display:table-header-group}.invoice-print-sheet footer{page-break-inside:avoid}.app{display:none!important}}
@media(max-width:900px){.invoice-modern-workspace{padding:8px 0 16px}.invoice-modern-layout{grid-template-columns:1fr}.invoice-print-overlay{padding:0}.invoice-print-sheet{padding:20px}.invoice-print-meta{grid-template-columns:1fr}.invoice-print-sheet th,.invoice-print-sheet td{font-size:11px;padding:8px 5px}}

/* V191.2 — Professional A4 invoice print hierarchy */
.invoice-print-sheet{border-top:7px solid #0d6a9f}.invoice-print-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;border-bottom:1px solid #c9e1ee!important;padding-bottom:24px!important}.invoice-print-brand{display:flex;align-items:center;gap:11px;text-align:right}.invoice-print-brand>span{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,#0a4d77,#1689bd);color:#fff;font-size:12px;font-weight:900;letter-spacing:.5px}.invoice-print-brand b{font-size:18px;letter-spacing:.2px}.invoice-print-brand small{font-size:11px}.invoice-print-reference{display:block;margin-top:6px}.invoice-print-status{display:inline-block;margin-top:8px;padding:4px 10px;border-radius:999px;background:#e8f4fb;color:#0b6498;font-size:11px;font-style:normal;font-weight:800}.invoice-print-meta{border-bottom:1px solid #e0ebf1;padding-bottom:18px!important}.invoice-print-meta div{background:#f9fcfe;border:1px solid #e1edf3;border-radius:7px;padding:9px 11px!important}.invoice-print-sheet th{background:#0e5f91!important;color:#fff!important;font-weight:800}.invoice-print-sheet tbody tr:nth-child(even){background:#f7fbfd}.invoice-print-footer{border-top:1px solid #d8e7ef;padding-top:18px}.invoice-print-summary{border:0!important;border-right:4px solid #0d6a9f!important;border-radius:4px!important;background:#f1f8fc!important}.invoice-print-summary strong{color:#073e61!important}.invoice-print-sheet td:nth-child(4),.invoice-print-sheet td:nth-child(5),.invoice-print-sheet td:nth-child(6),.invoice-print-sheet td:nth-child(7){font-variant-numeric:tabular-nums;white-space:nowrap}@media print{.invoice-print-sheet{border-top-width:5px!important}.invoice-print-meta div{background:#fff!important}.invoice-print-sheet th{print-color-adjust:exact;-webkit-print-color-adjust:exact}.invoice-print-brand>span,.invoice-print-status{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* V192 commercial server drafts */
.commercial-draft-menu{position:relative}.commercial-draft-popover{position:absolute;z-index:70;top:calc(100% + 8px);left:0;width:300px;max-height:360px;overflow:auto;padding:12px;border:1px solid #cddfe9;border-radius:12px;background:#fff;box-shadow:0 16px 38px rgba(20,59,84,.18)}.commercial-draft-popover header,.commercial-draft-row{display:flex;justify-content:space-between;align-items:center;gap:8px}.commercial-draft-popover header{padding-bottom:10px;border-bottom:1px solid #e4edf2}.commercial-draft-popover header button,.commercial-draft-row button{border:1px solid #c7dbe7;background:#fff;border-radius:7px;padding:5px 8px;cursor:pointer;font:inherit;font-size:12px}.commercial-draft-row{padding:10px 0;border-bottom:1px solid #edf2f5}.commercial-draft-row:last-child{border:0}.commercial-draft-row span{display:grid;gap:3px}.commercial-draft-row small{color:#718698;font-size:11px}.commercial-draft-row .danger{color:#b42318}.commercial-draft-popover .error{margin:8px 0;font-size:12px}.commercial-draft-popover .muted{font-size:13px}


/* Shared draft status — compact, explicit and usable in every commercial workspace. */
.commercial-draft-status{display:flex;align-items:center;gap:10px;border:1px solid #dbe8f4;border-radius:10px;padding:5px 6px 5px 10px;background:#fff}
.commercial-draft-state{display:flex;align-items:center;gap:6px;font-size:12px;color:#5f7185;white-space:nowrap}
.commercial-draft-status.is-server .commercial-draft-state{color:#087f5b}
.commercial-draft-status.is-temporary .commercial-draft-state{color:#a66500}
.commercial-draft-status.is-unsaved .commercial-draft-state{color:#6b7280}
.commercial-draft-status .tool-btn{min-height:32px}
@media(max-width:760px){.commercial-draft-status{width:100%;justify-content:space-between}.commercial-draft-state{overflow:hidden;text-overflow:ellipsis}}

/* Company legal data on commercial A4 printouts. */
.invoice-print-company-data{display:flex;flex-wrap:wrap;gap:8px 18px;margin:-8px 0 18px;color:#536b7b;font-size:11px}.invoice-print-company-data span{white-space:nowrap}.invoice-print-company-data b{color:#163d5b}.invoice-print-legal{display:flex;flex-wrap:wrap;gap:8px 16px;justify-content:space-between;margin-top:22px;padding-top:12px;border-top:1px solid #d8e7ef;color:#687f90;font-size:10px}.invoice-print-legal span{direction:ltr}@media print{.invoice-print-company-data,.invoice-print-legal{color:#334b5c!important}}

.invoice-print-logo{width:48px;height:48px;object-fit:contain;border-radius:10px;background:#fff}.invoice-print-signatures{display:flex;gap:30px;align-items:flex-end;min-height:36px;margin-top:16px}.invoice-print-signatures img{display:block;max-width:128px;max-height:58px;object-fit:contain}@media print{.invoice-print-logo,.invoice-print-signatures img{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* ===== END SOURCE 03/17 ===== */


/* ===== V194 SOURCE 04/17: frontend-src/src/styles/commercial-workflows-v1902.css ===== */
/* V190.2 shared treatment for quotations, returns and purchase documents. */
.quotation-workspace,
.return-workspace,
.purchase-request-workspace,
.supplier-invoice-workspace {
  --cw-blue:#0b68c8;
  --cw-navy:#0f2d59;
  --cw-line:#d8e6f2;
  --cw-soft:#f7fbff;
  background:#f5faff;
  color:var(--cw-navy);
  border:1px solid #dceaf4;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 10px 34px rgba(31,88,132,.08);
}

.quotation-workspace .commercial-editor-topbar,
.return-workspace .commercial-editor-topbar,
.purchase-request-workspace .commercial-editor-topbar,
.supplier-invoice-workspace .commercial-editor-topbar {
  min-height:68px;
  padding:12px 16px;
  background:linear-gradient(180deg,#fff 0%,#f5faff 100%);
  border-bottom:1px solid var(--cw-line);
}

.quotation-workspace .editor-title-line h1,
.return-workspace .editor-title-line h1,
.purchase-request-workspace .editor-title-line h1,
.supplier-invoice-workspace .editor-title-line h1 {
  margin:0;
  font-size:23px;
  color:var(--cw-navy);
}

.quotation-workspace .commercial-meta-strip,
.return-workspace .commercial-meta-strip,
.purchase-request-workspace .commercial-meta-strip,
.supplier-invoice-workspace .commercial-meta-strip {
  padding:12px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px 12px;
  background:#fff;
  border-bottom:1px solid var(--cw-line);
}

.quotation-workspace .smart-field input,
.quotation-workspace .smart-field select,
.return-workspace .smart-field input,
.return-workspace .smart-field select,
.purchase-request-workspace .smart-field input,
.purchase-request-workspace .smart-field select,
.supplier-invoice-workspace .smart-field input,
.supplier-invoice-workspace .smart-field select {
  min-height:38px;
  border:1px solid #cbddea;
  border-radius:8px;
  background:#fff;
  color:#183b61;
}

.quotation-workspace .commercial-lines-card,
.return-workspace .commercial-lines-card,
.purchase-request-workspace .commercial-lines-card,
.supplier-invoice-workspace .commercial-lines-card {
  margin:12px;
  border:1px solid var(--cw-line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}

.quotation-workspace table,
.return-workspace table,
.purchase-request-workspace table,
.supplier-invoice-workspace table {
  width:100%;
  border-collapse:collapse;
}

.quotation-workspace thead th,
.return-workspace thead th,
.purchase-request-workspace thead th,
.supplier-invoice-workspace thead th {
  padding:7px 6px;
  font-size:11px;
  white-space:nowrap;
  background:#eef6fc;
  color:#315a80;
  border-bottom:1px solid #d8e6f2;
}

.quotation-workspace tbody tr,
.return-workspace tbody tr,
.purchase-request-workspace tbody tr,
.supplier-invoice-workspace tbody tr {
  min-height:42px;
  height:42px;
}

.quotation-workspace tbody td,
.return-workspace tbody td,
.purchase-request-workspace tbody td,
.supplier-invoice-workspace tbody td {
  padding:4px 6px;
  font-size:12px;
  border-bottom:1px solid #edf3f8;
  vertical-align:middle;
}

.quotation-workspace tbody input,
.quotation-workspace tbody select,
.return-workspace tbody input,
.return-workspace tbody select,
.purchase-request-workspace tbody input,
.purchase-request-workspace tbody select,
.supplier-invoice-workspace tbody input,
.supplier-invoice-workspace tbody select {
  width:100%;
  height:32px;
  min-height:32px;
  padding:3px 6px;
  border:1px solid #cdddea;
  border-radius:6px;
  background:#fff;
  color:#183b61;
}

.quotation-workspace .commercial-bottom-panels,
.return-workspace .commercial-bottom-panels,
.purchase-request-workspace .commercial-bottom-panels,
.supplier-invoice-workspace .commercial-bottom-panels {
  margin:12px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.quotation-workspace .commercial-bottom-panels > article,
.return-workspace .commercial-bottom-panels > article,
.purchase-request-workspace .commercial-bottom-panels > article,
.supplier-invoice-workspace .commercial-bottom-panels > article {
  min-height:140px;
  padding:12px;
  background:#fff;
  border:1px solid var(--cw-line);
  border-radius:10px;
}

.quotation-workspace .commercial-editor-footer,
.return-workspace .commercial-editor-footer,
.purchase-request-workspace .commercial-editor-footer,
.supplier-invoice-workspace .commercial-editor-footer {
  position:sticky;
  bottom:0;
  z-index:8;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 14px;
  background:rgba(255,255,255,.96);
  border-top:1px solid var(--cw-line);
  box-shadow:0 -6px 18px rgba(22,70,108,.06);
  backdrop-filter:blur(8px);
}

.quotation-workspace .primary,
.return-workspace .primary,
.purchase-request-workspace .primary,
.supplier-invoice-workspace .primary {
  border-radius:8px;
  min-height:38px;
}

html[data-theme='dark'] .quotation-workspace,
html[data-theme='dark'] .return-workspace,
html[data-theme='dark'] .purchase-request-workspace,
html[data-theme='dark'] .supplier-invoice-workspace,
html[data-theme='dark'] .quotation-workspace .commercial-meta-strip,
html[data-theme='dark'] .return-workspace .commercial-meta-strip,
html[data-theme='dark'] .purchase-request-workspace .commercial-meta-strip,
html[data-theme='dark'] .supplier-invoice-workspace .commercial-meta-strip,
html[data-theme='dark'] .quotation-workspace .commercial-lines-card,
html[data-theme='dark'] .return-workspace .commercial-lines-card,
html[data-theme='dark'] .purchase-request-workspace .commercial-lines-card,
html[data-theme='dark'] .supplier-invoice-workspace .commercial-lines-card {
  background:var(--panel);
  border-color:var(--line);
  color:var(--text);
}

@media (max-width:1200px) {
  .quotation-workspace .commercial-meta-strip,
  .return-workspace .commercial-meta-strip,
  .purchase-request-workspace .commercial-meta-strip,
  .supplier-invoice-workspace .commercial-meta-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .quotation-workspace .commercial-bottom-panels,
  .return-workspace .commercial-bottom-panels,
  .purchase-request-workspace .commercial-bottom-panels,
  .supplier-invoice-workspace .commercial-bottom-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:760px) {
  .quotation-workspace .commercial-meta-strip,
  .return-workspace .commercial-meta-strip,
  .purchase-request-workspace .commercial-meta-strip,
  .supplier-invoice-workspace .commercial-meta-strip,
  .quotation-workspace .commercial-bottom-panels,
  .return-workspace .commercial-bottom-panels,
  .purchase-request-workspace .commercial-bottom-panels,
  .supplier-invoice-workspace .commercial-bottom-panels { grid-template-columns:1fr; }
  .quotation-workspace .commercial-editor-footer,
  .return-workspace .commercial-editor-footer,
  .purchase-request-workspace .commercial-editor-footer,
  .supplier-invoice-workspace .commercial-editor-footer { flex-direction:column; align-items:stretch; }
}

@media print {
  .quotation-workspace .commercial-editor-topbar .editor-toolbar,
  .return-workspace .commercial-editor-topbar .editor-toolbar,
  .purchase-request-workspace .commercial-editor-topbar .editor-toolbar,
  .supplier-invoice-workspace .commercial-editor-topbar .editor-toolbar,
  .quotation-workspace .commercial-editor-footer,
  .return-workspace .commercial-editor-footer,
  .purchase-request-workspace .commercial-editor-footer,
  .supplier-invoice-workspace .commercial-editor-footer { display:none !important; }
  .quotation-workspace,
  .return-workspace,
  .purchase-request-workspace,
  .supplier-invoice-workspace { box-shadow:none; border:0; background:#fff; }
}


/* V191.1 unified commercial workspace — sales, quotations and purchasing share one compact visual language. */
:where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace){
  --cw-accent:#1677e8;
  --cw-ink:#102a43;
  --cw-muted:#6f7f95;
  --cw-border:#dfe8f2;
  --cw-surface:#ffffff;
  --cw-page:#f6f8fc;
  border-radius:18px;
  border-color:var(--cw-border);
  box-shadow:0 10px 30px rgba(15,42,67,.06);
}
:where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .commercial-editor-topbar,
.invoice-modern-workspace .invoice-command-bar{
  min-height:64px;
  padding:10px 16px;
  margin-bottom:0;
  border-radius:0;
  box-shadow:none;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  border-color:var(--cw-border);
}
:where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .editor-doc-icon{
  width:40px;height:40px;border-radius:12px;background:linear-gradient(145deg,#1677e8,#0f4f9e);
}
:where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .editor-title-line h1,
.invoice-modern-workspace .invoice-command-title h1{font-size:20px;color:var(--cw-ink)}
:where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .editor-toolbar,
.invoice-modern-workspace .invoice-command-actions{gap:6px}
:where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .tool-btn{border-radius:9px}
:where(.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .commercial-meta-strip{
  padding:12px 16px;background:#fbfdff;border-color:var(--cw-border);
}
:where(.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .commercial-lines-card{
  margin:14px 16px;border-color:var(--cw-border);border-radius:14px;
}
:where(.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .commercial-bottom-panels{
  margin:14px 16px;gap:12px;
}
.invoice-modern-workspace{padding:0;background:var(--cw-page)}
.invoice-modern-workspace .invoice-modern-layout{padding:16px;gap:14px}
.invoice-modern-workspace .invoice-item-picker,
.invoice-modern-workspace .invoice-cart-list,
.invoice-modern-workspace .invoice-context-panel{border-color:var(--cw-border);border-radius:14px;box-shadow:none}
.invoice-modern-workspace .invoice-total-card{border-radius:14px;background:linear-gradient(145deg,#102a43,#163f69)}
.invoice-modern-workspace .picker-input-wrap{border-color:#b9d4ef;background:#fff}
@media (max-width:1180px){
  .invoice-modern-workspace .invoice-modern-layout{grid-template-columns:220px minmax(0,1fr)}
  .invoice-modern-workspace .invoice-context-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
}
@media (max-width:760px){
  .invoice-modern-workspace .invoice-modern-layout{display:block;padding:10px}
  .invoice-modern-workspace .invoice-total-rail{position:static;margin-bottom:10px}
  .invoice-modern-workspace .invoice-context-panel{display:block}
  :where(.invoice-modern-workspace,.quotation-workspace,.purchase-request-workspace,.purchase-workspace) .commercial-editor-topbar,
  .invoice-modern-workspace .invoice-command-bar{padding:10px;border-radius:0}
}

.commercial-approval-queue{background:#fff;border:1px solid #dfe8f2;border-radius:14px;padding:14px;color:#102a43}
.commercial-approval-queue header,.commercial-approval-queue article,.approval-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.commercial-approval-queue header{margin-bottom:10px}.commercial-approval-queue header span,.commercial-approval-queue article small{display:block;color:#728198;font-size:12px}.commercial-approval-queue h3{margin:2px 0 0;font-size:16px}
.commercial-approval-queue article{padding:11px 0;border-top:1px solid #edf1f6}.commercial-approval-queue article b{font-size:13px}.approval-actions button{min-height:34px}

.price-warning{display:block;margin-top:4px;color:#b25b00;font-size:11px;line-height:1.3}


/* V191.3 — purchases mirror the approved sales workspace while retaining purchase fields. */
.purchase-modern-workspace {
  background:#f6f8fc;
  overflow:visible;
}
.purchase-modern-workspace .purchase-context-panel {
  margin:14px 16px;
  border:1px solid var(--cw-border);
  border-radius:14px;
  background:#edf7fc;
}
.purchase-modern-workspace .purchase-item-picker {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  background:#fff;
  border-bottom:1px solid var(--cw-border);
}
.purchase-modern-workspace .purchase-item-picker .line-status {
  display:grid;
  gap:4px;
}
.purchase-modern-workspace .purchase-item-picker b { font-size:17px; color:var(--cw-ink); }
.purchase-modern-workspace .purchase-cart-list {
  margin:14px 16px;
  border-radius:14px;
  border-color:var(--cw-border);
  box-shadow:none;
}
.purchase-modern-workspace .purchase-total-card {
  color:#fff;
  border:0;
  border-radius:14px;
  background:linear-gradient(145deg,#102a43,#163f69);
  box-shadow:0 12px 26px rgba(15,42,67,.16);
}
.purchase-modern-workspace .purchase-total-card h3,
.purchase-modern-workspace .purchase-total-card span,
.purchase-modern-workspace .purchase-total-card b { color:inherit; }
.purchase-modern-workspace .purchase-total-card>div { border-color:rgba(255,255,255,.18); }
.purchase-modern-workspace .purchase-total-card .summary-grand { margin-top:10px; padding-top:12px; border-top:1px solid rgba(255,255,255,.24); }
.purchase-modern-workspace .purchase-bottom-panels { margin:14px 16px; grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr); }
.purchase-modern-workspace .purchase-notes { border-radius:14px; }
.purchase-modern-workspace .commercial-editor-footer { border-radius:0 0 18px 18px; }
@media (min-width:1180px) {
  .purchase-modern-workspace { display:grid; grid-template-columns:minmax(0,1fr) 300px; }
  .purchase-modern-workspace .commercial-editor-topbar,
  .purchase-modern-workspace .commercial-editor-footer { grid-column:1/-1; }
  .purchase-modern-workspace .purchase-context-panel { grid-column:2; grid-row:2 / span 2; margin:14px 16px 14px 0; display:block; }
  .purchase-modern-workspace .purchase-context-panel .smart-field { display:grid; margin-bottom:12px; }
  .purchase-modern-workspace .purchase-cart-list { grid-column:1; margin-left:0; }
  .purchase-modern-workspace .purchase-bottom-panels { grid-column:1; margin-left:0; }
}
@media (max-width:760px) {
  .purchase-modern-workspace .purchase-item-picker { align-items:stretch; flex-direction:column; }
  .purchase-modern-workspace .purchase-bottom-panels { grid-template-columns:1fr; }
}


/* V191.3 — quotation entry follows the same calm, card-first sales language. */
.quotation-modern-workspace .quotation-item-picker {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  background:#fff;
  border-bottom:1px solid var(--cw-border);
}
.quotation-modern-workspace .quotation-item-picker .line-status { display:grid; gap:4px; }
.quotation-modern-workspace .quotation-item-picker b { font-size:17px; color:var(--cw-ink); }
.quotation-modern-workspace .quotation-cart-list {
  margin:14px 16px;
  border-radius:14px;
  border-color:var(--cw-border);
  box-shadow:none;
}
.quotation-modern-workspace .quotation-total-card {
  color:#fff;
  border:0;
  border-radius:14px;
  background:linear-gradient(145deg,#102a43,#163f69);
  box-shadow:0 12px 26px rgba(15,42,67,.16);
}
.quotation-modern-workspace .quotation-total-card h3,
.quotation-modern-workspace .quotation-total-card span,
.quotation-modern-workspace .quotation-total-card b { color:inherit; }
.quotation-modern-workspace .quotation-total-card>div { border-color:rgba(255,255,255,.18); }
.quotation-modern-workspace .quotation-total-card .summary-grand { margin-top:10px; padding-top:12px; border-top:1px solid rgba(255,255,255,.24); }
.quotation-modern-workspace .quotation-bottom-panels { grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr); gap:12px; }
@media (max-width:760px) {
  .quotation-modern-workspace .quotation-item-picker { align-items:stretch; flex-direction:column; }
  .quotation-modern-workspace .quotation-bottom-panels { grid-template-columns:1fr; }
}


/* Card-first lines: purchase entry is operationally identical to the sales editor. */
.purchase-global-search{position:relative;display:flex;align-items:center;gap:9px;margin:14px 16px 0;padding:0 12px;border:2px solid #c5dbef;border-radius:12px;background:#fff;color:#1677e8}
.purchase-global-search input{width:100%;min-height:46px;border:0!important;outline:0;background:transparent!important}
.commercial-quick-results,.commercial-line-results{z-index:25;background:#fff;border:1px solid #cbddea;border-radius:10px;box-shadow:0 14px 28px rgba(16,42,67,.14)}
.commercial-quick-results{position:absolute;top:calc(100% + 6px);right:0;left:0;padding:6px}
.commercial-quick-results button,.commercial-line-results button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:0;border-radius:7px;background:#fff;text-align:right;cursor:pointer;color:#163d5b}
.commercial-quick-results button:hover,.commercial-line-results button:hover{background:#f0f8ff}
.commercial-quick-results span,.commercial-line-results span{display:grid;gap:3px}.commercial-quick-results small,.commercial-line-results small{color:#718698;font-size:11px}
.purchase-card-list{display:grid;gap:10px;padding:14px 16px}
.purchase-line-card{display:grid;grid-template-columns:minmax(250px,2.1fr) minmax(95px,.6fr) minmax(130px,.8fr) minmax(150px,.9fr);gap:10px;align-items:end;padding:14px;border:1px solid #dce8f2;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(15,42,67,.035)}
.purchase-line-card label,.purchase-line-total{display:grid;gap:6px;min-width:0}.purchase-line-card label>span,.purchase-line-total>span{font-size:11px;font-weight:700;color:#64798c}.purchase-line-card input{width:100%;min-height:38px;border:1px solid #cbddea;border-radius:8px;padding:6px 9px;background:#fff;color:#173a58}.purchase-product-field{position:relative}.purchase-product-field .input-with-icon{display:flex;align-items:center;gap:7px;border:1px solid #cbddea;border-radius:8px;padding:0 9px;color:#1677e8}.purchase-product-field .input-with-icon input{border:0;padding-right:0}.commercial-line-results{position:absolute;top:calc(100% + 5px);right:0;left:0;padding:6px}.purchase-line-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;color:#5c7185;font-size:12px;font-weight:800}.purchase-line-head .icon-btn{width:32px;height:32px}.purchase-line-total b{font-size:15px;color:#123e63}.purchase-line-total .price-warning{font-size:10px}.purchase-line-meta{grid-column:1/-1;display:flex;gap:14px;color:#73879a;font-size:11px;border-top:1px solid #edf2f6;padding-top:9px}
@media(max-width:900px){.purchase-line-card{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-product-field{grid-column:1/-1}}@media(max-width:560px){.purchase-line-card{grid-template-columns:1fr}.purchase-line-meta{flex-direction:column;gap:4px}.purchase-global-search{margin-right:10px;margin-left:10px}.purchase-card-list{padding:10px}}


/* Card-first lines for quotations: a quote now feels like a sales document, not a spreadsheet. */
.quotation-global-search{position:relative;display:flex;align-items:center;gap:9px;margin:14px 16px 0;padding:0 12px;border:2px solid #c5dbef;border-radius:12px;background:#fff;color:#1677e8}
.quotation-global-search input{width:100%;min-height:46px;border:0!important;outline:0;background:transparent!important}
.quotation-card-list{display:grid;gap:10px;padding:14px 16px}
.quotation-line-card{display:grid;grid-template-columns:minmax(250px,2.1fr) minmax(85px,.55fr) minmax(125px,.8fr) minmax(95px,.55fr) minmax(145px,.85fr);gap:10px;align-items:end;padding:14px;border:1px solid #dce8f2;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(15,42,67,.035)}
.quotation-line-card label,.quotation-line-total{display:grid;gap:6px;min-width:0}.quotation-line-card label>span,.quotation-line-total>span{font-size:11px;font-weight:700;color:#64798c}.quotation-line-card input,.quotation-line-card textarea{width:100%;min-height:38px;border:1px solid #cbddea;border-radius:8px;padding:6px 9px;background:#fff;color:#173a58}.quotation-line-notes{grid-column:1/-1}.quotation-line-notes textarea{min-height:58px;resize:vertical}.quotation-product-field{position:relative}.quotation-product-field .input-with-icon{display:flex;align-items:center;gap:7px;border:1px solid #cbddea;border-radius:8px;padding:0 9px;color:#1677e8}.quotation-product-field .input-with-icon input{border:0;padding-right:0}.quotation-line-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;color:#5c7185;font-size:12px;font-weight:800}.quotation-line-head .icon-btn{width:32px;height:32px}.quotation-line-total b{font-size:15px;color:#123e63}.quotation-line-total small{color:#73879a;font-size:11px}
@media(max-width:1050px){.quotation-line-card{grid-template-columns:repeat(2,minmax(0,1fr))}.quotation-product-field{grid-column:1/-1}}@media(max-width:560px){.quotation-line-card{grid-template-columns:1fr}.quotation-global-search{margin-right:10px;margin-left:10px}.quotation-card-list{padding:10px}}


/* Purchase requests use the same fast card entry without pretending they are purchase orders. */
.purchase-request-global-search{position:relative;display:flex;align-items:center;gap:9px;margin:14px 16px 0;padding:0 12px;border:2px solid #c5dbef;border-radius:12px;background:#fff;color:#1677e8}.purchase-request-global-search input{width:100%;min-height:46px;border:0!important;outline:0;background:transparent!important}.purchase-request-card-list{display:grid;gap:10px;padding:14px 16px}.purchase-request-line-card{display:grid;grid-template-columns:minmax(250px,2.1fr) minmax(95px,.6fr) minmax(135px,.85fr) minmax(150px,.9fr);gap:10px;align-items:end;padding:14px;border:1px solid #dce8f2;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(15,42,67,.035)}.purchase-request-line-card label,.purchase-request-line-total{display:grid;gap:6px;min-width:0}.purchase-request-line-card label>span,.purchase-request-line-total>span{font-size:11px;font-weight:700;color:#64798c}.purchase-request-line-card input{width:100%;min-height:38px;border:1px solid #cbddea;border-radius:8px;padding:6px 9px;background:#fff;color:#173a58}.purchase-request-product-field{position:relative}.purchase-request-product-field .input-with-icon{display:flex;align-items:center;gap:7px;border:1px solid #cbddea;border-radius:8px;padding:0 9px;color:#1677e8}.purchase-request-product-field .input-with-icon input{border:0;padding-right:0}.purchase-request-line-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;color:#5c7185;font-size:12px;font-weight:800}.purchase-request-line-head .icon-btn{width:32px;height:32px}.purchase-request-line-total b{font-size:15px;color:#123e63}.purchase-request-line-total small{color:#73879a;font-size:11px}@media(max-width:900px){.purchase-request-line-card{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-request-product-field{grid-column:1/-1}}@media(max-width:560px){.purchase-request-line-card{grid-template-columns:1fr}.purchase-request-global-search{margin-right:10px;margin-left:10px}.purchase-request-card-list{padding:10px}}


/* Sales list surface: quotations, orders and returns retain the approved invoice-list hierarchy. */
.sales-document-list {
  display:grid;
  gap:14px;
}
.sales-document-list .sales-sub-head {
  margin:0;
  padding:14px 16px;
  min-height:70px;
  border:1px solid #cfe0ef;
  border-radius:14px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 5px 16px rgba(15,61,100,.04);
}
.sales-document-list .sales-sub-head b {
  color:#123e63;
  font-size:20px;
}
.sales-document-list .sales-sub-head span {
  color:#6d8498;
}
.sales-document-list .sales-list-kpis {
  margin:0;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.sales-document-list .sales-list-kpis > div {
  min-height:76px;
  padding:12px 16px;
  border:1px solid #cfe0ef;
  border-radius:12px;
  background:#fff;
}
.sales-document-list .sales-list-kpis span {
  color:#6b8296;
}
.sales-document-list .sales-list-kpis b {
  color:#123e63;
}
.sales-document-list .commercial-list-filters {
  margin:0;
  padding:10px;
  border:1px solid #cfe0ef;
  border-radius:12px;
  background:#fff;
}
.sales-document-list .commercial-list-filters input,
.sales-document-list .commercial-list-filters select {
  min-height:40px;
  border-color:#cfe0ef;
  border-radius:9px;
}
.sales-document-list .table-card {
  margin:0;
  overflow:hidden;
  border:1px solid #cfe0ef;
  border-radius:14px;
  background:#fff;
}
.sales-document-list .table-card thead {
  background:#edf7fc;
}
@media (max-width:760px) {
  .sales-document-list .sales-list-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sales-document-list .sales-sub-head { align-items:flex-start; flex-direction:column; }
}

.workflow-hint{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 12px;
  border:1px solid rgba(82,155,205,.25);
  border-radius:10px;
  background:rgba(33,100,145,.08);
  color:var(--muted,#6f879d);
  font-size:12px;
  font-weight:700;
}
.workflow-hint.success{
  border-color:rgba(35,160,106,.28);
  background:rgba(35,160,106,.08);
  color:#1f8f61;
}

/* ===== END SOURCE 04/17 ===== */


/* ===== V194 SOURCE 05/17: frontend-src/src/styles/v1902-1-polish.css ===== */
/* V190.2.1 final visual polish. Loaded last so it only refines the approved V190.2 UI. */

/* Global shell density */
.app-v1902 { grid-template-columns: 286px minmax(0, 1fr); }
.app-v1902.collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar-v1902 { padding: 14px 14px 12px; }
.sidebar-v1902 .brand { padding-bottom: 10px; }
.sidebar-v1902 .brand > b { width: 52px; height: 52px; border-radius: 13px; font-size: 18px; }
.sidebar-v1902 .brand strong { font-size: 16px; }
.sidebar-v1902 .sidebar-search-trigger { min-height: 42px; border-radius: 10px; }
.compact-nav-v1902 { margin-top: 9px; gap: 2px; }
.compact-nav-v1902 button { min-height: 40px; padding: 7px 10px; grid-template-columns: 22px 1fr 14px; }
.compact-nav-v1902 button svg { width: 19px; height: 19px; }
.sidebar-quick-v1902 { margin-top: 8px; padding-top: 8px; gap: 4px; }
.sidebar-quick-v1902 button { min-height: 35px; padding: 5px 10px; }
.sidebar-v1902 .aside-bottom { padding-top: 8px; }
.sidebar-v1902 .aside-bottom button { padding: 7px 9px; }
.sidebar-version { padding-top: 8px; line-height: 1.5; }
.topbar-v1902 { height: 60px; }

/* Dashboard: use wide screens efficiently without changing navigation behavior */
.approved-dashboard-v1902 { max-width: 1480px; padding-inline: 4px; }
.approved-dashboard-head { padding: 0 0 16px; }
.approved-dashboard-head h2 { font-size: clamp(26px, 2.4vw, 38px); margin-bottom: 5px; }
.approved-dashboard-head p { font-size: 15px; }
.dashboard-brand-mark { min-width: 88px; min-height: 88px; border-radius: 14px; }
.dashboard-brand-mark b { width: 54px; height: 54px; border-radius: 13px; font-size: 19px; }
.approved-module-grid { gap: 12px; }
.approved-module-card { min-height: 112px; padding: 15px; grid-template-columns: 56px minmax(0, 1fr); gap: 13px; border-radius: 13px; }
.approved-module-card .module-icon { width: 52px; height: 52px; border-radius: 11px; }
.approved-module-card .module-icon svg { width: 27px; height: 27px; }
.approved-module-card .module-copy { gap: 6px; }
.approved-module-card .module-copy strong { font-size: 17px; }
.approved-module-card .module-copy small { font-size: 12.5px; line-height: 1.65; }
.approved-quick-strip { margin-top: 12px; padding: 12px 16px; border-radius: 13px; }
.approved-live-summary { margin-top: 12px; gap: 8px; }
.approved-live-summary > div { padding: 10px 12px; }
.approved-benefits { margin-top: 12px; padding: 14px 18px; }
.approved-info { margin-top: 10px; padding: 11px 15px; }

@media (min-width: 1500px) {
  .approved-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Sales/commercial document editor */
.commercial-editor-shell { border-radius: 12px; }
.commercial-editor-topbar { min-height: 58px; padding: 9px 12px; gap: 9px; }
.editor-doc-icon { width: 38px; height: 38px; border-radius: 8px; }
.editor-doc-icon svg { width: 20px; height: 20px; }
.editor-title-line h1 { font-size: 20px; }
.editor-title-block small { font-size: 11px; }
.editor-toolbar { gap: 5px; }
.editor-toolbar .tool-btn,
.commercial-lines-toolbar .tool-btn,
.add-row-wide { min-height: 34px; padding: 5px 9px; border-radius: 7px; font-size: 12px; }

.commercial-meta-strip { padding: 10px 12px; gap: 8px 10px; }
.smart-field { gap: 4px; }
.smart-field > span { font-size: 11px; }
.smart-field input,
.smart-field select,
.search-control input { min-height: 36px; padding: 5px 8px; }
.tax-mode-switch button { min-height: 36px; }

.commercial-lines-card { margin: 9px 12px; border-radius: 10px; }
.commercial-lines-toolbar { min-height: 46px; padding: 6px 8px; }
.commercial-product-search { margin: 6px 8px; min-height: 36px; }
.commercial-grid-wrap { max-height: 472px; overflow: auto; overscroll-behavior: contain; }
.commercial-grid-table { min-width: 1210px; border-collapse: separate; border-spacing: 0; }
.commercial-grid-table thead th { position: sticky; top: 0; z-index: 4; box-shadow: inset 0 -1px 0 #cdddea; }
.commercial-grid-table tbody tr { height: 40px; }
.commercial-grid-table td { padding: 3px 4px; }
.commercial-grid-table td input,
.commercial-grid-table td select { min-height: 31px; height: 31px; }
.commercial-grid-table .product-cell { min-width: 280px; }
.add-row-wide { margin: 6px 8px 8px; width: calc(100% - 16px); }

.commercial-bottom-panels { margin: 9px 12px; gap: 8px; }
.commercial-bottom-panels > article { min-height: 132px; padding: 10px; }
.commercial-bottom-panels h3 { margin-bottom: 7px; }
.notes-panel textarea,
.terms-panel textarea { min-height: 78px; }
.commercial-editor-footer { padding: 8px 12px; }
.commercial-editor-footer .tool-btn { min-height: 36px; padding: 5px 10px; }
.commercial-editor-footer .primary { min-width: 150px; }

/* Dark mode: explicitly raise contrast for labels, tables and disabled-looking metadata. */
html[data-theme='dark'] .commercial-editor-shell {
  --invoice-line: #3d596b;
  --invoice-soft: #122a3a;
}
html[data-theme='dark'] .commercial-editor-topbar,
html[data-theme='dark'] .commercial-meta-strip,
html[data-theme='dark'] .commercial-lines-toolbar,
html[data-theme='dark'] .commercial-product-search,
html[data-theme='dark'] .commercial-lines-card,
html[data-theme='dark'] .commercial-bottom-panels > article,
html[data-theme='dark'] .commercial-editor-footer { background: #172d3d; border-color: #3a5668; }
html[data-theme='dark'] .editor-title-block small,
html[data-theme='dark'] .footer-validation,
html[data-theme='dark'] .payment-info-panel small,
html[data-theme='dark'] .tax-note { color: #b5c8d6; }
html[data-theme='dark'] .smart-field > span,
html[data-theme='dark'] .commercial-bottom-panels h3,
html[data-theme='dark'] .line-status,
html[data-theme='dark'] .payment-info-panel label > span,
html[data-theme='dark'] .tax-panel label > span { color: #edf6fb; }
html[data-theme='dark'] .commercial-grid-table th { background: #234255; color: #eff7fb; border-color: #456375; }
html[data-theme='dark'] .commercial-grid-table td { color: #e8f1f6; border-color: #355265; }
html[data-theme='dark'] .commercial-grid-table tbody tr:nth-child(even) td { background: rgba(255,255,255,.018); }
html[data-theme='dark'] .commercial-grid-table td input,
html[data-theme='dark'] .commercial-grid-table td select,
html[data-theme='dark'] .smart-field input,
html[data-theme='dark'] .smart-field select,
html[data-theme='dark'] .search-control input,
html[data-theme='dark'] .payment-info-panel select,
html[data-theme='dark'] .tax-panel input,
html[data-theme='dark'] .tax-panel select,
html[data-theme='dark'] .notes-panel textarea,
html[data-theme='dark'] .terms-panel textarea {
  background: #f8fbfd;
  color: #102f4b;
  border-color: #b9cedb;
}
html[data-theme='dark'] .commercial-product-search > input { color: #eaf4f9; }
html[data-theme='dark'] .commercial-product-search > input::placeholder { color: #a8bdca; }
html[data-theme='dark'] .editor-toolbar .tool-btn,
html[data-theme='dark'] .commercial-lines-toolbar .tool-btn,
html[data-theme='dark'] .commercial-editor-footer .tool-btn { background: #203c4e; color: #edf6fb; border-color: #466477; }
html[data-theme='dark'] .summary-grand { background: #123f67; color: #f2f8fc; }
html[data-theme='dark'] .line-total { color: #8dc7ff; }

html[data-theme='dark'] .approved-module-card,
html[data-theme='dark'] .approved-live-summary > div { box-shadow: 0 5px 18px rgba(0,0,0,.12); }
html[data-theme='dark'] .approved-module-card .module-copy small,
html[data-theme='dark'] .approved-dashboard-head p,
html[data-theme='dark'] .approved-live-summary span,
html[data-theme='dark'] .approved-live-summary small { color: #b8cad5; }
html[data-theme='dark'] .approved-quick-strip,
html[data-theme='dark'] .approved-info { border-color: #355366; }

@media (max-width: 1200px) {
  .app-v1902 { grid-template-columns: 260px minmax(0, 1fr); }
  .commercial-grid-wrap { max-height: 430px; }
}

@media (max-width: 760px) {
  .commercial-grid-wrap { max-height: none; }
  .commercial-editor-topbar { padding: 8px; }
}

/* ===== END SOURCE 05/17 ===== */


/* ===== V194 SOURCE 06/17: frontend-src/src/styles/field-service-v1903.css ===== */
/* BEG ERP V190.3 — Installed Base + Field Service. Scoped to v1903 classes. */
.v1903-hub,.fs-page{min-width:0}.v1903-tabs{margin-bottom:14px}.fs-page{display:grid;gap:14px}.fs-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid var(--line);border-radius:15px;background:var(--panel)}.fs-page-head h1{display:flex;align-items:center;gap:10px;margin:3px 0 5px;font-size:25px}.fs-page-head h1 svg{width:27px}.fs-page-head p,.fs-page-head small{margin:0;color:var(--muted)}.fs-kpi-row,.fs-metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.fs-kpi-row>div,.fs-metrics-grid>article{border:1px solid var(--line);background:var(--panel);border-radius:13px;padding:14px 16px}.fs-kpi-row b{font-size:24px;display:block}.fs-kpi-row span{color:var(--muted);font-size:12px}.fs-metrics-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.fs-metrics-grid article{display:flex;align-items:center;gap:12px}.fs-metrics-grid article>svg{width:25px;color:#2382c5}.fs-metrics-grid article.warn>svg{color:#c98116}.fs-metrics-grid article.danger>svg{color:#d34c4c}.fs-metrics-grid b{font-size:22px;display:block}.fs-metrics-grid span{font-size:11px;color:var(--muted)}
.fs-toolbar{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid var(--line);background:var(--panel);border-radius:12px}.fs-search{display:flex;align-items:center;gap:8px;flex:1;border:1px solid var(--line);border-radius:9px;padding:0 10px;background:var(--input-bg,#fff)}.fs-search svg{width:17px;color:var(--muted)}.fs-search input{border:0!important;outline:0;flex:1;min-height:38px;background:transparent!important}.fs-toolbar select{min-width:170px;min-height:40px}.fs-table-card{border:1px solid var(--line);border-radius:14px;background:var(--panel);overflow:auto}.fs-table-card table{width:100%;min-width:1040px;border-collapse:collapse}.fs-table-card th{position:sticky;top:0;z-index:2;background:var(--panel);padding:11px 10px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line)}.fs-table-card td{padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:middle}.fs-table-card tbody tr{cursor:pointer}.fs-table-card tbody tr:hover{background:rgba(66,145,200,.07)}.fs-table-card td small{display:block;color:var(--muted);margin-top:3px}.fs-status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;background:#eaf3f9;color:#365f79}.fs-status.active,.fs-status.completed{background:#ddf5e9;color:#176d4a}.fs-status.faulty,.fs-status.cancelled{background:#fde5e5;color:#a52b2b}.fs-status.under_repair,.fs-status.waiting_parts{background:#fff0d9;color:#925b08}.fs-status.assigned,.fs-status.travelling,.fs-status.checked_in,.fs-status.in_progress{background:#e2f0ff;color:#1769aa}.fs-warranty,.fs-service{display:inline-flex;align-items:center;gap:5px}.fs-warranty svg,.fs-service svg{width:15px}.fs-warranty.active{color:#16835b}.fs-warranty.expired{color:#bd3f3f}.fs-create-card{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:16px}.fs-create-card h3{margin-top:0}.fs-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.fs-form-grid label{display:grid;gap:5px;font-size:12px;font-weight:700}.fs-form-grid input{min-height:40px}.fs-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.fs-drawer{position:fixed;inset:0 0 0 auto;width:min(620px,92vw);z-index:120;background:var(--panel);border-inline-start:1px solid var(--line);box-shadow:-18px 0 50px rgba(0,0,0,.14);padding:20px;overflow:auto}.fs-drawer>header,.fs-workorder-modal>header{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid var(--line)}.fs-drawer h2,.fs-workorder-modal h2{margin:3px 0 8px}.fs-detail-grid{display:grid;gap:12px;margin-top:14px}.fs-detail-grid section,.fs-timeline-card{border:1px solid var(--line);border-radius:12px;padding:14px}.fs-detail-grid h3,.fs-timeline-card h3{display:flex;align-items:center;gap:7px;margin:0 0 10px}.fs-detail-grid h3 svg{width:19px}.fs-detail-grid p{display:flex;justify-content:space-between;gap:14px;border-bottom:1px dashed var(--line);padding:7px 0;margin:0}.fs-detail-grid p b{color:var(--muted)}.fs-timeline{display:grid;gap:9px}.fs-timeline>div{display:grid;gap:2px;border-inline-start:3px solid #4c9bd0;padding-inline-start:10px}.fs-timeline span,.fs-timeline small{font-size:11px;color:var(--muted)}
.fs-dashboard-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:12px}.fs-dashboard-grid>div{border:1px solid var(--line);border-radius:13px;background:var(--panel);padding:14px}.fs-dashboard-grid h3{margin:0 0 10px}.fs-tech-list{display:grid;gap:7px}.fs-tech-list>div{display:flex;justify-content:space-between;gap:10px;padding:8px;border-radius:8px;background:rgba(80,135,170,.07)}.fs-tech-list b{font-size:12px}.fs-warranty-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.fs-warranty-cards span{display:grid;text-align:center;border:1px solid var(--line);border-radius:9px;padding:9px}.fs-warranty-cards b{font-size:20px;margin-top:4px}.fs-orders-section{display:grid;gap:10px}.fs-orders-section>header{display:flex;justify-content:space-between}.fs-orders-section h2{margin:0}.fs-order-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.fs-order-grid>button{display:grid;text-align:right;gap:6px;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:13px;color:inherit;cursor:pointer}.fs-order-grid>button:hover{box-shadow:0 8px 24px rgba(20,80,120,.09)}.fs-order-title{display:flex;justify-content:space-between;gap:10px}.fs-order-grid button>div:last-of-type{display:grid;gap:3px;color:var(--muted);font-size:11px}.fs-order-grid svg{width:14px}.fs-sla{font-size:11px;font-weight:800}.fs-sla.breached{color:#cf3c3c}.fs-sla.at_risk{color:#b77910}.fs-sla.met{color:#16805a}
.fs-modal-backdrop{position:fixed;inset:0;z-index:130;background:rgba(5,20,30,.52);display:grid;place-items:center;padding:18px}.fs-workorder-modal{width:min(1050px,96vw);max-height:94vh;overflow:auto;background:var(--panel);border-radius:16px;border:1px solid var(--line);padding:18px}.fs-workorder-columns{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:10px;margin-top:12px}.fs-workorder-columns>article{border:1px solid var(--line);border-radius:11px;padding:12px}.fs-workorder-columns h3{margin-top:0}.fs-workorder-columns p{display:flex;justify-content:space-between;gap:8px}.fs-workorder-columns p b{color:var(--muted)}.fs-mini-row{display:grid;gap:2px;padding:7px 0;border-bottom:1px dashed var(--line)}.fs-mini-row small{color:var(--muted)}.fs-timeline-card{margin-top:10px}.fs-workorder-modal footer{position:sticky;bottom:-18px;margin:12px -18px -18px;padding:12px 18px;background:var(--panel);border-top:1px solid var(--line)}.fs-workorder-modal footer textarea{width:100%;min-height:65px}.fs-action-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.fs-action-row button{display:inline-flex;align-items:center;gap:6px}.fs-action-row svg{width:16px}
.tech-task-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tech-task-list>button{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:15px;text-align:right;color:inherit;display:grid;gap:7px}.tech-task-list>button>div{display:flex;justify-content:space-between}.tech-task-list h3,.tech-task-list p{margin:0}.tech-task-list small,.tech-task-list>button>span{display:flex;align-items:center;gap:5px;color:var(--muted)}.tech-task-list svg{width:16px}
html[data-theme='dark'] .fs-table-card tbody tr:hover,html[data-theme='dark'] .fs-tech-list>div{background:rgba(90,170,220,.09)}
@media(max-width:1100px){.fs-metrics-grid{grid-template-columns:repeat(3,1fr)}.fs-kpi-row{grid-template-columns:repeat(2,1fr)}.fs-order-grid,.tech-task-list{grid-template-columns:repeat(2,1fr)}.fs-workorder-columns{grid-template-columns:1fr 1fr}.fs-form-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.fs-page-head,.fs-toolbar{flex-direction:column;align-items:stretch}.fs-metrics-grid,.fs-kpi-row,.fs-dashboard-grid,.fs-order-grid,.tech-task-list,.fs-form-grid,.fs-workorder-columns{grid-template-columns:1fr}.fs-toolbar select{width:100%}.fs-drawer{width:100vw}.fs-workorder-modal{width:100%;max-height:100vh;border-radius:10px}.v1903-tabs{overflow:auto;white-space:nowrap}.fs-page-head h1{font-size:21px}}
@media print{.v1903-tabs,.fs-toolbar,.fs-page-head button,.fs-drawer,.fs-modal-backdrop{display:none!important}.fs-page-head,.fs-table-card,.fs-dashboard-grid>div{box-shadow:none;border-color:#ddd}}

/* ===== END SOURCE 06/17 ===== */


/* ===== V194 SOURCE 07/17: frontend-src/src/styles/sidebar-dropdown-v1903.css ===== */
.compact-nav-v1902 .nav-group{display:grid;gap:2px}.compact-nav-v1902 .nav-group-toggle{width:100%}.compact-nav-v1902 .nav-group-toggle[aria-expanded='true'] .nav-chevron{transform:rotate(90deg)}.compact-nav-v1902 .nav-chevron{transition:transform .18s ease}.compact-nav-v1902 .nav-sub{display:grid;gap:2px;padding:2px 16px 6px 0;border-inline-start:1px solid #cddfeb;margin-inline-start:12px}.compact-nav-v1902 .nav-sub button{min-height:38px;padding:7px 10px;grid-template-columns:20px 1fr;border-radius:8px;font-size:13px}.compact-nav-v1902 .nav-sub button svg{width:17px;height:17px}.compact-nav-v1902 .nav-sub button.active{background:#dcefff;color:#0869ac;box-shadow:none;font-weight:800}.app-v1902.collapsed .compact-nav-v1902 .nav-sub{display:none}html[data-theme='dark'] .compact-nav-v1902 .nav-sub{border-color:#315064}html[data-theme='dark'] .compact-nav-v1902 .nav-sub button{color:#dcecf5}html[data-theme='dark'] .compact-nav-v1902 .nav-sub button:hover{background:#1c3a4d}html[data-theme='dark'] .compact-nav-v1902 .nav-sub button.active{background:#214a64;color:#fff}@media(max-width:780px){.compact-nav-v1902 .nav-sub{padding-inline-end:12px;margin-inline-start:8px}}

/* ===== END SOURCE 07/17 ===== */


/* ===== V194 SOURCE 08/17: frontend-src/src/styles/icon-rail-v19031.css ===== */
.icon-rail-layout-v19031 {
  direction: ltr;
  grid-template-columns: 88px minmax(0, 1fr);
}
.icon-rail-layout-v19031 > main { direction: rtl; min-width: 0; }
.icon-rail-v19031 {
  direction: rtl;
  position: relative;
  width: 88px;
  height: 100vh;
  min-height: 100vh;
  background: linear-gradient(180deg, #f7fbff 0%, #edf7fd 100%);
  border-inline-end: 1px solid #d6e5ef;
  box-shadow: 7px 0 24px rgba(22, 77, 116, .08);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 12px;
  z-index: 40;
  overflow: visible;
}
.rail-brand {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1274bd, #064b81);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20,112,180,.2);
  flex: 0 0 auto;
}
.rail-brand b { font-size: 17px; letter-spacing: .4px; }
.rail-primary { margin-top: 12px; flex: 0 0 auto; }
.rail-groups {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9bc5df transparent;
}
.rail-groups::-webkit-scrollbar { width: 4px; }
.rail-groups::-webkit-scrollbar-track { background: transparent; }
.rail-groups::-webkit-scrollbar-thumb { background: #9bc5df; border-radius: 999px; }
.icon-rail-v19031 button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.rail-home-button,
.rail-group-button,
.rail-utilities button {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #173b65;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  flex: 0 0 auto;
}
.rail-home-button svg,
.rail-group-button svg,
.rail-utilities button svg { width: 23px; height: 23px; }
.rail-home-button:hover,
.rail-group-button:hover,
.rail-utilities button:hover { background: #e1f1fb; color: #0869ac; transform: translateY(-1px); }
.rail-home-button.active,
.rail-group-button.active,
.rail-group-button.expanded {
  background: linear-gradient(145deg, #1787d0, #2476b6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25,124,191,.22);
}
.rail-group-button.expanded { outline: 3px solid rgba(23,135,208,.14); }
.rail-utilities {
  border-top: 1px solid #d5e4ee;
  padding-top: 8px;
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
}
.rail-utilities button { width: 44px; height: 44px; border-radius: 12px; }

.rail-flyout {
  position: fixed;
  top: 50%;
  left: 104px;
  right: auto;
  transform: translateY(-50%);
  width: min(360px, calc(100vw - 125px));
  max-height: min(620px, calc(100vh - 32px));
  overflow: auto;
  background: rgba(255,255,255,.98);
  border: 1px solid #d5e4ef;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(17,62,94,.22);
  padding: 14px;
  z-index: 200;
  animation: railFlyIn .16s ease-out;
}
@keyframes railFlyIn {
  from { opacity: 0; transform: translateY(-50%) translateX(-8px) scale(.985); }
  to { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }
}
.rail-flyout header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid #e3edf4;
}
.rail-flyout header > div { display: grid; gap: 3px; }
.rail-flyout header strong { color: #102f59; font-size: 17px; }
.rail-flyout header small { color: #6a879f; font-size: 12px; }
.rail-flyout header > button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #edf5fa;
  color: #365a79;
  font-size: 22px;
  line-height: 1;
}
.rail-flyout-grid {
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
.rail-flyout-grid > button {
  min-height: 88px;
  border: 1px solid #dce9f2;
  border-radius: 14px;
  background: #f9fcfe;
  color: #173b65;
  padding: 11px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}
.rail-flyout-grid > button:hover { background: #eef8fe; border-color: #b9d9ec; }
.rail-flyout-grid > button.active { background: #e3f3fd; border-color: #7cbce3; color: #0869ac; }
.flyout-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e4f2fb;
}
.flyout-icon svg { width: 21px; height: 21px; }

html[data-theme='dark'] .icon-rail-v19031 {
  background: #102331;
  border-color: #284454;
}
html[data-theme='dark'] .rail-home-button,
html[data-theme='dark'] .rail-group-button,
html[data-theme='dark'] .rail-utilities button { color: #dcecf5; }
html[data-theme='dark'] .rail-home-button:hover,
html[data-theme='dark'] .rail-group-button:hover,
html[data-theme='dark'] .rail-utilities button:hover { background: #173446; }
html[data-theme='dark'] .rail-utilities { border-color: #284454; }
html[data-theme='dark'] .rail-groups { scrollbar-color: #416b84 transparent; }
html[data-theme='dark'] .rail-groups::-webkit-scrollbar-thumb { background: #416b84; }
html[data-theme='dark'] .rail-flyout { background: #142b3a; border-color: #315064; box-shadow: 0 18px 48px rgba(0,0,0,.4); }
html[data-theme='dark'] .rail-flyout header { border-color: #315064; }
html[data-theme='dark'] .rail-flyout header strong,
html[data-theme='dark'] .rail-flyout-grid > button { color: #e7f2f8; }
html[data-theme='dark'] .rail-flyout header small { color: #9bb2c3; }
html[data-theme='dark'] .rail-flyout header > button,
html[data-theme='dark'] .flyout-icon { background: #1d3a4d; color: #cfe2ee; }
html[data-theme='dark'] .rail-flyout-grid > button { background: #183243; border-color: #315064; }
html[data-theme='dark'] .rail-flyout-grid > button:hover,
html[data-theme='dark'] .rail-flyout-grid > button.active { background: #21465d; border-color: #4d829f; }

@media (max-height: 900px) and (min-width: 781px) {
  .icon-rail-v19031 { padding-top: 8px; padding-bottom: 8px; }
  .rail-brand { width: 50px; height: 50px; border-radius: 14px; }
  .rail-primary { margin-top: 8px; }
  .rail-home-button,
  .rail-group-button { width: 46px; height: 46px; border-radius: 12px; }
  .rail-home-button svg,
  .rail-group-button svg { width: 21px; height: 21px; }
  .rail-groups { gap: 4px; padding: 7px 0; }
  .rail-utilities { padding-top: 6px; gap: 2px; }
  .rail-utilities button { width: 38px; height: 38px; border-radius: 10px; }
  .rail-utilities button svg { width: 20px; height: 20px; }
}

@media (max-width: 780px) {
  .icon-rail-layout-v19031 { display: block; direction: rtl; }
  .icon-rail-v19031 {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: 82px;
    transform: translateX(110%);
    transition: transform .2s ease;
    z-index: 120;
  }
  .mobile-nav-open .icon-rail-v19031 { transform: translateX(0); }
  .rail-flyout {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 94px;
    right: auto;
    transform: none;
    width: calc(100vw - 108px);
    max-height: none;
    animation: none;
  }
  .rail-flyout-grid { grid-template-columns: 1fr; }
}


/* V190.6 — permission-aware professional navigation: labeled groups on desktop,
   compact icon rail on tablets and phones. */
.rail-group-label { display: none; }

@media (min-width: 1181px) {
  .icon-rail-layout-v19031 { grid-template-columns: 236px minmax(0, 1fr); }
  .icon-rail-v19031 {
    width: 236px;
    align-items: stretch;
    padding: 16px 12px 12px;
    background: linear-gradient(180deg, #082c52 0%, #0a3d70 58%, #072849 100%);
  }
  .rail-brand {
    width: 100%;
    height: 66px;
    border-radius: 15px;
    justify-content: center;
  }
  .rail-primary { width: 100%; margin-top: 16px; }
  .rail-groups { align-items: stretch; gap: 5px; padding: 12px 0; }
  .rail-home-button,
  .rail-group-button {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    text-align: right;
  }
  .rail-home-button svg,
  .rail-group-button svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .rail-group-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
  }
  .rail-utilities {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding-top: 10px;
  }
  .rail-utilities button { width: 100%; height: 40px; }
  .rail-flyout { left: 252px; width: min(390px, calc(100vw - 275px)); }
}

@media (max-width: 1180px) {
  .rail-group-label { display: none; }
}

/* ===== END SOURCE 08/17 ===== */


/* ===== V194 SOURCE 09/17: frontend-src/src/styles/dashboard-shell-v1905.css ===== */
.dashboard-v1905{display:flex;flex-direction:column;gap:14px;color:#0d2b52}.dashboard-v1905 button{font:inherit}.dashboard-v1905-welcome{display:flex;align-items:center;justify-content:space-between;gap:18px}.dashboard-v1905-welcome h2{margin:0;font-size:30px;font-weight:900;letter-spacing:-.6px}.dashboard-v1905-welcome p{margin:4px 0 0;color:#617b9b;font-size:16px}.dashboard-v1905-context{display:flex;gap:10px;align-items:center}.dashboard-v1905-context button,.dashboard-v1905-context span{border:1px solid #dbe7f3;background:#fff;border-radius:10px;padding:10px 14px;color:#496783}.dashboard-v1905-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.kpi-card{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #dfe8f2;border-radius:14px;padding:18px;box-shadow:0 6px 18px rgba(18,53,86,.045)}.kpi-icon{width:54px;height:54px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto}.kpi-icon svg{width:27px;height:27px}.kpi-green .kpi-icon{background:#e2f8ef;color:#0c9b67}.kpi-red .kpi-icon{background:#ffe9ec;color:#ef3340}.kpi-blue .kpi-icon{background:#e8f3ff;color:#1378e5}.kpi-orange .kpi-icon{background:#fff1dc;color:#ed8a00}.kpi-card div{display:flex;flex-direction:column;gap:3px;min-width:0}.kpi-card small{color:#7287a0}.kpi-card strong{font-size:22px;white-space:nowrap}.kpi-card em{font-style:normal;font-size:12px;display:flex;align-items:center;gap:4px;color:#7287a0}.kpi-card em svg{width:14px}.kpi-card em.up{color:#0c9b67}.kpi-card em.down{color:#e03c48}.dashboard-v1905-quick,.dashboard-panel,.dashboard-v1905-cta{background:#fff;border:1px solid #dfe8f2;border-radius:14px}.dashboard-v1905-quick{padding:14px 16px}.dashboard-v1905-quick header,.dashboard-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dashboard-v1905-quick header>div,.dashboard-panel header>div{display:flex;flex-direction:column;gap:2px}.dashboard-v1905-quick header strong,.dashboard-panel header strong{font-size:17px}.dashboard-v1905-quick header small,.dashboard-panel header small{color:#7a8fa8}.dashboard-v1905-quick header button,.dashboard-panel header button{border:0;background:transparent;color:#1484ed;cursor:pointer}.quick-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.quick-card{min-height:76px;border:0;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;font-weight:800}.quick-card svg{width:24px}.quick-card.tone-green{background:#eaf9f2;color:#0d9e69}.quick-card.tone-blue{background:#edf6ff;color:#126fda}.quick-card.tone-violet{background:#f2ebff;color:#7b3ce0}.quick-card.tone-orange{background:#fff4e5;color:#e98200}.quick-card.tone-sky{background:#eaf6ff;color:#177ed2}.quick-card.tone-red{background:#fff0f1;color:#e23b47}.quick-card.tone-slate{background:#eef3f7;color:#34506d}.dashboard-v1905-main-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px}.dashboard-v1905-bottom-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.dashboard-panel{padding:16px;min-width:0}.trade-bars{display:flex;flex-direction:column;gap:17px;padding:8px 0}.trade-bars>div{display:grid;grid-template-columns:90px 120px 1fr;gap:10px;align-items:center}.trade-bars i,.branch-placeholder i{height:10px;background:#e8eef5;border-radius:99px;overflow:hidden;display:block}.trade-bars i em,.branch-placeholder i em{height:100%;display:block;background:linear-gradient(90deg,#1686ee,#5db7ff);border-radius:inherit}.trade-bars>div:nth-child(2) i em{background:linear-gradient(90deg,#16a36b,#5bd39b)}.trade-today{margin-top:14px;padding:12px;border-radius:10px;background:#f5f9fd;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center}.trade-today small{color:#748aa4}.operations-panel>button,.alerts-panel>button{width:100%;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;text-align:right;border:0;border-top:1px solid #edf2f7;background:#fff;padding:11px 4px;cursor:pointer;color:#183b64}.operations-panel>button svg,.alerts-panel>button svg{width:21px}.operations-panel>button span,.alerts-panel>button span{display:flex;flex-direction:column;gap:2px}.operations-panel>button small,.alerts-panel>button small{color:#7f92aa}.operations-panel>button strong{color:#137c58}.alerts-panel>button{grid-template-columns:34px 1fr}.alerts-panel>button.warn svg{color:#ed8c00}.alerts-panel>button.danger svg{color:#e23a46}.alerts-panel>button.info svg{color:#137add}.empty-business-widget{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;color:#768ba4}.empty-business-widget svg{width:34px;color:#1f80da}.empty-business-widget b{color:#274d76}.donut-placeholder{width:170px;height:170px;margin:6px auto;border-radius:50%;background:conic-gradient(#2f8ff3 0 35%,#28b779 35% 60%,#f3b332 60% 78%,#ec5757 78% 90%,#8b79ea 90% 100%);display:grid;place-items:center;position:relative}.donut-placeholder:after{content:"";position:absolute;width:105px;height:105px;background:#fff;border-radius:50%}.donut-placeholder span{z-index:1;display:flex;flex-direction:column;text-align:center}.donut-placeholder small{color:#7387a0}.branch-placeholder{display:flex;flex-direction:column;gap:14px;padding-top:12px}.branch-placeholder>div{display:grid;grid-template-columns:110px 1fr 48px;gap:10px;align-items:center}.branch-placeholder p{color:#7a8ea6;font-size:13px;margin:10px 0 0}.dashboard-v1905-cta{display:flex;justify-content:space-between;align-items:center;padding:15px 18px;background:linear-gradient(90deg,#f2f9ff,#f5fffb)}.dashboard-v1905-cta>div{display:flex;gap:10px;align-items:center}.dashboard-v1905-cta>div>span{display:flex;flex-direction:column}.dashboard-v1905-cta svg{color:#0a7fdd}.dashboard-v1905-cta small{color:#7287a0}.dashboard-v1905-cta button{border:0;border-radius:9px;background:#0f7ed7;color:#fff;padding:10px 16px;font-weight:800;cursor:pointer}.dashboard-v1905-error{margin:0}.rail-trade-panel-v1905{width:min(330px,calc(100vw - 92px))!important}.rail-trade-panel-v1905 .rail-flyout-grid{grid-template-columns:1fr!important}.rail-trade-panel-v1905 .rail-flyout-grid button{min-height:44px!important;justify-content:flex-start!important;gap:11px!important;padding-inline:12px!important}.rail-trade-panel-v1905 .flyout-icon{width:34px;height:34px;border-radius:9px;background:#edf6ff;color:#146fcd;display:grid;place-items:center}.rail-trade-panel-v1905 .flyout-icon svg{width:18px;height:18px}.v1905-shell .topbar-v1902{background:linear-gradient(90deg,#0a3c6f,#0c4d88);color:#fff}.v1905-shell .topbar-v1902 .topbar-search{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.2);color:#dcecff}.v1905-shell .topbar-v1902 .topbar-title small,.v1905-shell .topbar-v1902 .user-meta b{color:#c7dbef}.v1905-shell .content{background:#f6f9fc}.v1905-shell .icon-rail-v19031{background:linear-gradient(180deg,#082c52,#0a3d70)}
@media(max-width:1250px){.dashboard-v1905-kpis{grid-template-columns:repeat(2,1fr)}.quick-grid{grid-template-columns:repeat(4,1fr)}.dashboard-v1905-main-grid{grid-template-columns:1fr 1fr}.alerts-panel{grid-column:1/-1}.dashboard-v1905-bottom-grid{grid-template-columns:1fr 1fr}.dashboard-v1905-bottom-grid>article:last-child{grid-column:1/-1}}
@media(max-width:820px){.dashboard-v1905-welcome{align-items:flex-start;flex-direction:column}.dashboard-v1905-welcome h2{font-size:24px}.dashboard-v1905-context{width:100%;flex-wrap:wrap}.dashboard-v1905-kpis,.dashboard-v1905-main-grid,.dashboard-v1905-bottom-grid{grid-template-columns:1fr}.dashboard-v1905-bottom-grid>article:last-child,.alerts-panel{grid-column:auto}.quick-grid{grid-template-columns:repeat(2,1fr)}.dashboard-v1905-cta{align-items:flex-start;flex-direction:column;gap:12px}.trade-bars>div{grid-template-columns:80px 100px 1fr}}

/* ===== END SOURCE 09/17 ===== */


/* ===== V194 SOURCE 10/17: frontend-src/src/styles/dashboard-shell-v19051.css ===== */
/* V190.5.1 final visual match: reference-aligned density, labeled rail, balanced dashboard. */
@media (min-width: 781px) {
  .icon-rail-layout-v19031 { grid-template-columns: 92px minmax(0,1fr); }
  .v1905-shell .icon-rail-v19031 { width:92px; padding:12px 7px 10px; }
  .v1905-shell .rail-brand { width:58px; height:58px; margin-bottom:4px; }
  .v1905-shell .rail-primary { margin-top:8px; }
  .v1905-shell .rail-groups { gap:3px; padding:8px 0; justify-content:center; }
  .v1905-shell .rail-home-button,
  .v1905-shell .rail-group-button { width:78px; height:54px; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; position:relative; }
  .v1905-shell .rail-home-button svg,
  .v1905-shell .rail-group-button svg { width:21px; height:21px; flex:0 0 auto; }
  .v1905-shell .rail-group-button::after { content:attr(title); display:block; max-width:72px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:9px; line-height:1.15; font-weight:800; }
  .v1905-shell .rail-home-button::after { content:attr(title); display:block; font-size:9px; line-height:1.15; font-weight:800; }
  .v1905-shell .rail-utilities { width:74px; grid-template-columns:repeat(2,1fr); gap:3px; padding-top:7px; }
  .v1905-shell .rail-utilities button { width:34px; height:34px; border-radius:9px; }
  .v1905-shell .rail-utilities button svg { width:18px; height:18px; }
  .v1905-shell .rail-flyout { inset-inline-start:calc(100% + 8px); }
}

.v1905-shell .topbar-v1902 { min-height:58px; height:58px; padding-inline:18px; gap:14px; box-shadow:0 2px 10px rgba(6,50,91,.12); }
.v1905-shell .topbar-v1902 .topbar-title { min-width:150px; }
.v1905-shell .topbar-v1902 .topbar-title h1 { font-size:17px; line-height:1.2; }
.v1905-shell .topbar-v1902 .topbar-title small { font-size:10px; }
.v1905-shell .topbar-v1902 .topbar-search { width:min(500px,38vw); min-height:36px; margin-inline:auto; border-radius:9px; }
.v1905-shell .topbar-v1902 .topbar-actions { gap:8px; }
.v1905-shell .topbar-v1902 .user-chip { min-height:40px; }
.v1905-shell .content { padding:18px 22px 24px; }

.dashboard-v1905 { max-width:1500px; margin:0 auto; gap:10px; }
.dashboard-v1905-welcome { min-height:56px; gap:12px; }
.dashboard-v1905-welcome h2 { font-size:26px; line-height:1.2; }
.dashboard-v1905-welcome p { font-size:14px; margin-top:2px; }
.dashboard-v1905-context button,
.dashboard-v1905-context span { padding:8px 12px; min-height:36px; }

.dashboard-v1905-kpis { gap:10px; }
.dashboard-v1905-kpis .kpi-card { min-height:94px; padding:14px 16px; gap:11px; border-radius:12px; box-shadow:0 3px 12px rgba(20,56,90,.04); }
.dashboard-v1905-kpis .kpi-icon { width:46px; height:46px; border-radius:10px; }
.dashboard-v1905-kpis .kpi-icon svg { width:23px; height:23px; }
.dashboard-v1905-kpis .kpi-card strong { font-size:20px; }
.dashboard-v1905-kpis .kpi-card small { font-size:12px; }
.dashboard-v1905-kpis .kpi-card em { font-size:11px; }

.dashboard-v1905-quick { padding:12px 14px; border-radius:12px; }
.dashboard-v1905-quick header { margin-bottom:9px; }
.dashboard-v1905-quick header strong { font-size:16px; }
.dashboard-v1905 .quick-grid { gap:8px; }
.dashboard-v1905 .quick-card { min-height:66px; border-radius:10px; gap:5px; }
.dashboard-v1905 .quick-card svg { width:21px; height:21px; }
.dashboard-v1905 .quick-card span { font-size:12px; }

.dashboard-v1905-main-grid { grid-template-columns:1.18fr 1fr 1fr; gap:10px; align-items:stretch; }
.dashboard-v1905-bottom-grid { gap:10px; align-items:stretch; }
.dashboard-v1905 .dashboard-panel { padding:13px 14px; border-radius:12px; min-height:218px; }
.dashboard-v1905 .dashboard-panel header { margin-bottom:8px; }
.dashboard-v1905 .dashboard-panel header strong { font-size:15px; }
.dashboard-v1905 .dashboard-panel header small { font-size:11px; }
.dashboard-v1905 .trade-bars { gap:13px; padding:4px 0; }
.dashboard-v1905 .trade-bars>div { grid-template-columns:78px 105px 1fr; }
.dashboard-v1905 .trade-today { margin-top:10px; padding:9px 10px; }
.dashboard-v1905 .operations-panel>button,
.dashboard-v1905 .alerts-panel>button { padding:8px 2px; min-height:42px; }
.dashboard-v1905 .empty-business-widget { min-height:122px; }
.dashboard-v1905 .donut-placeholder { width:142px; height:142px; margin:0 auto; }
.dashboard-v1905 .donut-placeholder:after { width:88px; height:88px; }
.dashboard-v1905 .branch-placeholder { gap:10px; padding-top:5px; }
.dashboard-v1905-cta { padding:11px 14px; border-radius:11px; }

html[data-theme='dark'] .dashboard-v1905 { color:#e7f1f8; }
html[data-theme='dark'] .dashboard-v1905-welcome p,
html[data-theme='dark'] .dashboard-v1905 .dashboard-panel header small,
html[data-theme='dark'] .dashboard-v1905 .kpi-card small { color:#a9bfd0; }
html[data-theme='dark'] .dashboard-v1905 .kpi-card,
html[data-theme='dark'] .dashboard-v1905-quick,
html[data-theme='dark'] .dashboard-v1905 .dashboard-panel { background:#152b3b; border-color:#2d4a5e; }
html[data-theme='dark'] .dashboard-v1905 .operations-panel>button,
html[data-theme='dark'] .dashboard-v1905 .alerts-panel>button { background:transparent; color:#e7f1f8; border-color:#294659; }

@media (max-width: 1250px) {
  .v1905-shell .topbar-v1902 .topbar-search { width:min(420px,34vw); }
  .dashboard-v1905 .dashboard-panel { min-height:200px; }
}

@media (max-width: 820px) {
  .v1905-shell .content { padding:12px; }
  .v1905-shell .topbar-v1902 { height:54px; min-height:54px; padding-inline:10px; }
  .v1905-shell .topbar-v1902 .topbar-search { width:auto; flex:1; min-width:0; }
  .dashboard-v1905 { gap:9px; }
  .dashboard-v1905-welcome h2 { font-size:22px; }
  .dashboard-v1905-kpis .kpi-card { min-height:86px; }
  .dashboard-v1905 .dashboard-panel { min-height:auto; }
}

/* ===== END SOURCE 10/17 ===== */


/* ===== V194 SOURCE 11/17: frontend-src/src/styles/dashboard-shell-v19052.css ===== */
/* V190.5.2 approved light enterprise dashboard and persistent commerce context. */
:root {
  --v19052-navy: #0b315f;
  --v19052-blue: #0d7de8;
  --v19052-blue-2: #1d93f3;
  --v19052-bg: #f4f8fc;
  --v19052-panel: #ffffff;
  --v19052-line: #dce8f3;
  --v19052-text: #102f59;
  --v19052-muted: #7188a3;
}

.v1905-shell {
  background: var(--v19052-bg);
  color: var(--v19052-text);
}

@media (min-width: 781px) {
  .v1905-shell.icon-rail-layout-v19031 {
    grid-template-columns: 92px minmax(0, 1fr);
  }
  .v1905-shell.has-commerce-context-v19052 {
    grid-template-columns: 92px 286px minmax(0, 1fr);
  }
}

.v1905-shell .icon-rail-v19031 {
  background: linear-gradient(180deg, #0b477f 0%, #08355f 58%, #072d52 100%);
  border-inline-end: 0;
  box-shadow: 8px 0 24px rgba(7, 47, 86, .12);
  color: #fff;
}
.v1905-shell .rail-brand {
  background: linear-gradient(145deg, #1789e5, #0867bd);
  box-shadow: 0 8px 22px rgba(0, 115, 215, .28);
}
.v1905-shell .rail-home-button,
.v1905-shell .rail-group-button,
.v1905-shell .rail-utilities button {
  color: #e5f2ff;
}
.v1905-shell .rail-home-button:hover,
.v1905-shell .rail-group-button:hover,
.v1905-shell .rail-utilities button:hover {
  background: rgba(255,255,255,.11);
  color: #fff;
}
.v1905-shell .rail-home-button.active,
.v1905-shell .rail-group-button.active,
.v1905-shell .rail-group-button.expanded {
  background: linear-gradient(145deg, #168af0, #0874d4);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 104, 206, .34);
}
.v1905-shell .rail-utilities { border-color: rgba(255,255,255,.15); }

.commerce-context-v19052 {
  direction: rtl;
  min-width: 0;
  width: auto;
  height: 100vh;
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 10px 10px 14px;
  background: rgba(255,255,255,.98);
  color: var(--v19052-text);
  border-inline-end: 1px solid var(--v19052-line);
  box-shadow: 8px 0 24px rgba(28, 73, 112, .055);
}
.commerce-context-head {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 12px;
  border: 1px solid #e0eaf3;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #f9fcff);
}
.commerce-context-head > span:last-child { display: grid; gap: 4px; }
.commerce-context-head strong { font-size: 18px; font-weight: 900; color: #0c2e58; }
.commerce-context-head small { font-size: 11px; color: #7790aa; line-height: 1.6; }
.commerce-context-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #eaf4ff;
  color: #0b72d3;
}
.commerce-context-icon svg { width: 27px; height: 27px; }
.commerce-context-nav { display: grid; gap: 3px; }
.commerce-context-nav button {
  width: 100%;
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #173b66;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-align: right;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.commerce-context-nav button svg { width: 20px; height: 20px; }
.commerce-context-nav button:hover {
  background: #f1f7fd;
  color: #0873d9;
  border-color: #e0ebf4;
  transform: translateX(-1px);
}
.commerce-context-nav button.active {
  background: linear-gradient(90deg, #d8ebff, #edf6ff);
  border-color: #c5e0fb;
  color: #0874dd;
  box-shadow: inset -3px 0 0 #0e80ed;
}
.commerce-context-cta {
  margin-top: auto;
  width: 100%;
  min-height: 72px;
  border: 1px solid #d8e9f7;
  border-radius: 13px;
  background: linear-gradient(135deg, #eef8ff, #e8f4ff);
  color: #153b67;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 9px;
  padding: 11px;
  text-align: right;
  cursor: pointer;
}
.commerce-context-cta > svg { width: 28px; height: 28px; color: #0c7fe8; }
.commerce-context-cta > span:nth-child(2) { display: grid; gap: 3px; }
.commerce-context-cta b { font-size: 12px; }
.commerce-context-cta small { font-size: 10px; color: #7189a2; }
.commerce-context-cta > span:last-child { font-size: 24px; color: #0b6dc8; }

.v1905-shell .topbar-v1902 {
  min-height: 60px;
  height: 60px;
  background: rgba(255,255,255,.97);
  color: #123861;
  border-bottom: 1px solid #dce8f2;
  box-shadow: 0 2px 12px rgba(20, 63, 101, .07);
  backdrop-filter: blur(12px);
}
.v1905-shell .topbar-v1902 .topbar-title h1 { color: #102f59; font-weight: 900; }
.v1905-shell .topbar-v1902 .topbar-title small { color: #7a91a9; }
.v1905-shell .topbar-v1902 .topbar-search {
  background: #f7fbff;
  border: 1px solid #d6e5f1;
  color: #496b8c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.v1905-shell .topbar-v1902 .topbar-search:hover { border-color: #b9d7ec; background: #fff; }
.v1905-shell .topbar-v1902 .topbar-search kbd {
  margin-inline-start: auto;
  border: 1px solid #d9e4ed;
  border-radius: 6px;
  background: #fff;
  color: #7990a7;
  padding: 2px 6px;
  font: inherit;
  font-size: 10px;
}
.v1905-shell .topbar-v1902 .user-chip {
  background: #f8fbfe;
  border-color: #dce8f2;
  color: #123861;
  box-shadow: none;
}
.v1905-shell .topbar-v1902 .user-meta strong { color: #123861; }
.v1905-shell .topbar-v1902 .user-meta b { color: #7c91a7; }
.v1905-shell .topbar-v1902 .user-avatar { background: #eaf4ff; color: #0b70cd; }

.v1905-shell .content {
  min-width: 0;
  background:
    radial-gradient(circle at 78% 0%, rgba(30,146,243,.045), transparent 28%),
    linear-gradient(180deg, #f9fcff 0%, #f3f8fd 100%);
  padding: 20px 22px 26px;
}
.dashboard-v1905 { width: 100%; max-width: 1480px; gap: 12px; }
.dashboard-v1905-welcome { padding: 2px 2px 5px; }
.dashboard-v1905-welcome h2 { color: #0b2f5c; font-size: 27px; font-weight: 900; letter-spacing: -.35px; }
.dashboard-v1905-welcome p { color: #6e86a1; }
.dashboard-v1905-context button,
.dashboard-v1905-context span {
  background: #fff;
  border-color: #dbe7f2;
  color: #355c80;
  box-shadow: 0 2px 8px rgba(24,68,107,.035);
}

.dashboard-v1905 .kpi-card,
.dashboard-v1905-quick,
.dashboard-v1905 .dashboard-panel {
  background: rgba(255,255,255,.98);
  border-color: #dfe9f2;
  box-shadow: 0 5px 18px rgba(19, 63, 101, .055);
}
.dashboard-v1905 .kpi-card {
  min-height: 103px;
  border-radius: 13px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-v1905 .kpi-card:hover {
  transform: translateY(-2px);
  border-color: #c9deed;
  box-shadow: 0 10px 24px rgba(19,63,101,.09);
}
.dashboard-v1905 .kpi-card strong { color: #102f59; font-weight: 900; font-size: 21px; }
.dashboard-v1905 .kpi-card small { color: #7288a2; font-weight: 700; }
.dashboard-v1905 .kpi-icon { box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }

.dashboard-v1905-quick { border-radius: 13px; padding: 13px 15px; }
.dashboard-v1905-quick header strong,
.dashboard-v1905 .dashboard-panel header strong { color: #102f59; font-weight: 900; }
.dashboard-v1905 .quick-card {
  border: 1px solid rgba(205,221,235,.45);
  min-height: 70px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .16s ease, box-shadow .16s ease;
}
.dashboard-v1905 .quick-card:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(30,79,120,.08); }

.dashboard-v1905 .dashboard-panel { border-radius: 13px; min-height: 230px; }
.dashboard-v1905 .dashboard-panel header { padding-bottom: 7px; border-bottom: 1px solid #edf2f7; }
.dashboard-v1905 .operations-panel > button,
.dashboard-v1905 .alerts-panel > button {
  background: transparent;
  color: #173b64;
  border-color: #edf2f7;
  border-radius: 8px;
  transition: background .15s ease;
}
.dashboard-v1905 .operations-panel > button:hover,
.dashboard-v1905 .alerts-panel > button:hover { background: #f7fbff; }
.dashboard-v1905 .trade-today { background: #f5f9fd; border: 1px solid #e8f0f6; }
.dashboard-v1905 .empty-business-widget { color: #728aa3; }
.dashboard-v1905 .empty-business-widget b { color: #2a5077; }
.dashboard-v1905-cta {
  border-color: #d9eaf5;
  background: linear-gradient(90deg, #f1f9ff, #f2fcf8);
  box-shadow: 0 4px 14px rgba(18,67,105,.035);
}

.v1905-shell button:focus-visible,
.commerce-context-v19052 button:focus-visible {
  outline: 3px solid rgba(13,125,232,.22);
  outline-offset: 2px;
}

html[data-theme='dark'] .v1905-shell { background: #0f1d27; color: #e7f2f8; }
html[data-theme='dark'] .v1905-shell .topbar-v1902 {
  background: #112736;
  color: #e7f2f8;
  border-color: #2b4759;
  box-shadow: 0 3px 14px rgba(0,0,0,.2);
}
html[data-theme='dark'] .v1905-shell .topbar-v1902 .topbar-title h1,
html[data-theme='dark'] .v1905-shell .topbar-v1902 .user-meta strong { color: #eef7fb; }
html[data-theme='dark'] .v1905-shell .topbar-v1902 .topbar-search,
html[data-theme='dark'] .v1905-shell .topbar-v1902 .user-chip {
  background: #183343;
  border-color: #315064;
  color: #dcecf5;
}
html[data-theme='dark'] .v1905-shell .content { background: #10202b; }
html[data-theme='dark'] .commerce-context-v19052 {
  background: #132a39;
  color: #e8f3f8;
  border-color: #2e4b5e;
  box-shadow: 8px 0 24px rgba(0,0,0,.18);
}
html[data-theme='dark'] .commerce-context-head { background: #172f40; border-color: #315064; }
html[data-theme='dark'] .commerce-context-head strong,
html[data-theme='dark'] .commerce-context-nav button,
html[data-theme='dark'] .commerce-context-cta { color: #e7f2f8; }
html[data-theme='dark'] .commerce-context-head small,
html[data-theme='dark'] .commerce-context-cta small { color: #9bb2c3; }
html[data-theme='dark'] .commerce-context-icon { background: #1b3d54; color: #65b7ff; }
html[data-theme='dark'] .commerce-context-nav button:hover { background: #193747; border-color: #315064; }
html[data-theme='dark'] .commerce-context-nav button.active { background: #1c4560; border-color: #40708d; color: #7fc2ff; }
html[data-theme='dark'] .commerce-context-cta { background: #17374b; border-color: #315b74; }
html[data-theme='dark'] .dashboard-v1905-welcome h2,
html[data-theme='dark'] .dashboard-v1905 .kpi-card strong,
html[data-theme='dark'] .dashboard-v1905-quick header strong,
html[data-theme='dark'] .dashboard-v1905 .dashboard-panel header strong { color: #eef7fb; }

@media (max-width: 1180px) and (min-width: 781px) {
  .v1905-shell.has-commerce-context-v19052 { grid-template-columns: 92px 238px minmax(0,1fr); }
  .commerce-context-head { min-height: 78px; padding: 10px; }
  .commerce-context-head strong { font-size: 16px; }
  .commerce-context-nav button { min-height: 40px; padding: 7px 9px; font-size: 12px; }
  .v1905-shell .content { padding: 16px; }
}

@media (max-width: 780px) {
  .commerce-context-v19052 { display: none; }
  .v1905-shell .content { padding: 12px; }
  .v1905-shell .topbar-v1902 { min-height: 56px; height: 56px; }
  .v1905-shell .topbar-v1902 .topbar-search kbd { display: none; }
  .dashboard-v1905-welcome h2 { font-size: 22px; }
}


/* V191 — light reference dashboard */
.dashboard-reference-v191 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
  max-width: 1600px;
  color: #173a5d;
}
.v1905-shell .content {
  background: #f5f8fc;
}
.dashboard-reference-v191 .dashboard-v1905-welcome,
.dashboard-reference-v191 .dashboard-v1905-kpis,
.dashboard-reference-v191 .dashboard-v1905-main-grid,
.dashboard-reference-v191 .dashboard-v1905-bottom-grid,
.dashboard-reference-v191 .dashboard-v1905-cta,
.dashboard-reference-v191 > .commercial-approval-queue {
  grid-column: 1;
}
.dashboard-reference-v191 .dashboard-v1905-quick {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 170px;
  padding: 16px;
}
.dashboard-reference-v191 .dashboard-v1905-quick header > div strong::before {
  content: "⚡ ";
}
.dashboard-reference-v191 .quick-grid {
  grid-template-columns: 1fr;
}
.dashboard-reference-v191 .quick-card {
  min-height: 46px;
  flex-direction: row;
  justify-content: flex-start;
  padding-inline: 14px;
  border: 1px solid #e3ebf2;
  background: #fff !important;
}
.dashboard-reference-v191 .quick-card.tone-green { color:#0f9b64; }
.dashboard-reference-v191 .quick-card.tone-blue { color:#1475d6; }
.dashboard-reference-v191 .quick-card.tone-violet { color:#7744db; }
.dashboard-reference-v191 .quick-card.tone-orange { color:#e48214; }
.dashboard-reference-v191 .quick-card.tone-sky { color:#1683d7; }
.dashboard-reference-v191 .quick-card.tone-red { color:#dc4050; }
.dashboard-reference-v191 .quick-card.tone-slate { color:#425d76; }
.dashboard-v191-activity-rail {
  grid-column: 2;
  grid-row: 3 / span 2;
  background:#fff;
  border:1px solid #dfe8f1;
  border-radius:14px;
  padding:14px;
  box-shadow:0 5px 18px rgba(19,63,101,.055);
}
.dashboard-v191-activity-rail header {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid #edf2f6;
}
.dashboard-v191-activity-rail header > div { display:grid; gap:2px; }
.dashboard-v191-activity-rail header strong { color:#173a5d; }
.dashboard-v191-activity-rail header small { color:#7b91a4; font-size:11px; }
.dashboard-v191-activity-rail header button {
  border:0;
  background:transparent;
  color:#1579d6;
  cursor:pointer;
}
.dashboard-v191-activity-rail > button {
  width:100%;
  display:grid;
  grid-template-columns:12px 1fr;
  gap:10px;
  padding:12px 3px;
  border:0;
  border-bottom:1px solid #edf2f6;
  background:transparent;
  text-align:right;
  cursor:pointer;
}
.dashboard-v191-activity-rail > button span:last-child { display:grid; gap:2px; }
.dashboard-v191-activity-rail b { color:#173a5d; }
.dashboard-v191-activity-rail small { color:#7a90a4; }
.activity-dot { width:8px; height:8px; margin-top:7px; border-radius:50%; background:#2689ef; }
.activity-dot.green { background:#20aa69; }
.activity-dot.orange { background:#ef9a2e; }
.dashboard-reference-v191 .dashboard-v1905-kpis .kpi-card,
.dashboard-reference-v191 .dashboard-v1905-quick,
.dashboard-reference-v191 .dashboard-panel,
.dashboard-reference-v191 .dashboard-v191-activity-rail {
  background:#fff;
}
html[data-theme='dark'] .dashboard-reference-v191 {
  color:#173a5d;
}
html[data-theme='dark'] .v1905-shell .content {
  background:#f5f8fc;
}
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail {
  background:#fff;
  border-color:#dfe8f1;
}
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-welcome h2,
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick header strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel header strong {
  color:#173a5d;
}
@media(max-width:1180px){
  .dashboard-reference-v191{grid-template-columns:1fr}
  .dashboard-reference-v191 .dashboard-v1905-welcome,
  .dashboard-reference-v191 .dashboard-v1905-kpis,
  .dashboard-reference-v191 .dashboard-v1905-quick,
  .dashboard-reference-v191 .dashboard-v191-activity-rail,
  .dashboard-reference-v191 .dashboard-v1905-main-grid,
  .dashboard-reference-v191 .dashboard-v1905-bottom-grid,
  .dashboard-reference-v191 .dashboard-v1905-cta{grid-column:1;grid-row:auto;position:static}
  .dashboard-reference-v191 .quick-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:720px){
  .dashboard-reference-v191 .quick-grid{grid-template-columns:1fr}
}


/* V191.1 — dashboard reference layout stays light regardless of saved browser theme */
html[data-theme='dark'] .v1905-shell .content,
html[data-theme='light'] .v1905-shell .content,
.v1905-shell .content {
  background: #f5f8fc !important;
}
html[data-theme='dark'] .dashboard-reference-v191,
html[data-theme='light'] .dashboard-reference-v191,
.dashboard-reference-v191 {
  color: #173a5d !important;
}
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail,
html[data-theme='light'] .dashboard-reference-v191 .kpi-card,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-panel,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v191-activity-rail {
  background: #ffffff !important;
  border-color: #dfe8f1 !important;
  color: #173a5d !important;
}
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-welcome h2,
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick header strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel header strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail strong,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v1905-welcome h2,
html[data-theme='light'] .dashboard-reference-v191 .kpi-card strong,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v1905-quick header strong,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-panel header strong,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v191-activity-rail strong {
  color: #173a5d !important;
}
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-welcome p,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel header small,
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card small,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail small,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v1905-welcome p,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-panel header small,
html[data-theme='light'] .dashboard-reference-v191 .kpi-card small,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v191-activity-rail small {
  color: #7188a3 !important;
}


/* V191.2 — reference dashboard composition with fixed right sidebar */
.dashboard-reference-v191 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 16px !important;
  direction: ltr !important;
  align-items: start !important;
  max-width: 1540px !important;
}
.dashboard-v191-main,
.dashboard-v191-sidebar {
  direction: rtl;
  min-width: 0;
}
.dashboard-v191-main {
  display:flex;
  flex-direction:column;
  gap:12px;
}
.dashboard-v191-sidebar {
  display:flex;
  flex-direction:column;
  gap:12px;
  position:sticky;
  top:166px;
}
.dashboard-v191-hero {
  position:relative;
  overflow:hidden;
  min-height:170px;
  padding:28px 30px !important;
  border:1px solid #dfe8f1;
  border-radius:15px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98) 0 52%, rgba(231,241,250,.94) 100%),
    #fff;
  box-shadow:0 7px 22px rgba(19,63,101,.06);
}
.dashboard-v191-hero::after {
  content:"";
  position:absolute;
  inset-inline-start:28px;
  bottom:0;
  width:38%;
  height:78%;
  opacity:.55;
  background:
    linear-gradient(90deg, transparent 0 7%, #dce8f2 7% 18%, transparent 18% 24%, #cbdbe8 24% 39%, transparent 39% 48%, #b9cedf 48% 66%, transparent 66% 73%, #d6e3ed 73% 92%, transparent 92%);
  clip-path:polygon(0 100%,0 62%,12% 62%,12% 28%,28% 28%,28% 48%,42% 48%,42% 8%,62% 8%,62% 37%,76% 37%,76% 18%,92% 18%,92% 100%);
  pointer-events:none;
}
.dashboard-v191-hero > div:first-child { position:relative; z-index:1; max-width:52%; }
.dashboard-v191-hero h2 { font-size:30px !important; line-height:1.35; }
.dashboard-v191-hero p { font-size:14px !important; }
.dashboard-v191-hero .dashboard-v1905-context {
  position:absolute;
  inset-inline-end:28px;
  bottom:22px;
  z-index:2;
}
.dashboard-reference-v191 .dashboard-v1905-kpis {
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
.dashboard-reference-v191 .dashboard-v1905-quick,
.dashboard-reference-v191 .dashboard-v191-activity-rail {
  position:static !important;
  grid-column:auto !important;
  grid-row:auto !important;
  width:100%;
}
.dashboard-reference-v191 .dashboard-v1905-quick {
  padding:16px !important;
  border-radius:14px !important;
}
.dashboard-reference-v191 .quick-grid {
  grid-template-columns:1fr !important;
  gap:8px !important;
}
.dashboard-reference-v191 .quick-card {
  min-height:46px !important;
  justify-content:flex-start !important;
  flex-direction:row !important;
  padding-inline:14px !important;
  background:#fff !important;
}
.dashboard-reference-v191 .dashboard-v1905-main-grid,
.dashboard-reference-v191 .dashboard-v1905-bottom-grid {
  width:100%;
}
html[data-theme='dark'] .dashboard-v191-main,
html[data-theme='dark'] .dashboard-v191-sidebar,
html[data-theme='dark'] .dashboard-v191-hero,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail {
  color:#173a5d !important;
}
@media(max-width:1180px){
  .dashboard-reference-v191{grid-template-columns:1fr !important;direction:rtl !important;}
  .dashboard-v191-sidebar{position:static;display:grid;grid-template-columns:1fr 1fr;}
  .dashboard-v191-hero > div:first-child{max-width:68%;}
}
@media(max-width:760px){
  .dashboard-v191-sidebar{grid-template-columns:1fr;}
  .dashboard-v191-hero{min-height:140px;padding:20px !important;}
  .dashboard-v191-hero::after{display:none;}
  .dashboard-v191-hero > div:first-child{max-width:100%;}
  .dashboard-reference-v191 .dashboard-v1905-kpis{grid-template-columns:1fr !important;}
}

/* ===== END SOURCE 11/17 ===== */


/* ===== V194 SOURCE 12/17: frontend-src/src/styles/top-navigation-v1906.css ===== */
/* V190.6 — unified grouped top navigation */
.top-navigation-layout { display: block; min-height: 100vh; }
.top-navigation-layout > main { min-width: 0; }

.top-navigation-v1906 {
  position: sticky; top: 76px; z-index: 40; display: flex; align-items: center; gap: 14px;
  min-height: 66px; padding: 8px 24px; border-bottom: 1px solid rgba(100, 176, 229, .24);
  background: rgba(13, 31, 44, .97); box-shadow: 0 9px 22px rgba(0, 0, 0, .16); backdrop-filter: blur(16px);
}

.top-nav-current-context {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 190px;
  padding-inline-end: 14px;
  border-inline-end: 1px solid rgba(111, 169, 207, .25);
  color: #9dc2da;
  white-space: nowrap;
  font-size: 11px;
}

.top-nav-current-context strong {
  overflow: hidden;
  color: #f1f8ff;
  text-overflow: ellipsis;
  font-size: 13px;
}

.top-nav-current-context small {
  overflow: hidden;
  max-width: 74px;
  color: #71c9fb;
  text-overflow: ellipsis;
  font-size: 11px;
}

.top-nav-group-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-inline-start: 2px;
  padding-inline: 5px;
  place-items: center;
  border-radius: 99px;
  color: #dff4ff;
  background: rgba(61, 154, 213, .34);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.top-nav-flyout-header strong .top-nav-group-count {
  vertical-align: middle;
}

.top-nav-primary { display: flex; align-items: center; gap: 5px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(84, 173, 231, .56) transparent; }
.top-nav-primary button, .top-nav-utilities button { border: 1px solid transparent; background: transparent; color: #c9dfef; font: inherit; cursor: pointer; }
.top-nav-primary button:focus-visible, .top-nav-utilities button:focus-visible { outline: 3px solid rgba(72, 170, 240, .62); outline-offset: 2px; }
.top-nav-home-button, .top-nav-group-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 42px;
  padding: 0 10px; border-radius: 11px; white-space: nowrap; font-size: 12px; font-weight: 800;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.top-nav-home-button:hover, .top-nav-group-button:hover { border-color: rgba(75, 172, 234, .36); background: rgba(36, 91, 132, .48); color: #fff; transform: translateY(-1px); }
.top-nav-home-button.active, .top-nav-group-button.active { border-color: rgba(85, 186, 247, .55); background: linear-gradient(135deg, #276f9e, #1b527c); color: #fff; box-shadow: 0 6px 16px rgba(10, 55, 86, .38); }
.top-nav-group-button svg, .top-nav-home-button svg { width: 18px; height: 18px; }
.top-nav-utilities { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; padding-inline-start: 12px; border-inline-start: 1px solid rgba(111, 169, 207, .25); }
.top-nav-utilities button { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; }
.top-nav-utilities button:hover { background: rgba(55, 118, 159, .38); color: #fff; }

.top-nav-flyout {
  position: fixed; top: 151px; left: 50%; z-index: 90; width: min(980px, calc(100vw - 36px));
  max-height: min(560px, calc(100vh - 174px)); padding: 18px; overflow: auto;
  border: 1px solid rgba(84, 178, 240, .42); border-radius: 18px;
  background: linear-gradient(145deg, rgba(21, 51, 71, .99), rgba(10, 29, 42, .99));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .42); transform: translateX(-50%);
}
.top-nav-flyout--compact { width: min(680px, calc(100vw - 36px)); }
.top-nav-flyout--medium { width: min(880px, calc(100vw - 36px)); }
.top-nav-flyout--wide { width: min(1080px, calc(100vw - 36px)); }
.top-nav-flyout-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 4px 14px; color: #d7eafa; font-size: 16px; font-weight: 900; }
.top-nav-flyout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.top-nav-flyout--compact .top-nav-flyout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.top-nav-flyout .rail-flyout-link {
  display: flex; align-items: center; min-height: 66px; gap: 10px; padding: 12px;
  border: 1px solid rgba(100, 168, 207, .22); border-radius: 12px; color: #d8e9f5;
  background: rgba(10, 30, 43, .48); text-align: start; font: inherit; font-weight: 750; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.top-nav-flyout .rail-flyout-link:hover, .top-nav-flyout .rail-flyout-link.active { border-color: rgba(78, 180, 241, .6); background: rgba(34, 103, 145, .54); color: #fff; transform: translateY(-2px); }
.top-nav-flyout .rail-flyout-link svg { flex: 0 0 auto; color: #62c6ff; }

@media (max-width: 1120px) { .top-navigation-v1906 { padding-inline: 16px; } .top-nav-group-button { padding-inline: 10px; } }
@media (max-width: 900px) {
  .top-navigation-v1906 {
    position: fixed; top: 70px; right: 10px; left: 10px; z-index: 70; display: block;
    max-height: calc(100vh - 88px); padding: 12px; overflow-y: auto; border: 1px solid rgba(84, 178, 240, .48);
    border-radius: 16px; transform: translateY(calc(-100% - 90px)); opacity: 0; pointer-events: none;
    transition: transform .24s ease, opacity .2s ease;
  }
  .mobile-nav-open .top-navigation-v1906 { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .top-nav-current-context {
    max-width: none;
    padding: 0 4px 10px;
    border: 0;
  }
  .top-nav-current-context small { max-width: none; }
  .top-nav-primary { display: grid; grid-template-columns: 1fr; gap: 6px; overflow: visible; }
  .top-nav-home-button, .top-nav-group-button { width: 100%; justify-content: flex-start; min-height: 46px; }
  .top-nav-utilities { justify-content: space-between; width: 100%; margin-top: 10px; padding: 10px 0 0; border-top: 1px solid rgba(111, 169, 207, .25); border-inline-start: 0; }
  .top-nav-flyout { top: 85px; width: calc(100vw - 28px); max-height: calc(100vh - 102px); padding: 14px; }
  .top-nav-flyout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .top-navigation-v1906 { right: 6px; left: 6px; } .top-nav-flyout { width: calc(100vw - 16px); } }


/* Wave 15 UX hotfix — keep the active module's direct tools visible.
   This removes the hidden-flyout ambiguity (for example CRM vs Customers). */
.top-nav-context-tools {
  position: sticky;
  top: 142px;
  z-index: 34;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 24px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(100, 176, 229, .18);
  background: rgba(10, 27, 39, .96);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
  scrollbar-width: thin;
}
.top-nav-context-tools button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(111, 169, 207, .22);
  border-radius: 9px;
  color: #c9dfef;
  background: rgba(21, 48, 67, .7);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.top-nav-context-tools button:hover {
  border-color: rgba(85, 186, 247, .5);
  color: #fff;
  background: rgba(34, 103, 145, .52);
}
.top-nav-context-tools button.active {
  border-color: rgba(85, 186, 247, .72);
  color: #fff;
  background: linear-gradient(135deg, #276f9e, #1b527c);
}
.top-nav-context-tools svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .top-nav-context-tools {
    position: sticky;
    top: 70px;
    z-index: 35;
    padding-inline: 12px;
  }
}


/* V190.7 — RTL enterprise navigation: core ERP domains first, secondary tools under More. */
.top-navigation-v1906 {
  direction: rtl;
}
.top-nav-primary {
  direction: rtl;
  justify-content: flex-start;
}
.top-nav-current-context {
  order: 3;
}
.top-nav-primary {
  order: 2;
}
.top-nav-utilities {
  order: 1;
}
.top-nav-flyout {
  direction: rtl;
  right: 24px;
  left: auto;
  transform: none;
  text-align: right;
}
.top-nav-flyout-header,
.top-nav-flyout-grid,
.top-nav-context-tools {
  direction: rtl;
}
.top-nav-flyout .rail-flyout-link {
  justify-content: flex-start;
  text-align: right;
}
@media (max-width: 900px) {
  .top-nav-current-context,
  .top-nav-primary,
  .top-nav-utilities { order: initial; }
  .top-nav-flyout {
    right: 14px;
    left: 14px;
    width: auto;
  }
}


/* V190.7 enterprise mega menus */
.top-nav-group-button .top-nav-group-count { display: none; }
.top-nav-flyout--procurement,
.top-nav-flyout--more {
  width: min(1120px, calc(100vw - 48px));
  padding: 20px;
}
.procurement-mega {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(0, 2fr);
  gap: 18px;
  align-items: stretch;
}
.procurement-mega-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid rgba(99, 179, 231, .22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 18%, rgba(58, 152, 221, .16), transparent 36%),
    linear-gradient(160deg, rgba(22, 56, 78, .98), rgba(10, 30, 43, .98));
}
.procurement-mega-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 15px;
  color: #72cbff;
  background: rgba(45, 137, 198, .18);
}
.procurement-mega-icon svg { width: 28px; height: 28px; }
.procurement-mega-intro h3,
.more-mega-section h3 {
  margin: 0;
  color: #f3f9ff;
}
.procurement-mega-intro p {
  margin: 0;
  color: #a8c7da;
  line-height: 1.9;
  font-size: 13px;
}
.procurement-live-links {
  display: grid;
  gap: 8px;
  margin-top: auto;
}
.procurement-live-links button,
.more-mega-links button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(107, 175, 216, .18);
  border-radius: 10px;
  color: #d7e9f4;
  background: rgba(7, 25, 37, .44);
  text-align: right;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.procurement-live-links button:hover,
.procurement-live-links button.active,
.more-mega-links button:hover,
.more-mega-links button.active {
  border-color: rgba(83, 190, 247, .56);
  color: #fff;
  background: rgba(37, 105, 148, .5);
}
.procurement-live-links svg,
.more-mega-links svg { width: 17px; height: 17px; color: #6ecaff; }
.procurement-roadmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.procurement-roadmap-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(107, 175, 216, .18);
  border-radius: 13px;
  background: rgba(9, 29, 42, .55);
}
.procurement-roadmap-card .roadmap-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: #6dcaff;
  background: rgba(47, 139, 201, .14);
}
.procurement-roadmap-card .roadmap-icon svg { width: 20px; height: 20px; }
.procurement-roadmap-card span:nth-child(2) {
  display: grid;
  gap: 4px;
}
.procurement-roadmap-card strong { color: #f0f8ff; font-size: 13px; }
.procurement-roadmap-card small { color: #92b6cd; font-size: 11px; }
.procurement-roadmap-card > b {
  padding: 4px 7px;
  border-radius: 999px;
  color: #8fd4ff;
  background: rgba(42, 132, 192, .18);
  font-size: 10px;
  white-space: nowrap;
}
.more-mega-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.more-mega-section {
  padding: 14px;
  border: 1px solid rgba(104, 174, 215, .18);
  border-radius: 14px;
  background: rgba(8, 28, 41, .5);
}
.more-mega-section h3 {
  margin-bottom: 10px;
  font-size: 13px;
  color: #88cfff;
}
.more-mega-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
@media (max-width: 900px) {
  .top-nav-flyout--procurement,
  .top-nav-flyout--more {
    width: auto;
  }
  .procurement-mega,
  .more-mega-sections {
    grid-template-columns: 1fr;
  }
  .procurement-roadmap,
  .more-mega-links {
    grid-template-columns: 1fr;
  }
}


/* V191 — approved reference enterprise shell */
.topbar-reference-v191 {
  min-height: 76px !important;
  height: 76px !important;
  padding-inline: 24px !important;
  background: linear-gradient(90deg, #082746 0%, #0a345b 100%) !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
.enterprise-brand-v191 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  direction: ltr;
}
.enterprise-brand-mark-v191 {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #f4c34d, #d99713);
  color: #082746;
  font-weight: 1000;
  letter-spacing: -.5px;
}
.enterprise-brand-v191 > span:last-child { display: grid; gap: 1px; }
.enterprise-brand-v191 strong { font-size: 20px; color: #fff; line-height: 1; }
.enterprise-brand-v191 small { font-size: 10px; color: #bed4e7; }
.top-navigation-v191 {
  top: 76px;
  min-height: 74px;
  padding: 8px 22px;
  background: #082842;
  border-bottom-color: rgba(138,194,231,.15);
  box-shadow: 0 8px 18px rgba(5,30,52,.14);
}
.top-navigation-v191 .top-nav-primary {
  gap: 12px;
  overflow-x: visible;
}
.top-navigation-v191 .top-nav-home-button,
.top-navigation-v191 .top-nav-group-button {
  min-height: 50px;
  padding-inline: 18px;
  border-radius: 11px;
  font-size: 13px;
}
.top-navigation-v191 .top-nav-home-button.active,
.top-navigation-v191 .top-nav-group-button.active,
.top-navigation-v191 .top-nav-group-button.expanded {
  background: linear-gradient(180deg,#17659a,#11527f);
  border-color: #2d83b8;
  box-shadow: inset 0 -3px 0 #3ec1ff, 0 8px 20px rgba(3,37,64,.22);
}
.top-navigation-v191 .top-nav-current-context { display: none; }
.reference-mega-v191 {
  background: #ffffff;
  color: #14314e;
  border-radius: 16px;
  border: 1px solid #d9e6f0;
  box-shadow: 0 22px 60px rgba(13,48,76,.2);
  padding: 22px;
}
.top-nav-flyout--procurement {
  top: 154px;
  right: 13%;
  width: min(980px, calc(100vw - 54px));
}
.top-nav-flyout--procurement .top-nav-flyout-header { color: #173a5d; }
.top-nav-flyout--procurement .top-nav-flyout-header small { color: #6f879d; }
.top-nav-flyout--procurement .top-nav-flyout-header button {
  color: #47647e;
  background: #f0f5f9;
}
.reference-mega-v191 .procurement-mega-intro {
  background:
    radial-gradient(circle at 25% 85%, rgba(177,206,228,.22), transparent 34%),
    linear-gradient(160deg,#f8fbfe,#eef5fa);
  border-color: #dce7ef;
  color: #173a5d;
}
.reference-mega-v191 .procurement-mega-intro h3 { color:#163754; }
.reference-mega-v191 .procurement-mega-intro p { color:#6f879d; }
.reference-mega-v191 .procurement-mega-icon {
  background:#e6f1ff;
  color:#1678e8;
}
.reference-mega-v191 .procurement-live-links button,
.reference-mega-v191 .procurement-roadmap-card {
  background:#fff;
  border-color:#e4edf4;
  color:#183953;
}
.reference-mega-v191 .procurement-roadmap-card strong { color:#163754; }
.reference-mega-v191 .procurement-roadmap-card small { color:#71889d; }
.reference-mega-v191 .procurement-roadmap-card:nth-child(2n) .roadmap-icon { background:#e9f8ef; color:#13a15e; }
.reference-mega-v191 .procurement-roadmap-card:nth-child(3n) .roadmap-icon { background:#fff2e7; color:#f18824; }
.reference-mega-v191 .procurement-roadmap-card:nth-child(4n) .roadmap-icon { background:#f0e9ff; color:#7a48dd; }
.reference-mega-v191 .procurement-roadmap-card > b { background:#eaf4ff; color:#1479d4; }
@media (max-width: 900px) {
  .enterprise-brand-v191 { display:none; }
  .top-navigation-v191 { top:70px; }
  .top-nav-flyout--procurement { right:14px; }
}


/* V191.1 — reference surfaces are theme-invariant for browser consistency */
html[data-theme='dark'] .reference-mega-v191,
html[data-theme='light'] .reference-mega-v191,
.reference-mega-v191 {
  background: #ffffff !important;
  color: #14314e !important;
  border-color: #d9e6f0 !important;
}
html[data-theme='dark'] .reference-mega-v191 .procurement-mega-intro,
html[data-theme='light'] .reference-mega-v191 .procurement-mega-intro {
  background:
    radial-gradient(circle at 25% 85%, rgba(177,206,228,.22), transparent 34%),
    linear-gradient(160deg,#f8fbfe,#eef5fa) !important;
  border-color: #dce7ef !important;
  color: #173a5d !important;
}
html[data-theme='dark'] .reference-mega-v191 .procurement-live-links button,
html[data-theme='dark'] .reference-mega-v191 .procurement-roadmap-card,
html[data-theme='light'] .reference-mega-v191 .procurement-live-links button,
html[data-theme='light'] .reference-mega-v191 .procurement-roadmap-card {
  background: #ffffff !important;
  border-color: #e4edf4 !important;
  color: #183953 !important;
}
html[data-theme='dark'] .reference-mega-v191 .procurement-mega-intro h3,
html[data-theme='dark'] .reference-mega-v191 .procurement-roadmap-card strong,
html[data-theme='light'] .reference-mega-v191 .procurement-mega-intro h3,
html[data-theme='light'] .reference-mega-v191 .procurement-roadmap-card strong {
  color: #163754 !important;
}
html[data-theme='dark'] .reference-mega-v191 .procurement-mega-intro p,
html[data-theme='dark'] .reference-mega-v191 .procurement-roadmap-card small,
html[data-theme='light'] .reference-mega-v191 .procurement-mega-intro p,
html[data-theme='light'] .reference-mega-v191 .procurement-roadmap-card small {
  color: #71889d !important;
}


/* V191.2 — structural reference header: one clean global row + one module row */
.topbar-reference-v191 {
  display: grid !important;
  grid-template-columns: 220px minmax(320px, 520px) 1fr auto !important;
  grid-template-areas: "brand search spacer actions" !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 78px !important;
  height: 78px !important;
  overflow: visible !important;
}
.enterprise-brand-v191 { grid-area: brand; justify-self: start; }
.topbar-reference-v191 .topbar-search {
  grid-area: search;
  width: 100% !important;
  margin: 0 !important;
}
.topbar-reference-v191 .topbar-title { display: none !important; }
.topbar-actions-reference-v191 {
  grid-area: actions;
  display: flex !important;
  align-items: center;
  gap: 8px;
  justify-self: end;
  min-width: max-content;
}
.topbar-utility-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  color: #e6f1fa;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}
.topbar-utility-button:hover { background: rgba(255,255,255,.13); color:#fff; }
.topbar-utility-button svg { width:18px; height:18px; }
.topbar-reference-v191 .user-chip {
  min-height: 46px;
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.14) !important;
  color:#fff !important;
}
.topbar-reference-v191 .user-meta strong { color:#fff !important; }
.topbar-reference-v191 .user-meta b { color:#a9c5d9 !important; }
.top-navigation-v191 {
  top: 78px !important;
  min-height: 70px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 26px !important;
  overflow: visible !important;
}
.top-navigation-v191 .top-nav-primary {
  flex: 0 1 auto !important;
  width: min(1180px, 100%) !important;
  justify-content: center !important;
  gap: 12px !important;
  overflow: visible !important;
}
.top-navigation-v191 .top-nav-home-button,
.top-navigation-v191 .top-nav-group-button {
  min-width: 120px;
  min-height: 50px;
}
.top-nav-flyout--procurement {
  top: 156px !important;
  right: 50% !important;
  transform: translateX(50%) !important;
  width: min(950px, calc(100vw - 72px)) !important;
  max-height: min(520px, calc(100vh - 178px)) !important;
  overflow:auto !important;
}
html[data-theme='dark'] .top-nav-flyout--procurement,
html[data-theme='light'] .top-nav-flyout--procurement,
.top-nav-flyout--procurement {
  background:#fff !important;
  color:#173a5d !important;
  border-color:#d9e6f0 !important;
}
@media(max-width:1100px){
  .topbar-reference-v191{
    grid-template-columns:170px minmax(240px,1fr) auto !important;
    grid-template-areas:"brand search actions" !important;
  }
  .top-navigation-v191 .top-nav-home-button,
  .top-navigation-v191 .top-nav-group-button { min-width:auto; padding-inline:12px; }
}
@media(max-width:900px){
  .topbar-reference-v191{display:flex !important;height:60px !important;min-height:60px !important;}
  .topbar-reference-v191 .enterprise-brand-v191{display:none !important;}
  .topbar-reference-v191 .topbar-search{flex:1;}
  .top-navigation-v191{top:60px !important;}
}


/* V191.4 — final enterprise account / avatar / quick-create pass */
.account-menu-v191 { position: relative; }
.user-chip-profile-v191 { cursor:pointer; padding-inline:7px 10px !important; gap:9px !important; }
.user-avatar-photo-v191 {
  width:40px !important; height:40px !important; padding:0 !important; overflow:hidden;
  border:2px solid rgba(255,255,255,.28); border-radius:50% !important; background:#dbe8f3 !important;
}
.user-avatar-photo-v191 img { width:100%; height:100%; object-fit:cover; display:block; }
.user-avatar-photo-v191 > span { width:100%; height:100%; display:grid; place-items:center; color:#0b456f; font-weight:900; }
.account-chevron-v191 { width:15px !important; height:15px !important; opacity:.7; }
.account-dropdown-v191 {
  position:absolute; z-index:120; top:calc(100% + 10px); left:0; width:285px; padding:10px;
  border:1px solid #dbe7f0; border-radius:14px; background:#fff; color:#173a5d;
  box-shadow:0 20px 55px rgba(5,34,57,.22); direction:rtl;
}
.account-dropdown-head-v191 { display:flex; align-items:center; gap:10px; padding:8px 7px 12px; border-bottom:1px solid #e9f0f5; }
.account-dropdown-head-v191 > span:last-child { display:grid; gap:2px; text-align:right; }
.account-dropdown-head-v191 strong { color:#173a5d; }
.account-dropdown-head-v191 small { color:#7a90a4; }
.account-dropdown-v191 > button {
  width:100%; min-height:42px; display:flex; align-items:center; gap:9px; margin-top:4px; padding:8px 9px;
  border:0; border-radius:9px; background:transparent; color:#294c69; font:inherit; text-align:right; cursor:pointer;
}
.account-dropdown-v191 > button:hover { background:#f1f7fb; color:#116fae; }
.account-dropdown-v191 > button svg { width:17px; height:17px; }
.account-dropdown-v191 .account-logout-v191 { color:#c33c48; border-top:1px solid #edf2f6; border-radius:0 0 9px 9px; }
.global-create-v191 {
  width:46px; min-width:46px; height:46px; display:grid; place-items:center; align-self:center;
  border:1px solid #2e83b7; border-radius:12px; color:#fff; background:linear-gradient(180deg,#2387c3,#126295);
  box-shadow:0 7px 18px rgba(8,83,130,.2); cursor:pointer;
}
.global-create-v191:hover { transform:translateY(-1px); background:linear-gradient(180deg,#2b96d6,#176fa7); }
.global-create-v191 svg { width:20px; height:20px; }
@media(max-width:900px){
  .topbar-reference-v191 .user-meta,.account-chevron-v191{display:none}
  .account-dropdown-v191{position:fixed;top:66px;left:10px;right:10px;width:auto}
  .global-create-v191{width:100%;height:44px}
}


/* V191.5 — quick create + persistent favorites polish */
.quick-create-wrap-v191 { position:relative; display:flex; align-items:center; }
.quick-create-menu-v191 {
  position:absolute; z-index:125; top:calc(100% + 10px); inset-inline-end:0; width:260px; padding:10px;
  border:1px solid #dce7ef; border-radius:14px; background:#fff; color:#173a5d;
  box-shadow:0 18px 48px rgba(5,34,57,.2); direction:rtl;
}
.quick-create-menu-v191 header {
  display:grid; gap:2px; padding:7px 8px 10px; border-bottom:1px solid #edf2f6;
}
.quick-create-menu-v191 header strong { color:#173a5d; font-size:14px; }
.quick-create-menu-v191 header small { color:#7a90a4; font-size:11px; }
.quick-create-menu-v191 > button {
  width:100%; min-height:42px; display:flex; align-items:center; gap:9px; margin-top:4px; padding:8px 9px;
  border:0; border-radius:9px; background:transparent; color:#294c69; font:inherit; text-align:right; cursor:pointer;
}
.quick-create-menu-v191 > button:hover { background:#f1f7fb; color:#116fae; }
.quick-create-menu-v191 > button svg { width:17px; height:17px; }
.account-favorites-v191 {
  margin:7px 0; padding:8px; border:1px solid #e7eef4; border-radius:10px; background:#f8fbfd;
}
.account-favorites-v191 > small { display:block; margin-bottom:5px; color:#7a90a4; font-size:10px; }
.account-favorites-v191 > button {
  width:100%; min-height:34px; display:flex; align-items:center; gap:8px; padding:6px 7px;
  border:0; border-radius:8px; background:transparent; color:#31536d; font:inherit; text-align:right; cursor:pointer;
}
.account-favorites-v191 > button:hover { background:#edf5fa; color:#126da7; }
.account-favorites-v191 > button svg { width:15px; height:15px; }
html[data-theme='dark'] .quick-create-menu-v191,
html[data-theme='dark'] .account-dropdown-v191 {
  background:#fff !important; color:#173a5d !important; border-color:#dce7ef !important;
}
@media(max-width:900px){
  .quick-create-menu-v191{position:fixed;top:122px;left:10px;right:10px;width:auto}
}

/* PR134 — procurement mega cards are real workflow actions, not decorative tiles. */
.procurement-roadmap-action {
  width: 100%;
  margin: 0;
  font: inherit;
  text-align: start;
  cursor: pointer;
  appearance: none;
}
.procurement-roadmap-action:hover,
.procurement-roadmap-action:focus-visible {
  border-color: rgba(45, 131, 184, .72);
  box-shadow: 0 8px 22px rgba(12, 66, 103, .12);
  transform: translateY(-1px);
  outline: none;
}
.reference-mega-v191 .procurement-roadmap-action:hover,
.reference-mega-v191 .procurement-roadmap-action:focus-visible {
  background: #f7fbff;
  border-color: #8fc9ee;
}
.procurement-roadmap-action:active {
  transform: translateY(0);
}

/* ===== END SOURCE 12/17 ===== */


/* ===== V194 SOURCE 13/17: frontend-src/src/styles/project-intelligence-hub-v1906.css ===== */
.project-intelligence-hub{margin-top:16px;padding:24px;border:1px solid #315c7d;border-radius:18px;background:linear-gradient(145deg,#122c40,#0d202f);color:#e7f3ff}.project-intelligence-hub__header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:18px;border-bottom:1px solid rgba(124,181,221,.24)}.project-intelligence-hub__header h3{margin:6px 0;font-size:1.25rem}.project-intelligence-hub__header p{margin:0;color:#b7c9d8}.project-intelligence-eyebrow{display:inline-flex;align-items:center;gap:7px;color:#75caff;font-size:.78rem;font-weight:800;letter-spacing:.02em}.project-intelligence-eyebrow svg{width:16px;height:16px}.project-intelligence-hub__metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.project-intelligence-hub__metrics article{min-height:130px;padding:16px;border:1px solid rgba(108,164,202,.38);border-radius:14px;background:rgba(7,23,35,.45);display:flex;flex-direction:column;gap:5px}.project-intelligence-hub__metrics svg{width:21px;height:21px;color:#6dc5ff}.project-intelligence-hub__metrics span{color:#c0d1de;font-size:.86rem}.project-intelligence-hub__metrics strong{font-size:1.7rem;line-height:1.15;color:#fff}.project-intelligence-hub__metrics small{color:#91aabd}.project-intelligence-hub__notice{display:flex;gap:12px;align-items:center;margin-top:18px;padding:14px 16px;border-radius:12px}.project-intelligence-hub__notice svg{width:23px;height:23px;flex:0 0 auto}.project-intelligence-hub__notice div{display:grid;gap:3px}.project-intelligence-hub__notice span{color:#c4d3de;font-size:.88rem}.project-intelligence-hub__notice.is-attention{border:1px solid rgba(242,177,64,.45);background:rgba(135,88,7,.17)}.project-intelligence-hub__notice.is-attention svg{color:#f3b745}.project-intelligence-hub__notice.is-clear{border:1px solid rgba(54,200,148,.36);background:rgba(13,111,77,.16)}.project-intelligence-hub__notice.is-clear svg{color:#5ee8b0}.project-intelligence-hub footer{margin-top:15px;color:#a7c0d1;font-size:.86rem}@media(max-width:900px){.project-intelligence-hub__metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.project-intelligence-hub__header{flex-direction:column}}@media(max-width:560px){.project-intelligence-hub{padding:16px}.project-intelligence-hub__metrics{grid-template-columns:1fr}}
/* ===== END SOURCE 13/17 ===== */


/* ===== V194 SOURCE 14/17: frontend-src/src/styles/enterprise-ui-v191.css ===== */
/* BEG Enterprise UI V191 — shared design tokens */
:root {
  --beg-navy-950: #061b2c;
  --beg-navy-900: #082842;
  --beg-navy-800: #0b3559;
  --beg-blue-600: #1579d6;
  --beg-blue-500: #2689ef;
  --beg-gold-500: #d99a16;
  --beg-surface: #ffffff;
  --beg-surface-soft: #f5f8fc;
  --beg-border: #dfe8f1;
  --beg-text: #173a5d;
  --beg-muted: #7188a3;
  --beg-success: #20aa69;
  --beg-warning: #ef9a2e;
  --beg-danger: #dc4050;
  --beg-radius-sm: 9px;
  --beg-radius-md: 14px;
  --beg-radius-lg: 16px;
  --beg-shadow-sm: 0 5px 18px rgba(19,63,101,.055);
  --beg-shadow-lg: 0 20px 55px rgba(5,34,57,.22);
}
.v1905-shell,
.top-nav-flyout {
  --beg-focus-ring: 0 0 0 3px rgba(21,121,214,.2);
}
.v1905-shell button:focus-visible,
.top-nav-flyout button:focus-visible {
  outline: none;
  box-shadow: var(--beg-focus-ring);
}
@media (prefers-reduced-motion: reduce) {
  .v1905-shell *,
  .top-nav-flyout * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* V191.6 — final visual lock and avatar upload */
html[data-theme='dark'] .v1905-shell .content,
html[data-theme='light'] .v1905-shell .content,
.v1905-shell .content {
  background: var(--beg-surface-soft) !important;
}
html[data-theme='dark'] .dashboard-reference-v191,
html[data-theme='light'] .dashboard-reference-v191,
.dashboard-reference-v191 {
  color: var(--beg-text) !important;
}
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-hero,
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v191-hero,
html[data-theme='light'] .dashboard-reference-v191 .kpi-card,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-panel,
html[data-theme='light'] .dashboard-reference-v191 .dashboard-v191-activity-rail {
  background: var(--beg-surface) !important;
  color: var(--beg-text) !important;
  border-color: var(--beg-border) !important;
}
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-welcome h2,
html[data-theme='dark'] .dashboard-reference-v191 .kpi-card strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick strong,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail strong {
  color: var(--beg-text) !important;
}
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-welcome p,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-panel small,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v1905-quick small,
html[data-theme='dark'] .dashboard-reference-v191 .dashboard-v191-activity-rail small {
  color: var(--beg-muted) !important;
}
html[data-theme='dark'] .top-nav-flyout--procurement,
html[data-theme='light'] .top-nav-flyout--procurement,
.top-nav-flyout--procurement {
  background: #fff !important;
  color: var(--beg-text) !important;
}
.avatar-file-input-v191 { display:none !important; }
.avatar-error-v191 {
  margin:6px 8px 2px; padding:7px 9px; border-radius:8px;
  background:#fff0f1; color:#b93643; font-size:11px; line-height:1.5;
}
.account-dropdown-v191 button:disabled { opacity:.65; cursor:wait; }


/* V191.7 — final dashboard polish: fixed light workspace, compact hero, clearer right rail. */
html[data-theme='dark'] .v1905-shell .content:has(.dashboard-reference-v191),
html[data-theme='light'] .v1905-shell .content:has(.dashboard-reference-v191),
.v1905-shell .content:has(.dashboard-reference-v191) { background:#f5f8fc !important; }
html[data-theme='dark'] .dashboard-reference-v191,
html[data-theme='light'] .dashboard-reference-v191,
.dashboard-reference-v191 { background:transparent !important; color:var(--beg-text) !important; }
.dashboard-reference-v191 .dashboard-v191-hero {
  min-height:128px !important; padding:22px 28px !important;
  border:1px solid var(--beg-border) !important; border-radius:var(--beg-radius-lg) !important;
  box-shadow:var(--beg-shadow-sm) !important;
  background:linear-gradient(90deg,rgba(255,255,255,.98),rgba(247,251,255,.96)) !important;
}
.dashboard-reference-v191 .dashboard-v191-hero h2 { color:var(--beg-text) !important; font-size:clamp(24px,2vw,32px) !important; }
.dashboard-reference-v191 .dashboard-v191-hero p { color:var(--beg-muted) !important; }
.dashboard-reference-v191 .dashboard-v1905-context button,
.dashboard-reference-v191 .dashboard-v1905-context span { background:#fff !important; color:#496783 !important; border-color:var(--beg-border) !important; }
.dashboard-reference-v191 .kpi-card,
.dashboard-reference-v191 .dashboard-panel,
.dashboard-reference-v191 .dashboard-v1905-quick,
.dashboard-reference-v191 .dashboard-v191-activity-rail { background:#fff !important; color:var(--beg-text) !important; border-color:var(--beg-border) !important; box-shadow:var(--beg-shadow-sm) !important; }
.dashboard-reference-v191 .operations-panel > button,
.dashboard-reference-v191 .alerts-panel > button { background:#fff !important; color:var(--beg-text) !important; border-color:#edf2f7 !important; }
.dashboard-reference-v191 .dashboard-v191-sidebar { gap:14px !important; }
.dashboard-reference-v191 .dashboard-v1905-quick,
.dashboard-reference-v191 .dashboard-v191-activity-rail { border-radius:var(--beg-radius-md) !important; padding:16px !important; }
.dashboard-reference-v191 .dashboard-v1905-quick { border-top:3px solid var(--beg-blue-500) !important; }
.dashboard-reference-v191 .dashboard-v191-activity-rail { border-top:3px solid var(--beg-gold-500) !important; }
.dashboard-reference-v191 .dashboard-v1905-quick header,
.dashboard-reference-v191 .dashboard-v191-activity-rail header { padding-bottom:10px !important; margin-bottom:10px !important; border-bottom:1px solid #edf2f7 !important; }
@media (max-width:820px) { .dashboard-reference-v191 .dashboard-v191-hero { min-height:auto !important; padding:18px !important; } }


/* V191.8 — Operations Center visual alignment */
html[data-theme='dark'] .v1905-shell .content:has(.operations-reference-v191),
html[data-theme='light'] .v1905-shell .content:has(.operations-reference-v191),
.v1905-shell .content:has(.operations-reference-v191) {
  background:#f5f8fc !important;
}
.operations-reference-v191 {
  color:var(--beg-text) !important;
}
.operations-reference-v191 .page-head,
.operations-reference-v191 .kpi-card,
.operations-reference-v191 .panel-card {
  background:#fff !important;
  color:var(--beg-text) !important;
  border:1px solid var(--beg-border) !important;
  box-shadow:var(--beg-shadow-sm) !important;
}
.operations-reference-v191 .page-head {
  border-radius:var(--beg-radius-lg);
  padding:18px 20px;
}
.operations-reference-v191 .page-head p,
.operations-reference-v191 .kpi-card > span,
.operations-reference-v191 .muted {
  color:var(--beg-muted) !important;
}
.operations-reference-v191 .kpi-icon {
  background:#edf6ff !important;
  color:var(--beg-blue-600) !important;
}
.operations-reference-v191 .panel-card {
  border-radius:var(--beg-radius-md) !important;
}
.operations-reference-v191 .ops-list article {
  background:#fff !important;
  color:var(--beg-text) !important;
  border-color:#edf2f7 !important;
}


/* V191.9 — final locked enterprise presentation + managed hero/profile media */
.account-dropdown-v191 .account-photo-remove-v191 {
  color:#c74451;
}
.account-dropdown-v191 .account-photo-remove-v191:disabled {
  color:#9aaab7;
}
.dashboard-hero-file-v191 { display:none !important; }

/* Force the approved light business workspace regardless of the global shell theme. */
html[data-theme='dark'] body .v1905-shell main .content:has(.dashboard-reference-v191),
html[data-theme='light'] body .v1905-shell main .content:has(.dashboard-reference-v191),
body .v1905-shell main .content:has(.dashboard-reference-v191),
html[data-theme='dark'] body .v1905-shell main .content:has(.operations-reference-v191),
html[data-theme='light'] body .v1905-shell main .content:has(.operations-reference-v191),
body .v1905-shell main .content:has(.operations-reference-v191) {
  background:#f4f8fc !important;
  color:var(--beg-text) !important;
}

html[data-theme='dark'] body .dashboard-reference-v191 .kpi-card,
html[data-theme='dark'] body .dashboard-reference-v191 .dashboard-panel,
html[data-theme='dark'] body .dashboard-reference-v191 .dashboard-v1905-quick,
html[data-theme='dark'] body .dashboard-reference-v191 .dashboard-v191-activity-rail,
html[data-theme='dark'] body .operations-reference-v191 .kpi-card,
html[data-theme='dark'] body .operations-reference-v191 .panel-card,
html[data-theme='dark'] body .operations-reference-v191 .page-head {
  background:#fff !important;
  color:var(--beg-text) !important;
  border-color:var(--beg-border) !important;
}

/* Reference hero: navy panel, image on the physical left, copy on the right. */
.dashboard-reference-v191 .dashboard-v191-hero {
  position:relative !important;
  min-height:168px !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-columns:minmax(280px, .75fr) minmax(360px, 1.25fr) !important;
  grid-template-areas:"media copy" !important;
  align-items:stretch !important;
  gap:0 !important;
  padding:0 !important;
  border:1px solid #1f5579 !important;
  border-radius:18px !important;
  background:#082b49 !important;
  box-shadow:0 12px 30px rgba(10,48,78,.14) !important;
  color:#fff !important;
  direction:ltr !important;
}
.dashboard-reference-v191 .dashboard-hero-media-v191 {
  grid-area:media;
  position:relative;
  min-height:168px;
  overflow:hidden;
  background:
    radial-gradient(circle at 30% 45%, rgba(51,139,198,.22), transparent 35%),
    linear-gradient(145deg,#102f49,#061c31 75%);
}
.dashboard-reference-v191 .dashboard-hero-media-v191::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,transparent 0%,rgba(8,43,73,.08) 50%,#082b49 100%);
  pointer-events:none;
}
.dashboard-reference-v191 .dashboard-hero-media-v191 img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
.dashboard-reference-v191 .dashboard-hero-city-v191 {
  position:absolute;
  inset:auto 8% 0 8%;
  height:78%;
  display:flex;
  gap:10px;
  align-items:flex-end;
  opacity:.34;
}
.dashboard-reference-v191 .dashboard-hero-city-v191 i {
  flex:1;
  max-width:48px;
  min-width:24px;
  border-radius:3px 3px 0 0;
  background:linear-gradient(180deg,#355871,#15334b);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.dashboard-reference-v191 .dashboard-hero-city-v191 i:nth-child(1){height:45%}
.dashboard-reference-v191 .dashboard-hero-city-v191 i:nth-child(2){height:80%}
.dashboard-reference-v191 .dashboard-hero-city-v191 i:nth-child(3){height:58%}
.dashboard-reference-v191 .dashboard-hero-city-v191 i:nth-child(4){height:92%}
.dashboard-reference-v191 .dashboard-hero-city-v191 i:nth-child(5){height:64%}

.dashboard-reference-v191 .dashboard-hero-copy-v191 {
  grid-area:copy;
  position:relative;
  z-index:2;
  direction:rtl;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  padding:26px 34px 28px 26px;
  color:#fff;
}
.dashboard-reference-v191 .dashboard-hero-kicker-v191 {
  font-size:16px;
  font-weight:700;
  color:#d9e9f6;
  margin-bottom:2px;
}
.dashboard-reference-v191 .dashboard-hero-copy-v191 h2 {
  margin:0 !important;
  font-size:clamp(28px,2.2vw,38px) !important;
  line-height:1.15 !important;
  color:#fff !important;
  letter-spacing:-.4px;
}
.dashboard-reference-v191 .dashboard-hero-copy-v191 p {
  margin:8px 0 0 !important;
  color:#d1e2ef !important;
  font-size:15px !important;
}
.dashboard-reference-v191 .dashboard-hero-accent-v191 {
  width:64px;
  height:4px;
  margin-top:18px;
  border-radius:99px;
  background:#f3b436;
}
.dashboard-reference-v191 .dashboard-v1905-context {
  position:absolute;
  z-index:4;
  inset-inline-start:18px;
  bottom:16px;
  direction:rtl;
}
.dashboard-reference-v191 .dashboard-v1905-context button,
.dashboard-reference-v191 .dashboard-v1905-context span {
  background:rgba(5,28,46,.72) !important;
  color:#dcebf5 !important;
  border-color:rgba(182,218,240,.25) !important;
  backdrop-filter:blur(8px);
}
.dashboard-reference-v191 .dashboard-hero-actions-v191 {
  position:absolute;
  z-index:5;
  inset-inline-start:16px;
  top:14px;
  display:flex;
  gap:7px;
  direction:rtl;
}
.dashboard-reference-v191 .dashboard-hero-actions-v191 button {
  min-height:34px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:9px;
  padding:7px 10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:rgba(4,28,47,.75);
  color:#fff;
  cursor:pointer;
  font-size:11px;
  font-weight:800;
  backdrop-filter:blur(8px);
}
.dashboard-reference-v191 .dashboard-hero-actions-v191 button:hover { background:rgba(17,91,139,.88); }
.dashboard-reference-v191 .dashboard-hero-actions-v191 button.danger:hover { background:rgba(155,37,49,.9); }
.dashboard-reference-v191 .dashboard-hero-actions-v191 button:disabled { opacity:.55; cursor:wait; }
.dashboard-reference-v191 .dashboard-hero-actions-v191 svg { width:15px; height:15px; }
.dashboard-reference-v191 .dashboard-hero-error-v191 {
  position:absolute;
  z-index:6;
  inset-inline-end:24px;
  bottom:12px;
  max-width:320px;
  padding:7px 10px;
  border-radius:8px;
  background:rgba(128,22,36,.9);
  color:#fff;
  font-size:11px;
}

/* Final card density and clearer right rail. */
.dashboard-reference-v191 .dashboard-v1905-kpis .kpi-card {
  min-height:104px !important;
}
.dashboard-reference-v191 .dashboard-v191-sidebar {
  gap:16px !important;
}
.dashboard-reference-v191 .dashboard-v1905-quick {
  border-top:3px solid var(--beg-blue-500) !important;
}
.dashboard-reference-v191 .dashboard-v191-activity-rail {
  border-top:3px solid var(--beg-gold-500) !important;
}
.dashboard-reference-v191 .dashboard-v1905-quick,
.dashboard-reference-v191 .dashboard-v191-activity-rail {
  background:#fff !important;
  box-shadow:0 7px 22px rgba(18,63,101,.065) !important;
}
.dashboard-reference-v191 .dashboard-panel header,
.dashboard-reference-v191 .dashboard-v1905-quick header,
.dashboard-reference-v191 .dashboard-v191-activity-rail header {
  border-bottom:1px solid #edf2f7;
  padding-bottom:9px;
}

/* Operations Center follows the same light business workspace. */
html[data-theme='dark'] body .operations-reference-v191 .ops-list article {
  background:#fff !important;
  color:var(--beg-text) !important;
  border-color:#edf2f7 !important;
}
html[data-theme='dark'] body .operations-reference-v191 .secondary-btn {
  background:#fff !important;
  color:var(--beg-text) !important;
  border-color:var(--beg-border) !important;
}

@media (max-width:900px) {
  .dashboard-reference-v191 .dashboard-v191-hero {
    grid-template-columns:1fr !important;
    grid-template-areas:"copy" !important;
    min-height:176px !important;
  }
  .dashboard-reference-v191 .dashboard-hero-media-v191 {
    position:absolute;
    inset:0;
    opacity:.48;
  }
  .dashboard-reference-v191 .dashboard-hero-copy-v191 {
    padding:24px 20px 60px;
  }
  .dashboard-reference-v191 .dashboard-v1905-context {
    inset-inline-start:14px;
    bottom:12px;
  }
  .dashboard-reference-v191 .dashboard-hero-actions-v191 {
    inset-inline-start:12px;
    top:10px;
  }
}

/* ===== END SOURCE 14/17 ===== */


/* ===== V194 SOURCE 15/17: frontend-src/src/styles/procurement-p2.css ===== */
.procurement-rfq-workspace {
  display: grid;
  gap: 14px;
}
.procurement-rfq-workspace .mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.procurement-rfq-workspace .mini-kpis > div {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line, #dbe5ef);
  border-radius: 14px;
  background: var(--card, #fff);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.procurement-rfq-workspace .mini-kpis span {
  color: var(--muted, #6b7f91);
  font-size: 12px;
}
.procurement-rfq-workspace .mini-kpis b {
  font-size: 24px;
}
.procurement-rfq-create,
.procurement-rfq-detail {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 54px);
  overflow: auto;
}
.procurement-rfq-create > label {
  display: grid;
  gap: 7px;
}
.procurement-rfq-create select {
  min-height: 42px;
}
.procurement-supplier-picker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.procurement-supplier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}
.procurement-supplier-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line, #dbe5ef);
  border-radius: 12px;
  cursor: pointer;
}
.procurement-supplier-grid label.selected {
  border-color: #2689ef;
  background: rgba(38, 137, 239, .08);
}
.procurement-supplier-grid label > span {
  display: grid;
  gap: 2px;
}
.procurement-supplier-grid small {
  color: var(--muted, #6b7f91);
}
.procurement-invited-suppliers {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.procurement-invited-suppliers > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #dbe5ef);
  border-radius: 10px;
}
.procurement-invited-suppliers > div > span:first-child {
  display: grid;
  gap: 2px;
}
.procurement-invited-suppliers small {
  color: var(--muted, #6b7f91);
}
@media (max-width: 820px) {
  .procurement-rfq-workspace .mini-kpis,
  .procurement-supplier-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .procurement-rfq-workspace .mini-kpis,
  .procurement-supplier-grid {
    grid-template-columns: 1fr;
  }
}

.procurement-quote-entry,.procurement-quote-comparison{display:grid;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line,#dbe5ef)}
.procurement-quote-price-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.procurement-quote-price-grid label{display:grid;gap:6px;padding:10px 12px;border:1px solid var(--line,#dbe5ef);border-radius:10px;background:var(--card,#fff)}
.procurement-quote-price-grid label span{font-size:12px;color:var(--muted,#6b7f91)}
.procurement-quote-price-grid input{min-height:38px}
.primary.compact{min-height:32px;padding:6px 10px;font-size:12px}
@media(max-width:700px){.procurement-quote-price-grid{grid-template-columns:1fr}}


/* V194.1 — legacy RFQ create/reference/list rules removed.
 * Canonical RFQ theme and create/list ownership live in SOURCE 17 only.
 */

/* V193 RFQ REFERENCE REPLICA — acceptance image structure */
.rfq-replica-workspace{
  display:grid;gap:12px;min-width:0;color:#102a43;
  font-variant-numeric:lining-nums tabular-nums;
}
.rfq-replica-breadcrumb{display:flex;align-items:center;gap:7px;color:#71869a;font-size:11px;padding:0 2px}
.rfq-replica-breadcrumb button{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:#55718c;padding:0;cursor:pointer}
.rfq-replica-breadcrumb svg{width:14px;height:14px}
.rfq-replica-header{
  display:grid;grid-template-columns:minmax(330px,1.35fr) minmax(520px,1.65fr) auto;
  align-items:center;gap:14px;padding:14px 16px;border:1px solid #dfe8f1;border-radius:13px;
  background:#fff;box-shadow:0 7px 22px rgba(15,42,67,.06)
}
.rfq-replica-title{display:flex;align-items:center;gap:12px;min-width:0}
.rfq-replica-doc-icon{width:52px;height:52px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#3fb2ff,#1380e8);color:#fff;box-shadow:0 5px 12px rgba(22,119,232,.18)}
.rfq-replica-doc-icon svg{width:26px;height:26px}
.rfq-replica-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rfq-replica-title-line h1{margin:0;font-size:24px;line-height:1;color:#102a43}
.rfq-replica-title p{margin:6px 0 0;font-size:12px;color:#687f95}
.rfq-replica-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center}
.rfq-replica-meta>div{display:grid;grid-template-columns:18px 1fr;grid-template-areas:"icon label" ". value";gap:2px 8px;padding:0 18px;border-inline-start:1px solid #dbe5ee}
.rfq-replica-meta>div:first-child{border-inline-start:0}
.rfq-replica-meta svg{grid-area:icon;width:15px;height:15px;color:#6e86a0}
.rfq-replica-meta span{grid-area:label;font-size:11px;color:#7a8fa3}
.rfq-replica-meta b{grid-area:value;font-size:12px;color:#173a58;font-weight:700}
.rfq-replica-head-actions{display:flex;align-items:center;gap:8px}
.rfq-replica-head-actions .secondary-btn{min-height:42px;padding:0 14px;border-radius:9px;background:#fff;color:#31516f;border:1px solid #d2deea}
.rfq-more-btn,.rfq-row-more{width:34px;height:34px;display:grid;place-items:center;border:0;background:transparent;color:#1f3c57;border-radius:8px}
.rfq-more-btn svg,.rfq-row-more svg{width:18px;height:18px}

.rfq-replica-steps{
  display:grid;grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items:start;gap:8px;padding:12px 28px 10px;background:transparent
}
.rfq-replica-steps>i{height:3px;margin-top:18px;background:#d7e1ea;border-radius:99px;min-width:36px}
.rfq-replica-steps>i.done{background:#1677e8}
.rfq-replica-step{display:grid;justify-items:center;gap:3px;min-width:90px;text-align:center}
.rfq-replica-step>span{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#aab8c6;color:#fff;font-weight:900;font-size:12px;box-shadow:0 0 0 4px #f5f8fb}
.rfq-replica-step.done>span,.rfq-replica-step.active>span{background:#1677e8}
.rfq-replica-step>span svg{width:17px;height:17px}
.rfq-replica-step b{font-size:11px;color:#526a82}
.rfq-replica-step.done b,.rfq-replica-step.active b{color:#126bca}
.rfq-replica-step small{font-size:10px;color:#7d8fa1;min-height:14px}

.rfq-replica-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.rfq-replica-kpis article{display:flex;align-items:center;gap:12px;min-height:82px;padding:13px 15px;border:1px solid #e2e9f0;border-radius:12px;background:#fff;box-shadow:0 3px 14px rgba(15,42,67,.035)}
.rfq-replica-kpis .icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;flex:0 0 auto}
.rfq-replica-kpis .icon svg{width:20px;height:20px}
.rfq-replica-kpis .icon.blue{background:#eaf4fd;color:#1677e8}
.rfq-replica-kpis .icon.green{background:#eaf8ef;color:#1e9f5d}
.rfq-replica-kpis .icon.orange{background:#fff4e4;color:#e59219}
.rfq-replica-kpis article>div{display:grid;gap:5px}
.rfq-replica-kpis article>div>span{font-size:11px;color:#74889b}
.rfq-replica-kpis article b{font-size:20px;color:#102a43}

.rfq-replica-award{margin:0}
.rfq-replica-tabs{
  display:flex;align-items:center;overflow:auto;border:1px solid #e1e9f1;border-radius:12px 12px 0 0;background:#fff;padding:0 10px
}
.rfq-replica-tabs button{
  display:inline-flex;align-items:center;gap:7px;min-height:46px;padding:0 18px;border:0;border-bottom:3px solid transparent;background:transparent;color:#5e7388;font-size:11px;font-weight:800;white-space:nowrap
}
.rfq-replica-tabs button svg{width:16px;height:16px}
.rfq-replica-tabs button.active{color:#1677e8;border-bottom-color:#1677e8}

.rfq-replica-content{display:grid;grid-template-columns:minmax(0,1fr) 315px;gap:14px;align-items:start}
.rfq-replica-main{min-width:0}
.rfq-replica-panel,.rfq-replica-info{border:1px solid #e1e9f1;border-radius:11px;background:#fff;overflow:hidden}
.rfq-replica-panel{padding:12px}
.rfq-replica-panel-toolbar{display:flex;justify-content:flex-start;padding:0 0 10px}
.rfq-replica-panel-toolbar .primary{min-height:38px;border-radius:8px;background:#1677e8;color:#fff}
.rfq-replica-panel-toolbar .primary:disabled{opacity:1;background:#1677e8;color:#fff;cursor:not-allowed}
.rfq-replica-table{margin:0;border:1px solid #dfe8f0;border-radius:9px;overflow:hidden;box-shadow:none}
.rfq-replica-table table{width:100%}
.rfq-replica-table th{background:#f0f6fb;color:#385874;font-size:11px;padding:9px 8px}
.rfq-replica-table td{color:#203f5d;font-size:11px;padding:10px 8px;vertical-align:middle}
.rfq-replica-item-cell{display:flex;align-items:center;gap:9px;min-width:180px}
.rfq-item-thumb{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;background:#edf4f9;color:#5b7892;flex:0 0 auto}
.rfq-item-thumb svg{width:18px;height:18px}
.rfq-replica-item-cell>div{display:grid;gap:2px}
.rfq-replica-item-cell b{font-size:11px;color:#193b59}
.rfq-replica-item-cell small{font-size:9px;color:#7d90a3}
.rfq-replica-summary{
  margin-top:10px;margin-inline-start:auto;width:min(470px,100%);display:grid;grid-template-columns:1fr auto;border:1px solid #dfe8f0;border-radius:8px;overflow:hidden;background:#fff
}
.rfq-replica-summary>*{padding:8px 12px;border-bottom:1px solid #edf2f6}
.rfq-replica-summary>*:nth-last-child(-n+2){border-bottom:0;background:#eaf4fd;color:#1169c8;font-size:15px}
.rfq-replica-summary span{font-size:11px;color:#657b90}
.rfq-replica-summary b{font-size:11px;color:#213f5b;text-align:left}
.rfq-replica-summary strong{text-align:left}
.rfq-replica-info{padding:14px}
.rfq-replica-info h3{margin:0 0 10px;padding:5px 0 12px;border-bottom:1px solid #e9eef3;text-align:center;font-size:15px;color:#153652}
.rfq-replica-info>div{display:grid;grid-template-columns:1fr auto;gap:12px;padding:11px 0;border-bottom:1px solid #edf2f6}
.rfq-replica-info>div:last-child{border-bottom:0}
.rfq-replica-info span{font-size:11px;color:#7d8fa1}
.rfq-replica-info b{font-size:11px;color:#1c3c59;max-width:170px;text-align:left}
.rfq-replica-supplier-list{display:grid;gap:8px}
.rfq-replica-supplier-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dfe7ee;border-radius:9px}
.rfq-replica-supplier-list article>div{display:flex;align-items:center;gap:9px}
.rfq-replica-supplier-list article>div>div{display:grid;gap:3px}
.rfq-replica-supplier-list small{font-size:10px;color:#7d90a2}
.rfq-replica-basic{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rfq-replica-basic>div{display:grid;gap:5px;padding:12px;border:1px solid #e3eaf1;border-radius:9px;background:#fbfdff}
.rfq-replica-basic .wide{grid-column:1/-1}
.rfq-replica-basic span{font-size:11px;color:#7d8fa1}
.rfq-replica-basic b{font-size:12px;color:#1c3b58}
.rfq-replica-empty{padding:28px;text-align:center;color:#7d90a2}
.rfq-replica-empty-panel{min-height:220px;display:grid;place-items:center;align-content:center;gap:8px;text-align:center;color:#75899b}
.rfq-replica-empty-panel>svg{width:28px;height:28px;color:#1677e8}
.rfq-replica-empty-panel b{color:#274a68}

.rfq-replica-footer{
  position:sticky;bottom:0;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border:1px solid #e0e8ef;border-radius:10px;background:rgba(255,255,255,.98);box-shadow:0 -5px 20px rgba(15,42,67,.05);backdrop-filter:blur(8px)
}
.rfq-replica-footer-left,.rfq-replica-footer-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rfq-replica-footer button{display:inline-flex;align-items:center;gap:7px;min-height:40px;border-radius:8px}
.rfq-replica-footer .danger-outline{border:1px solid #ff5757;background:#fff;color:#ef3333}
.rfq-replica-footer .secondary-btn{background:#f2f6fa;color:#31516f;border:1px solid #d7e2ec}
.rfq-replica-footer .primary{background:#0d73db;color:#fff;border-color:#0d73db}

/* V194.1: RFQ theme ownership moved to canonical SOURCE 17. */
@media(max-width:1280px){
  .rfq-replica-header{grid-template-columns:1fr auto}.rfq-replica-meta{grid-column:1/-1}
  .rfq-replica-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .rfq-replica-content{grid-template-columns:1fr}.rfq-replica-info{order:-1}
}
@media(max-width:900px){
  .rfq-replica-steps{overflow:auto;grid-template-columns:repeat(13,max-content)}
  .rfq-replica-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rfq-replica-header{grid-template-columns:1fr}
  .rfq-replica-meta{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:600px){
  .rfq-replica-kpis,.rfq-replica-basic{grid-template-columns:1fr}
  .rfq-replica-basic .wide{grid-column:auto}
  .rfq-replica-meta{grid-template-columns:1fr}
  .rfq-replica-meta>div{padding:8px 0;border-inline-start:0;border-bottom:1px solid #edf2f6}
  .rfq-replica-footer{align-items:stretch;flex-direction:column}
  .rfq-replica-footer-left,.rfq-replica-footer-right{width:100%}
  .rfq-replica-footer button{flex:1}
}

/* ===== END SOURCE 15/17 ===== */


/* ===== V194 SOURCE 16/17: frontend-src/src/styles/v192-enterprise-system.css ===== */
/* V192 Enterprise UI Foundation — approved system-wide visual reference */
:root{
  --v192-font:"Cairo","Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;
  --v192-canvas:#f4f7fb;--v192-surface:#fff;--v192-surface-soft:#f8fafc;
  --v192-chrome:#071f33;--v192-chrome-2:#0a2b47;--v192-primary:#1479d2;--v192-primary-strong:#0968bf;
  --v192-text:#102a43;--v192-muted:#6b7f93;--v192-border:#dce6ef;
  --v192-success:#159455;--v192-warning:#d98b16;--v192-danger:#dc3545;--v192-info:#1479d2;
  --v192-radius-sm:8px;--v192-radius-md:12px;--v192-radius-lg:16px;--v192-radius-xl:20px;
  --v192-shadow:0 12px 34px rgba(13,42,66,.08);--v192-control-h:44px;
}
html,body,#root{font-family:var(--v192-font);font-variant-numeric:lining-nums tabular-nums}
body{background:var(--v192-canvas)}
.v192-latin-digits,.money,.amount,.document-number,.reference-number,input[type="number"],input[type="date"],input[type="time"]{font-variant-numeric:lining-nums tabular-nums;direction:ltr;unicode-bidi:isolate}
.v192-workspace{background:var(--v192-canvas);color:var(--v192-text);min-height:100%}
.v192-document-header,.v192-panel,.v192-kpi-card{background:var(--v192-surface);border:1px solid var(--v192-border);box-shadow:var(--v192-shadow)}
.v192-document-header{border-radius:var(--v192-radius-lg);padding:18px 20px}
.v192-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.v192-kpi-card{border-radius:var(--v192-radius-lg);padding:16px;min-height:96px}
.v192-panel{border-radius:var(--v192-radius-lg)}
.v192-tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--v192-border);overflow:auto;scrollbar-width:thin}
.v192-tabs button{min-height:48px;padding:0 16px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--v192-muted);font-weight:800;white-space:nowrap}
.v192-tabs button.active{color:var(--v192-primary);border-bottom-color:var(--v192-primary)}
.v192-action-footer{position:sticky;bottom:0;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:rgba(255,255,255,.96);border-top:1px solid var(--v192-border);backdrop-filter:blur(10px)}
.v192-workspace input,.v192-workspace select,.v192-workspace textarea{border:1px solid var(--v192-border);border-radius:var(--v192-radius-md);background:var(--v192-surface);color:var(--v192-text);min-height:var(--v192-control-h)}
.v192-workspace input:focus,.v192-workspace select:focus,.v192-workspace textarea:focus{outline:0;border-color:var(--v192-primary);box-shadow:0 0 0 3px rgba(20,121,210,.12)}
.v192-status{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800}
.v192-status.success{background:#e9f8f0;color:var(--v192-success)}.v192-status.warning{background:#fff5e5;color:#a86508}.v192-status.danger{background:#fff0f1;color:var(--v192-danger)}.v192-status.info{background:#eaf4fd;color:var(--v192-info)}
.v192-table-wrap{overflow:auto;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface)}
.v192-table-wrap table{min-width:880px}.v192-table-wrap th{position:sticky;top:0;z-index:1;background:#f4f8fb;color:#496176;font-size:12px}.v192-table-wrap td{color:var(--v192-text)}
@media(max-width:1100px){.v192-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.v192-kpi-grid{grid-template-columns:1fr}.v192-document-header{padding:14px}.v192-action-footer{flex-wrap:wrap}.v192-action-footer>*{flex:1 1 auto}}


/* V192-B — unified commercial workspace */
.v192-commercial-module{display:grid;gap:16px;padding:0 0 24px;min-width:0}
.v192-page-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface);box-shadow:var(--v192-shadow)}
.v192-page-title{display:flex;align-items:center;gap:14px;min-width:0}
.v192-page-title>div{display:grid;gap:4px;min-width:0}
.v192-page-title h1{margin:0;font-size:22px;line-height:1.25;color:var(--v192-text)}
.v192-page-title p{margin:0;color:var(--v192-muted);font-size:13px;line-height:1.7}
.v192-flow-pill{display:inline-flex;align-items:center;min-height:32px;padding:6px 11px;border:1px solid #cfe2f4;border-radius:999px;background:#edf6ff;color:#246ea9;font-size:11px;font-weight:800;white-space:nowrap}
.v192-page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.v192-commercial-module>.v192-tabs{background:var(--v192-surface);border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);padding-inline:10px;box-shadow:0 5px 18px rgba(13,42,66,.04)}
.v192-commercial-module>.v192-tabs button{display:inline-flex;align-items:center;gap:7px}
.v192-commercial-module>.v192-tabs svg{width:17px;height:17px}
.v192-commercial-module .sub-head{padding:14px 16px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface)}
.v192-commercial-module .sub-head>div:first-child{display:grid;gap:3px}
.v192-commercial-module .sub-head b{color:var(--v192-text)}
.v192-commercial-module .sub-head span{color:var(--v192-muted);font-size:12px}
.v192-commercial-module .commercial-list-filters{display:grid;grid-template-columns:minmax(220px,1.6fr) minmax(150px,.7fr) minmax(150px,.7fr) minmax(150px,.7fr) auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface)}
.v192-commercial-module .commercial-list-filters input,.v192-commercial-module .commercial-list-filters select{width:100%;min-height:42px;border:1px solid var(--v192-border);border-radius:10px;background:var(--v192-surface);color:var(--v192-text);padding-inline:11px}
.v192-commercial-module .table-card{border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface);box-shadow:0 6px 18px rgba(13,42,66,.035);overflow:auto}
.v192-commercial-module table{font-variant-numeric:lining-nums tabular-nums}
.v192-commercial-module th{position:sticky;top:0;z-index:1;background:#f4f8fb;color:#4b6175;font-size:12px}
.v192-commercial-module td{color:var(--v192-text)}
.v192-status.neutral{background:#eef3f7;color:#617387}
.v192-status[data-status="draft"]{background:#eef3f7;color:#617387}
.v192-status[data-status="issued"],.v192-status[data-status="accepted"]{background:#e8f4ff;color:#146fae}
.v192-status[data-status="approved"],.v192-status[data-status="paid"],.v192-status[data-status="received"],.v192-status[data-status="completed"]{background:#e9f8f0;color:#14834d}
.v192-status[data-status="pending"],.v192-status[data-status="pending_approval"],.v192-status[data-status="partial_received"],.v192-status[data-status="unpaid"]{background:#fff5e5;color:#a86508}
.v192-status[data-status="cancelled"],.v192-status[data-status="overdue"]{background:#fff0f1;color:#c83845}
html[data-theme='dark'] .v192-page-header,
html[data-theme='dark'] .v192-commercial-module>.v192-tabs,
html[data-theme='dark'] .v192-commercial-module .sub-head,
html[data-theme='dark'] .v192-commercial-module .commercial-list-filters,
html[data-theme='dark'] .v192-commercial-module .table-card{background:var(--panel);border-color:var(--line)}
html[data-theme='dark'] .v192-page-title h1,
html[data-theme='dark'] .v192-commercial-module td,
html[data-theme='dark'] .v192-commercial-module .sub-head b{color:var(--text)}
html[data-theme='dark'] .v192-page-title p{color:var(--muted)}
html[data-theme='dark'] .v192-commercial-module th{background:var(--soft);color:var(--muted)}
@media(max-width:1100px){.v192-commercial-module .commercial-list-filters{grid-template-columns:1fr 1fr 1fr}.v192-commercial-module .commercial-list-filters>*:first-child{grid-column:1/-1}}
@media(max-width:760px){.v192-page-header,.v192-page-title{align-items:flex-start;flex-direction:column}.v192-flow-pill{white-space:normal}.v192-commercial-module .commercial-list-filters{grid-template-columns:1fr}.v192-commercial-module .commercial-list-filters>*:first-child{grid-column:auto}}


/* V192-B2 — commercial document/workflow unification */
.v192-commercial-list{display:grid;gap:14px;min-width:0}
.v192-commercial-list>.sub-head{margin:0}
.v192-commercial-list .mini-kpis,
.procurement-rfq-workspace .mini-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.v192-commercial-list .mini-kpis>div,
.procurement-rfq-workspace .mini-kpis>div{
  min-height:88px;padding:14px 16px;border:1px solid var(--v192-border);
  border-radius:var(--v192-radius-lg);background:var(--v192-surface);box-shadow:0 6px 18px rgba(13,42,66,.035)
}
.v192-commercial-list .mini-kpis span,
.procurement-rfq-workspace .mini-kpis span{color:var(--v192-muted);font-size:12px}
.v192-commercial-list .mini-kpis b,
.procurement-rfq-workspace .mini-kpis b{font-size:22px;color:var(--v192-text);font-variant-numeric:lining-nums tabular-nums}

.v192-document-workspace{
  display:grid;gap:14px;min-width:0;background:var(--v192-canvas);color:var(--v192-text);
  border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important
}
.v192-document-workspace .commercial-editor-topbar{
  position:relative!important;top:auto!important;z-index:4;display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:16px 18px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);
  background:var(--v192-surface);box-shadow:var(--v192-shadow)
}
.v192-document-workspace .editor-title-line{display:flex;align-items:center;gap:12px;min-width:0}
.v192-document-workspace .editor-title-line h1{margin:0;font-size:20px;color:var(--v192-text)}
.v192-document-workspace .editor-title-line small{color:var(--v192-muted);font-size:12px}
.v192-document-workspace .editor-doc-icon{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;
  background:#eaf4fd;color:var(--v192-primary)
}
.v192-document-workspace .editor-doc-icon svg{width:20px;height:20px}
.v192-document-workspace .editor-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.v192-document-workspace .commercial-meta-strip,
.v192-document-workspace .commercial-lines-card,
.v192-document-workspace .commercial-bottom-panels>article{
  border:1px solid var(--v192-border)!important;border-radius:var(--v192-radius-lg)!important;
  background:var(--v192-surface)!important;box-shadow:0 6px 18px rgba(13,42,66,.035)
}
.v192-document-workspace .commercial-meta-strip{padding:14px!important;gap:12px!important}
.v192-document-workspace .smart-field>span,
.v192-document-workspace label>span{font-size:11px;font-weight:800;color:#52697e}
.v192-document-workspace input,
.v192-document-workspace select,
.v192-document-workspace textarea{
  min-height:42px;border:1px solid var(--v192-border)!important;border-radius:10px!important;
  background:#fff!important;color:var(--v192-text)!important
}
.v192-document-workspace textarea{min-height:78px}
.v192-document-workspace .commercial-lines-toolbar{padding:12px 14px;border-bottom:1px solid var(--v192-border)}
.v192-document-workspace .quotation-line-card,
.v192-document-workspace .purchase-request-line-card{
  border:1px solid var(--v192-border)!important;border-radius:14px!important;background:#fff!important;
  box-shadow:none!important
}
.v192-document-workspace .summary-panel .summary-grand{border-top:1px solid var(--v192-border);padding-top:10px}
.v192-document-workspace .summary-grand b{font-size:20px;color:var(--v192-primary);font-variant-numeric:lining-nums tabular-nums}
.v192-document-workspace .commercial-grid-wrap{overflow:auto;border:1px solid var(--v192-border);border-radius:12px}
.v192-document-workspace .commercial-grid-table th{background:#f4f8fb;color:#4b6175}
.v192-document-workspace .commercial-grid-table td{background:#fff;color:var(--v192-text)}
.v192-document-workspace .commercial-editor-footer.v192-action-footer{
  margin-top:0;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);
  box-shadow:0 -4px 18px rgba(13,42,66,.04)
}

/* RFQ / supplier quotations use the same V192 document language */
.procurement-rfq-workspace{display:grid;gap:14px;min-width:0}
.procurement-rfq-workspace>.sub-head{
  padding:14px 16px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);
  background:var(--v192-surface);box-shadow:0 6px 18px rgba(13,42,66,.035)
}
.procurement-rfq-workspace>.commercial-list-filters{
  display:grid;grid-template-columns:minmax(240px,1.6fr) minmax(180px,.6fr);gap:10px;
  padding:12px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface)
}
.procurement-rfq-detail{
  width:min(1180px,calc(100vw - 44px))!important;max-height:calc(100vh - 44px)!important;
  padding:16px!important;border:1px solid var(--v192-border)!important;border-radius:20px!important;
  background:var(--v192-canvas)!important;box-shadow:0 28px 90px rgba(7,31,51,.26)!important
}
.procurement-rfq-detail>.sub-head{
  position:sticky;top:0;z-index:5;margin:-2px -2px 12px;padding:14px 16px;
  border:1px solid var(--v192-border);border-radius:14px;background:var(--v192-surface)
}
.procurement-rfq-detail .mini-kpis{margin-bottom:12px}
.procurement-rfq-detail .table-card,
.procurement-rfq-detail .procurement-invited-suppliers,
.procurement-rfq-detail .procurement-quote-entry,
.procurement-rfq-detail .procurement-quote-comparison{
  background:var(--v192-surface);border:1px solid var(--v192-border);border-radius:14px;padding:12px
}
.procurement-rfq-detail .procurement-invited-suppliers{margin-top:12px}
.procurement-rfq-detail .procurement-quote-entry,
.procurement-rfq-detail .procurement-quote-comparison{margin-top:12px}
.procurement-rfq-detail .procurement-quote-price-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.procurement-rfq-detail .modal-actions{
  position:sticky;bottom:0;z-index:4;margin-top:12px;padding:12px;
  border-top:1px solid var(--v192-border);background:rgba(244,247,251,.96);backdrop-filter:blur(8px)
}

/* Commercial buttons */
.v192-commercial-module .primary,
.v192-document-workspace .primary{background:var(--v192-primary);border-radius:10px;min-height:40px}
.v192-commercial-module .primary:hover,
.v192-document-workspace .primary:hover{background:var(--v192-primary-strong)}
.v192-commercial-module .secondary-btn,
.v192-document-workspace .secondary-btn,
.v192-document-workspace .tool-btn{border-radius:10px;min-height:40px}

/* Latin digits across the commercial reference implementation */
.v192-commercial-module,
.v192-document-workspace,
.procurement-rfq-workspace{font-variant-numeric:lining-nums tabular-nums}
.v192-commercial-module :is(input,select,textarea),
.v192-document-workspace :is(input,select,textarea),
.procurement-rfq-workspace :is(input,select,textarea){font-variant-numeric:lining-nums tabular-nums}
.v192-commercial-module :is(.line-total,.summary-grand,.document-number,.reference-number),
.v192-document-workspace :is(.line-total,.summary-grand,.document-number,.reference-number),
.procurement-rfq-workspace :is(td,b,strong){font-variant-numeric:lining-nums tabular-nums}

@media(max-width:900px){
  .v192-commercial-list .mini-kpis,.procurement-rfq-workspace .mini-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v192-document-workspace .commercial-editor-topbar{align-items:flex-start;flex-direction:column}
  .procurement-rfq-detail .procurement-quote-price-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  .v192-commercial-list .mini-kpis,.procurement-rfq-workspace .mini-kpis{grid-template-columns:1fr}
  .procurement-rfq-workspace>.commercial-list-filters{grid-template-columns:1fr}
  .procurement-rfq-detail{width:100vw!important;max-height:100vh!important;border-radius:0!important}
}


/* V192-C — procurement award handoff */
.procurement-award-success{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px 14px;border:1px solid #b9e4cc;border-radius:14px;
  background:#edf9f2;color:#176c43
}
.procurement-award-success>div{display:grid;gap:3px}
.procurement-award-success b{font-size:14px}
.procurement-award-success span{font-size:12px;color:#3e7b5e}
html[data-theme='dark'] .procurement-award-success{
  background:rgba(25,128,78,.14);border-color:rgba(83,194,133,.35);color:#8fe0b2
}
html[data-theme='dark'] .procurement-award-success span{color:#9dcab0}
@media(max-width:620px){.procurement-award-success{align-items:stretch;flex-direction:column}}


/* V192-D — receiving and supplier invoice matching */
.v192-supplier-match-workspace{display:grid;gap:14px;min-width:0}
.v192-supplier-match-workspace>.sub-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 16px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);
  background:var(--v192-surface)
}
.v192-supplier-match-workspace>.sub-head>div{display:grid;gap:3px}
.v192-supplier-match-workspace>.sub-head span{font-size:12px;color:var(--v192-muted)}
.v192-supplier-match-workspace .mini-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.v192-supplier-match-workspace .mini-kpis>div{
  min-height:84px;padding:14px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);
  background:var(--v192-surface)
}
.v192-supplier-match-workspace .commercial-list-filters{
  display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:10px;padding:12px;
  border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface)
}
.v192-match-summary{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:12px;
  border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);background:var(--v192-surface)
}
.v192-match-summary>div{display:grid;gap:4px}
.v192-match-summary span{font-size:11px;color:var(--v192-muted)}
.v192-match-summary b{color:var(--v192-text);font-variant-numeric:lining-nums tabular-nums}
.v192-supplier-match-workspace .success-card{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;
  border:1px solid #b9e4cc;border-radius:14px;background:#edf9f2;color:#176c43
}
.v192-status[data-status="matched"]{background:#e9f8f0;color:#14834d}
.v192-status[data-status="review_required"]{background:#fff5e5;color:#a86508}
.purchase-orders-workspace{min-width:0}
@media(max-width:900px){
  .v192-supplier-match-workspace .mini-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v192-match-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .v192-supplier-match-workspace .mini-kpis,.v192-match-summary{grid-template-columns:1fr}
  .v192-supplier-match-workspace .commercial-list-filters{grid-template-columns:1fr}
}


/* V192-E — supplier payables and closing */
.v192-payables-workspace{display:grid;gap:14px;min-width:0}
.v192-payables-workspace>.sub-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 16px;border:1px solid var(--v192-border);border-radius:var(--v192-radius-lg);
  background:var(--v192-surface)
}
.v192-payables-workspace>.sub-head>div{display:grid;gap:3px}
.v192-payables-workspace>.sub-head span{font-size:12px;color:var(--v192-muted)}
.v192-payables-workspace .mini-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.v192-payables-workspace .mini-kpis>div{
  min-height:84px;padding:14px;border:1px solid var(--v192-border);
  border-radius:var(--v192-radius-lg);background:var(--v192-surface)
}
.v192-payables-workspace .commercial-list-filters{
  display:grid;grid-template-columns:minmax(260px,1.6fr) minmax(180px,.6fr) auto;
  gap:10px;padding:12px;border:1px solid var(--v192-border);
  border-radius:var(--v192-radius-lg);background:var(--v192-surface)
}
.v192-payables-warning{
  display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #f0d8a9;
  border-radius:14px;background:#fff8ea;color:#8a5a07
}
.v192-payables-warning svg{width:18px;height:18px;flex:0 0 auto}
.v192-payables-workspace table{font-variant-numeric:lining-nums tabular-nums}
@media(max-width:900px){
  .v192-payables-workspace .mini-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v192-payables-workspace .commercial-list-filters{grid-template-columns:1fr 1fr}
  .v192-payables-workspace .commercial-list-filters>*:first-child{grid-column:1/-1}
}
@media(max-width:620px){
  .v192-payables-workspace .mini-kpis,.v192-payables-workspace .commercial-list-filters{grid-template-columns:1fr}
  .v192-payables-workspace .commercial-list-filters>*:first-child{grid-column:auto}
}


/* V192-F — final dashboard & reports visual polish */
.v192-dashboard-workspace{
  min-width:0;gap:18px;background:var(--v192-canvas);color:var(--v192-text);
  font-variant-numeric:lining-nums tabular-nums
}
.v192-dashboard-workspace .dashboard-v191-main{display:grid;gap:16px;min-width:0}
.v192-dashboard-workspace .dashboard-v191-hero{
  min-height:176px;border:1px solid var(--v192-border);border-radius:20px;
  box-shadow:var(--v192-shadow);overflow:hidden;background:linear-gradient(135deg,#0b2944,#123f73)
}
.v192-dashboard-workspace .dashboard-hero-copy-v191 h2{font-size:28px;letter-spacing:-.3px}
.v192-dashboard-workspace .dashboard-hero-copy-v191 p{max-width:640px;line-height:1.75}
.v192-dashboard-workspace .dashboard-v1905-context button,
.v192-dashboard-workspace .dashboard-v1905-context span{
  border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(8,31,53,.38);
  backdrop-filter:blur(8px)
}
.v192-dashboard-workspace .dashboard-v1905-kpis{gap:12px}
.v192-dashboard-workspace .kpi-card{
  min-height:112px;border:1px solid var(--v192-border);border-radius:16px;
  background:var(--v192-surface);box-shadow:0 7px 22px rgba(13,42,66,.05)
}
.v192-dashboard-workspace .kpi-card strong{font-size:23px;color:var(--v192-text)}
.v192-dashboard-workspace .kpi-card small{color:var(--v192-muted);font-weight:800}
.v192-dashboard-workspace .kpi-card .kpi-icon{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center
}
.v192-dashboard-workspace .dashboard-panel,
.v192-dashboard-workspace .dashboard-v1905-quick,
.v192-dashboard-workspace .dashboard-v191-activity-rail,
.v192-dashboard-workspace .dashboard-v1905-cta{
  border:1px solid var(--v192-border);border-radius:16px;background:var(--v192-surface);
  box-shadow:0 7px 22px rgba(13,42,66,.045)
}
.v192-dashboard-workspace .dashboard-panel>header,
.v192-dashboard-workspace .dashboard-v1905-quick>header,
.v192-dashboard-workspace .dashboard-v191-activity-rail>header{
  border-bottom:1px solid var(--v192-border);padding-bottom:12px
}
.v192-dashboard-workspace :is(.dashboard-panel,.dashboard-v1905-quick,.dashboard-v191-activity-rail) header strong{
  color:var(--v192-text);font-size:14px
}
.v192-dashboard-workspace :is(.dashboard-panel,.dashboard-v1905-quick,.dashboard-v191-activity-rail) header small{
  color:var(--v192-muted)
}
.v192-dashboard-workspace .trade-bars i,
.v192-dashboard-workspace .branch-placeholder i{background:#edf2f6;border-radius:999px;overflow:hidden}
.v192-dashboard-workspace .trade-bars i em,
.v192-dashboard-workspace .branch-placeholder i em{border-radius:999px}
.v192-dashboard-workspace .operations-panel>button,
.v192-dashboard-workspace .alerts-panel>button,
.v192-dashboard-workspace .dashboard-v191-activity-rail>button{
  border-radius:12px;border:1px solid transparent
}
.v192-dashboard-workspace .operations-panel>button:hover,
.v192-dashboard-workspace .alerts-panel>button:hover,
.v192-dashboard-workspace .dashboard-v191-activity-rail>button:hover{
  border-color:var(--v192-border);background:#f7fafc
}
.v192-dashboard-workspace .quick-card{
  border:1px solid var(--v192-border);border-radius:14px;background:#fff;
  min-height:82px;box-shadow:none
}
.v192-dashboard-workspace .quick-card:hover{border-color:#b9d7f1;transform:translateY(-1px)}
.v192-dashboard-workspace :is(.empty-business-widget,.donut-placeholder,.branch-placeholder){
  border:1px dashed #cfdae4;border-radius:14px;background:#fafcfe;min-height:150px
}
.v192-dashboard-workspace .dashboard-v1905-cta{padding:15px 16px}
.v192-dashboard-workspace button{border-radius:10px}
.v192-dashboard-workspace .dashboard-v191-sidebar{display:grid;gap:16px;align-content:start;min-width:0}

.v192-reports-workspace{display:grid;gap:14px;min-width:0;padding-bottom:24px;font-variant-numeric:lining-nums tabular-nums}
.v192-reports-header{
  display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0!important;
  padding:17px 18px;border:1px solid var(--v192-border);border-radius:16px;
  background:var(--v192-surface);box-shadow:var(--v192-shadow)
}
.v192-reports-header h2{margin:0;color:var(--v192-text);font-size:21px}
.v192-reports-header p{margin:4px 0 0;color:var(--v192-muted);font-size:12px}
.v192-reports-header .report-actions{display:flex;gap:8px;flex-wrap:wrap}
.v192-reports-header .report-actions button{
  min-height:40px;border:1px solid var(--v192-border);border-radius:10px;background:#fff;color:var(--v192-text)
}
.v192-reports-tabs{
  display:flex;gap:4px;overflow:auto;padding:8px 10px;border:1px solid var(--v192-border);
  border-radius:16px;background:var(--v192-surface);box-shadow:0 5px 18px rgba(13,42,66,.035);
  scrollbar-width:thin
}
.v192-reports-tabs button{
  display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 13px;white-space:nowrap;
  border:0;border-radius:9px;background:transparent;color:var(--v192-muted);font-weight:800
}
.v192-reports-tabs button svg{width:16px;height:16px}
.v192-reports-tabs button:hover{background:#f4f8fb;color:var(--v192-text)}
.v192-reports-tabs button.active{background:#eaf4fd;color:var(--v192-primary)}
.v192-reports-filter{
  display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:12px!important;margin:0!important;
  border:1px solid var(--v192-border);border-radius:16px;background:var(--v192-surface)
}
.v192-reports-filter label{display:grid;gap:5px;color:var(--v192-muted);font-size:11px;font-weight:800}
.v192-reports-filter input{min-height:40px;border:1px solid var(--v192-border);border-radius:10px;background:#fff}
.v192-reports-filter .report-period-presets{display:flex;gap:6px;flex-wrap:wrap}
.v192-reports-filter .report-period-presets button{
  min-height:38px;border:1px solid var(--v192-border);border-radius:9px;background:#f8fafc
}
.v192-reports-workspace .report-executive-strip{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px
}
.v192-reports-workspace .report-executive-strip>div{
  display:grid;gap:5px;min-height:72px;padding:12px 14px;border:1px solid var(--v192-border);
  border-radius:14px;background:var(--v192-surface)
}
.v192-reports-workspace .report-executive-strip span{font-size:11px;color:var(--v192-muted)}
.v192-reports-workspace .report-executive-strip b{color:var(--v192-text)}
.v192-report-sheet{
  overflow:hidden;border:1px solid var(--v192-border)!important;border-radius:18px!important;
  background:var(--v192-surface)!important;box-shadow:0 8px 28px rgba(13,42,66,.05)!important
}
.v192-report-sheet>header{
  padding:16px 18px!important;border-bottom:1px solid var(--v192-border)!important;
  background:#f7fafc!important
}
.v192-report-sheet>footer{border-top:1px solid var(--v192-border)!important;background:#fafcfe!important}
.v192-reports-workspace .report-summary{gap:10px}
.v192-reports-workspace .report-summary>div,
.v192-reports-workspace .report-aging-grid>.report-box{
  border:1px solid var(--v192-border);border-radius:13px;background:#fbfdff;box-shadow:none
}
.v192-reports-workspace :is(.table-card,.report-box){
  border:1px solid var(--v192-border);border-radius:14px;background:var(--v192-surface);box-shadow:none
}
.v192-reports-workspace table{font-variant-numeric:lining-nums tabular-nums}
.v192-reports-workspace th{background:#f4f8fb;color:#4b6175;font-size:12px}
.v192-reports-workspace td{color:var(--v192-text)}
.v192-reports-workspace :is(input,select,textarea){font-variant-numeric:lining-nums tabular-nums}

html[data-theme='dark'] .v192-dashboard-workspace .kpi-card,
html[data-theme='dark'] .v192-dashboard-workspace .dashboard-panel,
html[data-theme='dark'] .v192-dashboard-workspace .dashboard-v1905-quick,
html[data-theme='dark'] .v192-dashboard-workspace .dashboard-v191-activity-rail,
html[data-theme='dark'] .v192-reports-header,
html[data-theme='dark'] .v192-reports-tabs,
html[data-theme='dark'] .v192-reports-filter,
html[data-theme='dark'] .v192-reports-workspace .report-executive-strip>div,
html[data-theme='dark'] .v192-report-sheet,
html[data-theme='dark'] .v192-reports-workspace :is(.table-card,.report-box){background:var(--panel);border-color:var(--line)}
html[data-theme='dark'] .v192-dashboard-workspace .quick-card,
html[data-theme='dark'] .v192-reports-header .report-actions button,
html[data-theme='dark'] .v192-reports-filter input{background:var(--soft);color:var(--text);border-color:var(--line)}
html[data-theme='dark'] .v192-reports-workspace th,
html[data-theme='dark'] .v192-report-sheet>header{background:var(--soft)!important;color:var(--muted)}
html[data-theme='dark'] .v192-report-sheet>footer{background:var(--panel)!important}

@media(max-width:1100px){
  .v192-reports-workspace .report-executive-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .v192-reports-header{align-items:flex-start;flex-direction:column}
  .v192-reports-header .report-actions{width:100%}
  .v192-reports-header .report-actions button{flex:1 1 auto}
  .v192-reports-workspace .report-executive-strip{grid-template-columns:1fr}
  .v192-reports-filter{align-items:stretch;flex-direction:column}
  .v192-reports-filter>*{width:100%}
}

/* ===== END SOURCE 16/17 ===== */


/* ===== V194 SOURCE 17/17: frontend-src/src/styles/v193-rfq-reference-layer.css ===== */
/* V194.1 — CANONICAL RFQ UI OWNERSHIP
 * One owner for RFQ list/create/detail theme.
 * Global dark mode may style the application shell, but RFQ document surfaces are always light.
 */

.rfq-reference-list-workspace,
.rfq-reference-create-workspace,
.rfq-replica-workspace{
  --rfq-bg:#f5f8fb;
  --rfq-surface:#ffffff;
  --rfq-soft:#f6f9fc;
  --rfq-border:#d9e5ef;
  --rfq-text:#102a43;
  --rfq-muted:#74889a;
  --rfq-primary:#1677e8;
  --rfq-success:#20835a;
  color-scheme:only light!important;
}

[data-document-theme='light']{
  color-scheme:only light!important;
  --bg:#f4f7fb;
  --panel:#ffffff;
  --card:#ffffff;
  --line:#d9e5ef;
  --text:#102a43;
  --muted:#74889a;
  --soft:#f6f9fc;
}

/* Create RFQ */
.rfq-reference-create-backdrop{
  background:rgba(7,25,42,.52)!important;
  backdrop-filter:blur(5px);
}
.rfq-reference-create-workspace{
  width:min(1240px,calc(100vw - 48px))!important;
  max-height:calc(100vh - 48px)!important;
  overflow:hidden!important;
  color:var(--rfq-text)!important;
  background-color:var(--rfq-surface)!important;
  background-image:none!important;
  border:1px solid var(--rfq-border)!important;
  border-radius:18px!important;
  box-shadow:0 26px 90px rgba(7,35,58,.28)!important;
}
.rfq-reference-create-workspace .procurement-rfq-create-header{
  min-height:88px;
  padding:18px 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:var(--rfq-surface)!important;
  border-bottom:1px solid #dce6ef!important;
}
.rfq-reference-create-workspace .procurement-rfq-create-title{display:flex;align-items:center;gap:13px;min-width:0}
.rfq-reference-create-workspace .procurement-rfq-create-title>div{display:grid;gap:5px}
.rfq-reference-create-workspace .procurement-rfq-create-title b{color:var(--rfq-text)!important;font-size:20px}
.rfq-reference-create-workspace .procurement-rfq-create-title span{color:var(--rfq-muted)!important;font-size:12px}
.rfq-reference-create-workspace .procurement-rfq-create-icon{
  width:46px;height:46px;border-radius:11px;display:grid;place-items:center;flex:0 0 auto;
  background:#e9f4fd!important;color:var(--rfq-primary)!important
}
.rfq-reference-create-workspace .procurement-close-btn{
  min-height:40px;border-radius:9px;background:#fff!important;color:#31516f!important;border:1px solid #d3e0ea!important
}
.rfq-reference-create-workspace .procurement-rfq-create-body{
  display:grid;gap:16px;padding:20px 26px;overflow:auto;max-height:calc(100vh - 250px);
  background:var(--rfq-soft)!important;color:var(--rfq-text)!important
}
.rfq-reference-create-workspace .procurement-rfq-create-section{
  display:grid;gap:14px;padding:20px;border:1px solid #dce6ef;border-radius:13px;
  background:var(--rfq-surface)!important;color:var(--rfq-text)!important;
  box-shadow:0 3px 14px rgba(15,42,67,.035)
}
.rfq-reference-create-workspace .procurement-section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.rfq-reference-create-workspace .procurement-section-heading>div{display:grid;gap:3px}
.rfq-reference-create-workspace .procurement-section-heading b{color:#173a58!important;font-size:15px}
.rfq-reference-create-workspace .procurement-section-heading span{color:#7b8fa2!important;font-size:11px}
.rfq-reference-create-workspace .procurement-step-badge{
  width:34px;height:34px;border-radius:50%;display:grid!important;place-items:center;
  background:var(--rfq-primary)!important;color:#fff!important;font-weight:800
}
.rfq-reference-create-workspace .procurement-field{display:grid;gap:7px}
.rfq-reference-create-workspace .procurement-field>span{color:#4d6881!important;font-weight:800;font-size:12px}
.rfq-reference-create-workspace .procurement-field select{
  width:100%;min-height:48px;padding-inline:12px;border-radius:9px;
  background:#fff!important;color:#173a58!important;border:1px solid #cddbe7!important
}
.rfq-reference-create-workspace .procurement-rfq-safety-note{
  padding:10px 12px;border-radius:8px;background:#eaf8f1!important;color:var(--rfq-success)!important;border:0!important;font-weight:700
}
.rfq-reference-create-workspace .procurement-supplier-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--rfq-muted)!important;font-size:12px
}
.rfq-reference-create-workspace .procurement-supplier-toolbar span{display:flex;align-items:center;gap:6px}
.rfq-reference-create-workspace .procurement-supplier-toolbar b{color:#173a58!important}
.rfq-reference-create-workspace .procurement-supplier-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:300px;padding:2px;overflow:auto
}
.rfq-reference-create-workspace .procurement-supplier-grid label{
  position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 26px;align-items:center;gap:11px;
  min-height:72px;padding:11px 12px;border:1px solid var(--rfq-border)!important;border-radius:10px;
  background:#fff!important;color:#173a58!important
}
.rfq-reference-create-workspace .procurement-supplier-grid label:hover{background:#f8fbfe!important;border-color:#8bbded!important}
.rfq-reference-create-workspace .procurement-supplier-grid label.selected{background:#eef6fd!important;border-color:var(--rfq-primary)!important}
.rfq-reference-create-workspace .procurement-supplier-grid label>input{position:absolute;opacity:0;pointer-events:none}
.rfq-reference-create-workspace .procurement-supplier-avatar{
  width:40px;height:40px;border-radius:11px;display:grid!important;place-items:center;
  background:#e9f4fd!important;color:var(--rfq-primary)!important;font-weight:900
}
.rfq-reference-create-workspace .procurement-supplier-info{display:grid!important;gap:4px;min-width:0}
.rfq-reference-create-workspace .procurement-supplier-info b{color:#173a58!important}
.rfq-reference-create-workspace .procurement-supplier-info small{color:#7d90a3!important}
.rfq-reference-create-workspace .procurement-supplier-check{
  width:24px;height:24px;border:1px solid var(--rfq-border);border-radius:7px;display:grid!important;place-items:center;color:#fff
}
.rfq-reference-create-workspace .procurement-supplier-grid label.selected .procurement-supplier-check{
  border-color:var(--rfq-primary);background:var(--rfq-primary)
}
.rfq-reference-create-workspace .procurement-rfq-create-footer{
  min-height:72px;padding:12px 26px;display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:#fff!important;color:var(--rfq-text)!important;border-top:1px solid #dce6ef!important
}
.rfq-reference-create-workspace .procurement-rfq-create-footer>div:first-child{display:flex;align-items:baseline;gap:7px}
.rfq-reference-create-workspace .procurement-rfq-create-footer>div:first-child b{color:#173a58!important;font-size:18px}
.rfq-reference-create-workspace .procurement-rfq-create-footer>div:first-child span{color:#7d90a3!important;font-size:11px}
.rfq-reference-create-workspace .modal-actions{margin:0}
.rfq-reference-create-workspace .modal-actions .secondary-btn{background:#fff!important;color:#31516f!important;border:1px solid #d3e0ea!important}
.rfq-reference-create-workspace .modal-actions .primary{background:var(--rfq-primary)!important;color:#fff!important;border-color:var(--rfq-primary)!important}
.rfq-reference-create-workspace .modal-actions .primary:disabled{background:#b8cce0!important;color:#f7fbff!important;border-color:#b8cce0!important}

/* RFQ list */
.rfq-reference-list-workspace{color:var(--rfq-text)!important}
.rfq-reference-list-workspace :is(.rfq-reference-list-header,.rfq-reference-list-kpis>div,.rfq-reference-list-filters,.rfq-reference-list-table,.table-card){
  background:#fff!important;color:var(--rfq-text)!important;border-color:var(--rfq-border)!important
}
.rfq-reference-list-workspace :is(input,select){background:#fff!important;color:#173a58!important;border-color:#cddbe7!important}
.rfq-reference-list-workspace th{background:#f0f6fb!important;color:#385874!important}
.rfq-reference-list-workspace :is(h1,h2,h3,b,strong,td){color:#173a58!important}

/* RFQ detail replica */
.rfq-replica-workspace{color:var(--rfq-text)!important}
.rfq-replica-workspace :is(.rfq-replica-header,.rfq-replica-kpis article,.rfq-replica-tabs,.rfq-replica-panel,.rfq-replica-info,.rfq-replica-footer,.rfq-replica-table,.rfq-replica-summary,.rfq-replica-basic>div){
  background:#fff!important;color:var(--rfq-text)!important;border-color:var(--rfq-border)!important
}
.rfq-replica-workspace :is(h1,h2,h3,b,strong,td){color:#173a58!important}
.rfq-replica-workspace th{background:#f0f6fb!important;color:#385874!important}
.rfq-replica-workspace .rfq-replica-summary span{color:#657b90!important}
.rfq-replica-workspace .rfq-replica-info span{color:#7d8fa1!important}
.rfq-replica-workspace .rfq-replica-title p{color:#687f95!important}
.rfq-replica-workspace .rfq-replica-footer .danger-outline{background:#fff!important;color:#ef3333!important}

@media(max-width:820px){
  .rfq-reference-create-workspace{width:calc(100vw - 24px)!important;max-height:calc(100vh - 24px)!important}
  .rfq-reference-create-workspace .procurement-rfq-create-body{padding:14px;max-height:calc(100vh - 220px)}
  .rfq-reference-create-workspace .procurement-supplier-grid{grid-template-columns:1fr}
  .rfq-reference-list-filters{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .rfq-reference-create-backdrop{padding:10px}
  .rfq-reference-create-workspace{width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px)!important}
  .rfq-reference-create-workspace .procurement-rfq-create-header,
  .rfq-reference-create-workspace .procurement-rfq-create-body,
  .rfq-reference-create-workspace .procurement-rfq-create-footer{padding-inline:14px}
}

/* ===== END SOURCE 17/17 ===== */

/* =========================================================
   V201 Phase 10.1 — Dashboard Visual Polish
   ========================================================= */

.dashboard-v1905.dashboard-reference-v191 {
  --dash-card-radius: 20px;
  --dash-card-border: rgba(15, 67, 105, 0.10);
  --dash-card-shadow: 0 8px 24px rgba(15, 47, 73, 0.06);
  --dash-icon-size: 46px;
}

/* Hero: cleaner, shorter and more executive */
.dashboard-v191-hero {
  min-height: 170px;
  border-radius: 22px;
  overflow: hidden;
}

.dashboard-hero-copy-v191 {
  padding-block: 18px;
}

.dashboard-hero-copy-v191 h2 {
  margin: 4px 0 6px;
  font-size: clamp(28px, 2.2vw, 40px);
  line-height: 1.15;
}

.dashboard-hero-copy-v191 p {
  max-width: 760px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.dashboard-hero-kicker-v191 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.dashboard-hero-actions-v191 {
  gap: 8px;
}

.dashboard-hero-actions-v191 button {
  min-height: 38px;
  border-radius: 11px;
}

/* KPI rows */
.dashboard-v1905-kpis {
  gap: 14px;
  align-items: stretch;
}

.dashboard-v1905-kpis .kpi-card {
  position: relative;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--dash-card-border);
  border-radius: var(--dash-card-radius);
  box-shadow: var(--dash-card-shadow);
  background: #fff;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.dashboard-v1905-kpis .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 47, 73, 0.09);
  border-color: rgba(37, 99, 235, .16);
}

.dashboard-v1905-kpis .kpi-card > div {
  min-width: 0;
}

.dashboard-v1905-kpis .kpi-card small {
  display: block;
  margin-bottom: 7px;
  color: #52677b;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-v1905-kpis .kpi-card strong {
  display: block;
  margin-bottom: 6px;
  color: #0b3558;
  font-size: clamp(23px, 1.8vw, 31px);
  line-height: 1.1;
  font-weight: 800;
}

.dashboard-v1905-kpis .kpi-card em {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  color: #73879a;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.dashboard-v1905-kpis .kpi-card em svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

/* Unified icon geometry */
.dashboard-v1905-kpis .kpi-icon {
  width: var(--dash-icon-size);
  height: var(--dash-icon-size);
  min-width: var(--dash-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #edf5fb;
  color: #315b78;
}

.dashboard-v1905-kpis .kpi-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

/* Primary row: muted but distinct semantic accents */
.dashboard-primary-kpis .kpi-green .kpi-icon {
  background: #e9f8f1;
  color: #159c67;
}

.dashboard-primary-kpis .kpi-red .kpi-icon {
  background: #fff0f0;
  color: #e45757;
}

.dashboard-primary-kpis .kpi-blue .kpi-icon {
  background: #edf5ff;
  color: #3184d7;
}

/* Operational row deliberately calmer */
.dashboard-operational-kpis .kpi-card {
  min-height: 118px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.dashboard-operational-kpis .kpi-icon {
  background: #eef4f8;
  color: #526f84;
}

/* Panels */
.dashboard-v1905-main-grid,
.dashboard-v1905-bottom-grid {
  gap: 16px;
}

.dashboard-panel {
  border: 1px solid var(--dash-card-border);
  border-radius: var(--dash-card-radius);
  box-shadow: var(--dash-card-shadow);
}

.dashboard-panel > header {
  padding-bottom: 12px;
}

.dashboard-panel > header strong {
  font-size: 16px;
}

.dashboard-panel > header small {
  margin-top: 3px;
  color: #8293a3;
}

/* Quick actions: business flow + icon alignment */
.dashboard-v1905-quick .quick-grid {
  gap: 10px;
}

.dashboard-v1905-quick .quick-card {
  min-height: 56px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
}

.dashboard-v1905-quick .quick-card svg {
  width: 21px;
  height: 21px;
  justify-self: center;
  stroke-width: 2;
}

.dashboard-v1905-quick .quick-card span {
  font-size: 13px;
  font-weight: 700;
}

/* Sidebar */
.dashboard-v191-sidebar {
  gap: 14px;
}

.dashboard-v191-sidebar > section {
  border-radius: 20px;
  border: 1px solid var(--dash-card-border);
  box-shadow: var(--dash-card-shadow);
}

/* Activity rail consistency */
.dashboard-v191-activity-rail > button {
  min-height: 54px;
}

.dashboard-v191-activity-rail .activity-dot {
  width: 9px;
  height: 9px;
}

/* Avoid visually cramped cards on medium screens */
@media (max-width: 1380px) {
  .dashboard-v1905-kpis .kpi-card {
    padding: 15px;
  }

  .dashboard-v1905-kpis .kpi-card strong {
    font-size: 24px;
  }

  .dashboard-hero-copy-v191 h2 {
    font-size: 31px;
  }
}

/* Two-column KPI layout before mobile */
@media (max-width: 1050px) {
  .dashboard-v1905-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-v191-hero {
    min-height: 155px;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .dashboard-v1905-kpis {
    grid-template-columns: 1fr;
  }

  .dashboard-v1905-kpis .kpi-card {
    min-height: 108px;
  }

  .dashboard-v191-hero {
    min-height: auto;
  }

  .dashboard-hero-copy-v191 h2 {
    font-size: 26px;
  }
}

/* =========================================================
   V201 Dashboard Hero Alignment Hotfix
   ========================================================= */

.dashboard-v191-hero {
  position: relative;
  min-height: 190px;
  align-items: stretch;
}

/* Give hero controls their own clear row */
.dashboard-hero-actions-v191 {
  position: absolute;
  top: 16px;
  inset-inline-start: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-hero-actions-v191 button {
  min-height: 38px;
  padding: 7px 12px;
  white-space: nowrap;
  border-radius: 10px;
  font-size: 12px;
}

/* Text area */
.dashboard-hero-copy-v191 {
  position: relative;
  padding: 46px 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Version badge must never sit behind controls */
.dashboard-hero-kicker-v191 {
  position: static;
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf5fb;
  color: #557187;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-hero-copy-v191 h2 {
  margin: 0 0 7px;
  font-size: clamp(30px, 2.25vw, 40px);
  line-height: 1.15;
}

.dashboard-hero-copy-v191 p {
  margin: 0;
  max-width: 760px;
  line-height: 1.65;
}

/* Date and branch */
.dashboard-hero-meta-v191 {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Reduce oversized illustration area */
.dashboard-hero-visual-v191 {
  min-width: 280px;
  max-width: 390px;
}

/* Tablet */
@media (max-width: 1050px) {
  .dashboard-hero-actions-v191 {
    position: static;
    margin-bottom: 10px;
  }

  .dashboard-hero-copy-v191 {
    padding: 18px;
  }

  .dashboard-hero-visual-v191 {
    max-width: 300px;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .dashboard-v191-hero {
    min-height: auto;
  }

  .dashboard-hero-actions-v191 {
    flex-wrap: wrap;
  }

  .dashboard-hero-visual-v191 {
    display: none;
  }

  .dashboard-hero-copy-v191 h2 {
    font-size: 26px;
  }
}

/* =========================================================
   V201 Top Navigation Visual Polish
   ========================================================= */

/* Main navigation spacing */
.shell-primary-nav,
.top-navigation,
.app-primary-nav {
  align-items: center;
}

/* Normalize navigation buttons */
.shell-primary-nav button,
.shell-primary-nav a,
.top-navigation button,
.top-navigation a,
.app-primary-nav button,
.app-primary-nav a {
  min-height: 54px;
  border-radius: 14px;
}

/* Normalize navigation icons */
.shell-primary-nav svg,
.top-navigation svg,
.app-primary-nav svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  stroke-width: 1.9;
}

/* Keep icon and label visually centered */
.shell-primary-nav button,
.shell-primary-nav a,
.top-navigation button,
.top-navigation a,
.app-primary-nav button,
.app-primary-nav a {
  gap: 9px;
}

/* Active module gets clearer visual hierarchy */
.shell-primary-nav .active,
.top-navigation .active,
.app-primary-nav .active {
  font-weight: 700;
}

/* Plus / add-module control */
.shell-primary-nav .nav-add,
.top-navigation .nav-add,
.app-primary-nav .nav-add {
  width: 48px;
  min-width: 48px;
  padding-inline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shell-primary-nav .nav-add svg,
.top-navigation .nav-add svg,
.app-primary-nav .nav-add svg {
  width: 22px;
  height: 22px;
}

/* Slightly tighten hero after alignment was fixed */
.dashboard-v191-hero {
  min-height: 176px;
}

.dashboard-hero-copy-v191 {
  padding-block: 40px 16px;
}

@media (max-width: 1050px) {
  .dashboard-v191-hero {
    min-height: 155px;
  }
}

/* =========================================================
   V201 Top Navigation — actual Shell classes
   ========================================================= */

.top-navigation-v191 {
  min-height: 74px;
}

.top-nav-primary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-nav-home-button,
.top-nav-group-button {
  min-height: 54px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  font-weight: 600;
}

.top-nav-home-button svg,
.top-nav-group-button svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  stroke-width: 1.9;
}

.top-nav-home-button span,
.top-nav-group-button span {
  line-height: 1;
  white-space: nowrap;
}

.top-nav-home-button.active,
.top-nav-group-button.active {
  font-weight: 800;
}

.top-nav-group-button.expanded {
  transform: translateY(-1px);
}

/* Create button belongs visually to the same navigation family */
.quick-create-wrap-v191 {
  display: flex;
  align-items: center;
}

.global-create-v191 {
  width: 50px;
  min-width: 50px;
  height: 54px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.global-create-v191 svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

/* More/menu group icon aligns with the rest */
.top-nav-group-button:last-of-type svg {
  width: 21px;
  height: 21px;
}

/* Context toolbar below the main navigation */
.top-nav-context-tools {
  align-items: center;
  gap: 8px;
}

.top-nav-context-tools button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 11px;
}

.top-nav-context-tools button svg {
  width: 18px;
  height: 18px;
}

/* Wide screens: keep navigation balanced */
@media (min-width: 1280px) {
  .top-nav-primary {
    justify-content: center;
  }
}

/* Medium widths */
@media (max-width: 1180px) {
  .top-nav-home-button,
  .top-nav-group-button {
    padding-inline: 13px;
    gap: 7px;
  }

  .top-nav-home-button svg,
  .top-nav-group-button svg {
    width: 19px;
    height: 19px;
  }

  .global-create-v191 {
    width: 46px;
    min-width: 46px;
  }
}

/* =========================================================
   BEG ERP V202
   Enterprise Workspace — Phase 1 Shell Foundation
   ========================================================= */

.enterprise-workspace-v202 {
  --v202-sidebar-width: 218px;
  --v202-sidebar-collapsed: 76px;
  --v202-navy: #082b4c;
  --v202-navy-deep: #061f38;
  --v202-blue: #1479d4;
  --v202-blue-soft: #eaf4ff;
  --v202-paper: #f5f8fb;
  --v202-border: #dce7ef;

  min-height: 100vh;
  display: grid !important;
  grid-template-columns: var(--v202-sidebar-width) minmax(0, 1fr);
  grid-template-areas: "sidebar main";
  background: var(--v202-paper);
  direction: ltr;
}

.enterprise-workspace-v202.sidebar-collapsed-v202 {
  grid-template-columns: var(--v202-sidebar-collapsed) minmax(0, 1fr);
}

.enterprise-workspace-v202 > main {
  grid-area: main;
  min-width: 0;
  direction: rtl;
}

/* =========================================================
   Sidebar
   ========================================================= */

.enterprise-sidebar-v202 {
  grid-area: sidebar;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 90;

  display: flex;
  flex-direction: column;

  padding: 14px 10px 12px;

  color: #fff;

  background:
    radial-gradient(circle at 30% 5%, rgba(38,128,190,.2), transparent 28%),
    linear-gradient(180deg, var(--v202-navy) 0%, var(--v202-navy-deep) 100%);

  border-inline-end: 1px solid rgba(255,255,255,.08);
  box-shadow: 12px 0 30px rgba(7,34,56,.08);

  direction: rtl;
  overflow: hidden;
}

.sidebar-brand-v202 {
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 30px;
  align-items: center;
  gap: 9px;

  padding: 7px 5px 14px;
  margin-bottom: 7px;

  border-bottom: 1px solid rgba(255,255,255,.10);
}

.sidebar-brand-mark-v202 {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: linear-gradient(145deg,#f6c84f,#e39d18);
  color: #092947;

  font-size: 12px;
  font-weight: 1000;
}

.sidebar-brand-copy-v202 {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-brand-copy-v202 strong {
  color: #fff;
  font-size: 17px;
  white-space: nowrap;
}

.sidebar-brand-copy-v202 small {
  color: #aac7dd;
  font-size: 9px;
  white-space: nowrap;
}

.sidebar-collapse-v202 {
  width: 30px;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 9px;

  background: rgba(255,255,255,.06);
  color: #cce1f0;
  cursor: pointer;
}

.sidebar-collapse-v202:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.sidebar-collapse-v202 svg {
  width: 17px;
  height: 17px;
}

/* =========================================================
   Sidebar Navigation
   ========================================================= */

.sidebar-nav-v202 {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 4px 0 12px;

  scrollbar-width: thin;
}

.sidebar-nav-item-v202 {
  width: 100%;
  min-height: 46px;

  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  gap: 8px;

  padding: 5px 9px;

  border: 1px solid transparent;
  border-radius: 11px;

  background: transparent;
  color: #d5e4ef;

  text-align: right;
  cursor: pointer;

  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .16s ease;
}

.sidebar-nav-item-v202:hover {
  color: #fff;
  background: rgba(255,255,255,.075);
}

.sidebar-nav-item-v202.active {
  color: #fff;

  background:
    linear-gradient(90deg,rgba(22,123,205,.95),rgba(16,95,155,.88));

  border-color: rgba(102,190,245,.38);

  box-shadow:
    inset 3px 0 0 #52c3ff,
    0 7px 16px rgba(3,28,48,.16);
}

.sidebar-nav-icon-v202 {
  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;

  color: inherit;
}

.sidebar-nav-icon-v202 svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.sidebar-nav-label-v202 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 12.5px;
  font-weight: 650;
}

.sidebar-footer-v202 {
  display: grid;
  gap: 2px;

  padding: 10px 9px 2px;

  border-top: 1px solid rgba(255,255,255,.09);

  color: #91b4cc;
}

.sidebar-footer-v202 span {
  color: #d6e8f4;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-footer-v202 small {
  font-size: 8px;
}

/* =========================================================
   Collapsed Sidebar
   ========================================================= */

.sidebar-collapsed-v202 .sidebar-brand-v202 {
  grid-template-columns: 1fr;
  justify-items: center;
}

.sidebar-collapsed-v202 .sidebar-brand-copy-v202,
.sidebar-collapsed-v202 .sidebar-footer-v202,
.sidebar-collapsed-v202 .sidebar-nav-label-v202 {
  display: none;
}

.sidebar-collapsed-v202 .sidebar-collapse-v202 {
  position: absolute;
  top: 62px;
}

.sidebar-collapsed-v202 .sidebar-nav-item-v202 {
  grid-template-columns: 1fr;
  padding-inline: 8px;
  justify-items: center;
}

.sidebar-collapsed-v202 .sidebar-nav-icon-v202 {
  width: 38px;
  height: 38px;
}

/* =========================================================
   V202 Top Bar
   ========================================================= */

.enterprise-workspace-v202 .topbar-reference-v191 {
  position: sticky;
  top: 0;
  z-index: 80;

  min-height: 68px !important;
  height: 68px !important;

  padding-inline: 18px !important;

  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  grid-template-areas: "search create actions" !important;

  gap: 14px;

  background: #fff !important;
  color: #193b58 !important;

  border-bottom: 1px solid var(--v202-border) !important;
  box-shadow: 0 3px 12px rgba(10,48,78,.05) !important;
}

.enterprise-workspace-v202 .enterprise-brand-v191,
.enterprise-workspace-v202 .topbar-title {
  display: none !important;
}

.enterprise-workspace-v202 .topbar-search {
  grid-area: search;

  width: min(720px, 100%) !important;
  min-height: 42px !important;

  justify-self: center;

  background: #f7fafc !important;
  color: #49677f !important;

  border: 1px solid #dce7ef !important;
  border-radius: 12px !important;

  box-shadow: none !important;
}

.enterprise-workspace-v202 .topbar-search:hover {
  border-color: #b8d0e1 !important;
  background: #fff !important;
}

.quick-create-wrap-v202 {
  grid-area: create;
  position: relative;
  display: flex;
  align-items: center;
}

.global-create-v202 {
  min-width: 102px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 14px;

  border: 1px solid #1479d4;
  border-radius: 11px;

  background: linear-gradient(180deg,#1687e8,#0e6fc8);
  color: #fff;

  font: inherit;
  font-size: 13px;
  font-weight: 800;

  cursor: pointer;

  box-shadow: 0 6px 16px rgba(20,121,212,.17);
}

.global-create-v202:hover {
  background: linear-gradient(180deg,#2092ef,#1479d4);
  transform: translateY(-1px);
}

.global-create-v202 svg {
  width: 18px;
  height: 18px;
}

.quick-create-menu-v202 {
  inset-inline-end: 0;
  top: calc(100% + 9px);
}

.enterprise-workspace-v202 .topbar-actions-reference-v191 {
  grid-area: actions;
}

.enterprise-workspace-v202 .topbar-utility-button {
  color: #365a74 !important;
  background: #f7fafc !important;
  border-color: #dde8ef !important;
}

.enterprise-workspace-v202 .topbar-utility-button:hover {
  background: #edf5fa !important;
}

.enterprise-workspace-v202 .user-chip-profile-v191 {
  color: #193b58 !important;
  background: transparent !important;
}

.enterprise-workspace-v202 .user-avatar-photo-v191 {
  border-color: #d4e3ed !important;
}

/* =========================================================
   Retire old desktop navigation — keep for mobile fallback
   ========================================================= */

@media (min-width: 1101px) {
  .enterprise-workspace-v202 .top-navigation-v1906,
  .enterprise-workspace-v202 .top-navigation-v191 {
    display: none !important;
  }

  .enterprise-workspace-v202 .content {
    padding: 18px 20px 26px !important;
  }

  .enterprise-workspace-v202 .top-nav-context-tools {
    position: sticky;
    top: 68px;
    z-index: 70;

    min-height: 48px;
    padding: 6px 18px;

    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid #e3ebf1;
  }
}

/* =========================================================
   Mobile / tablet fallback
   ========================================================= */

@media (max-width: 1100px) {
  .enterprise-workspace-v202 {
    display: block !important;
  }

  .enterprise-sidebar-v202 {
    display: none;
  }

  .enterprise-workspace-v202 .topbar-reference-v191 {
    display: flex !important;
    min-height: 60px !important;
    height: 60px !important;
  }

  .enterprise-workspace-v202 .enterprise-brand-v191 {
    display: flex !important;
  }

  .quick-create-wrap-v202 {
    display: none;
  }

  .enterprise-workspace-v202 .top-navigation-v191 {
    top: 60px !important;
  }
}

/* =========================================================
   Dark Mode
   ========================================================= */

html[data-theme='dark'] .enterprise-workspace-v202 {
  --v202-paper: #081827;
  --v202-border: #21384b;
  background: #081827;
}

html[data-theme='dark'] .enterprise-workspace-v202 .topbar-reference-v191 {
  background: #0c2234 !important;
  color: #e8f1f7 !important;
  border-bottom-color: #21384b !important;
}

html[data-theme='dark'] .enterprise-workspace-v202 .topbar-search {
  background: #102a40 !important;
  border-color: #274359 !important;
  color: #d4e4ef !important;
}
/* ===== V195.0 UNIFIED ERP DESIGN SYSTEM FOUNDATION ===== */
.v195-workspace{
  --v195-canvas:#f4f7fb;
  --v195-surface:#ffffff;
  --v195-surface-soft:#f7faff;
  --v195-border:#d8e4ef;
  --v195-text:#102a43;
  --v195-muted:#6f8396;
  --v195-primary:#1479d2;
  --v195-primary-strong:#0b69bd;
  --v195-success:#168451;
  --v195-warning:#b97912;
  --v195-danger:#cf3948;
  --v195-radius-sm:9px;
  --v195-radius-md:13px;
  --v195-radius-lg:17px;
  --v195-shadow:0 10px 30px rgba(15,42,67,.07);
  color-scheme:only light!important;
  display:grid;
  gap:16px;
  min-width:0;
  padding-bottom:24px;
  background:var(--v195-canvas);
  color:var(--v195-text);
}
.v195-workspace button,.v195-workspace input,.v195-workspace select,.v195-workspace textarea{font:inherit}
.v195-page-header,.v195-document-header{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:18px 20px;border:1px solid var(--v195-border);border-radius:var(--v195-radius-lg);
  background:var(--v195-surface);box-shadow:var(--v195-shadow)
}
.v195-page-title,.v195-document-title{display:flex;align-items:center;gap:13px;min-width:0}
.v195-page-title>div,.v195-document-title>div{display:grid;gap:4px;min-width:0}
.v195-page-title h1,.v195-document-title h1{margin:0;color:var(--v195-text);font-size:22px;line-height:1.3}
.v195-page-title p,.v195-document-title p{margin:0;color:var(--v195-muted);font-size:12px}
.v195-page-title small{color:var(--v195-primary);font-size:11px;font-weight:800}
.v195-page-icon,.v195-document-icon{
  width:46px;height:46px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;
  background:#e8f4ff;color:var(--v195-primary)
}
.v195-page-icon svg,.v195-document-icon svg{width:23px;height:23px}
.v195-page-header-side,.v195-document-header-side{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.v195-flow-pill{
  display:inline-flex;align-items:center;min-height:32px;padding:6px 11px;border-radius:999px;
  border:1px solid #cfe3f4;background:#eef7ff;color:#2d6f9f;font-size:11px;font-weight:800
}
.v195-page-actions,.v195-document-actions,.v195-list-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.v195-tabs{
  display:flex;align-items:center;gap:4px;overflow:auto;padding:6px 8px;
  border:1px solid var(--v195-border);border-radius:var(--v195-radius-md);
  background:var(--v195-surface);box-shadow:0 5px 18px rgba(15,42,67,.04)
}
.v195-tabs button{
  min-height:42px;display:inline-flex;align-items:center;gap:7px;padding:0 13px;border:1px solid transparent;
  border-radius:9px;background:transparent;color:var(--v195-muted);font-weight:800;white-space:nowrap;cursor:pointer
}
.v195-tabs button svg{width:17px;height:17px}
.v195-tabs button:hover{background:#f2f8fd;color:#315f82}
.v195-tabs button.active{background:#e8f4ff;color:var(--v195-primary);border-color:#bcdaf2}
.v195-tabs button b{min-width:20px;height:20px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#eff4f8;color:#587087;font-size:10px}
.v195-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.v195-kpi-card{
  min-height:92px;padding:15px;border:1px solid var(--v195-border);border-radius:var(--v195-radius-md);
  background:var(--v195-surface);display:flex;align-items:center;gap:12px;box-shadow:0 5px 16px rgba(15,42,67,.035)
}
.v195-kpi-card>div{display:grid;gap:4px}.v195-kpi-card span,.v195-kpi-card small{color:var(--v195-muted);font-size:11px}.v195-kpi-card strong{color:var(--v195-text);font-size:22px}
.v195-kpi-icon{width:38px;height:38px;border-radius:10px;display:grid!important;place-items:center;background:#edf6fd;color:var(--v195-primary)}
.v195-kpi-card.success .v195-kpi-icon{background:#e9f7ef;color:var(--v195-success)}
.v195-kpi-card.warning .v195-kpi-icon{background:#fff5e5;color:var(--v195-warning)}
.v195-kpi-card.danger .v195-kpi-icon{background:#fff0f2;color:var(--v195-danger)}
.v195-list-toolbar{
  display:grid;grid-template-columns:minmax(260px,1.5fr) auto auto;gap:10px;align-items:center;
  padding:10px;border:1px solid var(--v195-border);border-radius:var(--v195-radius-md);background:var(--v195-surface)
}
.v195-search{display:flex;align-items:center;gap:8px;min-height:42px;padding:0 11px;border:1px solid var(--v195-border);border-radius:9px;background:#fff;color:var(--v195-muted)}
.v195-search input{width:100%;min-height:40px;border:0!important;outline:0;background:transparent!important;color:var(--v195-text)!important}
.v195-list-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.v195-list-filters select,.v195-list-filters input{min-height:42px;border:1px solid var(--v195-border);border-radius:9px;background:#fff;color:var(--v195-text);padding-inline:10px}
.v195-table-card{overflow:auto;border:1px solid var(--v195-border);border-radius:var(--v195-radius-lg);background:var(--v195-surface);box-shadow:0 5px 18px rgba(15,42,67,.035)}
.v195-table-card table{width:100%;border-collapse:collapse;min-width:820px}
.v195-table-card th{position:sticky;top:0;z-index:1;padding:12px 10px;background:#f0f6fb;color:#48637b;font-size:12px;text-align:right;border-bottom:1px solid var(--v195-border)}
.v195-table-card td{padding:12px 10px;color:var(--v195-text);border-bottom:1px solid #edf2f6}
.v195-table-card tbody tr:hover td{background:#fbfdff}
.v195-document-header{min-height:90px}
.v195-document-title h1{font-size:25px}.v195-document-title strong{font-size:12px;color:var(--v195-muted)}
.v195-workflow-steps{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:0;padding:6px 2px
}
.v195-workflow-step{position:relative;display:flex;align-items:flex-start;justify-content:center;gap:8px;min-width:0;color:#8a9bac}
.v195-workflow-step:not(:last-child)::after{content:"";position:absolute;top:16px;left:-50%;width:100%;height:3px;background:#d8e3ec;z-index:0}
.v195-step-dot{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:#a7b5c2;color:#fff;font-weight:900}
.v195-workflow-step>div{display:grid;gap:2px}.v195-workflow-step b{font-size:12px;color:inherit}.v195-workflow-step small{font-size:10px;color:inherit}
.v195-workflow-step.done,.v195-workflow-step.current{color:var(--v195-primary)}
.v195-workflow-step.done .v195-step-dot,.v195-workflow-step.current .v195-step-dot{background:var(--v195-primary)}
.v195-workflow-step.done:not(:last-child)::after{background:var(--v195-primary)}
.v195-document-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,320px);gap:14px;align-items:start}
.v195-document-grid>main,.v195-document-grid>aside{min-width:0}
.v195-document-grid>aside{background:var(--v195-surface);border:1px solid var(--v195-border);border-radius:var(--v195-radius-md);padding:14px}
.v195-action-bar{
  position:sticky;bottom:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 14px;border:1px solid var(--v195-border);border-radius:var(--v195-radius-md);
  background:rgba(255,255,255,.97);box-shadow:0 -6px 24px rgba(15,42,67,.07);backdrop-filter:blur(8px)
}
.v195-action-bar>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:1100px){.v195-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v195-document-grid{grid-template-columns:1fr}.v195-document-grid>aside{order:-1}.v195-list-toolbar{grid-template-columns:1fr}.v195-list-actions{justify-content:flex-start}}
@media(max-width:700px){.v195-page-header,.v195-document-header{align-items:flex-start;flex-direction:column}.v195-kpi-grid{grid-template-columns:1fr}.v195-workflow-steps{grid-template-columns:1fr}.v195-workflow-step{justify-content:flex-start}.v195-workflow-step::after{display:none}.v195-action-bar{position:static;align-items:stretch;flex-direction:column}.v195-action-bar>div{width:100%}}
/* ===== END V195.0 UNIFIED ERP DESIGN SYSTEM FOUNDATION ===== */


/* ===== V195.2 PROCUREMENT RFQ UNIFIED WORKSPACE ===== */
[data-v195-module='procurement-rfq-create'] .procurement-rfq-create-section{
  display:grid;gap:14px;padding:20px;border:1px solid var(--v195-border);border-radius:var(--v195-radius-md);
  background:var(--v195-surface);box-shadow:0 5px 18px rgba(15,42,67,.035)
}
[data-v195-module='procurement-rfq-create'] .procurement-section-heading{
  display:flex;align-items:center;justify-content:space-between;gap:14px
}
[data-v195-module='procurement-rfq-create'] .procurement-section-heading>div{display:grid;gap:4px}
[data-v195-module='procurement-rfq-create'] .procurement-section-heading b{color:var(--v195-text);font-size:15px}
[data-v195-module='procurement-rfq-create'] .procurement-section-heading span{color:var(--v195-muted);font-size:11px}
[data-v195-module='procurement-rfq-create'] .procurement-step-badge{
  width:34px;height:34px;border-radius:50%;display:grid!important;place-items:center;
  background:var(--v195-primary)!important;color:#fff!important;font-weight:900
}
[data-v195-module='procurement-rfq-create'] .procurement-field{display:grid;gap:7px}
[data-v195-module='procurement-rfq-create'] .procurement-field>span{color:#4d6881;font-weight:800;font-size:12px}
[data-v195-module='procurement-rfq-create'] .procurement-field select{
  width:100%;min-height:48px;padding-inline:12px;border-radius:9px;
  background:#fff!important;color:var(--v195-text)!important;border:1px solid #cddbe7!important
}
[data-v195-module='procurement-rfq-create'] .procurement-rfq-safety-note{
  padding:11px 13px;border-radius:9px;background:#eaf8f1!important;color:var(--v195-success)!important;
  font-weight:800;border:1px solid #d5efe1
}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-picker{margin-top:14px}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--v195-muted);font-size:12px
}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-toolbar span{display:flex;align-items:center;gap:6px}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-toolbar b{color:var(--v195-text)}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:420px;overflow:auto;padding:2px
}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-grid label{
  position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 26px;align-items:center;gap:11px;
  min-height:72px;padding:11px 12px;border:1px solid var(--v195-border);border-radius:10px;background:#fff;cursor:pointer
}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-grid label:hover{background:#f8fbfe;border-color:#8bbded}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-grid label.selected{background:#eef6fd;border-color:var(--v195-primary)}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-grid label>input{position:absolute;opacity:0;pointer-events:none}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-avatar{
  width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:#e9f4fd;color:var(--v195-primary);font-weight:900
}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-info{display:grid;gap:4px;min-width:0}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-info b{color:var(--v195-text)}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-info small{color:var(--v195-muted)}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-check{
  width:24px;height:24px;border:1px solid var(--v195-border);border-radius:7px;display:grid;place-items:center;color:#fff
}
[data-v195-module='procurement-rfq-create'] .procurement-supplier-grid label.selected .procurement-supplier-check{
  border-color:var(--v195-primary);background:var(--v195-primary)
}
.v195-rfq-create-summary{display:grid;gap:0!important}
.v195-rfq-create-summary h3{margin:0 0 8px;color:var(--v195-text)}
.v195-rfq-create-summary>div{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #edf2f6
}
.v195-rfq-create-summary>div span{color:var(--v195-muted);font-size:12px}
.v195-rfq-create-summary>div b{color:var(--v195-text);font-size:12px;text-align:left}
.v195-rfq-create-summary .v195-rfq-create-safe{
  margin-top:12px;padding:12px;border:0;border-radius:10px;background:#eef7ff;color:#2e6f9f;
  display:flex;justify-content:flex-start;align-items:flex-start
}
.v195-rfq-create-summary .v195-rfq-create-safe svg{width:18px;height:18px;flex:0 0 auto}
.v195-rfq-create-summary .v195-rfq-create-safe span{color:#2e6f9f;font-weight:700}
.v195-rfq-create-count{color:var(--v195-muted);font-size:12px}
.v195-rfq-create-count b{color:var(--v195-text);font-size:16px}
@media(max-width:820px){
  [data-v195-module='procurement-rfq-create'] .procurement-supplier-grid{grid-template-columns:1fr}
}
/* ===== END V195.2 PROCUREMENT RFQ UNIFIED WORKSPACE ===== */
/* =========================================================
   BEG ERP V202 — Enterprise Workspace
   Phase 1.1 visual authority layer
   Loaded AFTER legacy styles.
   ========================================================= */

@media (min-width: 1101px) {

  /* ---------- Workspace geometry ---------- */

  .enterprise-workspace-v202 {
    --v202-sidebar-width: 198px;
    --v202-sidebar-collapsed: 72px;

    display: grid !important;
    grid-template-columns: var(--v202-sidebar-width) minmax(0, 1fr) !important;
    grid-template-areas: "sidebar main" !important;

    min-height: 100vh;
    width: 100%;

    background: #f4f7fa !important;
    direction: ltr;
  }

  .enterprise-workspace-v202.sidebar-collapsed-v202 {
    grid-template-columns: var(--v202-sidebar-collapsed) minmax(0, 1fr) !important;
  }

  .enterprise-workspace-v202 > main {
    grid-area: main !important;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    direction: rtl;
  }

  /* ---------- Sidebar ---------- */

  .enterprise-workspace-v202 .enterprise-sidebar-v202 {
    grid-area: sidebar !important;

    position: sticky;
    inset-block-start: 0;

    width: 100%;
    height: 100vh;

    display: flex !important;
    flex-direction: column;

    padding: 14px 10px 12px;

    background:
      radial-gradient(circle at 20% 0%, rgba(28,126,194,.20), transparent 30%),
      linear-gradient(180deg,#0a355d 0%,#082b4d 48%,#061f39 100%) !important;

    color: #fff !important;

    border: 0 !important;
    border-inline-end: 1px solid rgba(255,255,255,.08) !important;

    box-shadow: 8px 0 26px rgba(6,31,53,.10) !important;

    overflow: hidden;
    z-index: 100;
  }

  .enterprise-sidebar-v202,
  .enterprise-sidebar-v202 * {
    box-sizing: border-box;
  }

  /* ---------- Brand ---------- */

  .enterprise-sidebar-v202 .sidebar-brand-v202 {
    min-height: 60px;

    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 28px;
    align-items: center;

    gap: 8px;
    padding: 5px 4px 13px;
    margin: 0 0 8px;

    border-bottom: 1px solid rgba(255,255,255,.10) !important;

    background: transparent !important;
  }

  .enterprise-sidebar-v202 .sidebar-brand-mark-v202 {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: linear-gradient(145deg,#f6c64b,#e5a019) !important;
    color: #092a48 !important;

    font-size: 11px;
    font-weight: 950;
  }

  .enterprise-sidebar-v202 .sidebar-brand-copy-v202 {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .enterprise-sidebar-v202 .sidebar-brand-copy-v202 strong {
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1.1;
  }

  .enterprise-sidebar-v202 .sidebar-brand-copy-v202 small {
    color: #9dbbd0 !important;
    font-size: 8.5px !important;
  }

  .enterprise-sidebar-v202 .sidebar-collapse-v202 {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;

    background: rgba(255,255,255,.06) !important;
    color: #c8ddea !important;

    box-shadow: none !important;
  }

  .enterprise-sidebar-v202 .sidebar-collapse-v202:hover {
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
  }

  /* ---------- Navigation ---------- */

  .enterprise-sidebar-v202 .sidebar-nav-v202 {
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 2px;

    padding: 3px 0 8px;
    margin: 0;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
  }

  .enterprise-sidebar-v202 .sidebar-nav-item-v202 {
    width: 100%;
    min-height: 43px;

    display: grid !important;
    grid-template-columns: 32px minmax(0,1fr);
    align-items: center;

    gap: 8px;

    margin: 0;
    padding: 4px 8px !important;

    border: 1px solid transparent !important;
    border-radius: 10px !important;

    background: transparent !important;
    color: #d5e3ee !important;

    box-shadow: none !important;

    text-align: right;
  }

  .enterprise-sidebar-v202 .sidebar-nav-item-v202:hover {
    background: rgba(255,255,255,.065) !important;
    color: #fff !important;
  }

  .enterprise-sidebar-v202 .sidebar-nav-item-v202.active {
    background:
      linear-gradient(90deg,#1577bd 0%,#12679f 100%) !important;

    color: #fff !important;

    border-color: rgba(94,190,247,.24) !important;

    box-shadow:
      inset 3px 0 0 #55c3ff,
      0 6px 15px rgba(2,26,45,.18) !important;
  }

  .enterprise-sidebar-v202 .sidebar-nav-icon-v202 {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    background: transparent !important;
    color: inherit !important;
  }

  .enterprise-sidebar-v202 .sidebar-nav-icon-v202 svg {
    width: 19px !important;
    height: 19px !important;

    stroke-width: 1.8;
  }

  .enterprise-sidebar-v202 .sidebar-nav-label-v202 {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: inherit !important;

    font-size: 12px !important;
    font-weight: 650;
  }

  .enterprise-sidebar-v202 .sidebar-footer-v202 {
    display: grid;

    gap: 1px;

    padding: 9px 7px 2px;

    border-top: 1px solid rgba(255,255,255,.08) !important;

    background: transparent !important;
    color: #8eafc6 !important;
  }

  .enterprise-sidebar-v202 .sidebar-footer-v202 span {
    color: #d8e7f1 !important;
    font-size: 9px;
    font-weight: 800;
  }

  .enterprise-sidebar-v202 .sidebar-footer-v202 small {
    color: #779bb5 !important;
    font-size: 7.5px;
  }

  /* ---------- Collapsed ---------- */

  .sidebar-collapsed-v202 .sidebar-brand-v202 {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }

  .sidebar-collapsed-v202 .sidebar-brand-copy-v202,
  .sidebar-collapsed-v202 .sidebar-nav-label-v202,
  .sidebar-collapsed-v202 .sidebar-footer-v202 {
    display: none !important;
  }

  .sidebar-collapsed-v202 .sidebar-collapse-v202 {
    position: absolute;
    top: 62px;
    left: 22px;
  }

  .sidebar-collapsed-v202 .sidebar-nav-v202 {
    margin-top: 35px;
  }

  .sidebar-collapsed-v202 .sidebar-nav-item-v202 {
    grid-template-columns: 1fr !important;
    justify-items: center;
    padding-inline: 5px !important;
  }

  /* ---------- Topbar ---------- */

  .enterprise-workspace-v202 .topbar-reference-v191 {
    position: sticky;
    top: 0;

    z-index: 90;

    min-height: 64px !important;
    height: 64px !important;

    display: grid !important;

    grid-template-columns:
      minmax(360px, 1fr)
      auto
      auto !important;

    grid-template-areas:
      "search create actions" !important;

    align-items: center;

    gap: 12px;

    padding: 9px 18px !important;

    background: rgba(255,255,255,.98) !important;
    color: #173a57 !important;

    border-bottom: 1px solid #dfe8ef !important;

    box-shadow: 0 3px 12px rgba(16,48,72,.04) !important;
  }

  .enterprise-workspace-v202 .topbar-reference-v191 .enterprise-brand-v191,
  .enterprise-workspace-v202 .topbar-reference-v191 .topbar-title,
  .enterprise-workspace-v202 .mobile-menu-btn {
    display: none !important;
  }

  .enterprise-workspace-v202 .topbar-search {
    grid-area: search !important;

    justify-self: center;

    width: min(700px, 100%) !important;
    min-width: 260px;
    min-height: 42px !important;

    margin: 0 !important;

    background: #f7f9fb !important;
    color: #536f84 !important;

    border: 1px solid #dce6ed !important;
    border-radius: 11px !important;

    box-shadow: none !important;
  }

  .enterprise-workspace-v202 .topbar-search:hover {
    background: #fff !important;
    border-color: #bfd2df !important;
  }

  .enterprise-workspace-v202 .quick-create-wrap-v202 {
    grid-area: create !important;
  }

  .enterprise-workspace-v202 .global-create-v202 {
    height: 42px;
    min-width: 104px;

    padding-inline: 15px;

    border-radius: 10px;

    box-shadow: 0 5px 14px rgba(18,116,199,.14);
  }

  .enterprise-workspace-v202 .topbar-actions-reference-v191 {
    grid-area: actions !important;

    display: flex !important;
    align-items: center;
    gap: 5px !important;
  }

  .enterprise-workspace-v202 .topbar-utility-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;

    padding: 0 !important;

    border-radius: 10px !important;

    background: #f6f9fb !important;
    border-color: #dde7ee !important;

    color: #33566f !important;
  }

  .enterprise-workspace-v202 .topbar-utility-button svg {
    width: 18px !important;
    height: 18px !important;
  }

  .enterprise-workspace-v202 .user-chip-profile-v191 {
    min-height: 42px !important;

    padding: 2px 6px 2px 8px !important;

    background: transparent !important;
    border-color: transparent !important;

    color: #183a55 !important;
  }

  .enterprise-workspace-v202 .user-meta strong {
    color: #173954 !important;
  }

  .enterprise-workspace-v202 .user-meta b {
    color: #7790a3 !important;
  }

  /* Remove old horizontal navigation completely on desktop */
  .enterprise-workspace-v202 .top-navigation-v1906,
  .enterprise-workspace-v202 .top-navigation-v191 {
    display: none !important;
  }

  /* ---------- Content ---------- */

  .enterprise-workspace-v202 .content {
    width: 100%;
    min-width: 0;

    padding: 18px !important;

    background:
      radial-gradient(circle at 82% 0%,rgba(24,126,201,.035),transparent 24%),
      #f4f7fa !important;
  }

  .enterprise-workspace-v202 .dashboard-v1905 {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;

    gap: 14px;
  }

  /* Current dashboard stays usable until V202 Bento replaces it */
  .enterprise-workspace-v202 .dashboard-reference-v191 {
    grid-template-columns: minmax(0,1fr) 278px !important;

    width: 100%;
    max-width: none !important;

    gap: 14px;
  }

  .enterprise-workspace-v202 .dashboard-v191-main {
    min-width: 0;
  }

  /* Protect KPI values from horizontal overflow */
  .enterprise-workspace-v202 .dashboard-v1905-kpis {
    min-width: 0;
  }

  .enterprise-workspace-v202 .dashboard-v1905-kpis .kpi-card {
    min-width: 0 !important;

    padding: 15px !important;
  }

  .enterprise-workspace-v202 .dashboard-v1905-kpis .kpi-card > div {
    min-width: 0 !important;
  }

  .enterprise-workspace-v202 .dashboard-v1905-kpis .kpi-card strong {
    max-width: 100%;

    font-size: clamp(20px,1.55vw,28px) !important;

    white-space: nowrap;
    letter-spacing: -.02em;
  }

  .enterprise-workspace-v202 .dashboard-v1905-kpis .kpi-icon {
    flex: 0 0 42px !important;

    width: 42px !important;
    height: 42px !important;
  }

  .enterprise-workspace-v202 .dashboard-v1905-kpis .kpi-icon svg {
    width: 21px !important;
    height: 21px !important;
  }

  /* Sidebar inside dashboard */
  .enterprise-workspace-v202 .dashboard-v191-sidebar {
    width: 100%;
    min-width: 0;
  }

  .enterprise-workspace-v202 .dashboard-v1905-quick {
    position: static !important;

    width: 100%;

    padding: 14px !important;
  }

  .enterprise-workspace-v202 .dashboard-v1905-quick .quick-card {
    min-height: 48px !important;
  }

  /* We retire this hero in Phase 2, but keep it compact now */
  .enterprise-workspace-v202 .dashboard-v191-hero {
    min-height: 154px !important;
  }

  .enterprise-workspace-v202 .dashboard-hero-copy-v191 {
    padding-block: 30px 14px !important;
  }

  .enterprise-workspace-v202 .dashboard-hero-copy-v191 h2 {
    font-size: clamp(27px,2vw,36px) !important;
  }

}

/* =========================================================
   Desktop widths
   ========================================================= */

@media (min-width:1101px) and (max-width:1400px) {
  .enterprise-workspace-v202 {
    --v202-sidebar-width: 184px;
  }

  .enterprise-workspace-v202 .dashboard-reference-v191 {
    grid-template-columns: minmax(0,1fr) 250px !important;
  }

  .enterprise-workspace-v202 .dashboard-v1905-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

/* =========================================================
   Existing tablet/mobile flow remains authoritative
   ========================================================= */

@media (max-width:1100px) {
  .enterprise-workspace-v202 {
    display: block !important;
  }

  .enterprise-workspace-v202 .enterprise-sidebar-v202 {
    display: none !important;
  }
}

/* =========================================================
   Dark mode
   ========================================================= */

html[data-theme='dark'] .enterprise-workspace-v202 {
  background: #091925 !important;
}

html[data-theme='dark'] .enterprise-workspace-v202 .topbar-reference-v191 {
  background: #0d2333 !important;
  border-color: #233b4d !important;
}

html[data-theme='dark'] .enterprise-workspace-v202 .content {
  background: #091925 !important;
}

html[data-theme='dark'] .enterprise-workspace-v202 .topbar-search {
  background: #122c3f !important;
  border-color: #29485d !important;
  color: #d4e4ee !important;
}


/* =========================================================
   V202 Phase 2 — Executive Bento Dashboard
   ========================================================= */

.dashboard-v202 {
  width: 100%;
  max-width: 1660px;
  margin: 0 auto;

  display: grid;
  gap: 14px;

  color: #173852;
}

/* ---------- Command header ---------- */

.v202-command-header {
  min-height: 126px;

  display: grid;
  grid-template-columns: minmax(300px,1fr) auto;
  grid-template-areas:
    "welcome date"
    "alerts alerts";

  align-items: center;
  gap: 10px 18px;

  padding: 18px 20px;

  border: 1px solid #dce6ed;
  border-radius: 16px;

  background:
    radial-gradient(circle at 8% 20%,rgba(29,134,211,.07),transparent 25%),
    linear-gradient(135deg,#ffffff,#f9fbfd);

  box-shadow: 0 5px 18px rgba(13,54,84,.045);
}

.v202-command-welcome {
  grid-area: welcome;
}

.v202-command-welcome small {
  color: #6f879a;
  font-size: 10px;
  font-weight: 800;
}

.v202-command-welcome h1 {
  margin: 4px 0 4px;

  color: #0b3156;

  font-size: clamp(24px,2vw,34px);
  line-height: 1.15;
  font-weight: 900;
}

.v202-command-welcome p {
  margin: 0;

  color: #71899b;
  font-size: 12px;
}

.v202-command-date {
  grid-area: date;

  display: flex;
  align-items: center;
  gap: 8px;

  color: #668096;
  font-size: 11px;
}

.v202-command-date svg {
  width: 17px;
  height: 17px;
}

.v202-command-date b {
  padding: 6px 10px;

  border-radius: 999px;

  background: #edf4f8;
  color: #45657d;

  font-size: 10px;
}

.v202-command-alerts {
  grid-area: alerts;

  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}

.v202-command-alerts button {
  min-height: 52px;

  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;

  gap: 7px;

  padding: 7px 10px;

  border: 1px solid #e4ebf1;
  border-radius: 11px;

  background: #fff;
  color: #426279;

  text-align: right;
  cursor: pointer;
}

.v202-command-alerts button:hover {
  border-color: #cbdce8;
  transform: translateY(-1px);
}

.v202-command-alerts button > svg {
  width: 20px;
  height: 20px;

  color: #4f7390;
}

.v202-command-alerts button > span {
  display: grid;
}

.v202-command-alerts strong {
  color: #173d5e;
  font-size: 18px;
}

.v202-command-alerts small {
  color: #8193a2;
  font-size: 9px;
}

.v202-command-alerts .warning svg,
.v202-command-alerts .warning strong {
  color: #e98212;
}

.v202-command-alerts .danger svg,
.v202-command-alerts .danger strong {
  color: #dc4050;
}

/* ---------- Financial strip ---------- */

.v202-financial-strip {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
}

.v202-financial-kpi {
  min-width: 0;
  min-height: 112px;

  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;

  gap: 11px;

  padding: 15px 16px;

  border: 1px solid #dfe8ee;
  border-radius: 15px;

  background: #fff;

  box-shadow: 0 4px 14px rgba(16,58,88,.04);
}

.v202-financial-kpi.emphasis {
  border-color: #d5e1ef;

  background:
    linear-gradient(135deg,#fff,#f8fbff);
}

.v202-kpi-icon {
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  border-radius: 12px;
}

.v202-kpi-icon svg {
  width: 21px;
  height: 21px;
}

.v202-kpi-icon.blue {
  background: #eaf4ff;
  color: #1678d5;
}

.v202-kpi-icon.green {
  background: #e9f8f1;
  color: #0e9b61;
}

.v202-kpi-icon.red {
  background: #fff0f1;
  color: #e5535d;
}

.v202-kpi-icon.violet {
  background: #f1edff;
  color: #744bd8;
}

.v202-financial-kpi > div {
  min-width: 0;
}

.v202-financial-kpi small {
  display: block;

  margin-bottom: 5px;

  color: #6d8497;

  font-size: 10px;
  font-weight: 750;
}

.v202-financial-kpi strong {
  display: block;

  overflow: hidden;

  color: #0c3458;

  font-size: clamp(20px,1.6vw,28px);
  line-height: 1.1;
  font-weight: 900;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.v202-financial-kpi strong i {
  color: #61798d;

  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.v202-financial-kpi em {
  display: flex;
  align-items: center;

  gap: 4px;

  margin-top: 6px;

  color: #8193a2;

  font-size: 9px;
  font-style: normal;
}

.v202-financial-kpi em svg {
  width: 12px;
  height: 12px;
}

.v202-financial-kpi em.up {
  color: #159b65;
}

.v202-financial-kpi em.down {
  color: #d9535d;
}

/* ---------- Bento ---------- */

.v202-bento-grid {
  display: grid;

  grid-template-columns:
    minmax(0,1.35fr)
    minmax(280px,.72fr);

  grid-template-areas:
    "performance attention"
    "modules modules"
    "operations quick";

  gap: 12px;

  align-items: stretch;
}

.v202-bento-card {
  min-width: 0;

  padding: 15px 16px;

  border: 1px solid #dfe8ee;
  border-radius: 15px;

  background: #fff;

  box-shadow: 0 4px 14px rgba(16,58,88,.04);
}

.v202-bento-card > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 10px;

  margin-bottom: 13px;
}

.v202-bento-card header small {
  display: block;

  color: #8797a5;

  font-size: 9px;
  font-weight: 700;
}

.v202-bento-card header h2 {
  margin: 2px 0 0;

  color: #153a59;

  font-size: 16px;
}

.v202-bento-card header button {
  min-height: 30px;

  padding: 5px 9px;

  border: 1px solid #dce7ee;
  border-radius: 8px;

  background: #f8fafc;
  color: #2778bb;

  font: inherit;
  font-size: 10px;

  cursor: pointer;
}

/* Performance */

.v202-performance-card {
  grid-area: performance;
}

.v202-trade-summary {
  display: grid;
  gap: 13px;

  padding: 5px 0 12px;
}

.v202-trade-summary > div {
  display: grid;
  grid-template-columns: 86px 120px minmax(120px,1fr);

  align-items: center;
  gap: 10px;
}

.v202-trade-summary span {
  color: #587186;
  font-size: 11px;
}

.v202-trade-summary strong {
  color: #153957;
  font-size: 13px;
}

.v202-trade-summary i {
  height: 8px;

  overflow: hidden;

  border-radius: 999px;

  background: #eaf0f4;
}

.v202-trade-summary i em {
  display: block;

  height: 100%;

  border-radius: inherit;

  background: linear-gradient(90deg,#1886e6,#45a7ef);
}

.v202-trade-summary i.purchase em {
  background: linear-gradient(90deg,#16a570,#50c993);
}

.v202-performance-footer {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));

  gap: 8px;

  padding-top: 12px;

  border-top: 1px solid #edf1f4;
}

.v202-performance-footer span {
  display: grid;

  gap: 3px;

  padding: 8px 10px;

  border-radius: 9px;

  background: #f8fafc;
}

.v202-performance-footer small {
  color: #8193a2;
  font-size: 9px;
}

.v202-performance-footer b {
  color: #173b58;
  font-size: 12px;
}

/* Attention */

.v202-attention-card {
  grid-area: attention;
}

.v202-attention-card > header > svg {
  width: 20px;
  height: 20px;

  color: #e78318;
}

.v202-attention-card > button {
  width: 100%;
  min-height: 46px;

  display: grid;
  grid-template-columns: 9px minmax(0,1fr) auto;

  align-items: center;

  gap: 9px;

  padding: 7px 4px;

  border: 0;
  border-bottom: 1px solid #edf1f4;

  background: transparent;
  color: #254b67;

  text-align: right;
  cursor: pointer;
}

.v202-attention-card > button:last-child {
  border-bottom: 0;
}

.v202-attention-card > button:hover {
  background: #f8fafc;
}

.v202-attention-card > button div {
  display: grid;
}

.v202-attention-card > button b {
  font-size: 11px;
}

.v202-attention-card > button small {
  color: #8496a5;
  font-size: 9px;
}

.v202-attention-card > button strong {
  min-width: 22px;

  text-align: center;

  color: #173b58;

  font-size: 15px;
}

.v202-alert-dot {
  width: 8px;
  height: 8px;

  display: block;

  border-radius: 50%;
}

.v202-alert-dot.orange {
  background: #ef8b18;
}

.v202-alert-dot.red {
  background: #df4e59;
}

.v202-alert-dot.blue {
  background: #2585cf;
}

.v202-alert-dot.violet {
  background: #7850d8;
}

/* Modules */

.v202-module-grid {
  grid-area: modules;

  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));

  gap: 12px;
}

.v202-module-card {
  min-width: 0;
  min-height: 132px;

  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  grid-template-rows: 1fr auto;

  align-items: center;

  gap: 8px 11px;

  padding: 14px;

  border: 1px solid #dfe8ee;
  border-radius: 14px;

  background: #fff;
  color: #1b405d;

  text-align: right;
  cursor: pointer;

  box-shadow: 0 4px 14px rgba(16,58,88,.035);
}

.v202-module-card:hover {
  transform: translateY(-2px);

  border-color: #c8dce8;

  box-shadow: 0 8px 20px rgba(16,58,88,.07);
}

.v202-module-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 11px;
}

.v202-module-icon svg {
  width: 21px;
  height: 21px;
}

.v202-module-icon.projects {
  background: #eaf4ff;
  color: #147bd9;
}

.v202-module-icon.crm {
  background: #f0edff;
  color: #714bd5;
}

.v202-module-icon.maintenance {
  background: #fff1ea;
  color: #e57824;
}

.v202-module-icon.property {
  background: #e9f8f0;
  color: #169866;
}

.v202-module-card > div {
  display: grid;
  min-width: 0;
}

.v202-module-card small {
  color: #758b9d;
  font-size: 10px;
  font-weight: 700;
}

.v202-module-card strong {
  overflow: hidden;

  color: #123a5b;

  font-size: 22px;
  font-weight: 900;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.v202-module-card em {
  color: #8093a2;

  font-size: 9px;
  font-style: normal;
}

.v202-module-card footer {
  grid-column: 1 / -1;

  display: flex;
  justify-content: space-between;

  gap: 8px;

  padding-top: 8px;

  border-top: 1px solid #edf1f4;

  color: #7890a2;

  font-size: 9px;
}

/* Operations */

.v202-operations-card {
  grid-area: operations;
}

.v202-operations-card > button {
  width: 100%;
  min-height: 51px;

  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;

  align-items: center;

  gap: 9px;

  padding: 8px 5px;

  border: 0;
  border-bottom: 1px solid #edf1f4;

  background: transparent;
  color: #244965;

  text-align: right;
  cursor: pointer;
}

.v202-operations-card > button:last-child {
  border-bottom: 0;
}

.v202-operations-card > button:hover {
  background: #f8fafc;
}

.v202-operations-card > button svg {
  width: 19px;
  height: 19px;

  color: #47738f;
}

.v202-operations-card > button span {
  display: grid;
}

.v202-operations-card > button b {
  font-size: 11px;
}

.v202-operations-card > button small {
  color: #8798a5;
  font-size: 9px;
}

.v202-operations-card > button strong {
  color: #183f5f;
  font-size: 11px;
}

/* Quick actions */

.v202-quick-card {
  grid-area: quick;
}

.v202-quick-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));

  gap: 8px;
}

.v202-quick-action {
  min-height: 49px;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 8px 10px;

  border: 1px solid #e2e9ef;
  border-radius: 10px;

  background: #fbfcfd;
  color: #385b74;

  font: inherit;
  font-size: 10px;
  font-weight: 750;

  cursor: pointer;
}

.v202-quick-action:hover {
  background: #fff;
  border-color: #cbdce8;

  transform: translateY(-1px);
}

.v202-quick-action svg {
  width: 18px;
  height: 18px;
}

.v202-quick-action.green {
  color: #149765;
}

.v202-quick-action.red {
  color: #dc4856;
}

.v202-quick-action.orange {
  color: #dc7b19;
}

.v202-quick-action.blue {
  color: #1678cf;
}

.v202-quick-action.slate {
  color: #46647a;
}

/* ---------- Responsive ---------- */

@media (max-width: 1350px) {
  .v202-financial-strip {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .v202-module-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 1050px) {
  .v202-command-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "welcome"
      "date"
      "alerts";
  }

  .v202-command-alerts {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .v202-bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "performance"
      "attention"
      "modules"
      "operations"
      "quick";
  }
}

@media (max-width: 680px) {
  .v202-financial-strip,
  .v202-module-grid,
  .v202-command-alerts,
  .v202-quick-grid {
    grid-template-columns: 1fr;
  }

  .v202-trade-summary > div {
    grid-template-columns: 75px minmax(90px,auto) 1fr;
  }
}

/* ---------- Dark mode ---------- */

html[data-theme='dark'] .dashboard-v202 {
  color: #e7f0f6;
}

html[data-theme='dark'] .v202-command-header,
html[data-theme='dark'] .v202-financial-kpi,
html[data-theme='dark'] .v202-bento-card,
html[data-theme='dark'] .v202-module-card {
  background: #102536;
  border-color: #294256;
}

html[data-theme='dark'] .v202-command-welcome h1,
html[data-theme='dark'] .v202-financial-kpi strong,
html[data-theme='dark'] .v202-bento-card header h2,
html[data-theme='dark'] .v202-module-card strong {
  color: #edf5fa;
}

html[data-theme='dark'] .v202-command-alerts button,
html[data-theme='dark'] .v202-performance-footer span,
html[data-theme='dark'] .v202-quick-action {
  background: #132b3d;
  border-color: #29465a;
  color: #dceaf3;
}

/* =========================================================
   V202 Phase 2.1 — Executive Visual Refinement
   ========================================================= */

@media (min-width:1101px) {

  /* More useful screen density */
  .enterprise-workspace-v202 .content {
    padding: 14px 16px 22px !important;
  }

  .dashboard-v202 {
    max-width: 1720px;
    gap: 11px;
  }

  /* ---------- Command Header ---------- */

  .v202-command-header {
    min-height: 0;

    grid-template-columns: minmax(360px,1fr) auto;
    grid-template-areas:
      "welcome date"
      "alerts alerts";

    gap: 8px 20px;

    padding: 14px 18px 13px;

    border-radius: 14px;

    background:
      radial-gradient(circle at 92% 0%,rgba(21,125,205,.065),transparent 24%),
      linear-gradient(135deg,#ffffff 0%,#fbfdff 100%);
  }

  .v202-command-welcome h1 {
    margin: 2px 0 2px;

    font-size: clamp(25px,1.8vw,32px);
    letter-spacing: -.025em;
  }

  .v202-command-welcome p {
    font-size: 11px;
  }

  .v202-command-date {
    align-self: start;
    margin-top: 2px;
  }

  .v202-command-alerts {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 7px;
  }

  .v202-command-alerts button {
    min-height: 45px;

    grid-template-columns: 29px minmax(0,1fr);

    padding: 5px 9px;

    border-radius: 9px;

    background: rgba(255,255,255,.72);
  }

  .v202-command-alerts button > svg {
    width: 18px;
    height: 18px;
  }

  .v202-command-alerts strong {
    font-size: 16px;
    line-height: 1;
  }

  /* ---------- Financial KPIs ---------- */

  .v202-financial-strip {
    gap: 10px;
  }

  .v202-financial-kpi {
    min-height: 94px;

    grid-template-columns: 40px minmax(0,1fr);

    gap: 10px;

    padding: 12px 14px;

    border-radius: 13px;
  }

  .v202-kpi-icon {
    width: 40px;
    height: 40px;

    border-radius: 10px;
  }

  .v202-kpi-icon svg {
    width: 19px;
    height: 19px;
  }

  .v202-financial-kpi small {
    margin-bottom: 3px;

    font-size: 9.5px;
  }

  .v202-financial-kpi strong {
    font-size: clamp(20px,1.45vw,26px);
    letter-spacing: -.035em;
  }

  .v202-financial-kpi em {
    margin-top: 4px;

    font-size: 8.5px;
  }

  .v202-financial-kpi.emphasis {
    position: relative;
    overflow: hidden;

    border-color: #cddfec;

    background:
      radial-gradient(circle at 10% 15%,rgba(116,75,216,.07),transparent 30%),
      #fff;
  }

  .v202-financial-kpi.emphasis::after {
    content: "";

    position: absolute;
    inset-block: 12px;
    inset-inline-start: 0;

    width: 3px;

    border-radius: 0 3px 3px 0;

    background: #7650d6;
  }

  /* ---------- Main Bento ---------- */

  .v202-bento-grid {
    grid-template-columns:
      minmax(0,1.55fr)
      minmax(300px,.65fr);

    gap: 10px;
  }

  .v202-bento-card {
    padding: 14px;

    border-radius: 13px;
  }

  .v202-bento-card > header {
    margin-bottom: 10px;
  }

  .v202-bento-card header h2 {
    font-size: 15px;
  }

  /* ---------- Performance ---------- */

  .v202-performance-card {
    min-height: 220px;
  }

  .v202-trade-summary {
    gap: 12px;

    padding: 5px 2px 10px;
  }

  .v202-trade-summary > div {
    grid-template-columns: 82px 118px minmax(160px,1fr);
  }

  .v202-trade-summary i {
    height: 7px;
  }

  .v202-performance-footer {
    gap: 7px;

    padding-top: 10px;
  }

  .v202-performance-footer span {
    padding: 7px 9px;

    background: #f7fafc;
  }

  /* ---------- Action Center ---------- */

  .v202-attention-card {
    min-height: 220px;

    background:
      linear-gradient(180deg,#fff 0%,#fcfdfe 100%);
  }

  .v202-attention-card > button {
    min-height: 42px;

    padding-block: 5px;
  }

  .v202-attention-card > button b {
    color: #244863;
  }

  /* ---------- Module cards ---------- */

  .v202-module-grid {
    gap: 10px;
  }

  .v202-module-card {
    min-height: 112px;

    grid-template-columns: 38px minmax(0,1fr);

    gap: 7px 10px;

    padding: 12px 13px;

    border-radius: 12px;
  }

  .v202-module-icon {
    width: 38px;
    height: 38px;

    border-radius: 10px;
  }

  .v202-module-icon svg {
    width: 19px;
    height: 19px;
  }

  .v202-module-card strong {
    font-size: 20px;
  }

  .v202-module-card footer {
    padding-top: 6px;
  }

  /* Give Property its own premium identity */
  .v202-module-card:has(.v202-module-icon.property) {
    background:
      radial-gradient(circle at 90% 10%,rgba(18,157,104,.07),transparent 28%),
      #fff;
  }

  /* ---------- Operations / quick actions ---------- */

  .v202-operations-card > button {
    min-height: 45px;
  }

  .v202-quick-grid {
    gap: 7px;
  }

  .v202-quick-action {
    min-height: 44px;

    padding: 7px 9px;

    border-radius: 9px;
  }

  /* ---------- Unified hover language ---------- */

  .v202-financial-kpi,
  .v202-bento-card,
  .v202-module-card,
  .v202-command-alerts button,
  .v202-quick-action {
    transition:
      transform .16s ease,
      border-color .16s ease,
      box-shadow .16s ease,
      background .16s ease;
  }

  .v202-financial-kpi:hover,
  .v202-module-card:hover {
    transform: translateY(-2px);

    border-color: #c7dbe7;

    box-shadow: 0 8px 22px rgba(13,53,81,.065);
  }

  /* ---------- Typography hierarchy ---------- */

  .dashboard-v202 h1,
  .dashboard-v202 h2,
  .dashboard-v202 strong,
  .dashboard-v202 b {
    text-rendering: optimizeLegibility;
  }

  .dashboard-v202 button:focus-visible {
    outline: 2px solid rgba(24,132,220,.5);
    outline-offset: 2px;
  }

}

/* =========================================================
   Wide executive screens
   ========================================================= */

@media (min-width:1500px) {

  .v202-command-header {
    grid-template-columns: minmax(420px,1fr) auto;
  }

  .v202-financial-strip {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

  .v202-module-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

}

/* =========================================================
   Mid desktop
   ========================================================= */

@media (min-width:1101px) and (max-width:1349px) {

  .v202-bento-grid {
    grid-template-columns: minmax(0,1.35fr) minmax(270px,.75fr);
  }

  .v202-trade-summary > div {
    grid-template-columns: 72px 105px minmax(100px,1fr);
  }

}

/* =========================================================
   Dark refinements
   ========================================================= */

html[data-theme='dark'] .v202-financial-kpi.emphasis,
html[data-theme='dark'] .v202-attention-card,
html[data-theme='dark'] .v202-module-card:has(.v202-module-icon.property) {
  background: #102536;
}

/* =========================================================
   V202 Phase 3B — Executive Intelligence Binding
   ========================================================= */

.v202-module-card-rich {
  grid-template-rows: auto auto auto;
  min-height: 150px;
}

.v202-module-card-rich .v202-module-metrics {
  grid-column: 1 / -1;

  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));

  gap: 6px;

  padding-top: 7px;

  border-top: 1px solid #edf1f4;
}

.v202-module-card-rich .v202-module-metrics span {
  min-width: 0;

  display: grid;

  gap: 2px;

  padding: 6px 7px;

  border-radius: 8px;

  background: #f8fafc;
}

.v202-module-card-rich .v202-module-metrics small {
  color: #8395a4;

  font-size: 8px;
}

.v202-module-card-rich .v202-module-metrics b {
  overflow: hidden;

  color: #173d5b;

  font-size: 10px;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.v202-module-card footer .danger {
  color: #d94e58;

  font-weight: 800;
}

.v202-attention-card > button strong {
  font-variant-numeric: tabular-nums;
}

html[data-theme='dark'] .v202-module-card-rich .v202-module-metrics span {
  background: #132b3d;
}

html[data-theme='dark'] .v202-module-card-rich .v202-module-metrics b {
  color: #e4eef5;
}

/* =========================================================
   V202 Phase 3C — Dark Mode Visual Authority
   ========================================================= */

html[data-theme='dark'] .dashboard-v202 {
  color: #dce9f2;
}

html[data-theme='dark'] .v202-command-header,
html[data-theme='dark'] .v202-financial-kpi,
html[data-theme='dark'] .v202-bento-card,
html[data-theme='dark'] .v202-module-card {
  background: #102536 !important;
  border-color: #284358 !important;
  box-shadow: 0 5px 18px rgba(0,0,0,.14) !important;
}

/* ---------- Headings ---------- */

html[data-theme='dark'] .v202-command-welcome h1,
html[data-theme='dark'] .v202-bento-card header h2,
html[data-theme='dark'] .v202-module-card strong,
html[data-theme='dark'] .v202-financial-kpi strong {
  color: #f1f6fa !important;
}

html[data-theme='dark'] .v202-command-welcome small,
html[data-theme='dark'] .v202-command-welcome p,
html[data-theme='dark'] .v202-bento-card header small,
html[data-theme='dark'] .v202-module-card small,
html[data-theme='dark'] .v202-module-card em,
html[data-theme='dark'] .v202-financial-kpi small,
html[data-theme='dark'] .v202-financial-kpi em {
  color: #91aabd !important;
}

/* ---------- Command Header ---------- */

html[data-theme='dark'] .v202-command-date {
  color: #a1b6c6 !important;
}

html[data-theme='dark'] .v202-command-date b {
  background: #183247 !important;
  color: #c9dbe7 !important;
}

html[data-theme='dark'] .v202-command-alerts button {
  background: #132b3d !important;
  border-color: #29475c !important;
  color: #dce9f2 !important;
}

html[data-theme='dark'] .v202-command-alerts button > svg {
  color: #82a4bb !important;
}

html[data-theme='dark'] .v202-command-alerts strong {
  color: #f3f7fa !important;
}

html[data-theme='dark'] .v202-command-alerts small {
  color: #91a8ba !important;
}

/* keep state colors authoritative */
html[data-theme='dark'] .v202-command-alerts .warning svg,
html[data-theme='dark'] .v202-command-alerts .warning strong {
  color: #ff9f32 !important;
}

html[data-theme='dark'] .v202-command-alerts .danger svg,
html[data-theme='dark'] .v202-command-alerts .danger strong {
  color: #ff6672 !important;
}

/* ---------- Financial KPI ---------- */

html[data-theme='dark'] .v202-financial-kpi strong i {
  color: #9fb4c4 !important;
}

html[data-theme='dark'] .v202-financial-kpi em.up {
  color: #41d696 !important;
}

html[data-theme='dark'] .v202-financial-kpi em.down {
  color: #ff7580 !important;
}

html[data-theme='dark'] .v202-kpi-icon.blue {
  background: #123c61 !important;
  color: #5fb6ff !important;
}

html[data-theme='dark'] .v202-kpi-icon.green {
  background: #123d32 !important;
  color: #50d7a0 !important;
}

html[data-theme='dark'] .v202-kpi-icon.red {
  background: #49282e !important;
  color: #ff7881 !important;
}

html[data-theme='dark'] .v202-kpi-icon.violet {
  background: #34295b !important;
  color: #b19aff !important;
}

/* ---------- Performance ---------- */

html[data-theme='dark'] .v202-trade-summary span {
  color: #9cb0bf !important;
}

html[data-theme='dark'] .v202-trade-summary strong {
  color: #eef5f9 !important;
}

html[data-theme='dark'] .v202-trade-summary i {
  background: #223b4d !important;
}

html[data-theme='dark'] .v202-performance-footer {
  border-color: #294255 !important;
}

html[data-theme='dark'] .v202-performance-footer span {
  background: #132b3d !important;
}

html[data-theme='dark'] .v202-performance-footer small {
  color: #91a8b9 !important;
}

html[data-theme='dark'] .v202-performance-footer b {
  color: #f0f6fa !important;
}

/* ---------- Action Center ---------- */

html[data-theme='dark'] .v202-attention-card {
  background: #102536 !important;
}

html[data-theme='dark'] .v202-attention-card > header > svg {
  color: #ff9b2f !important;
}

html[data-theme='dark'] .v202-attention-card > button {
  border-bottom-color: #294255 !important;
  color: #dce8ef !important;
}

html[data-theme='dark'] .v202-attention-card > button:hover {
  background: #142d40 !important;
}

html[data-theme='dark'] .v202-attention-card > button b {
  color: #edf4f8 !important;
}

html[data-theme='dark'] .v202-attention-card > button small {
  color: #8fa7b8 !important;
}

html[data-theme='dark'] .v202-attention-card > button strong {
  color: #f3f7fa !important;
}

/* ---------- Module Cards ---------- */

html[data-theme='dark'] .v202-module-card footer {
  border-color: #294255 !important;
  color: #91a9ba !important;
}

html[data-theme='dark'] .v202-module-card footer span {
  color: #a8bdcb !important;
}

html[data-theme='dark'] .v202-module-card footer .danger {
  color: #ff727c !important;
}

html[data-theme='dark'] .v202-module-card-rich .v202-module-metrics {
  border-color: #294255 !important;
}

html[data-theme='dark'] .v202-module-card-rich .v202-module-metrics span {
  background: #132b3d !important;
}

html[data-theme='dark'] .v202-module-card-rich .v202-module-metrics small {
  color: #8ea6b7 !important;
}

html[data-theme='dark'] .v202-module-card-rich .v202-module-metrics b {
  color: #edf5f9 !important;
}

/* ---------- Operations ---------- */

html[data-theme='dark'] .v202-operations-card > button {
  border-bottom-color: #294255 !important;
  color: #dce8ef !important;
}

html[data-theme='dark'] .v202-operations-card > button:hover {
  background: #142d40 !important;
}

html[data-theme='dark'] .v202-operations-card > button svg {
  color: #80a6bf !important;
}

html[data-theme='dark'] .v202-operations-card > button b {
  color: #edf5f9 !important;
}

html[data-theme='dark'] .v202-operations-card > button small {
  color: #8fa6b7 !important;
}

html[data-theme='dark'] .v202-operations-card > button strong {
  color: #f1f6fa !important;
}

/* ---------- Quick actions ---------- */

html[data-theme='dark'] .v202-quick-action {
  background: #132b3d !important;
  border-color: #29465a !important;
  color: #dbe8f0 !important;
}

html[data-theme='dark'] .v202-quick-action:hover {
  background: #173247 !important;
  border-color: #3b6078 !important;
}

/* Preserve semantic action colors */
html[data-theme='dark'] .v202-quick-action.green {
  color: #50d39b !important;
}

html[data-theme='dark'] .v202-quick-action.red {
  color: #ff707a !important;
}

html[data-theme='dark'] .v202-quick-action.orange {
  color: #ff9b36 !important;
}

html[data-theme='dark'] .v202-quick-action.blue {
  color: #65b8ff !important;
}

html[data-theme='dark'] .v202-quick-action.slate {
  color: #b0c2cf !important;
}

/* ---------- General separators ---------- */

html[data-theme='dark'] .v202-bento-card,
html[data-theme='dark'] .v202-module-card,
html[data-theme='dark'] .v202-financial-kpi {
  border-color: #294255 !important;
}

/* =========================================================
   V202 Phase 4A — Executive Alerts Center
   ========================================================= */

.executive-alerts-v202 {
  display: grid;
  gap: 14px;
}

.executive-alert-kpis {
  grid-template-columns: repeat(4,minmax(0,1fr));
}

.executive-alert-kpis button {
  min-height: 84px;

  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas:
    "icon label"
    "icon value";

  align-items: center;

  gap: 2px 10px;

  padding: 12px 14px;

  border: 1px solid #dfe8ee;
  border-radius: 12px;

  background: #fff;

  text-align: right;
  cursor: pointer;
}

.executive-alert-kpis button svg {
  grid-area: icon;

  width: 24px;
  height: 24px;
}

.executive-alert-kpis button span {
  grid-area: label;

  color: #71889a;
  font-size: 10px;
}

.executive-alert-kpis button b {
  grid-area: value;

  color: #173d5b;
  font-size: 22px;
}

.executive-alert-filter {
  display: flex;
  gap: 7px;

  padding: 4px;
}

.executive-alert-filter button {
  padding: 7px 12px;

  border: 1px solid #dce6ed;
  border-radius: 999px;

  background: #fff;
  color: #567187;

  cursor: pointer;
}

.executive-alert-filter button.active {
  background: #116fac;
  border-color: #116fac;
  color: #fff;
}

.executive-alert-list {
  display: grid;
  gap: 7px;
}

.executive-alert-row {
  width: 100%;

  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;

  align-items: center;
  gap: 10px;

  padding: 12px 14px;

  border: 1px solid #dfe8ee;
  border-radius: 11px;

  background: #fff;

  text-align: right;
  cursor: pointer;
}

.executive-alert-row:hover {
  transform: translateY(-1px);
  border-color: #c8dce8;
}

.executive-alert-icon {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 9px;
}

.executive-alert-icon svg {
  width: 18px;
  height: 18px;
}

.executive-alert-copy {
  min-width: 0;

  display: grid;
  gap: 2px;
}

.executive-alert-copy b {
  color: #173b58;
  font-size: 11px;
}

.executive-alert-copy small {
  color: #7b90a1;
  font-size: 9px;
}

.executive-alert-severity {
  min-width: 54px;

  padding: 5px 8px;

  border-radius: 999px;

  text-align: center;

  font-size: 9px;
  font-weight: 800;
}

.executive-alert-row.danger .executive-alert-icon,
.executive-alert-row.danger .executive-alert-severity {
  background: #fff0f1;
  color: #db4d59;
}

.executive-alert-row.warning .executive-alert-icon,
.executive-alert-row.warning .executive-alert-severity {
  background: #fff6e8;
  color: #d77b16;
}

.executive-alert-row.info .executive-alert-icon,
.executive-alert-row.info .executive-alert-severity {
  background: #eaf4ff;
  color: #267dcc;
}

.notif-footer-v202 {
  padding: 8px;

  border-top: 1px solid #e7edf2;
}

.notif-footer-v202 button {
  width: 100%;

  padding: 8px;

  border: 0;
  border-radius: 8px;

  background: #edf5fa;
  color: #176fa8;

  font-weight: 800;
  cursor: pointer;
}

html[data-theme='dark'] .executive-alert-kpis button,
html[data-theme='dark'] .executive-alert-row {
  background: #102536;
  border-color: #294255;
}

html[data-theme='dark'] .executive-alert-kpis button span,
html[data-theme='dark'] .executive-alert-copy small {
  color: #91a8b9;
}

html[data-theme='dark'] .executive-alert-kpis button b,
html[data-theme='dark'] .executive-alert-copy b {
  color: #eef5f9;
}

html[data-theme='dark'] .executive-alert-filter button {
  background: #132b3d;
  border-color: #29465a;
  color: #a9bdca;
}

html[data-theme='dark'] .executive-alert-filter button.active {
  background: #167bbb;
  color: #fff;
}

html[data-theme='dark'] .notif-footer-v202 {
  border-color: #294255;
}

html[data-theme='dark'] .notif-footer-v202 button {
  background: #173247;
  color: #65b8ff;
}

/* =========================================================
   V202 Phase 4B — Saved Views + Alert Preferences
   ========================================================= */

.executive-alert-preferences {
  display: grid;
  gap: 12px;

  padding: 14px;

  border: 1px solid #dfe8ee;
  border-radius: 12px;

  background: #fff;
}

.executive-alert-preferences > header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 12px;
}

.executive-alert-preferences > header > div {
  display: grid;
  gap: 2px;
}

.executive-alert-preferences > header b {
  color: #173b58;
  font-size: 12px;
}

.executive-alert-preferences > header small {
  color: #7b91a2;
  font-size: 9px;
}

.executive-alert-preference-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));

  gap: 7px;
}

.executive-alert-preference-grid button {
  min-height: 48px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 8px;

  padding: 8px 10px;

  border: 1px solid #dce7ee;
  border-radius: 9px;

  background: #f8fafc;
  color: #49677e;

  cursor: pointer;
}

.executive-alert-preference-grid button b {
  font-size: 9px;
}

.executive-alert-preference-grid button.enabled b {
  color: #159865;
}

.executive-alert-preference-grid button.disabled {
  opacity: .58;
}

.executive-alert-preference-grid button.disabled b {
  color: #b05a62;
}

html[data-theme='dark'] .executive-alert-preferences {
  background: #102536;
  border-color: #294255;
}

html[data-theme='dark'] .executive-alert-preferences > header b {
  color: #eef5f9;
}

html[data-theme='dark'] .executive-alert-preferences > header small {
  color: #91a8b9;
}

html[data-theme='dark'] .executive-alert-preference-grid button {
  background: #132b3d;
  border-color: #29465a;
  color: #a9bdca;
}

@media (max-width:1100px) {
  .executive-alert-preference-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* =========================================================
   V202 Phase 4C — Pinned Executive Actions
   ========================================================= */

.v202-quick-card > header > button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.v202-quick-card > header > button svg {
  width: 14px;
  height: 14px;
}

.v202-quick-customizer {
  display: grid;
  gap: 8px;

  margin-bottom: 11px;
  padding: 10px;

  border: 1px solid #dfe8ee;
  border-radius: 10px;

  background: #f8fafc;
}

.v202-quick-customizer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 8px;

  color: #6f8798;
  font-size: 9px;
}

.v202-quick-customizer-head button {
  padding: 4px 8px;

  border: 1px solid #d8e4eb;
  border-radius: 7px;

  background: #fff;
  color: #3078ad;

  font-size: 8px;
  cursor: pointer;
}

.v202-quick-customizer-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));

  gap: 6px;
}

.v202-quick-customizer-grid > button {
  min-width: 0;

  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  align-items: center;

  gap: 6px;

  padding: 7px 8px;

  border: 1px solid #e0e8ee;
  border-radius: 8px;

  background: #fff;
  color: #617d91;

  text-align: right;
  cursor: pointer;
}

.v202-quick-customizer-grid > button svg {
  width: 14px;
  height: 14px;
}

.v202-quick-customizer-grid > button span {
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 9px;
}

.v202-quick-customizer-grid > button b {
  color: #91a1ad;
  font-size: 7px;
}

.v202-quick-customizer-grid > button.active {
  border-color: #acd4ec;

  background: #edf7fd;
  color: #1878b6;
}

.v202-quick-customizer-grid > button.active b {
  color: #168a61;
}

html[data-theme='dark'] .v202-quick-customizer {
  background: #132b3d;
  border-color: #294255;
}

html[data-theme='dark'] .v202-quick-customizer-head {
  color: #91a8b9;
}

html[data-theme='dark'] .v202-quick-customizer-head button,
html[data-theme='dark'] .v202-quick-customizer-grid > button {
  background: #102536;
  border-color: #29465a;
  color: #a9bdca;
}

html[data-theme='dark'] .v202-quick-customizer-grid > button.active {
  background: #14364d;
  border-color: #3179a6;
  color: #6fc3f5;
}

/* =========================================================
   V202 Finance Command Center — Batch 1
   ========================================================= */

.finance-workspaces-v202 {
  position: sticky;
  top: 0;
  z-index: 5;

  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));

  gap: 7px;
  overflow: visible;

  padding: 8px;

  border: 1px solid #dce6ed;
  border-radius: 13px;

  background: rgba(255,255,255,.94);
}

.finance-workspaces-v202 button,
.finance-subtabs-v202 button {
  min-height: 44px;
  justify-content: center;
  white-space: nowrap;
}

.finance-period-v202 {
  margin-top: 10px;
}

.finance-inner-workspace-v202 {
  display: grid;
  gap: 12px;
}

.finance-subtabs-v202 {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;

  padding: 7px;

  border: 1px solid #dce6ed;
  border-radius: 11px;

  background: #f8fafc;
}

.journal-workspace-v202 {
  display: grid;
  gap: 12px;
}

.journal-header-fields-v202 {
  grid-template-columns: minmax(160px,220px) minmax(260px,1fr);
}

.journal-description-v202 {
  min-width: 0;
}

.journal-lines-v202 select,
.journal-lines-v202 input {
  width: 100%;
  min-height: 40px;
}

.journal-lines-v202 select {
  min-width: 260px;
}

.journal-bottom-v202 {
  display: grid;
  grid-template-columns: auto minmax(420px,1fr) auto;

  align-items: center;
  gap: 12px;

  margin-top: 12px;
}

.journal-balance-v202 {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr)) auto;

  align-items: center;
  gap: 8px;

  padding: 10px 12px;

  border: 1px solid #dce6ed;
  border-radius: 10px;

  background: #f8fafc;
}

.journal-balance-v202 > div {
  display: grid;
  gap: 2px;
}

.journal-balance-v202 span {
  color: #7990a0;
  font-size: 9px;
}

.journal-balance-v202 b {
  color: #173b58;
  font-size: 12px;
}

.journal-balance-v202 > strong {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 10px;
}

.journal-balance-v202.balanced > strong {
  background: #e9f8f1;
  color: #168a61;
}

.journal-balance-v202.unbalanced > strong {
  background: #fff1f2;
  color: #c2414d;
}

.journal-actions-v202 {
  display: flex;
  gap: 7px;
}

.accounting-master-v202 .kpi-grid,
.accounting-master-v202 .enterprise-object-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.accounting-master-v202 .kpi-card {
  min-height: 88px;
}

html[data-theme='dark'] .finance-workspaces-v202,
html[data-theme='dark'] .finance-subtabs-v202,
html[data-theme='dark'] .journal-balance-v202 {
  background: #102536;
  border-color: #29465a;
}

html[data-theme='dark'] .finance-workspaces-v202 {
  background: rgba(16,37,54,.96);
}

html[data-theme='dark'] .journal-balance-v202 span {
  color: #91a8b9;
}

html[data-theme='dark'] .journal-balance-v202 b {
  color: #eef5f9;
}

html[data-theme='dark'] .journal-lines-v202 input,
html[data-theme='dark'] .journal-lines-v202 select,
html[data-theme='dark'] .accounting-master-v202 input,
html[data-theme='dark'] .accounting-master-v202 select {
  background: #132b3d;
  border-color: #345267;
  color: #eef5f9;
}

html[data-theme='dark'] .accounting-master-v202 .kpi-card {
  background: #132b3d;
  border-color: #29465a;
  color: #eef5f9;
}

@media (max-width:1200px) {
  .finance-workspaces-v202 {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .journal-bottom-v202 {
    grid-template-columns: 1fr;
  }
}

@media (max-width:760px) {
  .finance-workspaces-v202 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .journal-header-fields-v202 {
    grid-template-columns: 1fr;
  }

  .journal-balance-v202 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* =========================================================
   V202 Finance Command Center — Batch 2
   ========================================================= */

.finance-statements-v202,
.accounting-master-v202,
.finance-inner-workspace-v202 {
  min-width: 0;
}

.finance-statements-v202 .enterprise-panel,
.accounting-master-v202 .panel-card,
.finance-inner-workspace-v202 .panel-card {
  overflow: hidden;
}

.finance-report-filter-v202,
.finance-period-v202 {
  padding: 10px 12px;
  min-height: auto;
}

.finance-report-filter-v202 label,
.finance-period-v202 label {
  min-width: 150px;
}

.finance-data-table-v202 table,
.finance-statements-v202 table,
.accounting-master-v202 table {
  width: 100%;
}

.finance-data-table-v202 th,
.finance-statements-v202 th,
.accounting-master-v202 th {
  white-space: nowrap;
}

.finance-data-table-v202 td,
.finance-statements-v202 td,
.accounting-master-v202 td {
  vertical-align: middle;
}

.bank-file-field-v202 {
  position: relative;
}

.bank-file-input-v202 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

.bank-file-picker-v202 {
  display: flex !important;
  align-items: center;
  justify-content: center;

  min-height: 42px;
  gap: 7px;

  padding: 8px 12px;

  border: 1px dashed #9eb6c8;
  border-radius: 9px;

  cursor: pointer;
}

.bank-file-picker-v202 svg {
  width: 16px;
  height: 16px;
}

.accounting-kpis .kpi-card {
  min-height: 106px;
}

.finance-health-strip > div {
  min-height: 62px;
}

html[data-theme='dark'] .accounting-kpis .kpi-card,
html[data-theme='dark'] .finance-statements-v202 .kpi-card,
html[data-theme='dark'] .accounting-master-v202 .kpi-card,
html[data-theme='dark'] .mini-kpis > div,
html[data-theme='dark'] .enterprise-object-grid > div {
  background: #142d3f;
  border-color: #2b4b60;
  color: #eef6fa;
}

html[data-theme='dark'] .accounting-kpis .kpi-card > span,
html[data-theme='dark'] .accounting-kpis .kpi-card > small,
html[data-theme='dark'] .finance-statements-v202 .kpi-card > span,
html[data-theme='dark'] .accounting-master-v202 .kpi-card > span,
html[data-theme='dark'] .enterprise-object-grid span {
  color: #9fb5c5;
}

html[data-theme='dark'] .accounting-kpis .kpi-card > strong,
html[data-theme='dark'] .finance-statements-v202 .kpi-card > strong,
html[data-theme='dark'] .accounting-master-v202 .kpi-card > strong,
html[data-theme='dark'] .enterprise-object-grid b {
  color: #f7fbfd;
}

html[data-theme='dark'] .finance-data-table-v202,
html[data-theme='dark'] .finance-statements-v202 .table-card,
html[data-theme='dark'] .accounting-master-v202 .table-card {
  background: #102536;
  border-color: #2b4b60;
}

html[data-theme='dark'] .finance-data-table-v202 th,
html[data-theme='dark'] .finance-statements-v202 th,
html[data-theme='dark'] .accounting-master-v202 th {
  background: #183347;
  color: #eaf3f8;
}

html[data-theme='dark'] .finance-data-table-v202 td,
html[data-theme='dark'] .finance-statements-v202 td,
html[data-theme='dark'] .accounting-master-v202 td {
  color: #e2edf3;
  border-color: #29475b;
}

html[data-theme='dark'] .bank-file-picker-v202 {
  background: #132c3e;
  color: #eaf3f8;
  border-color: #42677e;
}

html[data-theme='dark'] .finance-report-filter-v202 input,
html[data-theme='dark'] .finance-report-filter-v202 select,
html[data-theme='dark'] .finance-period-v202 input,
html[data-theme='dark'] .finance-period-v202 select {
  background: #132b3d;
  color: #eef6fa;
  border-color: #345267;
}

html[data-theme='dark'] .finance-statements-v202 .state-card,
html[data-theme='dark'] .accounting-master-v202 .state-card {
  background: #122a3b;
  border-color: #2c4b60;
  color: #9fb5c5;
}

@media (max-width:900px) {
  .finance-report-filter-v202,
  .finance-period-v202 {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:620px) {
  .finance-report-filter-v202,
  .finance-period-v202 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   V202 Sales Command Center — Batch 1
   ========================================================= */

[data-v192-module='sales'] {
  min-width: 0;
}

[data-v192-module='sales'] .v192-page-header {
  margin-bottom: 14px;
}

[data-v192-module='sales'] .v192-page-title {
  gap: 18px;
}

[data-v192-module='sales'] .v192-page-title h1 {
  margin-bottom: 4px;
}

.sales-command-badge-v202 {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

[data-v192-module='sales'] .v192-tabs {
  margin-bottom: 16px;
}

[data-v192-module='sales'] .page-head {
  margin-bottom: 12px;
}

[data-v192-module='sales'] .sales-cycle-banner {
  padding: 18px 20px;
  margin-bottom: 14px;
}

[data-v192-module='sales'] .sales-cycle-banner h2 {
  margin: 4px 0 6px;
}

[data-v192-module='sales'] .cycle-steps {
  margin-top: 14px;
}

[data-v192-module='sales'] .sales-kpis,
[data-v192-module='sales'] .sales-list-kpis {
  gap: 12px;
  margin: 12px 0;
}

[data-v192-module='sales'] .sales-kpis > div,
[data-v192-module='sales'] .sales-list-kpis > div {
  min-height: 86px;
  padding: 16px;
}

[data-v192-module='sales'] .sales-kpis b,
[data-v192-module='sales'] .sales-list-kpis b {
  font-size: 24px;
}

[data-v192-module='sales'] .quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

[data-v192-module='sales'] .filter-bar,
[data-v192-module='sales'] .commercial-list-filters {
  gap: 10px;
  padding: 12px;
}

[data-v192-module='sales'] .commercial-list-filters > input:first-child {
  flex: 1 1 320px;
}

[data-v192-module='sales'] .commercial-list-filters select,
[data-v192-module='sales'] .commercial-list-filters input[type='date'] {
  min-width: 160px;
}

[data-v192-module='sales'] .table-card {
  overflow: auto;
}

[data-v192-module='sales'] table {
  width: 100%;
}

[data-v192-module='sales'] th {
  white-space: nowrap;
}

[data-v192-module='sales'] td {
  vertical-align: middle;
}

[data-v192-module='sales'] .table-empty {
  padding: 44px 20px;
  text-align: center;
}

[data-v192-module='sales'] .table-empty strong,
[data-v192-module='sales'] .table-empty span {
  display: block;
}

[data-v192-module='sales'] .table-empty span {
  margin-top: 5px;
  opacity: .72;
}

.sales-controls-v202 .enterprise-panel,
.sales-pricing-v202 .enterprise-panel {
  overflow: hidden;
}

.sales-controls-tabs-v202 {
  margin-bottom: 14px;
}

.sales-control-form-v202 {
  min-height: auto;
  padding: 12px;
  gap: 10px;
}

.sales-control-form-v202 label {
  min-width: 190px;
}

.sales-control-form-v202 label.grow {
  flex: 1 1 320px;
}

.sales-control-form-v202 input,
.sales-control-form-v202 select {
  min-height: 44px;
}

html[data-theme='dark'] [data-v192-module='sales'] .sales-cycle-banner,
html[data-theme='dark'] [data-v192-module='sales'] .sales-kpis > div,
html[data-theme='dark'] [data-v192-module='sales'] .sales-list-kpis > div,
html[data-theme='dark'] [data-v192-module='sales'] .panel-card,
html[data-theme='dark'] .sales-controls-v202 .enterprise-panel,
html[data-theme='dark'] .sales-pricing-v202 .enterprise-panel {
  background: #132d3f;
  border-color: #2b4d63;
  color: #eef6fa;
}

html[data-theme='dark'] [data-v192-module='sales'] .sales-kpis span,
html[data-theme='dark'] [data-v192-module='sales'] .sales-list-kpis span,
html[data-theme='dark'] [data-v192-module='sales'] .cycle-title,
html[data-theme='dark'] [data-v192-module='sales'] .sales-cycle-banner p {
  color: #9eb6c7;
}

html[data-theme='dark'] [data-v192-module='sales'] .sales-kpis b,
html[data-theme='dark'] [data-v192-module='sales'] .sales-list-kpis b,
html[data-theme='dark'] [data-v192-module='sales'] .sales-cycle-banner h2 {
  color: #f6fbfd;
}

html[data-theme='dark'] [data-v192-module='sales'] .filter-bar,
html[data-theme='dark'] [data-v192-module='sales'] .commercial-list-filters {
  background: #112a3c;
  border-color: #29495e;
}

html[data-theme='dark'] [data-v192-module='sales'] input,
html[data-theme='dark'] [data-v192-module='sales'] select,
html[data-theme='dark'] .sales-control-form-v202 input,
html[data-theme='dark'] .sales-control-form-v202 select {
  background: #10283a;
  color: #eef6fa;
  border-color: #35556a;
}

html[data-theme='dark'] [data-v192-module='sales'] input::placeholder {
  color: #829bad;
}

html[data-theme='dark'] [data-v192-module='sales'] .table-card {
  background: #102536;
  border-color: #2b4b60;
}

html[data-theme='dark'] [data-v192-module='sales'] table thead th {
  background: #1b374b;
  color: #e9f3f8;
  border-color: #315166;
}

html[data-theme='dark'] [data-v192-module='sales'] table tbody td {
  color: #e5eff4;
  border-color: #2b495d;
}

html[data-theme='dark'] [data-v192-module='sales'] table tbody tr:hover {
  background: rgba(82, 161, 208, .08);
}

html[data-theme='dark'] .sales-command-badge-v202 {
  background: #eaf5fb;
  color: #1b5f8c;
  border-color: transparent;
}

html[data-theme='dark'] .sales-controls-tabs-v202 button:not(.active) {
  color: #b3c5d0;
}

html[data-theme='dark'] .sales-controls-v202 .state-card,
html[data-theme='dark'] .sales-pricing-v202 .state-card {
  background: #10283a;
  border-color: #2d4e63;
  color: #9eb6c7;
}

@media (max-width: 1000px) {
  [data-v192-module='sales'] .sales-kpis,
  [data-v192-module='sales'] .sales-list-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  [data-v192-module='sales'] .commercial-list-filters {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 640px) {
  [data-v192-module='sales'] .sales-kpis,
  [data-v192-module='sales'] .sales-list-kpis,
  [data-v192-module='sales'] .commercial-list-filters {
    grid-template-columns: 1fr;
  }

  .sales-control-form-v202 {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   V202 Sales Command Center — Batch 2
   layout + workflow authority
   ========================================================= */

[data-v192-module='sales'] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-v192-module='sales'] > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

[data-v192-module='sales'] .page-head {
  padding: 16px 18px;
  border-radius: 14px;
}

[data-v192-module='sales'] .sales-cycle-banner {
  min-height: 0;
  padding: 16px 18px;
}

[data-v192-module='sales'] .cycle-steps {
  margin-top: 10px;
}

[data-v192-module='sales'] .sales-kpis,
[data-v192-module='sales'] .sales-list-kpis,
[data-v192-module='sales'] .mini-kpis {
  gap: 10px;
  margin: 0;
}

[data-v192-module='sales'] .sales-kpis > div,
[data-v192-module='sales'] .sales-list-kpis > div,
[data-v192-module='sales'] .mini-kpis > div {
  min-height: 72px;
  padding: 12px 15px;
}

[data-v192-module='sales'] .sales-kpis b,
[data-v192-module='sales'] .sales-list-kpis b,
[data-v192-module='sales'] .mini-kpis b {
  font-size: 21px;
}

[data-v192-module='sales'] .quick-actions {
  margin: 0;
}

[data-v192-module='sales'] .filter-bar,
[data-v192-module='sales'] .commercial-list-filters {
  margin: 0;
  min-height: 64px;
}

[data-v192-module='sales'] .table-card {
  margin: 0;
}

[data-v192-module='sales'] .table-card table {
  margin: 0;
}

[data-v192-module='sales'] .table-card th,
[data-v192-module='sales'] .table-card td {
  padding-top: 12px;
  padding-bottom: 12px;
}

[data-v192-module='sales'] .workspace-tabs {
  margin-bottom: 0;
}

.sales-pricing-v202,
.sales-controls-v202 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sales-pricing-v202 .enterprise-panel,
.sales-controls-v202 .enterprise-panel {
  margin: 0;
}

.sales-pricing-v202 .state-card,
.sales-controls-v202 .state-card {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.commercial-status-field-v202 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.commercial-status-field-v202 .v192-status {
  width: fit-content;
}

.workflow-hint {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
}

.workflow-hint.success {
  font-weight: 700;
}

html[data-theme='dark'] [data-v192-module='sales'] {
  background: #081d2b;
}

html[data-theme='dark'] [data-v192-module='sales'] .page-head,
html[data-theme='dark'] [data-v192-module='sales'] .workspace-tabs,
html[data-theme='dark'] [data-v192-module='sales'] .v192-tabs {
  background: #10283a;
  border-color: #2a4a60;
}

html[data-theme='dark'] [data-v192-module='sales'] .mini-kpis > div {
  background: #123044;
  border-color: #2c4d62;
  color: #eef7fb;
}

html[data-theme='dark'] [data-v192-module='sales'] .mini-kpis span {
  color: #9db6c7;
}

html[data-theme='dark'] [data-v192-module='sales'] .mini-kpis b {
  color: #ffffff;
}

html[data-theme='dark'] .workflow-hint {
  background: #172e3d;
  border: 1px solid #3b596c;
  color: #bcd0db;
}

html[data-theme='dark'] .workflow-hint.success {
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .4);
  color: #74d99b;
}

html[data-theme='dark'] .commercial-status-field-v202 {
  background: #10283a;
  border: 1px solid #35566c;
  border-radius: 9px;
  padding: 8px 10px;
}

html[data-theme='dark'] [data-v192-module='sales'] .table-empty,
html[data-theme='dark'] [data-v192-module='sales'] .table-loading-state {
  background: #102536;
  color: #9fb5c5;
}

@media (min-width:1100px) {
  [data-v192-module='sales'] .sales-cycle-banner {
    max-height: 220px;
  }
}


/* =========================================================
   V202 Functional Hub Navigation
   Five clear utility groups + contextual second row.
   ========================================================= */
@media (min-width: 1101px) {
  .enterprise-workspace-v202 .top-navigation-v1906.top-navigation-v191 {
    display: flex !important;
    position: sticky;
    top: 64px;
    z-index: 82;
    min-height: 70px;
    padding: 8px 18px 9px !important;
    gap: 12px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.97) !important;
    border-bottom: 1px solid #dbe7ef !important;
    box-shadow: 0 4px 14px rgba(16,48,72,.045) !important;
    backdrop-filter: blur(12px);
  }

  .enterprise-workspace-v202 .top-nav-current-context,
  .enterprise-workspace-v202 .top-navigation-v191 .quick-create-wrap-v191,
  .enterprise-workspace-v202 .top-nav-home-button {
    display: none !important;
  }

  .enterprise-workspace-v202 .top-nav-primary {
    width: min(1120px,100%);
    display: grid !important;
    grid-template-columns: repeat(5,minmax(150px,1fr));
    gap: 10px;
    align-items: stretch;
    overflow: visible !important;
  }

  .enterprise-workspace-v202 .top-nav-group-button {
    min-width: 0 !important;
    min-height: 52px !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0,1fr) 18px;
    align-items: center;
    gap: 8px;
    padding: 7px 12px !important;
    border: 1px solid #dce7ef !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #173a57 !important;
    box-shadow: 0 3px 10px rgba(15,54,82,.035) !important;
    text-align: right;
  }

  .enterprise-workspace-v202 .top-nav-group-button::after {
    content: "⌄";
    color: #7892a5;
    font-size: 16px;
    line-height: 1;
  }

  .enterprise-workspace-v202 .top-nav-group-button > svg {
    width: 24px !important;
    height: 24px !important;
    padding: 5px;
    box-sizing: content-box;
    border-radius: 9px;
    background: #eef6ff;
    color: #1477c9;
  }

  .enterprise-workspace-v202 .top-nav-group-button > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .enterprise-workspace-v202 .top-nav-group-button:hover,
  .enterprise-workspace-v202 .top-nav-group-button.expanded {
    border-color: #a9cfee !important;
    background: #f7fbff !important;
    transform: translateY(-1px);
  }

  .enterprise-workspace-v202 .top-nav-group-button.active {
    background: linear-gradient(135deg,#1687df,#0869bd) !important;
    border-color: #0874ca !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(13,117,199,.18) !important;
  }

  .enterprise-workspace-v202 .top-nav-group-button.active::after {
    color: rgba(255,255,255,.85);
  }

  .enterprise-workspace-v202 .top-nav-group-button.active > svg {
    background: rgba(255,255,255,.15);
    color: #fff;
  }

  .enterprise-workspace-v202 .top-nav-context-tools {
    position: sticky;
    top: 134px;
    z-index: 80;
    min-height: 54px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 18px !important;
    overflow-x: auto;
    background: #f7fbfe !important;
    border-bottom: 1px solid #dce8f0 !important;
    box-shadow: 0 3px 10px rgba(15,54,82,.025) !important;
  }

  .enterprise-workspace-v202 .top-nav-context-tools button {
    flex: 0 0 auto;
    min-height: 38px !important;
    padding: 7px 13px !important;
    border: 1px solid #d7e5ef !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #31556f !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
  }

  .enterprise-workspace-v202 .top-nav-context-tools button.active {
    background: #147dcb !important;
    border-color: #147dcb !important;
    color: #fff !important;
  }
}

@media (max-width: 1360px) and (min-width: 1101px) {
  .enterprise-workspace-v202 .top-nav-primary {
    grid-template-columns: repeat(5,minmax(120px,1fr));
  }
  .enterprise-workspace-v202 .top-nav-group-button {
    padding-inline: 8px !important;
  }
  .enterprise-workspace-v202 .top-nav-group-button > span {
    font-size: 11px !important;
  }
}


/* V202 BEG AI Executive Intelligence */
.beg-ai-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;min-height:190px;padding:26px 30px;margin-bottom:14px;border:1px solid #d9e8f3;border-radius:20px;background:linear-gradient(120deg,#f4fbff 0%,#fff 54%,#eef8ff 100%);overflow:hidden;position:relative}
.beg-ai-hero:after{content:"";position:absolute;inset-inline-end:-70px;top:-110px;width:310px;height:310px;border-radius:50%;background:radial-gradient(circle,rgba(33,150,243,.15),transparent 68%)}
.beg-ai-hero-copy{position:relative;z-index:1}.beg-ai-version{display:inline-flex;padding:5px 10px;border-radius:999px;background:#e7f4ff;color:#0d75c7;font-size:11px;font-weight:800}
.beg-ai-hero h1{display:flex;align-items:center;gap:10px;margin:10px 0 5px;color:#07375d;font-size:32px;line-height:1.1}.beg-ai-hero p{margin:0;color:#6a8499;font-size:14px}
.beg-ai-capabilities{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.beg-ai-capabilities span{padding:7px 11px;border:1px solid #d8eaf6;border-radius:9px;background:rgba(255,255,255,.8);color:#315a77;font-size:11px;font-weight:700}
.beg-ai-hero-mark{position:relative;z-index:1;min-width:150px;min-height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #d6eaf8;border-radius:20px;background:rgba(255,255,255,.72);box-shadow:0 14px 35px rgba(17,111,179,.08)}
.beg-ai-hero-mark svg{width:40px;height:40px;color:#1181d4}.beg-ai-hero-mark b{font-size:26px;color:#075d9f}.beg-ai-hero-mark small{color:#7a93a7}
.intel-dashboard{padding:18px;border:1px solid #dce8f0;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(20,65,95,.045)}
.intel-dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.intel-eyebrow{font-size:10px;font-weight:800;color:#1683d1;text-transform:uppercase}.intel-dashboard-head h2{margin:3px 0;color:#07375d;font-size:20px}.intel-dashboard-head p{margin:0;color:#7890a3;font-size:12px}.intel-refresh{flex:0 0 auto}
.intel-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.intel-kpi{position:relative;min-height:112px;padding:16px;display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:start;border:1px solid #dce9f2;border-radius:14px;background:linear-gradient(145deg,#fff,#fbfdff);overflow:hidden}
.intel-kpi-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#eaf6ff;color:#0b82d6}.intel-kpi-icon svg{width:22px}.intel-kpi-copy{display:flex;flex-direction:column;min-width:0}.intel-kpi-copy span{font-size:11px;color:#7890a4}.intel-kpi-copy strong{margin-top:3px;color:#07375d;font-size:18px;white-space:nowrap}.intel-kpi-copy small{margin-top:4px;color:#6f899c;font-size:10px}
.intel-spark{position:absolute;inset-inline-end:10px;bottom:8px;width:92px;height:30px;opacity:.7}.intel-spark polyline{fill:none;stroke:#1687df;stroke-width:2;vector-effect:non-scaling-stroke}
.intel-lower-grid{display:grid;grid-template-columns:1.65fr 1fr;gap:12px;margin-top:12px}.intel-panel{padding:16px;border:1px solid #dce9f2;border-radius:14px;background:#fff}.intel-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;color:#6e879a;font-size:10px}.intel-panel-title>div{display:flex;align-items:center;gap:7px;color:#173f5d;font-size:13px}.intel-panel-title svg{width:18px;color:#1687df}
.intel-live{display:flex;align-items:center;gap:5px;color:#168b5b}.intel-live i{width:8px;height:8px;border-radius:50%;background:#1dbb78;box-shadow:0 0 0 4px #e3f8ef}
.intel-runtime-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.intel-runtime-grid>div{padding:11px;border-radius:10px;background:#f7fafc}.intel-runtime-grid span{display:block;color:#8296a5;font-size:9px}.intel-runtime-grid strong{display:block;margin-top:4px;color:#173f5d;font-size:11px}
.intel-scenario-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.intel-scenario-row>div{display:grid;grid-template-columns:22px 1fr auto;gap:6px;align-items:center;padding:9px 10px;border:1px solid #e4edf3;border-radius:9px;color:#698398;font-size:10px}.intel-scenario-row svg{width:17px;color:#e09a16}.intel-scenario-row b{color:#173f5d}
.intel-risk-body{display:flex;align-items:center;justify-content:center;gap:24px;min-height:125px}.intel-risk-ring{--risk:0deg;width:112px;height:112px;display:grid;place-items:center;border-radius:50%;background:conic-gradient(#f3b51b var(--risk),#edf2f5 0);position:relative}.intel-risk-ring:after{content:"";position:absolute;inset:12px;border-radius:50%;background:#fff}.intel-risk-ring>div{position:relative;z-index:1;text-align:center}.intel-risk-ring strong{display:block;color:#153d5c;font-size:20px}.intel-risk-ring small{color:#8295a4}.intel-risk-copy{display:flex;flex-direction:column}.intel-risk-copy span{color:#7c91a1;font-size:10px}.intel-risk-copy strong{margin:5px 0;color:#b47a00;font-size:20px}.intel-risk-copy small{max-width:140px;color:#879aa8;font-size:9px}
.intel-footnote{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;padding:8px;border-radius:9px;background:#f7fafc;color:#7b91a2;font-size:9px}.intel-footnote svg{width:14px}.intel-footnote span{color:#bdd0dc}
.analytics-health-card{margin-top:12px;padding:16px;border:1px solid #dce8f0;border-radius:16px;background:#fff}.analytics-health-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.analytics-health-head h3{display:flex;align-items:center;gap:7px;margin:0;color:#123d5c}.analytics-health-head h3 svg{width:19px;color:#1687df}.analytics-health-head p{margin:3px 0 0;color:#8196a6;font-size:10px}
.analytics-module-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}.analytics-module-tile{min-width:0;padding:11px 8px;border:1px solid #dfeaf1;border-radius:11px;background:#fbfdff;text-align:center;cursor:pointer}.analytics-module-tile:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(17,72,107,.07)}.analytics-module-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f5d;font-size:10px;font-weight:800}.analytics-module-tile b{display:inline-block;margin:7px 0 4px;padding:3px 7px;border-radius:999px;font-size:9px}.analytics-module-tile small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8297a7;font-size:8px}.analytics-module-tile.is-green b{background:#dff7eb;color:#118653}.analytics-module-tile.is-error b{background:#ffe7e7;color:#c33}
@media(max-width:1200px){.intel-kpi-grid{grid-template-columns:repeat(2,1fr)}.analytics-module-grid{grid-template-columns:repeat(4,1fr)}}@media(max-width:760px){.beg-ai-hero{padding:18px;min-height:auto}.beg-ai-hero-mark{display:none}.beg-ai-hero h1{font-size:24px}.intel-kpi-grid,.intel-lower-grid,.intel-runtime-grid,.intel-scenario-row{grid-template-columns:1fr}.analytics-module-grid{grid-template-columns:repeat(2,1fr)}}

.intel-action-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:10px 12px;border:1px solid #dce9f2;border-radius:11px;background:#f8fbfd}.intel-action-row span{color:#7b91a2;font-size:10px}
.intel-decision-lab{margin-top:10px;padding:16px;border:1px solid #cfe5f5;border-radius:14px;background:linear-gradient(145deg,#f7fcff,#fff)}.intel-lab-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.intel-lab-head h3{margin:3px 0;color:#0c4168}.intel-lab-head p{margin:0;color:#7a91a3;font-size:10px}
.intel-lab-controls{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:14px}.intel-lab-controls label{display:flex;flex-direction:column;gap:5px;padding:10px;border:1px solid #dce9f2;border-radius:10px;background:#fff}.intel-lab-controls span{color:#6e8799;font-size:9px}.intel-lab-controls input{width:100%;border:0;outline:0;background:#f5f9fc;border-radius:7px;padding:8px;color:#123f60;font-weight:800}
.intel-lab-results{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:10px}.intel-lab-results>div{padding:12px;border-radius:10px;background:#0c75c5;color:#fff}.intel-lab-results span,.intel-lab-results small{display:block;opacity:.78;font-size:9px}.intel-lab-results strong{display:block;margin:4px 0;font-size:16px}
@media(max-width:760px){.intel-lab-controls,.intel-lab-results{grid-template-columns:1fr 1fr}.intel-action-row,.intel-lab-head{align-items:stretch;flex-direction:column}}

.intel-risk-breakdown-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:12px;margin-top:12px}.intel-risk-breakdown,.intel-recommendations{padding:16px;border:1px solid #dce9f2;border-radius:14px;background:#fff}.intel-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.intel-section-head>div{display:flex;align-items:center;gap:8px}.intel-section-head svg{width:18px;color:#1687df}.intel-section-head span{display:flex;flex-direction:column}.intel-section-head b{color:#173f5d;font-size:13px}.intel-section-head small,.intel-section-head em{color:#8297a8;font-size:9px;font-style:normal}
.intel-risk-bars{display:flex;flex-direction:column;gap:7px}.intel-risk-bar-row{display:grid;grid-template-columns:120px 1fr 38px 18px;gap:8px;align-items:center;padding:8px 9px;border:1px solid #e5edf3;border-radius:9px;background:#fbfdff;color:#173f5d;text-align:inherit}.intel-risk-bar-row:hover{background:#f4faff;border-color:#cfe3f1}.intel-risk-bar-label{display:flex;align-items:center;gap:6px}.intel-risk-bar-label svg{width:16px;color:#147fcf}.intel-risk-bar-label b{font-size:10px}.intel-risk-track{height:7px;border-radius:999px;background:#edf2f5;overflow:hidden}.intel-risk-track i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2dbb79,#f3b51b,#e84b4b)}.intel-risk-bar-row>strong{font-size:10px;text-align:center}.intel-risk-bar-row>svg{width:15px;color:#92a6b5}
.intel-recommendation-list{display:flex;flex-direction:column;gap:7px}.intel-recommendation-list>button{display:grid;grid-template-columns:62px 1fr 54px 18px;gap:8px;align-items:center;padding:9px;border:1px solid #e5edf3;border-radius:9px;background:#fff;text-align:inherit}.intel-recommendation-list>button:hover{background:#f8fbfd}.intel-priority{display:inline-flex;justify-content:center;padding:4px 6px;border-radius:999px;font-size:8px;font-weight:800}.intel-priority.p-عاجل{background:#ffe1e1;color:#b72323}.intel-priority.p-مرتفع{background:#ffecd8;color:#b56b0a}.intel-priority.p-متوسط{background:#fff5cf;color:#9d7600}.intel-priority.p-مراقبة{background:#e7f5ee;color:#21835b}.intel-rec-copy{display:flex;flex-direction:column;min-width:0}.intel-rec-copy b{color:#173f5d;font-size:10px}.intel-rec-copy small{color:#8095a5;font-size:8.5px;line-height:1.5}.intel-recommendation-list>button>strong{font-size:9px;color:#49677e}.intel-recommendation-list>button>svg{width:15px;color:#92a6b5}.intel-no-recommendations{padding:18px;border-radius:10px;background:#f6fbf8;color:#4d7d68;font-size:10px;text-align:center}
@media(max-width:1000px){.intel-risk-breakdown-grid{grid-template-columns:1fr}}@media(max-width:760px){.intel-risk-bar-row{grid-template-columns:100px 1fr 34px 16px}.intel-recommendation-list>button{grid-template-columns:58px 1fr 45px 16px}}

.intel-quality-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:10px}.intel-quality-strip article{display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:center;padding:10px 11px;border:1px solid #e1ebf2;border-radius:11px;background:#fbfdff}.intel-quality-strip article>svg{width:20px;color:#1687df}.intel-quality-strip span{display:flex;flex-direction:column;min-width:0}.intel-quality-strip small{color:#7b91a2;font-size:8.5px}.intel-quality-strip b{margin:2px 0;color:#143f5e;font-size:15px}.intel-quality-strip em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8aa0af;font-size:7.5px;font-style:normal}
.intel-save-scenario{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.intel-save-scenario input{min-height:38px;padding:8px 10px;border:1px solid #dce9f2;border-radius:9px;background:#fff;color:#173f5d}.intel-save-scenario button{min-width:130px}
.intel-saved-scenarios{margin-top:12px;padding-top:12px;border-top:1px solid #e4edf3}.intel-saved-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.intel-saved-list>div{display:grid;grid-template-columns:1fr 34px;gap:6px}.intel-saved-main{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:9px 10px;border:1px solid #e2ebf2;border-radius:9px;background:#fff;text-align:inherit}.intel-saved-main:hover{background:#f8fbfd}.intel-saved-main span{display:flex;flex-direction:column;min-width:0}.intel-saved-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f5d;font-size:10px}.intel-saved-main small{color:#8799a8;font-size:8px}.intel-saved-main strong{flex:0 0 auto;color:#0f6fae;font-size:10px}.intel-delete-saved{display:grid;place-items:center;border:1px solid #f1d6d6;border-radius:9px;background:#fff7f7;color:#c84b4b}.intel-delete-saved svg{width:15px}
@media(max-width:1000px){.intel-quality-strip{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.intel-quality-strip,.intel-saved-list{grid-template-columns:1fr}.intel-save-scenario{grid-template-columns:1fr}}

.intel-forecast-center{margin-top:12px;padding:16px;border:1px solid #dce9f2;border-radius:14px;background:linear-gradient(145deg,#fbfdff,#fff)}.intel-forecast-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.intel-forecast-grid article{display:grid;grid-template-columns:36px 1fr;gap:9px;align-items:center;padding:11px;border:1px solid #e2ebf2;border-radius:11px;background:#fff}.intel-forecast-grid article>svg{width:20px;color:#1687df}.intel-forecast-grid span{display:flex;flex-direction:column;min-width:0}.intel-forecast-grid small{color:#7c91a2;font-size:8.5px}.intel-forecast-grid b{margin:2px 0;color:#153f5e;font-size:14px;white-space:nowrap}.intel-forecast-grid em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8a9dac;font-size:7.5px;font-style:normal}
.intel-project-risk{margin-top:12px;padding-top:12px;border-top:1px solid #e5edf3}.intel-project-risk-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.intel-project-risk-head>span{display:flex;align-items:center;gap:7px}.intel-project-risk-head svg{width:18px;color:#1687df}.intel-project-risk-head b{color:#173f5d;font-size:12px}.intel-project-risk-head small{color:#8397a6;font-size:8.5px}.intel-project-risk-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.intel-project-risk-list button{display:grid;grid-template-columns:1fr 58px auto 16px;gap:8px;align-items:center;padding:9px 10px;border:1px solid #e4edf3;border-radius:9px;background:#fff;text-align:inherit}.intel-project-risk-list button:hover{background:#f8fbfd}.intel-project-risk-list span{display:flex;flex-direction:column;min-width:0}.intel-project-risk-list b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f5d;font-size:10px}.intel-project-risk-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8799a8;font-size:8px}.intel-project-risk-list strong{color:#c07600;font-size:10px}.intel-project-risk-list em{color:#7c91a2;font-size:8px;font-style:normal}.intel-project-risk-list svg{width:15px;color:#92a6b5}
@media(max-width:1000px){.intel-forecast-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.intel-forecast-grid,.intel-project-risk-list{grid-template-columns:1fr}.intel-project-risk-list button{grid-template-columns:1fr 48px 16px}.intel-project-risk-list em{display:none}}

.intel-finance-intelligence{margin-top:12px;padding:16px;border:1px solid #dce9f2;border-radius:14px;background:linear-gradient(145deg,#fff,#fbfdff)}
.intel-finance-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.intel-finance-kpis article{padding:11px 12px;border:1px solid #e3ebf1;border-radius:10px;background:#fff}.intel-finance-kpis span,.intel-finance-kpis small{display:block;color:#8297a7;font-size:8.5px}.intel-finance-kpis strong{display:block;margin:3px 0;color:#123f60;font-size:15px}
.intel-aging-concentration{display:grid;grid-template-columns:1fr 1fr .8fr;gap:9px;margin-top:10px}.intel-aging-panel,.intel-concentration-panel{padding:11px;border:1px solid #e3ebf1;border-radius:10px;background:#fff}.intel-mini-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.intel-mini-head b{color:#173f5d;font-size:10px}.intel-mini-head span{color:#8a9dab;font-size:8px}
.intel-aging-bars{display:flex;flex-direction:column;gap:6px}.intel-aging-bars>div{display:grid;grid-template-columns:70px 1fr 74px;gap:7px;align-items:center}.intel-aging-bars span{color:#6f8799;font-size:8px}.intel-aging-bars i{height:6px;border-radius:999px;background:#edf2f5;overflow:hidden}.intel-aging-bars em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#28a777,#efb32e,#e25353)}.intel-aging-bars strong{font-size:8px;color:#3f6077;text-align:left}
.intel-concentration-panel{display:flex;flex-direction:column}.intel-concentration-panel .intel-mini-head{width:100%}.intel-concentration-panel button{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 2px;border:0;border-bottom:1px solid #edf1f4;background:transparent;text-align:inherit}.intel-concentration-panel button:last-child{border-bottom:0}.intel-concentration-panel button:hover{background:#f8fbfd}.intel-concentration-panel button span{display:flex;flex-direction:column;min-width:0}.intel-concentration-panel button b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f5d;font-size:9.5px}.intel-concentration-panel button small{color:#899ba9;font-size:7.5px}.intel-concentration-panel button strong{color:#0e78bd;font-size:14px}
.intel-finance-alerts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.finance-alert{display:grid;grid-template-columns:24px 1fr 16px;gap:8px;align-items:center;padding:9px 10px;border:1px solid #e6edf2;border-radius:9px;background:#fff;text-align:inherit}.finance-alert svg{width:16px}.finance-alert span{display:flex;flex-direction:column}.finance-alert b{font-size:9px;color:#173f5d}.finance-alert small{font-size:8px;color:#8296a5}.finance-alert.medium svg{color:#e1a21d}.finance-alert.high svg{color:#e17824}.finance-alert.critical{border-color:#f0cece;background:#fff8f8}.finance-alert.critical svg{color:#d84b4b}
@media(max-width:1100px){.intel-finance-kpis{grid-template-columns:repeat(2,1fr)}.intel-aging-concentration{grid-template-columns:1fr 1fr}.intel-concentration-panel{grid-column:1/-1}}@media(max-width:760px){.intel-finance-kpis,.intel-aging-concentration,.intel-finance-alerts{grid-template-columns:1fr}.intel-concentration-panel{grid-column:auto}.intel-aging-bars>div{grid-template-columns:62px 1fr 64px}}

.intel-management-alerts{margin-top:12px;padding:16px;border:1px solid #dce9f2;border-radius:14px;background:#fff}
.intel-alert-summary{display:grid;grid-template-columns:110px 110px 110px 1fr;gap:8px;margin-bottom:10px}.intel-alert-summary>span,.intel-alert-summary>button{min-height:54px;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 10px;border:1px solid #e3ebf1;border-radius:10px;background:#fbfdff;color:#173f5d}.intel-alert-summary svg{width:17px}.intel-alert-summary b{font-size:14px}.intel-alert-summary small{color:#8297a7;font-size:8px}.intel-alert-summary>button{justify-content:flex-start;font-size:9px;font-weight:800;cursor:pointer}.intel-alert-summary>button svg{margin-inline-start:auto}
.intel-management-alert-list{display:flex;flex-direction:column;gap:7px}.intel-management-alert{display:grid;grid-template-columns:28px minmax(220px,1.7fr) minmax(95px,.7fr) minmax(125px,.8fr) 92px 16px;gap:8px;align-items:center;padding:10px;border:1px solid #e6edf2;border-radius:10px;background:#fff;text-align:inherit}.intel-management-alert:hover{background:#f8fbfd}.intel-management-alert.severity-danger{border-inline-start:3px solid #d94b4b}.intel-management-alert.severity-warning{border-inline-start:3px solid #e3a11b}.intel-management-alert.severity-info{border-inline-start:3px solid #2383c5}.intel-alert-icon{display:grid;place-items:center}.intel-alert-icon svg{width:17px}.intel-management-alert.severity-danger .intel-alert-icon{color:#d94b4b}.intel-management-alert.severity-warning .intel-alert-icon{color:#e3a11b}.intel-management-alert.severity-info .intel-alert-icon{color:#2383c5}.intel-alert-main{display:flex;flex-direction:column;min-width:0}.intel-alert-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f5d;font-size:10px}.intel-alert-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8297a7;font-size:8px}.intel-alert-meta,.intel-alert-review{display:flex;flex-direction:column}.intel-alert-meta small,.intel-alert-review small{color:#8b9dab;font-size:7px}.intel-alert-meta b,.intel-alert-review b{color:#42647c;font-size:8.5px}.intel-alert-review b{font-weight:900}.intel-management-alert>svg{width:14px;color:#92a6b5}
@media(max-width:1100px){.intel-alert-summary{grid-template-columns:repeat(3,1fr)}.intel-alert-summary>button{grid-column:1/-1}.intel-management-alert{grid-template-columns:28px 1fr 110px 16px}.intel-alert-meta{display:none}}@media(max-width:760px){.intel-alert-summary{grid-template-columns:1fr 1fr 1fr}.intel-management-alert{grid-template-columns:24px 1fr 16px}.intel-alert-review{display:none}}

.intel-action-board{margin-top:12px;padding:16px;border:1px solid #dce9f2;border-radius:14px;background:linear-gradient(145deg,#fff,#fbfdff)}
.intel-action-summary{display:grid;grid-template-columns:repeat(4,100px) 1fr;gap:8px;margin-bottom:10px}.intel-action-summary>span,.intel-action-summary>button{min-height:52px;display:flex;align-items:center;justify-content:center;gap:6px;padding:9px;border:1px solid #e3ebf1;border-radius:10px;background:#fff;color:#173f5d}.intel-action-summary>span{flex-direction:column}.intel-action-summary b{font-size:14px}.intel-action-summary small{color:#8297a7;font-size:8px}.intel-action-summary>button{justify-content:flex-start;font-size:9px;font-weight:800}.intel-action-summary>button svg{margin-inline-start:auto;width:15px}
.intel-action-list{display:flex;flex-direction:column;gap:7px}.intel-action-item{display:grid;grid-template-columns:66px minmax(220px,1.5fr) minmax(110px,.8fr) 80px 92px 16px;gap:8px;align-items:center;padding:10px;border:1px solid #e5edf3;border-radius:10px;background:#fff;text-align:inherit}.intel-action-item:hover{background:#f8fbfd}.intel-action-item.p-critical{border-inline-start:3px solid #d94b4b}.intel-action-item.p-high{border-inline-start:3px solid #e59a17}.intel-action-item.p-normal{border-inline-start:3px solid #2587cb}.intel-action-item.p-low{border-inline-start:3px solid #7b98aa}.intel-action-type{display:inline-flex;justify-content:center;padding:4px 6px;border-radius:999px;background:#eef6fb;color:#2b6f9d;font-size:8px;font-weight:800}.intel-action-copy{display:flex;flex-direction:column;min-width:0}.intel-action-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f5d;font-size:10px}.intel-action-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8297a7;font-size:8px}.intel-action-owner,.intel-action-status,.intel-action-due{display:flex;flex-direction:column}.intel-action-owner small,.intel-action-status small,.intel-action-due small{color:#8b9dab;font-size:7px}.intel-action-owner b,.intel-action-status b,.intel-action-due b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#42647c;font-size:8.5px}.intel-action-due b{font-weight:900}.intel-action-item>svg{width:14px;color:#92a6b5}
@media(max-width:1100px){.intel-action-summary{grid-template-columns:repeat(4,1fr)}.intel-action-summary>button{grid-column:1/-1}.intel-action-item{grid-template-columns:62px 1fr 110px 16px}.intel-action-owner,.intel-action-status{display:none}}@media(max-width:760px){.intel-action-summary{grid-template-columns:repeat(2,1fr)}.intel-action-item{grid-template-columns:58px 1fr 16px}.intel-action-due{display:none}}

.intel-alert-main b{display:flex;align-items:center;gap:6px}.intel-alert-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;padding:2px 6px;border-radius:999px;background:#eef4f8;color:#58758a;font-size:8px;font-style:normal}.intel-management-alert.severity-danger .intel-alert-count{background:#fff0f0;color:#c34747}.intel-management-alert.severity-warning .intel-alert-count{background:#fff7e7;color:#b7780d}.intel-management-alert-list{gap:8px}.intel-management-alert{min-height:62px}

.intel-head-actions{display:flex;align-items:center;gap:8px}.intel-head-actions .btn{white-space:nowrap}
.intel-board-pack{margin:12px 0;padding:18px;border:1px solid #d7e6f0;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(20,65,95,.045)}
.intel-board-pack-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:14px;border-bottom:2px solid #eaf0f4}.intel-board-pack-header span{color:#1881ce;font-size:9px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}.intel-board-pack-header h2{margin:4px 0;color:#0c385b;font-size:22px}.intel-board-pack-header p{margin:0;color:#7890a3;font-size:10px}.intel-board-pack-meta{display:flex;align-items:flex-end;flex-direction:column;gap:3px;color:#56738a}.intel-board-pack-meta b{font-size:11px}.intel-board-pack-meta small{font-size:8px;color:#8b9dab}.intel-board-pack-meta .btn{margin-top:6px}
.intel-board-pack-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}.intel-board-pack-kpis article{padding:12px;border:1px solid #e2ebf2;border-radius:10px;background:#fbfdff}.intel-board-pack-kpis span,.intel-board-pack-kpis small{display:block;color:#8196a6;font-size:8px}.intel-board-pack-kpis strong{display:block;margin:3px 0;color:#123f60;font-size:15px}
.intel-board-pack-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}.intel-board-pack-card{min-width:0;padding:13px;border:1px solid #e2ebf2;border-radius:11px;background:#fff}.intel-board-pack-card h3{margin:0 0 9px;color:#143e5e;font-size:12px}.intel-board-pack-card>p{margin:5px 0;padding-inline-start:12px;position:relative;color:#59748a;font-size:8.7px;line-height:1.65}.intel-board-pack-card>p:before{content:"";position:absolute;inset-inline-start:1px;top:.62em;width:5px;height:5px;border-radius:50%;background:#1b86cf}
.board-pack-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #edf2f5}.board-pack-row:last-child{border-bottom:0}.board-pack-row>span{display:flex;flex-direction:column;min-width:0}.board-pack-row b{color:#173f5d;font-size:9px}.board-pack-row small{color:#8498a7;font-size:7.7px;line-height:1.5}.board-pack-row>strong{flex:0 0 auto;color:#35627f;font-size:8.5px;text-align:left}
.board-pack-quality{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.board-pack-quality span{padding:9px;border-radius:9px;background:#f7fafc;text-align:center}.board-pack-quality small{display:block;color:#879aa9;font-size:7px}.board-pack-quality b{display:block;margin-top:2px;color:#143f5f;font-size:14px}.board-pack-selected-scenario{display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center;margin-top:9px;padding:9px;border:1px solid #dceaf4;border-radius:9px;background:#f8fcff}.board-pack-selected-scenario b{font-size:9px}.board-pack-selected-scenario small{grid-column:1;color:#8195a5;font-size:7.5px}.board-pack-selected-scenario strong{grid-column:2;grid-row:1/3;color:#0e74b8;font-size:11px}
.intel-board-pack-footer{margin-top:12px;padding-top:10px;border-top:1px solid #e8eef2;color:#889aa8;font-size:7.5px;text-align:center}
@media(max-width:900px){.intel-board-pack-kpis,.intel-board-pack-grid{grid-template-columns:repeat(2,1fr)}.intel-board-pack-header{flex-direction:column}.intel-board-pack-meta{align-items:flex-start}}@media(max-width:620px){.intel-board-pack-kpis,.intel-board-pack-grid,.board-pack-quality{grid-template-columns:1fr}.intel-head-actions{flex-wrap:wrap}}
@media print{
 body.beg-board-pack-print *{visibility:hidden!important}
 body.beg-board-pack-print .intel-board-pack,
 body.beg-board-pack-print .intel-board-pack *{visibility:visible!important}
 body.beg-board-pack-print .intel-board-pack{position:absolute!important;inset:0!important;width:100%!important;margin:0!important;padding:12mm!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;color:#111!important}
 body.beg-board-pack-print .intel-board-pack-header .btn{display:none!important}
 body.beg-board-pack-print .intel-board-pack-grid{grid-template-columns:repeat(2,1fr)!important;gap:7mm!important}
 body.beg-board-pack-print .intel-board-pack-card,
 body.beg-board-pack-print .intel-board-pack-kpis article{break-inside:avoid!important;box-shadow:none!important}
 body.beg-board-pack-print .intel-board-pack-footer{margin-top:8mm!important}
 @page{size:A4 landscape;margin:8mm}
}


/* V202 Intelligence header controls — isolate from legacy native/button rules */
.intel-dashboard .intel-head-actions .btn,
.intel-dashboard .intel-refresh{
  appearance:none;
  -webkit-appearance:none;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px 13px;
  border:1px solid #cfe0ec;
  border-radius:10px;
  background:#fff;
  color:#245674;
  font:inherit;
  font-size:11px;
  font-weight:800;
  line-height:1;
  box-shadow:0 2px 7px rgba(20,68,100,.05);
  cursor:pointer;
}
.intel-dashboard .intel-head-actions .btn:hover,
.intel-dashboard .intel-refresh:hover{border-color:#9fc8e3;background:#f7fbfe;color:#0c72b8}
.intel-dashboard .intel-head-actions .btn svg,
.intel-dashboard .intel-refresh svg{width:16px;height:16px;stroke-width:2}
.intel-dashboard .intel-head-actions .intel-refresh{
  background:#1684d3;
  border-color:#1684d3;
  color:#fff;
}
.intel-dashboard .intel-head-actions .intel-refresh:hover{background:#0f76bf;border-color:#0f76bf;color:#fff}


/* =========================================================
   V202 Intelligence visual refinement — approved direction
   ========================================================= */
.beg-ai-hero{
  min-height:220px;
  display:grid;
  grid-template-columns:minmax(300px,.9fr) minmax(520px,1.8fr);
  align-items:center;
  gap:28px;
  padding:26px 34px;
  overflow:hidden;
  border:1px solid #cfe4f3;
  border-radius:22px;
  background:
    radial-gradient(circle at 12% 18%,rgba(38,147,225,.14),transparent 23%),
    radial-gradient(circle at 28% 78%,rgba(45,168,239,.08),transparent 24%),
    linear-gradient(115deg,#eaf7ff 0%,#f8fcff 38%,#ffffff 72%,#eef8ff 100%);
  box-shadow:0 8px 26px rgba(19,72,107,.045);
}
.beg-ai-hero:after{
  width:420px;height:420px;inset-inline-end:-140px;top:-170px;
  background:radial-gradient(circle,rgba(40,150,230,.11),transparent 67%);
}
.beg-ai-hero-copy{z-index:2;text-align:right}
.beg-ai-hero h1{font-size:36px;letter-spacing:-.035em;margin:9px 0 8px}
.beg-ai-hero p{font-size:14px;line-height:1.8}
.beg-ai-version{padding:6px 11px;background:#e1f1fd;color:#0672bd;font-size:10px;box-shadow:inset 0 0 0 1px rgba(13,124,199,.04)}
.beg-ai-capabilities{justify-content:flex-start;gap:9px;margin-top:17px}
.beg-ai-capabilities span{
  min-height:38px;display:inline-flex;align-items:center;gap:6px;
  padding:8px 13px;border-color:#cfe3f1;border-radius:10px;
  background:rgba(255,255,255,.88);color:#1d4e6d;font-size:10px;
  box-shadow:0 2px 8px rgba(28,91,129,.035)
}
.beg-ai-capabilities span svg{width:15px;height:15px;color:#1384d2}
.beg-ai-hero-mark{display:none!important}

.beg-ai-hero-visual{
  position:relative;
  min-height:170px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.beg-ai-visual-card{
  position:absolute;
  border:1px solid rgba(28,121,190,.13);
  background:linear-gradient(155deg,#0f578b,#123e68);
  color:#fff;
  box-shadow:0 18px 34px rgba(15,76,118,.16);
}
.beg-ai-visual-card.primary{
  width:210px;height:132px;inset-inline-start:22px;top:8px;
  border-radius:18px;padding:17px;transform:rotate(-1.4deg);
}
.beg-ai-visual-card.primary>svg{width:34px;height:34px;color:#8dd7ff}
.beg-ai-visual-card.primary>span{position:absolute;inset-inline-start:17px;bottom:13px;font-size:9px;opacity:.7}
.beg-ai-visual-bars{position:absolute;inset-inline-end:18px;bottom:19px;height:74px;display:flex;align-items:flex-end;gap:8px}
.beg-ai-visual-bars i{width:15px;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#63c4f4,#2b82bd)}
.beg-ai-visual-bars i:nth-child(1){height:34px}.beg-ai-visual-bars i:nth-child(2){height:52px}.beg-ai-visual-bars i:nth-child(3){height:44px}.beg-ai-visual-bars i:nth-child(4){height:70px;background:linear-gradient(180deg,#f3c55b,#d89a27)}
.beg-ai-visual-card.secondary{
  width:116px;height:96px;inset-inline-start:190px;bottom:7px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  border-radius:16px;background:linear-gradient(155deg,#f9fcff,#e8f5ff);color:#116da9;
}
.beg-ai-visual-card.secondary svg{width:24px}.beg-ai-visual-card.secondary b{font-size:22px}.beg-ai-visual-card.secondary small{font-size:7px;color:#6f8ba0}
.beg-ai-visual-orb{
  position:absolute;inset-inline-start:4px;bottom:10px;width:54px;height:54px;
  display:grid;place-items:center;border-radius:16px;background:#fff;color:#1280cc;
  box-shadow:0 12px 24px rgba(13,93,143,.12)
}
.beg-ai-visual-orb svg{width:27px;height:27px}

.page>.workspace-tabs{
  min-height:58px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  border:1px solid #d9e7f1;
  border-radius:15px;
  background:#fff;
  box-shadow:0 5px 16px rgba(17,66,99,.035)
}
.page>.workspace-tabs button{
  min-width:178px;
  min-height:42px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid #d9e6ef;border-radius:10px;
  background:#fff;color:#274d68;font-size:11px;font-weight:850;
  box-shadow:none
}
.page>.workspace-tabs button svg{width:17px;height:17px}
.page>.workspace-tabs button.active{
  border-color:#1684d3;background:linear-gradient(135deg,#1689dc,#0e73bf);
  color:#fff;box-shadow:0 7px 16px rgba(20,125,199,.17)
}

.intel-dashboard{
  border-radius:18px;
  border-color:#d7e6f0;
  padding:20px;
  box-shadow:0 8px 24px rgba(20,65,95,.04)
}
.intel-dashboard-head{
  align-items:flex-start;
  padding:0 2px 14px;
  margin-bottom:4px;
  border-bottom:1px solid #edf2f5
}
.intel-dashboard-head h2{font-size:22px;letter-spacing:-.025em}
.intel-dashboard-head p{font-size:10.5px;line-height:1.7}
.intel-head-side{display:flex;flex-direction:column;align-items:flex-end;gap:7px}
.intel-last-update{display:flex;align-items:center;gap:6px;color:#7f95a5;font-size:8px}
.intel-last-update i{width:7px;height:7px;border-radius:50%;background:#28b979;box-shadow:0 0 0 3px #e6f8f0}
.intel-kpi-grid{gap:12px;margin-top:14px}
.intel-kpi{
  min-height:124px;
  border-radius:14px;
  border-color:#dce8f0;
  background:linear-gradient(145deg,#fff,#fbfdff);
  box-shadow:0 4px 14px rgba(18,72,105,.025)
}
.intel-kpi-icon{width:46px;height:46px;border-radius:12px;background:#eaf5fd}
.intel-kpi-copy strong{font-size:20px;letter-spacing:-.02em}
.intel-kpi-copy small{font-size:8.5px}
.intel-spark{width:116px;height:34px;bottom:7px;opacity:.82}

@media(max-width:1100px){
  .beg-ai-hero{grid-template-columns:1fr;padding:22px}
  .beg-ai-hero-visual{order:2;min-height:150px}
  .beg-ai-hero-copy{order:1}
}
@media(max-width:720px){
  .beg-ai-hero{padding:18px;min-height:auto}.beg-ai-hero h1{font-size:27px}
  .beg-ai-hero-visual{display:none}.beg-ai-capabilities span{min-height:34px;padding:6px 9px}
  .page>.workspace-tabs{align-items:stretch;flex-direction:column}
  .page>.workspace-tabs button{width:100%;min-width:0}
  .intel-dashboard-head{flex-direction:column}.intel-head-side{width:100%;align-items:stretch}.intel-head-actions{width:100%}.intel-head-actions .btn{flex:1}
}


/* =========================================================
   V202 Intelligence final first-screen polish
   ========================================================= */
@media (min-width:1101px){
  .beg-ai-hero{
    min-height:190px;
    grid-template-columns:minmax(320px,.82fr) minmax(620px,1.9fr);
    grid-template-areas:"visual copy";
    padding:22px 30px;
    gap:34px;
  }
  .beg-ai-hero-visual{
    grid-area:visual;
    min-height:145px;
    justify-self:start;
    width:100%;
    max-width:360px;
  }
  .beg-ai-hero-copy{
    grid-area:copy;
    align-self:center;
    justify-self:stretch;
    text-align:right;
  }
  .beg-ai-hero h1{font-size:34px}
  .beg-ai-capabilities{justify-content:flex-start}

  .page>.workspace-tabs{
    width:auto;
    min-height:56px;
    display:inline-flex;
    align-self:flex-end;
    margin-inline-start:auto;
    padding:6px;
    gap:6px;
    border-radius:14px;
  }
  .page>.workspace-tabs button{
    min-width:190px;
    min-height:42px;
  }

  .intel-dashboard{
    margin-top:2px;
  }
  .intel-dashboard-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:20px;
  }
  .intel-head-side{
    align-items:flex-end;
  }
  .intel-head-actions{
    justify-content:flex-end;
  }
  .intel-last-update{
    padding-inline:2px;
    white-space:nowrap;
  }
}

/* Explicit positioning for RTL/LTR so the artwork always stays on the left */
[dir='rtl'] .beg-ai-hero{grid-template-areas:"visual copy"}
[dir='ltr'] .beg-ai-hero{grid-template-areas:"copy visual"}

@media (max-width:1100px){
  .beg-ai-hero{grid-template-areas:"copy" "visual"}
  .beg-ai-hero-copy{grid-area:copy}
  .beg-ai-hero-visual{grid-area:visual}
  .page>.workspace-tabs{width:100%;margin-inline-start:0}
}


/* =========================================================
   V202 Service & Maintenance 360 Command Center
   ========================================================= */
.service-command-center{margin-top:18px;padding:18px;border:1px solid #dbe8f1;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(20,65,95,.035)}
.service-command-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:14px;border-bottom:1px solid #edf2f5}
.service-command-head small{display:block;color:#1582cf;font-size:9px;font-weight:900;text-transform:uppercase}
.service-command-head h2{display:flex;align-items:center;gap:8px;margin:4px 0;color:#0d3d60;font-size:22px}.service-command-head h2 svg{width:22px;color:#1582cf}
.service-command-head p{margin:0;color:#7d92a3;font-size:10.5px}
.service-create-btn{min-height:40px;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.service-create-btn svg{width:17px}

.service-command-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:14px 0 10px}
.service-command-kpis article{padding:11px 12px;border:1px solid #e1eaf1;border-radius:11px;background:#fbfdff}.service-command-kpis span{display:block;color:#8296a5;font-size:8px}.service-command-kpis b{display:block;margin-top:3px;color:#143f5e;font-size:18px}
.service-command-kpis article.warn{background:#fffaf0;border-color:#f1dfb6}.service-command-kpis article.warn b{color:#b77b09}
.service-command-kpis article.danger{background:#fff7f7;border-color:#f0d1d1}.service-command-kpis article.danger b{color:#c63f3f}

.service-stage-pipeline{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-bottom:10px}
.service-stage-pipeline button{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border:1px solid #dce8f0;border-radius:10px;background:#fff;color:#31556f;cursor:pointer}
.service-stage-pipeline button:hover{background:#f7fbfe;border-color:#b8d7ea}.service-stage-pipeline button.active{background:#147fd0;border-color:#147fd0;color:#fff;box-shadow:0 6px 14px rgba(20,127,208,.16)}
.service-stage-pipeline span{font-size:9px;font-weight:800}.service-stage-pipeline b{font-size:14px}

.service-command-toolbar{display:grid!important;grid-template-columns:minmax(260px,1.6fr) repeat(3,minmax(130px,.55fr)) auto;gap:8px!important;align-items:center;margin:0 0 12px!important}
.service-command-toolbar select,.service-command-toolbar .secondary-btn{min-height:38px}
.service-order-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
.service-order-grid>button{position:relative;min-height:152px;padding:13px!important;border:1px solid #dfe9f0!important;border-radius:12px!important;background:linear-gradient(145deg,#fff,#fbfdff)!important;text-align:inherit;box-shadow:0 3px 10px rgba(19,69,99,.025)}
.service-order-grid>button:hover{transform:translateY(-1px);border-color:#b9d5e6!important;box-shadow:0 8px 18px rgba(19,69,99,.06)}
.service-order-grid>button.is-risk{border-inline-start:3px solid #e6a11a!important}.service-order-grid>button.is-breached{border-inline-start:3px solid #d84d4d!important}
.service-order-meta{display:flex!important;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
.service-priority{display:inline-flex;align-items:center;justify-content:center;padding:4px 7px;border-radius:999px;background:#edf5fa;color:#45687f;font-size:8px;font-weight:800}.service-priority.high{background:#fff0da;color:#ae6e05}.service-priority.urgent{background:#ffe6e6;color:#bc3434}
.service-order-meta .fs-sla{display:inline-flex;align-items:center;gap:4px}.service-order-meta .fs-sla svg{width:13px;height:13px}
.service-empty{min-height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px dashed #d7e5ee;border-radius:12px;color:#8497a5}.service-empty svg{width:22px}.service-empty b{color:#3e6076;font-size:11px}.service-empty span{font-size:9px}

.service-create-intro{display:flex;align-items:center;gap:10px;margin-bottom:14px;padding:11px 12px;border:1px solid #dceaf4;border-radius:10px;background:#f7fbfe}.service-create-intro>svg{width:24px;color:#1582cf}.service-create-intro>div{display:flex;flex-direction:column}.service-create-intro b{color:#173f5d;font-size:11px}.service-create-intro span{color:#8094a4;font-size:9px}

@media(max-width:1250px){
 .service-command-kpis{grid-template-columns:repeat(3,1fr)}
 .service-stage-pipeline{grid-template-columns:repeat(3,1fr)}
 .service-order-grid{grid-template-columns:repeat(2,1fr)!important}
 .service-command-toolbar{grid-template-columns:1fr 1fr 1fr}
 .service-command-toolbar .fs-search{grid-column:1/-1}
}
@media(max-width:760px){
 .service-command-head{flex-direction:column}.service-create-btn{width:100%;justify-content:center}
 .service-command-kpis,.service-stage-pipeline,.service-order-grid{grid-template-columns:1fr!important}
 .service-command-toolbar{grid-template-columns:1fr}.service-command-toolbar .fs-search{grid-column:auto}
}

/* V202 U2.8D3 - compact purchase navigation authority */

[data-commerce-module="purchases"]
.purchases-primary-tabs-v202 {
  width: 100%;
  margin-top: 12px;
  margin-bottom: 8px;
}

[data-commerce-module="purchases"]
.purchases-primary-tabs-v202 [role="tablist"],
[data-commerce-module="purchases"]
.purchases-primary-tabs-v202 .v192-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

[data-commerce-module="purchases"]
.purchases-primary-tabs-v202 button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
}

[data-commerce-module="purchases"]
.purchases-secondary-tabs-v202 {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 14px;
}

[data-commerce-module="purchases"]
.purchases-secondary-tabs-v202 [role="tablist"],
[data-commerce-module="purchases"]
.purchases-secondary-tabs-v202 .v192-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

[data-commerce-module="purchases"]
.purchases-secondary-tabs-v202 button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 135px !important;
  min-height: 42px !important;
  padding: 8px 16px !important;
}

[data-commerce-module="purchases"]
.unified-commerce-content-v202 {
  margin-top: 0 !important;
}

@media (max-width: 1100px) {
  [data-commerce-module="purchases"]
  .purchases-primary-tabs-v202 {
    overflow-x: auto;
  }

  [data-commerce-module="purchases"]
  .purchases-primary-tabs-v202 [role="tablist"],
  [data-commerce-module="purchases"]
  .purchases-primary-tabs-v202 .v192-tabs {
    grid-template-columns:
      repeat(5, minmax(135px, 1fr)) !important;
    min-width: 700px;
  }
}
:root {
  /* Typography */
  --ui-font-size: 13px;
  --ui-font-xs: 10px;
  --ui-font-sm: 11px;
  --ui-font-md: 13px;
  --ui-font-lg: 16px;
  --ui-font-xl: 20px;
  --ui-font-page: clamp(24px, 2vw, 32px);

  /* Geometry */
  --ui-radius-xs: 6px;
  --ui-radius-sm: 8px;
  --ui-radius-md: 10px;
  --ui-radius-lg: 12px;
  --ui-radius-xl: 14px;
  --ui-radius-pill: 999px;

  /* Spacing */
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 20px;
  --ui-space-6: 24px;

  /* Controls */
  --ui-control-h: 40px;
  --ui-control-h-sm: 34px;
  --ui-tab-h: 40px;
  --ui-button-h: 38px;

  /* Icon authority */
  --ui-icon-xs: 12px;
  --ui-icon-inline: 13px;
  --ui-icon-button: 14px;
  --ui-icon-topbar: 15px;
  --ui-icon-tab: 15px;
  --ui-icon-sidebar: 16px;
  --ui-icon-kpi: 18px;
  --ui-icon-module: 18px;
  --ui-icon-feature: 20px;
  --ui-icon-hero: 22px;

  /* Icon containers */
  --ui-icon-box-sm: 30px;
  --ui-icon-box-md: 36px;
  --ui-icon-box-lg: 40px;

  /* Tables */
  --ui-table-row-h: 44px;
  --ui-table-head-h: 40px;

  /* Sidebar */
  --ui-sidebar-row-h: 40px;

  /* Motion */
  --ui-motion-fast: 120ms;
  --ui-motion: 180ms;
  --ui-ease: cubic-bezier(.2,.7,.2,1);

  /* Shadows */
  --ui-shadow-xs: 0 1px 3px rgba(15,45,67,.035);
  --ui-shadow-sm: 0 3px 10px rgba(15,45,67,.045);
  --ui-shadow-md: 0 8px 22px rgba(15,45,67,.07);
  --ui-shadow-lg: 0 18px 48px rgba(15,45,67,.14);
}
:root[data-ui-theme='executive'] {
  --ui-bg: #f4f7fa;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f7f9fb;
  --ui-surface-elevated: #ffffff;

  --ui-sidebar: #082b4d;
  --ui-sidebar-2: #061f39;

  --ui-primary: #0b3156;
  --ui-primary-2: #1677c8;
  --ui-accent: #c79d39;

  --ui-text: #183b56;
  --ui-text-strong: #0b3156;
  --ui-muted: #71879a;

  --ui-border: #dce6ed;

  --ui-success: #169b62;
  --ui-warning: #e58a17;
  --ui-danger: #d9535f;
  --ui-info: #2585cf;
}

:root[data-ui-theme='modern-blue'] {
  --ui-bg: #f3f7fb;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f4f9fd;
  --ui-surface-elevated: #ffffff;

  --ui-sidebar: #0a4c7c;
  --ui-sidebar-2: #07385d;

  --ui-primary: #106fb5;
  --ui-primary-2: #2793df;
  --ui-accent: #24a3d8;

  --ui-text: #163d5b;
  --ui-text-strong: #0d3150;
  --ui-muted: #698296;

  --ui-border: #d8e6ef;

  --ui-success: #159b65;
  --ui-warning: #e28a19;
  --ui-danger: #d9535f;
  --ui-info: #2686d1;
}

:root[data-ui-theme='minimal-light'] {
  --ui-bg: #f7f8fa;
  --ui-surface: #ffffff;
  --ui-surface-soft: #fafbfc;
  --ui-surface-elevated: #ffffff;

  --ui-sidebar: #263746;
  --ui-sidebar-2: #1e2b36;

  --ui-primary: #34495e;
  --ui-primary-2: #4e6b82;
  --ui-accent: #687f91;

  --ui-text: #263746;
  --ui-text-strong: #17232c;
  --ui-muted: #778692;

  --ui-border: #e1e5e8;

  --ui-success: #278f61;
  --ui-warning: #d88b27;
  --ui-danger: #c9515a;
  --ui-info: #4b7ea2;
}

:root[data-ui-theme='dark-pro'] {
  --ui-bg: #081923;
  --ui-surface: #102736;
  --ui-surface-soft: #0d2230;
  --ui-surface-elevated: #142f42;

  --ui-sidebar: #071e30;
  --ui-sidebar-2: #051621;

  --ui-primary: #2d8fd5;
  --ui-primary-2: #46a9ec;
  --ui-accent: #d0aa52;

  --ui-text: #eef6fa;
  --ui-text-strong: #ffffff;
  --ui-muted: #9db3c2;

  --ui-border: #2a485c;

  --ui-success: #44c98b;
  --ui-warning: #eda440;
  --ui-danger: #ef6973;
  --ui-info: #5aaee5;
}

:root[data-ui-theme='dark-pro'] {
  color-scheme: dark;
}

:root:not([data-ui-theme='dark-pro']) {
  color-scheme: light;
}

/* =========================================================
   V202 semantic theme extensions
   ========================================================= */

:root[data-ui-theme='executive'] {
  --ui-input-bg: #ffffff;
  --ui-hover: #eef5fa;
  --ui-selected: #e4f1fb;
  --ui-overlay: rgba(7,32,53,.42);
  --ui-scrollbar: #b9cbd8;
  --ui-scrollbar-track: #edf3f7;
  --ui-disabled-bg: #edf1f4;
  --ui-disabled-text: #9badba;
}

:root[data-ui-theme='modern-blue'] {
  --ui-input-bg: #ffffff;
  --ui-hover: #edf7fd;
  --ui-selected: #dff1fc;
  --ui-overlay: rgba(7,45,73,.42);
  --ui-scrollbar: #a9cde2;
  --ui-scrollbar-track: #edf6fb;
  --ui-disabled-bg: #edf3f7;
  --ui-disabled-text: #91a7b6;
}

:root[data-ui-theme='minimal-light'] {
  --ui-input-bg: #ffffff;
  --ui-hover: #f0f3f5;
  --ui-selected: #e9eef1;
  --ui-overlay: rgba(28,40,50,.38);
  --ui-scrollbar: #bfc8ce;
  --ui-scrollbar-track: #eef1f3;
  --ui-disabled-bg: #eef0f2;
  --ui-disabled-text: #98a4ac;

  /* stronger definition between surface and app bg */
  --ui-border: #d5dce1;
}

:root[data-ui-theme='dark-pro'] {
  --ui-input-bg: #0d2433;
  --ui-hover: #173548;
  --ui-selected: #19405a;
  --ui-overlay: rgba(0,8,14,.66);
  --ui-scrollbar: #36596e;
  --ui-scrollbar-track: #0b202d;
  --ui-disabled-bg: #132a38;
  --ui-disabled-text: #718b9c;

  /* improve secondary-text contrast */
  --ui-muted: #abc0cd;
}
/* Global application surface */

html,
body,
#root {
  background: var(--ui-bg);
}

body {
  font-size: var(--ui-font-size);
  color: var(--ui-text);
}

.enterprise-workspace-v202,
.enterprise-workspace-v202 .content {
  background: var(--ui-bg) !important;
  color: var(--ui-text);
}

/* Sidebar */

.enterprise-workspace-v202 .enterprise-sidebar-v202 {
  background:
    radial-gradient(circle at 18% 0%, rgba(60, 150, 220, .16), transparent 28%),
    linear-gradient(180deg, var(--ui-sidebar), var(--ui-sidebar-2)) !important;
}

/* Global surfaces */

.panel-card,
.enterprise-panel,
.table-card,
.kpi-card,
.state-card,
.v202-bento-card,
.v202-module-card,
.v202-financial-kpi,
.v192-page-header,
.v192-tabs,
.workspace-tabs,
.page-head,
.modal-card,
.commercial-editor-shell {
  border-color: var(--ui-border) !important;
}

.panel-card,
.enterprise-panel,
.table-card,
.kpi-card,
.v202-bento-card,
.v202-module-card,
.v202-financial-kpi,
.page-head,
.modal-card {
  background: var(--ui-surface) !important;
  color: var(--ui-text);
}

.state-card {
  background: var(--ui-surface-soft) !important;
  color: var(--ui-muted) !important;
}

/* Inputs */

input,
select,
textarea {
  min-height: var(--ui-control-h);
  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius-sm) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--ui-muted) !important;
}

/* Buttons */

button {
  border-radius: var(--ui-radius-sm);
}

.primary,
.primary-btn,
.global-create-v202,
.issue-btn {
  background: var(--ui-primary-2) !important;
  border-color: var(--ui-primary-2) !important;
}

.secondary-btn,
.tool-btn,
.icon-btn {
  border-color: var(--ui-border) !important;
}

/* Tables */

.table-card thead th,
.commercial-grid-table thead th {
  background: var(--ui-surface-soft) !important;
  color: var(--ui-text-strong) !important;
  border-color: var(--ui-border) !important;
}

.table-card tbody td,
.commercial-grid-table tbody td {
  color: var(--ui-text) !important;
  border-color: var(--ui-border) !important;
}

/* Text */

h1,
h2,
h3,
h4,
strong,
b {
  color: var(--ui-text-strong);
}

small,
.muted,
.cell-sub {
  color: var(--ui-muted) !important;
}

/* Status */

.v192-status.success,
.status.received,
.status.completed,
.status.paid {
  color: var(--ui-success) !important;
}

.v192-status.warning,
.status.pending,
.status.pending_approval,
.status.overdue {
  color: var(--ui-warning) !important;
}

.v192-status.danger,
.status.rejected,
.status.cancelled {
  color: var(--ui-danger) !important;
}

/* Global icon sizing */

.enterprise-sidebar-v202 .sidebar-nav-icon-v202 svg {
  width: var(--ui-icon-sidebar) !important;
  height: var(--ui-icon-sidebar) !important;
}

.topbar-utility-button svg,
.global-create-v202 svg {
  width: var(--ui-icon-topbar) !important;
  height: var(--ui-icon-topbar) !important;
}

.v192-tabs svg,
.workspace-tabs svg,
.top-nav-context-tools svg {
  width: var(--ui-icon-tab) !important;
  height: var(--ui-icon-tab) !important;
}

button svg {
  width: var(--ui-icon-button);
  height: var(--ui-icon-button);
}

.icon-btn svg,
.row-actions svg {
  width: var(--ui-icon-inline) !important;
  height: var(--ui-icon-inline) !important;
}

.v202-kpi-icon svg,
.kpi-icon svg {
  width: var(--ui-icon-kpi) !important;
  height: var(--ui-icon-kpi) !important;
}

.v202-module-icon svg {
  width: var(--ui-icon-module) !important;
  height: var(--ui-icon-module) !important;
}

/* Tabs */

.v192-tabs button,
.workspace-tabs button,
.top-nav-context-tools button {
  min-height: var(--ui-tab-h);
}

/* Focus */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-primary-2) 65%, transparent);
  outline-offset: 2px;
}
:root[data-ui-density='comfortable'] {
  --ui-control-h: 40px;
  --ui-tab-h: 42px;
  --ui-row-pad-y: 12px;
  --ui-card-pad: 16px;
}

:root[data-ui-density='compact'] {
  --ui-control-h: 34px;
  --ui-tab-h: 36px;
  --ui-row-pad-y: 8px;
  --ui-card-pad: 12px;
}

:root[data-ui-density='compact'] .panel-card,
:root[data-ui-density='compact'] .enterprise-panel,
:root[data-ui-density='compact'] .kpi-card,
:root[data-ui-density='compact'] .v202-bento-card,
:root[data-ui-density='compact'] .v202-module-card {
  padding: var(--ui-card-pad) !important;
}

:root[data-ui-density='compact'] .table-card th,
:root[data-ui-density='compact'] .table-card td,
:root[data-ui-density='compact'] .commercial-grid-table th,
:root[data-ui-density='compact'] .commercial-grid-table td {
  padding-top: var(--ui-row-pad-y) !important;
  padding-bottom: var(--ui-row-pad-y) !important;
}

:root[data-ui-density='compact'] .content {
  padding: 14px !important;
}

:root[data-ui-density='compact'] .sidebar-nav-item-v202 {
  min-height: 38px !important;
}

/* Final density alignment */

:root[data-ui-density='comfortable'] {
  --ui-card-pad: 15px;
}

:root[data-ui-density='compact'] {
  --ui-card-pad: 11px;
}

:root[data-ui-density='compact'] input,
:root[data-ui-density='compact'] select,
:root[data-ui-density='compact'] textarea {
  min-height: 34px;
}

:root[data-ui-density='compact'] .v192-tabs button,
:root[data-ui-density='compact'] .workspace-tabs button,
:root[data-ui-density='compact'] .enterprise-tabs button {
  min-height: 34px !important;
}

:root[data-ui-density='compact'] .panel-card,
:root[data-ui-density='compact'] .enterprise-panel,
:root[data-ui-density='compact'] .v202-bento-card {
  gap: 8px;
}
.ui-preferences-v202 {
  display: grid;
  gap: 10px;
  padding: 10px;
  margin: 6px 0;
  border-top: 1px solid var(--ui-border);
  border-bottom: 1px solid var(--ui-border);
}

.ui-preferences-v202 > strong {
  font-size: 11px;
  color: var(--ui-text-strong);
}

.ui-theme-grid-v202 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
}

.ui-theme-option-v202,
.ui-density-option-v202 {
  min-height: 34px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px 8px !important;
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-surface-soft) !important;
  color: var(--ui-text) !important;
  font-size: 10px;
}

.ui-theme-option-v202.active,
.ui-density-option-v202.active {
  background: color-mix(in srgb, var(--ui-primary-2) 14%, var(--ui-surface)) !important;
  border-color: var(--ui-primary-2) !important;
  color: var(--ui-primary-2) !important;
  font-weight: 800;
}

.ui-density-row-v202 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
/* =========================================================
   BEG ERP V202 — Global UI Final Authority
   ========================================================= */

/* ---------- Legacy variable bridge ---------- */

:root {
  --brand: var(--ui-primary-2);
  --brand-strong: var(--ui-primary);

  --text: var(--ui-text);
  --muted: var(--ui-muted);

  --border: var(--ui-border);
  --line: var(--ui-border);

  --card: var(--ui-surface);
  --panel: var(--ui-surface);
  --surface: var(--ui-surface);
  --surface-2: var(--ui-surface-soft);
  --soft: var(--ui-surface-soft);

  --input-bg: var(--ui-input-bg);
}

/* ---------- Root ---------- */

html,
body,
#root {
  background: var(--ui-bg) !important;
  color: var(--ui-text);
}

body {
  font-size: var(--ui-font-size);
}

/* ---------- Scrollbars ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--ui-scrollbar) var(--ui-scrollbar-track);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--ui-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--ui-scrollbar);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--ui-primary-2);
}

/* ---------- Motion ---------- */

button,
input,
select,
textarea,
.panel-card,
.enterprise-panel,
.table-card,
.kpi-card,
.v202-bento-card,
.v202-module-card,
.sidebar-nav-item-v202 {
  transition:
    background-color var(--ui-motion) var(--ui-ease),
    border-color var(--ui-motion) var(--ui-ease),
    color var(--ui-motion) var(--ui-ease),
    box-shadow var(--ui-motion) var(--ui-ease),
    transform var(--ui-motion-fast) var(--ui-ease);
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.enterprise-workspace-v202 .enterprise-sidebar-v202 {
  background:
    radial-gradient(
      circle at 18% 0%,
      rgba(60,150,220,.14),
      transparent 27%
    ),
    linear-gradient(
      180deg,
      var(--ui-sidebar),
      var(--ui-sidebar-2)
    ) !important;
}

.enterprise-sidebar-v202 .sidebar-nav-item-v202 {
  min-height: var(--ui-sidebar-row-h) !important;
  border-radius: var(--ui-radius-md) !important;
}

.enterprise-sidebar-v202 .sidebar-nav-icon-v202 {
  width: var(--ui-icon-box-sm) !important;
  height: var(--ui-icon-box-sm) !important;

  display: grid;
  place-items: center;
}

.enterprise-sidebar-v202 .sidebar-nav-icon-v202 svg,
.compact-nav-v1902 button svg,
.sidebar-quick-v1902 svg,
.nav-group-title svg,
.sidebar-search-trigger svg {
  width: var(--ui-icon-sidebar) !important;
  height: var(--ui-icon-sidebar) !important;
  stroke-width: 1.8;
}

.enterprise-sidebar-v202 .sidebar-nav-label-v202 {
  font-size: 12px !important;
  line-height: 1.2;
}

/* =========================================================
   TOPBAR
   ========================================================= */

.enterprise-workspace-v202 .topbar-reference-v191 {
  background:
    color-mix(in srgb,var(--ui-surface) 96%,transparent) !important;

  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;

  box-shadow: var(--ui-shadow-xs) !important;
}

.enterprise-workspace-v202 .topbar-search {
  min-height: var(--ui-control-h) !important;

  background: var(--ui-surface-soft) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius-md) !important;
}

.enterprise-workspace-v202 .topbar-utility-button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;

  background: var(--ui-surface-soft) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius-md) !important;
}

.enterprise-workspace-v202 .topbar-utility-button svg,
.topbar-search svg,
.global-create-v202 svg,
.global-create-v191 svg {
  width: var(--ui-icon-topbar) !important;
  height: var(--ui-icon-topbar) !important;
}

.enterprise-workspace-v202 .global-create-v202 {
  height: var(--ui-button-h) !important;
  min-height: var(--ui-button-h) !important;

  border-radius: var(--ui-radius-md) !important;
}

/* =========================================================
   SURFACES
   ========================================================= */

.panel-card,
.enterprise-panel,
.table-card,
.card,
.kpi-card,
.v202-bento-card,
.v202-module-card,
.v202-financial-kpi,
.page-head,
.v192-page-header,
.v192-tabs,
.workspace-tabs,
.modal-card,
.commercial-editor-shell,
.fs-table-card,
.fs-create-card,
.executive-panel {
  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius-xl) !important;
}

.panel-card,
.enterprise-panel,
.table-card,
.card,
.kpi-card,
.v202-bento-card,
.v202-module-card,
.v202-financial-kpi,
.page-head,
.modal-card,
.commercial-editor-shell,
.fs-table-card,
.fs-create-card,
.executive-panel {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;

  box-shadow: var(--ui-shadow-xs);
}

.state-card {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-border) !important;
  color: var(--ui-muted) !important;
}

/* =========================================================
   GLOBAL ICON SYSTEM
   ========================================================= */

button > svg,
.btn > svg,
.primary > svg,
.primary-btn > svg,
.secondary-btn > svg,
.tool-btn > svg,
.ghost > svg {
  width: var(--ui-icon-button) !important;
  height: var(--ui-icon-button) !important;

  flex: 0 0 auto;
}

.icon-btn svg,
.row-actions svg,
.fs-warranty svg,
.fs-service svg {
  width: var(--ui-icon-inline) !important;
  height: var(--ui-icon-inline) !important;
}

.v192-tabs svg,
.workspace-tabs svg,
.top-nav-context-tools svg,
.commerce-context-nav button svg,
.commerce-navigation-item svg,
.commerce-modern-item-icon svg,
.commerce-nav-section-icon svg {
  width: var(--ui-icon-tab) !important;
  height: var(--ui-icon-tab) !important;
}

.kpi-icon,
.v202-kpi-icon,
.module-icon,
.v202-module-icon {
  width: var(--ui-icon-box-lg) !important;
  height: var(--ui-icon-box-lg) !important;
  min-width: var(--ui-icon-box-lg) !important;

  border-radius: var(--ui-radius-md) !important;
}

.kpi-icon svg,
.v202-kpi-icon svg,
.module-icon svg,
.v202-module-icon svg {
  width: var(--ui-icon-kpi) !important;
  height: var(--ui-icon-kpi) !important;
}

.page-head h1 svg,
.page-head h2 svg,
.page-head h3 svg,
.panel-title-row svg,
.executive-panel > header svg,
.fs-detail-grid h3 svg,
.project-documents-workspace h3 svg,
.service360-head svg {
  width: var(--ui-icon-feature) !important;
  height: var(--ui-icon-feature) !important;
}

/* =========================================================
   INPUTS
   ========================================================= */

input,
select,
textarea {
  min-height: var(--ui-control-h);

  background: var(--ui-input-bg) !important;
  color: var(--ui-text) !important;

  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-sm) !important;

  box-shadow: none !important;
}

input:hover,
select:hover,
textarea:hover {
  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 35%,
      var(--ui-border)
    ) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-primary-2) !important;

  box-shadow:
    0 0 0 3px
    color-mix(
      in srgb,
      var(--ui-primary-2) 13%,
      transparent
    ) !important;

  outline: 0 !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--ui-muted) !important;
  opacity: .82;
}

/* =========================================================
   BUTTONS
   ========================================================= */

button {
  border-radius: var(--ui-radius-sm);
}

.primary,
.primary-btn,
.global-create-v202,
.global-create-v191,
.issue-btn {
  min-height: var(--ui-button-h);

  background: var(--ui-primary-2) !important;
  border-color: var(--ui-primary-2) !important;
  color: #fff !important;

  box-shadow: none !important;
}

.secondary-btn,
.tool-btn,
.ghost,
.icon-btn {
  min-height: var(--ui-control-h-sm);

  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-text) !important;
}

.primary:not(:disabled):hover,
.primary-btn:not(:disabled):hover,
.issue-btn:not(:disabled):hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

button:disabled,
.btn:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed !important;

  opacity: .68;

  background: var(--ui-disabled-bg) !important;
  color: var(--ui-disabled-text) !important;
}

/* =========================================================
   TABLES
   ========================================================= */

.table-card,
.table-wrap,
.fs-table-card {
  overflow: auto;
}

.table-card thead th,
.table-wrap thead th,
.commercial-grid-table thead th,
.fs-table-card th {
  padding-top: 10px !important;
  padding-bottom: 10px !important;

  background: var(--ui-surface-soft) !important;
  color: var(--ui-text-strong) !important;

  border-color: var(--ui-border) !important;

  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;
}

.table-card tbody td,
.table-wrap tbody td,
.commercial-grid-table tbody td,
.fs-table-card td {
  padding-top: 10px !important;
  padding-bottom: 10px !important;

  color: var(--ui-text) !important;
  border-color: var(--ui-border) !important;
}

.table-card tbody tr:hover,
.table-wrap tbody tr:hover,
.commercial-grid-table tbody tr:hover,
.fs-table-card tbody tr:hover {
  background: var(--ui-hover) !important;
}

/* =========================================================
   TABS
   ========================================================= */

.v192-tabs button,
.workspace-tabs button,
.enterprise-tabs button,
.commerce-subnav button,
.top-nav-context-tools button {
  min-height: var(--ui-tab-h) !important;

  border-radius: var(--ui-radius-md) !important;
}

.v192-tabs button.active,
.workspace-tabs button.active,
.enterprise-tabs button.active,
.commerce-subnav button.active {
  background: var(--ui-primary-2) !important;
  border-color: var(--ui-primary-2) !important;
  color: #fff !important;
}

/* =========================================================
   STATUS / BADGES
   ========================================================= */

.badge,
.status,
.v192-status,
.commerce-phase-badge,
.fs-status,
.item-availability,
.picker-count {
  border-radius: var(--ui-radius-pill) !important;
  line-height: 1.2;
}

.v192-status.success,
.status.active,
.status.received,
.status.completed,
.status.paid {
  color: var(--ui-success) !important;
}

.v192-status.warning,
.status.pending,
.status.pending_approval,
.status.overdue {
  color: var(--ui-warning) !important;
}

.v192-status.danger,
.status.rejected,
.status.cancelled,
.status.critical {
  color: var(--ui-danger) !important;
}

/* =========================================================
   MODALS / DRAWERS
   ========================================================= */

[role='dialog'] {
  color: var(--ui-text);
}

.commerce-confirm-modal {
  background: var(--ui-overlay) !important;
}

.commerce-confirm-card,
.modal-card,
.fs-workorder-modal,
.fs-drawer {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;

  box-shadow: var(--ui-shadow-lg) !important;
}

/* =========================================================
   EMPTY / ERROR
   ========================================================= */

.empty,
.table-empty,
.empty-business-widget,
.invoice-empty-cart {
  color: var(--ui-muted) !important;
}

.error,
.error-text {
  border-color:
    color-mix(
      in srgb,
      var(--ui-danger) 35%,
      var(--ui-border)
    ) !important;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-v202 {
  color: var(--ui-text) !important;
}

.v202-command-header,
.v202-financial-kpi,
.v202-bento-card {
  background: var(--ui-surface) !important;
  border-color: var(--ui-border) !important;

  box-shadow: var(--ui-shadow-xs) !important;
}

.v202-command-welcome h1,
.v202-financial-kpi strong,
.v202-command-alerts strong {
  color: var(--ui-text-strong) !important;
}

.v202-command-welcome p,
.v202-command-welcome small,
.v202-command-date,
.v202-financial-kpi small,
.v202-financial-kpi em,
.v202-command-alerts small {
  color: var(--ui-muted) !important;
}

.v202-command-alerts button {
  background: var(--ui-surface-soft) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;
}

.v202-command-alerts button > svg {
  width: var(--ui-icon-kpi) !important;
  height: var(--ui-icon-kpi) !important;
}

/* =========================================================
   DOCUMENT EDITORS
   ========================================================= */

.purchase-line-card,
.quotation-line-card,
.purchase-request-line-card,
.invoice-item-picker,
.invoice-cart-list,
.invoice-context-panel,
.invoice-guard-card {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;
}

.purchase-line-card input,
.quotation-line-card input,
.quotation-line-card textarea,
.purchase-request-line-card input,
.context-field input,
.context-field select,
.context-field textarea {
  background: var(--ui-input-bg) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;
}

/* =========================================================
   COMMERCE COMPATIBILITY
   ========================================================= */

.commerce-v191 .commerce-core-section > .page-head,
.commerce-v191 .commerce-core-section > .panel-card,
.commerce-navigation-item,
.commerce-subnav,
.commerce-note {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;

  border-color: var(--ui-border) !important;
}

.commerce-v191 .commerce-core-section > .page-head h2,
.commerce-v191 .commerce-core-section .field,
.commerce-navigation-item {
  color: var(--ui-text-strong) !important;
}

.commerce-v191 .commerce-core-section > .page-head p,
.commerce-phase-badge small {
  color: var(--ui-muted) !important;
}

/* =========================================================
   DENSITY
   ========================================================= */

:root[data-ui-density='comfortable'] {
  --ui-sidebar-row-h: 40px;
  --ui-table-row-h: 44px;
}

:root[data-ui-density='compact'] {
  --ui-sidebar-row-h: 34px;
  --ui-table-row-h: 36px;
}

:root[data-ui-density='compact']
.enterprise-sidebar-v202
.sidebar-nav-label-v202 {
  font-size: 11.5px !important;
}

:root[data-ui-density='compact']
.enterprise-sidebar-v202
.sidebar-nav-icon-v202 {
  width: 27px !important;
  height: 27px !important;
}

:root[data-ui-density='compact']
.topbar-reference-v191 {
  min-height: 56px !important;
  height: 56px !important;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline:
    2px solid
    color-mix(
      in srgb,
      var(--ui-primary-2) 70%,
      transparent
    ) !important;

  outline-offset: 2px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width:1100px) {
  .enterprise-workspace-v202 .content {
    padding: 12px !important;
  }
}

@media (max-width:640px) {
  :root {
    --ui-control-h: 38px;
    --ui-button-h: 36px;
    --ui-tab-h: 38px;
  }
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
  html,
  body,
  #root {
    background: #fff !important;
    color: #111 !important;
  }

  * {
    box-shadow: none !important;
  }
}

/* =========================================================
   V202 Purchases 360
   ========================================================= */

[data-v192-module='purchases'] {
  display: grid;
  gap: 12px;
}

.purchases-primary-tabs-v202 .v192-tabs {
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;

  gap: 8px;

  overflow: visible !important;
}

.purchases-primary-tabs-v202 .v192-tabs button {
  min-width: 0;
  justify-content: center;

  font-weight: 800;
}

.purchases-secondary-tabs-v202 .v192-tabs {
  display: flex !important;
  flex-wrap: wrap !important;

  gap: 7px;

  overflow: visible !important;
}

.purchases-secondary-tabs-v202 .v192-tabs button {
  flex: 0 1 auto;

  min-width: 150px;
}

.purchase-orders-workspace {
  display: grid;
  gap: 12px;
}

.purchase-orders-workspace .purchase-kpis {
  margin: 0;
}

.purchase-orders-workspace .commercial-list-filters {
  margin: 0;
}

.purchase-orders-workspace .page-head {
  margin: 0;
}

@media (max-width:1100px) {
  .purchases-primary-tabs-v202 .v192-tabs {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width:640px) {
  .purchases-primary-tabs-v202 .v192-tabs {
    grid-template-columns: 1fr !important;
  }

  .purchases-secondary-tabs-v202 .v192-tabs button {
    width: 100%;
  }
}

/* =========================================================
   V202 Purchases Command Center
   ========================================================= */

.purchases-command-center-v202 {
  display: grid;
  gap: 12px;

  padding: 14px;

  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-xl);

  box-shadow: var(--ui-shadow-xs);
}

.purchases-command-head-v202 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.purchases-command-head-v202 > div {
  display: grid;
  gap: 3px;
}

.purchases-command-eyebrow-v202 {
  color: var(--ui-primary-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.purchases-command-head-v202 h2 {
  margin: 0;
  font-size: 17px;
}

.purchases-command-head-v202 p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

.purchases-command-grid-v202 {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 9px;
}

.purchases-command-card-v202 {
  min-height: 92px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px;

  text-align: right;

  background: var(--ui-surface-soft) !important;
  color: var(--ui-text) !important;

  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-lg) !important;
}

.purchases-command-card-v202:hover {
  transform: translateY(-1px);

  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 42%,
      var(--ui-border)
    ) !important;
}

.purchases-command-icon-v202 {
  width: 36px;
  height: 36px;
  min-width: 36px;

  display: grid;
  place-items: center;

  border-radius: var(--ui-radius-md);

  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 11%,
      var(--ui-surface)
    );
}

.purchases-command-icon-v202 svg {
  width: var(--ui-icon-kpi) !important;
  height: var(--ui-icon-kpi) !important;
}

.purchases-command-copy-v202 {
  min-width: 0;

  display: grid;
  gap: 2px;
}

.purchases-command-copy-v202 small {
  color: var(--ui-muted);
  font-style: normal;
}

.purchases-command-copy-v202 strong {
  color: var(--ui-text-strong);
  font-size: 20px;
  line-height: 1.1;
}

.purchases-command-copy-v202 em {
  color: var(--ui-muted);
  font-size: 10px;
  font-style: normal;
}

.purchases-command-card-v202.tone-warning
.purchases-command-icon-v202 {
  color: var(--ui-warning);

  background:
    color-mix(
      in srgb,
      var(--ui-warning) 12%,
      var(--ui-surface)
    );
}

.purchases-command-card-v202.tone-danger
.purchases-command-icon-v202 {
  color: var(--ui-danger);

  background:
    color-mix(
      in srgb,
      var(--ui-danger) 12%,
      var(--ui-surface)
    );
}

.payable-aging-chip {
  display: inline-flex;
  align-items: center;

  min-height: 24px;
  padding: 3px 8px;

  border-radius: var(--ui-radius-pill);

  font-size: 10px;
  font-weight: 800;
}

.payable-aging-chip.current {
  color: var(--ui-success);

  background:
    color-mix(
      in srgb,
      var(--ui-success) 10%,
      transparent
    );
}

.payable-aging-chip.overdue {
  color: var(--ui-danger);

  background:
    color-mix(
      in srgb,
      var(--ui-danger) 10%,
      transparent
    );
}

.payable-aging-chip.warning {
  color: var(--ui-warning);

  background:
    color-mix(
      in srgb,
      var(--ui-warning) 12%,
      transparent
    );
}

.payable-aging-chip.critical {
  color: var(--ui-danger);

  background:
    color-mix(
      in srgb,
      var(--ui-danger) 17%,
      transparent
    );
}

@media (max-width:1200px) {
  .purchases-command-grid-v202 {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

@media (max-width:720px) {
  .purchases-command-head-v202 {
    align-items: stretch;
    flex-direction: column;
  }

  .purchases-command-grid-v202 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   V202 Purchases Final Polish — RFQ / Supplier Quotes / Award
   ========================================================= */

[data-v195-module='procurement-rfq-list'] {
  display: grid;
  gap: 12px;
}

/* Header */
[data-v195-module='procurement-rfq-list'] .v195-page-header {
  min-height: 118px;
  padding: 18px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-xl) !important;

  box-shadow: var(--ui-shadow-xs);
}

[data-v195-module='procurement-rfq-list'] .v195-page-title {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 12px;
}

[data-v195-module='procurement-rfq-list'] .v195-page-title h1 {
  margin: 2px 0 3px;

  color: var(--ui-text-strong);
  font-size: clamp(23px,2vw,30px);
  line-height: 1.15;
}

[data-v195-module='procurement-rfq-list'] .v195-page-title p {
  margin: 0;
  color: var(--ui-muted);
}

[data-v195-module='procurement-rfq-list'] .v195-page-title small {
  color: var(--ui-muted);
  font-weight: 700;
}

[data-v195-module='procurement-rfq-list'] .v195-page-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;

  display: grid;
  place-items: center;

  color: var(--ui-primary-2);

  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 10%,
      var(--ui-surface)
    );

  border-radius: var(--ui-radius-lg);
}

[data-v195-module='procurement-rfq-list'] .v195-page-icon svg {
  width: var(--ui-icon-feature) !important;
  height: var(--ui-icon-feature) !important;
}

[data-v195-module='procurement-rfq-list'] .v195-page-header-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

[data-v195-module='procurement-rfq-list'] .v195-flow-pill {
  min-height: 34px;
  padding: 7px 13px;

  display: inline-flex;
  align-items: center;

  color: var(--ui-primary);
  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 7%,
      var(--ui-surface)
    );

  border: 1px solid
    color-mix(
      in srgb,
      var(--ui-primary-2) 18%,
      var(--ui-border)
    );

  border-radius: var(--ui-radius-pill);

  font-size: 11px;
  font-weight: 800;

  white-space: nowrap;
}

/* KPI authority: no full blue cards */
[data-v195-module='procurement-rfq-list'] .v195-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
}

[data-v195-module='procurement-rfq-list'] .v195-kpi-card {
  min-height: 110px;
  padding: 14px;

  display: flex;
  align-items: center;
  gap: 12px;

  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;

  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-lg) !important;

  box-shadow: var(--ui-shadow-xs) !important;
}

[data-v195-module='procurement-rfq-list']
.v195-kpi-card.primary,
[data-v195-module='procurement-rfq-list']
.v195-kpi-card.success,
[data-v195-module='procurement-rfq-list']
.v195-kpi-card.warning,
[data-v195-module='procurement-rfq-list']
.v195-kpi-card.danger,
[data-v195-module='procurement-rfq-list']
.v195-kpi-card.neutral {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
}

[data-v195-module='procurement-rfq-list'] .v195-kpi-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;

  display: grid;
  place-items: center;

  color: var(--ui-primary-2);

  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 9%,
      var(--ui-surface)
    );

  border-radius: var(--ui-radius-md);
}

[data-v195-module='procurement-rfq-list']
.v195-kpi-card.success
.v195-kpi-icon {
  color: var(--ui-success);

  background:
    color-mix(
      in srgb,
      var(--ui-success) 10%,
      var(--ui-surface)
    );
}

[data-v195-module='procurement-rfq-list']
.v195-kpi-card.warning
.v195-kpi-icon {
  color: var(--ui-warning);

  background:
    color-mix(
      in srgb,
      var(--ui-warning) 11%,
      var(--ui-surface)
    );
}

[data-v195-module='procurement-rfq-list']
.v195-kpi-card.danger
.v195-kpi-icon {
  color: var(--ui-danger);

  background:
    color-mix(
      in srgb,
      var(--ui-danger) 10%,
      var(--ui-surface)
    );
}

[data-v195-module='procurement-rfq-list'] .v195-kpi-icon svg {
  width: var(--ui-icon-kpi) !important;
  height: var(--ui-icon-kpi) !important;
}

[data-v195-module='procurement-rfq-list'] .v195-kpi-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

[data-v195-module='procurement-rfq-list'] .v195-kpi-card span {
  color: var(--ui-muted);
  font-size: 11px;
}

[data-v195-module='procurement-rfq-list'] .v195-kpi-card strong {
  color: var(--ui-text-strong);
  font-size: 23px;
  line-height: 1;
}

/* Search/filter */
[data-v195-module='procurement-rfq-list'] .v195-list-toolbar {
  padding: 12px;

  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(160px,220px);
  gap: 10px;

  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
}

[data-v195-module='procurement-rfq-list'] .v195-search {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 8px;
}

[data-v195-module='procurement-rfq-list'] .v195-search input {
  width: 100%;
}

/* RFQ table */
[data-v195-module='procurement-rfq-list'] .v195-table-card {
  overflow-x: auto;

  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-xl);

  box-shadow: var(--ui-shadow-xs);
}

[data-v195-module='procurement-rfq-list'] .v195-table-card table {
  width: 100%;
  min-width: 900px;

  border-collapse: separate;
  border-spacing: 0;
}

[data-v195-module='procurement-rfq-list'] .v195-table-card th,
[data-v195-module='procurement-rfq-list'] .v195-table-card td {
  padding: 13px 16px;

  text-align: right;
  vertical-align: middle;

  border-bottom: 1px solid var(--ui-border);
}

[data-v195-module='procurement-rfq-list'] .v195-table-card th {
  color: var(--ui-text-strong);
  background: var(--ui-surface-soft);

  font-size: 11px;
  font-weight: 800;

  white-space: nowrap;
}

[data-v195-module='procurement-rfq-list'] .v195-table-card td {
  color: var(--ui-text);
}

[data-v195-module='procurement-rfq-list'] .v195-table-card th:first-child,
[data-v195-module='procurement-rfq-list'] .v195-table-card td:first-child {
  padding-inline-start: 22px;
}

[data-v195-module='procurement-rfq-list'] .v195-table-card th:last-child,
[data-v195-module='procurement-rfq-list'] .v195-table-card td:last-child {
  padding-inline-end: 22px;
}

[data-v195-module='procurement-rfq-list'] .v195-table-card tbody tr:hover {
  background: var(--ui-hover);
}

[data-v195-module='procurement-rfq-list']
.procurement-row-action {
  width: 34px;
  height: 34px;
  min-width: 34px;

  display: inline-grid;
  place-items: center;

  padding: 0;

  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-border) !important;
}

[data-v195-module='procurement-rfq-list']
.procurement-row-action:hover {
  color: var(--ui-primary-2) !important;

  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 42%,
      var(--ui-border)
    ) !important;
}

/* Comparison table */
.rfq-reference-comparison .table-card {
  overflow-x: auto;
}

.rfq-reference-comparison table {
  min-width: 1000px;
}

.rfq-reference-comparison th,
.rfq-reference-comparison td {
  vertical-align: middle;
}

.rfq-reference-comparison .primary.compact {
  min-width: 150px;
  white-space: nowrap;
}

/* Supplier quote entry */
.rfq-reference-quote-entry {
  display: grid;
  gap: 12px;
}

.rfq-reference-quote-entry .commercial-list-filters {
  display: grid;
  grid-template-columns:
    minmax(190px,1.2fr)
    minmax(160px,1fr)
    minmax(150px,.8fr);

  gap: 10px;
}

.rfq-reference-quote-entry .procurement-quote-price-grid {
  display: grid;
  gap: 8px;
}

.rfq-reference-quote-entry .procurement-quote-price-grid label {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(150px,220px);
  gap: 12px;
  align-items: center;

  padding: 10px 12px;

  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
}

/* Responsive */
@media (max-width:1200px) {
  [data-v195-module='procurement-rfq-list'] .v195-kpi-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

@media (max-width:820px) {
  [data-v195-module='procurement-rfq-list'] .v195-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  [data-v195-module='procurement-rfq-list'] .v195-page-header-side {
    align-items: stretch;
  }

  [data-v195-module='procurement-rfq-list'] .v195-list-toolbar {
    grid-template-columns: 1fr;
  }

  [data-v195-module='procurement-rfq-list'] .v195-kpi-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .rfq-reference-quote-entry .commercial-list-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width:560px) {
  [data-v195-module='procurement-rfq-list'] .v195-kpi-grid {
    grid-template-columns: 1fr;
  }

  [data-v195-module='procurement-rfq-list'] .v195-flow-pill {
    width: 100%;
    justify-content: center;

    white-space: normal;
    text-align: center;
  }

  .rfq-reference-quote-entry .procurement-quote-price-grid label {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   BEG ERP V202 — Purchases Batch 4.1 Visual Closure
   ========================================================= */

[data-v192-module="purchases"] {
  --purchases-section-gap: 14px;
}

[data-v192-module="purchases"] > .v192-page-header {
  margin-bottom: 14px;
}

[data-v192-module="purchases"] .v192-page-header {
  padding-block: 14px;
}

[data-v192-module="purchases"] .v192-page-title {
  gap: 14px;
  align-items: center;
}

[data-v192-module="purchases"] .v192-page-title h1 {
  margin-bottom: 4px;
}

[data-v192-module="purchases"] .v192-page-title p {
  margin-block: 0;
  line-height: 1.6;
}

[data-v192-module="purchases"] .v192-flow-pill {
  max-width: 100%;
  white-space: normal;
  line-height: 1.6;
  padding: 8px 12px;
}

/* Command center */

[data-v192-module="purchases"] .purchases-command-center-v202 {
  margin-bottom: var(--purchases-section-gap);
  padding: 16px;
}

[data-v192-module="purchases"] .purchases-command-head-v202 {
  margin-bottom: 12px;
  gap: 12px;
  align-items: center;
}

[data-v192-module="purchases"] .purchases-command-head-v202 h2 {
  margin-block: 2px 3px;
}

[data-v192-module="purchases"] .purchases-command-head-v202 p {
  margin: 0;
}

[data-v192-module="purchases"] .purchases-command-eyebrow-v202 {
  letter-spacing: 0;
  text-transform: none;
}

[data-v192-module="purchases"] .purchases-command-grid-v202 {
  gap: 10px;
}

[data-v192-module="purchases"] .purchases-command-card-v202 {
  min-height: 104px;
  padding: 12px 14px;
  gap: 12px;
  align-items: center;
}

[data-v192-module="purchases"] .purchases-command-icon-v202 {
  flex: 0 0 auto;
}

[data-v192-module="purchases"] .purchases-command-copy-v202 {
  min-width: 0;
}

[data-v192-module="purchases"] .purchases-command-copy-v202 small,
[data-v192-module="purchases"] .purchases-command-copy-v202 em {
  line-height: 1.45;
}

[data-v192-module="purchases"] .purchases-command-copy-v202 strong {
  line-height: 1.1;
}

/* Navigation hierarchy */

[data-v192-module="purchases"] .purchases-primary-tabs-v202 {
  margin-bottom: 8px;
}

[data-v192-module="purchases"] .purchases-primary-tabs-v202 .v192-tabs {
  padding: 5px;
  gap: 6px;
}

[data-v192-module="purchases"] .purchases-primary-tabs-v202 .v192-tabs button {
  min-height: 42px;
  padding: 8px 14px;
  font-weight: 700;
}

[data-v192-module="purchases"] .purchases-secondary-tabs-v202 {
  margin-bottom: 14px;
}

[data-v192-module="purchases"] .purchases-secondary-tabs-v202 .v192-tabs {
  padding: 4px;
  gap: 5px;
}

[data-v192-module="purchases"] .purchases-secondary-tabs-v202 .v192-tabs button {
  min-height: 38px;
  padding: 7px 11px;
  font-weight: 600;
}

[data-v192-module="purchases"] .v192-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

[data-v192-module="purchases"] .v192-tabs button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

[data-v192-module="purchases"] .purchases-primary-tabs-v202 .v192-tabs button.active {
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

[data-v192-module="purchases"] .purchases-secondary-tabs-v202 .v192-tabs button.active {
  font-weight: 700;
}

/* RFQ density */

[data-v192-module="purchases"] [data-v195-module="procurement-rfq-list"],
[data-v192-module="purchases"] [data-v195-module="procurement-rfq-create"] {
  gap: 12px;
}

[data-v192-module="purchases"] [data-v195-module^="procurement-rfq"] .v195-page-header {
  padding-block: 14px;
}

[data-v192-module="purchases"] [data-v195-module^="procurement-rfq"] .v195-kpis {
  gap: 10px;
}

[data-v192-module="purchases"] [data-v195-module^="procurement-rfq"] .v195-kpi-card {
  min-height: 94px;
  padding: 12px 14px;
}

[data-v192-module="purchases"] .rfq-reference-list-table {
  overflow-x: auto;
}

[data-v192-module="purchases"] .rfq-reference-list-table table {
  min-width: 820px;
}

/* Compact zero / empty states */

[data-v192-module="purchases"] .notif-empty,
[data-v192-module="purchases"] .cmd-empty,
[data-v192-module="purchases"] td[colspan] {
  min-height: auto;
}

[data-v192-module="purchases"] td[colspan] {
  padding-block: 20px;
  text-align: center;
}

/* Responsive */

@media (max-width: 1280px) {
  [data-v192-module="purchases"] .purchases-command-grid-v202 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  [data-v192-module="purchases"] .v192-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: thin;
  }
}

@media (max-width: 1024px) {
  [data-v192-module="purchases"] .purchases-command-grid-v202 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-v192-module="purchases"] .purchases-command-head-v202,
  [data-v192-module="purchases"] .v192-page-title {
    align-items: flex-start;
  }

  [data-v192-module="purchases"] .v192-flow-pill {
    width: 100%;
  }
}

@media (max-width: 640px) {
  [data-v192-module="purchases"] .purchases-command-grid-v202 {
    grid-template-columns: 1fr;
  }

  [data-v192-module="purchases"] .purchases-command-center-v202 {
    padding: 12px;
  }

  [data-v192-module="purchases"] .purchases-command-card-v202 {
    min-height: 86px;
  }

  [data-v192-module="purchases"] .purchases-primary-tabs-v202 .v192-tabs button,
  [data-v192-module="purchases"] .purchases-secondary-tabs-v202 .v192-tabs button {
    flex: 0 0 auto;
  }
}

/* =========================================================
   BEG ERP V202 — Inventory 360 Batch 1
   ========================================================= */

.inventory-command-center-v202 {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-xl);
  box-shadow: var(--ui-shadow-xs);
}

.inventory-command-head-v202 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.inventory-command-head-v202 > div {
  display: grid;
  gap: 3px;
}

.inventory-command-eyebrow-v202 {
  color: var(--ui-primary-2);
  font-size: 10px;
  font-weight: 800;
}

.inventory-command-head-v202 h2 {
  margin: 0;
  font-size: 18px;
}

.inventory-command-head-v202 p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

.inventory-command-grid-v202 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.inventory-command-grid-v202 article {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
}

.inventory-command-grid-v202 article > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inventory-command-grid-v202 small,
.inventory-command-grid-v202 em {
  color: var(--ui-muted);
  font-style: normal;
  line-height: 1.4;
}

.inventory-command-grid-v202 strong {
  color: var(--ui-text-strong);
  font-size: 19px;
  line-height: 1.15;
}

.inventory-command-icon-v202 {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: grid;
  place-items: center;
  color: var(--ui-primary-2);
  background: color-mix(in srgb, var(--ui-primary-2) 10%, var(--ui-surface));
  border-radius: var(--ui-radius-md);
}

.inventory-command-icon-v202 svg {
  width: var(--ui-icon-kpi);
  height: var(--ui-icon-kpi);
}

.inventory-command-grid-v202 article.warning .inventory-command-icon-v202 {
  color: var(--ui-warning);
  background: color-mix(in srgb, var(--ui-warning) 11%, var(--ui-surface));
}

.inventory-command-grid-v202 article.danger .inventory-command-icon-v202 {
  color: var(--ui-danger);
  background: color-mix(in srgb, var(--ui-danger) 11%, var(--ui-surface));
}

.inventory-visibility-toolbar-v202 {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px 220px;
  gap: 8px;
}

.inventory-visibility-search-v202 {
  position: relative;
}

.inventory-visibility-search-v202 svg {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--ui-muted);
  pointer-events: none;
}

.inventory-visibility-search-v202 input {
  width: 100%;
  padding-inline-start: 38px;
}

.inventory-visibility-chips-v202 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.inventory-visibility-chips-v202 button {
  min-height: 34px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ui-surface);
  color: var(--ui-text);
  border: 1px solid var(--ui-border);
}

.inventory-visibility-chips-v202 button.active {
  border-color: var(--ui-primary-2);
  color: var(--ui-primary-2);
  background: color-mix(in srgb, var(--ui-primary-2) 8%, var(--ui-surface));
}

.inventory-visibility-chips-v202 button.active.warning {
  color: var(--ui-warning);
  border-color: color-mix(in srgb, var(--ui-warning) 55%, var(--ui-border));
}

.inventory-visibility-chips-v202 button.active.danger {
  color: var(--ui-danger);
  border-color: color-mix(in srgb, var(--ui-danger) 55%, var(--ui-border));
}

.inventory-visibility-table-v202 {
  max-height: 440px;
  overflow: auto;
}

.inventory-visibility-table-v202 table {
  min-width: 900px;
}

.inventory-primary-tabs-v202 {
  margin-bottom: 12px;
}

.inventory-primary-tabs-v202 button {
  gap: 7px;
}

@media (max-width: 1400px) {
  .inventory-command-grid-v202 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .inventory-command-grid-v202 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-visibility-toolbar-v202 {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-visibility-search-v202 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .inventory-command-head-v202 {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-command-grid-v202,
  .inventory-visibility-toolbar-v202 {
    grid-template-columns: 1fr;
  }

  .inventory-visibility-search-v202 {
    grid-column: auto;
  }
}

/* =========================================================
   BEG ERP V202 — Inventory 360 Batch 2
   Warehouse Operations & Movement Authority
   ========================================================= */

.inventory-operations-v202 {
  display: grid;
  gap: 12px;
}

.inventory-operations-head-v202 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-xl);
  box-shadow: var(--ui-shadow-xs);
}

.inventory-operations-head-v202 > div:first-child {
  display: grid;
  gap: 3px;
}

.inventory-operations-head-v202 > div:first-child > span {
  color: var(--ui-primary-2);
  font-size: 10px;
  font-weight: 800;
}

.inventory-operations-head-v202 h2 {
  margin: 0;
  font-size: 18px;
}

.inventory-operations-head-v202 p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

.inventory-authority-note-v202 {
  max-width: 520px;
  padding: 9px 12px;
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.6;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
}

.inventory-operations-tabs-v202 {
  margin: 0;
}

.inventory-operations-tabs-v202 button {
  gap: 7px;
}

.inventory-operations-v202 .form-card,
.inventory-operations-v202 > .sub-head,
.inventory-operations-v202 .table-card {
  margin-top: 0;
}

.inventory-operations-v202 .sub-head {
  min-height: 54px;
  padding: 10px 12px;
}

.inventory-operations-v202 .sub-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-operations-v202 .sub-head h3 {
  margin: 0;
}

.inventory-operations-v202 .sub-head small {
  width: 100%;
  padding-inline-start: 28px;
  color: var(--ui-muted);
  font-size: 11px;
}

.inventory-operations-v202 .stats-grid {
  gap: 10px;
}

.inventory-operations-v202 .stat-card {
  min-height: 86px;
  padding: 12px;
}

.inventory-operations-v202 .form-grid {
  gap: 10px;
}

.inventory-operations-v202 .field {
  gap: 5px;
}

.inventory-operations-v202 .table-card {
  overflow-x: auto;
}

.inventory-operations-v202 .table-card table {
  min-width: 780px;
}

.inventory-operations-v202 .success-banner,
.inventory-operations-v202 .error {
  margin: 0;
}

@media (max-width: 1024px) {
  .inventory-operations-head-v202 {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-authority-note-v202 {
    max-width: none;
  }

  .inventory-operations-tabs-v202 {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .inventory-operations-tabs-v202 button {
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .inventory-operations-head-v202 {
    padding: 12px;
  }

  .inventory-operations-v202 .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-operations-v202 .form-grid {
    grid-template-columns: 1fr;
  }

  .inventory-operations-v202 .field[style*="grid-column"] {
    grid-column: auto !important;
  }
}

/* =========================================================
   BEG ERP V202 — Inventory 360 Batch 2.1
   Visual Unification Authority
   ========================================================= */

/* Main inventory page */

.enterprise-workspace-v202 .commercial-page-head {
  overflow: hidden;
}

.enterprise-workspace-v202 .commercial-page-head .commercial-status {
  max-width: 100%;
  white-space: normal;
  line-height: 1.55;
  text-align: center;
}

/* Inventory command center consistency */

.inventory-command-grid-v202 article {
  min-height: 104px;
}

.inventory-command-grid-v202 article > div {
  align-content: center;
}

.inventory-command-grid-v202 small {
  font-size: 11px;
}

.inventory-command-grid-v202 strong {
  font-size: 20px;
}

.inventory-command-grid-v202 em {
  font-size: 10px;
}

/* Product list unification */

.inventory-primary-tabs-v202 {
  padding: 5px;
  gap: 6px;
}

.inventory-primary-tabs-v202 button {
  min-height: 42px;
  font-weight: 800;
}

.inventory-primary-tabs-v202 + .page-head,
.inventory-primary-tabs-v202 ~ .page-head {
  margin-top: 0;
}

.inventory-primary-tabs-v202 ~ .mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.inventory-primary-tabs-v202 ~ .mini-kpis > div {
  min-height: 92px;
  padding: 12px 14px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-xs);
}

.inventory-primary-tabs-v202 ~ .search-bar {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-xl);
  padding: 8px 10px;
}

.inventory-primary-tabs-v202 ~ .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.inventory-primary-tabs-v202 ~ .filter-chips button {
  min-height: 34px;
  padding: 6px 12px;
  background: var(--ui-surface);
  color: var(--ui-text);
  border: 1px solid var(--ui-border);
}

.inventory-primary-tabs-v202 ~ .filter-chips button.active {
  background:
    color-mix(in srgb, var(--ui-primary-2) 9%, var(--ui-surface));
  color: var(--ui-primary-2);
  border-color: var(--ui-primary-2);
}

/* Hierarchy: secondary operations */

.inventory-operations-tabs-v202 {
  padding: 5px;
  gap: 6px;
}

.inventory-operations-tabs-v202 button {
  min-height: 40px;
  font-weight: 700;
}

/* Operational/detail navigation */

.inventory-operational-detail-v202 {
  display: grid;
  gap: 12px;
}

.inventory-detail-tabs-v202 {
  padding: 4px;
  gap: 5px;
  background: var(--ui-surface-soft) !important;
}

.inventory-detail-tabs-v202 button {
  min-height: 36px !important;
  font-size: 12px;
  font-weight: 650;
  gap: 6px;
}

.inventory-detail-tabs-v202 button.active {
  box-shadow: none !important;
}

/* Advanced operations surfaces */

.inventory-operations-v202 .enterprise-stack,
.inventory-operations-v202 .panel-card {
  margin: 0;
}

.inventory-operations-v202 .panel-card .section-head,
.inventory-operational-detail-v202 .section-head {
  min-height: 54px;
  padding: 10px 12px;
}

.inventory-operational-detail-v202 .section-head button,
.inventory-operational-detail-v202 .secondary-btn {
  appearance: none;
  min-height: var(--ui-control-h-sm);
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-sm) !important;
}

/* Compact empty states */

.inventory-operational-detail-v202 .empty-state,
.inventory-operational-detail-v202 .state-card,
.inventory-operational-detail-v202 td[colspan] {
  min-height: 72px !important;
  padding: 18px !important;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ui-muted);
}

/* Product / inventory tables */

.inventory-primary-tabs-v202 ~ .table-card,
.inventory-operational-detail-v202 .table-card,
.inventory-operations-v202 .table-card {
  overflow-x: auto;
}

.inventory-primary-tabs-v202 ~ .table-card table {
  min-width: 980px;
}

.inventory-primary-tabs-v202 ~ .table-card td:first-child {
  min-width: 260px;
}

.inventory-primary-tabs-v202 ~ .table-card td:first-child b {
  display: block;
  max-width: 360px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Responsive */

@media (max-width: 1280px) {
  .enterprise-workspace-v202 .commercial-page-head {
    align-items: flex-start;
    gap: 12px;
  }

  .enterprise-workspace-v202 .commercial-page-head .commercial-status {
    max-width: 48%;
  }

  .inventory-primary-tabs-v202 ~ .mini-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .enterprise-workspace-v202 .commercial-page-head {
    flex-direction: column;
  }

  .enterprise-workspace-v202 .commercial-page-head .commercial-status {
    width: 100%;
    max-width: none;
  }

  .inventory-operations-tabs-v202,
  .inventory-detail-tabs-v202 {
    overflow-x: auto;
    flex-wrap: nowrap !important;
  }

  .inventory-operations-tabs-v202 button,
  .inventory-detail-tabs-v202 button {
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .inventory-primary-tabs-v202 ~ .mini-kpis {
    grid-template-columns: 1fr;
  }

  .inventory-primary-tabs-v202 {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .inventory-primary-tabs-v202 button {
    width: 100%;
  }
}

/* V202 Inventory 360 — movement ledger */
.inventory-ledger-v202{display:grid;gap:16px}
.inventory-ledger-summary-v202{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.inventory-ledger-summary-v202>div{display:grid;gap:4px;padding:16px;border:1px solid var(--border,#e5e7eb);border-radius:16px;background:var(--surface,#fff)}
.inventory-ledger-summary-v202 small,.inventory-ledger-summary-v202 span{color:var(--muted,#64748b)}
.inventory-ledger-summary-v202 strong{font-size:1.35rem}
.inventory-ledger-filters-v202{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr)) auto auto;gap:10px;align-items:end}
.inventory-ledger-filters-v202 label{display:grid;gap:6px;font-size:.82rem;color:var(--muted,#64748b)}
.inventory-ledger-filters-v202 input{min-height:42px}
.inventory-ledger-table-v202{overflow:auto}
.inventory-ledger-table-v202 table{min-width:1180px}
.inventory-ledger-table-v202 td{vertical-align:middle}
.inventory-movement-badge-v202{display:inline-flex;align-items:center;justify-content:center;min-width:66px;padding:5px 10px;border-radius:999px;font-weight:800;font-size:.78rem}
.inventory-movement-badge-v202.is-in{background:rgba(16,185,129,.12);color:#047857}
.inventory-movement-badge-v202.is-out{background:rgba(239,68,68,.12);color:#b91c1c}
.inventory-movement-badge-v202.is-adjust{background:rgba(245,158,11,.14);color:#b45309}
.inventory-qty-in-v202{color:#047857}
.inventory-qty-out-v202{color:#b91c1c}
@media(max-width:1100px){
  .inventory-ledger-summary-v202{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inventory-ledger-filters-v202{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .inventory-ledger-summary-v202,.inventory-ledger-filters-v202{grid-template-columns:1fr}
}

/* V202 Inventory 360 — Product Search & Profile Workspace */
.inventory-product-workspace-v202{
  display:grid;
  gap:16px;
  padding:20px;
  border:1px solid var(--border,#dbe7f1);
  border-radius:20px;
  background:var(--surface,#fff);
}

.inventory-product-workspace-head-v202,
.inventory-product-profile-head-v202,
.inventory-all-products-head-v202{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.inventory-product-workspace-head-v202 h2,
.inventory-product-profile-head-v202 h3{
  margin:4px 0;
}

.inventory-product-workspace-head-v202 p,
.inventory-product-profile-head-v202 p{
  margin:0;
  color:var(--muted,#64748b);
}

.inventory-workspace-eyebrow-v202{
  color:#168eea;
  font-size:.78rem;
  font-weight:800;
}

.inventory-product-summary-v202{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.inventory-product-summary-v202>button,
.inventory-product-summary-v202>div{
  min-height:92px;
  padding:15px 16px;
  border:1px solid var(--border,#dbe7f1);
  border-radius:16px;
  background:var(--surface-soft,#f8fbfe);
  text-align:right;
}

.inventory-product-summary-v202>button{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:4px 10px;
  cursor:pointer;
  color:inherit;
}

.inventory-product-summary-v202>button svg{
  grid-row:1/3;
  align-self:center;
  width:22px;
}

.inventory-product-summary-v202 span{
  color:var(--muted,#64748b);
}

.inventory-product-summary-v202 b{
  font-size:1.35rem;
}

.inventory-product-summary-v202 .has-warning b{
  color:#b45309;
}

.inventory-product-finder-v202{
  display:grid;
  gap:12px;
}

.inventory-product-search-v202{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:58px;
  padding:7px 10px 7px 16px;
  border:1px solid #bcd7ec;
  border-radius:16px;
  background:#fff;
}

.inventory-product-search-v202>svg{
  width:22px;
  color:#5f7f9c;
}

.inventory-product-search-v202 input{
  flex:1;
  min-width:0;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  font-size:1rem;
}

.inventory-search-idle-v202,
.inventory-search-empty-v202{
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:22px;
  border:1px dashed #c9dcea;
  border-radius:16px;
  text-align:center;
  color:var(--muted,#64748b);
}

.inventory-search-idle-v202>svg,
.inventory-search-empty-v202>svg{
  width:28px;
  height:28px;
  color:#168eea;
}

.inventory-search-idle-v202 strong,
.inventory-search-empty-v202 strong{
  color:var(--text,#0f2f4a);
}

.inventory-product-results-v202{
  border:1px solid var(--border,#dbe7f1);
  border-radius:16px;
  overflow:hidden;
}

.inventory-product-results-head-v202{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 14px;
  background:#f8fbfe;
  color:var(--muted,#64748b);
}

.inventory-quick-results-v202{
  display:grid;
}

.inventory-product-result-v202{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
  padding:12px 14px;
  border:0;
  border-top:1px solid #e5edf4;
  background:#fff;
  color:inherit;
  text-align:right;
  cursor:pointer;
}

.inventory-product-result-v202:hover{
  background:#f5faff;
}

.inventory-product-result-mark-v202{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#e8f4fd;
  color:#168eea;
  font-weight:900;
}

.inventory-product-result-main-v202{
  display:grid;
  gap:3px;
  min-width:0;
}

.inventory-product-result-main-v202 strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.inventory-product-result-main-v202 span{
  color:var(--muted,#64748b);
  font-size:.8rem;
}

.inventory-product-result-stock-v202{
  display:grid;
  grid-template-columns:auto auto;
  align-items:center;
  gap:2px 8px;
  min-width:125px;
}

.inventory-product-result-stock-v202 small{
  color:var(--muted,#64748b);
}

.inventory-product-result-stock-v202 b{
  font-size:1.15rem;
}

.inventory-product-result-stock-v202 span{
  grid-column:1/-1;
  font-size:.75rem;
  font-weight:800;
}

.inventory-product-profile-v202{
  display:grid;
  gap:16px;
  padding-top:4px;
}

.inventory-product-profile-grid-v202{
  display:grid;
  grid-template-columns:1.25fr .85fr 1fr;
  gap:12px;
}

.inventory-product-info-card-v202,
.inventory-product-stock-card-v202,
.inventory-product-price-card-v202{
  padding:17px;
  border:1px solid var(--border,#dbe7f1);
  border-radius:16px;
  background:#fafdff;
}

.inventory-product-card-title-v202{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}

.inventory-product-card-title-v202>svg,
.inventory-product-money-mark-v202{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  padding:8px;
  border-radius:11px;
  background:#e8f4fd;
  color:#168eea;
  font-weight:900;
}

.inventory-product-card-title-v202>div{
  display:grid;
}

.inventory-product-card-title-v202 span{
  color:var(--muted,#64748b);
  font-size:.76rem;
}

.inventory-product-info-card-v202 dl,
.inventory-product-price-card-v202 dl{
  display:grid;
  gap:0;
  margin:0;
}

.inventory-product-info-card-v202 dl>div,
.inventory-product-price-card-v202 dl>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  min-height:38px;
  border-top:1px solid #edf2f6;
}

.inventory-product-info-card-v202 dt,
.inventory-product-price-card-v202 dt{
  color:var(--muted,#64748b);
}

.inventory-product-info-card-v202 dd,
.inventory-product-price-card-v202 dd{
  margin:0;
  font-weight:800;
  text-align:left;
}

.inventory-product-stock-number-v202{
  display:grid;
  place-items:center;
  gap:3px;
  min-height:100px;
  margin:8px 0 12px;
}

.inventory-product-stock-number-v202 span,
.inventory-product-stock-number-v202 small{
  color:var(--muted,#64748b);
}

.inventory-product-stock-number-v202 strong{
  font-size:2.2rem;
}

.inventory-product-stock-meta-v202{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.inventory-product-stock-meta-v202>div{
  display:grid;
  gap:3px;
  padding:10px;
  border-radius:12px;
  background:#fff;
  border:1px solid #edf2f6;
}

.inventory-product-stock-meta-v202 span{
  color:var(--muted,#64748b);
  font-size:.75rem;
}

.inventory-product-profile-actions-v202{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.inventory-all-products-v202{
  display:grid;
  gap:12px;
}

.inventory-all-products-head-v202>div{
  display:grid;
}

.inventory-all-products-head-v202 span{
  color:var(--muted,#64748b);
  font-size:.8rem;
}

.inventory-product-table-v202{
  overflow:auto;
  max-height:560px;
}

.inventory-product-table-v202 table{
  min-width:1100px;
}

.inventory-product-name-button-v202{
  display:grid;
  gap:2px;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:right;
  cursor:pointer;
}

.inventory-product-name-button-v202:hover b{
  color:#168eea;
}

.inventory-product-workspace-v202 .is-ok{
  color:#047857;
}

.inventory-product-workspace-v202 .is-low{
  color:#dc2626;
}

@media(max-width:1100px){
  .inventory-product-summary-v202{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .inventory-product-profile-grid-v202{
    grid-template-columns:1fr 1fr;
  }

  .inventory-product-info-card-v202{
    grid-column:1/-1;
  }
}

@media(max-width:720px){
  .inventory-product-workspace-v202{
    padding:14px;
  }

  .inventory-product-workspace-head-v202,
  .inventory-product-profile-head-v202,
  .inventory-all-products-head-v202{
    align-items:stretch;
    flex-direction:column;
  }

  .inventory-product-summary-v202,
  .inventory-product-profile-grid-v202{
    grid-template-columns:1fr;
  }

  .inventory-product-info-card-v202{
    grid-column:auto;
  }

  .inventory-product-result-v202{
    grid-template-columns:40px minmax(0,1fr);
  }

  .inventory-product-result-stock-v202{
    grid-column:2;
  }
}

/* V202 Inventory 360 — Product Workspace final polish */

.inventory-product-summary-v202>div b{
  display:block;
  margin-top:6px;
  direction:ltr;
  unicode-bidi:isolate;
  white-space:nowrap;
  text-align:right;
  line-height:1.25;
}

.inventory-product-profile-v202{
  margin-top:2px;
}

.inventory-product-profile-head-v202{
  padding-bottom:12px;
  border-bottom:1px solid var(--border,#dbe7f1);
}

.inventory-product-profile-head-v202 h3{
  max-width:900px;
  line-height:1.55;
}

.inventory-product-profile-v202 + *{
  margin-top:0;
}

/* Keep the finder compact once a product profile is active */
.inventory-product-finder-v202:has(+ .error + .inventory-product-profile-v202),
.inventory-product-finder-v202:has(+ .inventory-product-profile-v202){
  gap:6px;
}

.inventory-product-workspace-v202:has(.inventory-product-profile-v202)
.inventory-product-search-v202{
  min-height:48px;
}

.inventory-product-workspace-v202:has(.inventory-product-profile-v202)
.inventory-product-search-v202 input{
  font-size:.9rem;
}

@media(max-width:720px){
  .inventory-product-summary-v202>div b{
    font-size:1.15rem;
  }
}

/* Inventory 3.1 — final value and profile polish */

.inventory-product-summary-v202 > div{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
}

.inventory-product-summary-v202 > div b{
  display:block;
  width:100%;
  margin:0;
  direction:ltr;
  unicode-bidi:isolate;
  white-space:nowrap;
  text-align:right;
  font-size:1.3rem;
}

.inventory-product-workspace-v202:has(.inventory-product-profile-v202)
.inventory-product-finder-v202{
  margin-bottom:0;
}

.inventory-product-workspace-v202:has(.inventory-product-profile-v202)
.inventory-search-idle-v202{
  display:none;
}

.inventory-product-profile-head-v202{
  padding-top:4px;
}

.inventory-product-profile-grid-v202{
  align-items:stretch;
}

/* V202 Inventory 360 — Serialized GRN receiving */

.grn-serial-row-v202 td{
  padding:0 14px 14px!important;
  background:#f8fbfe;
}

.grn-serial-editor-v202{
  display:grid;
  grid-template-columns:minmax(180px,.7fr) minmax(320px,1.7fr);
  gap:12px 18px;
  align-items:start;
  padding:14px;
  border:1px solid #cfe0ed;
  border-radius:14px;
  background:#fff;
}

.grn-serial-editor-v202>div{
  display:grid;
  gap:4px;
}

.grn-serial-editor-v202>div span,
.grn-serial-editor-v202 small{
  color:var(--muted,#64748b);
  font-size:.78rem;
}

.grn-serial-editor-v202 textarea{
  min-height:92px;
  resize:vertical;
  direction:ltr;
  text-align:left;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.grn-serial-editor-v202>small{
  grid-column:2;
}

@media(max-width:800px){
  .grn-serial-editor-v202{
    grid-template-columns:1fr;
  }

  .grn-serial-editor-v202>small{
    grid-column:auto;
  }
}

/* V202 Inventory Categories Manager */
.category-manager-v202{
  display:grid;
  gap:16px;
}

.category-manager-table-v202{
  overflow:auto;
  border:1px solid var(--border,#e5e7eb);
  border-radius:16px;
}

.category-manager-table-v202 table{
  width:100%;
  min-width:900px;
}

.category-manager-table-v202 th,
.category-manager-table-v202 td{
  padding:12px;
  vertical-align:middle;
}

.category-manager-table-v202 input,
.category-manager-table-v202 select{
  width:100%;
  min-height:40px;
}

.category-manager-actions-v202{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* V202 Service Profitability */

.fs-profitability-card{
 margin:18px 0;
 padding:18px;
 border:1px solid #e5e7eb;
 border-radius:16px;
 background:var(--card-bg,#fff);
}

.fs-profitability-card h3{
 margin:0 0 14px;
}

.fs-profitability-grid{
 display:grid;
 grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
 gap:10px;
}

.fs-profitability-grid>div{
 display:flex;
 flex-direction:column;
 gap:5px;
 min-height:78px;
 padding:12px;
 border:1px solid #e5e7eb;
 border-radius:12px;
}

.fs-profitability-grid small{
 opacity:.68;
}

.fs-profitability-grid strong{
 font-size:1.05rem;
}

.fs-financial-primary{
 background:rgba(37,99,235,.06);
}

.fs-financial-profit{
 background:rgba(22,163,74,.07);
}

@media(max-width:700px){
 .fs-profitability-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}

/* V202 Service Maintenance 360 — Commercial Controls */

.fs-commercial-controls{
 margin:18px 0;
 padding:18px;
 border:1px solid #e5e7eb;
 border-radius:16px;
 background:var(--card-bg,#fff);
}

.fs-commercial-controls h3{
 margin:0 0 14px;
}

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

.fs-commercial-fields label{
 display:flex;
 flex-direction:column;
 gap:7px;
}

.fs-commercial-fields span{
 font-size:.86rem;
 opacity:.72;
}

.fs-commercial-fields input{
 width:100%;
 padding:10px 12px;
 border:1px solid #d1d5db;
 border-radius:10px;
 background:inherit;
 color:inherit;
}

.fs-commercial-actions{
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:10px;
 margin-top:14px;
}

.fs-commercial-actions button{
 min-height:40px;
}

.fs-commercial-message,
.fs-commercial-note{
 display:block;
 margin-top:10px;
}

.fs-invoice-created{
 font-size:.9rem;
}

@media(max-width:700px){
 .fs-commercial-fields{
  grid-template-columns:1fr;
 }
}

/* =========================================================
   V202 Service Maintenance 360 — Work Order Final UX
   ========================================================= */

.fs-workorder-v202{
  width:min(1240px,calc(100vw - 32px)) !important;
  max-width:1240px !important;
  height:min(900px,calc(100vh - 24px));
  max-height:calc(100vh - 24px);

  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;

  overflow:hidden;

  border-radius:20px !important;
}

.fs-wo-command-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;

  padding:18px 20px;

  border-bottom:1px solid var(--ui-border);
}

.fs-wo-title-zone{
  min-width:0;
  display:grid;
  gap:8px;
}

.fs-wo-number{
  color:var(--ui-muted);
  font-weight:700;
}

.fs-wo-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.fs-wo-title-row>svg{
  width:22px;
  height:22px;
  color:var(--ui-primary-2);
}

.fs-wo-title-row h2{
  margin:0;
  font-size:24px;
  line-height:1.25;
  color:var(--ui-text-strong);
}

.fs-wo-command-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 16px;

  color:var(--ui-muted);
  font-size:12px;
}

.fs-wo-command-meta>span{
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.fs-wo-command-meta svg{
  width:15px;
  height:15px;
}

.fs-wo-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.fs-wo-scroll{
  min-height:0;
  overflow:auto;

  padding:16px;

  display:grid;
  gap:14px;
}

.fs-wo-overview-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.fs-wo-panel,
.fs-timeline-card,
.fs-profitability-card,
.fs-commercial-controls{
  margin:0 !important;
  padding:16px !important;

  background:var(--ui-surface) !important;
  border:1px solid var(--ui-border) !important;
  border-radius:16px !important;

  box-shadow:none !important;
}

.fs-wo-panel h3,
.fs-timeline-card h3,
.fs-profitability-card h3,
.fs-commercial-controls h3{
  margin:0;
  color:var(--ui-text-strong);
  font-size:15px;
}

.fs-wo-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  margin-bottom:12px;
}

.fs-wo-panel-head h3{
  display:flex;
  align-items:center;
  gap:7px;
}

.fs-wo-panel-head h3 svg{
  width:17px;
  height:17px;
}

.fs-wo-panel-head>span{
  min-width:25px;
  height:25px;

  display:grid;
  place-items:center;

  padding:0 7px;

  border-radius:999px;

  background:var(--ui-surface-soft);
  color:var(--ui-muted);

  font-size:11px;
  font-weight:800;
}

.fs-wo-detail-list{
  display:grid;
  gap:0;
}

.fs-wo-detail-list p{
  margin:0;
  padding:9px 0;

  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;

  border-bottom:1px solid
    color-mix(in srgb,var(--ui-border) 70%,transparent);
}

.fs-wo-detail-list p:last-child{
  border-bottom:0;
}

.fs-wo-detail-list b{
  color:var(--ui-muted);
  font-size:12px;
}

.fs-wo-detail-list span{
  color:var(--ui-text-strong);
  font-size:12px;
  font-weight:700;
  text-align:left;
}

.fs-wo-empty-compact{
  min-height:58px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:12px;

  border:1px dashed var(--ui-border);
  border-radius:12px;

  background:var(--ui-surface-soft);
  color:var(--ui-muted);

  font-size:12px;
  text-align:center;
}

.fs-mini-row{
  padding:9px 0 !important;
}

.fs-profitability-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  margin-bottom:12px;
}

.fs-profitability-heading small{
  display:block;
  margin-bottom:3px;

  color:var(--ui-muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.fs-profitability-heading>svg{
  width:22px;
  height:22px;
  color:var(--ui-primary-2);
}

.fs-profitability-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
}

.fs-profitability-grid>div{
  min-height:76px;

  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;

  padding:11px;

  border:1px solid var(--ui-border);
  border-radius:12px;

  background:var(--ui-surface-soft);
}

.fs-profitability-grid small{
  color:var(--ui-muted);
  font-size:10px;
}

.fs-profitability-grid strong{
  color:var(--ui-text-strong);
  font-size:14px;
}

.fs-profitability-grid svg{
  width:15px;
  height:15px;
}

.fs-financial-primary{
  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 7%,
      var(--ui-surface)
    ) !important;
}

.fs-financial-profit{
  background:
    color-mix(
      in srgb,
      var(--ui-success) 8%,
      var(--ui-surface)
    ) !important;
}

.fs-commercial-fields{
  margin-top:12px;

  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.fs-commercial-fields label{
  display:grid;
  gap:6px;
}

.fs-commercial-fields label>span{
  color:var(--ui-muted);
  font-size:11px;
  font-weight:700;
}

.fs-commercial-actions{
  margin-top:12px;

  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

.fs-commercial-message,
.fs-commercial-note{
  display:block;
  margin-top:9px;

  color:var(--ui-muted);
  font-size:11px;
}

.fs-invoice-created{
  color:var(--ui-success) !important;
}

.fs-wo-lower-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:12px;
}

.fs-timeline{
  max-height:230px;
  overflow:auto;
}

.fs-timeline>div{
  padding:9px 0;
}

.fs-wo-command-footer{
  display:grid !important;
  grid-template-columns:minmax(260px,1fr) auto;
  align-items:center;
  gap:12px;

  padding:12px 16px !important;

  border-top:1px solid var(--ui-border);

  background:
    color-mix(
      in srgb,
      var(--ui-surface) 96%,
      transparent
    );
}

.fs-wo-command-footer textarea{
  min-height:48px !important;
  max-height:88px;
  resize:vertical;
}

.fs-action-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.fs-wo-loading{
  margin:auto;

  padding:24px 32px;

  background:var(--ui-surface);
  border:1px solid var(--ui-border);
  border-radius:16px;

  color:var(--ui-muted);
}

.fs-workorder-error{
  min-height:260px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
}

@media(max-width:1100px){
  .fs-wo-overview-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .fs-profitability-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:720px){
  .fs-workorder-v202{
    width:100vw !important;
    height:100vh;
    max-height:100vh;
    border-radius:0 !important;
  }

  .fs-wo-command-head{
    flex-direction:column;
  }

  .fs-wo-head-actions{
    width:100%;
    justify-content:flex-start;
  }

  .fs-wo-overview-grid,
  .fs-wo-lower-grid,
  .fs-commercial-fields{
    grid-template-columns:1fr;
  }

  .fs-profitability-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .fs-wo-command-footer{
    grid-template-columns:1fr;
  }

  .fs-action-row{
    justify-content:stretch;
  }

  .fs-action-row button{
    flex:1 1 140px;
  }
}

/* =========================================================
   V202 Service Maintenance 360 - Final Visual Polish
   ========================================================= */

.fs-workorder-v202{
  border:1px solid var(--ui-border) !important;
}

.fs-wo-title-row{
  align-items:flex-start;
}

.fs-wo-title-copy{
  min-width:0;
  display:grid;
  gap:4px;
}

.fs-wo-title-copy h2{
  font-size:23px !important;
}

.fs-wo-title-copy p{
  max-width:620px;
  margin:0;

  color:var(--ui-muted);
  font-size:12px;
  line-height:1.7;

  white-space:normal;
}

.fs-wo-overview-grid{
  align-items:start;
}

.fs-wo-overview-grid > .fs-wo-panel{
  align-self:start;
  min-height:0 !important;
}

.fs-wo-panel{
  color:var(--ui-text) !important;
}

.fs-wo-panel h3,
.fs-profitability-card h3,
.fs-commercial-controls h3,
.fs-timeline-card h3{
  color:var(--ui-text-strong) !important;
  font-weight:850;
}

.fs-wo-detail-list b{
  color:
    color-mix(
      in srgb,
      var(--ui-text) 68%,
      var(--ui-muted)
    ) !important;

  font-weight:750;
}

.fs-wo-detail-list span{
  color:var(--ui-text-strong) !important;
  font-weight:800;
}

.fs-wo-empty-compact{
  min-height:52px !important;
  padding:10px 12px !important;

  color:
    color-mix(
      in srgb,
      var(--ui-text) 58%,
      var(--ui-muted)
    ) !important;
}

.fs-profitability-card{
  padding:14px 16px !important;
}

.fs-profitability-grid{
  grid-template-columns:repeat(6,minmax(0,1fr));
}

.fs-profitability-grid>div{
  min-height:72px !important;

  background:
    color-mix(
      in srgb,
      var(--ui-surface-soft) 88%,
      var(--ui-surface)
    ) !important;
}

.fs-profitability-grid small{
  color:
    color-mix(
      in srgb,
      var(--ui-text) 58%,
      var(--ui-muted)
    ) !important;

  font-weight:700;
}

.fs-profitability-grid strong{
  color:var(--ui-text-strong) !important;
  font-size:15px !important;
  font-weight:900 !important;
}

.fs-financial-primary{
  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 28%,
      var(--ui-border)
    ) !important;

  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 10%,
      var(--ui-surface)
    ) !important;
}

.fs-financial-profit{
  border-color:
    color-mix(
      in srgb,
      var(--ui-success) 30%,
      var(--ui-border)
    ) !important;

  background:
    color-mix(
      in srgb,
      var(--ui-success) 11%,
      var(--ui-surface)
    ) !important;
}

.fs-financial-profit strong{
  color:var(--ui-success) !important;
}

.fs-commercial-controls{
  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 18%,
      var(--ui-border)
    ) !important;
}

.fs-commercial-fields input{
  font-weight:800;
}

.fs-wo-scroll{
  scrollbar-width:auto;
  scrollbar-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 42%,
      var(--ui-border)
    )
    var(--ui-surface-soft);
}

.fs-wo-scroll::-webkit-scrollbar{
  width:10px;
}

.fs-wo-scroll::-webkit-scrollbar-track{
  background:var(--ui-surface-soft);
  border-radius:999px;
}

.fs-wo-scroll::-webkit-scrollbar-thumb{
  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 42%,
      var(--ui-border)
    );

  border:2px solid var(--ui-surface-soft);
  border-radius:999px;
}

.fs-wo-command-footer{
  box-shadow:
    0 -8px 22px
    color-mix(
      in srgb,
      #000 4%,
      transparent
    );
}

@media(max-width:1100px){
  .fs-profitability-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:720px){
  .fs-wo-title-copy h2{
    font-size:20px !important;
  }

  .fs-profitability-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* =========================================================
   V202 Workflow & Approvals Command Center
   ========================================================= */

.workflow-v202{
  display:grid;
  gap:14px;
}

.workflow-command-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;

  padding:22px 24px;

  border:1px solid var(--ui-border);
  border-radius:18px;

  background:var(--ui-surface);
}

.workflow-command-head small{
  color:var(--ui-muted);
  font-size:9px;
  font-weight:850;
  letter-spacing:.08em;
}

.workflow-command-head h1{
  margin:5px 0;

  display:flex;
  align-items:center;
  gap:9px;

  color:var(--ui-text-strong);
  font-size:25px;
}

.workflow-command-head h1 svg{
  width:23px;
  height:23px;
  color:var(--ui-primary-2);
}

.workflow-command-head p{
  margin:0;
  color:var(--ui-muted);
  font-size:13px;
}

.workflow-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.workflow-kpis>button,
.workflow-kpis>div{
  min-height:108px;

  padding:14px 16px;

  display:grid;
  gap:6px;

  text-align:right;

  border:1px solid var(--ui-border);
  border-radius:15px;

  background:var(--ui-surface);
  color:inherit;
}

.workflow-kpis>button{
  cursor:pointer;
}

.workflow-kpis>button:hover{
  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 35%,
      var(--ui-border)
    );
}

.workflow-kpis span{
  display:flex;
  align-items:center;
  gap:7px;

  color:var(--ui-muted);
  font-size:11px;
  font-weight:750;
}

.workflow-kpis span svg{
  width:16px;
  height:16px;
}

.workflow-kpis strong{
  color:var(--ui-text-strong);
  font-size:25px;
  line-height:1;
}

.workflow-kpis small{
  color:var(--ui-muted);
  font-size:10px;
}

.workflow-tabs{
  display:flex;
  align-items:center;
  gap:7px;

  padding:7px;

  border:1px solid var(--ui-border);
  border-radius:15px;

  background:var(--ui-surface);
}

.workflow-tabs button{
  display:inline-flex;
  align-items:center;
  gap:7px;

  min-height:42px;

  padding:0 15px;

  border:0;
  border-radius:11px;

  background:transparent;
  color:var(--ui-text);

  font-weight:750;
  cursor:pointer;
}

.workflow-tabs button svg{
  width:16px;
  height:16px;
}

.workflow-tabs button span{
  min-width:22px;
  height:22px;

  display:grid;
  place-items:center;

  padding:0 6px;

  border-radius:999px;
  background:var(--ui-surface-soft);

  font-size:10px;
}

.workflow-tabs button.active{
  background:var(--ui-primary-2);
  color:#fff;
}

.workflow-tabs button.active span{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.workflow-overview-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.workflow-overview-card{
  min-height:210px;

  padding:18px;

  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;

  border:1px solid var(--ui-border);
  border-radius:16px;

  background:var(--ui-surface);
}

.workflow-overview-card>div{
  display:flex;
  align-items:center;
  gap:8px;
}

.workflow-overview-card svg{
  width:20px;
  height:20px;
  color:var(--ui-primary-2);
}

.workflow-overview-card h3{
  margin:0;
  color:var(--ui-text-strong);
}

.workflow-overview-card>strong{
  font-size:32px;
  color:var(--ui-text-strong);
}

.workflow-overview-card p{
  margin:0 0 auto;
  color:var(--ui-muted);
  line-height:1.8;
  font-size:12px;
}

.workflow-advice{
  border-color:
    color-mix(
      in srgb,
      var(--ui-primary-2) 24%,
      var(--ui-border)
    );
}

.workflow-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;

  padding:4px 2px;
}

.workflow-section-head h2{
  margin:0 0 4px;
  color:var(--ui-text-strong);
  font-size:18px;
}

.workflow-section-head p{
  margin:0;
  color:var(--ui-muted);
  font-size:12px;
}

.workflow-rule-form{
  margin:0 !important;
}

.workflow-form-head{
  margin-bottom:14px;
}

.workflow-form-head h3{
  margin:0 0 4px;
}

.workflow-form-head p{
  margin:0;
  color:var(--ui-muted);
  font-size:12px;
}

.workflow-empty{
  min-height:260px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;

  padding:32px;

  text-align:center;

  border:1px dashed var(--ui-border);
  border-radius:17px;

  background:var(--ui-surface);
}

.workflow-empty>svg{
  width:36px;
  height:36px;
  color:var(--ui-primary-2);
}

.workflow-empty.success>svg{
  color:var(--ui-success);
}

.workflow-empty h3{
  margin:0;
  color:var(--ui-text-strong);
}

.workflow-empty p{
  max-width:500px;
  margin:0 0 8px;

  color:var(--ui-muted);
  line-height:1.8;
  font-size:12px;
}

.workflow-table table{
  margin:0;
}

.workflow-table tbody tr:hover{
  background:var(--ui-surface-soft);
}

.workflow-step{
  min-width:28px;
  height:28px;

  display:inline-grid;
  place-items:center;

  border-radius:999px;
  background:var(--ui-surface-soft);

  color:var(--ui-text-strong);
  font-weight:850;
}

.workflow-required{
  display:inline-flex;
  align-items:center;

  padding:4px 9px;

  border-radius:999px;

  font-size:10px;
  font-weight:850;
}

.workflow-required.yes{
  background:
    color-mix(
      in srgb,
      var(--ui-primary-2) 10%,
      var(--ui-surface)
    );

  color:var(--ui-primary-2);
}

.workflow-required.no{
  background:var(--ui-surface-soft);
  color:var(--ui-muted);
}

@media(max-width:1000px){
  .workflow-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .workflow-overview-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:650px){
  .workflow-command-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .workflow-kpis{
    grid-template-columns:1fr;
  }

  .workflow-tabs{
    overflow:auto;
  }

  .workflow-section-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* V202 Purchase Order Workflow Authority */

.purchase-workflow-banner{
  margin:12px 0;
  padding:11px 14px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  border:1px solid var(--ui-border);
  border-radius:12px;

  background:var(--ui-surface-soft);
}

.purchase-workflow-banner span{
  color:var(--ui-muted);
  font-size:11px;
  font-weight:700;
}

.purchase-workflow-banner b{
  font-size:12px;
}

.purchase-workflow-banner.pending_approval{
  border-color:
    color-mix(
      in srgb,
      #d97706 35%,
      var(--ui-border)
    );

  background:
    color-mix(
      in srgb,
      #d97706 8%,
      var(--ui-surface)
    );
}

.purchase-workflow-banner.approved{
  border-color:
    color-mix(
      in srgb,
      var(--ui-success) 32%,
      var(--ui-border)
    );
}

.purchase-workflow-banner.rejected{
  border-color:
    color-mix(
      in srgb,
      #dc2626 32%,
      var(--ui-border)
    );
}
.beg-one-shell{--v202-sidebar-width:254px;--v202-blue:#2563eb;--v202-navy:#10294b;--v202-navy-deep:#0a1f3b}.beg-one-shell .enterprise-sidebar-v202{background:linear-gradient(180deg,#10294b,#0a1f3b);direction:rtl}.beg-one-shell .sidebar-brand-v202{padding-block:22px;min-height:95px}.beg-one-shell .sidebar-brand-copy-v202 strong{font-size:22px;letter-spacing:.6px;white-space:nowrap}.beg-one-shell .sidebar-brand-copy-v202 small{color:#afc6e2;font-size:11px;margin-top:5px}.beg-one-shell .sidebar-brand-mark-v202{background:#ffffff12;border:1px solid #ffffff25;color:#fff}.beg-one-shell .sidebar-nav-v202{display:flex;flex-direction:column;gap:5px;padding:12px 10px;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#547093 transparent}.beg-one-workspace{flex-shrink:0}.beg-one-group{width:100%;display:flex;align-items:center;gap:10px;border:1px solid transparent;border-radius:11px;background:transparent;color:#d4dfef;text-align:start;padding:12px 10px;font:inherit;cursor:pointer}.beg-one-group.active{background:#2563eb25;border-color:#4d8df54d;color:#fff}.beg-one-group:hover{background:#ffffff12}.beg-one-group>svg:first-child{width:20px;height:20px;flex-shrink:0}.beg-one-group-label{font-size:13px;flex:1;white-space:nowrap}.beg-one-group>svg:last-child{width:14px;height:14px;transition:transform .15s}.beg-one-group[aria-expanded=true]>svg:last-child{transform:rotate(180deg)}.beg-one-children{display:grid;gap:3px;margin:3px 10px 9px 0;border-inline-start:1px solid #ffffff22;padding-inline-start:10px}.beg-one-shell .beg-one-children .sidebar-nav-item-v202{min-height:39px;grid-template-columns:25px minmax(0,1fr);padding:5px 7px;color:#c9d8ea}.beg-one-shell .beg-one-children .sidebar-nav-item-v202.active{background:#2563eb;color:#fff;border-color:#639cff}.beg-one-children .sidebar-nav-icon-v202{width:24px;height:24px}.beg-one-children .sidebar-nav-icon-v202 svg{width:17px;height:17px}.beg-one-shell .sidebar-nav-label-v202{font-size:12px!important;line-height:1.5!important}.beg-one-shell .sidebar-footer-v202{color:#b8cbe3;border-top:1px solid #ffffff15}.beg-one-shell .topbar-title h1{font-weight:800}.beg-one-shell .topbar-title small{letter-spacing:.2px}.beg-one-shell .content{background:var(--surface-page,#f5f8fc)}.beg-one-shell .top-nav-group-button{border-radius:10px}.beg-one-shell button:focus-visible{outline:3px solid #60a5fa;outline-offset:2px}.beg-one-shell.sidebar-collapsed-v202 .beg-one-group-label,.beg-one-shell.sidebar-collapsed-v202 .beg-one-group>svg:last-child,.beg-one-shell.sidebar-collapsed-v202 .beg-one-children{display:none}.beg-one-shell.sidebar-collapsed-v202 .beg-one-group{justify-content:center;padding:13px 6px}.beg-one-shell.sidebar-collapsed-v202 .sidebar-nav-v202{padding-inline:8px}[data-theme=dark] .beg-one-shell .content{background:#111c2b}@media(max-width:767px){.beg-one-shell .enterprise-sidebar-v202{width:254px!important}.beg-one-shell.mobile-nav-open .beg-one-group-label{display:block}.beg-one-shell.mobile-nav-open .beg-one-group>svg:last-child{display:block}.beg-one-shell.mobile-nav-open .beg-one-children{display:grid}.beg-one-shell.mobile-nav-open .beg-one-group{justify-content:initial}.beg-one-shell.mobile-nav-open .sidebar-nav-label-v202{display:block}.beg-one-shell.mobile-nav-open .sidebar-brand-copy-v202{display:block}.beg-one-shell .topbar-title small{font-size:10px}}@media(prefers-reduced-motion:reduce){.beg-one-group>svg:last-child{transition:none}}

@media(min-width:1101px){.enterprise-workspace-v202.beg-one-shell{--v202-sidebar-width:254px;grid-template-columns:minmax(0,1fr) var(--v202-sidebar-width)!important;grid-template-areas:"main sidebar"!important}.enterprise-workspace-v202.beg-one-shell.sidebar-collapsed-v202{grid-template-columns:minmax(0,1fr) var(--v202-sidebar-collapsed)!important}}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202{background:linear-gradient(180deg,#10294b,#0a1f3b)!important}.beg-one-shell .sidebar-brand-copy-v202 strong{font-size:22px!important;color:#fff!important}.beg-one-shell .sidebar-brand-copy-v202 small{font-size:11px!important;color:#afc6e2!important}.beg-one-shell .beg-one-children .sidebar-nav-item-v202{color:#c9d8ea!important}.beg-one-shell .beg-one-children .sidebar-nav-item-v202.active{background:#2563eb!important;color:#fff!important}.beg-one-shell .sidebar-footer-v202 small{font-size:10px!important;color:#afc6e2!important}
@media(max-width:1100px){.enterprise-workspace-v202.beg-one-shell.mobile-nav-open .enterprise-sidebar-v202{display:flex!important;position:fixed;inset:0 0 0 auto;width:274px!important;max-width:85vw;height:100vh;height:100dvh;z-index:220}.beg-one-shell.mobile-nav-open .beg-one-group-label{display:block}.beg-one-shell.mobile-nav-open .beg-one-group>svg:last-child{display:block}.beg-one-shell.mobile-nav-open .beg-one-children{display:grid}.beg-one-shell .mobile-nav-backdrop{position:fixed;inset:0;z-index:210;background:#07182b80;border:0}.beg-one-shell.mobile-nav-open .sidebar-nav-label-v202{display:block!important}.beg-one-shell.mobile-nav-open .sidebar-brand-copy-v202{display:block!important}}

/* Keep navigation readable independently of inherited module/theme colors. */
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-workspace{opacity:1!important}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group{background:transparent!important;color:#edf4ff!important;opacity:1!important;border-color:transparent!important}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group .beg-one-group-label,
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group svg{color:inherit!important;opacity:1!important}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group:hover,
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group:focus-visible{background:#ffffff14!important;color:#fff!important}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group.active{background:#2563eb!important;color:#fff!important;border-color:#669fff!important}

/* One navigation system: every destination remains in the sidebar. */
.enterprise-workspace-v202.beg-one-shell .top-navigation-v191,
.enterprise-workspace-v202.beg-one-shell .top-nav-context-tools{display:none!important}
.enterprise-workspace-v202.beg-one-shell .topbar-reference-v191{position:sticky!important;top:0!important;min-height:64px!important;height:64px!important;z-index:100}
.enterprise-workspace-v202.beg-one-shell .content{padding:18px 20px 28px!important}
.beg-one-shell .topbar-reference-v191 .quick-create-wrap-v202{display:block!important}
.beg-one-shell .beg-one-group{padding-block:10px}
@media(max-width:1100px){.enterprise-workspace-v202.beg-one-shell .topbar-reference-v191{height:auto!important;min-height:62px!important;flex-wrap:wrap;gap:8px!important;padding:10px 12px!important}.beg-one-shell .topbar-reference-v191 .enterprise-brand-v191{display:none!important}.beg-one-shell .topbar-search{min-width:40px!important;flex:1}.enterprise-workspace-v202.beg-one-shell .content{padding:12px!important}}
@media(max-width:650px){.beg-one-shell .global-create-v202{min-width:40px!important;height:36px!important;padding:6px 9px!important}.beg-one-shell .global-create-v202>span,.beg-one-shell .topbar-search>span,.beg-one-shell .topbar-search kbd{display:none!important}.beg-one-shell .topbar-search{max-width:48px!important}.beg-one-shell .topbar-title{display:none!important}.beg-one-shell .topbar-actions-reference-v191{gap:4px!important}}

/* Final approved identity: a single brand, compact chrome, RTL navigation. */
.enterprise-workspace-v202.beg-one-final{--v202-sidebar-width:244px;--v202-navy:#0a1f44;--v202-navy-deep:#081a36}
.enterprise-workspace-v202.beg-one-final .enterprise-sidebar-v202{background:linear-gradient(180deg,#0a1f44,#081a36)!important}
.beg-one-final .sidebar-brand-v202{padding:18px 14px;min-height:88px}
.beg-one-final .sidebar-brand-mark-v202{background:#c9a84c!important;border:1px solid #dfc77c!important;border-radius:11px;color:#0a1f44!important;font-size:12px;font-weight:800}
.beg-one-final .sidebar-brand-copy-v202 strong{font-size:21px!important;letter-spacing:.4px}
.beg-one-final .sidebar-brand-copy-v202 small{font-size:10px!important}
.beg-one-final .sidebar-nav-v202{gap:3px;padding:10px 9px}
.beg-one-final .beg-one-group{padding:10px 9px;min-height:44px;border-radius:9px}
.beg-one-final .beg-one-group-label{font-size:12px;font-weight:600}
.beg-one-final .beg-one-children{margin-block:3px 7px;padding-inline-start:8px}
.beg-one-final .beg-one-children .sidebar-nav-item-v202{min-height:36px;border-radius:8px}
.beg-one-final .topbar-reference-v191 .enterprise-brand-v191{display:none!important}
.beg-one-final .topbar-title h1{font-size:14px!important;margin:0!important;white-space:nowrap}
.beg-one-final .topbar-title small{display:none!important}
.beg-one-final .topbar-reference-v191{border-bottom:1px solid var(--border,#dce5ef)!important;box-shadow:none!important}
.beg-one-final .topbar-search{background:var(--bg,#f4f7fb);border:1px solid var(--border,#dce5ef);border-radius:10px;box-shadow:none;font-size:12px}
.enterprise-workspace-v202.beg-one-final .content{padding:20px 22px 28px!important}
@media(min-width:1101px){.enterprise-workspace-v202.beg-one-final{--v202-sidebar-width:244px}}
@media(max-width:1100px){.enterprise-workspace-v202.beg-one-final .content{padding:14px!important}.beg-one-final.mobile-nav-open .enterprise-sidebar-v202{width:274px!important}}
@media(max-width:650px){.enterprise-workspace-v202.beg-one-final .content{padding:10px!important}}

/* V6.2: remove cumulative sidebar/chrome padding on desktop. */
@media(min-width:1101px){
 .enterprise-workspace-v202.beg-one-final .enterprise-sidebar-v202{box-sizing:border-box;width:var(--v202-sidebar-width)!important;min-width:0;padding:10px 8px!important}
 .enterprise-workspace-v202.beg-one-final.sidebar-collapsed-v202 .enterprise-sidebar-v202{width:var(--v202-sidebar-collapsed)!important}
 .enterprise-workspace-v202.beg-one-final .sidebar-brand-v202{box-sizing:border-box;min-height:76px;padding:10px 5px 14px;margin-bottom:5px}
 .enterprise-workspace-v202.beg-one-final .beg-one-group{box-sizing:border-box;min-height:40px;padding:8px 9px}
 .enterprise-workspace-v202.beg-one-final .beg-one-children .sidebar-nav-item-v202{box-sizing:border-box;min-height:34px;padding-block:5px}
 .enterprise-workspace-v202.beg-one-final .sidebar-nav-v202{gap:2px;padding:8px 3px}
 .enterprise-workspace-v202.beg-one-final .content{padding:14px 18px 24px!important}
}

/* Unified final shell: vector brand, explicit hierarchy, accessible focus. */
.beg-one-shell .sidebar-brand-mark-v202{color:#dab46b!important;background:transparent!important;border:1px solid #dab46b55!important;border-radius:12px!important;display:grid;place-items:center;box-shadow:inset 0 0 0 4px #dab46b08}
.beg-one-shell .sidebar-brand-mark-v202 svg{width:37px;height:37px;display:block}
.beg-one-shell .sidebar-brand-copy-v202{gap:3px}
.beg-one-shell .sidebar-brand-copy-v202 strong{letter-spacing:.8px}
.beg-one-shell .beg-one-children{margin-inline-start:19px;border-inline-start:1px solid #b4c7e52a;padding-inline-start:9px}
.beg-one-shell .beg-one-children button[aria-current="page"]{box-shadow:inset -3px 0 0 #dab46b}
.beg-one-shell .enterprise-sidebar-v202 button:focus-visible{outline:2px solid #e4c68e;outline-offset:-3px}
@media(min-width:900px){.beg-one-shell .enterprise-sidebar-v202 .sidebar-brand-v202{padding-bottom:16px;margin-bottom:7px;border-bottom:1px solid #c8d6ec20}}

/* Open group is context; the current page alone gets the blue fill. */
.enterprise-workspace-v202.beg-one-shell .beg-one-group.active{background:#ffffff0d!important;color:#fff!important;border:1px solid #91afd333}.enterprise-workspace-v202.beg-one-shell .beg-one-children button[aria-current="page"]{background:#2563eb!important;color:#fff!important}

/* Approved executive chrome: stable labels/routes with navy, blue and gold. */
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202{background:radial-gradient(ellipse at 100% 0,#17456b55,transparent 48%),linear-gradient(180deg,#0a1f44,#081a36)!important;border-inline-start:1px solid #9db7da24;box-shadow:-4px 0 18px #0a1f4408}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group{border-radius:10px;min-height:42px}
.enterprise-workspace-v202.beg-one-shell .enterprise-sidebar-v202 .beg-one-group.active{background:#ffffff09!important;border-color:#8db0db3d!important;box-shadow:inset 0 1px 0 #ffffff08}
.enterprise-workspace-v202.beg-one-shell .beg-one-children button[aria-current="page"]{background:linear-gradient(100deg,#1d4ed8,#2563eb)!important;border:1px solid #6395ff85!important;box-shadow:inset -3px 0 0 #dfc884,0 3px 10px #030e2226!important}
.beg-one-shell .sidebar-brand-mark-v202{border-color:#c9a84c70!important;color:#dfbd70!important;background:#c9a84c08!important;box-shadow:inset 0 0 0 4px #c9a84c06}
.beg-one-shell .sidebar-brand-copy-v202 strong{font-weight:800!important;letter-spacing:.5px}
.beg-one-shell .sidebar-brand-copy-v202 small{color:#c4d4e8!important}
.beg-one-shell .topbar-search{border-radius:11px;border-color:var(--border,#dce6f2);box-shadow:inset 0 1px 2px #0a1f4403}
.beg-one-shell .enterprise-sidebar-v202 .sidebar-nav-item-v202:hover:not([aria-current="page"]){background:#ffffff0c!important;color:#fff!important}
/* BEG ERP P388 — Unified Design System */
/* UI styling only. No business logic changes. */

:root {
  --beg-primary: #0755c8;
  --beg-primary-hover: #0645a6;
  --beg-accent: #00bde8;
  --beg-primary-soft: #eaf4ff;
  --beg-bg: #f5f8fd;
  --beg-surface: #ffffff;
  --beg-text: #132847;
  --beg-muted: #64748b;
  --beg-border: #dce6f2;
  --beg-success: #087f66;
  --beg-warning: #a86708;
  --beg-danger: #c53949;
  --beg-radius: 12px;
  --beg-shadow: 0 4px 18px rgba(10, 38, 84, .055);
}

/* Preserve the existing theme system where present. */
html[data-theme="dark"],
body[data-theme="dark"],
html.dark,
body.dark,
.dark {
  --beg-bg: #101b2c;
  --beg-surface: #19283c;
  --beg-text: #edf5ff;
  --beg-muted: #adbbcd;
  --beg-border: #34465e;
  --beg-primary-soft: #16385d;
}

/* Common application surfaces */
body:not(:has(.login-page)) {
  background-color: var(--beg-bg);
}

:where(
  .dashboard-card,
  .stat-card,
  .metric-card,
  .kpi-card,
  .panel,
  .content-card
) {
  border-radius: var(--beg-radius);
  box-shadow: var(--beg-shadow);
}

/* Primary actions: keep original sizing and behavior */
:where(
  button.primary,
  .primary-btn,
  button.btn-primary,
  .btn-primary
):not(:disabled) {
  background: linear-gradient(
    105deg,
    var(--beg-primary),
    #0878e4
  );
  border-color: transparent;
  color: #fff;
}

:where(
  button.primary,
  .primary-btn,
  button.btn-primary,
  .btn-primary
):hover:not(:disabled) {
  background: linear-gradient(
    105deg,
    var(--beg-primary-hover),
    var(--beg-primary)
  );
}

:where(button, input, select, textarea) {
  font-family: inherit;
}

:where(button):focus-visible,
:where(input, select, textarea):focus-visible {
  outline: 2px solid var(--beg-accent);
  outline-offset: 2px;
}

:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-radius: 9px;
}

:where(table) {
  border-collapse: separate;
  border-spacing: 0;
}

:where(table thead th) {
  font-weight: 700;
}

/* Keep semantic document status colors distinguishable. */
:where(.status-success, .text-success) {
  color: var(--beg-success);
}
:where(.status-warning, .text-warning) {
  color: var(--beg-warning);
}
:where(.status-error, .text-danger) {
  color: var(--beg-danger);
}

/* Consistent RTL typography */
html[dir="rtl"] body {
  font-family: 'Cairo', Tahoma, Arial, sans-serif;
}

/* Print documents retain their own financial print layouts. */
@media print {
  :root {
    --beg-bg: #fff;
    --beg-surface: #fff;
    --beg-text: #000;
    --beg-shadow: none;
  }

  :where(
    .dashboard-card,
    .stat-card,
    .metric-card,
    .kpi-card,
    .panel,
    .content-card
  ) {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(button, input, select, textarea) {
    transition: none !important;
  }
}

/* P390 SHARED COMPONENT HARMONIZATION */

/*
 * Low-specificity styling.
 * Existing module-specific and semantic states retain priority.
 */

:root {
  --beg-ui-brand: #0755c8;
  --beg-ui-accent: #00bde8;
  --beg-ui-focus: #22c9ee;
  --beg-ui-radius: 12px;
}

/* Shared controls */
:where(
  .app-shell,
  .main-content,
  .workspace,
  .dashboard,
  .page-content
) :where(
  button,
  input,
  select,
  textarea
) {
  font-family: inherit;
}

:where(
  .app-shell,
  .main-content,
  .workspace,
  .dashboard,
  .page-content
) :where(
  button,
  input,
  select,
  textarea
):focus-visible {
  outline: 2px solid var(--beg-ui-focus);
  outline-offset: 2px;
}

/* Shared action buttons */
:where(
  .app-shell,
  .main-content,
  .workspace,
  .dashboard,
  .page-content
) :where(
  .primary-btn,
  .btn-primary,
  button.primary
):not(:disabled) {
  border-radius: var(--beg-ui-radius);
}

/* Tables */
:where(
  .app-shell,
  .main-content,
  .workspace,
  .dashboard,
  .page-content
) :where(
  table
) {
  border-spacing: 0;
}

:where(
  .app-shell,
  .main-content,
  .workspace,
  .dashboard,
  .page-content
) :where(
  thead th
) {
  font-weight: 700;
}

/* Shared cards and panels */
:where(
  .dashboard-card,
  .stat-card,
  .metric-card,
  .kpi-card,
  .content-card
) {
  border-radius: var(--beg-ui-radius);
}

/* Do not interfere with document printing. */
@media print {
  :where(
    .dashboard-card,
    .stat-card,
    .metric-card,
    .kpi-card,
    .content-card
  ) {
    box-shadow: none;
  }
}

/* P408C_SHARED_UI — shared controls */
:root {
  --beg-control-radius: 10px;
  --beg-control-focus: #00bde8;
}

:where(button, input, select, textarea) {
  font-family: inherit;
}

:where(button):not(:disabled) {
  cursor: pointer;
}

:where(input, select, textarea):focus-visible {
  outline: 2px solid var(--beg-control-focus);
  outline-offset: 2px;
}

:where(.btn-primary, .primary-btn, button.primary) {
  border-radius: var(--beg-control-radius);
}

:where(.modal, .dialog, [role="dialog"]) {
  border-radius: 14px;
}

:where(table) {
  border-collapse: separate;
  border-spacing: 0;
}

:where(table thead th) {
  font-weight: 700;
}

@media print {
  :where(button) {
    box-shadow: none;
  }
}

/* P408E_DESIGN_SYSTEM_BRIDGE */
:root {
  --beg-primary: var(--beg-ds-primary);
  --beg-primary-hover: var(--beg-ds-primary-hover);
  --beg-accent: var(--beg-ds-accent);
  --beg-bg: var(--beg-ds-background);
  --beg-surface: var(--beg-ds-surface);
  --beg-text: var(--beg-ds-text);
  --beg-muted: var(--beg-ds-muted);
  --beg-border: var(--beg-ds-border);
}
/* BEG Design System 360 — P409B */

.beg-ds-button {
  border: 1px solid transparent;
  border-radius: var(--beg-ds-radius-md, 12px);
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.beg-ds-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.beg-ds-button--primary {
  background: var(--beg-brand-blue, #2563EB);
  color: #fff;
}

.beg-ds-button--secondary {
  background: var(--beg-ds-surface, #fff);
  color: var(--beg-ds-text, #132847);
  border-color: var(--beg-ds-border, #dce6f2);
}

.beg-ds-button--gold {
  background: var(--beg-brand-gold, #C9A84C);
  color: var(--beg-brand-navy, #0A1F44);
}

.beg-ds-button--danger {
  background: var(--beg-state-danger, #DC2626);
  color: #fff;
}

.beg-ds-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.beg-ds-field__label {
  font-weight: 700;
  color: var(--beg-ds-text, #132847);
}

.beg-ds-input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--beg-ds-border, #dce6f2);
  border-radius: var(--beg-ds-radius-sm, 8px);
  padding: 10px 12px;
  background: var(--beg-ds-surface, #fff);
  color: var(--beg-ds-text, #132847);
  font: inherit;
}

.beg-ds-input:focus-visible {
  outline: 2px solid var(--beg-brand-cyan, #00BDE8);
  outline-offset: 2px;
}

.beg-ds-card {
  background: var(--beg-ds-surface, #fff);
  border: 1px solid var(--beg-ds-border, #dce6f2);
  border-radius: var(--beg-ds-radius-lg, 16px);
  padding: 16px;
  box-shadow: var(--beg-ds-shadow);
}


/* P429_SHARED_SELECT_TABLE */

/* Shared native select styling */
.beg-ds-select {
  box-sizing: border-box;
  min-height: 39px;
  max-width: 100%;
  padding: 8px 11px;
  color: var(--beg-one-text, #1f2937);
  background: var(--beg-one-surface, #fff);
  border: 1px solid var(--beg-one-border, #dce6f2);
  border-radius: var(--beg-one-radius-sm, 8px);
  font: inherit;
}

.beg-ds-select:focus-visible {
  outline: 2px solid var(--beg-one-focus, #00bde8);
  outline-offset: 2px;
}

.beg-ds-select:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* Shared table foundation */
.beg-ds-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.beg-ds-table th,
.beg-ds-table td {
  border-bottom: 1px solid var(--beg-one-border, #dce6f2);
}

.beg-ds-table thead th {
  font-weight: 800;
}

[data-theme="dark"] .beg-ds-select {
  color: var(--beg-one-text, #edf4ff);
  background: var(--beg-one-surface, #19283c);
  border-color: var(--beg-one-border, #34465e);
}
/*
 BEG ONE - Global Design System
 P415: central tokens and shared application rules.
 Module-specific behavior remains in its module.
*/

:root {
  --beg-one-navy: #0a1f44;
  --beg-one-primary: #2563eb;
  --beg-one-primary-hover: #1d4ed8;
  --beg-one-gold: #c9a84c;
  --beg-one-cyan: #00bde8;

  --beg-one-page: #fbfaf8;
  --beg-one-surface: #ffffff;
  --beg-one-text: #1f2937;
  --beg-one-muted: #64748b;
  --beg-one-border: #dce6f2;

  --beg-one-radius-sm: 8px;
  --beg-one-radius-md: 12px;
  --beg-one-radius-lg: 16px;

  --beg-one-shadow:
    0 4px 18px rgba(10,31,68,.055);

  --beg-one-focus: #00bde8;
}

[data-theme="dark"] {
  --beg-one-page: #101b2c;
  --beg-one-surface: #19283c;
  --beg-one-text: #edf4ff;
  --beg-one-muted: #afbed1;
  --beg-one-border: #34465e;
  --beg-one-shadow:
    0 5px 20px rgba(0,0,0,.16);
}

/* Shared foundations */
html {
  font-family: Cairo, Tahoma, Arial, sans-serif;
}

body {
  text-rendering: optimizeLegibility;
}

:where(button,input,select,textarea,a):focus-visible {
  outline: 2px solid var(--beg-one-focus);
  outline-offset: 2px;
}

:where(button,input,select,textarea) {
  font: inherit;
}

/* Shared design-system controls */
.beg-ds-button {
  border-radius: var(--beg-one-radius-sm);
  font-weight: 700;
}

.beg-ds-field input {
  border-radius: var(--beg-one-radius-sm);
}

.beg-ds-card {
  border-radius: var(--beg-one-radius-md);
}

/* Accessible motion */
@media (prefers-reduced-motion: reduce) {
  :where(.beg-ds-button,.beg-ds-card) {
    transition: none;
  }
}

/* P425_SHARED_CONTROLS */

/* Shared design-system controls only */
:where(.beg-ds-button, .beg-ds-field input,
       .beg-ds-field select, .beg-ds-card) {
  box-sizing: border-box;
}

.beg-ds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  transition: background-color .15s, border-color .15s;
}

.beg-ds-field input,
.beg-ds-field select,
.beg-ds-field textarea {
  min-height: 39px;
  color: var(--beg-one-text);
  background: var(--beg-one-surface);
  border: 1px solid var(--beg-one-border);
  border-radius: var(--beg-one-radius-sm);
}

.beg-ds-card {
  color: var(--beg-one-text);
  background: var(--beg-one-surface);
  border-color: var(--beg-one-border);
}

:where(.beg-ds-button, .beg-ds-field input,
       .beg-ds-field select, .beg-ds-field textarea):focus-visible {
  outline: 2px solid var(--beg-one-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .beg-ds-button {
    transition: none;
  }
}
/*
 * BEG ONE P432 - Enterprise Compact
 * Central visual density only.
 * No route, backend, or database changes.
 */

:root {
  --beg-compact-gap: 12px;
  --beg-compact-control-height: 38px;
  --beg-compact-card-padding: 16px;
  --beg-compact-table-height: 42px;
}

/* Shared design-system surfaces */
.beg-ds-card {
  padding: var(--beg-compact-card-padding);
  min-width: 0;
}

.beg-ds-card > :first-child {
  margin-block-start: 0;
}

.beg-ds-card > :last-child {
  margin-block-end: 0;
}

/* Actions */
.beg-ds-button {
  min-height: var(--beg-compact-control-height);
  padding: 8px 14px;
  line-height: 1.35;
  max-width: 100%;
  vertical-align: middle;
}

.beg-ds-button:focus-visible,
.beg-ds-input:focus-visible,
.beg-ds-select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Inputs and dropdowns */
.beg-ds-input,
.beg-ds-select {
  min-height: var(--beg-compact-control-height);
  padding-block: 7px;
  box-sizing: border-box;
  max-width: 100%;
}

.beg-ds-field {
  min-width: 0;
}

/* Data tables */
.beg-ds-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.beg-ds-table th,
.beg-ds-table td {
  padding: 9px 12px;
  line-height: 1.4;
  vertical-align: middle;
}

.beg-ds-table th {
  font-weight: 700;
}

.beg-ds-table tbody tr {
  min-height: var(--beg-compact-table-height);
}

/* Smaller screens */
@media (max-width: 900px) {
  :root {
    --beg-compact-card-padding: 12px;
  }

  .beg-ds-table th,
  .beg-ds-table td {
    padding: 8px 10px;
  }

  .beg-ds-button {
    padding-inline: 11px;
  }
}

@media (max-width: 600px) {
  .beg-ds-input,
  .beg-ds-select {
    font-size: 16px;
  }
}

/* Print preserves readable rows and page breaks */
@media print {
  .beg-ds-table {
    width: 100%;
  }

  .beg-ds-table th,
  .beg-ds-table td {
    padding: 5px 7px;
    break-inside: avoid;
  }

  .beg-ds-table thead {
    display: table-header-group;
  }
}
/*
 BEG ONE Design System 360 — P434
 Unified interface foundation
 Scoped CEO layout + shared native component design.
 Business logic, permissions, navigation and API remain unchanged.
*/

:root {
  --beg360-navy: #0a1f44;
  --beg360-blue: #2563eb;
  --beg360-gold: #c9a84c;
  --beg360-cyan: #00bde8;
  --beg360-paper: #fbfaf8;
  --beg360-border: #dbe5f1;
  --beg360-muted: #64748b;
  --beg360-radius: 12px;
  --beg360-shadow: 0 2px 10px rgba(10,31,68,.045);
  --beg360-space: 12px;
}

[data-theme="dark"] {
  --beg360-border: #304461;
  --beg360-muted: #a3b6d2;
  --beg360-shadow: 0 3px 16px rgba(0,0,0,.16);
}

/* Shared Design System */
.beg-ds-card {
  border-radius: var(--beg360-radius);
  box-shadow: var(--beg360-shadow);
  min-width: 0;
}

.beg-ds-button {
  border-radius: 9px;
  font-weight: 650;
  min-height: 36px;
  transition:
    box-shadow .16s ease,
    background-color .16s ease,
    border-color .16s ease;
}

.beg-ds-button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.beg-ds-input,
.beg-ds-select {
  min-height: 36px;
  border-radius: 9px;
  max-width: 100%;
}

.beg-ds-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.beg-ds-table th,
.beg-ds-table td {
  padding: 9px 12px;
  line-height: 1.4;
}

.beg-ds-table thead th {
  font-weight: 700;
}

.beg-ds-button:focus-visible,
.beg-ds-select:focus-visible,
.beg-ds-input:focus-visible {
  outline: 2px solid var(--beg360-blue);
  outline-offset: 2px;
}

/*
 CEO — Actual application layout.
 Use existing live data and existing components.
*/

.ceo-workspace {
  --ceo360-gap: 10px;
  display: flex;
  flex-direction: column;
  gap: var(--ceo360-gap);
  min-width: 0;
}

.ceo-workspace .ceo-hero {
  min-height: 0;
  padding: 14px 20px;
  gap: 12px;
  border-radius: var(--beg360-radius);
  align-items: center;
}

.ceo-workspace .ceo-eyebrow {
  font-size: 10px;
  letter-spacing: .06em;
}

.ceo-workspace .ceo-hero h1 {
  font-size: clamp(22px, 1.7vw, 29px);
  line-height: 1.25;
  margin: 3px 0;
}

.ceo-workspace .ceo-hero p {
  margin: 0;
  line-height: 1.4;
}

.ceo-workspace .ceo-header-actions {
  gap: 8px;
}

.ceo-workspace .ceo-header-actions button {
  min-height: 36px;
}

.ceo-workspace .ceo-scope {
  min-height: 0;
  padding: 8px 12px;
  gap: 9px;
  line-height: 1.35;
  font-size: 11px;
  border-radius: 9px;
}

.ceo-workspace .ceo-insights {
  min-width: 0;
}

.ceo-workspace .ceo-detail-filters {
  min-height: 0;
  padding: 11px 15px;
  gap: 10px;
  align-items: center;
  border-radius: var(--beg360-radius);
}

.ceo-workspace .ceo-detail-filters > div:first-child {
  min-width: 190px;
}

.ceo-workspace .ceo-detail-filters label {
  min-width: 0;
}

.ceo-workspace .ceo-detail-filters :is(select,input) {
  min-height: 35px;
}

.ceo-workspace .ceo-detail-scope {
  margin: 5px 0 7px;
  line-height: 1.4;
  font-size: 11px;
}

/*
 Priority box: the old layout reserves too much height
 and centers a single alert in a large empty row.
*/

.ceo-workspace .ceo-decisions {
  min-height: 0;
  padding: 12px 16px;
  gap: 12px;
  align-items: center;
  border-radius: var(--beg360-radius);
}

.ceo-workspace .ceo-decisions > header {
  min-width: 180px;
}

.ceo-workspace .ceo-decisions > header h2 {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.3;
  margin: 0 0 3px;
}

.ceo-workspace .ceo-decisions > header > span {
  line-height: 1.4;
}

.ceo-workspace .ceo-decisions > div {
  min-width: 0;
  gap: 9px;
  align-items: stretch;
}

/* Full-width distribution for the one-alert case */
.ceo-workspace .ceo-decisions[data-priority-count="1"] > div {
  min-width: 0;
  width: auto;
  flex: 1 1 0;
  max-width: 560px;
  margin: 0;
}

.ceo-workspace .ceo-decisions article {
  min-height: 0;
  padding: 10px 13px;
  gap: 9px;
  border-radius: 10px;
}

.ceo-workspace .ceo-decisions article > strong {
  line-height: 1.1;
}

.ceo-workspace .ceo-priority-status {
  margin: 0;
}

.ceo-workspace .ceo-metrics {
  gap: 10px;
  align-items: stretch;
}

.ceo-workspace .beg-ds-card.ceo-card {
  min-height: 0;
  padding: 13px 14px;
  gap: 8px;
  border-radius: var(--beg360-radius);
  box-shadow: var(--beg360-shadow);
}

.ceo-workspace .ceo-card-top {
  gap: 8px;
}

.ceo-workspace .ceo-card-top > span {
  line-height: 1.4;
}

.ceo-workspace .ceo-card > strong {
  line-height: 1.1;
  margin: 2px 0;
}

.ceo-workspace .ceo-card > small {
  line-height: 1.3;
}

.ceo-workspace .ceo-card > button {
  min-height: 32px;
  margin-top: 3px;
}

/* Executive analytics and real operational tables */
.ceo-workspace .ceo-insights-main,
.ceo-workspace .ceo-insights-bottom {
  gap: 10px;
  min-width: 0;
}

.ceo-workspace .ceo-panel {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  border-radius: var(--beg360-radius);
  box-shadow: var(--beg360-shadow);
}

.ceo-workspace .ceo-panel > header {
  margin-bottom: 10px;
  gap: 8px;
}

.ceo-workspace .ceo-panel > header h2 {
  margin: 0;
  line-height: 1.3;
  font-size: clamp(16px,1.3vw,20px);
}

.ceo-workspace .ceo-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.ceo-workspace .ceo-table-scroll :is(th,td) {
  padding: 8px 10px;
}

.ceo-workspace .ceo-chart-legend {
  gap: 10px;
  flex-wrap: wrap;
}

.ceo-workspace .ceo-finance-chart {
  max-width: 100%;
  height: auto;
}

.ceo-workspace .ceo-source-details {
  margin-top: 8px;
}

.ceo-workspace .ceo-shortcuts {
  min-width: 0;
}

.ceo-workspace .ceo-operational-details,
.ceo-workspace .ceo-readiness,
.ceo-workspace .ceo-journey {
  min-width: 0;
}

/* RTL and narrow screens */
@media (max-width: 1100px) {
  .ceo-workspace .ceo-hero {
    padding: 13px 15px;
  }

  .ceo-workspace .ceo-detail-filters {
    padding: 11px;
  }

  .ceo-workspace .ceo-decisions {
    padding: 12px;
  }
}

@media (max-width: 760px) {
  .ceo-workspace .ceo-hero {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .ceo-workspace .ceo-header-actions {
    flex-wrap: wrap;
  }

  .ceo-workspace .ceo-scope {
    flex-wrap: wrap;
  }

  .ceo-workspace .ceo-detail-filters {
    flex-wrap: wrap;
  }

  .ceo-workspace .ceo-decisions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .ceo-workspace .ceo-decisions[data-priority-count="1"] > div {
    max-width: none;
    width: 100%;
  }

  .ceo-workspace .ceo-metrics {
    gap: 9px;
  }

  .ceo-workspace .ceo-panel {
    padding: 12px;
  }
}

/* Explicit dark-mode continuity */
[data-theme="dark"] .ceo-workspace .ceo-panel,
[data-theme="dark"] .ceo-workspace .beg-ds-card.ceo-card {
  box-shadow: var(--beg360-shadow);
}

@media print {
  .beg-ds-table thead,
  .ceo-workspace table thead {
    display: table-header-group;
  }

  .beg-ds-table tr,
  .ceo-workspace table tr {
    break-inside: avoid;
  }

  .ceo-workspace .ceo-header-actions {
    display: none;
  }
}

/* BEGIN P437 EXECUTIVE GRID */

/*
 * Executive grid on existing real React components.
 * Reuses existing priority, KPI, project and financial elements.
 */

.ceo-workspace .ceo-360-executive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  grid-template-areas:
    "filters filters"
    "scope scope"
    "metrics metrics"
    "projects priorities"
    "finance finance"
    "bottom bottom";
  align-items: start;
  gap: 10px 12px;
  min-width: 0;
}

.ceo-workspace .ceo-360-executive-grid > .ceo-detail-filters {
  grid-area: filters;
  min-width: 0;
  margin: 0;
}

.ceo-workspace .ceo-360-executive-grid > .ceo-detail-scope {
  grid-area: scope;
  min-width: 0;
  margin: 0;
  padding: 0 4px;
}

.ceo-workspace .ceo-360-executive-grid > .ceo-metrics {
  grid-area: metrics;
  min-width: 0;
  margin: 0;
}

.ceo-workspace .ceo-360-executive-grid > .ceo-decisions {
  grid-area: priorities;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  gap: 10px;
}

.ceo-workspace .ceo-360-executive-grid .ceo-decisions > header {
  min-width: 0;
}

.ceo-workspace .ceo-360-executive-grid .ceo-decisions > div,
.ceo-workspace .ceo-360-executive-grid
.ceo-decisions[data-priority-count="1"] > div {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  gap: 9px;
}

.ceo-workspace .ceo-360-executive-grid .ceo-decisions article {
  display: flex;
  flex-wrap: wrap;
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  padding: 10px;
  gap: 8px;
}

.ceo-workspace .ceo-360-executive-grid
.ceo-decisions article > strong {
  font-size: 24px;
}

/* Expose the two existing report panels as grid items.
   Their JSX, data and permissions are unchanged. */

.ceo-workspace .ceo-360-executive-grid > .ceo-insights-main {
  display: contents;
}

.ceo-workspace .ceo-360-executive-grid .ceo-projects-panel {
  grid-area: projects;
  min-width: 0;
  align-self: start;
}

.ceo-workspace .ceo-360-executive-grid .ceo-finance-panel {
  grid-area: finance;
  min-width: 0;
}

.ceo-workspace .ceo-360-executive-grid > .ceo-insights-bottom {
  grid-area: bottom;
  min-width: 0;
}

.ceo-workspace .ceo-360-executive-grid
.ceo-projects-panel .ceo-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.ceo-workspace .ceo-360-executive-grid
.ceo-projects-panel table {
  min-width: 690px;
}

.ceo-workspace .ceo-360-executive-grid
.ceo-finance-panel .ceo-finance-chart {
  max-height: 260px;
  width: 100%;
  height: auto;
}

/* Alerts and messages without assigned grid areas
   remain visible and span the layout. */
.ceo-workspace .ceo-360-executive-grid > .ceo-insights-error {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .ceo-workspace .ceo-360-executive-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "filters"
      "scope"
      "metrics"
      "priorities"
      "projects"
      "finance"
      "bottom";
  }
}

@media (max-width: 600px) {
  .ceo-workspace .ceo-360-executive-grid {
    gap: 9px;
  }

  .ceo-workspace .ceo-360-executive-grid
  > .ceo-decisions {
    padding: 12px;
  }
}

@media print {
  .ceo-workspace .ceo-360-executive-grid
  > .ceo-insights-main {
    display: block;
    grid-column: 1 / -1;
  }

  .ceo-workspace .ceo-360-executive-grid {
    display: block;
  }
}

/* END P437 EXECUTIVE GRID */
/*
 * BEG ONE V29 - P443
 * Unified commercial document workspace.
 *
 * Layout only:
 * - Sales invoices
 * - Quotations
 * - Purchase orders
 *
 * No pricing, tax, draft, serial, or API changes.
 */

/* Sales invoice: items first, total below. */

.invoice-modern-workspace
.invoice-modern-layout.beg-wide-document-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.invoice-modern-workspace
.invoice-modern-layout
> .invoice-cart-zone.beg-wide-items-section {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.invoice-modern-workspace
.invoice-modern-layout
> .invoice-total-rail.beg-wide-summary-section {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
}

/* Quotation: keep editor components intact. */

.quotation-modern-workspace
.quotation-p364-layout.beg-wide-document-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.quotation-modern-workspace
.quotation-p364-layout
> .quotation-cart-list.beg-wide-items-section {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.quotation-modern-workspace
.quotation-p364-layout
> .quotation-bottom-panels.beg-wide-summary-section {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  width: 100%;
  max-width: none;
}

/* Purchase order:
   do not convert the entire editor into a flex column.
   Retain original document header and form layout. */

.purchase-modern-workspace.beg-wide-document-flow
> .purchase-cart-list.beg-wide-items-section,
.purchase-modern-workspace.beg-wide-document-flow
> .purchase-bottom-panels.beg-wide-summary-section {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  max-width: none;
  align-self: stretch;
}

/* Shared item editor */

:is(
  .invoice-cart-zone,
  .quotation-cart-list,
  .purchase-cart-list
) {
  box-sizing: border-box;
  min-width: 0;
}

:is(
  .invoice-cart-zone,
  .quotation-cart-list,
  .purchase-cart-list
) :is(input, select, textarea) {
  box-sizing: border-box;
  max-width: 100%;
}

:is(
  .quotation-cart-list,
  .purchase-cart-list
) .commercial-grid-wrap {
  max-width: 100%;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

:is(
  .quotation-cart-list,
  .purchase-cart-list
) .commercial-grid-table {
  width: 100%;
  min-width: 1000px;
}

/* Avoid excessively tall item rows. */

:is(
  .quotation-cart-list,
  .purchase-cart-list
) .commercial-grid-table :is(th, td) {
  padding: 8px 10px;
  vertical-align: middle;
}

/* Summary: wider and more compact than the original rail. */

.invoice-modern-workspace
.invoice-total-rail
.invoice-total-card {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
}

.invoice-modern-workspace
.invoice-total-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.invoice-modern-workspace
.invoice-total-lines > div {
  min-width: 0;
}

/* Do not force an unrelated project, return, or GRN
   workspace into the invoice grid. */

@media screen and (max-width: 900px) {
  .invoice-modern-workspace
  .invoice-total-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(
    .quotation-cart-list,
    .purchase-cart-list
  ) .commercial-grid-table {
    min-width: 850px;
  }
}

@media screen and (max-width: 600px) {
  .invoice-modern-workspace
  .invoice-total-lines {
    grid-template-columns: 1fr;
  }
}

/* PrintDocument continues using its own print styles. */

/* BEGIN P445 PURCHASE GRID */

/*
 * Purchase order editor:
 * Compact document metadata and full-width item editor.
 * Existing React state and calculations remain unchanged.
 */

@media screen {

  .commercial-editor-shell.purchase-workspace.purchase-modern-workspace.beg-wide-document-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .purchase-modern-workspace.beg-wide-document-flow
  > :is(header,section,footer,article,main,aside) {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  /*
   * The actual six-field metadata section.
   * Three columns at desktop sizes.
   */

  .purchase-modern-workspace
  > .commercial-meta-strip.purchase-meta-strip.purchase-context-panel {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    align-items: start;
    gap: 12px 16px;
    padding: 16px;
  }

  .purchase-modern-workspace
  > .purchase-context-panel
  > label.smart-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    gap: 6px;
    margin: 0;
  }

  .purchase-modern-workspace
  > .purchase-context-panel
  > label.smart-field
  > :is(input,select,.beg-ds-select) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 40px;
  }

  .purchase-modern-workspace
  > .purchase-cart-list.beg-wide-items-section {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .purchase-modern-workspace
  > .purchase-bottom-panels.beg-wide-summary-section {
    grid-column: 1 / -1;
    grid-row: auto;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    align-items: start;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .purchase-modern-workspace
  > .purchase-bottom-panels
  > * {
    min-width: 0;
    max-width: 100%;
  }
}

@media screen and (max-width: 1050px) {
  .purchase-modern-workspace
  > .commercial-meta-strip.purchase-meta-strip.purchase-context-panel {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media screen and (max-width: 650px) {
  .purchase-modern-workspace
  > .commercial-meta-strip.purchase-meta-strip.purchase-context-panel {
    grid-template-columns: minmax(0,1fr);
    padding: 12px;
  }

  .purchase-modern-workspace
  > .purchase-bottom-panels.beg-wide-summary-section {
    grid-template-columns: minmax(0,1fr);
  }
}

/* Dedicated document print styles are not modified. */

/* END P445 PURCHASE GRID */

/* BEGIN P447 UNIFIED COMMERCIAL EDITOR */

@media screen {

  /*
   * Shared document identity and controls.
   * Applied only to known commercial editor workspaces.
   */
  :is(
    .invoice-modern-workspace,
    .quotation-modern-workspace,
    .purchase-modern-workspace
  ) {
    --doc-radius: 11px;
    --doc-gap: 10px;
    --doc-input-height: 36px;
    min-width: 0;
  }

  :is(
    .invoice-modern-workspace,
    .quotation-modern-workspace,
    .purchase-modern-workspace
  ) :is(input, select, textarea) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  :is(
    .invoice-modern-workspace,
    .quotation-modern-workspace,
    .purchase-modern-workspace
  ) :is(input:not([type="checkbox"]), select) {
    min-height: var(--doc-input-height);
  }

  /* Common full-width item workspaces */
  :is(
    .invoice-cart-zone,
    .quotation-cart-list,
    .purchase-cart-list
  ) {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  :is(
    .invoice-cart-list,
    .quotation-card-list,
    .purchase-card-list
  ) {
    min-width: 0;
    max-width: 100%;
  }

  /* Shared item row appearance, not shared business logic */
  :is(
    .invoice-cart-row,
    .quotation-line-card,
    .purchase-line-card
  ) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding: 9px 11px;
    gap: 9px;
    border-radius: var(--doc-radius);
    align-items: center;
  }

  :is(
    .invoice-cart-row,
    .quotation-line-card,
    .purchase-line-card
  ) label {
    min-width: 0;
    margin: 0;
  }

  :is(
    .invoice-cart-row,
    .quotation-line-card,
    .purchase-line-card
  ) label > span {
    font-size: 11px;
    line-height: 1.3;
  }

  /* Purchase row: item gets most of the available width */
  .purchase-modern-workspace
  .purchase-card-list > .purchase-line-card {
    display: grid;
    grid-template-columns:
      64px
      minmax(260px, 3.2fr)
      minmax(90px, .75fr)
      minmax(120px, 1fr)
      minmax(125px, 1fr);
    grid-template-areas:
      "head product qty cost total"
      "meta meta meta meta meta";
    gap: 7px 10px;
  }

  .purchase-line-card > .purchase-line-head {
    grid-area: head;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
  }

  .purchase-line-card > .purchase-product-field {
    grid-area: product;
    min-width: 0;
  }

  .purchase-line-card > .purchase-product-field + label {
    grid-area: qty;
  }

  .purchase-line-card > .purchase-product-field + label + label {
    grid-area: cost;
  }

  .purchase-line-card > .purchase-line-total {
    grid-area: total;
    min-width: 0;
  }

  .purchase-line-card > .purchase-line-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    font-size: 11px;
    min-width: 0;
  }

  /* Sales invoice editable row */
  .invoice-modern-workspace .invoice-cart-row {
    display: grid;
    grid-template-columns:
      minmax(260px, 3.4fr)
      minmax(110px, 1fr)
      minmax(110px, 1fr)
      minmax(90px, .8fr)
      minmax(130px, 1fr)
      42px;
    gap: 9px;
  }

  .invoice-cart-row > .cart-product {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .invoice-cart-row > .cart-quantity {
    min-width: 0;
  }

  .invoice-cart-row > .cart-line-total {
    min-width: 0;
  }

  /* Keep serial controls available */
  .invoice-cart-row .invoice-serial-selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  /* Quotation keeps its description and expandable pricing */
  .quotation-modern-workspace
  .quotation-card-list > .quotation-line-card {
    min-width: 0;
    padding: 9px 11px;
    gap: 8px;
  }

  .quotation-line-card
  .quotation-line-notes textarea {
    min-height: 36px;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Shared final totals */
  :is(
    .invoice-total-card,
    .quotation-total-card,
    .purchase-total-card
  ) {
    min-width: 0;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
    border-radius: var(--doc-radius);
  }

  :is(
    .invoice-total-card,
    .quotation-total-card,
    .purchase-total-card
  ) :is(b,strong) {
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .commercial-grid-wrap,
  .quotation-p364-scroll {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
}

/* Responsive document editing */
@media screen and (max-width: 1100px) {
  .purchase-modern-workspace
  .purchase-card-list > .purchase-line-card {
    grid-template-columns: repeat(2, minmax(0,1fr));
    grid-template-areas:
      "head head"
      "product product"
      "qty cost"
      "total total"
      "meta meta";
  }

  .invoice-modern-workspace .invoice-cart-row {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .invoice-cart-row > .cart-product {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 600px) {
  .purchase-modern-workspace
  .purchase-card-list > .purchase-line-card {
    grid-template-columns: minmax(0,1fr);
    grid-template-areas:
      "head" "product" "qty" "cost" "total" "meta";
  }

  .invoice-modern-workspace .invoice-cart-row {
    grid-template-columns: minmax(0,1fr);
  }
}

/* PrintDocument remains authoritative for printed documents. */

/* END P447 UNIFIED COMMERCIAL EDITOR */

/* BEGIN P448B SHARED DISCLOSURE */

.beg-doc-disclosure {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--border, #dbe4ee);
  border-radius: 11px;
  background: var(--surface, transparent);
  overflow: visible;
}

.beg-doc-disclosure-heading {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  font-weight: 700;
  list-style: none;
}

.beg-doc-disclosure-heading::-webkit-details-marker {
  display: none;
}

.beg-doc-disclosure-heading:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.beg-doc-disclosure-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--border, #dbe4ee);
  border-radius: 7px;
  flex-shrink: 0;
}

.beg-doc-disclosure-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 0 12px 12px;
}

.beg-doc-disclosure-content > * {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.beg-doc-disclosure-content textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media print {
  .beg-doc-disclosure:not([open]) > .beg-doc-disclosure-content {
    display: block;
  }
}

/* END P448B SHARED DISCLOSURE */

/* BEGIN P449A FINANCIAL TOTALS */

@media screen {
  .beg-shared-totals {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    height: auto;
  }

  .beg-shared-totals :is(b, strong) {
    font-variant-numeric: tabular-nums;
  }

  .beg-shared-totals :is(input, select) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  .beg-shared-totals :is(button, a) {
    max-width: 100%;
  }
}

/* END P449A FINANCIAL TOTALS */

/* BEGIN P450C UNIFIED TOTALS — presentation only */
@media screen {
  :is(.quotation-modern-workspace,.purchase-modern-workspace,.invoice-modern-workspace)
  .beg-shared-totals {
    background: linear-gradient(145deg,#0A1F44,#12345C);
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(10,31,68,.12);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  :is(.quotation-modern-workspace,.purchase-modern-workspace,.invoice-modern-workspace)
  .beg-shared-totals :is(h3,b,strong) {
    color: inherit;
    font-variant-numeric: tabular-nums;
  }

  :is(.quotation-modern-workspace,.purchase-modern-workspace,.invoice-modern-workspace)
  .beg-shared-totals .summary-grand {
    border-top: 1px solid rgba(255,255,255,.2);
  }
}
/* END P450C UNIFIED TOTALS */

/* BEGIN P450L3 SHARED DOCUMENT THEME */
@media screen {
  .beg-one-document-editor {
    --beg-doc-primary: var(--beg-brand-blue, #2563EB);
    --beg-doc-navy: var(--beg-brand-navy, #0A1F44);
    --beg-doc-border: var(--beg-ds-border, #dce6f2);
    --beg-doc-surface: var(--beg-ds-surface, #ffffff);
    color: var(--beg-ds-text, #132847);
  }

  .beg-one-document-editor :is(
    .commercial-editor-topbar,
    .invoice-command-bar
  ) {
    border-color: var(--beg-doc-border);
  }

  .beg-one-document-editor :is(
    .commercial-meta-strip,
    .invoice-context-panel,
    .commercial-lines-card,
    .invoice-item-picker,
    .invoice-cart-list
  ) {
    border-color: var(--beg-doc-border);
    border-radius: 14px;
  }

  .beg-one-document-editor :is(
    input,
    select,
    textarea
  ):focus-visible {
    outline: 2px solid var(--beg-doc-primary);
    outline-offset: 2px;
  }

  .beg-one-document-editor :is(
    .commercial-editor-footer,
    .invoice-command-bar
  ) button.primary {
    background-color: var(--beg-doc-primary);
  }
}
/* END P450L3 SHARED DOCUMENT THEME */

/* BEGIN P450M9 REAL QUOTATION TOTALS */
@media screen {
  .quotation-modern-workspace.beg-one-document-editor
  :is(.beg-shared-totals,.quotation-summary-card) {
    background: linear-gradient(135deg,#0A1F44,#15345D);
    color: #fff;
    border: 1px solid #26466B;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(10,31,68,.12);
  }

  .quotation-modern-workspace.beg-one-document-editor
  :is(.beg-shared-totals,.quotation-summary-card)
  :is(h2,h3,h4,b,strong,span,label) {
    color: inherit;
  }

  .quotation-modern-workspace.beg-one-document-editor
  :is(.beg-shared-totals,.quotation-summary-card)
  input {
    color: #0A1F44;
    background: #fff;
  }
}
/* END P450M9 REAL QUOTATION TOTALS */

/* BEGIN P450M12 QUOTATION TOTALS FIX */
@media screen {
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals {
    background: linear-gradient(135deg,#0A1F44,#15345D);
    color: #FFFFFF;
    border: 1px solid #26466B;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(10,31,68,.12);
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals
  :is(h3,p,span,b,strong) {
    color: #FFFFFF;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals
  > div {
    color: #FFFFFF;
    border-bottom-color: rgba(255,255,255,.16);
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals
  .summary-grand {
    background: #2563EB;
    color: #FFFFFF;
    border-radius: 9px;
    border-bottom: 0;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals
  .summary-grand :is(span,b) {
    color: #FFFFFF;
  }
}
/* END P450M12 QUOTATION TOTALS FIX */

/* BEGIN P450M17 QUOTATION LAYOUT CONSOLIDATION */
@media screen {
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout.beg-wide-document-flow {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 12px;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout
  > .quotation-cart-list.beg-wide-items-section {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout
  > .quotation-bottom-panels.beg-wide-summary-section {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    align-self: start;
    gap: 10px !important;
    min-height: 0;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > article {
    flex: 0 0 auto;
    min-height: 0;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals {
    background: linear-gradient(135deg,#0A1F44,#15345D);
    border-color: #26466B;
    color: #fff;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals > div {
    color: #fff;
    border-bottom-color: rgba(255,255,255,.16);
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals
  > div :is(span,b),
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals h3 {
    color: #fff;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels
  > .summary-panel.quotation-total-card.beg-shared-totals
  .summary-grand {
    background: #2563EB;
    color: #fff;
  }
}
/* END P450M17 QUOTATION LAYOUT CONSOLIDATION */

/* BEGIN P450N1 FOUR DOCUMENT DESIGN */
@media screen {
  .commercial-editor-shell.beg-one-document-editor {
    --beg-doc-edge:#d9e5f2;
    --beg-doc-ink:#0A1F44;
    --beg-doc-accent:#2563EB;
    min-width:0;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.commercial-editor-topbar,.editor-toolbar) {
    min-height:0;
    border-color:var(--beg-doc-edge);
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.quotation-meta-strip,.commercial-meta-strip,.invoice-context-panel) {
    padding:10px 12px;
    gap:9px;
    min-width:0;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(input,select) {
    max-width:100%;
    box-sizing:border-box;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.quotation-lines-card,.quotation-cart-list,.invoice-cart-zone,.purchase-cart-list) {
    min-width:0;
    max-width:100%;
    align-self:start;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.commercial-editor-footer,.invoice-command-bar) {
    gap:8px;
    flex-wrap:wrap;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout.beg-wide-document-flow {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-auto-rows:max-content;
    align-content:start;
    gap:10px;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout>.quotation-bottom-panels.beg-wide-summary-section {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-auto-rows:max-content;
    align-items:start;
    align-content:start;
    gap:10px!important;
    min-height:0;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels>.summary-panel.quotation-total-card.beg-shared-totals {
    background:#fff;
    border:1px solid var(--beg-doc-edge);
    color:var(--beg-doc-ink);
    box-shadow:none;
    padding:12px!important;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels>.summary-panel.quotation-total-card.beg-shared-totals
  :is(h3,p,span,b,strong),
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels>.summary-panel.quotation-total-card.beg-shared-totals>div {
    color:var(--beg-doc-ink);
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels>.summary-panel.quotation-total-card.beg-shared-totals
  .summary-grand {
    background:#e8f2ff;
    color:#0757bd;
    border-radius:9px;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels>.summary-panel.quotation-total-card.beg-shared-totals
  .summary-grand :is(span,b) {
    color:#0757bd;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels>.tax-panel {
    min-width:0;
  }

  .purchase-modern-workspace.beg-one-document-editor.beg-wide-document-flow
  :is(.purchase-cart-list,.purchase-bottom-panels) {
    min-width:0;
  }
}

@media screen and (max-width:850px) {
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout>.quotation-bottom-panels.beg-wide-summary-section {
    grid-template-columns:minmax(0,1fr)!important;
  }
}
/* END P450N1 FOUR DOCUMENT DESIGN */
/*
 * BEG ONE P442
 * Compact document line editing and readable totals.
 * No pricing calculations or API modifications.
 */

:root {
  --beg442-row-gap: 8px;
  --beg442-control-height: 36px;
}

/* Sales invoice: use full available item width */

.invoice-cart-list {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.invoice-cart-list .cart-list-head {
  margin-bottom: 8px;
  gap: 10px;
}

.invoice-cart-list :is(input,select) {
  box-sizing: border-box;
  min-height: var(--beg442-control-height);
  max-width: 100%;
}

.invoice-cart-list input[type="number"] {
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.invoice-cart-list :is(
  .invoice-cart-item,
  .invoice-cart-row,
  .cart-item,
  .cart-row,
  .cart-line,
  .invoice-line
) {
  min-width: 0;
  max-width: 100%;
  gap: var(--beg442-row-gap);
  padding-block: 9px;
  align-items: center;
}

/* Keep long product names and serial details readable */

.invoice-cart-list :is(
  .product-name,
  .item-name,
  .cart-product-name,
  .invoice-product-name
) {
  overflow-wrap: anywhere;
  min-width: 0;
  line-height: 1.4;
}

/* Sales invoice: horizontal totals */

.invoice-total-rail {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.invoice-total-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  height: auto;
}

.invoice-total-card > b {
  color: inherit;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.invoice-total-lines {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  width: 100%;
}

.invoice-total-lines > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(130,157,190,.22);
  border-radius: 10px;
}

.invoice-total-lines strong {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  overflow-wrap: anywhere;
}

/* Other commercial documents: denser item tables */

.commercial-grid-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.commercial-grid-table th,
.commercial-grid-table td {
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.4;
}

.commercial-grid-table :is(input,select,textarea) {
  min-height: 34px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Shared summary cards */

:is(
  .quotation-total-card,
  .purchase-total-card,
  .invoice-values-panel
) {
  height: auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Dark theme: explicit contrast for totals */

[data-theme="dark"] .invoice-total-card,
[data-theme="dark"] .invoice-total-card > b,
[data-theme="dark"] .invoice-total-lines strong {
  color: #f1f7ff;
}

[data-theme="dark"] .invoice-total-lines > div {
  background: #142c42;
  border-color: #35506c;
  color: #d6e6f5;
}

[data-theme="dark"] .invoice-cart-list :is(
  input,
  select,
  textarea
) {
  color: #f1f7ff;
}

/* Mobile: stack totals naturally */

@media screen and (max-width: 760px) {
  .invoice-total-lines {
    grid-template-columns: 1fr;
  }

  .invoice-cart-list :is(
    .invoice-cart-item,
    .invoice-cart-row,
    .cart-item,
    .cart-row,
    .cart-line,
    .invoice-line
  ) {
    flex-wrap: wrap;
  }
}

/* The dedicated print layout remains authoritative. */
/* BEG ONE P450N3 - Four document unified layout */
/* Presentation only. No API, tax, or draft logic. */

@media screen {
  .commercial-editor-shell.beg-one-document-editor {
    --doc-border: #dce6f2;
    --doc-navy: #0A1F44;
    --doc-blue: #2563EB;
    --doc-soft: #eaf3ff;
    color: var(--doc-navy);
    min-width: 0;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.quotation-meta-strip,.commercial-meta-strip,
      .invoice-context-panel) {
    gap: 8px;
    align-content: start;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.quotation-cart-list,.purchase-cart-list,
      .invoice-cart-zone,.purchase-request-card-list) {
    min-width: 0;
    max-width: 100%;
  }

  /* Shared financial summary */
  .commercial-editor-shell.beg-one-document-editor
  .beg-shared-totals {
    background: #fff;
    color: #0A1F44;
    border: 1px solid var(--doc-border);
    border-radius: 12px;
    box-shadow: none;
    min-height: 0;
  }

  .commercial-editor-shell.beg-one-document-editor
  .beg-shared-totals :is(h3,span,b,strong) {
    color: #0A1F44;
  }

  .commercial-editor-shell.beg-one-document-editor
  .beg-shared-totals .summary-grand {
    background: var(--doc-soft);
    border-radius: 9px;
    color: #0757bd;
  }

  .commercial-editor-shell.beg-one-document-editor
  .beg-shared-totals .summary-grand :is(span,b,strong) {
    color: #0757bd;
  }

  /* Quotation - two-column bottom panels */
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout.beg-wide-document-flow {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-auto-rows: max-content;
    align-content: start;
    gap: 10px;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout
  > .quotation-bottom-panels.beg-wide-summary-section {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 10px !important;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .quotation-total-card {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    background: #fff;
    color: #0A1F44;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .quotation-total-card
  :is(h3,span,b,strong) {
    color: #0A1F44;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .quotation-total-card
  .summary-grand {
    background: #eaf3ff;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .quotation-total-card
  .summary-grand :is(span,b) {
    color: #0757bd;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .tax-panel {
    grid-column: 2;
    min-width: 0;
  }

  /* Purchase order - summary beside notes */
  .purchase-modern-workspace.beg-one-document-editor
  .purchase-bottom-panels {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 10px;
  }

  .purchase-modern-workspace.beg-one-document-editor
  .purchase-bottom-panels > .purchase-total-card {
    grid-column: 1;
    align-self: start;
  }

  /* Purchase request - summary beside notes */
  .purchase-request-workspace.beg-one-document-editor
  .request-bottom-panels {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 10px;
  }

  .purchase-request-workspace.beg-one-document-editor
  .request-bottom-panels > .summary-panel {
    grid-column: 1;
    align-self: start;
    background: #fff;
    border: 1px solid var(--doc-border);
    border-radius: 12px;
  }

  .purchase-request-workspace.beg-one-document-editor
  .request-bottom-panels .summary-grand {
    background: #eaf3ff;
    color: #0757bd;
    border-radius: 9px;
  }

  /* Sales invoice - metadata, items, financial summary */
  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout.beg-wide-document-flow {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 10px;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout > .invoice-context-panel {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout > .invoice-cart-zone {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout > .invoice-total-rail {
    grid-column: 1;
    grid-row: 3;
    min-width: 0;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-total-card {
    background: #fff;
    color: #0A1F44;
    border: 1px solid var(--doc-border);
    border-radius: 12px;
    box-shadow: none;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-total-card :is(span,b,strong,em) {
    color: #0A1F44;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.commercial-editor-footer,.invoice-command-actions) {
    gap: 8px;
    flex-wrap: wrap;
  }
}

@media screen and (max-width: 850px) {
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-p364-layout
  > .quotation-bottom-panels.beg-wide-summary-section,
  .purchase-modern-workspace.beg-one-document-editor
  .purchase-bottom-panels,
  .purchase-request-workspace.beg-one-document-editor
  .request-bottom-panels {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .quotation-total-card,
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels > .tax-panel,
  .purchase-modern-workspace.beg-one-document-editor
  .purchase-bottom-panels > .purchase-total-card,
  .purchase-request-workspace.beg-one-document-editor
  .request-bottom-panels > .summary-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

/* BEGIN P450N5 DOCUMENT LAYOUT */
@media screen and (min-width: 1000px) {

  /* Sales invoice: customer first, items second, summary last */
  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout.beg-wide-document-flow {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    align-content: start;
    gap: 12px;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout > .invoice-context-panel {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout > .invoice-cart-zone {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  .invoice-modern-workspace.beg-one-document-editor
  .invoice-modern-layout > .invoice-total-rail {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    align-self: start;
  }

  /* Purchase request: compact horizontal item rows */
  .purchase-request-workspace.beg-one-document-editor
  .purchase-request-card-list {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
  }

  .purchase-request-workspace.beg-one-document-editor
  .purchase-request-line-card {
    display: grid;
    grid-template-columns:
      minmax(65px,.5fr)
      minmax(180px,2.5fr)
      minmax(85px,.75fr)
      minmax(110px,1fr)
      minmax(120px,1.1fr);
    gap: 10px;
    align-items: end;
    min-height: 0;
    padding: 10px 12px;
  }

  .purchase-request-workspace.beg-one-document-editor
  .purchase-request-line-card > * {
    min-width: 0;
  }

  .purchase-request-workspace.beg-one-document-editor
  .purchase-request-line-card
  .purchase-request-line-total {
    min-width: 0;
    align-self: center;
  }

  /* Purchase order and quotation: two-column footer */
  .purchase-modern-workspace.beg-one-document-editor
  .purchase-bottom-panels,
  .quotation-modern-workspace.beg-one-document-editor
  .quotation-bottom-panels {
    align-items: start;
    align-content: start;
    grid-auto-rows: max-content;
  }

  .commercial-editor-shell.beg-one-document-editor
  :is(.commercial-editor-footer,.invoice-command-actions) {
    gap: 8px;
    flex-wrap: wrap;
  }
}

@media screen and (max-width: 999px) {
  .purchase-request-workspace.beg-one-document-editor
  .purchase-request-line-card {
    display: block;
  }
}
/* END P450N5 DOCUMENT LAYOUT */
/* P450N25: isolate draft print overlay from ERP workspace. */

@page {
  size: A4 portrait;
  margin: 8mm 8mm 10mm;
}

@media print {

  html:has(.invoice-print-overlay),
  body:has(.invoice-print-overlay) {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    background: white !important;
  }

  body:has(.invoice-print-overlay) > *:not(.invoice-print-overlay) {
    display: none !important;
  }

  body > .invoice-print-overlay {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: white !important;
    box-shadow: none !important;
  }

  body > .invoice-print-overlay .invoice-print-sheet {
    display: block !important;
    position: static !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    color: #111827 !important;
    background: white !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  .invoice-print-overlay .invoice-print-actions {
    display: none !important;
  }

  .invoice-print-sheet .invoice-print-header {
    margin: 0 0 8px !important;
    padding: 0 0 7px !important;
    gap: 12px !important;
  }

  .invoice-print-sheet .invoice-print-header h1 {
    font-size: 18px !important;
  }

  .invoice-print-sheet .invoice-print-meta {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 5px 10px !important;
    padding: 4px 0 8px !important;
    margin: 0 !important;
  }

  .invoice-print-sheet .invoice-print-meta div {
    padding: 4px 6px !important;
  }

  .invoice-print-sheet .invoice-print-company-data {
    margin: 2px 0 8px !important;
    gap: 4px 10px !important;
  }

  .invoice-print-sheet table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9px !important;
    margin: 0 !important;
  }

  .invoice-print-sheet th,
  .invoice-print-sheet td {
    padding: 4px 5px !important;
    line-height: 1.3 !important;
    vertical-align: top !important;
  }

  .invoice-print-sheet thead {
    display: table-header-group !important;
  }

  .invoice-print-sheet tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .invoice-print-sheet .invoice-print-footer {
    margin-top: 8px !important;
    padding-top: 6px !important;
    break-inside: avoid;
  }

  .invoice-print-sheet .invoice-print-summary {
    padding: 8px !important;
    margin: 0 !important;
    break-inside: avoid;
  }

  .invoice-print-sheet .invoice-print-notes,
  .invoice-print-sheet .commercial-print-terms {
    margin: 7px 0 !important;
    padding: 6px 0 !important;
    break-inside: avoid;
  }

  .invoice-print-sheet .invoice-print-legal {
    margin-top: 8px !important;
    padding-top: 5px !important;
  }

  .invoice-print-sheet .invoice-print-signatures {
    min-height: 0 !important;
    margin-top: 8px !important;
  }
}
/* BEG ERP P386 - Royal Blue Login Design */
/* Scoped to login page. Authentication logic unchanged. */

.login-page {
  --login-primary: #0755c8;
  --login-bright: #00c8ef;
  --login-text: #ffffff;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 15%, #d8f5ff 0%, transparent 32%),
    linear-gradient(135deg, #eff7ff, #f8fbff) !important;
  color: var(--login-text);
  padding: 36px 24px;
}

.login-page .login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr);
  gap: 26px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  align-items: stretch;
}

.login-page .login-hero,
.login-page .login-card {
  background:
    radial-gradient(circle at 100% 0%, #00bde8 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, #116cde 0%, transparent 40%),
    linear-gradient(145deg, #073b91 0%, #0754ba 55%, #0079c8 100%)
    !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(7, 50, 110, .17);
  min-width: 0;
}

.login-page .login-card {
  background:
    radial-gradient(circle at 100% 0%, #02a9eb 0%, transparent 45%),
    linear-gradient(145deg, #083f96, #0657bf 65%, #087bc7)
    !important;
}

.login-page h1,
.login-page h2,
.login-page h3,
.login-page label,
.login-page .brand,
.login-page .version,
.login-page .login-hero p,
.login-page .login-card p,
.login-page .login-card .muted {
  color: #fff !important;
}

.login-page .version {
  opacity: .88;
  letter-spacing: .06em;
}

.login-page .hero-points > * {
  background: rgba(255,255,255,.055) !important;
  border: 1px solid rgba(190,235,255,.34) !important;
  border-radius: 18px;
  color: #fff !important;
}

.login-page .hero-points *,
.login-page .brand *,
.login-page .check-row,
.login-page .check-row * {
  color: #fff !important;
}

.login-page .auth-form input:not([type="checkbox"]) {
  background: rgba(255,255,255,.13) !important;
  border: 1px solid rgba(185,226,255,.45) !important;
  color: #fff !important;
  border-radius: 14px;
  min-height: 52px;
  outline: none;
}

.login-page .auth-form input:not([type="checkbox"])::placeholder {
  color: rgba(255,255,255,.78) !important;
}

.login-page .auth-form input:not([type="checkbox"]):focus-visible {
  border-color: #5ceaff !important;
  box-shadow: 0 0 0 3px rgba(0,219,255,.2) !important;
}

.login-page .auth-form button.primary {
  background: linear-gradient(100deg, #087dff, #00c4ee) !important;
  border: none !important;
  color: #fff !important;
  min-height: 54px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0,35,102,.24);
}

.login-page .auth-form button.primary:hover:not(:disabled) {
  filter: brightness(1.1);
}

.login-page .auth-form button.primary:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.login-page .auth-form .secondary {
  border: 1px solid rgba(255,255,255,.45) !important;
  color: #fff !important;
  background: rgba(255,255,255,.1) !important;
}

.login-page .auth-form .link-button,
.login-page .auth-form a,
.login-page .otpauth-link {
  color: #72ecff !important;
}

.login-page .auth-form .error {
  background: rgba(127,16,34,.35) !important;
  color: #fff !important;
  border: 1px solid rgba(255,180,190,.65);
}

.login-page .auth-form .notice {
  background: rgba(0,70,93,.36) !important;
  color: #fff !important;
  border: 1px solid rgba(151,243,255,.48);
}

.login-page .secret-box,
.login-page .technical-details,
.login-page .backup-grid > * {
  color: #fff !important;
  background: rgba(1,25,67,.35) !important;
  border-color: rgba(255,255,255,.3) !important;
}

@media (max-width: 900px) {
  .login-page {
    padding: 16px;
  }
  .login-page .login-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
  }
  .login-page .login-hero,
  .login-page .login-card {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-page *,
  .login-page *::before,
  .login-page *::after {
    transition: none !important;
    animation: none !important;
  }
}
/* BEG ERP V29 P364: quotation grid/RTL refresh. Scoped to quotation workspace. */
.quotation-modern-workspace.quotation-full-workspace {
  --p364-ink: #102a49;
  --p364-muted: #647d99;
  --p364-border: #dae6f3;
  --p364-surface: #ffffff;
  --p364-pale: #f4f8fe;
  --p364-primary: #176ec6;
  --p364-strong: #0f5fad;
  color: var(--p364-ink);
  background: #f5f8fd;
  padding: 12px 14px 24px;
  gap: 12px;
}
.quotation-modern-workspace .commercial-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 14px;
  min-height: 68px;
  gap: 10px;
  background: var(--p364-surface);
  border: 1px solid var(--p364-border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(25, 54, 91, .035);
}
.quotation-modern-workspace .editor-title-line {gap: 10px;min-width: 0;}
.quotation-modern-workspace .editor-title-line h1 {font-size: 20px;line-height: 1.35;margin: 0;}
.quotation-modern-workspace .editor-title-line small {font-size: 11px; color:var(--p364-muted);}
.quotation-modern-workspace .editor-doc-icon {width: 36px;height: 36px;}
.quotation-modern-workspace .editor-toolbar {display: flex;gap: 7px;flex-wrap: wrap;align-items:center;}
.quotation-modern-workspace .editor-toolbar .tool-btn {min-height: 35px;}
.quotation-modern-workspace .quotation-meta-strip {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .85fr);
  grid-template-rows: repeat(2, auto);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  gap: 10px 14px;
  padding: 16px;
  background: var(--p364-surface);
  border: 1px solid var(--p364-border);
  border-radius: 14px;
  align-items:end;
}
.quotation-modern-workspace .quotation-meta-strip > label {display: flex; flex-direction: column;min-width:0;margin:0;gap:5px;}
.quotation-modern-workspace .quotation-meta-strip > label > span {font-size: 12px;font-weight:700;color:var(--p364-ink);}
.quotation-modern-workspace .quotation-meta-strip > label:nth-child(1) {grid-column: 1;grid-row:1;}
.quotation-modern-workspace .quotation-meta-strip > label:nth-child(6) {grid-column: 2;grid-row:1;}
.quotation-modern-workspace .quotation-meta-strip > label:nth-child(3) {grid-column: 3;grid-row:1;}
.quotation-modern-workspace .quotation-meta-strip > label:nth-child(5) {grid-column: 1;grid-row:2;}
.quotation-modern-workspace .quotation-meta-strip > label:nth-child(2) {grid-column: 2;grid-row:2;}
.quotation-modern-workspace .quotation-meta-strip > label:nth-child(4) {grid-column: 3;grid-row:2;}
.quotation-modern-workspace .quotation-meta-strip input,
.quotation-modern-workspace .quotation-meta-strip select {width:100%;height:39px;min-height:39px;border-radius:9px;padding-inline:10px;background:#fff;border:1px solid var(--p364-border);font-size:13px;}
.quotation-modern-workspace .quotation-meta-strip .tax-mode-switch {display:flex;gap:5px;width:100%;min-height:39px;}
.quotation-modern-workspace .quotation-meta-strip .tax-mode-switch > button {flex:1;min-height:39px;border-radius:9px;font-size:12px;}
.quotation-modern-workspace .quotation-p364-layout {
  display: grid;
  direction: rtl;
  grid-template-columns: minmax(0, 1fr) minmax(275px, 310px);
  gap: 13px;
  align-items: start;
  min-width:0;
}
.quotation-modern-workspace .quotation-p364-layout > .quotation-lines-card {grid-column:1;grid-row:1;min-width:0;}
.quotation-modern-workspace .quotation-p364-layout > .quotation-bottom-panels {grid-column:2;grid-row:1;min-width:0;}
.quotation-modern-workspace .quotation-p364-layout > :not(.quotation-lines-card):not(.quotation-bottom-panels) {grid-column: 1 / -1;min-width:0;}
.quotation-modern-workspace .quotation-p364-layout > .quotation-lines-card,
.quotation-modern-workspace .quotation-p364-layout > .quotation-bottom-panels > article {background:var(--p364-surface);border:1px solid var(--p364-border);border-radius:13px;box-shadow:0 2px 8px rgba(25,54,91,.035);}
.quotation-modern-workspace .quotation-lines-card {padding: 12px !important;}
.quotation-modern-workspace .quotation-lines-card .commercial-lines-toolbar {display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin:0 0 8px;padding:0;}
.quotation-modern-workspace .quotation-global-search {margin: 0 0 9px;position:relative;max-width:100%;}
.quotation-modern-workspace .quotation-global-search input {min-height:38px;height:38px;border-radius:9px;}
.quotation-modern-workspace .quotation-lines-card button.secondary-btn {height:36px;min-height:36px;border-radius:9px;}
.quotation-modern-workspace .quotation-p364-scroll {max-width:100%;overflow:visible;scrollbar-color:#cbdcf0 transparent;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-card-list {min-width: 830px;}
.quotation-modern-workspace .quotation-p364-columns,
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card {
  display:grid !important;
  grid-template-columns: minmax(215px,2.6fr) minmax(100px,1.15fr) 75px 100px 78px 115px 80px;
  gap:7px;
  align-items:center;
  direction:rtl;
}
.quotation-modern-workspace .quotation-p364-columns {font-size:11px;font-weight:750;color:#58728e;padding:11px 10px;background:#eff5fc;border:1px solid var(--p364-border);border-radius:9px 9px 0 0;white-space:nowrap;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-card-list {display:block !important;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card {
  min-height:59px !important;
  margin:0 !important;
  padding:7px 9px !important;
  box-shadow:none !important;
  border:1px solid var(--p364-border);
  border-top:0;
  background:#fff;
  border-radius:0 !important;
  position:relative;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card:nth-child(2n) {background:#fbfdff;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card:hover {background:#f5f9ff;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-product-field {grid-column:1;grid-row:1;min-width:0;position:relative;z-index:2;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-p364-description {grid-column:2;grid-row:1;min-width:0;color:var(--p364-muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-p364-qty {grid-column:3;grid-row:1;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-p364-unit-price {grid-column:4;grid-row:1;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-p364-discount {grid-column:5;grid-row:1;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-line-total {grid-column:6;grid-row:1;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-line-head {grid-column:7;grid-row:1;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-line-notes {display:none !important;grid-column:1 / -1;grid-row:2;min-width:0;background:#f7faff;border:1px solid #e2ebf6;border-radius:9px;padding:10px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card.p364-expanded > .quotation-line-notes {display:flex !important;flex-direction:column;gap:5px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > button.chip {display:none;grid-column:1 / -1;grid-row:3;justify-self:start;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card.p364-expanded > button.chip {display:inline-flex;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card label {min-width:0;margin:0;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card label > span {display:none !important;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card.p364-expanded > .quotation-line-notes > span {display:block !important;font-size:12px;font-weight:700;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card input {height:36px !important;min-height:36px !important;width:100%;min-width:0;font-size:12px;padding:6px 8px;border:1px solid #d8e5f3;border-radius:8px;background:#fff;box-sizing:border-box;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .input-with-icon {position:relative;display:block;width:100%;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .input-with-icon input {padding-inline-start:27px;padding-inline-end:7px;text-overflow:ellipsis;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .input-with-icon > svg {position:absolute;right:8px;top:10px;width:15px;height:15px;color:#6d88a5;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card textarea {min-height:67px;resize:vertical;width:100%;border-radius:9px;border:1px solid var(--p364-border);padding:9px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-total {padding:0 !important;display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-total > span,
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-total > small {display:none !important;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-total > b {font-size:12px;line-height:1.45;color:var(--p364-ink);}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head {display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:3px;padding:0 !important;min-width:0;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head > span {font-size:10px;color:var(--p364-muted);white-space:nowrap;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head button {background:none;padding:3px;border:0;min-width:22px;min-height:25px;cursor:pointer;color:#627d9a;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head svg {width:15px;height:15px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head button:hover {color:var(--p364-primary);background:#e8f2ff;border-radius:6px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head .danger:hover {color:#bd313f;background:#fff0f1;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card.p364-expanded {z-index:4;box-shadow:0 5px 12px rgba(16,42,73,.07) !important;background:#fbfdff;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card:focus-within {z-index:6;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results {z-index:30;max-height:245px;overflow-y:auto;box-shadow:0 10px 24px rgba(16,42,73,.14);}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-product-field .input-with-icon {margin:0;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-product-field .input-with-icon + .commercial-line-results {min-width:320px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card:last-child {border-radius:0 0 9px 9px !important;}
.quotation-modern-workspace .quotation-lines-card .add-row-wide {min-height:36px;margin-top:10px;border-style:dashed;border-radius:9px;}
.quotation-modern-workspace .quotation-lines-card .state-card {padding:9px 13px !important;margin:0 0 10px !important;border:1px solid #d6e7fc;background:#f5f9ff;border-radius:9px;max-width:100%;}
.quotation-modern-workspace .quotation-lines-card .state-card label {display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px;font-weight:700;}
.quotation-modern-workspace .quotation-lines-card .state-card input {width:100px;min-width:80px;height:34px;padding:5px 9px;border-radius:8px;border:1px solid #bfdbfa;}
.quotation-modern-workspace .quotation-lines-card .state-card small {color:var(--p364-muted);font-size:11px;}
.quotation-modern-workspace .quotation-bottom-panels {display:flex !important;flex-direction:column !important;gap:12px !important;align-content:start;min-width:0;}
.quotation-modern-workspace .quotation-bottom-panels > article {color:var(--p364-ink);padding:13px !important;margin:0 !important;max-width:100%;min-width:0;}
.quotation-modern-workspace .quotation-bottom-panels h3 {margin:0 0 12px;font-size:14px;font-weight:800;color:var(--p364-ink);}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel > div {display:flex;justify-content:space-between;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid #eaf0f7;font-size:12px;}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel > div:last-child {border-bottom:0;}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel .summary-grand {background:#eaf3ff;border-radius:9px;margin-top:6px;padding:12px 9px;color:var(--p364-strong);}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel .summary-grand b {font-size:18px;font-weight:850;}
.quotation-modern-workspace .quotation-bottom-panels label {font-size:12px;}
.quotation-modern-workspace .quotation-bottom-panels input {height:36px;min-height:36px;}
.quotation-modern-workspace .quotation-bottom-panels textarea {min-height:62px;resize:vertical;}
.quotation-modern-workspace .commercial-editor-footer {border-top:1px solid var(--p364-border);background:#fff;padding:10px 14px;border-radius:12px;gap:12px;}
.quotation-modern-workspace .commercial-editor-footer button {min-height:38px;}
@media (max-width: 1500px) {
  .quotation-modern-workspace .quotation-p364-scroll {overflow-x:auto;overflow-y:auto;}
}
@media (max-width: 1180px) {
  .quotation-modern-workspace .quotation-p364-layout {grid-template-columns:minmax(0,1fr) 270px;}
  .quotation-modern-workspace .quotation-p364-scroll .quotation-card-list {min-width:830px;}
}
@media (max-width: 930px) {
  .quotation-modern-workspace .quotation-p364-layout {grid-template-columns:minmax(0,1fr);}
  .quotation-modern-workspace .quotation-p364-layout > .quotation-lines-card {grid-column:1;grid-row:1;}
  .quotation-modern-workspace .quotation-p364-layout > .quotation-bottom-panels {grid-column:1;grid-row:2;display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));}
  .quotation-modern-workspace .quotation-meta-strip {grid-template-columns:repeat(2,minmax(0,1fr));}
  .quotation-modern-workspace .quotation-meta-strip > label {grid-column:auto !important;grid-row:auto !important;}
}
@media (max-width: 580px) {
  .quotation-modern-workspace.quotation-full-workspace {padding:8px;}
  .quotation-modern-workspace .quotation-meta-strip {grid-template-columns:minmax(0,1fr) !important;padding:11px;}
  .quotation-modern-workspace .quotation-p364-layout > .quotation-bottom-panels {grid-template-columns:minmax(0,1fr);}
  .quotation-modern-workspace .editor-title-line h1 {font-size:17px;}
}

/* P364A_QUOTATION_SEARCH_FIX */
/* BEG ERP V29 P364A: compact product autocomplete and safe quotation grid.
   Scoped to the quotation workspace only. No global header/sidebar changes. */
.quotation-modern-workspace .quotation-lines-card {
  overflow: visible !important;
  isolation: isolate;
}
.quotation-modern-workspace .quotation-global-search {
  position: relative !important;
  z-index: 35;
  isolation: isolate;
}
/* Existing quick results were stretching across the full items grid. */
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results {
  position: absolute !important;
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
  top: calc(100% + 5px) !important;
  bottom: auto !important;
  left: auto !important;
  right: 0 !important;
  width: min(470px, 100%) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: 250px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: block !important;
  margin: 0 !important;
  padding: 5px !important;
  box-sizing: border-box;
  background: #fff !important;
  border: 1px solid #ccdaeb !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 30px rgba(16, 42, 73, .16) !important;
  z-index: 100 !important;
  direction: rtl;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 9px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 49px !important;
  padding: 7px 9px !important;
  margin: 0 !important;
  text-align: start !important;
  white-space: normal !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button + button {
  border-top: 1px solid #edf2f8 !important;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button:hover,
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button:focus-visible {
  background: #edf5ff !important;
  outline: 2px solid transparent;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button > span {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button b,
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button small {
  display: block !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  line-height: 1.45 !important;
  font-size: 12px !important;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button small {
  color: #667f9b !important;
  font-size: 10px !important;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button > strong {
  flex: 0 0 auto !important;
  white-space: nowrap;
  color: #145ea4;
  font-size: 12px !important;
}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button > svg {
  flex: 0 0 16px;
  width: 16px !important;
  height: 16px !important;
}
/* Individual line item autocomplete also stays close to its own field. */
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card > .quotation-product-field {
  display: block !important;
  position: relative !important;
  min-width: 0 !important;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results {
  position: absolute !important;
  top: calc(100% + 5px) !important;
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
  bottom: auto !important;
  width: min(430px, 100%) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: 220px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 5px !important;
  border: 1px solid #ccdaeb !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 12px 25px rgba(16,42,73,.14) !important;
  box-sizing: border-box;
  z-index: 120 !important;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results > button {
  display: flex !important;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  width: 100% !important;
  max-width: 100% !important;
  padding: 7px 8px !important;
  min-height: 43px;
  text-align: start;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results > button > span {
  min-width: 0 !important;
  flex: 1 1 auto;
  overflow: hidden;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results b,
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .commercial-line-results strong {
  white-space: nowrap;
  flex-shrink: 0;
}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .input-with-icon input {
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .quotation-modern-workspace .quotation-global-search > .commercial-quick-results {
    width: 100% !important;
    max-height: 200px !important;
  }
}

/* P364D_FINAL_QUOTATION_FINISH: scoped finishing refinements for BEG quotation UI. */
.quotation-modern-workspace .commercial-editor-topbar {min-height:58px;padding:8px 12px;}
.quotation-modern-workspace .editor-title-line h1 {font-size:18px;}
.quotation-modern-workspace .editor-toolbar .tool-btn {min-height:33px;}
.quotation-modern-workspace .quotation-meta-strip {padding:11px 13px;gap:8px 12px;}
.quotation-modern-workspace .quotation-meta-strip > label {gap:4px;}
.quotation-modern-workspace .quotation-meta-strip input,
.quotation-modern-workspace .quotation-meta-strip select {min-height:36px;height:36px;}
.quotation-modern-workspace .quotation-meta-strip .tax-mode-switch,
.quotation-modern-workspace .quotation-meta-strip .tax-mode-switch > button {min-height:36px;}
.quotation-modern-workspace .quotation-p364-layout {gap:10px;}
.quotation-modern-workspace .quotation-lines-card {padding:11px !important;}
.quotation-modern-workspace .p364d-search-guide {display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:4px 2px 6px;font-size:11px;line-height:1.5;color:#68829e;}
.quotation-modern-workspace .p364d-search-guide b {font-size:12px;color:#143557;}
.quotation-modern-workspace .quotation-global-search {isolation:isolate;}
.quotation-modern-workspace .quotation-global-search input {background:#fff;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card {min-height:54px !important;padding:6px 8px !important;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .input-with-icon input {font-size:12px;text-overflow:ellipsis;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-p364-description {unicode-bidi:plaintext;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-total {min-width:0;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head {justify-content:flex-end;gap:5px;}
.quotation-modern-workspace .quotation-p364-scroll .quotation-line-card .quotation-line-head > span {margin-inline-end:auto;}
.quotation-modern-workspace .quotation-lines-card .state-card {padding:8px 10px !important;margin:0 0 7px !important;}
.quotation-modern-workspace .quotation-lines-card .state-card label {font-size:11px;}
.quotation-modern-workspace .quotation-lines-card .state-card input {height:32px;min-height:32px;}
.quotation-modern-workspace .quotation-lines-card .state-card small {display:block;font-size:11px;line-height:1.5;}
.quotation-modern-workspace .quotation-bottom-panels {gap:10px !important;}
.quotation-modern-workspace .quotation-bottom-panels > article {padding:11px 12px !important;}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel {display:flex;flex-direction:column;min-height:0 !important;}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel h3 {font-size:14px;margin:0 0 8px;color:var(--p364-ink);}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel > div {min-height:0 !important;padding:6px 0 !important;color:#163755;}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel > div > b {color:#123c66;font-variant-numeric:tabular-nums;}
.quotation-modern-workspace .quotation-bottom-panels .summary-panel .summary-grand {padding:10px !important;}
.quotation-modern-workspace .p364d-summary-hint {background:#f0f7ff;border:1px solid #d6e6fb;border-radius:8px;color:#385d83;font-size:11px;line-height:1.65;padding:8px 10px;margin:0 0 8px;}
.quotation-modern-workspace .quotation-bottom-panels textarea {min-height:54px;}
.quotation-modern-workspace .quotation-bottom-panels input {min-height:34px;height:34px;}
.quotation-modern-workspace .commercial-editor-footer {padding:9px 12px;}
/* Long product names and autocomplete stay within their own width. */
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button,
.quotation-modern-workspace .quotation-p364-scroll .commercial-line-results > button {cursor:pointer;}
.quotation-modern-workspace .quotation-global-search > .commercial-quick-results > button b,
.quotation-modern-workspace .quotation-p364-scroll .commercial-line-results > button b {direction:rtl;unicode-bidi:plaintext;}
@media (max-width:930px) {
  .quotation-modern-workspace .quotation-meta-strip {padding:10px;}
  .quotation-modern-workspace .quotation-bottom-panels {position:static;}
}
@media (max-width:580px) {
  .quotation-modern-workspace .p364d-search-guide span {display:none;}
  .quotation-modern-workspace .quotation-lines-card {padding:8px !important;}
}

/* BEG ONE PRINT V2 - P450N57 */
.print-page.p57-print {
  --p57-navy: #0A1F44;
  --p57-gold: #C9A84C;
  --p57-line: #dfe5ed;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  direction: rtl;
  color: #142338;
}

.print-page.p57-print .print-doc-header {
  border-bottom: 3px solid var(--p57-navy);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.print-page.p57-print .print-doc-header h1 {
  color: var(--p57-navy);
  font-weight: 800;
}

.print-page.p57-print .p57-parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 12px;
}

.print-page.p57-print .p57-party {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--p57-line);
  border-top: 3px solid var(--p57-gold);
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  break-inside: avoid;
}

.print-page.p57-print .p57-party-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--p57-navy);
  margin-bottom: 5px;
  font-size: 11px;
}

.print-page.p57-print .p57-party-heading small {
  font-size: 9px;
  letter-spacing: .05em;
}

.print-page.p57-print .p57-party-name {
  display: block;
  font-size: 11.5px;
  margin-bottom: 3px;
}

.print-page.p57-print .print-meta > div {
  border-color: var(--p57-line);
}

.print-page.p57-print .print-items {
  width: 100%;
  border-collapse: collapse;
}

.print-page.p57-print .print-items thead th {
  background: var(--p57-navy);
  color: white;
}

.print-page.p57-print .print-items td {
  border-bottom: 1px solid var(--p57-line);
}

.print-page.p57-print .print-totals .grand {
  border-right: 3px solid var(--p57-gold);
  font-weight: 800;
}

.print-page.p57-print .print-doc-footer {
  font-size: 9px;
  color: #556277;
  border-top: 1px solid var(--p57-gold);
}

@media print {
  @page { size: A4; margin: 10mm; }

  .print-page.p57-print .p57-party,
  .print-page.p57-print .print-doc-header,
  .print-page.p57-print .print-totals {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-page.p57-print .print-items thead {
    display: table-header-group;
  }

  .print-page.p57-print .print-items tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-page.p57-print .print-items thead th {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* P450N61_FINAL_PRINT_BATCH */
.print-page.p57-print .print-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.print-page.p57-print .print-meta > div {
  min-width: 0;
  padding: 7px 9px;
}
.print-page.p57-print .p57-party {
  padding: 10px 11px;
  font-size: 11px;
}
.print-page.p57-print .p57-party-name {
  font-size: 12px;
}
.print-page.p57-print .p57-parties + .print-meta {
  margin-top: 8px;
}
.print-page.p57-print .print-doc-footer {
  font-size: 10px;
}
.print-page.p57-print .print-items th,
.print-page.p57-print .print-items td {
  padding: 6px 7px;
}
.commercial-print-sheet .p61-supplier-parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0;
  direction: rtl;
}
.commercial-print-sheet .p61-supplier-parties > div {
  border: 1px solid #dfe5ed;
  border-top: 3px solid #c9a84c;
  border-radius: 6px;
  padding: 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-wrap: anywhere;
}
.commercial-print-sheet .p61-supplier-parties strong {
  color: #0a1f44;
}
.commercial-print-sheet .p61-supplier-parties small {
  font-size: 9px;
}
.commercial-print-sheet .p61-supplier-parties span {
  font-size: 10px;
}
.commercial-print-sheet .invoice-print-header {
  border-top-color: #0a1f44;
}
.commercial-print-sheet .invoice-print-summary strong {
  color: #0a1f44;
}
.commercial-print-sheet table:has(tbody:empty) {
  display: none;
}
@media print {
  .print-page.p57-print .p57-parties,
  .commercial-print-sheet .p61-supplier-parties {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-page.p57-print .print-items thead {
    display: table-header-group;
  }
  .print-page.p57-print .print-items tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* P450N63_FINAL_POLISH */
.print-page.p57-print .p63-payment-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  padding: 8px 10px;
}
.print-page.p57-print .p63-payment-meta > div {
  flex: 1 1 130px;
  min-width: 0;
}
.print-page.p57-print .p57-parties {
  align-items: stretch;
}
.print-page.p57-print .p57-party {
  line-height: 1.65;
}
.print-page.p57-print .p57-party-heading {
  border-bottom: 1px solid #e8edf3;
  padding-bottom: 5px;
}
.print-page.p57-print .print-doc-footer {
  border-top: 1px solid #c9a84c;
  padding-top: 7px;
}
@media print {
  .print-page.p57-print .p57-parties,
  .print-page.p57-print .p63-payment-meta {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
