/*
 * PlusERP Version 1.0 visual foundation
 * Approved reference: https://work-red-55078813.figma.site
 * Runtime-safe typography: Inter is retained because Plus Jakarta Sans is not
 * present in the certified offline payload and no remote font is permitted.
 */
:root {
  color-scheme: light;

  /* Application and navigation surfaces */
  --app-background: #f2f4f8;
  --sidebar-background: #0d1829;
  --sidebar-border: #1d2b40;
  --sidebar-text: #d7e0ed;
  --sidebar-muted-text: #8292aa;
  --sidebar-active: #162035;
  --workspace-surface: #f7f9fc;
  --elevated-surface: #ffffff;

  /* Content, borders, and actions */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-default: #dbe2ea;
  --divider-default: #e8edf3;
  --action-primary: #2563eb;
  --action-primary-hover: #1d4ed8;
  --action-primary-pressed: #1e40af;
  --focus-ring: #93c5fd;
  --status-success: #15803d;
  --status-warning: #b45309;
  --status-danger: #b91c1c;
  --status-information: #2563eb;
  --disabled-background: #eef2f6;
  --disabled-text: #94a3b8;

  /* Shape, elevation, density, and shell geometry */
  --card-radius: 8px;
  --input-radius: 6px;
  --button-radius: 6px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-2: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-3: 0 18px 48px rgba(15, 23, 42, 0.14);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --sidebar-width: 228px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 48px;
  --table-row-height: 42px;
  --table-row-height-compact: 36px;
  --control-height: 38px;
  --control-height-compact: 32px;

  /* Backward-compatible aliases used by the certified frontend. */
  --bg: var(--app-background);
  --panel: var(--elevated-surface);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-default);
  --brand: var(--action-primary);
  --brand-dark: var(--action-primary-hover);
  --accent: var(--status-danger);
  --gold: var(--status-warning);
  --blue: var(--action-primary);
  --shadow: var(--shadow-2);
  --soft-panel: var(--elevated-surface);
  --radius: var(--card-radius);

  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--app-background);
}

/* PlusCRM compact global header and lead-entry workspace */
.content-crm {
  grid-template-rows: auto minmax(0, 1fr);
}

.content-crm .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  height: auto;
  padding: 8px 20px;
  gap: 16px;
  flex-wrap: nowrap;
  background: var(--elevated-surface, #fff);
}

.content-crm .crm-global-title {
  flex: 0 0 auto;
  min-width: 92px;
}

.content-crm .topbar-actions {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.content-crm .approval-header-controls {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.content-crm .approval-header-context {
  flex: 1 1 190px;
  min-width: 140px;
  max-width: 240px;
  height: 42px;
  min-height: 42px;
  padding: 5px 9px;
}

.content-crm .approval-header-context strong,
.content-crm .approval-header-context select {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-context-status,
.crm-header-currency {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-default, #dce5f0);
  border-radius: 8px;
  padding: 0 9px;
  white-space: nowrap;
  color: var(--text-secondary, #526985);
  font-size: 11px;
  font-weight: 700;
}

.crm-context-status {
  border-color: #bde3ca;
  background: #edf9f1;
  color: #08783c;
}

.crm-context-status svg { width: 16px; height: 16px; }
.crm-header-currency { border-color: transparent; }
.content-crm .approval-header-user { min-width: 118px; min-height: 42px; }
.content-crm .page { padding-top: 16px; }

.content-crm .global-workspace-tools:empty { display: none; }

.crm-workspace { min-width: 0; display: grid; gap: 12px; }
.crm-detail-workspace{gap:10px;max-width:1400px;margin:0 auto;width:100%}.crm-detail-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:4px 2px}.crm-detail-header h1{margin:7px 0 3px;font-size:23px;line-height:1.2}.crm-detail-header p{margin:0;color:var(--text-muted,#65758b)}.crm-header-facts{display:flex;align-items:center;gap:24px;font-size:18px;white-space:nowrap}.crm-stage-badge{min-width:82px;padding:7px 14px;border:1px solid #2563eb;border-radius:7px;text-align:center;color:#0757cc;font-size:13px}.crm-stage-badge.lost{border-color:#ef4444;color:#dc2626;background:#fff7f7}.crm-stage-badge.won{border-color:#16a34a;color:#15803d;background:#f4fff7}.crm-command-row{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.crm-stage-workflow{display:flex;gap:5px;max-width:100%;overflow-x:auto;padding:2px 0 4px;scrollbar-width:thin}.crm-stage-step{flex:1 0 125px;padding:9px 10px;border:1px solid var(--border-default,#d4dce7);background:#fff;text-align:center;font-size:12px;white-space:nowrap}.crm-stage-step.visited{background:#eef5ff;border-color:#9abcec;color:#0757cc}.crm-stage-step.current{background:#0757cc;border-color:#0757cc;color:#fff;font-weight:750}.crm-stage-step.terminal{flex-basis:105px}.crm-summary-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid var(--border-default,#d8e0ea);border-radius:9px;background:#fff;padding:12px 4px}.crm-summary-strip>div{min-width:0;padding:2px 16px;border-right:1px solid var(--border-default,#d8e0ea)}.crm-summary-strip>div:last-child{border:0}.crm-summary-strip span{display:block;color:var(--text-muted,#65758b);font-size:11px;margin-bottom:5px}.crm-summary-strip strong{display:block;font-size:13px;line-height:1.3;overflow-wrap:anywhere}.crm-detail-tabs{display:flex;border-bottom:1px solid var(--border-default,#d8e0ea);gap:2px}.crm-detail-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:10px 18px;color:#334155;cursor:pointer}.crm-detail-tabs button[aria-selected=true]{border-color:#0757cc;color:#0757cc;font-weight:700}.crm-detail-columns{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(270px,1fr);gap:12px}.crm-detail-columns main{display:grid;gap:12px}.crm-detail-workspace .panel{padding:14px 16px}.crm-detail-workspace .panel h2{font-size:16px;margin:0 0 14px}.crm-info-split{display:grid;grid-template-columns:1fr 1fr;gap:24px}.crm-info-split>div+div{border-left:1px solid var(--border-default,#d8e0ea);padding-left:24px}.crm-detail-workspace h3{font-size:13px;color:#0757cc;margin:0 0 10px}.crm-detail-workspace dl{display:grid;gap:8px;margin:0}.crm-detail-workspace dl>div{display:grid;grid-template-columns:minmax(95px,.75fr) minmax(0,1.4fr);gap:10px}.crm-detail-workspace dt{color:var(--text-muted,#65758b);font-size:12px}.crm-detail-workspace dd{margin:0;font-size:13px;overflow-wrap:anywhere}.crm-requirement{margin-top:14px;padding-top:12px;border-top:1px solid var(--border-default,#d8e0ea)}.crm-requirement p{margin:0;white-space:pre-wrap}.crm-timeline{display:grid}.crm-timeline-item{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;padding:10px 4px;border-bottom:1px solid var(--border-default,#e2e8f0)}.crm-timeline-item>span{color:#0757cc;font-size:11px;font-weight:700;text-transform:capitalize}.crm-timeline-item p{margin:3px 0}.crm-timeline-item small{color:var(--text-muted,#65758b)}.crm-history-grid{display:grid;gap:12px}.crm-dialog-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(15,23,42,.42);display:flex;justify-content:flex-end}.crm-dialog{width:min(500px,100%);height:100%;overflow:auto;background:#fff;padding:22px;box-shadow:-12px 0 32px rgba(15,23,42,.18)}.crm-dialog form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.crm-dialog h2,.crm-dialog p,.crm-dialog .full-width,.crm-dialog .form-actions{grid-column:1/-1}.crm-dialog label{display:grid;gap:5px;font-size:12px;font-weight:650}.crm-dialog input,.crm-dialog select,.crm-dialog textarea{width:100%}.crm-dialog textarea{min-height:100px}.crm-dialog .form-actions{justify-content:flex-end}.crm-detail-workspace :is(button,a,input,select,textarea):focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
@media(max-width:1000px){.crm-summary-strip{grid-template-columns:repeat(3,1fr)}.crm-summary-strip>div:nth-child(3){border-right:0}.crm-summary-strip>div:nth-child(-n+3){padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid var(--border-default,#d8e0ea)}.crm-detail-columns{grid-template-columns:1fr}}
@media(max-width:600px){.crm-detail-header{align-items:flex-start;flex-direction:column}.crm-header-facts{width:100%;justify-content:space-between}.crm-command-row{justify-content:flex-start}.crm-command-row .btn{flex:1 1 44%}.crm-summary-strip{grid-template-columns:1fr 1fr}.crm-summary-strip>div{border-right:0!important;border-bottom:1px solid var(--border-default,#d8e0ea);padding:8px 10px!important;margin:0!important}.crm-summary-strip>div:nth-last-child(-n+2){border-bottom:0}.crm-detail-tabs{overflow-x:auto}.crm-detail-tabs button{white-space:nowrap;padding-inline:12px}.crm-info-split{grid-template-columns:1fr}.crm-info-split>div+div{border-left:0;border-top:1px solid var(--border-default,#d8e0ea);padding:14px 0 0}.crm-detail-workspace dl>div{grid-template-columns:105px minmax(0,1fr)}.crm-dialog form{grid-template-columns:1fr}.crm-timeline-item{grid-template-columns:72px minmax(0,1fr)}.crm-history-grid .table-wrap{overflow-x:auto}.crm-history-grid table{min-width:680px}}

/* CRM Lead Detail — reference-aligned workflow workspace */
.crm-detail-workspace{max-width:1560px;gap:14px;padding-bottom:28px}.crm-detail-header{align-items:center;padding:8px 2px 0}.crm-detail-header>div:first-child{min-width:0}.crm-detail-header .link-button{font-size:13px;margin-bottom:8px}.crm-detail-header h1{font-size:25px;letter-spacing:-.35px;margin:0 0 5px}.crm-detail-header p{font-size:14px}.crm-header-facts{gap:28px;padding-right:12px}.crm-header-facts>strong{font-size:20px}.crm-stage-badge{min-width:88px;padding:8px 16px;background:#f8fbff}.crm-command-row{justify-content:center;margin-top:-2px}.crm-command-row .btn{min-width:132px;height:38px;border-color:#cbd6e5;background:#fff;color:#0757cc;box-shadow:0 1px 2px rgba(15,23,42,.04)}.crm-command-row .btn.primary{background:#0757cc;color:#fff}.crm-command-row .btn.danger{color:#dc2626;border-color:#f3b5b5;background:#fffafa}
.crm-stage-workflow{gap:0;padding:0 0 2px;overflow-x:auto}.crm-stage-step{position:relative;flex:1 0 145px;margin-right:8px;padding:11px 18px 11px 22px;border-color:#cbd5e1;background:#fff;clip-path:polygon(0 0,calc(100% - 12px) 0,100% 50%,calc(100% - 12px) 100%,0 100%,12px 50%)}.crm-stage-step:first-child{clip-path:polygon(0 0,calc(100% - 12px) 0,100% 50%,calc(100% - 12px) 100%,0 100%);padding-left:12px}.crm-stage-step.visited{background:#edf5ff;color:#0757cc}.crm-stage-step.current{background:#0757cc;color:#fff}.crm-stage-step.current.terminal:last-child{background:#fff1f1;color:#dc2626;border-color:#ef4444}.crm-stage-step.current.terminal:nth-last-child(2){background:#eefbf2;color:#15803d;border-color:#22a447}.crm-stage-step.terminal{flex-basis:118px}.crm-stage-step.terminal:nth-last-child(2){margin-left:12px}
.crm-summary-strip{padding:16px 5px;border-radius:10px;box-shadow:0 1px 2px rgba(15,23,42,.025)}.crm-summary-strip>div{padding:1px 20px}.crm-summary-strip span{font-size:12px;color:#526278}.crm-summary-strip strong{font-size:14px}.crm-summary-strip>div:first-child strong,.crm-detail-workspace dd strong{color:#0757cc}.crm-detail-workspace .status-lost,.crm-summary-strip>div:first-child strong:has(+*){color:#dc2626}
.crm-detail-tabs{gap:4px;margin-top:2px}.crm-detail-tabs button{padding:11px 22px;font-size:14px}.crm-detail-columns{grid-template-columns:minmax(0,1.9fr) minmax(320px,1fr);gap:14px}.crm-detail-columns main,.crm-detail-columns aside{display:grid;align-content:start;gap:14px}.crm-detail-workspace .panel{border-color:#d5dee9;border-radius:10px;padding:16px 18px;box-shadow:0 1px 3px rgba(15,23,42,.035)}.crm-detail-workspace .panel h2{font-size:17px;margin-bottom:16px}.crm-info-split{gap:28px}.crm-info-split>div+div{padding-left:28px}.crm-detail-workspace h3{font-size:14px;margin-bottom:14px}.crm-detail-workspace dl{gap:10px}.crm-detail-workspace dl>div{grid-template-columns:minmax(105px,.75fr) minmax(0,1.5fr)}.crm-detail-workspace dt{font-size:13px;color:#344256}.crm-detail-workspace dd{font-size:13px;color:#111827}.crm-detail-workspace dd a{color:#0757cc}.crm-requirement{margin-top:15px}
.crm-detail-columns aside>.panel:first-child{min-height:230px}.crm-detail-columns aside>.panel:first-child dl{gap:12px}.crm-detail-columns aside>.panel:first-child:after{content:"Quick actions are available in the command bar above.";display:block;margin-top:18px;padding-top:14px;border-top:1px solid #e2e8f0;color:#64748b;font-size:12px}.crm-recent-timeline{min-height:280px}.crm-recent-timeline .panel-head{align-items:center}.crm-timeline{position:relative}.crm-timeline:before{content:"";position:absolute;left:44px;top:16px;bottom:18px;width:1px;background:#d7e0ea}.crm-timeline-item{position:relative;grid-template-columns:90px minmax(0,1fr);padding:11px 4px;border:0}.crm-timeline-item>span{position:relative;z-index:1;display:flex;align-items:center;width:max-content;max-width:84px;padding:6px 8px;border:1px solid #9fc1f4;border-radius:999px;background:#f1f7ff;color:#0757cc;font-size:10px;text-transform:capitalize}.crm-timeline-item>div{padding-top:2px}.crm-timeline-item p{font-size:12px;color:#526278}.crm-timeline-item small{display:block;margin-top:4px}.crm-current-status dt{font-weight:600}.crm-current-status dd{font-weight:500}
.crm-current-status:after{display:none!important}.crm-current-status footer{display:flex;gap:8px;margin:18px -4px -4px;padding-top:14px;border-top:1px solid #e2e8f0}.crm-current-status footer button{flex:1;color:#0757cc;font-size:12px;white-space:nowrap}.crm-open-followups .panel-head,.crm-recent-notes .panel-head{align-items:center}.crm-open-followups article,.crm-recent-notes article{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #e7edf4}.crm-open-followups article:first-of-type,.crm-recent-notes article:first-of-type{border-top:0}.crm-open-followups article>i,.crm-recent-notes article>i{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#edf5ff;color:#0757cc}.crm-open-followups article svg,.crm-recent-notes article svg{width:15px;height:15px}.crm-open-followups article div,.crm-recent-notes article div{min-width:0}.crm-open-followups article strong{display:block;font-size:13px}.crm-open-followups article small,.crm-recent-notes article small{display:block;margin-top:4px;color:#64748b;font-size:11px}.crm-open-followups article>span{color:#526278;font-size:11px}.crm-recent-notes article{grid-template-columns:30px minmax(0,1fr)}.crm-recent-notes article p{margin:0;font-size:12px;line-height:1.45}.crm-detail-workspace .panel-head .link-button{font-size:12px;color:#0757cc}
.crm-detail-workspace .crm-dialog{border-radius:14px 0 0 14px}.crm-detail-workspace .empty{color:#738198}
@media(max-width:1100px){.crm-detail-columns{grid-template-columns:1fr}.crm-detail-columns aside{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-header-facts{gap:14px}.crm-stage-step{flex-basis:135px}}
@media(max-width:700px){.crm-detail-workspace{gap:10px}.crm-detail-header{align-items:flex-start}.crm-header-facts{padding:0}.crm-command-row{display:grid;grid-template-columns:1fr 1fr}.crm-command-row .btn{min-width:0}.crm-detail-columns aside{grid-template-columns:1fr}.crm-stage-workflow{margin-inline:-4px}.crm-stage-step{flex-basis:128px}.crm-summary-strip{grid-template-columns:1fr 1fr}.crm-timeline:before{left:36px}.crm-timeline-item{grid-template-columns:74px minmax(0,1fr)}}

/* Lead stage ribbon: true bordered arrows (clip-path borders are not reliable). */
.crm-detail-workspace .crm-stage-workflow{display:flex;align-items:stretch;gap:14px;padding:1px 14px 1px 0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.crm-detail-workspace .crm-stage-step{--step-bg:#fff;--step-border:#c8d2df;position:relative;isolation:isolate;flex:1 0 132px;height:40px;margin:0;padding:0 8px 0 18px;display:flex;align-items:center;justify-content:center;border:1px solid var(--step-border);border-radius:2px;background:var(--step-bg);clip-path:none;color:#0f172a;font-size:12px;line-height:1;font-weight:500;overflow:visible}
.crm-detail-workspace .crm-stage-step:before,.crm-detail-workspace .crm-stage-step:after{content:"";position:absolute;top:50%;left:100%;width:0;height:0;transform:translateY(-50%);border-top:20px solid transparent;border-bottom:20px solid transparent}
.crm-detail-workspace .crm-stage-step:before{z-index:1;border-left:13px solid var(--step-border)}
.crm-detail-workspace .crm-stage-step:after{z-index:2;margin-left:-1.5px;border-top-width:19px;border-bottom-width:19px;border-left:12px solid var(--step-bg)}
.crm-detail-workspace .crm-stage-step:not(:first-child){margin-left:0}
.crm-detail-workspace .crm-stage-step:not(:first-child)>*{position:relative;z-index:3}
.crm-detail-workspace .crm-stage-step.visited{--step-bg:#eef5ff;--step-border:#8db4ea;color:#0757cc}
.crm-detail-workspace .crm-stage-step.current{--step-bg:#0b5bd3;--step-border:#0b5bd3;color:#fff;font-weight:750}
.crm-detail-workspace .crm-stage-step.terminal{flex-basis:104px;margin-left:0}
.crm-detail-workspace .crm-stage-step.terminal:nth-last-child(2){margin-left:14px}
.crm-detail-workspace .crm-stage-step.current.terminal:nth-last-child(2){--step-bg:#eefbf2;--step-border:#22a447;color:#15803d}
.crm-detail-workspace .crm-stage-step.current.terminal:last-child{--step-bg:#fff2f2;--step-border:#ef4444;color:#dc2626}
.crm-detail-workspace .crm-stage-step:last-child:before,.crm-detail-workspace .crm-stage-step:last-child:after{display:none}
.crm-detail-workspace .crm-stage-step:last-child{padding-right:12px}
.crm-detail-workspace .crm-command-row{gap:10px}.crm-detail-workspace .crm-command-row .btn{height:36px;min-width:124px;padding:0 16px;font-size:12px}
.crm-detail-workspace .crm-summary-strip{min-height:76px}.crm-detail-workspace .crm-summary-strip>div{display:flex;flex-direction:column;justify-content:center}.crm-detail-workspace .crm-summary-strip span{margin-bottom:7px}.crm-detail-workspace .crm-detail-tabs{min-height:50px;align-items:flex-end}.crm-detail-workspace .crm-detail-tabs button{height:48px}
.crm-detail-workspace .crm-current-status{min-height:0!important}.crm-detail-workspace .crm-current-status dl>div{grid-template-columns:130px minmax(0,1fr)}.crm-detail-workspace .crm-current-status .status-lost{color:#dc2626}.crm-detail-workspace .crm-current-status .status-won{color:#15803d}.crm-detail-workspace .crm-current-status footer{justify-content:space-between}.crm-detail-workspace .crm-lead-information .crm-info-split{min-height:150px}
@media(max-width:900px){.crm-detail-workspace .crm-stage-step{flex-basis:126px}.crm-detail-workspace .crm-command-row{justify-content:flex-start}.crm-detail-workspace .crm-command-row .btn{flex:1 1 140px}}
@media(max-width:600px){.crm-detail-workspace .crm-stage-workflow{padding-right:18px}.crm-detail-workspace .crm-stage-step{flex-basis:118px}.crm-detail-workspace .crm-current-status dl>div{grid-template-columns:110px minmax(0,1fr)}}

/* Clean stage cards: uniform borders with detached connectors. */
.crm-detail-workspace .crm-stage-workflow{gap:20px;padding:2px 2px 4px;overflow-y:hidden}
.crm-detail-workspace .crm-stage-step{flex-basis:126px;height:40px;margin:0!important;padding:0 12px;border:1px solid #c7d2e0;border-radius:5px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.025);clip-path:none;overflow:visible}
.crm-detail-workspace .crm-stage-step:before{display:none!important}
.crm-detail-workspace .crm-stage-step:after{content:"›";display:grid!important;place-items:center;position:absolute;z-index:3;top:50%;left:calc(100% + 1px);width:20px;height:38px;margin:0;transform:translateY(-50%);border:0!important;background:transparent!important;color:#94a3b8;font-size:25px;font-weight:300;line-height:1}
.crm-detail-workspace .crm-stage-step:last-child:after{display:none!important}
.crm-detail-workspace .crm-stage-step.visited{border-color:#8fb5e8;background:#f2f7fe;color:#0757cc}
.crm-detail-workspace .crm-stage-step.current{border-color:#0b5bd3;background:#0b5bd3;color:#fff;box-shadow:0 2px 5px rgba(11,91,211,.18)}
.crm-detail-workspace .crm-stage-step.terminal{flex-basis:100px}
.crm-detail-workspace .crm-stage-step.terminal:nth-last-child(2){margin-left:12px!important}
.crm-detail-workspace .crm-stage-step.terminal:nth-last-child(2):before{content:"";display:block!important;position:absolute;top:3px;bottom:3px;left:-17px;width:1px;height:auto;transform:none;border:0;background:#b8c3d1}
.crm-detail-workspace .crm-stage-step.current.terminal:nth-last-child(2){border-color:#22a447;background:#eefbf2;color:#15803d;box-shadow:none}
.crm-detail-workspace .crm-stage-step.current.terminal:last-child{border-color:#ef4444;background:#fff2f2;color:#dc2626;box-shadow:none}
@media(max-width:900px){.crm-detail-workspace .crm-stage-workflow{gap:18px}.crm-detail-workspace .crm-stage-step{flex-basis:120px}}
@media(max-width:600px){.crm-detail-workspace .crm-stage-step{flex-basis:112px}.crm-detail-workspace .crm-stage-step.terminal{flex-basis:92px}}
.crm-records-table .crm-contact-open{display:block;width:100%;max-width:100%;padding:4px 0;border:0;background:transparent;color:#0757cc;text-align:left;font:inherit;line-height:1.35;cursor:pointer;text-decoration:none}.crm-records-table .crm-contact-open:hover{text-decoration:underline;color:#064bb0}.crm-records-table .crm-contact-open:focus-visible{outline:2px solid rgba(37,99,235,.42);outline-offset:2px;border-radius:3px}

/* Simplified CRM dashboard command row. */
.crm-daily-dashboard{position:relative}.crm-daily-dashboard>.crm-daily-head{position:absolute;z-index:3;top:8px;right:2px;min-height:0;padding:0;border:0}.crm-daily-dashboard>.crm-daily-head>[data-dashboard-new-lead]{height:42px}.crm-daily-dashboard>.crm-daily-nav{min-height:58px;padding-right:160px;align-items:center;margin:0}.crm-daily-dashboard>.crm-daily-nav button{height:58px}.crm-daily-dashboard>.crm-daily-kpis{margin-top:10px}
@media(max-width:600px){.crm-daily-dashboard>.crm-daily-head{position:static;display:flex;justify-content:flex-end;margin-bottom:4px}.crm-daily-dashboard>.crm-daily-nav{padding-right:0;min-height:48px;overflow-x:auto}.crm-daily-dashboard>.crm-daily-nav button{height:48px;white-space:nowrap}}

/* Simplified CRM Lead Detail */
.crm-detail-workspace{max-width:1560px;gap:12px}.crm-simple-back{align-self:flex-start;margin:3px 2px;color:#0757cc}.crm-simple-record{padding:20px 22px!important}.crm-simple-record>header{display:flex;justify-content:space-between;gap:24px;padding-bottom:15px;border-bottom:1px solid #dce4ee}.crm-simple-record h1{margin:0 0 5px;font-size:23px}.crm-simple-record header p{margin:0 0 8px;color:#53647b}.crm-simple-record header p b{padding:0 8px;color:#9ba8b8}.crm-simple-record header dl{display:flex;flex-wrap:wrap;gap:6px 20px}.crm-simple-record header dl>div{display:flex;gap:8px}.crm-simple-record header dt{font-weight:650;color:#344256}.crm-simple-record header dd{margin:0}.crm-simple-record-tools{display:flex;align-items:flex-start;gap:10px}.crm-simple-record-tools .btn{height:40px}.crm-simple-record-tools svg{width:16px;height:16px}.crm-simple-more{position:relative}.crm-simple-more summary{display:grid;place-items:center;width:40px;height:40px;border:1px solid #cbd6e5;border-radius:7px;background:#fff;color:#17324f;font-size:24px;cursor:pointer;list-style:none}.crm-simple-more summary::-webkit-details-marker{display:none}.crm-simple-more>div{position:absolute;z-index:20;top:46px;right:0;width:170px;padding:6px;border:1px solid #d5dee9;border-radius:8px;background:#fff;box-shadow:0 12px 28px rgba(15,23,42,.16)}.crm-simple-more button{width:100%;padding:9px 10px;border:0;border-radius:5px;background:#fff;text-align:left;cursor:pointer}.crm-simple-more button:hover{background:#f1f6fc}.crm-simple-more button.danger{color:#dc2626}.crm-simple-record>footer{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-top:14px}.crm-simple-status{display:flex;align-items:center;gap:0}.crm-simple-status>span{padding:0 24px;border-right:1px solid #dce4ee;color:#53647b}.crm-simple-status>span:first-child{padding-left:0}.crm-simple-status>span:last-child{border:0}.crm-simple-status b{margin-left:7px;color:#111827}.crm-simple-actions{display:flex;gap:10px}.crm-simple-actions .btn{height:40px;min-width:138px}.crm-simple-tabs{display:flex;gap:12px;border-bottom:1px solid #d6dee8}.crm-simple-tabs button{height:46px;padding:0 18px;border:0;border-bottom:2px solid transparent;background:transparent;color:#334155;cursor:pointer}.crm-simple-tabs button[aria-selected=true]{border-color:#0757cc;color:#0757cc;font-weight:750}.crm-simple-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,1fr);gap:14px}.crm-simple-overview>.panel{padding:16px 18px!important}.crm-simple-overview h2,.crm-simple-timeline h2{margin:0 0 14px;font-size:17px}.crm-simple-overview dl{display:grid;gap:8px}.crm-simple-overview dl>div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px}.crm-simple-overview dt{color:#53647b}.crm-simple-overview dd{margin:0;color:#111827;overflow-wrap:anywhere}.crm-simple-overview dd a{color:#0757cc}.crm-simple-next>strong{display:block;margin-bottom:17px}.crm-simple-opportunity,.crm-simple-preview{grid-column:1/-1}.crm-simple-opportunity dl{grid-template-columns:repeat(3,minmax(0,1fr));gap:0}.crm-simple-opportunity dl>div{grid-template-columns:minmax(110px,.75fr) minmax(0,1fr);padding:0 24px;border-right:1px solid #dce4ee}.crm-simple-opportunity dl>div:first-child{padding-left:0}.crm-simple-opportunity dl>div:last-child{padding-right:0;border:0}.crm-simple-preview{min-height:95px}.crm-simple-event{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;padding:10px 0;border-bottom:1px solid #e5ebf2}.crm-simple-event:last-child{border-bottom:0}.crm-simple-event>i{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#eaf2ff;color:#0757cc}.crm-simple-event svg{width:13px;height:13px}.crm-simple-event p{margin:3px 0;color:#53647b}.crm-simple-event small{color:#6b7a90}.crm-simple-timeline{padding:18px 20px!important}.crm-workspace-nav{display:flex;align-items:center;gap:4px;padding:0 8px!important;min-height:54px}.crm-workspace-nav>button{height:54px;padding:0 18px;border:0;border-bottom:2px solid transparent;background:transparent;color:#334155;font-weight:650;cursor:pointer}.crm-workspace-nav>button.active,.crm-workspace-nav>button[aria-current=page]{border-color:#0757cc;color:#0757cc}
@media(max-width:1050px){.crm-simple-record>footer{align-items:flex-start;flex-direction:column}.crm-simple-actions{width:100%;flex-wrap:wrap}.crm-simple-actions .btn{flex:1}.crm-simple-status{flex-wrap:wrap;row-gap:10px}.crm-simple-overview{grid-template-columns:1fr}.crm-simple-opportunity,.crm-simple-preview{grid-column:auto}.crm-simple-opportunity dl{grid-template-columns:1fr}.crm-simple-opportunity dl>div{padding:8px 0;border-right:0;border-bottom:1px solid #e5ebf2}.crm-simple-opportunity dl>div:last-child{border:0}}
@media(max-width:600px){.crm-simple-record{padding:16px!important}.crm-simple-record>header{flex-direction:column}.crm-simple-record-tools{position:absolute;right:16px}.crm-simple-record header>div:first-child{padding-right:92px}.crm-simple-record header dl{display:grid}.crm-simple-record>footer{gap:14px}.crm-simple-status{display:grid;width:100%;gap:8px}.crm-simple-status>span{padding:0;border:0}.crm-simple-actions{display:grid;grid-template-columns:1fr;width:100%}.crm-simple-actions .btn{width:100%}.crm-simple-tabs{overflow:visible}.crm-simple-overview dl>div{grid-template-columns:110px minmax(0,1fr)}.crm-workspace-nav{overflow-x:auto}.crm-workspace-nav>button{white-space:nowrap;padding:0 13px}}
.crm-workspace-nav {
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--divider-default, #e5eaf1);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.crm-workspace-nav .btn {
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-secondary, #526985);
  box-shadow: none;
}

.crm-workspace-nav .btn:hover,
.crm-workspace-nav .btn.active {
  border-bottom-color: var(--action-primary, #2563eb);
  background: transparent;
  color: var(--action-primary, #2563eb);
}
.crm-common-navigation{position:relative;z-index:30;display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:54px;padding:0 8px!important;overflow:visible!important}.crm-common-primary{display:flex;align-items:stretch;min-width:0;height:54px}.crm-common-primary>button{min-width:96px;height:54px;padding:0 18px;border:0;border-bottom:2px solid transparent;background:transparent;color:#334155;font:inherit;font-weight:650;cursor:pointer}.crm-common-primary>button:hover,.crm-common-primary>button.active{color:#0757cc;background:#f7faff}.crm-common-primary>button[aria-current=page]{border-bottom-color:#0757cc;color:#0757cc}.crm-common-navigation button:focus-visible,.crm-common-navigation summary:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:-3px}.crm-common-tools{position:relative;margin-left:auto}.crm-common-tools>summary{display:flex;align-items:center;justify-content:center;gap:7px;min-width:92px;min-height:42px;padding:0 14px;border:1px solid #ccd7e5;border-radius:7px;background:#fff;color:#26364b;font-weight:650;cursor:pointer;list-style:none}.crm-common-tools>summary::-webkit-details-marker{display:none}.crm-common-tools[open]>summary{border-color:#8bb5f5;color:#0757cc;background:#f6f9ff}.crm-common-tools>div{position:absolute;top:48px;right:0;z-index:40;display:grid;width:220px;padding:6px;border:1px solid #d4deeb;border-radius:8px;background:#fff;box-shadow:0 14px 32px rgba(15,23,42,.16)}.crm-common-tools button{min-height:42px;padding:8px 11px;border:0;border-radius:5px;background:#fff;color:#24364d;font:inherit;text-align:left;cursor:pointer}.crm-common-tools button:hover,.crm-common-tools button.active{background:#edf4ff;color:#0757cc}.crm-common-tools button[aria-current=page]{font-weight:750}@media(max-width:700px){.crm-common-navigation{align-items:stretch;padding:0!important}.crm-common-primary{flex:1;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}.crm-common-primary>button{min-width:max-content;padding:0 14px}.crm-common-tools{display:flex;align-items:center;padding:0 7px;background:#fff}.crm-common-tools>summary{min-width:78px;padding:0 10px}.crm-common-tools>div{position:fixed;top:auto;right:12px;left:12px;width:auto;max-height:calc(100vh - 90px);overflow-y:auto}.crm-common-tools button{min-height:46px}}@media(max-width:420px){.crm-common-primary>button{padding:0 12px}.crm-common-navigation{max-width:100%}}

.crm-personal-views { padding: 12px 14px; }
.crm-personal-views .panel-head { margin-bottom: 8px; }
.crm-personal-views .form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crm-personal-views select { flex: 1 1 220px; max-width: 320px; min-height: 40px; }
.crm-personal-views [data-crm-view-delete] { margin-left: auto; }

.crm-lead-card,
.crm-records-card { max-width: 1180px; width: 100%; justify-self: center; }
.crm-lead-card { padding: 14px 16px 16px; }
.crm-lead-card-head { align-items: flex-start; margin-bottom: 8px; }
.crm-lead-card-head h2 { font-size: 16px; }
.crm-required-note { color: var(--status-danger, #dc2626); font-size: 11px; }

.crm-lead-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 16px;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

.crm-lead-actions,
.crm-form-error { grid-column: 1 / -1; }
.crm-span-8 { grid-column: span 8; }
.crm-span-5 { grid-column: span 5; }
.crm-span-4 { grid-column: span 4; }
.crm-span-3 { grid-column: span 3; }
.crm-span-2 { grid-column: span 2; }
.crm-field { min-width: 0; display: grid; align-content: start; gap: 4px; color: var(--text-primary, #10213b); font-size: 11px; font-weight: 650; }
.crm-field > span b,
.crm-required-note b { color: var(--status-danger, #dc2626); }
.crm-field input,
.crm-field select { width: 100%; min-width: 0; min-height: 42px; height: 42px; }
.crm-field-error { min-height: 0; color: var(--status-danger, #dc2626); font-size: 10px; font-weight: 500; }
.crm-field-error:empty { display: none; }
.crm-lead-actions { grid-column: 9 / -1; justify-content: flex-end; align-self: end; margin: 0; padding-top: 0; border-top: 0; }
.crm-lead-actions .btn { min-width: 124px; }
.crm-lead-actions .btn[aria-busy="true"] { cursor: wait; opacity: .72; }
.crm-form-error { margin: 0; }

@media screen and (max-width: 1100px) {
  .content-crm .topbar { align-items: flex-start; flex-wrap: wrap; }
  .content-crm .crm-global-title { padding-top: 10px; }
  .content-crm .topbar-actions { flex: 1 1 auto; width: auto; }
  .content-crm .approval-header-controls { flex-wrap: wrap; }
  .content-crm .approval-header-context { max-width: none; }
}

@media screen and (max-width: 900px) {
  .crm-lead-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .crm-span-8 { grid-column: 1 / -1; }
  .crm-span-5,
  .crm-span-4,
  .crm-span-3,
  .crm-span-2 { grid-column: span 1; }
  .crm-lead-actions { grid-column: 2; }
}

@media screen and (max-width: 700px) {
  .content-crm .topbar { padding: 8px 12px; gap: 8px; }
  .content-crm .crm-global-title { flex-basis: 100%; padding-top: 0; }
  .content-crm .topbar-actions { flex: 0 0 auto; width: 100%; }
  .content-crm .approval-header-context { flex: 1 1 calc(50% - 4px); }
  .content-crm .approval-header-user { min-width: 44px; width: 44px; padding: 0; }
  .content-crm .approval-header-user > div,
  .content-crm .approval-header-user > svg { display: none; }
  .crm-context-status span { display: none; }
  .crm-lead-form { grid-template-columns: 1fr; gap: 10px; }
  .crm-span-8,
  .crm-span-5,
  .crm-span-4,
  .crm-span-3,
  .crm-span-2,
  .crm-lead-actions,
  .crm-form-error { grid-column: 1; }
  .crm-personal-views select { max-width: none; flex-basis: 100%; }
  .crm-personal-views [data-crm-view-delete] { margin-left: 0; }
}

@media screen and (max-width: 430px) {
  .content-crm .approval-header-context { flex-basis: 100%; }
  .crm-context-status,
  .crm-header-currency { flex: 1 1 auto; justify-content: center; }
  .crm-lead-card { padding: 12px; }
  .crm-lead-card-head { gap: 8px; }
}

/* Sales report desktop fit authority: one filter row and one page scrollbar. */
@media screen and (min-width: 1180px) {
  .sales-report-filter-panel .all-sales-filters {
    display: grid;
    grid-template-columns:
      minmax(0, 0.9fr)
      minmax(0, 0.9fr)
      minmax(0, 0.95fr)
      minmax(0, 1.25fr)
      minmax(0, 0.9fr)
      minmax(0, 0.9fr)
      minmax(154px, 0.85fr);
    gap: 8px;
    align-items: end;
  }

  .sales-report-filter-panel .all-sales-filters > * {
    min-width: 0;
    grid-column: auto;
  }

  .sales-report-filter-panel .customer-filter-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 6px;
  }
}

.page:has(.sales-register-wrap) {
  overflow-x: hidden;
}

.sales-register-wrap {
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
}

.sales-register-wrap .sales-register-table {
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.sales-register-wrap .sales-register-table th {
  position: static;
  padding: 8px 6px;
  font-size: 10px;
  line-height: 1.15;
}

.sales-register-wrap .sales-register-table td {
  padding: 9px 6px;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.sales-register-wrap .sales-register-table th:nth-child(1),
.sales-register-wrap .sales-register-table td:nth-child(1) { width: 8%; }
.sales-register-wrap .sales-register-table th:nth-child(2),
.sales-register-wrap .sales-register-table td:nth-child(2) { width: 10%; }
.sales-register-wrap .sales-register-table th:nth-child(3),
.sales-register-wrap .sales-register-table td:nth-child(3) { width: 9%; }
.sales-register-wrap .sales-register-table th:nth-child(4),
.sales-register-wrap .sales-register-table td:nth-child(4) { width: 10%; }
.sales-register-wrap .sales-register-table th:nth-child(5),
.sales-register-wrap .sales-register-table td:nth-child(5) { width: 13%; }
.sales-register-wrap .sales-register-table th:nth-child(6),
.sales-register-wrap .sales-register-table td:nth-child(6) { width: 14%; }
.sales-register-wrap .sales-register-table th:nth-child(7),
.sales-register-wrap .sales-register-table td:nth-child(7) { width: 7%; }
.sales-register-wrap .sales-register-table th:nth-child(8),
.sales-register-wrap .sales-register-table td:nth-child(8) { width: 11%; }
.sales-register-wrap .sales-register-table th:nth-child(9),
.sales-register-wrap .sales-register-table td:nth-child(9) { width: 18%; }

.sales-register-wrap .sales-register-table .row-actions {
  display: grid;
  grid-template-rows: repeat(2, auto);
  gap: 5px;
  width: 100%;
}

.sales-register-wrap .sales-register-table .row-action-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.sales-register-wrap .sales-register-table .btn.small {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 4px;
  font-size: 10px;
  white-space: nowrap;
}

.sales-register-wrap .sales-register-table .amount-stack {
  display: grid;
  gap: 2px;
  text-align: right;
}

@media screen and (max-width: 1179px) {
  .sales-report-filter-panel .all-sales-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-report-filter-panel .customer-filter-buttons {
    grid-column: span 3;
  }
}

@media screen and (max-width: 760px) {
  .sales-report-filter-panel .all-sales-filters {
    grid-template-columns: 1fr;
  }

  .sales-report-filter-panel .customer-filter-buttons {
    grid-column: auto;
  }
}

/* Compact professional invoice workspace aligned with the New Account form. */
:is(.modal-invoice, .inline-workspace-invoice) {
  background: #f5f8fc;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-professional-header {
  min-height: 72px;
  padding: 12px 18px;
  background: #fff;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-professional-header h2 {
  font-size: clamp(22px, 1.8vw, 27px);
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-professional-header .hint {
  font-size: 13px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-erp-form {
  gap: 10px;
  margin: 0 14px;
  padding: 10px 0 14px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-top-panels {
  gap: 10px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-section {
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 42, 76, 0.04);
  background: #fff;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-section-title {
  min-height: 50px;
  padding: 9px 13px;
  background: #fff;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-section-title strong {
  font-size: 16px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-section-title small {
  font-size: 11.5px;
}

:is(.modal-invoice, .inline-workspace-invoice) .erp-section-body {
  padding: 11px 13px;
  background: #fff;
}

:is(.modal-invoice, .inline-workspace-invoice) .erp-form-grid {
  gap: 9px 10px;
}

:is(.modal-invoice, .inline-workspace-invoice) :is(
  .erp-form-grid label,
  .invoice-b2b-field,
  .memo-box,
  .travel-table-row label,
  .template-flat-grid label
) {
  gap: 5px;
  font-size: 12px;
}

:is(.modal-invoice, .inline-workspace-invoice) :is(input, select) {
  min-height: 40px;
  height: 40px;
  padding: 7px 10px;
  border-color: #cddaea;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

:is(.modal-invoice, .inline-workspace-invoice) textarea {
  padding: 9px 10px;
  border-color: #cddaea;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

:is(.modal-invoice, .inline-workspace-invoice) :is(input, select, textarea):focus {
  border-color: #2d6fe8;
  box-shadow: 0 0 0 3px rgba(45, 111, 232, 0.11);
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-customer-lines {
  gap: 10px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-finance-row {
  gap: 10px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-travel-section .erp-section-body {
  padding: 10px 12px;
  background: #f8fafd;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-travel-card {
  padding: 0;
  border: 0;
  background: transparent;
}

:is(.modal-invoice, .inline-workspace-invoice) .air-ticket-block {
  gap: 9px;
}

:is(.modal-invoice, .inline-workspace-invoice) .air-ticket-block .line-editor,
:is(.modal-invoice, .inline-workspace-invoice) .saudi-visa-section {
  border: 1px solid #d8e3ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 42, 76, 0.025);
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-travel-row-title,
:is(.modal-invoice, .inline-workspace-invoice) .saudi-visa-section .template-subsection-title {
  padding: 8px 10px;
  font-size: 13px;
}

:is(.modal-invoice, .inline-workspace-invoice) .travel-table-header {
  padding: 6px 9px;
  font-size: 10.5px;
}

:is(.modal-invoice, .inline-workspace-invoice) .travel-table-row {
  gap: 7px;
  padding: 7px 9px;
}

:is(.modal-invoice, .inline-workspace-invoice) .travel-table-row input {
  height: 38px;
  min-height: 38px;
}

:is(.modal-invoice, .inline-workspace-invoice) :is(.passenger-header, .ticket-header),
:is(.modal-invoice, .inline-workspace-invoice) :is(.passenger-row, .ticket-row) {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 94px !important;
}

:is(.modal-invoice, .inline-workspace-invoice) :is(.flight-header, .flight-row) {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(82px, 0.62fr) minmax(118px, 0.9fr) minmax(118px, 0.9fr) minmax(78px, 0.62fr) 94px !important;
}

:is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 7px;
  justify-content: end;
  align-items: end;
}

:is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions .btn.icon {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid #b9c9dc;
  border-radius: 8px;
  background: #fff;
  color: #174f9c;
}

:is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions .btn.icon:hover {
  border-color: #2d6fe8;
  background: #edf4ff;
  color: #145fd1;
}

:is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions .btn.icon:last-child {
  color: #c8323f;
}

:is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions .btn.icon:last-child:hover {
  border-color: #e4a3aa;
  background: #fff1f2;
  color: #b91c2b;
}

:is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions .btn.icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.8;
}

:is(.modal-invoice, .inline-workspace-invoice) .saudi-visa-section {
  margin-top: 9px;
}

:is(.modal-invoice, .inline-workspace-invoice) .saudi-visa-section .template-flat-grid {
  gap: 9px;
  padding: 10px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-items-row,
:is(.modal-invoice, .inline-workspace-invoice) .invoice-item-row {
  padding: 7px 9px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-bottom-row {
  gap: 10px;
  margin-top: 10px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-bottom-row .memo-box textarea {
  min-height: 150px;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-totals-card {
  padding: 11px;
  border-radius: 9px;
  background: #f8fafd;
}

:is(.modal-invoice, .inline-workspace-invoice) .invoice-actions {
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px 10px 0 0;
}

@media (max-width: 820px) {
  :is(.modal-invoice, .inline-workspace-invoice) .invoice-erp-form {
    margin-inline: 9px;
  }

  :is(.modal-invoice, .inline-workspace-invoice) .inline-row-actions {
    grid-template-columns: repeat(2, minmax(40px, 1fr));
    width: 100%;
  }
}

/* Approval Workspace final cascade lock — keeps the approved shell stable after hydration. */
.approval-workspace-main{gap:10px}
.approval-workspace-head{align-items:center;padding:0 2px}
.approval-workspace-head h1{font-size:21px;line-height:1.15;letter-spacing:-.01em}
.approval-workspace-head p{margin:4px 0 0;font-size:12px}
.approval-workspace-tools{flex:0 1 560px}
.approval-workspace-tools .tenant-context{width:100%;justify-content:flex-end;flex-wrap:nowrap}
.approval-workspace-tools .tenant-pill,.approval-workspace-tools .tenant-switcher{min-height:46px;border-radius:8px;background:#fff;box-shadow:0 3px 12px rgba(15,35,70,.05)}
.approval-workspace-tools .tenant-pill{min-width:210px}.approval-workspace-tools .tenant-switcher{min-width:220px}
.approval-executive-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.approval-workspace-kpi{min-height:96px;padding:12px;align-items:flex-start;border-radius:9px}
.approval-workspace-kpi>span{width:40px;height:40px;flex-basis:40px;border-radius:9px}
.approval-workspace-kpi>span svg{width:20px;height:20px}.approval-workspace-kpi small{font-size:12px;color:#243855}.approval-workspace-kpi strong{font-size:20px}.approval-workspace-kpi em{font-size:10px}
.approval-workspace .approval-tabs{gap:32px}.approval-workspace .approval-tab{min-width:0;padding:0 16px 10px;font-size:12px;font-weight:700}
.approval-workspace .approval-filter-panel{padding:10px 12px}.approval-filter-bar{grid-template-columns:minmax(150px,1.15fr) repeat(4,minmax(140px,1fr)) auto;gap:10px}
.approval-master-detail{grid-template-columns:minmax(330px,30fr) minmax(0,70fr)}
.approval-queue-card{display:flex;flex-direction:column;max-height:470px}.approval-queue-table{overflow-y:auto}.approval-queue-header{display:none}
.approval-type-search{height:30px;max-width:178px;display:flex;align-items:center;gap:6px;padding:0 8px;border:1px solid #dbe3ef;border-radius:7px;background:#fff}.approval-type-search svg{width:13px;height:13px}.approval-type-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:10px}
.approval-queue-row,.approval-queue-total{grid-template-columns:minmax(145px,1.65fr) 48px minmax(78px,.8fr) 62px 12px}.approval-queue-row{min-height:39px;padding:4px 10px}.approval-queue-row>span:not(.approval-queue-name){display:grid;gap:1px}.approval-queue-row small{font-size:8px;color:#64748b}.approval-queue-row .waiting{color:#f97316}.approval-queue-row .today{color:#16934a}.approval-queue-total{position:sticky;bottom:0;background:#fff;border-top:1px solid #dfe7f1}
.approval-detail-summary{min-height:38px;display:flex;align-items:center;gap:18px;padding:7px 12px;border-bottom:1px solid #e6edf5;color:#334155;font-size:11px}.approval-detail-summary span+span{padding-left:18px;border-left:1px solid #cbd5e1}.approval-detail-summary .priority{color:#dc2626}
.approval-detail-table{min-width:760px}.approval-detail-table th,.approval-detail-table td{height:38px;padding:6px 7px}.approval-detail-table th:first-child,.approval-detail-table td:first-child{width:30px}.approval-waiting{font-weight:700}.approval-waiting.success{color:#16934a}.approval-waiting.warning{color:#f97316}.approval-waiting.danger{color:#dc2626}.approval-priority{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:700}.approval-priority.high{color:#dc2626;background:#fee2e2}.approval-priority.low{color:#15803d;background:#dcfce7}
@media(max-width:1280px){.approval-executive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.approval-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.approval-filter-actions{grid-column:span 3}.approval-master-detail{grid-template-columns:1fr}}
@media(max-width:900px){.approval-workspace-head{align-items:flex-start;flex-direction:column}.approval-workspace-tools{width:100%;flex:none}.approval-workspace-tools .tenant-context{justify-content:flex-start}.approval-executive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Approved professional Create/Edit Invoice form — layout only; all workflow fields remain intact. */
.invoice-professional-header {
  align-items: center;
  min-height: 88px;
  padding: 16px 20px;
  border-left: 4px solid #1769ff;
}

.invoice-professional-header > div:first-child {
  display: grid;
  gap: 3px;
}

.invoice-professional-header h2 {
  margin: 0;
  color: #0b1f3a;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.invoice-professional-header .hint {
  color: #58708f;
  font-size: 14px;
}

.invoice-form-eyebrow {
  color: #1769ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-invoice .invoice-erp-form,
.inline-workspace-invoice .invoice-erp-form {
  gap: 16px;
  margin: 0 18px;
  padding: 12px 0 22px;
}

.modal-invoice .transaction-readiness-inline,
.inline-workspace-invoice .transaction-readiness-inline {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #bbdfca;
  border-radius: 8px;
  background: #f0fbf5;
  color: #226b45;
  font-size: 13px;
  font-weight: 700;
}

.modal-invoice .invoice-top-panels,
.inline-workspace-invoice .invoice-top-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.modal-invoice .invoice-section,
.inline-workspace-invoice .invoice-section {
  min-width: 0;
  border-color: #d8e3ef;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 42, 76, 0.055);
}

.modal-invoice .invoice-section-title,
.inline-workspace-invoice .invoice-section-title {
  min-height: 58px;
  padding: 12px 16px;
  background: #fff;
  border-bottom-color: #dfe7f1;
}

.modal-invoice .invoice-section-title strong,
.inline-workspace-invoice .invoice-section-title strong {
  color: #0b1f3a;
  font-size: 18px;
  line-height: 1.2;
}

.modal-invoice .invoice-section-title small,
.inline-workspace-invoice .invoice-section-title small {
  margin-top: 2px;
  color: #60758f;
  font-size: 12px;
}

.modal-invoice .erp-section-body,
.inline-workspace-invoice .erp-section-body {
  padding: 14px 16px;
  background: #fff;
}

.modal-invoice .erp-form-grid label,
.inline-workspace-invoice .erp-form-grid label,
.modal-invoice .invoice-b2b-field,
.inline-workspace-invoice .invoice-b2b-field,
.modal-invoice .memo-box,
.inline-workspace-invoice .memo-box {
  color: #243b5a;
  font-size: 13px;
  font-weight: 800;
}

.modal-invoice input,
.modal-invoice select,
.modal-invoice textarea,
.inline-workspace-invoice input,
.inline-workspace-invoice select,
.inline-workspace-invoice textarea {
  font-size: 14px;
}

.modal-invoice .invoice-top-panels .invoice-customer-main-row,
.inline-workspace-invoice .invoice-top-panels .invoice-customer-main-row {
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, 0.7fr);
}

.modal-invoice .invoice-top-panels .invoice-customer-reference-row,
.inline-workspace-invoice .invoice-top-panels .invoice-customer-reference-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-invoice .invoice-top-panels .invoice-info-grid,
.inline-workspace-invoice .invoice-top-panels .invoice-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-invoice .invoice-finance-row,
.inline-workspace-invoice .invoice-finance-row {
  grid-template-columns: 1.05fr 0.85fr 0.8fr;
}

.modal-invoice .invoice-travel-section .erp-section-body,
.inline-workspace-invoice .invoice-travel-section .erp-section-body {
  padding: 14px 16px;
}

.modal-invoice .air-ticket-block,
.inline-workspace-invoice .air-ticket-block {
  display: grid;
  gap: 14px;
  padding: 0;
}

.modal-invoice .air-ticket-block .line-editor,
.inline-workspace-invoice .air-ticket-block .line-editor {
  min-width: 0;
  overflow: hidden;
  border-color: #d8e3ef;
  border-radius: 9px;
}

.invoice-travel-row-title {
  padding: 10px 12px 8px;
  border-bottom: 1px solid #e3eaf3;
  background: #fff;
  color: #173654;
  font-size: 14px;
  font-weight: 900;
}

.modal-invoice .travel-table-header,
.inline-workspace-invoice .travel-table-header {
  min-width: 0;
  padding: 7px 10px;
  background: #f3f7fc;
  color: #526b88;
  font-size: 11px;
}

.modal-invoice :is(.passenger-header, .ticket-header),
.inline-workspace-invoice :is(.passenger-header, .ticket-header),
.modal-invoice :is(.passenger-row, .ticket-row),
.inline-workspace-invoice :is(.passenger-row, .ticket-row) {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 78px !important;
  min-width: 0 !important;
}

.modal-invoice :is(.passenger-header, .ticket-header) span,
.inline-workspace-invoice :is(.passenger-header, .ticket-header) span,
.modal-invoice :is(.passenger-row, .ticket-row) > *,
.inline-workspace-invoice :is(.passenger-row, .ticket-row) > * {
  grid-column: auto !important;
}

.modal-invoice .flight-header,
.inline-workspace-invoice .flight-header,
.modal-invoice .air-ticket-block .flight-row,
.inline-workspace-invoice .air-ticket-block .flight-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(86px, 0.62fr) minmax(122px, 0.9fr) minmax(122px, 0.9fr) minmax(82px, 0.62fr) 78px !important;
  min-width: 0 !important;
}

.modal-invoice .travel-table-row,
.inline-workspace-invoice .travel-table-row {
  gap: 8px;
  padding: 9px 10px;
}

.modal-invoice .travel-table-row input,
.inline-workspace-invoice .travel-table-row input {
  width: 100%;
  min-width: 0;
  height: 40px;
  font-size: 13px;
}

.modal-invoice .saudi-visa-section,
.inline-workspace-invoice .saudi-visa-section {
  overflow: hidden;
  margin-top: 14px;
  border-color: #d8e3ef;
  border-radius: 9px;
}

.modal-invoice .saudi-visa-section .template-subsection-title,
.inline-workspace-invoice .saudi-visa-section .template-subsection-title {
  padding: 10px 12px;
  background: #fff;
  color: #173654;
  font-size: 14px;
  text-transform: none;
}

.modal-invoice .saudi-visa-section .template-flat-grid,
.inline-workspace-invoice .saudi-visa-section .template-flat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #e3eaf3;
  background: #fbfdff;
}

.modal-invoice .saudi-visa-section .template-flat-grid > *,
.inline-workspace-invoice .saudi-visa-section .template-flat-grid > * {
  grid-column: auto !important;
}

.modal-invoice .invoice-items-table,
.inline-workspace-invoice .invoice-items-table {
  overflow: hidden;
  border-color: #d8e3ef;
  border-radius: 9px;
}

.modal-invoice .invoice-items-row,
.inline-workspace-invoice .invoice-items-row,
.modal-invoice .invoice-item-row,
.inline-workspace-invoice .invoice-item-row {
  grid-template-columns: minmax(130px, 1.05fr) minmax(180px, 1.75fr) minmax(110px, 0.8fr) 66px minmax(94px, 0.75fr) minmax(94px, 0.75fr) 78px !important;
  min-width: 0 !important;
  gap: 7px;
  padding: 9px 10px;
}

.modal-invoice .invoice-items-header,
.inline-workspace-invoice .invoice-items-header {
  background: #f3f7fc;
  color: #526b88;
  font-size: 11px;
}

.modal-invoice .invoice-bottom-row,
.inline-workspace-invoice .invoice-bottom-row {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 16px;
}

.modal-invoice .invoice-bottom-row .memo-box textarea,
.inline-workspace-invoice .invoice-bottom-row .memo-box textarea {
  min-height: 230px;
  resize: vertical;
}

.modal-invoice .invoice-totals-card,
.inline-workspace-invoice .invoice-totals-card {
  max-width: none;
  border-color: #d8e3ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.modal-invoice .invoice-actions,
.inline-workspace-invoice .invoice-actions {
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid #d8e3ef;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -8px 22px rgba(15, 42, 76, 0.06);
}

@media (max-width: 1180px) {
  .modal-invoice .invoice-top-panels,
  .inline-workspace-invoice .invoice-top-panels {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-invoice .flight-header,
  .inline-workspace-invoice .flight-header {
    display: none;
  }

  .modal-invoice .air-ticket-block .flight-row,
  .inline-workspace-invoice .air-ticket-block .flight-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 78px !important;
  }

  .modal-invoice .air-ticket-block .flight-row .inline-row-actions,
  .inline-workspace-invoice .air-ticket-block .flight-row .inline-row-actions {
    grid-column: 4;
    grid-row: 1 / span 2;
  }

  .modal-invoice .air-ticket-block .flight-row label > span,
  .inline-workspace-invoice .air-ticket-block .flight-row label > span {
    display: block;
  }
}

@media (max-width: 820px) {
  .modal-invoice .invoice-top-panels .invoice-customer-reference-row,
  .inline-workspace-invoice .invoice-top-panels .invoice-customer-reference-row,
  .modal-invoice .invoice-top-panels .invoice-info-grid,
  .inline-workspace-invoice .invoice-top-panels .invoice-info-grid,
  .modal-invoice .saudi-visa-section .template-flat-grid,
  .inline-workspace-invoice .saudi-visa-section .template-flat-grid,
  .modal-invoice .invoice-bottom-row,
  .inline-workspace-invoice .invoice-bottom-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-invoice .invoice-finance-row,
  .inline-workspace-invoice .invoice-finance-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-invoice :is(.passenger-header, .ticket-header),
  .inline-workspace-invoice :is(.passenger-header, .ticket-header) {
    display: none;
  }

  .modal-invoice :is(.passenger-row, .ticket-row),
  .inline-workspace-invoice :is(.passenger-row, .ticket-row),
  .modal-invoice .air-ticket-block .flight-row,
  .inline-workspace-invoice .air-ticket-block .flight-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .modal-invoice .travel-table-row label > span,
  .inline-workspace-invoice .travel-table-row label > span,
  .modal-invoice .invoice-items-row label > span,
  .inline-workspace-invoice .invoice-items-row label > span {
    display: block;
  }

  .modal-invoice .air-ticket-block .flight-row .inline-row-actions,
  .inline-workspace-invoice .air-ticket-block .flight-row .inline-row-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .modal-invoice .invoice-items-table,
  .inline-workspace-invoice .invoice-items-table {
    overflow-x: auto;
  }

  .modal-invoice .invoice-items-row,
  .inline-workspace-invoice .invoice-items-row,
  .modal-invoice .invoice-item-row,
  .inline-workspace-invoice .invoice-item-row {
    grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.35fr) minmax(120px, 0.8fr) 72px 100px 100px 78px !important;
    min-width: 900px !important;
  }
}

/* Approval Workspace action-row refinement. */
.approval-workspace .approval-summary-ribbon{grid-template-columns:repeat(4,minmax(135px,1fr))}
.approval-workspace .approval-tabs-row{display:flex;align-items:flex-end;gap:18px;min-width:0}
.approval-workspace .approval-tabs-row .approval-tabs{flex:1 1 auto;min-width:0}
.approval-workspace .approval-tabs-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px;padding-bottom:7px;white-space:nowrap}
.approval-workspace .approval-tabs-actions .btn{min-height:38px;margin:0}
.approval-workspace .approval-filter-toggle{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
@media(max-width:1050px){
  .approval-workspace .approval-tabs-row{align-items:stretch;flex-direction:column;gap:8px}
  .approval-workspace .approval-tabs-actions{align-self:flex-end;padding-bottom:7px}
}
@media(max-width:620px){
  .approval-workspace .approval-tabs-actions{width:100%;align-self:stretch;overflow-x:auto}
  .approval-workspace .approval-tabs-actions .btn{flex:0 0 auto}
}

/* Approval Workspace final authority — intentionally last in the cascade. */
.approval-workspace .approval-summary-ribbon{
  display:grid;
  grid-template-columns:repeat(4,minmax(135px,1fr)) auto;
  align-items:stretch;
  min-height:82px;
  padding:0;
  overflow:hidden;
}
.approval-workspace .approval-summary-metric{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 16px;
  border-right:1px solid var(--border);
}
.approval-workspace .approval-summary-metric>span{
  width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;
  border-radius:50%;color:#fff;background:#155eef;
}
.approval-workspace .approval-summary-metric.success>span{background:#16a34a}
.approval-workspace .approval-summary-metric.warning>span{background:#f97316}
.approval-workspace .approval-summary-metric.danger>span{background:#ef233c}
.approval-workspace .approval-summary-metric>span svg{width:19px;height:19px}
.approval-workspace .approval-summary-metric>div{min-width:0;display:grid;gap:2px}
.approval-workspace .approval-summary-metric small{font-size:11px;font-weight:700;color:#334155}
.approval-workspace .approval-summary-metric strong{font-size:19px;line-height:1.1;white-space:nowrap}
.approval-workspace .approval-summary-metric em{font-size:10px;font-style:normal;color:var(--muted)}
.approval-workspace .approval-summary-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 14px;white-space:nowrap;
}
.approval-workspace .approval-tabs-row{
  display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--border);
}
.approval-workspace .approval-tabs-row .approval-tabs{border-bottom:0}
.approval-workspace .approval-tabs-row .btn{margin-bottom:7px}
.approval-workspace .approval-filter-panel[hidden]{display:none!important}
.approval-workspace .approval-master-detail{
  display:grid;grid-template-columns:minmax(260px,26fr) minmax(0,74fr);gap:12px;align-items:stretch;
}
.approval-workspace .approval-queue-card,
.approval-workspace .approval-detail-card{min-width:0;max-height:none;border-radius:10px}
.approval-workspace .approval-queue-table{overflow:visible}
.approval-workspace .approval-master-head{padding:12px 14px}
.approval-workspace .approval-queue-row{
  display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;min-height:44px;padding:6px 12px;
}
.approval-workspace .approval-queue-row .approval-queue-name{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.approval-workspace .approval-queue-row .approval-queue-count{display:grid;text-align:right}
.approval-workspace .approval-queue-row .approval-queue-count small{font-size:8px;color:#64748b}
.approval-workspace .approval-queue-row .approval-queue-amount,
.approval-workspace .approval-queue-row .approval-queue-waiting,
.approval-workspace .approval-type-search{display:none!important}
.approval-workspace .approval-queue-footer{
  display:flex;justify-content:space-between;margin-top:auto;padding:12px 14px;border-top:1px solid var(--border);background:#fff;
}
.approval-workspace .approval-detail-summary{min-height:34px;padding:6px 14px}
.approval-workspace .approval-detail-scroll{overflow-x:auto}
.approval-workspace .approval-detail-table{width:100%;min-width:790px;table-layout:fixed}
.approval-workspace .approval-detail-table th,
.approval-workspace .approval-detail-table td{height:44px;padding:6px 8px;vertical-align:middle}
.approval-workspace .approval-detail-table th{font-size:9px}
.approval-workspace .approval-detail-table td{font-size:11px}
.approval-workspace .approval-detail-pagination{
  min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--border);
}
.approval-workspace .approval-detail-pagination>div{display:flex;align-items:center;gap:7px}
.approval-workspace .approval-detail-pagination .btn,
.approval-workspace .approval-detail-pagination .icon-btn{min-width:34px;min-height:34px;padding:6px 9px}
@media(max-width:1450px){
  .approval-workspace .approval-summary-ribbon{grid-template-columns:repeat(4,minmax(130px,1fr))}
  .approval-workspace .approval-summary-actions{grid-column:1/-1;border-top:1px solid var(--border)}
}
@media(max-width:1180px){
  .approval-workspace .approval-summary-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}
  .approval-workspace .approval-master-detail{grid-template-columns:1fr}
}
@media(max-width:720px){
  .approval-workspace .approval-summary-ribbon{grid-template-columns:1fr}
  .approval-workspace .approval-summary-metric{border-right:0;border-bottom:1px solid var(--border)}
  .approval-workspace .approval-summary-actions{flex-wrap:wrap;justify-content:stretch}
  .approval-workspace .approval-summary-actions .btn{flex:1}
  .approval-workspace .approval-tabs-row{align-items:flex-end}
  .approval-workspace .approval-tabs-row .approval-tabs{overflow-x:auto}
  .approval-workspace .approval-detail-pagination{align-items:flex-start;flex-direction:column}
}

/* Approval Workspace final operational refinement. */
.approval-summary-ribbon{
  display:grid;
  grid-template-columns:repeat(4,minmax(150px,1fr)) auto;
  align-items:stretch;
  min-height:82px;
  padding:0;
  overflow:hidden;
}
.approval-ribbon-metric{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 18px;
  border-right:1px solid var(--border);
}
.approval-ribbon-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:#155eef;
}
.approval-ribbon-icon.green{background:#16a34a}
.approval-ribbon-icon.orange{background:#f97316}
.approval-ribbon-icon.red{background:#ef233c}
.approval-ribbon-icon svg{width:19px;height:19px}
.approval-ribbon-copy{min-width:0;display:grid;gap:2px}
.approval-ribbon-copy small{font-size:11px;font-weight:700;color:var(--muted)}
.approval-ribbon-copy strong{font-size:20px;line-height:1.1;white-space:nowrap}
.approval-ribbon-copy span{font-size:10px;color:var(--muted)}
.approval-ribbon-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding:12px 14px;
  white-space:nowrap;
}
.approval-ribbon-actions .btn{min-height:38px}
.approval-tabs-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-bottom:1px solid var(--border);
}
.approval-tabs-row .approval-tabs{border-bottom:0}
.approval-tabs-row .btn{margin-bottom:7px}
.approval-filter-panel[hidden]{display:none!important}
.approval-master-detail{
  display:grid;
  grid-template-columns:minmax(260px,26fr) minmax(0,74fr);
  gap:12px;
  align-items:stretch;
}
.approval-queue-card,
.approval-detail-card{min-width:0;border-radius:10px}
.approval-queue-card{max-height:none}
.approval-queue-table{overflow:visible}
.approval-queue-toolbar{padding:12px 14px}
.approval-queue-title{font-size:16px}
.approval-queue-row{
  grid-template-columns:minmax(0,1fr) 44px 12px;
  min-height:44px;
  padding:6px 12px;
}
.approval-queue-row .approval-queue-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.approval-queue-row>span:not(.approval-queue-name):not(.approval-queue-chevron){display:block;text-align:right}
.approval-queue-row .approval-queue-amount,
.approval-queue-row .approval-queue-waiting{display:none!important}
.approval-queue-total{
  position:static;
  grid-template-columns:1fr auto;
  padding:12px 14px;
}
.approval-queue-total>*:not(:first-child):not(:nth-child(2)){display:none}
.approval-detail-head{padding:12px 14px 8px}
.approval-detail-title-row{align-items:center}
.approval-detail-title-row h2{font-size:17px}
.approval-detail-summary{min-height:34px;padding:6px 14px}
.approval-detail-table-wrap{overflow-x:auto}
.approval-detail-table{
  width:100%;
  min-width:790px;
  table-layout:fixed;
}
.approval-detail-table th,.approval-detail-table td{
  height:44px;
  padding:6px 8px;
  vertical-align:middle;
}
.approval-detail-table th{font-size:9px}
.approval-detail-table td{font-size:11px}
.approval-detail-table th:nth-child(1),.approval-detail-table td:nth-child(1){width:34px}
.approval-detail-table th:nth-child(2),.approval-detail-table td:nth-child(2){width:15%}
.approval-detail-table th:nth-child(3),.approval-detail-table td:nth-child(3){width:20%}
.approval-detail-table th:nth-child(4),.approval-detail-table td:nth-child(4){width:14%}
.approval-detail-table th:nth-child(5),.approval-detail-table td:nth-child(5){width:14%}
.approval-detail-table th:nth-child(6),.approval-detail-table td:nth-child(6){width:14%}
.approval-detail-table th:nth-child(7),.approval-detail-table td:nth-child(7){width:10%}
.approval-detail-table th:nth-child(8),.approval-detail-table td:nth-child(8){width:12%}
.approval-detail-table th:nth-child(9),.approval-detail-table td:nth-child(9){width:48px;text-align:center}
.approval-detail-footer{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 14px;
  border-top:1px solid var(--border);
}
.approval-pagination{display:flex;align-items:center;gap:7px}
.approval-pagination .btn{min-width:34px;min-height:34px;padding:6px 9px}
.approval-pagination select{min-height:34px}
@media(max-width:1450px){
  .approval-summary-ribbon{grid-template-columns:repeat(4,minmax(130px,1fr))}
  .approval-ribbon-actions{grid-column:1/-1;border-top:1px solid var(--border)}
}
@media(max-width:1180px){
  .approval-summary-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}
  .approval-master-detail{grid-template-columns:1fr}
  .approval-queue-card{max-height:none}
}
@media(max-width:720px){
  .approval-summary-ribbon{grid-template-columns:1fr}
  .approval-ribbon-metric{border-right:0;border-bottom:1px solid var(--border)}
  .approval-ribbon-actions{flex-wrap:wrap;justify-content:stretch}
  .approval-ribbon-actions .btn{flex:1}
  .approval-tabs-row{align-items:flex-end}
  .approval-tabs-row .approval-tabs{overflow-x:auto}
  .approval-detail-footer{align-items:flex-start;flex-direction:column}
}

/* Final cascade: keep the hydrated Approval header in its compact approved position. */
.content:has(.approval-workspace) .page{padding-top:12px}
.approval-workspace-main{gap:12px}
.approval-workspace-head{min-height:58px;align-items:center;gap:20px;margin:0;padding:0 2px 8px;border-bottom:1px solid #e4eaf2}
.approval-workspace-head>div:first-child{display:grid;align-self:center;gap:3px}
.approval-workspace-head h1{margin:0;font-size:21px;line-height:1.15;font-weight:700}
.approval-workspace-head p{margin:0;font-size:12px;line-height:1.25}
.approval-workspace-tools{flex:1 1 auto;align-self:center;max-width:760px;margin:0}
.approval-header-controls{min-height:46px;align-items:center}
.approval-header-context{height:46px;min-height:46px;padding:5px 10px}
.approval-header-user{min-height:46px}
.approval-executive-grid{margin-top:0}
@media(max-width:1100px){.approval-workspace-head{height:auto;align-items:flex-start;flex-direction:column;gap:10px}.approval-workspace-tools{width:100%;max-width:none}.approval-header-controls{justify-content:flex-start;flex-wrap:wrap}.approval-header-context{flex:1;min-width:190px}.approval-header-user{margin-left:auto}}
@media(max-width:680px){.content:has(.approval-workspace) .page{padding-top:10px}.approval-header-context{width:100%;flex-basis:100%}.approval-header-user{margin-left:0}}

/* Approval Workspace: compact, single-row owner-approved header. */
.content:has(.approval-workspace) .page {
  padding-top: 12px;
}

.approval-workspace-main {
  gap: 12px;
}

.approval-workspace-head {
  min-height: 58px;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0 2px 8px;
  border-bottom: 1px solid #e4eaf2;
}

.approval-workspace-head > div:first-child {
  display: grid;
  align-self: center;
  gap: 3px;
}

.approval-workspace-head h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 700;
}

.approval-workspace-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
}

.approval-workspace-tools {
  flex: 1 1 auto;
  align-self: center;
  max-width: 760px;
  margin: 0;
}

.approval-header-controls {
  min-height: 46px;
  align-items: center;
}

.approval-header-context {
  height: 46px;
  min-height: 46px;
  padding: 5px 10px;
}

.approval-header-user {
  min-height: 46px;
}

.approval-executive-grid {
  margin-top: 0;
}

@media(max-width:1100px) {
  .approval-workspace-head {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .approval-workspace-tools {
    width: 100%;
    max-width: none;
  }
  .approval-header-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .approval-header-context {
    flex: 1;
    min-width: 190px;
  }
  .approval-header-user {
    margin-left: auto;
  }
}

@media(max-width:680px) {
  .content:has(.approval-workspace) .page {
    padding-top: 10px;
  }
  .approval-header-context {
    width: 100%;
    flex-basis: 100%;
  }
  .approval-header-user {
    margin-left: 0;
  }
}
.approval-workspace-tools .tenant-mode,.approval-workspace-tools .hint{display:none}.approval-workspace-kpi>span{display:grid!important;place-items:center;color:#fff!important;background:linear-gradient(135deg,#2563eb,#0ea5e9)!important}.approval-workspace-kpi.success>span{background:linear-gradient(135deg,#079447,#22c55e)!important}.approval-workspace-kpi.warning>span{background:linear-gradient(135deg,#f59e0b,#f97316)!important}.approval-workspace-kpi.danger>span{background:linear-gradient(135deg,#dc2626,#fb7185)!important}.approval-workspace-kpi>span svg{display:block!important;width:20px!important;height:20px!important;color:#fff!important}
.approval-workspace-head{min-height:66px;gap:24px;border-bottom:1px solid #e4eaf2;padding:0 2px 12px}.approval-workspace-tools{flex:1;max-width:760px}.approval-header-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;width:100%}.approval-header-context{min-width:210px;min-height:52px;padding:7px 11px;display:flex;align-items:center;gap:10px;border:1px solid #dce5f0;border-radius:9px;background:#fff;box-shadow:0 3px 12px rgba(15,35,70,.045)}.approval-header-context>svg{width:25px;height:25px;flex:0 0 25px;color:#2563eb}.approval-header-context>span{display:grid;gap:2px;min-width:0;flex:1}.approval-header-context small,.approval-header-user small{font-size:10px;line-height:1.1;color:#64748b}.approval-header-context strong{font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.approval-header-context select{width:100%;min-width:0;height:22px;padding:0 21px 0 0;border:0;background-color:transparent;font:700 11px/1.2 inherit;color:#10213b;outline:0}.approval-header-user{min-width:150px;display:flex;align-items:center;gap:9px;padding-left:6px}.approval-header-user>span{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:50%;background:#079447;color:#fff;font-size:13px;font-weight:800}.approval-header-user>div{display:grid;gap:3px;min-width:0}.approval-header-user strong{font-size:11px;line-height:1.15;white-space:nowrap}.approval-header-user small{display:block}.approval-workspace-head>div:first-child{flex:0 0 auto}.approval-workspace-head h1{white-space:nowrap}
@media(max-width:1100px){.approval-workspace-head{align-items:flex-start;flex-direction:column}.approval-workspace-tools{width:100%;max-width:none}.approval-header-controls{justify-content:flex-start;flex-wrap:wrap}.approval-header-context{flex:1;min-width:190px}.approval-header-user{margin-left:auto}}
@media(max-width:680px){.approval-header-context{width:100%;flex-basis:100%}.approval-header-user{margin-left:0}.approval-workspace-head{gap:12px}}

.new-account-grid label>span em{display:inline-flex;align-items:center;gap:5px}
.new-account-grid label>span em input[type="checkbox"]{appearance:auto!important;width:15px!important;height:15px!important;min-height:0!important;margin:0!important;accent-color:#2563eb}

/* Approved Purchases Workspace V1 */
.purchases-workspace{display:grid;gap:12px;min-width:0;color:#10213b}.purchase-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:4px 12px}.purchase-head h1{margin:0;font-size:25px;line-height:1.15}.purchase-head p{margin:4px 0 9px;color:#30496c;font-size:13px}.purchase-head .tenant-context>.hint{display:none}.purchase-tools{display:flex;align-items:center;gap:10px;min-width:430px}.purchase-tools .sales-search{flex:1}.purchase-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.purchase-kpi,.purchase-action,.purchase-link,.purchase-top,.purchase-table button,.purchase-summary-item{font:inherit;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease}.purchase-kpi{--purchase-tone:#2563eb;--purchase-soft:#eef4ff;min-height:112px;border:1px solid #e1e8f2;border-radius:10px;background:#fff;padding:14px;display:flex;align-items:flex-start;gap:10px;text-align:left;box-shadow:0 3px 12px rgba(15,35,70,.055)}.purchase-kpi>svg,.purchase-action>svg,.purchase-summary-item>svg{flex:0 0 auto;padding:8px;border-radius:9px;background:var(--purchase-soft);color:var(--purchase-tone)}.purchase-kpi>svg{width:38px;height:38px}.purchase-kpi span{display:grid;gap:6px;min-width:0}.purchase-kpi small,.purchase-kpi em{font-size:11px;line-height:1.25;font-style:normal;color:#526985}.purchase-kpi strong{font-size:19px;line-height:1.1;color:#10213b;white-space:nowrap}.purchase-kpi.purple,.purchase-action.purple,.purchase-summary-item.purple{--purchase-tone:#6d28d9;--purchase-soft:#f2ecff}.purchase-kpi.green,.purchase-action.green,.purchase-summary-item.green{--purchase-tone:#079447;--purchase-soft:#eaf8ef}.purchase-kpi.orange,.purchase-action.orange,.purchase-summary-item.orange{--purchase-tone:#f97316;--purchase-soft:#fff1e8}.purchase-kpi.red,.purchase-action.red,.purchase-summary-item.red{--purchase-tone:#ef2d38;--purchase-soft:#ffedef}.purchase-kpi.teal,.purchase-action.teal,.purchase-summary-item.teal{--purchase-tone:#0f9f9a;--purchase-soft:#e9f8f7}.purchase-panel,.purchase-op,.purchase-card,.purchase-summary{border:1px solid #e1e8f2;border-radius:10px;background:#fff;box-shadow:0 3px 14px rgba(15,35,70,.05)}.purchase-panel>h2,.purchase-op>h2,.purchase-card>h2{margin:0;padding:12px 14px;font-size:15px;line-height:1.25}.purchase-actions{padding:10px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.purchase-action{--purchase-tone:#2563eb;--purchase-soft:#eef4ff;min-height:64px;border:1px solid #dce5f0;border-radius:9px;background:#fff;padding:8px 10px;display:flex;align-items:center;gap:9px;text-align:left}.purchase-action>svg{width:34px;height:34px}.purchase-action span,.purchase-link span{display:grid;gap:2px;min-width:0}.purchase-action strong{font-size:13px;line-height:1.2}.purchase-action small,.purchase-link small{color:#64748b;font-size:11px;line-height:1.25}.purchase-action b{margin-left:auto;color:#2b5794;font-size:21px}.purchase-ops{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.purchase-op{padding:8px;display:flex;flex-direction:column;min-width:0}.purchase-op:nth-child(1){--op-tone:#6d28d9;--op-soft:#f2ecff}.purchase-op:nth-child(2){--op-tone:#2563eb;--op-soft:#eef4ff}.purchase-op:nth-child(3){--op-tone:#079447;--op-soft:#eaf8ef}.purchase-op:nth-child(4){--op-tone:#f97316;--op-soft:#fff1e8}.purchase-link{width:100%;min-height:48px;border:0;border-radius:8px;background:transparent;display:flex;align-items:center;gap:9px;text-align:left;padding:7px}.purchase-link>svg{width:27px;height:27px;padding:6px;border-radius:7px;color:var(--op-tone);background:var(--op-soft)}.purchase-link strong{font-size:12px}.purchase-reports-all{margin:auto 7px 2px;min-height:36px;text-align:left}.purchase-intel{display:grid;grid-template-columns:minmax(0,31fr) minmax(0,39fr) minmax(0,30fr);gap:12px;align-items:stretch}.purchase-card{min-width:0;overflow:hidden;display:flex;flex-direction:column}.purchase-card>h2{border-bottom:1px solid #edf1f6}.purchase-overview-total{margin:0 14px;padding:13px 0 12px;border-bottom:1px solid #edf1f6;display:grid;gap:3px}.purchase-overview-total small,.purchase-overview-grid small{font-size:10px;color:#526985}.purchase-overview-total strong{font-size:22px}.purchase-overview-total span{font-size:10px;color:#64748b}.purchase-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0 14px}.purchase-overview-grid>div{padding:11px 8px 10px 0;display:grid;gap:4px;border-bottom:1px solid #edf1f6}.purchase-overview-grid>div:nth-child(odd){border-right:1px solid #edf1f6}.purchase-overview-grid>div:nth-child(even){padding-left:10px}.purchase-overview-grid strong{font-size:13px;line-height:1.25;overflow-wrap:anywhere}.purchase-overview>p,.purchase-no-data{margin:auto 14px 13px;padding-top:10px;color:#64748b;font-size:10px}.purchase-table{overflow-x:auto;overscroll-behavior-inline:contain}.purchase-table-head,.purchase-table button{width:100%;min-width:590px;display:grid;grid-template-columns:72px 88px minmax(100px,1fr) 84px 76px 78px;gap:6px;text-align:left;font-size:10px}.purchase-table-head{padding:8px;background:#f7f9fc;color:#526985;font-size:9px;font-weight:700;text-transform:uppercase}.purchase-table button{border:0;border-top:1px solid #edf1f6;background:#fff;padding:8px}.purchase-table button .status{font-size:9px;padding:2px 5px}.purchase-top-head{padding:8px 14px;background:#f7f9fc;color:#526985;font-size:9px;font-weight:700;text-transform:uppercase;display:flex;justify-content:space-between}.purchase-top{width:100%;min-height:39px;border:0;border-top:1px solid #edf1f6;background:#fff;padding:9px 14px;display:flex;justify-content:space-between;gap:10px;text-align:left;font-size:11px}.purchase-card-footer{margin-top:auto;align-self:flex-start;padding:9px 14px;min-height:38px}.purchase-summary{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));padding:10px;gap:6px}.purchase-summary-item{--purchase-tone:#2563eb;--purchase-soft:#eef4ff;min-height:58px;border:0;border-radius:8px;background:#fff;padding:5px 4px;display:flex;align-items:center;gap:7px;text-align:left;min-width:0}.purchase-summary-item>svg{width:31px;height:31px;padding:7px}.purchase-summary-item span{display:grid;gap:2px;min-width:0}.purchase-summary-item small,.purchase-summary-item em{font-size:9px;line-height:1.2;font-style:normal;color:#64748b}.purchase-summary-item strong{font-size:15px;line-height:1.15;color:#10213b;overflow-wrap:anywhere}.purchase-kpi:hover,.purchase-action:hover,.purchase-link:hover,.purchase-top:hover,.purchase-table button:hover,.purchase-summary-item:hover{border-color:#afc6e8;background:#f8fbff;box-shadow:0 6px 17px rgba(30,75,145,.09);transform:translateY(-1px)}.purchases-workspace button:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.purchase-loading-grid{display:grid;gap:10px}.purchase-loading-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.purchase-loading-actions{grid-template-columns:repeat(6,minmax(0,1fr));padding:10px}.purchase-loading-operations{grid-template-columns:repeat(4,minmax(0,1fr))}.purchase-loading-intelligence{grid-template-columns:minmax(0,31fr) minmax(0,39fr) minmax(0,30fr)}.purchase-loading-summary{grid-template-columns:repeat(8,minmax(0,1fr));padding:10px;border:1px solid #e1e8f2;border-radius:10px;background:#fff}.purchase-loading-panel{border:1px solid #e1e8f2;border-radius:10px;background:#fff;padding-top:10px}.purchase-loading-panel>span{display:block;width:190px;height:16px;margin:0 14px 4px}.purchase-loading-kpis>span{height:112px}.purchase-loading-actions>span{height:64px}.purchase-loading-operations>span{height:238px}.purchase-loading-intelligence>span{height:245px}.purchase-loading-summary>span{height:58px}.purchase-loading-grid>span,.purchase-loading-panel>span{position:relative;overflow:hidden;border-radius:9px;background:#e9eef5}.purchase-loading-grid>span::after,.purchase-loading-panel>span::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,#fff9,transparent);animation:pluserp-dashboard-shimmer 1.25s infinite}.purchase-context-message{margin:0;text-align:center;color:#526985;font-size:12px}.purchase-context-error-panel{min-height:260px;display:grid;place-items:center}.tenant-pill.tenant-loading{color:#526985;background:#f1f5f9;border-color:#dce5f0}
@media(max-width:1280px){.purchase-kpis,.purchase-loading-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.purchase-actions,.purchase-loading-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.purchase-ops,.purchase-loading-operations{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-intel,.purchase-loading-intelligence{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-intel>.purchase-card:last-child{grid-column:1/-1}.purchase-summary,.purchase-loading-summary{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1024px){.purchase-head{flex-direction:column}.purchase-tools{width:100%;min-width:0}.purchase-intel,.purchase-loading-intelligence{grid-template-columns:1fr}.purchase-intel>.purchase-card:last-child{grid-column:auto}.purchase-kpis,.purchase-loading-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-actions,.purchase-loading-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.purchase-head,.purchase-tools{flex-direction:column;align-items:stretch}.purchase-tools .pluserp-date-pill{width:100%}.purchase-ops,.purchase-intel,.purchase-loading-operations,.purchase-loading-intelligence{grid-template-columns:1fr}.purchase-actions,.purchase-summary,.purchase-loading-actions,.purchase-loading-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-kpis,.purchase-loading-kpis{grid-template-columns:1fr}.purchases-workspace{overflow-x:hidden}.purchase-kpi{min-height:88px}.purchase-summary-item{min-height:64px}.purchase-action,.purchase-link,.purchase-top,.purchase-table button,.purchase-summary-item{min-height:44px}}

/* Owner-approved Approval Workspace refinement */
.approval-workspace-main{gap:10px}
.approval-workspace-head{align-items:center;padding:0 2px}
.approval-workspace-head h1{font-size:21px;line-height:1.15;letter-spacing:-.01em}
.approval-workspace-head p{margin:4px 0 0;font-size:12px}
.approval-workspace-tools{flex:0 1 560px}
.approval-workspace-tools .tenant-context{width:100%;justify-content:flex-end;flex-wrap:nowrap}
.approval-workspace-tools .tenant-pill,.approval-workspace-tools .tenant-switcher{min-height:46px;border-radius:8px;background:#fff;box-shadow:0 3px 12px rgba(15,35,70,.05)}
.approval-workspace-tools .tenant-pill{min-width:210px}.approval-workspace-tools .tenant-switcher{min-width:220px}
.approval-executive-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.approval-workspace-kpi{min-height:96px;padding:12px;align-items:flex-start;border-radius:9px}
.approval-workspace-kpi>span{width:40px;height:40px;flex-basis:40px;border-radius:9px}
.approval-workspace-kpi>span svg{width:20px;height:20px}
.approval-workspace-kpi small{font-size:12px;color:#243855}.approval-workspace-kpi strong{font-size:20px}.approval-workspace-kpi em{font-size:10px}
.approval-workspace .approval-tabs{gap:32px;align-items:flex-end}
.approval-workspace .approval-tab{min-width:0;padding:0 16px 10px;font-size:12px;font-weight:700}
.approval-workspace .approval-filter-panel{padding:10px 12px}
.approval-filter-bar{grid-template-columns:minmax(150px,1.15fr) repeat(4,minmax(140px,1fr)) auto;gap:10px}
.approval-master-detail{grid-template-columns:minmax(330px,30fr) minmax(0,70fr);gap:10px}
.approval-queue-card,.approval-detail-card{border-radius:9px}
.approval-queue-card{display:flex;flex-direction:column;max-height:470px}
.approval-master-head{min-height:46px;padding:9px 12px}
.approval-type-search{height:30px;max-width:178px;display:flex;align-items:center;gap:6px;padding:0 8px;border:1px solid #dbe3ef;border-radius:7px;background:#fff}
.approval-type-search svg{width:13px;height:13px;color:#64748b}.approval-type-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:10px}
.approval-queue-table{overflow-y:auto;overscroll-behavior:contain}
.approval-queue-header{display:none}
.approval-queue-row,.approval-queue-total{grid-template-columns:minmax(145px,1.65fr) 48px minmax(78px,.8fr) 62px 12px}
.approval-queue-row{min-height:39px;padding:4px 10px}.approval-queue-row>span{min-width:0}.approval-queue-row>span:not(.approval-queue-name){display:grid;gap:1px}.approval-queue-row small{font-size:8px;color:#64748b;font-weight:500}.approval-queue-row .waiting{color:#f97316}.approval-queue-row .today{color:#16934a}
.approval-queue-total{position:sticky;bottom:0;background:#fff;border-top:1px solid #dfe7f1}
.approval-detail-summary{min-height:38px;display:flex;align-items:center;gap:18px;padding:7px 12px;border-bottom:1px solid #e6edf5;color:#334155;font-size:11px}.approval-detail-summary span+span{padding-left:18px;border-left:1px solid #cbd5e1}.approval-detail-summary .priority{color:#dc2626}
.approval-detail-table{min-width:760px;table-layout:auto}.approval-detail-table th,.approval-detail-table td{height:38px;padding:6px 7px}.approval-detail-table th:first-child,.approval-detail-table td:first-child{width:30px}.approval-detail-table .approval-actions .btn:not(:first-child){display:none}.approval-detail-table .approval-actions .btn:first-child{border:0;background:transparent;color:#155eef;padding:3px}
.approval-waiting{font-weight:700}.approval-waiting.success{color:#16934a}.approval-waiting.warning{color:#f97316}.approval-waiting.danger{color:#dc2626}
.approval-priority{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:700}.approval-priority.high{color:#dc2626;background:#fee2e2}.approval-priority.low{color:#15803d;background:#dcfce7}
@media(max-width:1280px){.approval-executive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.approval-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.approval-filter-actions{grid-column:span 3}.approval-master-detail{grid-template-columns:1fr}}
@media(max-width:900px){.approval-workspace-head{align-items:flex-start;flex-direction:column}.approval-workspace-tools{width:100%;flex:none}.approval-workspace-tools .tenant-context{justify-content:flex-start}.approval-executive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.approval-workspace-tools .tenant-context{display:grid;grid-template-columns:1fr}.approval-workspace-tools .tenant-pill,.approval-workspace-tools .tenant-switcher{min-width:0}.approval-filter-bar,.approval-executive-grid{grid-template-columns:1fr}.approval-filter-actions{grid-column:auto}.approval-workspace .approval-tabs{gap:10px;overflow-x:auto}.approval-detail-summary{align-items:flex-start;flex-direction:column;gap:4px}.approval-detail-summary span+span{padding-left:0;border-left:0}}

/* Owner-approved Masters Workspace */
.masters-workspace{--masters-border:#dfe7f1;--masters-text:#0b1833;--masters-muted:#526785;display:grid;gap:14px;padding:18px 20px 10px;min-width:0;color:var(--masters-text);background:#f6f8fb}
.masters-workspace button{font:inherit}
.masters-workspace-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.masters-heading{flex:1 1 280px}
.masters-heading h1{margin:0;font-size:24px;line-height:1.15;letter-spacing:-.02em}.masters-heading p{margin:6px 0 0;color:#344b6d;font-size:12px}
.masters-header-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:0 1 690px}
.masters-header-tools .tenant-context{display:flex;gap:8px;min-width:0}.masters-header-tools .tenant-pill,.masters-header-tools .tenant-switcher{min-height:42px;min-width:0;max-width:190px;display:flex;align-items:center;border:1px solid var(--masters-border);border-radius:8px;background:#fff;padding:0 12px;box-shadow:0 3px 12px #17355b0a;font-size:11px;font-weight:700;color:#243a5b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.masters-header-tools .tenant-mode,.masters-header-tools .hint{display:none}.masters-header-tools .tenant-switcher{gap:7px}.masters-header-tools .tenant-switcher select{border:0;background:transparent;font-weight:700;color:inherit;outline:0;max-width:190px}
.masters-search{height:42px;width:200px;display:flex;align-items:center;gap:9px;padding:0 11px;border:1px solid var(--masters-border);border-radius:8px;background:#fff;box-shadow:0 3px 12px #17355b0a;color:#7185a2}.masters-search .nav-icon{flex:0 0 auto}.masters-search input{min-width:0;width:100%;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;outline:0;color:#172b4d}.masters-search input::placeholder{color:#8a9bb3}
.masters-refresh{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--masters-border);border-radius:8px;background:#fff;color:#315279;box-shadow:0 3px 12px #17355b0a}
.masters-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.masters-kpi,.masters-action,.masters-master-tile{position:relative;border:1px solid var(--masters-border);background:#fff;color:inherit;cursor:pointer;text-align:left;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.masters-kpi{min-height:96px;display:flex;align-items:center;gap:11px;padding:12px;border-radius:9px;box-shadow:0 5px 16px #17355b0c}.masters-kpi>span:last-child{display:grid;gap:3px;min-width:0}.masters-kpi small{font-size:11px;color:var(--masters-muted);white-space:nowrap}.masters-kpi strong{font-size:22px;line-height:1}.masters-kpi em{font-size:10px;color:#405878;font-style:normal}
.masters-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px;border-radius:9px}.masters-icon .nav-icon{width:22px;height:22px}.masters-tone-purple{color:#873de0;background:#f3eafa}.masters-tone-blue{color:#1463e9;background:#eaf1ff}.masters-tone-teal{color:#149ca5;background:#e5f6f6}.masters-tone-orange{color:#ef7119;background:#fff0e5}.masters-tone-green{color:#43a83b;background:#edf8e9}.masters-tone-red{color:#e83b42;background:#fdebec}
.masters-quick-section,.masters-group,.masters-error-panel,.masters-loading-panel{border:1px solid var(--masters-border);border-radius:9px;background:#fff;box-shadow:0 5px 16px #17355b0a}.masters-quick-section{padding:11px}.masters-quick-section h2,.masters-group h2{margin:0 0 10px;font-size:14px}.masters-action-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.masters-action{min-height:62px;display:flex;align-items:center;gap:9px;padding:9px;border-radius:8px}.masters-action .masters-icon{width:38px;height:38px;flex-basis:38px}.masters-action>span:nth-child(2){display:grid;gap:3px;min-width:0}.masters-action strong{font-size:11px}.masters-action small{font-size:10px;color:var(--masters-muted)}.masters-action b,.masters-master-tile>b{margin-left:auto;font-size:20px;font-weight:400;color:#18385f}
.masters-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}.masters-group{padding:12px;min-width:0}.masters-group h2 span{color:#2a64c5}.masters-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
.masters-master-tile{min-height:100px;display:grid;grid-template-columns:40px minmax(0,1fr) 14px;align-items:start;gap:9px;padding:11px 8px;border-width:0 0 1px 0;border-radius:0;box-shadow:none}.masters-master-tile:nth-last-child(-n+2){border-bottom-color:transparent}.masters-master-tile:nth-child(odd){border-right:1px solid #edf1f6}.masters-master-tile .masters-icon{width:36px;height:36px;flex-basis:36px}.masters-master-tile .masters-icon .nav-icon{width:19px;height:19px}.masters-tile-copy{display:grid;gap:4px}.masters-tile-copy strong{font-size:11px}.masters-tile-copy small{min-height:30px;font-size:9.5px;line-height:1.35;color:#405878}.masters-tile-copy em{justify-self:start;padding:2px 5px;border-radius:8px;background:#edf4ff;color:#1961d6;font-size:8.5px;font-style:normal;font-weight:700}
.masters-kpi:hover,.masters-action:hover,.masters-master-tile:hover{z-index:1;border-color:#9dbbea;box-shadow:0 8px 20px #1a5db018;transform:translateY(-1px)}.masters-master-tile:hover{border-radius:7px}.masters-workspace button:focus-visible,.masters-search:focus-within{outline:3px solid #2b70e8;outline-offset:2px}
.masters-no-results{margin:0;padding:24px;text-align:center;border:1px dashed #bccbe0;border-radius:9px;background:#fff;color:var(--masters-muted)}.masters-footer{display:flex;align-items:center;justify-content:center;gap:12px;color:#536986;font-size:9px}.masters-footer i{font-style:normal;color:#93a4ba}
.masters-loading-grid{display:grid;gap:8px}.masters-loading-grid>span,.masters-loading-panel>i{position:relative;overflow:hidden;border-radius:9px;background:#e9eef5}.masters-loading-grid>span::after,.masters-loading-panel>i::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,#fff9,transparent);animation:pluserp-dashboard-shimmer 1.25s infinite}.masters-loading-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.masters-loading-kpis>span{height:96px}.masters-loading-panel{padding:11px}.masters-loading-panel>i{display:block;width:100px;height:14px;margin-bottom:10px}.masters-loading-actions{grid-template-columns:repeat(5,minmax(0,1fr))}.masters-loading-actions>span{height:62px}.masters-loading-groups{grid-template-columns:repeat(3,minmax(0,1fr))}.masters-loading-groups>span{height:260px}.masters-loading-message{margin:0;text-align:center;color:var(--masters-muted);font-size:11px}.masters-error-panel{min-height:300px;display:grid;place-items:center}
@media(max-width:1280px){.masters-groups,.masters-loading-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.masters-group:last-child{grid-column:1/-1}}
@media(max-width:1100px){.masters-workspace{padding:16px}.masters-kpi-grid,.masters-loading-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.masters-action-grid,.masters-loading-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1024px){.masters-workspace-header{flex-direction:column}.masters-heading{flex:none;width:100%}.masters-header-tools{flex:none;width:100%;max-width:none;justify-content:flex-start}.masters-groups,.masters-loading-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.masters-group:last-child{grid-column:1/-1}.masters-search{margin-left:auto}}
@media(max-width:760px){.masters-workspace{padding:12px;gap:10px;overflow-x:hidden}.masters-heading h1{font-size:21px}.masters-header-tools,.masters-header-tools .tenant-context{display:grid;grid-template-columns:1fr 1fr;width:100%}.masters-header-tools .tenant-context{grid-column:1/-1}.masters-header-tools .tenant-pill,.masters-header-tools .tenant-switcher{min-width:0;padding:0 10px}.masters-search{width:auto;margin:0}.masters-kpi-grid,.masters-loading-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.masters-action-grid,.masters-loading-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.masters-groups,.masters-loading-groups{grid-template-columns:1fr}.masters-group:last-child{grid-column:auto}.masters-kpi,.masters-action,.masters-master-tile{min-height:44px}.masters-kpi{padding:9px}.masters-footer{flex-wrap:wrap}.masters-group-grid{grid-template-columns:1fr}.masters-master-tile:nth-child(odd){border-right:0}.masters-master-tile:nth-last-child(2){border-bottom-color:#edf1f6}}

/* PlusERP V1 approved Approval Workspace master-detail */
.approval-filter-helper {
  margin: -7px 2px 0;
  color: #64748b;
  font-size: 12px;
}

.approval-master-detail {
  display: grid;
  grid-template-columns: minmax(350px, 37fr) minmax(0, 63fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.approval-queue-card,
.approval-detail-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.approval-master-head {
  min-height: 48px;
  padding: 11px 14px;
  border-bottom: 1px solid #e6edf5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.approval-master-head h2 {
  margin: 0;
  color: #13233d;
  font-size: 15px;
  font-weight: 750;
}

.approval-master-head h2 span {
  color: #526884;
  font-weight: 500;
}

.approval-count-badge {
  border-radius: 999px;
  padding: 4px 9px;
  background: #eff6ff;
  color: #155eef;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.approval-queue-table {
  min-width: 0;
}

.approval-queue-header,
.approval-queue-row,
.approval-queue-total {
  display: grid;
  grid-template-columns: minmax(155px, 1.7fr) 52px minmax(86px, .9fr) 70px 16px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.approval-queue-header {
  min-height: 34px;
  padding: 6px 12px;
  background: #f8fafc;
  color: #52637b;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.approval-queue-row {
  width: 100%;
  min-height: 42px;
  padding: 5px 12px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  background: #fff;
  color: #20324d;
  font: inherit;
  font-size: 11px;
  text-align: right;
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.approval-queue-row:hover {
  background: #f8fbff;
}

.approval-queue-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: -3px;
}

.approval-queue-row.selected {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb, inset 0 0 0 1px #bfdbfe;
}

.approval-queue-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.approval-queue-name i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  color: #fff;
  background: #2563eb;
  font-style: normal;
}

.approval-queue-row.green .approval-queue-name i { background: #16934a; }
.approval-queue-row.orange .approval-queue-name i { background: #d97706; }
.approval-queue-row.violet .approval-queue-name i { background: #8250df; }
.approval-queue-row.red .approval-queue-name i { background: #dc2626; }

.approval-queue-name svg {
  width: 13px;
  height: 13px;
}

.approval-queue-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.approval-queue-row .priority {
  color: #dc2626;
  font-weight: 750;
}

.approval-chevron {
  color: #155eef;
  font-size: 19px;
  line-height: 1;
}

.approval-queue-total {
  min-height: 42px;
  padding: 7px 12px;
  color: #13233d;
  font-size: 11px;
  text-align: right;
}

.approval-queue-total > :first-child {
  text-align: left;
  padding-left: 30px;
}

.approval-detail-scroll {
  max-width: 100%;
  overflow-x: auto;
  outline: none;
}

.approval-detail-scroll:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .25);
}

.approval-detail-table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  color: #20324d;
  font-size: 10.5px;
}

.approval-detail-table th,
.approval-detail-table td {
  height: 42px;
  padding: 7px 8px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  white-space: nowrap;
}

.approval-detail-table th {
  height: 34px;
  background: #f8fafc;
  color: #52637b;
  font-size: 9px;
  text-transform: uppercase;
}

.approval-detail-table .amount {
  text-align: right;
}

.approval-detail-table tfoot td {
  border-bottom: 0;
  font-weight: 750;
}

.approval-detail-table tfoot td:first-child {
  text-align: right;
}

.approval-detail-table .approval-action-cell {
  flex-wrap: nowrap;
}

.approval-detail-table .btn.small {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 10px;
}

.approval-detail-empty {
  min-height: 286px;
  padding: 36px 20px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #52637b;
  text-align: center;
}

.approval-detail-empty > span {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
}

.approval-detail-empty svg {
  width: 26px;
  height: 26px;
}

.approval-detail-empty strong {
  color: #13233d;
  font-size: 14px;
}

.approval-detail-empty p {
  margin: 0;
  max-width: 390px;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .approval-master-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .approval-master-detail {
    display: grid;
  }

  .approval-queue-header,
  .approval-queue-row,
  .approval-queue-total {
    grid-template-columns: minmax(138px, 1.5fr) 45px minmax(76px, .8fr) 58px 12px;
    padding-left: 9px;
    padding-right: 9px;
  }

  .approval-queue-card {
    overflow-x: auto;
  }

  .approval-queue-table {
    min-width: 390px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Keep first-paint shell geometry inert until the hydrated shell has settled. */
html.app-booting .app-shell,
html.app-booting .sidebar,
html.app-booting .sidebar .brand-row,
html.app-booting .sidebar-brand-lockup,
html.app-booting .sidebar-brand-icon,
html.app-booting .sidebar nav,
html.app-booting .sidebar .nav-btn,
html.app-booting .sidebar-footer,
html.app-booting .content,
html.app-booting .topbar {
  transition: none !important;
  animation: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

button {
  cursor: pointer;
}

.pluserp-dashboard-context-loading,
.pluserp-dashboard-context-ready {
  animation: pluserp-dashboard-enter 180ms ease-out both;
}

.pluserp-dashboard-context-loading {
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 100%;
}

.pluserp-dashboard-skeleton-header,
.pluserp-dashboard-skeleton-health,
.pluserp-dashboard-skeleton-panels,
.pluserp-dashboard-skeleton-cards {
  display: grid;
  gap: 12px;
}

.pluserp-dashboard-skeleton-header {
  grid-template-columns: 1.4fr 1fr 0.8fr;
}

.pluserp-dashboard-skeleton-health {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pluserp-dashboard-skeleton-panels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pluserp-dashboard-skeleton-cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pluserp-dashboard-skeleton-header span,
.pluserp-dashboard-skeleton-health span,
.pluserp-dashboard-skeleton-wide,
.pluserp-dashboard-skeleton-panels span,
.pluserp-dashboard-skeleton-cards span {
  position: relative;
  overflow: hidden;
  display: block;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: #e7ecf3;
}

.pluserp-dashboard-skeleton-header span { height: 76px; }
.pluserp-dashboard-skeleton-health span { height: 108px; }
.pluserp-dashboard-skeleton-wide { height: 102px; }
.pluserp-dashboard-skeleton-panels span { height: 272px; }
.pluserp-dashboard-skeleton-cards span { height: 218px; }

.pluserp-dashboard-skeleton-header span::after,
.pluserp-dashboard-skeleton-health span::after,
.pluserp-dashboard-skeleton-wide::after,
.pluserp-dashboard-skeleton-panels span::after,
.pluserp-dashboard-skeleton-cards span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  animation: pluserp-dashboard-shimmer 1.25s infinite;
}

.pluserp-dashboard-loading-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

@keyframes pluserp-dashboard-shimmer {
  100% { transform: translateX(100%); }
}

@keyframes pluserp-dashboard-enter {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

@media (max-width: 1100px) {
  .pluserp-dashboard-skeleton-health,
  .pluserp-dashboard-skeleton-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .pluserp-dashboard-skeleton-header,
  .pluserp-dashboard-skeleton-health,
  .pluserp-dashboard-skeleton-panels,
  .pluserp-dashboard-skeleton-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pluserp-dashboard-context-loading,
  .pluserp-dashboard-context-ready,
  .pluserp-dashboard-skeleton-header span::after,
  .pluserp-dashboard-skeleton-health span::after,
  .pluserp-dashboard-skeleton-wide::after,
  .pluserp-dashboard-skeleton-panels span::after,
  .pluserp-dashboard-skeleton-cards span::after { animation: none; }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 20px;
  align-items: center;
  padding-right: 28px;
  background:
    linear-gradient(110deg, rgba(244, 246, 248, 0.98), rgba(244, 246, 248, 0.78)),
    linear-gradient(135deg, #173b63 0 18%, transparent 18% 100%),
    linear-gradient(45deg, transparent 0 72%, #d6a13f 72% 86%, transparent 86% 100%),
    repeating-linear-gradient(90deg, rgba(23, 59, 99, 0.11) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(161, 98, 7, 0.09) 0 1px, transparent 1px 68px),
    #eef2eb;
}

.login-brand {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--brand);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.login-brand h1 {
  margin: 32px 0 12px;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 460px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(460px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.customer-portal-login {
  border-top: 4px solid var(--gold);
}

.login-panel h2,
.modal h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.customer-transfer-note,
.customer-transfer-note span,
.customer-transfer-note strong {
  font-size: 14px;
  line-height: 1.45;
}

.customer-portal-page {
  display: grid;
  gap: 16px;
}

.customer-portal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.customer-portal-hero h2 {
  margin: 4px 0 6px;
  font-size: 26px;
}

.customer-portal-hero p {
  margin: 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

label.is-disabled {
  opacity: 0.62;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.14);
}

.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--brand);
  color: white;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  box-shadow: 0 6px 14px rgba(23, 59, 99, 0.14);
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.btn.secondary:hover {
  background: #eef5ff;
  border-color: var(--brand);
  color: var(--brand-dark);
}

.posted-action:disabled {
  background: #e8f1ec;
  border-color: #cfe2d5;
  color: #24613a;
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
}

.btn.danger {
  background: var(--accent);
}

.btn.icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.demo-users {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.demo-users button {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 6px;
  padding: 10px;
  text-align: left;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  overflow: hidden;
}

.sidebar {
  background: linear-gradient(180deg, #071b3a 0%, #06213f 48%, #021529 100%);
  color: white;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.sidebar .brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .brand-row strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.01em;
  display: grid;
  gap: 1px;
}

.sidebar .brand-row strong span {
  color: rgba(226, 232, 240, 0.82);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.sidebar nav {
  display: grid;
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(235, 244, 255, 0.78);
  border-radius: 6px;
  min-height: 38px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.92;
}

.nav-btn.active,
.nav-btn:hover {
  color: white;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.nav-btn.active {
  font-weight: 700;
}

.module-lock {
  max-width: 760px;
  margin: 0 auto;
}

.module-lock .empty-state {
  border-left: 4px solid var(--brand);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 8px 0;
  display: grid;
  gap: 10px;
}

.user-pill {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.35;
}

.content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.top-menu {
  min-height: 36px;
  background: linear-gradient(180deg, #f8fbff 0%, #e8eef7 100%);
  border-bottom: 1px solid #cbd8e8;
  padding: 0 18px;
  display: none !important;
  align-items: stretch;
  gap: 2px;
  position: sticky;
  top: 0;
  z-index: 12;
}

.top-menu-group {
  position: relative;
  display: flex;
}

.top-menu-trigger {
  border: 0;
  background: transparent;
  color: #102f50;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.top-menu-trigger:hover,
.top-menu-group:focus-within .top-menu-trigger {
  background: #dbe7f6;
  color: #0b2542;
}

.top-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #cbd8e8;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  display: none;
  z-index: 20;
}

.top-menu-group:hover .top-menu-dropdown,
.top-menu-group:focus-within .top-menu-dropdown {
  display: grid;
}

.top-menu-dropdown button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #18385d;
  min-height: 30px;
  padding: 6px 9px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.top-menu-dropdown button:hover,
.top-menu-dropdown button:focus {
  background: #eef5ff;
  color: #0b2542;
  outline: none;
}

.topbar {
  min-height: 72px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 36px;
  z-index: 11;
}

.content-no-topbar .topbar {
  display: none;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 800;
}

.topbar-title {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.all-sales-topbar-title {
  gap: 8px;
}

.all-sales-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.all-sales-title-row h1 {
  margin: 0;
}

.all-sales-title-row .tenant-pills {
  margin-left: 4px;
}

.all-sales-title-note {
  flex: 1 1 280px;
  min-width: 200px;
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  text-align: right;
  white-space: normal;
}

.topbar:has(.all-sales-topbar-title),
.page:has(.all-sales-report-panel) {
  overflow-x: hidden;
}

.page:has(.all-sales-report-panel) {
  gap: 6px;
}

.license-banner {
  margin: 12px 24px 0;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--brand);
  background: #eff6ff;
  color: #12365f;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.license-banner.warn {
  border-color: #fde68a;
  border-left-color: #d97706;
  background: #fffbeb;
  color: #7c2d12;
}

.license-banner.danger {
  border-color: #fecaca;
  border-left-color: #dc2626;
  background: #fff1f2;
  color: #7f1d1d;
}

.tenant-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.tenant-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.tenant-switcher select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  padding: 0 28px 0 10px;
}

.tenant-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e1ee;
  border-radius: 999px;
  background: #f7fbff;
  color: #274d79;
  font-weight: 700;
  padding: 0 10px;
}

.tenant-mode {
  background: #eef5ff;
  color: var(--brand);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.approval-top-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 42vw);
}

.approval-top-search input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  padding: 0 12px;
}

.page {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  background: #f8fafc;
}

.workspace-return-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.workspace-return-bar span {
  color: var(--ink);
  font-weight: 700;
}

.workspace-return-bar .workspace-title-stack {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.workspace-return-bar .workspace-title-stack strong {
  font-size: 16px;
}

.workspace-return-bar .workspace-title-stack small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.workspace-return-bar-with-actions {
  gap: 12px;
}

.workspace-return-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.workspace-return-actions .btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.workspace-return-actions .btn svg {
  width: 15px;
  height: 15px;
}

.inventory-return-bar {
  align-items: center;
  gap: 10px;
}

.inventory-return-bar .workspace-title-stack strong {
  font-size: 16px;
}

.inventory-return-actions {
  display: grid;
  grid-template-columns: minmax(190px, 240px) auto minmax(120px, 180px) auto;
  align-items: center;
}

.inventory-return-actions input,
.inventory-return-actions select {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  min-width: 0;
}

.inventory-reset-hint {
  font-size: 13px;
  line-height: 1.25;
}

.inventory-action-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  margin-top: -6px;
  margin-bottom: -6px;
}

.inventory-action-panel .panel-head-actions {
  margin-left: auto;
}

.workspace-return-bar:has(.workspace-title-stack) {
  min-height: 34px;
  padding: 5px 10px;
  margin-top: -8px;
  margin-bottom: -8px;
}

.workspace-return-bar.customer-return-bar {
  min-height: 64px;
  padding: 12px 16px;
  margin-top: 0;
  margin-bottom: 0;
  column-gap: 16px;
  row-gap: 10px;
  flex-wrap: wrap;
}

.customer-return-bar .workspace-title-stack {
  min-width: 150px;
  gap: 4px;
}

.customer-return-bar .workspace-title-stack strong {
  font-size: 18px;
  line-height: 1.25;
}

.customer-return-bar .workspace-return-actions {
  flex: 1 1 440px;
}

.workspace-return-bar:has(.workspace-title-stack) + .toolbar {
  padding: 8px 12px;
}

.workspace-return-bar:has(.workspace-title-stack) + .toolbar + .invoice-register-wrap {
  margin-top: -8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  min-height: 0;
}

.dashboard-block {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
}

.dashboard-quick-view {
  grid-template-rows: auto minmax(110px, 150px) minmax(0, 1fr);
  max-height: calc(100vh - 120px);
}

.dashboard-quick-view .chart {
  height: 150px;
  padding-top: 6px;
}

.dashboard-quick-view .bar {
  gap: 5px;
}

.dashboard-quick-view .bar-fill {
  max-height: 112px;
}

.dashboard-quick-view .bar small {
  font-size: 11px;
}

.dashboard-quick-view .quick-list {
  max-height: 190px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
}

.snapshot-shell {
  display: grid;
  gap: 10px;
}

.erp-dashboard {
  gap: 14px;
}

.erp-dashboard > .dashboard-command,
.erp-dashboard > .dashboard-kpi-strip {
  display: none;
}

.dashboard-command,
.reports-command {
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.dashboard-command {
  min-height: 74px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-command h2,
.reports-command h2 {
  margin: 0;
  color: #102f50;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
}

.dashboard-command p {
  margin: 4px 0 0;
  color: #58708f;
  font-weight: 650;
}

.dashboard-command-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-kpi-strip,
.reports-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 10px;
}

.dashboard-kpi-strip .metric,
.reports-metric-grid .metric {
  min-height: 94px;
  border-color: #d7e1ee;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dashboard-kpi-strip .metric::before,
.reports-metric-grid .metric::before {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: #c7d2df;
  display: block;
  margin-bottom: 8px;
}

.snapshot-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.snapshot-tabs button {
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #e5eaf2;
  color: #102f50;
  min-width: 110px;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 6px 6px 0 0;
  font-weight: 750;
}

.snapshot-tabs button.active {
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: inset 0 3px 0 #173b63;
}

.snapshot-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  grid-auto-rows: 260px;
  gap: 8px;
  align-items: stretch;
}

.snapshot-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.snapshot-card-wide {
  min-height: 0;
}

.snapshot-head {
  min-height: 34px;
  padding: 7px 9px;
  background: #dbe4f0;
  border-bottom: 1px solid #cbd8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.snapshot-head h2 {
  margin: 0;
  color: #102f50;
  font-size: 13px;
  font-weight: 850;
}

.snapshot-head span {
  color: #425b78;
  font-size: 12px;
}

.snapshot-vchart {
  height: 100%;
  min-height: 0;
  padding: 12px 12px 4px;
  display: grid;
  grid-template-columns: repeat(12, minmax(18px, 1fr));
  align-items: end;
  gap: 6px;
  background: repeating-linear-gradient(0deg, #ffffff 0 38px, #eef2f7 39px 40px);
}

.snapshot-years {
  grid-template-columns: repeat(6, minmax(34px, 1fr));
}

.snapshot-month {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 4px;
  text-align: center;
  min-width: 0;
}

.snapshot-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 100%;
  min-height: 0;
}

.snapshot-bars span {
  display: block;
  width: 9px;
  min-height: 3px;
  border-radius: 3px 3px 0 0;
}

.snapshot-bars.single span {
  width: 18px;
}

.snapshot-bars .income,
.snapshot-bars .expense,
.snapshot-bars .current {
  box-shadow: inset -4px 0 0 rgba(0, 0, 0, 0.12);
  max-height: 100%;
}

.snapshot-bars .expense,
.snapshot-legend .expense {
  background: #f97316;
}

.snapshot-bars .income,
.snapshot-legend .income {
  background: #0284c7;
}

.snapshot-bars .current,
.snapshot-legend .current {
  background: #22c55e;
}

.snapshot-month small {
  color: #102f50;
  font-size: 11px;
}

.snapshot-legend {
  min-height: 30px;
  padding: 5px 12px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #102f50;
  font-size: 11px;
}

.snapshot-legend span {
  width: 22px;
  height: 9px;
  display: inline-block;
}

.snapshot-table-wrap {
  max-height: none;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.snapshot-table {
  min-width: 100%;
}

.snapshot-table th,
.snapshot-table td {
  padding: 6px 8px;
  font-size: 12px;
}

.snapshot-table th {
  background: #f4f7fb;
  color: #58708f;
}

.snapshot-table tbody tr:nth-child(odd) {
  background: #f6f8fb;
}

.snapshot-link {
  justify-self: end;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  padding: 8px 10px;
  font-weight: 750;
}

.snapshot-hbars {
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.snapshot-hbar {
  display: grid;
  grid-template-columns: minmax(96px, 0.45fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.snapshot-hbar span {
  color: #102f50;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-hbar div {
  height: 12px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.snapshot-hbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.snapshot-hbar strong {
  color: #102f50;
  font-size: 11px;
  white-space: nowrap;
}

.snapshot-breakdown {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.snapshot-kpi {
  padding: 18px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  min-height: 0;
  height: 100%;
}

.snapshot-kpi strong {
  color: #102f50;
  font-size: 28px;
  line-height: 1.1;
}

.snapshot-kpi span {
  color: #58708f;
  font-size: 12px;
  font-weight: 700;
}

.snapshot-kpi-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: center;
}

.snapshot-kpi-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.snapshot-kpi-grid span {
  color: #58708f;
  font-size: 12px;
  font-weight: 750;
}

.snapshot-kpi-grid strong {
  color: #102f50;
  font-size: 20px;
}

.pluserp-dashboard {
  --pluserp-blue: #2563eb;
  --pluserp-blue-dark: #1d4ed8;
  --pluserp-green: #22c55e;
  --pluserp-red: #ef4444;
  --pluserp-orange: #f97316;
  --pluserp-purple: #8b5cf6;
  --pluserp-cyan: #06b6d4;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(178px, 0.95fr) minmax(142px, 0.68fr) auto 26px;
  gap: 8px;
  color: #0f172a;
  align-content: stretch;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.content:has(.pluserp-dashboard) {
  grid-template-rows: 1fr;
  overflow: hidden;
}

.content:has(.pluserp-dashboard) .top-menu {
  display: none;
}

.content:has(.pluserp-dashboard) .topbar {
  display: none;
}

.content:has(.pluserp-dashboard) .topbar h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.page:has(.pluserp-dashboard) {
  padding: 8px 12px;
  gap: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pluserp-dashboard-shell-title {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 1 1 auto;
}

.pluserp-menu-toggle {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f2a44;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.pluserp-global-search {
  width: min(480px, 38vw);
  min-width: 280px;
  height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.pluserp-global-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
}

.pluserp-global-search input::placeholder {
  color: #64748b;
}

.pluserp-global-search kbd {
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pluserp-dashboard-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.pluserp-dashboard-shell-actions .btn {
  min-height: 38px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.pluserp-new-button {
  min-width: 96px;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.pluserp-shell-icon-button {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.pluserp-user-chip {
  min-width: 124px;
  display: grid;
  gap: 2px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.1;
}

.pluserp-user-chip small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.pluserp-dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.pluserp-dashboard-heading .pluserp-dashboard-tools {
  display: none;
}

.pluserp-dashboard-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pluserp-dashboard-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.pluserp-dashboard-title .tenant-context {
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.pluserp-dashboard-title .tenant-pill {
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pluserp-dashboard-title .hint {
  font-size: 12px;
  font-weight: 400;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pluserp-dashboard-hero h2 {
  margin: 2px 0 4px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.pluserp-dashboard-hero p {
  margin: 0;
  color: #475569;
  font-weight: 400;
}

.pluserp-eyebrow {
  color: var(--pluserp-blue) !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pluserp-dashboard-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pluserp-date-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 14px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.pluserp-dashboard-tools .btn {
  min-height: 38px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.pluserp-refresh-button {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.pluserp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.pluserp-kpi-card,
.pluserp-panel {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.055);
}

.pluserp-kpi-card {
  min-height: 62px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e2e8f0;
  text-align: left;
  font: inherit;
  color: inherit;
}

.pluserp-kpi-card-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pluserp-kpi-card-clickable:hover,
.pluserp-kpi-card-clickable:focus-visible {
  border-color: #bfdbfe;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.pluserp-kpi-card-clickable:active {
  transform: translateY(0);
}

.pluserp-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pluserp-blue), #0ea5e9);
  flex: 0 0 32px;
}

.pluserp-kpi-icon svg {
  width: 16px;
  height: 16px;
}

.pluserp-kpi-card:nth-child(2) .pluserp-kpi-icon {
  background: linear-gradient(135deg, var(--pluserp-red), #fb7185);
}

.pluserp-kpi-card:nth-child(3) .pluserp-kpi-icon {
  background: linear-gradient(135deg, var(--pluserp-green), #16a34a);
}

.pluserp-kpi-card:nth-child(4) .pluserp-kpi-icon {
  background: linear-gradient(135deg, var(--pluserp-purple), #a855f7);
}

.pluserp-kpi-card:nth-child(5) .pluserp-kpi-icon {
  background: linear-gradient(135deg, var(--pluserp-orange), #f59e0b);
}

.pluserp-kpi-card:nth-child(6) .pluserp-kpi-icon {
  background: linear-gradient(135deg, var(--pluserp-cyan), #0891b2);
}

.pluserp-kpi-card div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pluserp-kpi-card span {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.pluserp-kpi-card strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.pluserp-kpi-card small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.pluserp-kpi-card small.positive {
  color: #16a34a;
}

.pluserp-kpi-card small.negative,
.pluserp-table .negative {
  color: #dc2626;
}

.pluserp-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.pluserp-dashboard-grid:not(.pluserp-dashboard-grid-tables) {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.pluserp-chart-grid,
.pluserp-dashboard-grid.pluserp-chart-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(190px, 0.72fr);
}

.pluserp-dashboard-grid-tables {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pluserp-dashboard-lower {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-self: end;
  min-width: 0;
  overflow-x: hidden;
}

.pluserp-panel {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.pluserp-dashboard-grid:not(.pluserp-dashboard-grid-tables) .pluserp-panel {
  min-height: 0;
}

.pluserp-dashboard-grid:not(.pluserp-dashboard-grid-tables) .pluserp-recent-expanded-panel {
  min-height: 0;
}

.pluserp-dashboard-grid-tables .pluserp-panel {
  min-height: 0;
}

.pluserp-dashboard-grid-tables > .pluserp-panel:only-child {
  grid-column: 1 / -1;
}

.pluserp-panel-head {
  min-height: 32px;
  padding: 5px 10px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pluserp-panel-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
}

.pluserp-panel-head span {
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.pluserp-line-chart {
  min-height: 0;
  padding: 6px 12px 8px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.pluserp-line-chart svg {
  width: 100%;
  height: 112px;
  min-width: 0;
  max-width: 100%;
}

.pluserp-line-chart .grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.pluserp-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  min-width: 0;
}

.pluserp-donut-wrap {
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.pluserp-donut {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
}

.pluserp-donut svg {
  width: 108px;
  height: 108px;
  transform: rotate(-90deg);
}

.pluserp-donut > div {
  position: absolute;
  inset: 25px;
  border-radius: 999px;
  background: #ffffff;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.pluserp-donut strong {
  color: #0f172a;
  font-size: 14px;
}

.pluserp-donut span {
  color: #64748b;
  font-size: 10px;
  font-weight: 400;
}

.pluserp-donut-legend {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pluserp-donut-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 400;
}

.pluserp-donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.pluserp-donut-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-cash-chart {
  padding: 6px 12px 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.pluserp-chart-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: #334155;
  font-size: 12px;
  font-weight: 400;
}

.pluserp-chart-legend span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.pluserp-chart-legend .inflow,
.pluserp-cash-bars .inflow {
  background: var(--pluserp-green);
}

.pluserp-chart-legend .outflow,
.pluserp-cash-bars .outflow {
  background: var(--pluserp-red);
}

.pluserp-cash-bars {
  min-height: 108px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  padding-top: 8px;
  background: repeating-linear-gradient(0deg, #ffffff 0 34px, #eef2f7 35px 36px);
  overflow-x: hidden;
}

.pluserp-cash-bars > div {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 2px;
  text-align: center;
}

.pluserp-cash-bars span {
  align-self: end;
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
}

.pluserp-cash-bars small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
  font-weight: 400;
}

.pluserp-health {
  padding: 8px 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pluserp-health-score {
  width: 92px;
  height: 58px;
  margin: 0 auto;
  border-radius: 92px 92px 12px 12px;
  display: grid;
  place-items: center;
  align-content: center;
  color: #0f172a;
  background: conic-gradient(from 270deg, #22c55e 0 72%, #e5e7eb 72% 100%);
  box-shadow: inset 0 -14px 0 #ffffff;
}

.pluserp-health-score.moderate {
  background: conic-gradient(from 270deg, #f59e0b 0 62%, #e5e7eb 62% 100%);
}

.pluserp-health-score.risk {
  background: conic-gradient(from 270deg, #ef4444 0 46%, #e5e7eb 46% 100%);
}

.pluserp-health-score strong {
  font-size: 22px;
  line-height: 1;
}

.pluserp-health-score span {
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

.pluserp-health-list {
  display: grid;
  gap: 5px;
}

.pluserp-health-list div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 11px;
  min-width: 0;
}

.pluserp-health-list span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-health-list span:first-child {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
}

.pluserp-health-list span.done:first-child {
  background: #22c55e;
}

.pluserp-health-list strong {
  color: #16a34a;
  font-size: 10px;
}

.pluserp-alerts-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.pluserp-alert-list {
  display: grid;
  gap: 0;
}

.pluserp-alert-row {
  min-height: 30px;
  padding: 5px 9px;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pluserp-alert-row > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
}

.pluserp-alert-row.warning > span {
  background: #f59e0b;
}

.pluserp-alert-row.danger > span {
  background: #ef4444;
}

.pluserp-alert-row div,
.pluserp-alert-row strong,
.pluserp-alert-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-alert-row strong {
  display: block;
  color: #0f172a;
  font-size: 11px;
}

.pluserp-alert-row small {
  display: block;
  color: #64748b;
  font-size: 10px;
}

.pluserp-table-wrap {
  min-height: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.pluserp-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.pluserp-table th,
.pluserp-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.pluserp-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: left;
}

.pluserp-dashboard-grid-tables .pluserp-table th,
.pluserp-dashboard-grid-tables .pluserp-table td {
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.25;
}

.pluserp-dashboard-grid-tables .pluserp-table .link-button {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.pluserp-receivables-table th:nth-child(2),
.pluserp-receivables-table th:nth-child(3),
.pluserp-receivables-table td:nth-child(2),
.pluserp-receivables-table td:nth-child(3),
.pluserp-bank-table th:nth-child(3),
.pluserp-bank-table td:nth-child(3),
.pluserp-recent-table th:nth-child(3),
.pluserp-recent-table td:nth-child(3),
.pluserp-recent-table th:nth-child(5),
.pluserp-recent-table td:nth-child(5) {
  text-align: right;
}

.pluserp-recent-table .badge {
  max-width: 100%;
  padding-inline: 6px;
  font-size: 10px;
}

.pluserp-compact-table {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.pluserp-compact-head,
.pluserp-compact-row {
  display: grid;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border-bottom: 1px solid #e2e8f0;
}

.pluserp-compact-head {
  min-height: 28px;
  padding: 5px 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.pluserp-compact-row {
  min-height: 27px;
  padding: 4px 8px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.2;
}

.pluserp-compact-row > *,
.pluserp-compact-head > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-compact-row strong {
  font-weight: 600;
}

.pluserp-compact-row .link-button {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.pluserp-compact-row .badge {
  max-width: 100%;
  padding: 3px 6px;
  font-size: 10px;
  justify-self: start;
}

.pluserp-compact-empty {
  padding: 18px 10px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.pluserp-receivables-table .pluserp-compact-head,
.pluserp-receivables-table .pluserp-compact-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(74px, 0.8fr) minmax(62px, 0.65fr);
}

.pluserp-receivables-table .pluserp-compact-head > :nth-child(2),
.pluserp-receivables-table .pluserp-compact-head > :nth-child(3),
.pluserp-receivables-table .pluserp-compact-row > :nth-child(2),
.pluserp-receivables-table .pluserp-compact-row > :nth-child(3) {
  text-align: right;
}

.pluserp-recent-table .pluserp-compact-head,
.pluserp-recent-table .pluserp-compact-row {
  grid-template-columns: minmax(62px, 0.95fr) minmax(52px, 0.72fr) minmax(68px, 0.72fr) minmax(44px, 0.48fr) minmax(68px, 0.6fr);
}

.pluserp-recent-table .pluserp-compact-head > :nth-child(3),
.pluserp-recent-table .pluserp-compact-head > :nth-child(5),
.pluserp-recent-table .pluserp-compact-row > :nth-child(3),
.pluserp-recent-table .pluserp-compact-row > :nth-child(5) {
  text-align: right;
}

.pluserp-recent-table .pluserp-compact-head > :nth-child(5),
.pluserp-recent-table .pluserp-compact-row > :nth-child(5) {
  overflow: visible;
  text-overflow: clip;
}

.pluserp-recent-table .pluserp-compact-row .badge {
  min-width: 46px;
  text-align: center;
}

.pluserp-bank-table .pluserp-compact-head,
.pluserp-bank-table .pluserp-compact-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(54px, 0.52fr) minmax(84px, 0.88fr);
}

.pluserp-bank-table .pluserp-compact-head > :nth-child(3),
.pluserp-bank-table .pluserp-compact-row > :nth-child(3) {
  text-align: right;
}

.pluserp-table td.amount {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.pluserp-transaction-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.pluserp-transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.pluserp-transaction-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pluserp-transaction-row strong,
.pluserp-transaction-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-transaction-row div > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
}

.pluserp-transaction-row b {
  color: #0f172a;
  font-size: 11.5px;
  white-space: nowrap;
}

.pluserp-transaction-row small {
  display: none;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.pluserp-quick-actions {
  padding: 8px 10px;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.pluserp-quick-actions button {
  min-height: 52px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  color: #0f172a;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 6px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.pluserp-quick-actions button:hover:not(:disabled) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--pluserp-blue-dark);
}

.pluserp-quick-actions button:disabled {
  color: #94a3b8;
  background: #f8fafc;
}

.pluserp-quick-actions span {
  width: 26px;
  height: 26px;
  border: 2px solid var(--pluserp-blue);
  border-radius: 6px;
  color: var(--pluserp-blue);
  display: grid;
  place-items: center;
}

.pluserp-quick-actions svg {
  width: 14px;
  height: 14px;
}

.pluserp-closing-list {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.pluserp-closing-list div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
}

.pluserp-closing-list span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
}

.pluserp-closing-list span.done {
  border-color: var(--pluserp-green);
  background: var(--pluserp-green);
  box-shadow: inset 0 0 0 3px #ffffff;
}

.pluserp-closing-list strong {
  color: #475569;
  font-size: 11px;
}

.pluserp-closing-compact {
  border-top: 1px solid #e2e8f0;
  padding: 10px 14px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pluserp-closing-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.pluserp-closing-compact-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

.pluserp-closing-compact .pluserp-closing-list {
  padding: 0;
  gap: 6px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pluserp-closing-compact .pluserp-closing-list div {
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 5px;
  font-size: 12px;
}

.pluserp-closing-compact .pluserp-closing-list span {
  width: 11px;
  height: 11px;
}

.pluserp-closing-compact .pluserp-closing-list span.done {
  box-shadow: inset 0 0 0 2px #ffffff;
}

.pluserp-closing-compact .pluserp-closing-list strong {
  font-size: 11px;
}

.pluserp-closing-compact .pluserp-closing-list p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 10px;
}

.pluserp-quick-panel {
  min-height: 96px;
}

.pluserp-closing-list p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
}

.pluserp-empty-chart {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 190px;
  color: #64748b;
  text-align: center;
}

.pluserp-empty-chart strong {
  color: #0f172a;
  font-size: 20px;
}

.pluserp-feature-strip {
  min-height: 28px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
  color: #1e40af;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  flex-wrap: wrap;
}

.snapshot-links {
  padding: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.snapshot-donut {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle at center, #ffffff 0 48%, transparent 49%), conic-gradient(#f97316 0 65%, #fbbf24 65% 82%, #2563eb 82% 100%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  margin: auto;
}

.snapshot-donut strong,
.snapshot-donut span {
  grid-area: 1 / 1;
}

.snapshot-donut strong {
  align-self: center;
  color: #102f50;
  font-size: 14px;
}

.snapshot-donut span {
  align-self: end;
  color: #58708f;
  font-size: 10px;
}

.workflow-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.workflow-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.workflow-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #18385d;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.workflow-link:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.1);
}

.reports-workspace {
  display: grid;
  gap: 14px;
}

.reports-command {
  padding: 16px;
}

.reports-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(180px, 1fr) minmax(170px, 0.9fr) minmax(130px, 0.75fr) minmax(150px, 0.85fr) auto;
  gap: 10px;
  align-items: end;
}

.reports-filter-bar label {
  color: #405b7a;
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.reports-filter-bar input,
.reports-filter-bar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 0 10px;
}

.reports-filter-bar input:disabled {
  color: #64748b;
  background: #f8fafc;
}

.reports-filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.report-center {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
}

.reports-card-center {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.sales-center {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
}

.report-block,
.dashboard-block {
  border-color: #d7e1ee;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.panel-head,
.table-head {
  align-items: flex-start;
  border-bottom: 1px solid #dfe8f4;
  padding-bottom: 10px;
  margin-bottom: 12px;
  position: relative;
}

.panel-head::before,
.table-head::before {
  content: "";
  width: 4px;
  align-self: stretch;
  border-radius: 999px;
  background: var(--brand);
  flex: 0 0 4px;
}

.panel-head h2,
.table-head h2,
.panel h2 {
  margin: 0;
  color: #102f50;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}

.panel-head .hint,
.table-head .hint {
  color: #58708f;
  font-size: 12px;
}

.sales-center .report-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.sales-center .workflow-link {
  border-color: #d7e1ee;
}

.sales-center .workflow-link:hover,
.sales-center .workflow-link:focus {
  border-color: var(--brand);
  background: #eef5ff;
  color: #0b2542;
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.12);
}

.sales-center .dashboard-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.sales-center .metric {
  padding: 10px;
}

.sales-center .metric span {
  font-size: 11px;
}

.sales-center .metric strong {
  font-size: 18px;
}

.sales-center .quick-list {
  gap: 8px;
}

.sales-workspace {
  --sales-blue: #2563eb;
  --sales-green: #16a34a;
  --sales-warn: #f59e0b;
  --sales-danger: #dc2626;
  --sales-info: #0891b2;
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  color: #111827;
}

.sales-workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.sales-workspace-head h1 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 700;
}

.sales-workspace-head p {
  margin: 4px 0 12px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.sales-workspace-head .tenant-context {
  gap: 8px;
  min-width: 0;
}

.sales-workspace-head .tenant-pill {
  min-height: 28px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sales-workspace-head .hint {
  display: none;
}

.sales-workspace-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.sales-search {
  width: min(260px, 24vw);
  min-width: 190px;
  height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.sales-search svg {
  width: 15px;
  height: 15px;
  color: #64748b;
}

.sales-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.sales-kpi-card,
.sales-quick-panel,
.sales-operations-panel,
.sales-panel,
.sales-summary-strip {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.sales-kpi-card {
  min-height: 98px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sales-kpi-card > span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sales-blue), #2563eb);
  box-shadow: 0 0 0 9px rgba(37, 99, 235, 0.13);
  flex: 0 0 48px;
}

.sales-kpi-card.success > span {
  background: linear-gradient(135deg, var(--sales-green), #22c55e);
  box-shadow: 0 0 0 9px rgba(34, 197, 94, 0.13);
}

.sales-kpi-card.danger > span {
  background: linear-gradient(135deg, var(--sales-danger), #fb7185);
  box-shadow: 0 0 0 9px rgba(239, 68, 68, 0.13);
}

.sales-kpi-card.info > span {
  background: linear-gradient(135deg, var(--sales-blue), #2563eb);
  box-shadow: 0 0 0 9px rgba(37, 99, 235, 0.13);
}

.sales-kpi-card.violet > span {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 0 0 9px rgba(139, 92, 246, 0.14);
}

.sales-kpi-card > span svg {
  width: 22px;
  height: 22px;
}

.sales-kpi-card div {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: center;
}

.sales-kpi-card small {
  color: #334155;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-kpi-card em {
  color: #475569;
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-kpi-card strong {
  color: #111827;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 700;
  white-space: nowrap;
}

.sales-section-head {
  min-height: 36px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sales-section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 600;
}

.sales-quick-actions {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px;
  min-width: 0;
}

.sales-action-button {
  min-height: 56px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  text-align: left;
  min-width: 0;
}

.sales-action-button > i,
.sales-operation-title span,
.sales-report-link > svg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  padding: 6px;
  color: var(--sales-blue);
  background: #eff6ff;
  flex: 0 0 28px;
}

.sales-action-button > i {
  display: grid;
  place-items: center;
  font-style: normal;
}

.sales-action-button > i svg {
  width: 17px;
  height: 17px;
}

.sales-action-button.green > i {
  color: #15803d;
  background: #ecfdf3;
}

.sales-action-button.teal > i {
  color: #0f766e;
  background: #ecfeff;
}

.sales-action-button.violet > i {
  color: #6d28d9;
  background: #f5f3ff;
}

.sales-action-button span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sales-action-button strong {
  overflow: hidden;
  color: #111827;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

.sales-action-button small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-action-button b {
  margin-left: auto;
  color: #1d4ed8;
  font-size: 20px;
  font-weight: 400;
}

.sales-action-button:hover,
.sales-action-button:focus-visible,
.sales-kpi-card:hover,
.sales-kpi-card:focus-visible,
.sales-operation-item:hover,
.sales-report-link:hover,
.sales-alert-item:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: #1d4ed8;
}

.sales-action-button:focus-visible,
.sales-kpi-card:focus-visible,
.sales-operation-item:focus-visible,
.sales-report-link:focus-visible,
.sales-alert-item:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.sales-operations-panel {
  min-width: 0;
}

.sales-operation-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.sales-operation-card {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

.sales-operation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sales-operation-title h3 {
  margin: 0;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 700;
}

.sales-operation-card > div:last-child {
  display: grid;
  gap: 7px;
}

.sales-operation-item,
.sales-report-link,
.sales-alert-item {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 7px;
  text-align: left;
}

.sales-operation-item svg {
  width: 16px;
  height: 16px;
  color: var(--sales-blue);
  flex: 0 0 16px;
}

.sales-operation-item span,
.sales-report-link span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sales-operation-item strong,
.sales-report-link strong,
.sales-alert-item strong {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-operation-item small,
.sales-report-link small,
.sales-alert-item small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-lower-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.05fr) minmax(0, 1.38fr) minmax(190px, 0.72fr) !important;
  gap: 12px;
  min-width: 0;
}

.sales-panel {
  min-width: 0;
  overflow: hidden;
}

.sales-report-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sales-view-all {
  margin: 0 12px 12px;
}

.sales-table {
  min-width: 0;
  overflow: hidden;
}

.sales-table-head,
.sales-table-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.95fr) minmax(110px, 1.25fr) minmax(90px, 0.7fr);
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  min-width: 0;
}

.sales-receipt-table .sales-table-head,
.sales-receipt-table .sales-table-row {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr) minmax(74px, 0.58fr);
}

.sales-receipt-table {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.sales-receipt-table .sales-table-row {
  height: auto;
  min-height: 36px;
}

.sales-receipt-table .sales-table-row > :first-child,
.sales-receipt-table .sales-table-row > :nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.sales-receipt-table .sales-table-head > :last-child,
.sales-receipt-table .sales-table-row > :last-child {
  white-space: nowrap;
  text-align: right;
}

.sales-table-head {
  min-height: 31px;
  padding: 6px 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sales-table-row {
  min-height: 36px;
  padding: 6px 10px;
  color: #111827;
  font-size: 12px;
}

.sales-table-row > *,
.sales-table-head > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-table-row strong {
  font-weight: 700;
  text-align: right;
}

.sales-table-row .badge {
  justify-self: start;
  max-width: 100%;
  padding: 3px 6px;
  font-size: 10px;
}

.sales-alert-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.sales-alert-item {
  border-color: #e5e7eb;
  background: #ffffff;
}

.sales-alert-item > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sales-alert-item strong,
.sales-alert-item small {
  display: block;
  line-height: 1.3;
}

.sales-alert-item > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--sales-blue);
  flex: 0 0 10px;
}

.sales-alert-item.warning > span {
  background: var(--sales-warn);
}

.sales-alert-item.danger > span {
  background: var(--sales-danger);
}

.sales-alert-item.info > span {
  background: var(--sales-info);
}

.sales-empty {
  padding: 18px 12px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}

.sales-summary-strip {
  min-height: 74px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.sales-summary-strip div {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "icon label" "icon value" "icon meta";
  align-items: center;
  column-gap: 10px;
}

.sales-summary-strip span {
  grid-area: icon;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--sales-blue);
  background: #eff6ff;
}

.sales-summary-strip strong {
  grid-area: value;
  color: #111827;
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-summary-strip small {
  grid-area: label;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.sales-summary-strip em {
  grid-area: meta;
  color: #6b7280;
  font-style: normal;
  font-size: 11px;
}

.sales-center .quick-item {
  padding: 9px 10px;
}

.report-block {
  align-content: start;
}

.report-block .panel-head {
  margin-bottom: 10px;
}

.travel-ops-center .panel-head {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.travel-ops-center .panel-head::before {
  align-self: stretch;
  min-height: 42px;
}

.travel-ops-center .panel-head h2 {
  text-align: left;
  font-size: 20px;
}

.travel-ops-center .panel-head .hint {
  display: block;
  margin-top: 3px;
}

.report-links {
  display: grid;
  gap: 8px;
}

.reports-card-list {
  gap: 10px;
}

.report-launch-card {
  border: 1px solid #d7e1ee;
  border-radius: 7px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.report-launch-card h3 {
  margin: 0;
  color: #102f50;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 850;
}

.report-launch-card p {
  margin: 3px 0 5px;
  color: #526985;
  font-size: 12px;
  line-height: 1.35;
}

.report-launch-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.report-launch-action .workflow-link {
  min-width: 74px;
  text-align: center;
  justify-content: center;
}

.report-link-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.report-link-disabled:hover {
  border-color: var(--line);
  color: var(--ink);
  background: #ffffff;
}

.statement-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 10px;
  margin: 12px 0;
}

.net-party-filters {
  grid-template-columns: minmax(220px, 1.35fr) minmax(135px, 0.7fr) minmax(220px, 1.15fr) minmax(135px, 0.65fr) minmax(135px, 0.65fr) auto auto;
  align-items: end;
}

.net-party-filters label,
.net-party-filters .btn {
  min-width: 0;
}

.net-party-filters .btn {
  height: 42px;
  white-space: nowrap;
}

.statement-report {
  display: grid;
  gap: 14px;
}

.statement-title-row,
.statement-company-header,
.statement-customer-card,
.statement-footer {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.statement-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.statement-title-row h2 {
  margin: 4px 0 6px;
  color: var(--brand-dark);
  font-size: 26px;
}

.statement-title-row p {
  margin: 0;
  color: var(--muted);
}

.statement-company-header {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(130px, 0.65fr));
  gap: 12px;
  padding: 14px;
}

.statement-company-header div,
.statement-customer-card div {
  display: grid;
  gap: 3px;
  align-content: start;
}

.statement-company-header span,
.statement-customer-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.statement-company-header strong,
.statement-customer-card strong {
  color: var(--brand-dark);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.statement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.statement-customer-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  padding: 14px;
}

.statement-filters-pro {
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(140px, 0.8fr)) auto;
  align-items: end;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.statement-filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
  min-width: 220px;
  white-space: nowrap;
}

.statement-filter-actions .btn {
  flex: 0 0 auto;
  min-width: 102px;
}

.all-sales-report-panel {
  padding: 8px;
  margin-bottom: 6px;
}

.all-sales-report-panel .panel-head {
  display: none;
}

.all-sales-report-panel .panel-head h2 {
  font-size: 22px;
}

.all-sales-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(145px, 0.85fr) minmax(150px, 0.85fr) minmax(220px, 1.2fr) minmax(132px, 0.72fr) minmax(132px, 0.72fr) minmax(190px, auto);
  gap: 8px;
  align-items: end;
  padding: 8px;
}

.all-sales-filters label {
  gap: 4px;
  min-width: 0;
}

.all-sales-filters input,
.all-sales-filters select {
  min-height: 34px;
  padding: 6px 8px;
  min-width: 0;
}

.all-sales-filters .search-wide {
  grid-column: auto;
}

.all-sales-filters datalist {
  display: none;
}

.all-sales-filters .customer-filter-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
  gap: 6px;
  align-items: end;
  justify-content: flex-end;
  white-space: nowrap;
}

.all-sales-filters .btn {
  min-height: 34px;
  width: 100%;
  padding-inline: 8px;
}

.all-sales-metrics {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.all-sales-metrics .metric {
  min-height: 70px;
  min-width: 0;
  padding: 8px 10px;
  gap: 3px;
}

.all-sales-metrics .metric strong {
  font-size: 20px;
  line-height: 1.15;
}

.all-sales-metrics .metric .hint {
  font-size: 12px;
  line-height: 1.25;
}

.all-sales-register-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 6px;
  padding: 0 2px;
}

.all-sales-register-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.all-sales-register-wrap {
  margin-top: 4px;
  max-height: calc(100vh - 330px);
  overflow-x: hidden;
  overflow-y: auto;
}

.all-sales-register-wrap .invoice-register-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.all-sales-register-wrap .invoice-register-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.all-sales-register-wrap .invoice-register-table th {
  padding: 6px 5px;
  font-size: 9.5px;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 0;
}

.all-sales-register-wrap .invoice-register-table td {
  padding: 7px 5px;
  font-size: 10.8px;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(1),
.all-sales-register-wrap .invoice-register-table td:nth-child(1) {
  width: 8%;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(2),
.all-sales-register-wrap .invoice-register-table td:nth-child(2) {
  width: 10%;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(3),
.all-sales-register-wrap .invoice-register-table td:nth-child(3) {
  width: 9%;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(4),
.all-sales-register-wrap .invoice-register-table td:nth-child(4) {
  width: 10%;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(5),
.all-sales-register-wrap .invoice-register-table td:nth-child(5) {
  width: 14%;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(6),
.all-sales-register-wrap .invoice-register-table td:nth-child(6) {
  width: 17%;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(7),
.all-sales-register-wrap .invoice-register-table td:nth-child(7) {
  width: 7%;
  text-align: left;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(8),
.all-sales-register-wrap .invoice-register-table td:nth-child(8) {
  width: 10%;
  text-align: right;
}

.all-sales-register-wrap .invoice-register-table th:nth-child(9),
.all-sales-register-wrap .invoice-register-table td:nth-child(9) {
  width: 15%;
  text-align: left;
}

.all-sales-register-wrap .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.all-sales-register-wrap .btn.small {
  min-height: 28px;
  width: 100%;
  padding: 0 6px;
  font-size: 10.5px;
}

.all-sales-register-wrap [data-correct-invoice],
.all-sales-register-wrap [data-clone-document] {
  grid-column: 1 / -1;
}

.statement-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
}

.statement-summary-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.statement-summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.statement-summary-card strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.customer-ledger-statement .statement-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-ledger-statement .statement-title-row .eyebrow {
  font-size: 10px;
}

.customer-ledger-statement .statement-title-row h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.customer-ledger-statement .statement-title-row p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.25;
}

.customer-ledger-statement .statement-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.customer-ledger-statement .statement-actions .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.customer-ledger-statement .statement-actions .btn.icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.customer-ledger-statement .statement-filters-pro {
  grid-template-columns: minmax(230px, 1.2fr) 150px 150px minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto;
  gap: 8px;
  margin: 8px 0;
  padding: 8px;
}

.customer-ledger-statement .statement-filters-pro label {
  font-size: 11px;
}

.customer-ledger-statement .statement-filters-pro input,
.customer-ledger-statement .statement-filters-pro select {
  min-height: 34px;
  padding: 6px 10px;
}

.customer-ledger-statement .statement-filter-actions {
  min-width: 180px;
  gap: 6px;
}

.customer-ledger-statement .statement-filter-actions .btn {
  min-height: 34px;
  min-width: 86px;
  padding: 6px 10px;
}

.customer-ledger-statement .statement-summary-grid {
  grid-template-columns: repeat(9, minmax(110px, 1fr));
  gap: 8px;
}

.customer-ledger-statement .statement-summary-card {
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
}

.customer-ledger-statement .statement-summary-card span {
  font-size: 10px;
  line-height: 1.15;
}

.customer-ledger-statement .statement-summary-card strong {
  font-size: 16px;
  line-height: 1.15;
}

.mini-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.mini-summary-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbff;
}

.mini-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-summary-grid strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.statement-summary-card.debit {
  border-color: #fecaca;
  background: #fff7f7;
}

.statement-summary-card.credit {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.statement-table-wrap {
  max-height: 56vh;
  overflow: auto;
}

.statement-print-table-wrap {
  display: none;
}

.statement-table {
  min-width: 980px;
}

.statement-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4fb;
}

.statement-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.statement-table tbody tr:hover {
  background: #eef6ff;
}

.statement-table td:nth-child(3) {
  min-width: 220px;
  white-space: normal;
}

.statement-balance-badge {
  display: inline-block;
  justify-items: end;
  font-weight: 900;
  white-space: nowrap;
}

.statement-balance-badge.debit {
  color: #b42318;
}

.statement-balance-badge.credit {
  color: #047857;
}

.statement-balance-badge.neutral {
  color: #475569;
}

.statement-row-actions summary {
  font-size: 12px;
  padding: 6px 8px;
}

.statement-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
}

.statement-empty h3,
.statement-empty p {
  margin: 0;
}

.statement-empty h3 {
  color: var(--brand-dark);
}

.statement-empty p {
  color: var(--muted);
}

.statement-footer {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.statement-footer > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand-dark);
}

.statement-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.referral-commission-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin: 16px 0 8px;
}

.referral-commission-heading h3 {
  margin: 0;
  font-size: 18px;
}

.referral-commission-heading span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 18px;
  padding-top: 24px;
}

.signature-grid span {
  display: block;
  border-top: 1px solid var(--ink);
  padding-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signature-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 12px;
}

.dashboard-block:nth-child(3) .dashboard-metrics {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.metric,
.panel,
.table-wrap,
.modal {
  background: var(--soft-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel,
.table-wrap,
.modal {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.metric {
  padding: 13px;
  display: grid;
  gap: 6px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  font-size: 21px;
  letter-spacing: 0;
  color: var(--ink);
}

.metric.clickable {
  cursor: pointer;
}

.metric.clickable:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.12);
}

.amount-stack {
  display: grid;
  gap: 3px;
  justify-items: end;
  line-height: 1.25;
}

.amount-stack span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-register {
  display: grid;
  gap: 16px;
}

.customer-register-compact {
  gap: 12px;
}

.customer-register-hero,
.customer-register-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.customer-register-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.customer-register-hero h2 {
  margin: 4px 0 6px;
  font-size: 28px;
  color: var(--brand-dark);
}

.customer-register-hero p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.customer-register-actions,
.customer-export-actions,
.customer-filter-buttons,
.bulk-actions,
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-register-hero .customer-register-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 7px;
}

.customer-register-hero .customer-register-actions .btn {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.customer-register-hero .customer-register-actions .btn svg {
  width: 15px;
  height: 15px;
}

.customer-export-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.customer-export-actions .btn {
  white-space: nowrap;
}

.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.customer-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.customer-summary-action {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.customer-summary-action:hover,
.customer-summary-action:focus-visible {
  border-color: rgba(23, 59, 99, 0.42);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.customer-summary-card > span {
  display: none;
}

.customer-summary-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-summary-card > div small:first-child,
.customer-summary-card > div em:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-summary-card > div small:last-child,
.customer-summary-card > div em:last-child {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
}

.customer-summary-card svg {
  width: 20px;
  height: 20px;
}

.customer-summary-card small,
.customer-summary-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.customer-summary-card strong {
  display: block;
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

.customer-register-panel {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.customer-register-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

.customer-register-toolbar > div:first-child {
  min-width: 260px;
}

.customer-register-toolbar h3 {
  margin: 0 0 4px;
  color: var(--brand-dark);
}

.customer-register-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.customer-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 0.7fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.customer-filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-filter-grid input,
.customer-filter-grid select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
}

.customer-filter-grid input:focus,
.customer-filter-grid select:focus {
  outline: 2px solid rgba(23, 59, 99, 0.18);
  border-color: var(--brand);
}

.bulk-actions {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.bulk-actions span {
  color: var(--muted);
  font-size: 13px;
  margin-right: auto;
}

.customer-table-wrap {
  display: block;
  overflow-x: hidden !important;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.customer-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.customer-table th,
.customer-table td {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.customer-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4fb;
  color: #496685;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: normal;
}

.customer-table th,
.customer-table td {
  padding: 8px 7px;
  font-size: 11px;
  line-height: 1.28;
}

.customer-table th:first-child,
.customer-table td:first-child {
  width: 2.5%;
}

.customer-table th:nth-child(2),
.customer-table td:nth-child(2) {
  width: 7.5%;
}

.customer-table th:nth-child(3),
.customer-table td:nth-child(3) {
  width: 19%;
}

.customer-table th:nth-child(4),
.customer-table td:nth-child(4) {
  width: 16%;
}

.customer-table th:nth-child(5),
.customer-table td:nth-child(5) {
  width: 14%;
}

.customer-table th:nth-child(6),
.customer-table td:nth-child(6) {
  width: 8%;
}

.customer-table th:nth-child(7),
.customer-table td:nth-child(7) {
  width: 8%;
}

.customer-table th:nth-child(8),
.customer-table td:nth-child(8) {
  width: 6%;
}

.customer-table th:nth-child(9),
.customer-table td:nth-child(9) {
  width: 12%;
}

.customer-table th:nth-child(10),
.customer-table td:nth-child(10) {
  width: 7%;
}

.customer-table .customer-action-trigger {
  min-width: 58px;
  padding-inline: 8px;
  white-space: nowrap;
  box-sizing: border-box;
}

.vendor-table th:first-child,
.vendor-table td:first-child {
  width: 7.5%;
}

.vendor-table th:nth-child(2),
.vendor-table td:nth-child(2) {
  width: 14%;
}

.vendor-table th:nth-child(3),
.vendor-table td:nth-child(3) {
  width: 9%;
}

.vendor-table th:nth-child(4),
.vendor-table td:nth-child(4) {
  width: 15%;
}

.vendor-table th:nth-child(5),
.vendor-table td:nth-child(5) {
  width: 10%;
}

.vendor-table th:nth-child(6),
.vendor-table td:nth-child(6) {
  width: 11%;
}

.vendor-table th:nth-child(7),
.vendor-table td:nth-child(7) {
  width: 6.5%;
}

.vendor-table th:nth-child(8),
.vendor-table td:nth-child(8) {
  width: 6%;
}

.vendor-table th:nth-child(9),
.vendor-table td:nth-child(9) {
  width: 8%;
}

.vendor-table th:nth-child(10),
.vendor-table td:nth-child(10) {
  width: 8%;
}

.vendor-table th:nth-child(11),
.vendor-table td:nth-child(11) {
  width: 5%;
}

.customer-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.customer-table tbody tr:hover {
  background: #eef6ff;
}

.customer-table td {
  vertical-align: top;
  overflow: visible;
}

.strong-link {
  color: var(--brand-dark);
  font-weight: 900;
}

.subtext {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.code-pill,
.customer-status-badge,
.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.code-pill {
  color: var(--brand);
  background: rgba(23, 59, 99, 0.08);
  max-width: 100%;
  padding: 5px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-code-text {
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.customer-status-badge {
  padding: 5px 9px;
}

.customer-status-badge.active {
  color: #166534;
  background: #dcfce7;
}

.customer-status-badge.inactive {
  color: #475569;
  background: #e2e8f0;
}

.customer-status-badge.blocked {
  color: #991b1b;
  background: #fee2e2;
}

.balance-pill {
  justify-content: end;
  min-width: 74px;
  padding: 6px 8px;
  font-size: 11px;
}

.balance-pill span {
  font-size: 10px;
  text-transform: uppercase;
}

.balance-pill.receivable {
  color: #b42318;
  background: #fee2e2;
}

.balance-pill.payable {
  color: #047857;
  background: #d1fae5;
}

.balance-pill.zero {
  color: #475569;
  background: #f1f5f9;
}

.whatsapp-link {
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.action-dropdown {
  position: relative;
  overflow: visible;
}

.action-dropdown summary {
  min-width: 68px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--brand);
  font-weight: 900;
  font-size: 12px;
  padding: 7px 8px;
  text-align: center;
  white-space: nowrap;
}

.action-dropdown summary::-webkit-details-marker {
  display: none;
}

.action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  width: 190px;
  display: grid;
  gap: 2px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
}

.action-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 6px;
  padding: 8px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.customer-row-popover {
  display: inline-block;
}

.customer-row-popover[open] {
  z-index: 90;
}

.customer-action-list {
  width: 170px;
  padding: 5px;
}

.customer-action-list button {
  min-height: 26px;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  display: block;
  width: 100%;
}

.action-menu button:hover {
  background: #edf5ff;
  color: var(--brand);
}

.action-menu button.danger {
  color: #b42318;
}

.action-menu svg {
  width: 15px;
  height: 15px;
}

.customer-action-trigger {
  width: 100%;
  min-width: 0;
  padding-inline: 7px;
}

.floating-action-menu {
  position: fixed;
  z-index: 3000;
  width: 168px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #cbd8e8;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.floating-action-menu button {
  display: block;
  width: 100%;
  min-height: 25px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  padding: 4px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.floating-action-menu button:hover,
.floating-action-menu button:focus {
  background: #eaf2fb;
  outline: none;
}

.action-popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-popup-btn {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
  font-weight: 850;
}

.action-popup-btn:hover {
  background: #eef5ff;
  border-color: var(--brand);
}

.action-popup-btn svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
  flex: 0 0 18px;
}

.action-popup-btn.danger {
  color: #b42318;
}

.action-popup-btn.danger svg {
  color: #b42318;
}

.customer-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  text-align: center;
  color: var(--muted);
}

.customer-empty-state h3 {
  margin: 4px 0 0;
  color: var(--brand-dark);
}

.customer-empty-state p {
  margin: 0 0 6px;
}

.customer-empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--brand);
}

.pagination-bar {
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.pagination-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.pagination-bar select {
  height: 34px;
  width: 84px;
  min-width: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 0 30px 0 10px;
  color: var(--brand-dark);
  font-weight: 900;
}

.pagination-count {
  color: var(--brand-dark);
  font-weight: 800;
  white-space: nowrap;
}

.rows-per-page {
  justify-self: center;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.page-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--brand-dark);
  font-weight: 900;
}

.customer-card-list {
  display: none;
}

.customer-mobile-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.customer-mobile-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.customer-mobile-card > div:first-child > div {
  margin-right: auto;
}

.customer-mobile-card > div:first-child span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.customer-mobile-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.customer-mobile-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-mobile-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.customer-balance-summary table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.customer-balance-summary {
  overflow-x: hidden;
}

.customer-balance-summary-main {
  max-height: none;
  height: auto;
  overflow: visible;
}

.customer-balance-summary th,
.customer-balance-summary td {
  padding: 9px 8px;
  vertical-align: top;
  white-space: normal;
  line-height: 1.28;
}

.customer-balance-summary-main th,
.customer-balance-summary-main td {
  font-size: 12px;
}

.customer-balance-summary-main th:nth-child(1),
.customer-balance-summary-main td:nth-child(1) {
  width: 22%;
}

.customer-balance-summary-main th:nth-child(2),
.customer-balance-summary-main td:nth-child(2),
.customer-balance-summary-main th:nth-child(6),
.customer-balance-summary-main td:nth-child(6),
.customer-balance-summary-main th:nth-child(8),
.customer-balance-summary-main td:nth-child(8) {
  width: 10%;
}

.customer-balance-summary-main th:nth-child(3),
.customer-balance-summary-main td:nth-child(3),
.customer-balance-summary-main th:nth-child(4),
.customer-balance-summary-main td:nth-child(4),
.customer-balance-summary-main th:nth-child(5),
.customer-balance-summary-main td:nth-child(5),
.customer-balance-summary-main th:nth-child(7),
.customer-balance-summary-main td:nth-child(7) {
  width: 12%;
}

.customer-balance-summary .amount {
  white-space: nowrap;
  text-align: right;
}

.customer-balance-summary .link-button {
  white-space: normal;
  text-align: inherit;
  line-height: 1.2;
}

.customer-balance-summary .npp-document-context-row td {
  background: #f3f8ff;
  border-left: 3px solid #93b4d6;
  font-weight: 700;
}

.customer-balance-summary .npp-document-context-row td:first-child {
  color: var(--muted);
}

.ar-dashboard {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.ar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.ar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
}

.ar-toolbar h2 {
  margin: 2px 0 4px;
  color: var(--brand-dark);
  font-size: 22px;
}

.ar-toolbar p {
  margin: 0;
  color: var(--muted);
}

.ar-filters {
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) minmax(140px, 0.85fr) minmax(130px, 0.8fr) minmax(135px, 0.75fr) minmax(135px, 0.75fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.ar-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ar-filters input,
.ar-filters select {
  min-height: 38px;
}

.ar-table {
  font-size: 13px;
}

.ar-table th,
.ar-table td {
  padding: 10px 8px;
  vertical-align: top;
}

.ar-table th {
  white-space: normal;
}

.ar-table .amount {
  white-space: nowrap;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e8eef5;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.strong-link {
  font-weight: 900;
  text-align: left;
}

.balance-link {
  font-weight: 900;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.banking-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.banking-command-center {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.4fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.banking-command-center h2 {
  margin: 2px 0 4px;
  color: var(--brand-dark);
  font-size: 22px;
}

.banking-command-center p {
  margin: 0;
  color: var(--muted);
}

.banking-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.banking-section-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
}

.banking-section-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.banking-section-tabs button:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.1);
}

.banking-accounts-panel {
  align-content: start;
}

.bank-account-list {
  display: grid;
  gap: 8px;
}

.banking-filter-strip,
.banking-register-filters {
  display: grid;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.banking-filter-strip {
  grid-template-columns: repeat(2, minmax(120px, 1fr)) auto;
}

.banking-register-filters {
  grid-template-columns: repeat(2, minmax(120px, 0.7fr)) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(220px, 1.2fr) repeat(4, auto);
}

.banking-filter-strip label,
.banking-register-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.banking-filter-strip input,
.banking-register-filters input,
.banking-register-filters select {
  min-height: 36px;
}

.bank-import-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.bank-import-preview > strong,
.cheque-columns > div > strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.mini-table-wrap {
  max-height: 180px;
}

.cheque-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cheque-item {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto minmax(250px, auto);
}

.bank-status-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.bank-status-badge.matched,
.bank-status-badge.cleared {
  background: #dcfce7;
  color: #047857;
}

.bank-status-badge.unmatched,
.bank-status-badge.pending {
  background: #fff7ed;
  color: #b45309;
}

.bank-status-badge.bounced {
  background: #fee2e2;
  color: #b42318;
}

.bank-status-badge.cancelled {
  background: #e5e7eb;
  color: #475569;
}

.bank-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 10px 12px;
}

.bank-account-row.cash {
  background: #eef5ff;
  border-color: rgba(23, 59, 99, 0.22);
}

.bank-account-row.clickable {
  cursor: pointer;
}

.bank-account-row.clickable:hover,
.bank-account-row.clickable:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.12);
  outline: none;
}

.bank-account-row strong {
  display: block;
  font-size: 14px;
}

.bank-account-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.erp-admin-center {
  display: grid;
  gap: 12px;
}

.erp-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.erp-admin-toolbar h2 {
  margin: 2px 0 0;
  color: #102f50;
  font-size: 24px;
  line-height: 1.1;
}

.erp-admin-toolbar p {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.erp-admin-toolbar-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  white-space: nowrap;
}

.erp-admin-search label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 4px;
  text-transform: uppercase;
}

.erp-admin-search input {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
}

.erp-admin-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.erp-admin-kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  min-height: 74px;
  display: grid;
  align-content: start;
  gap: 2px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.erp-admin-kpi .nav-icon {
  color: var(--brand);
  background: #eaf2fb;
  border-radius: 8px;
  box-sizing: content-box;
  padding: 5px;
  width: 16px;
  height: 16px;
}

.erp-admin-kpi span,
.erp-admin-kpi small {
  color: var(--muted);
  font-weight: 800;
}

.erp-admin-kpi strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.erp-admin-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 10px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
  -webkit-overflow-scrolling: touch;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.settings-status-card {
  min-height: 76px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  padding: 9px 10px;
  display: grid;
  align-content: start;
  gap: 5px;
}

.settings-status-card > span {
  color: #102f50;
  font-size: 12px;
  font-weight: 900;
}

.settings-status-card .settings-status {
  justify-self: start;
}

.settings-status-card small {
  color: #637b96;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
}

.erp-admin-health,
.erp-admin-section {
  background: var(--soft-panel);
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}

.settings-favorite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d7e4f2;
  background: #fff;
  border-radius: 8px;
  color: var(--brand-dark);
  font-weight: 900;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.settings-favorite:hover,
.settings-favorite:focus {
  border-color: var(--brand);
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.1);
}

.erp-admin-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 12px;
  align-items: start;
}

.erp-admin-groups {
  display: grid;
  gap: 10px;
}

.erp-admin-section {
  padding: 0;
  background: #ffffff;
  overflow: hidden;
}

.erp-admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d6e2f0;
  padding: 10px 12px;
  margin-bottom: 0;
  background: #dfeaf6;
}

.erp-admin-section-head h2,
.erp-admin-health h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 14px;
}

.erp-admin-section-head span,
.erp-admin-health-head span {
  color: #637b96;
  font-size: 11px;
  font-weight: 800;
}

.erp-admin-card-grid,
.erp-admin-list {
  display: grid;
  gap: 0;
}

.settings-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 74px;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid #dbe6f2;
  background: #f3f7fc;
  color: #4f6783;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.settings-card.erp-admin-card {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #dbe6f2;
  border-radius: 0;
  background: #fff;
  padding: 6px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 74px;
  align-items: center;
  gap: 8px;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.settings-card.erp-admin-card:hover:not(:disabled) {
  background: #f6faff;
  box-shadow: inset 3px 0 0 var(--brand);
  transform: none;
}

.settings-card.erp-admin-card:disabled {
  cursor: default;
  opacity: 0.78;
}

.settings-card-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.settings-card-body strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.settings-card-body small {
  color: var(--muted);
  line-height: 1.2;
  font-weight: 700;
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.compact-settings-list .settings-card-body small {
  display: none;
}

.settings-status {
  align-self: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  padding: 4px 6px;
  white-space: nowrap;
  justify-self: start;
}

.settings-row-action {
  border: 0;
  border-radius: 0;
  color: #1d4ed8;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  padding: 0;
  white-space: nowrap;
  justify-self: end;
}

.settings-status.ok {
  background: #dcfce7;
  color: #047857;
}

.settings-status.pending {
  background: #fff7ed;
  color: #b45309;
}

.settings-status.warn {
  background: #fee2e2;
  color: #b42318;
}

.settings-tree-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 12px;
  align-items: start;
}

.settings-tree-panel {
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
  padding: 10px 12px;
  font-family: Consolas, "Courier New", monospace;
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
}

.settings-tree-root {
  margin-bottom: 4px;
  font-weight: 700;
}

.settings-tree-group {
  display: grid;
  gap: 1px;
  margin-top: 6px;
}

.settings-tree-heading {
  position: relative;
  padding-left: 18px;
  font-weight: 700;
}

.settings-tree-heading::before {
  content: "├─";
  position: absolute;
  left: 0;
  color: #111827;
  font-weight: 400;
}

.settings-tree-children {
  display: grid;
  gap: 0;
  margin-left: 18px;
  border-left: 1px solid #111827;
}

.settings-tree-item {
  display: grid;
  grid-template-columns: 26px minmax(0, max-content) auto;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 1px 4px 1px 0;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  text-align: left;
}

.settings-tree-item:hover:not(:disabled),
.settings-tree-item:focus-visible:not(:disabled) {
  color: var(--brand);
  outline: none;
  text-decoration: underline;
}

.settings-tree-item:disabled {
  opacity: 0.7;
  cursor: default;
}

.settings-tree-branch {
  margin-left: -1px;
  background: #ffffff;
}

.settings-tree-title {
  white-space: nowrap;
}

.settings-tree-item .settings-status {
  margin-left: 8px;
  transform: scale(0.9);
  transform-origin: left center;
}

.settings-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

.settings-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-dashboard-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 12px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.settings-dashboard-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #d7e4f2;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.settings-dashboard-card-head:hover strong,
.settings-dashboard-card-head:focus-visible strong {
  color: var(--brand);
}

.settings-dashboard-card-head:focus-visible,
.settings-dashboard-item:focus-visible {
  outline: 3px solid rgba(27, 79, 125, 0.2);
  outline-offset: 2px;
}

.settings-dashboard-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e8f1fb;
  color: var(--brand);
}

.settings-dashboard-icon svg {
  width: 18px;
  height: 18px;
}

.settings-dashboard-card-head strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.settings-dashboard-card-head small,
.settings-dashboard-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.settings-dashboard-list {
  display: grid;
  gap: 7px;
}

.settings-dashboard-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.settings-dashboard-item:hover:not(:disabled) {
  border-color: #9fc1e6;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.055);
  transform: translateY(-1px);
}

.settings-dashboard-item:disabled {
  opacity: 0.72;
  cursor: default;
}

.settings-dashboard-item-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.settings-dashboard-item small {
  grid-column: 1 / -1;
}

.settings-dashboard-item .settings-status,
.settings-dashboard-card-head .settings-status {
  justify-self: end;
}

.erp-admin-health {
  position: sticky;
  top: 10px;
  padding: 12px;
  display: grid;
  gap: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.erp-admin-health-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 3px;
}

.erp-health-row {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  align-items: start;
  padding: 7px;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  background: #fff;
}

.erp-health-row strong,
.erp-health-row small {
  display: block;
}

.erp-health-row strong {
  color: var(--ink);
  font-size: 12px;
}

.erp-health-row small {
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.2;
  font-size: 11px;
}

.erp-health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  background: #f59e0b;
}

.erp-health-dot.ok {
  background: #10b981;
}

.erp-admin-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 2px;
}

.migration-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 14px;
  margin-bottom: 14px;
}

.migration-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.migration-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
}

.migration-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.migration-count-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
}

.migration-count-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.migration-count-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.migration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.migration-output {
  min-height: 140px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1f3a;
  color: #eef6ff;
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.erp-health-dot.warn {
  background: #f59e0b;
}

.panel {
  padding: 18px;
}

.compact-action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel p:last-child {
  margin-bottom: 0;
}

.panel-head,
.table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.panel-head-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.panel-head-actions .btn:not(.icon) {
  min-height: 36px;
  padding-inline: 14px;
}

.panel-head:has(> .panel-head-actions [data-modal-return-view]) {
  position: relative;
}

.panel-head:has(> .panel-head-actions [data-modal-return-view]) > div:first-child {
  margin-left: 126px;
}

.panel-head > .panel-head-actions [data-modal-return-view] {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.compact-action-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-action-panel .panel-head-actions {
  margin-left: auto;
}

.chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 20px;
}

.bar {
  display: grid;
  align-content: end;
  gap: 8px;
  min-width: 0;
}

.bar-fill {
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: var(--brand);
}

.bar-fill.expense {
  background: var(--gold);
}

.bar-fill.cash {
  background: #2563eb;
}

.bar-fill.ar {
  background: #173b63;
}

.chart-compact {
  grid-template-columns: repeat(4, minmax(90px, 1fr));
}

.bar small {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.quick-list {
  display: grid;
  gap: 10px;
}

.quick-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.quick-item.clickable {
  cursor: pointer;
}

.quick-item.clickable:hover {
  border-color: var(--brand);
  background: #eef5ff;
}

.quick-item strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.quick-item span {
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: inline-grid;
  gap: 6px;
  align-items: start;
  white-space: nowrap;
}

.row-action-line {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.row-actions-single {
  display: inline-flex;
  align-items: center;
}

.coa-action-cell {
  width: 1%;
  white-space: nowrap;
}

.coa-row-actions.row-actions-single {
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
}

.coa-row-actions .btn.small {
  min-height: 30px;
  padding-inline: 8px;
  white-space: nowrap;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.ledger-table .account-drill,
.ledger-table .amount-drill {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ledger-table .account-drill:hover,
.ledger-table .amount-drill:hover,
.ledger-table .account-drill:focus-visible,
.ledger-table .amount-drill:focus-visible {
  color: var(--brand-dark);
}

.record-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.record-line {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.erp-generic-record-view .record-line {
  background: #fbfdff;
  border-color: #d6e3f1;
  border-radius: 7px;
  min-height: 54px;
  padding: 9px 10px;
}

.record-line.full,
.print-doc,
.totals-box {
  grid-column: 1 / -1;
}

.record-line strong,
.totals-box span {
  color: var(--muted);
  font-size: 12px;
}

.erp-generic-record-view .record-line strong {
  color: #526b8e;
  font-weight: 800;
  text-transform: uppercase;
}

.erp-generic-record-view .record-line span {
  color: #172033;
  font-size: 13px;
  font-weight: 750;
}

.print-head {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.print-head h2,
.print-head p {
  margin: 0;
}

.print-company {
  text-align: center;
}

.print-document {
  text-align: right;
}

.print-document strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.professional-invoice {
  color: #111827;
  font-size: 12px;
  line-height: 1.35;
}

.invoice-internal-brief {
  margin-top: 6px;
  color: #102f50;
  font-size: 12px;
  font-weight: 500;
}

.invoice-internal-brief strong {
  font-weight: 800;
}

.document-print-only {
  display: none;
}

.invoice-print-preview-view {
  display: grid;
  gap: 16px;
}

.invoice-print-preview-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  margin: 0 auto;
  max-width: 960px;
  padding: 18px;
  width: min(100%, 960px);
}

.invoice-print-preview-shell .professional-invoice {
  margin: 0 auto;
}

.invoice-print-head {
  grid-template-columns: 112px 1fr 190px;
  align-items: center;
  border-bottom: 2px solid var(--brand-dark);
  padding-bottom: 12px;
}

.professional-invoice .brand-mark,
.professional-invoice .brand-logo-img {
  height: 92px;
  width: 92px;
}

.professional-invoice .brand-logo-img {
  display: block;
  object-fit: contain;
  object-position: center;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.print-document span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.invoice-print-summary {
  display: grid;
  grid-template-columns: 1.2fr 1fr 116px;
  gap: 12px;
  margin: 14px 0;
  align-items: stretch;
}

.invoice-party-box,
.invoice-meta-box,
.invoice-qr-box,
.amount-words,
.payment-info-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.invoice-party-box {
  display: grid;
  gap: 3px;
}

.invoice-party-box h3 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.invoice-meta-box,
.payment-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
}

.invoice-meta-box div {
  display: grid;
  gap: 2px;
}

.invoice-meta-box span,
.payment-info-grid span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.invoice-qr-box {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.customer-profile-document .invoice-print-summary {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 128px;
}

.customer-profile-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.customer-profile-sections .print-detail-block {
  grid-column: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-profile-sections .print-detail-block:nth-child(3),
.customer-profile-wide {
  grid-column: 1 / -1;
}

.customer-profile-document .record-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-profile-document .record-line {
  background: #fbfdff;
  border-color: #d6e3f1;
  border-radius: 7px;
  min-height: 52px;
  padding: 9px 10px;
}

.customer-profile-document .record-line strong {
  color: #526b8e;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-profile-document .record-line span {
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.qr-svg {
  width: 78px;
  height: 78px;
  border: 1px solid var(--line);
  padding: 4px;
  background: #fff;
}

.invoice-print-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  margin-top: 12px;
  align-items: start;
}

.invoice-print-footer-grid .print-totals {
  grid-column: auto;
  justify-self: stretch;
  align-self: start;
}

.invoice-left-notes {
  display: grid;
  gap: 10px;
}

.amount-words p {
  margin: 5px 0 0;
  font-weight: 700;
}

.payment-info-box strong {
  display: block;
  margin-bottom: 7px;
}

.signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  margin-top: 28px;
  break-inside: avoid;
}

.signature-row div {
  border-top: 1px solid #111827;
  padding-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.signature-row strong {
  color: #111827;
  font-size: 12px;
  text-transform: none;
}

.cargo-freight-invoice .cargo-charge-table {
  table-layout: fixed;
  width: 100%;
}

.cargo-freight-invoice .cargo-charge-table th,
.cargo-freight-invoice .cargo-charge-table td {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.cargo-freight-invoice .cargo-charge-table .amount {
  text-align: right;
}

.cargo-freight-invoice .cargo-invoice-meta {
  grid-template-columns: 1fr;
}

.cargo-freight-invoice .cargo-party-summary {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.cargo-party-selector-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cargo-party-selector {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cargo-party-selector label {
  margin: 0;
}

.cargo-party-preview {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.cargo-party-preview-line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.cargo-party-preview span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.cargo-party-preview strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cargo-party-preview-cell {
  min-height: 58px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.cargo-party-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cargo-notify-agent-memo {
  display: block;
  margin-top: 12px;
}

.cargo-notify-agent-memo textarea {
  min-height: 84px;
  resize: vertical;
}

.cargo-party-quick-add-form textarea {
  min-height: 76px;
}

.cargo-party-role-options {
  display: grid;
  gap: 8px;
}

.cargo-party-role-options > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .invoice-print-head,
  .invoice-print-summary,
  .invoice-print-footer-grid,
  .signature-row {
    grid-template-columns: 1fr;
  }

  .print-document,
  .print-company {
    text-align: left;
  }

  .invoice-qr-box {
    justify-items: start;
    text-align: left;
  }
}

.print-detail-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.print-detail-block h3 {
  margin: 0;
  font-size: 15px;
}

.totals-box {
  justify-self: end;
  min-width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.totals-box div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.totals-box .grand {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 18px;
}

.total-edit {
  width: 130px;
  max-width: 100%;
  padding: 7px 8px;
  text-align: right;
}

.total-edit.small {
  width: 76px;
}

.total-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.toolbar {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.toolbar .filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  width: 190px;
}

.approval-dashboard {
  display: grid;
  gap: 14px;
}

.approval-command {
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  padding: 14px 16px;
}

.approval-command h2 {
  margin: 2px 0 0;
  color: #102f50;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 850;
}

.approval-command p {
  margin: 4px 0 0;
  color: #58708f;
  font-size: 13px;
  font-weight: 650;
}

.approval-dashboard .toolbar {
  align-items: flex-start;
  padding: 2px 0 0;
}

.approval-dashboard .table-head {
  margin-bottom: 0;
  padding-bottom: 8px;
}

.approval-dashboard .table-head h2 {
  font-size: 24px;
}

.approval-dashboard .toolbar .filters {
  align-items: center;
  justify-content: flex-end;
}

.approval-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.approval-tab {
  min-width: 144px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #e5eaf2;
  color: #102f50;
  cursor: pointer;
  font-weight: 800;
  padding: 6px 16px;
}

.approval-tab:hover,
.approval-tab:focus {
  border-color: #bfd3ea;
  color: #102f50;
  outline: none;
}

.approval-tab.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: inset 0 3px 0 #173b63;
}

.approval-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(135px, 1fr));
  gap: 10px;
}

.approval-kpi-grid .metric {
  min-height: 92px;
  padding: 12px 12px 11px;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.approval-kpi-grid button.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.approval-kpi-grid button.metric:hover,
.approval-kpi-grid button.metric:focus {
  border-color: #9fbbd8;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.approval-kpi-grid .metric::before {
  content: "";
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: #173b63;
  opacity: 0.22;
}

.approval-kpi-grid .metric strong {
  font-size: 20px;
  line-height: 1.1;
  color: #102f50;
}

.approval-kpi-grid .metric span {
  color: #5d718c;
  font-size: 11px;
  line-height: 1.25;
}

.approval-filter-panel {
  padding: 14px;
  border-color: #d8e3f0;
  background: #ffffff;
}

.approval-filter-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.approval-filter-title h2 {
  margin: 0;
  font-size: 15px;
  color: #102f50;
}

.approval-filter-title span {
  color: #6a7d94;
  font-size: 12px;
}

.approval-filter-bar {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.approval-filter-bar label {
  display: grid;
  gap: 5px;
  color: #48617d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.approval-filter-bar input,
.approval-filter-bar select {
  width: 100%;
  height: 36px;
  border-color: #ccd8e8;
  font-size: 12px;
}

.approval-filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.approval-filter-actions .btn {
  min-height: 36px;
  white-space: nowrap;
}

.approval-sections {
  gap: 14px;
}

.approval-section {
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.approval-section-head {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.approval-section-head h2 {
  font-size: 18px;
}

.approval-count {
  flex: 0 0 auto;
  border: 1px solid #d8e3f0;
  border-radius: 999px;
  background: #f4f8fc;
  color: #284461;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.approval-table-wrap {
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
}

.approval-table {
  min-width: 820px;
}

.approval-table th,
.approval-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.approval-table thead th {
  background: #eef4fb;
  color: #213a57;
  border-bottom: 1px solid #d7e2ef;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.approval-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.approval-table tbody tr:hover {
  background: #f3f8ff;
}

.approval-table .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.approval-action-cell {
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.approval-action-cell .btn.small {
  min-height: 30px;
  padding: 6px 9px;
}

.approval-empty {
  padding: 22px 16px !important;
  text-align: center;
  color: #60758f;
  background: #fbfdff;
}

.approval-empty strong,
.approval-empty span {
  display: block;
}

.approval-workspace {
  --approval-blue: #2563eb;
  --approval-success: #16a34a;
  --approval-warning: #f59e0b;
  --approval-danger: #dc2626;
  --approval-info: #0891b2;
  color: #111827;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.content:has(.approval-workspace) {
  grid-template-rows: 1fr;
}

.content:has(.approval-workspace) .topbar {
  display: none;
}

.approval-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.approval-workspace-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.approval-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.approval-workspace-head h1 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 700;
}

.approval-workspace-head p {
  margin: 4px 0 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 400;
}

.approval-workspace-head .tenant-context {
  gap: 8px;
}

.approval-workspace-head .tenant-pill {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.approval-workspace-head .hint {
  display: none;
}

.approval-workspace-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.approval-search {
  width: min(330px, 28vw);
  min-width: 220px;
  height: 40px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.approval-search svg {
  width: 15px;
  height: 15px;
  color: #64748b;
}

.approval-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font-size: 13px;
}

.approval-executive-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.approval-workspace-kpi,
.approval-category-card,
.approval-side-card,
.approval-main-table {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.approval-workspace-kpi {
  min-height: 78px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.approval-workspace-kpi > span,
.approval-category-card > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--approval-blue), #0ea5e9);
  flex: 0 0 34px;
}

.approval-workspace-kpi.success > span,
.approval-category-card.success > span {
  background: linear-gradient(135deg, var(--approval-success), #22c55e);
}

.approval-workspace-kpi.warning > span,
.approval-category-card.warning > span {
  background: linear-gradient(135deg, var(--approval-warning), #f97316);
}

.approval-workspace-kpi.danger > span,
.approval-category-card.danger > span {
  background: linear-gradient(135deg, var(--approval-danger), #fb7185);
}

.approval-workspace-kpi div,
.approval-category-card div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.approval-workspace-kpi small,
.approval-workspace-kpi em,
.approval-category-card small,
.approval-category-card em {
  color: #6b7280;
  font-style: normal;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-workspace-kpi strong,
.approval-category-card strong {
  color: #111827;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.05;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.approval-workspace .approval-tabs {
  width: 100%;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.approval-workspace .approval-tab {
  min-width: 120px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #334155;
  box-shadow: none;
  padding: 0 0 11px;
  min-height: 34px;
  font-size: 13px;
}

.approval-workspace .approval-tab.active {
  color: var(--approval-blue);
  box-shadow: inset 0 -3px 0 var(--approval-blue);
}

.approval-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.approval-category-card {
  min-height: 88px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.approval-category-card:hover,
.approval-shortcut:hover,
.approval-side-card .link-button:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.approval-workspace .approval-filter-panel {
  border-radius: 12px;
  border-color: #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.approval-workspace .approval-filter-title h2 {
  font-size: 16px;
  color: #111827;
}

.approval-main-table {
  overflow: hidden;
}

.approval-register-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.approval-main-head {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.approval-main-head h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.approval-main-head p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 12px;
}

.approval-main-head > span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.approval-enterprise-table {
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.approval-enterprise-head,
.approval-enterprise-row {
  display: grid;
  grid-template-columns: 34px minmax(82px, 0.82fr) minmax(100px, 1fr) minmax(74px, 0.62fr) minmax(74px, 0.62fr) minmax(86px, 0.74fr) minmax(92px, 0.72fr) minmax(70px, 0.55fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid #e5e7eb;
}

.approval-enterprise-head {
  min-height: 34px;
  padding: 7px 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.approval-enterprise-row {
  min-height: 42px;
  padding: 7px 12px;
  color: #111827;
  font-size: 12px;
}

.approval-enterprise-row > *,
.approval-enterprise-head > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-enterprise-row strong {
  text-align: right;
  font-weight: 700;
}

.approval-enterprise-row .approval-action-cell {
  justify-content: flex-start;
  overflow: hidden;
}

.approval-enterprise-row .btn.small {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
}

.approval-workspace-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.approval-side-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.approval-side-card h2 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.approval-shortcut {
  min-width: 0;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}

.approval-shortcut svg {
  width: 18px;
  height: 18px;
  color: var(--approval-blue);
}

.approval-side-list {
  display: grid;
  gap: 8px;
}

.approval-side-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.approval-side-item > span,
.approval-insights span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--approval-info);
}

.approval-side-item.warning > span,
.approval-insights span.warning {
  background: var(--approval-warning);
}

.approval-side-item.danger > span,
.approval-insights span.danger {
  background: var(--approval-danger);
}

.approval-side-item strong,
.approval-side-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-side-item strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.approval-side-item small {
  color: #6b7280;
  font-size: 11px;
}

.approval-insights {
  display: grid;
  gap: 9px;
}

.approval-insights div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.approval-insights small {
  color: #374151;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-insights strong {
  color: #111827;
  font-size: 18px;
}

.approval-insights span.success {
  background: var(--approval-success);
}

.approval-insights span.info {
  background: var(--approval-info);
}

.approval-empty-note {
  padding: 16px 12px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}

.approval-empty strong {
  color: #253f5d;
  font-size: 13px;
  margin-bottom: 4px;
}

.approval-empty span {
  font-size: 12px;
}

.banking-toolbar {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.banking-toolbar .table-head {
  min-width: 0;
}

.banking-toolbar .filters {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.banking-toolbar select {
  width: 230px;
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.mini-table th,
.mini-table td {
  padding: 7px 8px;
  font-size: 12px;
}

.journal-register-wrap {
  overflow-x: hidden;
}

.journal-register-table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
  font-size: 13px;
}

.journal-register-table th,
.journal-register-table td {
  padding: 10px 8px;
  vertical-align: top;
}

.journal-register-table th:nth-child(1),
.journal-register-table td:nth-child(1) {
  width: 76px;
}

.journal-register-table th:nth-child(2),
.journal-register-table td:nth-child(2) {
  width: 100px;
}

.journal-register-table th:nth-child(3),
.journal-register-table td:nth-child(3) {
  width: 92px;
}

.journal-register-table th:nth-child(4),
.journal-register-table td:nth-child(4) {
  width: 82px;
}

.journal-register-table th:nth-child(5),
.journal-register-table td:nth-child(5) {
  width: 72px;
}

.journal-register-table th:nth-child(6),
.journal-register-table td:nth-child(6) {
  width: auto;
}

.journal-register-table th:nth-child(7),
.journal-register-table td:nth-child(7),
.journal-register-table th:nth-child(8),
.journal-register-table td:nth-child(8) {
  width: 100px;
}

.journal-register-table th:nth-child(9),
.journal-register-table td:nth-child(9) {
  width: 78px;
}

.journal-register-table .amount {
  white-space: nowrap;
}

.journal-lines-mini {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

.journal-lines-mini th,
.journal-lines-mini td {
  padding: 6px 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.journal-lines-mini th:nth-child(1),
.journal-lines-mini td:nth-child(1) {
  width: 31%;
}

.journal-lines-mini th:nth-child(2),
.journal-lines-mini td:nth-child(2) {
  width: 38%;
}

.journal-lines-mini th:nth-child(3),
.journal-lines-mini td:nth-child(3),
.journal-lines-mini th:nth-child(4),
.journal-lines-mini td:nth-child(4) {
  width: 15.5%;
}

.ledger-table {
  max-height: 55vh;
  overflow: auto;
}

.employee-summary-table table {
  min-width: 1180px;
}

.employee-summary-table th,
.employee-summary-table td {
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.employee-summary-table .status {
  font-size: 10px;
}

.hr-register-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.hr-table-wrap {
  overflow-x: auto;
}

.hr-register-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.hr-register-table th,
.hr-register-table td {
  padding: 10px 12px;
  vertical-align: middle;
  white-space: nowrap;
}

.hr-register-table .amount {
  text-align: right;
  white-space: nowrap;
}

.hr-register-table .row-actions.row-actions-single {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
}

.hr-register-table .btn.small {
  white-space: nowrap;
}

.hr-action-cell {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.hr-employee-table th:nth-child(1),
.hr-employee-table td:nth-child(1) {
  width: 12%;
}

.hr-employee-table th:nth-child(2),
.hr-employee-table td:nth-child(2) {
  width: 20%;
}

.hr-employee-table th:nth-child(3),
.hr-employee-table td:nth-child(3),
.hr-employee-table th:nth-child(4),
.hr-employee-table td:nth-child(4) {
  width: 14%;
}

.hr-employee-table th:nth-child(5),
.hr-employee-table td:nth-child(5),
.hr-employee-table th:nth-child(6),
.hr-employee-table td:nth-child(6),
.hr-employee-table th:nth-child(7),
.hr-employee-table td:nth-child(7) {
  width: 10%;
}

.hr-payroll-table th:nth-child(1),
.hr-payroll-table td:nth-child(1) {
  width: 15%;
}

.hr-payroll-table th:nth-child(2),
.hr-payroll-table td:nth-child(2) {
  width: 14%;
}

.hr-payroll-table th:nth-child(3),
.hr-payroll-table td:nth-child(3) {
  width: 30%;
}

.hr-payroll-table th:nth-child(4),
.hr-payroll-table td:nth-child(4),
.hr-payroll-table th:nth-child(5),
.hr-payroll-table td:nth-child(5) {
  width: 13%;
}

.hr-payroll-table th:nth-child(6),
.hr-payroll-table td:nth-child(6) {
  width: 15%;
}

.hr-salary-payment-table th:nth-child(1),
.hr-salary-payment-table td:nth-child(1) {
  width: 13%;
}

.hr-salary-payment-table th:nth-child(2),
.hr-salary-payment-table td:nth-child(2) {
  width: 25%;
}

.hr-salary-payment-table th:nth-child(3),
.hr-salary-payment-table td:nth-child(3) {
  width: 20%;
}

.hr-salary-payment-table th:nth-child(4),
.hr-salary-payment-table td:nth-child(4),
.hr-salary-payment-table th:nth-child(5),
.hr-salary-payment-table td:nth-child(5),
.hr-salary-payment-table th:nth-child(6),
.hr-salary-payment-table td:nth-child(6) {
  width: 14%;
}

.ledger-total {
  margin-top: 12px;
}

.balance-summary {
  min-width: min(520px, 100%);
}

.balance-check-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 12px 14px;
  font-weight: 850;
}

.balance-check-alert span {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.balance-check-alert.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.account-indent-1 {
  padding-left: 18px;
}

.account-indent-2 {
  padding-left: 36px;
}

.account-indent-3 {
  padding-left: 54px;
}

.account-indent-4 {
  padding-left: 72px;
}

th,
td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f3faf8;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #e8f5f3;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.badge.warn {
  background: #fff8e8;
  color: #92400e;
}

.badge.danger {
  background: #feeceb;
  color: #9f1c13;
}

.badge.gray {
  background: #edf4f2;
  color: #58708f;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 22, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-wide {
  width: min(1100px, 100%);
}

.modal-compact {
  width: min(480px, calc(100vw - 32px));
}

.modal-compact .panel-head {
  margin-bottom: 10px;
}

.modal-compact .panel {
  padding: 14px;
}

.modal-compact .form-actions {
  justify-content: stretch;
}

.modal-compact .form-actions .btn {
  flex: 1;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.modal-grid .full {
  grid-column: 1 / -1;
}

.modal-customer {
  background: #f7faff;
  padding: 0;
  overflow: hidden;
}

.customer-form-shell {
  display: grid;
  gap: 0;
}

.inline-customer-form {
  padding: 0;
  width: 100%;
  box-shadow: none;
  border-radius: var(--radius);
}

.inline-workspace-form {
  width: 100%;
  display: grid;
  gap: 14px;
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  padding: 0;
  overflow: visible;
}

.inline-workspace-form > .panel-head {
  margin: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  border-inline: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}

.inline-workspace-form > .modal-grid,
.inline-workspace-form > .statement-filters,
.inline-workspace-form > .toolbar,
.inline-workspace-form > .table-wrap,
.inline-workspace-form > .totals-box,
.inline-workspace-form > .balance-summary,
.inline-workspace-form > .form-actions {
  margin-left: 14px;
  margin-right: 14px;
}

.inline-workspace-form > .modal-grid {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.inline-workspace-form > .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.inline-workspace-form .line-editor,
.inline-workspace-form .template-box,
.inline-workspace-form .totals-box {
  background: #ffffff;
}

.print-report-meta {
  display: none;
}

.customer-balance-print-header,
.customer-balance-print-subtitle,
.customer-balance-print-meta,
.customer-balance-print-footer,
.ledger-print-header,
.ledger-print-customer-row,
.ledger-print-summary-table,
.ledger-print-total-box,
.ledger-print-footer {
  display: none;
}

.customer-balance-grand-total {
  width: min(520px, calc(100% - 28px));
  margin: 0 14px 14px auto;
  display: grid;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.customer-balance-grand-total div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.customer-balance-grand-total .grand {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--brand-dark);
  font-weight: 900;
}

/* Shared ERP workspace styling for forms, registers, and accounting reports. */
.inline-workspace-form,
.panel,
.table-wrap,
.record-view,
.statement-report,
.customer-register-panel,
.customer-register-hero {
  color: #0b2542;
}

.inline-workspace-form > .panel-head,
.modal:not(.modal-customer) > .panel-head,
.panel > .panel-head,
.table-wrap > .table-head {
  background: #ffffff;
  padding: 14px 16px;
}

.inline-workspace-form > .panel-head h2,
.modal:not(.modal-customer) > .panel-head h2,
.panel > .panel-head h2,
.table-wrap > .table-head h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.inline-workspace-form > .panel-head .hint,
.modal:not(.modal-customer) > .panel-head .hint,
.panel > .panel-head .hint,
.table-wrap > .table-head .hint {
  font-size: 12px;
  line-height: 1.45;
}

.inline-workspace-form > .modal-grid,
.modal:not(.modal-customer) > .modal-grid,
.inline-workspace-form > .statement-filters,
.inline-workspace-form > .toolbar,
.inline-workspace-form > .table-wrap,
.inline-workspace-form > .balance-summary,
.inline-workspace-form .line-editor,
.inline-workspace-form .template-box,
.inline-workspace-form .subgrid,
.modal:not(.modal-customer) .line-editor,
.modal:not(.modal-customer) .template-box,
.modal:not(.modal-customer) .subgrid,
.record-view,
.statement-company-header,
.statement-customer-card,
.statement-footer,
.statement-table-wrap,
.customer-register-panel,
.customer-filter-grid,
.bulk-actions {
  border-color: #cfe0f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.inline-workspace-form > .modal-grid,
.modal:not(.modal-customer) > .modal-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.b2b-commission-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) 160px 160px minmax(170px, 1fr) 146px 116px;
  gap: 10px 12px;
  align-items: end;
}

.b2b-commission-filters label {
  min-width: 0;
}

.b2b-commission-filters input,
.b2b-commission-filters .btn {
  width: 100%;
  min-height: 38px;
}

.b2b-commission-filters .btn {
  padding-inline: 10px;
  white-space: nowrap;
}

.inline-workspace-form label,
.modal:not(.modal-customer) label,
.toolbar label,
.customer-filter-grid label,
.statement-filters-pro label {
  color: #496685;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.inline-workspace-form input,
.inline-workspace-form select,
.inline-workspace-form textarea,
.modal:not(.modal-customer) input,
.modal:not(.modal-customer) select,
.modal:not(.modal-customer) textarea,
.toolbar input,
.toolbar select,
.customer-filter-grid input,
.customer-filter-grid select,
.statement-filters-pro input,
.statement-filters-pro select {
  min-height: 38px;
  border-color: #cfe0f3;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 650;
  color: #102f50;
  background: #ffffff;
}

.inline-workspace-form textarea,
.modal:not(.modal-customer) textarea {
  min-height: 76px;
  line-height: 1.45;
}

.inline-workspace-form input:focus,
.inline-workspace-form select:focus,
.inline-workspace-form textarea:focus,
.modal:not(.modal-customer) input:focus,
.modal:not(.modal-customer) select:focus,
.modal:not(.modal-customer) textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.customer-filter-grid input:focus,
.customer-filter-grid select:focus,
.statement-filters-pro input:focus,
.statement-filters-pro select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.12);
}

.inline-workspace-form .form-actions,
.modal:not(.modal-customer) .form-actions {
  align-items: center;
  gap: 8px;
}

.inline-workspace-form .btn,
.modal:not(.modal-customer) .btn,
.toolbar .btn,
.customer-register-panel .btn,
.statement-report .btn {
  min-height: 36px;
  border-radius: 7px;
  padding-inline: 12px;
  font-size: 13px;
}

.inline-workspace-form .btn.small,
.modal:not(.modal-customer) .btn.small,
.customer-register-panel .btn.small,
.statement-report .btn.small {
  min-height: 30px;
  font-size: 11px;
}

.inline-workspace-form .subgrid,
.modal:not(.modal-customer) .subgrid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 12px;
  padding: 12px;
}

.inline-workspace-form .subgrid h3,
.modal:not(.modal-customer) .subgrid h3,
.inline-workspace-form .line-editor > strong,
.modal:not(.modal-customer) .line-editor > strong {
  color: #102f50;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.inline-workspace-form .line-editor,
.modal:not(.modal-customer) .line-editor {
  padding: 12px;
}

.inline-workspace-form .line-row,
.modal:not(.modal-customer) .line-row {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) 74px 108px 78px;
}

.inline-workspace-form .passenger-row,
.inline-workspace-form .ticket-row,
.modal:not(.modal-customer) .passenger-row,
.modal:not(.modal-customer) .ticket-row {
  grid-template-columns: minmax(170px, 1fr) minmax(135px, 0.8fr) minmax(135px, 0.8fr) 78px;
}

.inline-workspace-form .flight-row,
.modal:not(.modal-customer) .flight-row,
.inline-workspace-form .umrah-hotel-row,
.modal:not(.modal-customer) .umrah-hotel-row {
  grid-template-columns: repeat(3, minmax(130px, 1fr)) 78px;
}

.inline-workspace-form .inline-row-actions,
.modal:not(.modal-customer) .inline-row-actions {
  gap: 5px;
}

.inline-workspace-form .inline-row-actions .btn.icon,
.modal:not(.modal-customer) .inline-row-actions .btn.icon {
  width: 34px;
  min-height: 34px;
}

.inline-workspace-form .totals-box,
.modal:not(.modal-customer) .totals-box {
  border-color: #cfe0f3;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.inline-workspace-form .totals-box div,
.modal:not(.modal-customer) .totals-box div {
  font-size: 13px;
}

.inline-workspace-form .totals-box .grand,
.modal:not(.modal-customer) .totals-box .grand {
  color: #102f50;
  font-size: 17px;
}

.toolbar,
.customer-register-toolbar,
.banking-toolbar {
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.toolbar .filters {
  align-items: center;
}

.table-wrap {
  border-color: #cfe0f3;
  border-radius: 8px;
  background: #ffffff;
}

table th {
  background: #eef4fb;
  color: #496685;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

table td {
  color: #102f50;
  font-size: 13px;
  line-height: 1.35;
}

table tbody tr:hover {
  background: #f7fbff;
}

.invoice-register-wrap {
  max-height: calc(100vh - 245px);
  overflow-x: hidden;
}

.bill-register-wrap {
  max-height: calc(100vh - 190px);
  overflow-x: auto;
}

.inventory-table-wrap {
  max-height: calc(100vh - 210px);
}

.inventory-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 #d7e1ee;
}

.invoice-register-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.invoice-register-table th,
.invoice-register-table td {
  padding: 8px 8px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.invoice-register-table th {
  background: #e4edf7;
  color: #173b63;
  font-size: 11px;
  line-height: 1.15;
  text-transform: uppercase;
  border-bottom: 1px solid #c8d8ea;
}

.invoice-register-table td {
  font-size: 11.5px;
  line-height: 1.22;
}

.invoice-register-table th:nth-child(1),
.invoice-register-table td:nth-child(1) {
  width: 7.5%;
}

.invoice-register-table th:nth-child(2),
.invoice-register-table td:nth-child(2) {
  width: 11%;
}

.invoice-register-table th:nth-child(3),
.invoice-register-table td:nth-child(3) {
  width: 9%;
}

.invoice-register-table th:nth-child(4),
.invoice-register-table td:nth-child(4) {
  width: 10.5%;
}

.invoice-register-table th:nth-child(5),
.invoice-register-table td:nth-child(5) {
  width: 14%;
}

.invoice-register-table th:nth-child(6),
.invoice-register-table td:nth-child(6) {
  width: 14.5%;
}

.invoice-register-table th:nth-child(7),
.invoice-register-table td:nth-child(7) {
  width: 8.5%;
  overflow-wrap: normal;
}

.invoice-register-table th:nth-child(8),
.invoice-register-table td:nth-child(8) {
  width: 10%;
}

.invoice-register-table th:nth-child(9),
.invoice-register-table td:nth-child(9) {
  width: 16.5%;
}

.invoice-register-head {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid #cfe0f3;
  justify-content: flex-start;
}

.invoice-register-head h2 {
  color: #08294d;
  font-size: 18px;
  font-weight: 900;
}

.invoice-register-table .hint,
.invoice-register-table .muted,
.invoice-register-table .amount-stack span {
  font-size: 10.5px;
}

.invoice-register-table .row-actions {
  display: grid;
  grid-template-rows: repeat(2, auto);
  gap: 4px;
  align-items: stretch;
  justify-items: stretch;
  max-width: 100%;
  white-space: normal;
}

.invoice-register-table .row-action-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-items: stretch;
  max-width: 100%;
}

.invoice-register-table .btn.small {
  min-height: 28px;
  width: 100%;
  min-width: 0;
  padding: 0 5px;
  font-size: 10px;
  white-space: nowrap;
}

.invoice-register-table [data-correct-invoice] {
  min-width: 0;
}

.invoice-register-table th:last-child,
.invoice-register-table td:last-child {
  min-width: 0;
}

.invoice-register-table td:nth-child(7) .status,
.invoice-register-table td:nth-child(7) .badge {
  white-space: nowrap;
  min-width: 76px;
  justify-content: center;
}

.bill-register-table th:nth-child(1),
.bill-register-table td:nth-child(1) {
  width: 7%;
}

.bill-register-table th:nth-child(2),
.bill-register-table td:nth-child(2) {
  width: 9%;
}

.bill-register-table th:nth-child(3),
.bill-register-table td:nth-child(3) {
  width: 10%;
}

.bill-register-table th:nth-child(4),
.bill-register-table td:nth-child(4),
.bill-register-table th:nth-child(5),
.bill-register-table td:nth-child(5) {
  width: 6.5%;
}

.bill-register-table th:nth-child(6),
.bill-register-table td:nth-child(6) {
  width: 9%;
}

.bill-register-table th:nth-child(7),
.bill-register-table td:nth-child(7) {
  width: 12%;
}

.bill-register-table th:nth-child(8),
.bill-register-table td:nth-child(8) {
  width: 8%;
  overflow-wrap: normal;
}

.bill-register-table th:nth-child(9),
.bill-register-table td:nth-child(9) {
  width: 13.5%;
}

.bill-register-table th:nth-child(10),
.bill-register-table td:nth-child(10) {
  width: 19%;
}

.bill-register-table {
  min-width: 1280px;
}

.bill-register-table .row-actions {
  max-width: 100%;
  align-items: stretch;
}

.bill-register-table .row-action-line {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bill-register-table .btn.small {
  min-width: 0;
}

.bill-register-table td:nth-child(8) .status,
.bill-register-table td:nth-child(8) .badge {
  white-space: nowrap;
  min-width: 76px;
  justify-content: center;
}

.status,
.badge,
.balance-badge,
.statement-balance-badge {
  letter-spacing: 0;
}

.customer-form-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.customer-form-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.customer-form-title-row > div {
  min-width: 0;
}

.customer-form-hero .customer-form-title-row {
  flex: 1 1 auto;
  align-items: flex-start;
}

.customer-balance-title-head {
  align-items: center;
  padding: 8px 14px;
  margin: 0;
}

.customer-balance-title-head::before {
  display: none;
}

.customer-balance-title-head h2 {
  font-size: 18px;
  line-height: 1.1;
}

.customer-balance-title-head .hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.customer-form-hero h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.1;
}

.customer-form-hero p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-form-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 74px;
  max-height: none;
  overflow: auto;
}

.customer-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.customer-tab {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.customer-tab:hover {
  color: var(--brand-dark);
  background: #eef5ff;
}

.customer-tab.active {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(23, 59, 99, 0.16);
}

.customer-tab-panel {
  display: grid;
  gap: 10px;
}

.customer-tab-panel[hidden] {
  display: none;
}

.customer-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.customer-section-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.customer-section-head > span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: var(--brand-dark);
  flex: 0 0 auto;
}

.customer-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.customer-section-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.customer-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
}

.customer-section-grid label {
  min-width: 0;
  min-height: 68px;
  display: block;
  line-height: 1.25;
  font-size: 12px;
}

.customer-section-grid label.full {
  min-height: 108px;
}

.customer-section-grid label:not(:has(.field-help))::after {
  content: "";
  display: block;
  min-height: 14px;
}

.customer-section-grid label > input,
.customer-section-grid label > select,
.customer-section-grid label > .input-affix {
  min-height: 40px;
  margin-top: 5px;
}

.customer-section-grid textarea {
  min-height: 74px;
  margin-top: 5px;
}

.customer-section-grid label[hidden] {
  display: none;
}

.customer-section-grid sup {
  color: #b42318;
  font-size: 12px;
  margin-left: 3px;
  vertical-align: baseline;
}

.customer-section-grid input[name="customerCode"],
.customer-section-grid input[name="creditLimit"],
.customer-section-grid input[name="openingBalance"],
.customer-section-grid input[name="commissionValue"],
.customer-section-grid select[name="active"],
.customer-section-grid select[name="openingBalanceType"],
.customer-section-grid select[name="paymentTerms"],
.customer-section-grid select[name="commissionType"],
.customer-section-grid .input-affix {
  max-width: 360px;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.input-affix {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  border: 1px solid #cfe0f3;
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
}

.input-affix:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 59, 99, 0.12);
}

.input-affix span {
  height: 100%;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: var(--brand-dark);
  font-weight: 900;
}

.input-affix input {
  border: 0;
  box-shadow: none;
}

.customer-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  margin: 0;
}

.customer-actions .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.45em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.12em;
  animation: btn-spin 0.75s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  background: var(--brand-dark);
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-weight: 800;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 19, 33, 0.46);
}

.app-alert-dialog {
  width: min(560px, 92vw);
  border: 1px solid #d6e2f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(8, 19, 33, 0.28);
  padding: 22px 24px 20px;
}

.app-alert-title {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: -22px -24px 16px;
  padding: 12px 18px;
  border-bottom: 1px solid #cfe0f4;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #f4f8fd 0%, #eaf2fb 100%);
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 900;
  cursor: move;
  touch-action: none;
  user-select: none;
}

.app-alert-title::after {
  content: "Drag";
  margin-left: auto;
  border: 1px solid #c7d7e8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  padding: 5px 8px;
}

.app-alert-message {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  white-space: normal;
}

.app-alert-input {
  width: 100%;
  min-height: 96px;
  margin-top: 10px;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  padding: 11px 12px;
  resize: vertical;
}

.app-alert-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 65, 108, 0.12);
  outline: none;
}

select.app-alert-input {
  min-height: 46px;
  resize: none;
}

.cheque-deposit-dialog {
  width: min(560px, calc(100vw - 32px));
}

.cheque-deposit-form {
  display: grid;
  gap: 18px;
}

.cheque-deposit-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.cheque-deposit-field small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cheque-deposit-field strong {
  color: #dc2626;
}

.cheque-deposit-field .app-alert-input {
  min-height: 46px;
  margin-top: 0;
  resize: none;
}

.cheque-deposit-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cheque-deposit-form .app-alert-actions {
  margin-top: 2px;
}

.financial-amount-dialog {
  width: min(460px, 92vw);
}

.financial-amount-description {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.financial-amount-details,
.financial-amount-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.financial-amount-details div,
.financial-amount-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dce8f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
}

.financial-amount-details span,
.financial-amount-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.financial-amount-details strong,
.financial-amount-meta strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.financial-amount-field {
  display: grid;
  gap: 7px;
  margin: 4px 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.financial-amount-field b {
  color: var(--danger);
}

.financial-amount-control {
  display: grid;
  grid-template-columns: 64px minmax(156px, 216px);
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.financial-amount-control span {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid #d9e7f5;
  background: #f1f6fc;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.financial-amount-control input {
  width: 100%;
  min-height: 42px;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 9px 11px;
  text-align: right;
}

.financial-amount-control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 65, 108, 0.12);
}

.financial-amount-control input:focus {
  outline: none;
}

.financial-amount-validation {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.app-alert-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.app-alert-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
}

.app-alert-link:hover,
.app-alert-link:focus {
  border-color: var(--brand);
  background: #eef6ff;
  outline: none;
}

.app-alert-link.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
  background: #f3f6fb;
}

.app-alert-link.is-disabled:hover,
.app-alert-link.is-disabled:focus {
  border-color: #d6e2f0;
  background: #f3f6fb;
}

.app-alert-link span {
  font-weight: 800;
}

.app-alert-link small {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.app-alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.app-confirm-actions .btn {
  min-width: 110px;
}

.form-grid .full,
.subgrid.full {
  grid-column: 1 / -1;
}

.invoice-meta-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.invoice-meta-3 {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.invoice-meta-4 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.payment-detail-head .panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-detail-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payment-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.payment-detail-card h3 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 17px;
}

.payment-detail-wide {
  grid-column: 1 / -1;
}

.payment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-detail-line {
  min-height: 54px;
  border: 1px solid #e3ecf6;
  border-radius: 7px;
  background: #f8fbff;
  padding: 9px 10px;
}

.payment-detail-line strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.payment-detail-line span {
  color: var(--ink);
  font-weight: 750;
}

.payment-allocation-table {
  max-height: none;
}

.payment-detail-empty {
  border: 1px dashed #cbd8e7;
  border-radius: 8px;
  padding: 16px;
}

.technical-details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 850;
}

.erp-detail-head .panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.erp-detail-head {
  border-bottom: 2px solid var(--brand-dark);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.erp-detail-head h2 {
  color: #111827;
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1.1;
}

.erp-detail-head .hint {
  color: #526b8e;
  font-size: 14px;
}

.erp-detail-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  color: #172033;
  font-size: 14px;
  line-height: 1.35;
}

.erp-detail-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.erp-detail-summary-card,
.erp-detail-card {
  border: 1px solid #cddced;
  border-radius: 8px;
  background: #ffffff;
}

.erp-detail-summary-card {
  min-height: 72px;
  padding: 12px 14px;
}

.erp-detail-summary-card span,
.erp-detail-line strong,
.erp-financial-breakdown span {
  display: block;
  color: #526b8e;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.erp-detail-summary-card strong {
  color: #111827;
  font-size: 16px;
  line-height: 1.25;
}

.erp-detail-card {
  padding: 14px;
}

.erp-detail-card h3 {
  border-bottom: 1px solid #d8e4f1;
  color: var(--brand-dark);
  font-size: 16px;
  margin: 0 0 12px;
  padding-bottom: 9px;
  text-transform: none;
}

.erp-detail-card .table-wrap,
.erp-detail-card table,
.payment-allocation-table {
  border-color: #cddced;
}

.erp-detail-card th,
.payment-allocation-table th {
  background: #eaf1f8;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.erp-detail-card td,
.payment-allocation-table td {
  color: #172033;
  font-size: 13px;
}

.erp-detail-wide {
  grid-column: 1 / -1;
}

.erp-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.erp-detail-line {
  min-height: 54px;
  border: 1px solid #d6e3f1;
  border-radius: 7px;
  background: #fbfdff;
  padding: 9px 10px;
}

.erp-detail-line.wide {
  grid-column: 1 / -1;
}

.erp-detail-line span {
  color: #172033;
  font-weight: 750;
}

.erp-financial-breakdown {
  display: grid;
  gap: 8px;
}

.erp-financial-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d6e3f1;
  border-radius: 7px;
  background: #fbfdff;
  padding: 10px 12px;
}

.erp-financial-breakdown strong {
  color: #111827;
  font-size: 16px;
  text-align: right;
}

.erp-financial-breakdown .final {
  background: #f3f8ff;
  border-color: #c9dbf3;
}

.erp-financial-breakdown .final strong {
  font-size: 20px;
}

.erp-detail-note {
  border: 1px solid #d6e3f1;
  border-radius: 8px;
  background: #fbfdff;
  color: #172033;
  min-height: 62px;
  padding: 12px;
  white-space: pre-wrap;
}

.invoice-detail-view .erp-detail-summary {
  grid-column: 1 / -1;
}

.invoice-document-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.invoice-document-head h2 {
  margin: 4px 0;
  font-size: 28px;
}

.invoice-document-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.invoice-barcode-card {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  background: #fff;
}

.invoice-barcode {
  height: 44px;
  margin-bottom: 8px;
  background:
    repeating-linear-gradient(90deg, #092b4c 0 3px, transparent 3px 6px, #092b4c 6px 8px, transparent 8px 13px),
    #fff;
}

.invoice-barcode-card strong {
  display: block;
  color: var(--ink);
}

.invoice-barcode-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.invoice-items-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.invoice-items-table th,
.invoice-items-table td {
  white-space: normal;
}

.invoice-accounting-note {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.invoice-accounting-note strong,
.invoice-accounting-note span {
  display: block;
}

.invoice-accounting-note span {
  margin-top: 4px;
  color: var(--muted);
}

.invoice-signature-area {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.invoice-signature-area > div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.invoice-signature-area span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-signature-area strong {
  display: block;
  margin-top: 4px;
}

.ticket-case-head .panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-case-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ticket-case-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ticket-case-summary-card,
.ticket-case-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.ticket-case-summary-card {
  padding: 12px;
  min-height: 76px;
}

.ticket-case-summary-card span,
.ticket-case-line strong,
.ticket-finance-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.ticket-case-summary-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.ticket-case-card {
  padding: 14px;
}

.ticket-case-card h3 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 17px;
}

.ticket-case-wide {
  grid-column: 1 / -1;
}

.ticket-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ticket-case-line {
  min-height: 54px;
  border: 1px solid #e3ecf6;
  border-radius: 7px;
  background: #f8fbff;
  padding: 9px 10px;
}

.ticket-case-line.wide {
  grid-column: 1 / -1;
}

.ticket-case-line span {
  color: var(--ink);
  font-weight: 750;
}

.ticket-finance-list {
  display: grid;
  gap: 8px;
}

.ticket-finance-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e3ecf6;
  border-radius: 7px;
  background: #f8fbff;
  padding: 10px 12px;
}

.ticket-finance-list strong {
  color: var(--ink);
  font-size: 16px;
  text-align: right;
}

.ticket-finance-list .final {
  background: #eaf2ff;
  border-color: #c9dbf3;
}

.ticket-finance-list .final strong {
  font-size: 20px;
}

.ticket-note-box {
  border: 1px solid #e3ecf6;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  min-height: 62px;
  padding: 12px;
  white-space: pre-wrap;
}

.invoice-meta-customer {
  grid-template-columns: minmax(260px, 1.8fr) minmax(92px, 0.55fr) minmax(150px, 0.8fr) minmax(130px, 0.65fr) minmax(130px, 0.65fr);
  align-items: end;
}

.invoice-footer-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.invoice-footer-row .totals-box {
  grid-column: auto;
  justify-self: stretch;
}

.memo-box textarea {
  min-height: 118px;
}

.invoice-message {
  max-width: 52%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin-top: 12px;
}

.invoice-message p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.line-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.line-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(220px, 1fr) 80px 120px 88px;
  gap: 8px;
  align-items: end;
}

.branch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.branch-grid-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #fff;
}

.branch-grid-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.branch-grid-table th,
.branch-grid-table td {
  padding: 10px;
  border-bottom: 1px solid #dbe7f4;
  vertical-align: middle;
  text-align: left;
}

.branch-grid-table th {
  background: #eaf1f8;
  color: #3f5878;
  font-size: 13px;
  text-transform: uppercase;
}

.branch-grid-table tr:last-child td {
  border-bottom: 0;
}

.branch-grid-table tr.is-selected td {
  background: #eef6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.branch-grid-table input,
.branch-grid-table select {
  width: 100%;
  min-width: 0;
}

.branch-grid-table .branch-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.branch-editor-hidden {
  display: none;
}

.branch-editor-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #fff;
}

.branch-editor-panel .section-head {
  margin-bottom: 14px;
}

.branch-editor-panel .inline-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.period-row {
  grid-template-columns: minmax(220px, 1.25fr) minmax(150px, 0.85fr) minmax(150px, 0.85fr) minmax(130px, 0.65fr);
  gap: 12px;
  align-items: end;
}

.period-row label {
  min-width: 0;
}

.period-row input,
.period-row select {
  min-width: 0;
}

.opening-summary {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(260px, 1fr);
  align-items: end;
}

.opening-group {
  gap: 10px;
}

.opening-rows {
  display: grid;
  gap: 8px;
}

.opening-row {
  grid-template-columns: minmax(220px, 1.2fr) minmax(96px, 0.5fr) minmax(140px, 0.65fr) minmax(180px, 1fr);
  align-items: end;
}

.opening-row:not(:has([name*="openingQty_"])) {
  grid-template-columns: minmax(260px, 1.4fr) minmax(140px, 0.65fr) minmax(220px, 1fr);
}

.journal-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 1fr) 110px 110px 42px;
  gap: 8px;
  align-items: end;
}

.flight-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(120px, 0.7fr) 88px;
  gap: 8px;
  align-items: end;
}

.flight-row > label:nth-of-type(n + 4) {
  grid-column: span 1;
}

.passenger-row,
.ticket-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) 88px;
  gap: 8px;
  align-items: end;
}

.umrah-hotel-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.75fr) minmax(120px, 0.7fr) 88px;
  gap: 8px;
  align-items: end;
}

.inline-row-actions {
  display: inline-flex;
  gap: 4px;
  align-items: end;
}

.settings-option-group {
  display: grid;
  gap: 8px;
}

.settings-option-row {
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 8px;
  align-items: center;
}

.tax-master-grid {
  display: grid;
  grid-template-columns: 105px minmax(180px, 1.2fr) 150px 90px 110px minmax(150px, 1fr) minmax(150px, 1fr) 105px 82px;
  gap: 8px;
  align-items: end;
}

.tax-master-header {
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #d7e4f2;
  border-radius: 8px 8px 0 0;
  background: #eef4fb;
  color: #466482;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tax-master-row {
  padding: 10px;
  border: 1px solid #d7e4f2;
  border-top: 0;
  background: #fff;
}

.tax-master-row label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.tax-master-row label span {
  color: #506b8a;
  font-weight: 800;
}

.tax-master-row input,
.tax-master-row select {
  min-width: 0;
  height: 38px;
  font-size: 12px;
}

.bank-master-grid {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1.2fr) 130px minmax(165px, 1fr) minmax(160px, 1fr) minmax(150px, 1fr) 105px 95px 82px;
  gap: 8px;
  align-items: end;
}

.bank-master-header {
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #d7e4f2;
  border-radius: 8px 8px 0 0;
  background: #eef4fb;
  color: #466482;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.bank-master-row {
  padding: 10px;
  border: 1px solid #d7e4f2;
  border-top: 0;
  background: #fff;
}

.bank-master-row label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.bank-master-row label span {
  color: #506b8a;
  font-weight: 800;
}

.bank-master-row input,
.bank-master-row select {
  min-width: 0;
  height: 38px;
  font-size: 12px;
}

.aviation-master-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.import-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--soft-panel);
  display: grid;
  gap: 10px;
}

.import-card h3 {
  margin: 0;
}

.import-card textarea {
  min-height: 180px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.sample-box {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.sample-box pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.airline-list-settings {
  display: grid;
  gap: 14px;
}

.airline-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #f7fbff;
}

.airline-list-toolbar h3 {
  margin: 0 0 3px;
  color: #102f50;
  font-size: 16px;
}

.airline-editor-row {
  display: grid;
  grid-template-columns: 120px 160px minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
}

.airline-editor-row label {
  display: grid;
  gap: 5px;
  color: #506b8a;
  font-size: 12px;
  font-weight: 800;
}

.airline-editor-row input {
  min-width: 0;
  height: 38px;
}

.airline-list-wrap {
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
}

.airline-list-table {
  min-width: 720px;
}

.airline-list-table th,
.airline-list-table td {
  padding: 10px 12px;
}

.airline-list-table thead th {
  background: #eef4fb;
  color: #213a57;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.airline-list-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.bank-import {
  display: grid;
  gap: 12px;
}

.bank-import textarea {
  min-height: 150px;
  font-family: Consolas, Monaco, monospace;
}

.subgrid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-panel);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.subgrid h3 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-size: 15px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.inline-workspace-form .modal-grid,
.modal:not(.modal-customer) .modal-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.inline-workspace-form .subgrid,
.modal:not(.modal-customer) .subgrid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 12px;
  padding: 12px;
  border-color: #cfe0f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.inline-workspace-form .line-row,
.modal:not(.modal-customer) .line-row {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) 74px 108px 78px;
  gap: 8px;
}

.inline-workspace-form .passenger-row,
.inline-workspace-form .ticket-row,
.modal:not(.modal-customer) .passenger-row,
.modal:not(.modal-customer) .ticket-row {
  grid-template-columns: minmax(170px, 1fr) minmax(135px, 0.8fr) minmax(135px, 0.8fr) 78px;
}

.inline-workspace-form .flight-row,
.modal:not(.modal-customer) .flight-row,
.inline-workspace-form .umrah-hotel-row,
.modal:not(.modal-customer) .umrah-hotel-row {
  grid-template-columns: repeat(3, minmax(130px, 1fr)) 78px;
  gap: 8px;
}

.inline-workspace-form .form-actions,
.modal:not(.modal-customer) .form-actions {
  margin-top: 0;
}

.invoice-erp-form {
  display: grid;
  gap: 14px;
  margin: 0 14px;
  padding-bottom: 4px;
}

.erp-section {
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  overflow: hidden;
}

.invoice-top-panels {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(520px, 1.25fr);
  gap: 14px;
  align-items: stretch;
}

.invoice-section {
  background: #ffffff;
  border-color: #cfe0f3;
}

.invoice-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 11px 14px;
  border-bottom: 1px solid #dfe8f4;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.invoice-section-title span {
  display: grid;
  gap: 2px;
}

.invoice-section-title strong {
  color: #102f50;
  font-size: 15px;
  font-weight: 900;
}

.invoice-section-title small {
  color: #58708f;
  font-size: 11px;
  font-weight: 750;
}

.erp-section summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-bottom: 1px solid #dfe8f4;
}

.erp-section summary::-webkit-details-marker {
  display: none;
}

.erp-section summary span:first-child {
  display: grid;
  gap: 2px;
}

.erp-section summary strong {
  color: #102f50;
  font-size: 15px;
  font-weight: 900;
}

.erp-section summary small {
  color: #58708f;
  font-size: 11px;
  line-height: 1.35;
}

.section-chevron {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: var(--brand-dark);
  font-weight: 900;
}

.erp-section:not([open]) summary {
  border-bottom: 0;
}

.erp-section-body {
  padding: 12px 14px;
}

.erp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.invoice-info-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.invoice-top-panels .invoice-info-grid {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.invoice-finance-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.85fr) minmax(130px, 0.85fr);
  gap: 10px 12px;
}

.invoice-customer-lines {
  display: grid;
  gap: 10px;
}

.invoice-customer-main-row {
  grid-template-columns: minmax(320px, 1.4fr) minmax(170px, 0.7fr) minmax(300px, 1.2fr);
}

.invoice-top-panels .invoice-customer-main-row {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.5fr);
}

.invoice-top-panels .invoice-customer-main-row label:nth-child(3) {
  grid-column: 1 / -1;
}

.invoice-b2b-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.invoice-b2b-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 19px;
  line-height: 19px;
}

.invoice-b2b-label input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: #173b63;
  flex: 0 0 16px;
  margin: 0;
}

.invoice-b2b-label span {
  line-height: 19px;
}

.invoice-customer-reference-row > label,
.invoice-customer-reference-row > .invoice-b2b-field {
  grid-template-rows: 19px auto;
  gap: 6px;
  align-items: start;
}

.invoice-customer-reference-row > label > input,
.invoice-customer-reference-row > label > select,
.invoice-customer-reference-row > .invoice-b2b-field > input:not([type="hidden"]) {
  align-self: stretch;
}

.invoice-customer-reference-row {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 0.75fr) minmax(150px, 0.65fr);
}

.invoice-top-panels .invoice-customer-reference-row {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.readonly-field input {
  background: #f8fbff;
  color: #496685;
}

.readonly-status {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #cfe0f5;
  border-radius: 7px;
  display: flex;
  min-height: 45px;
  padding: 8px 12px;
}

.invoice-travel-card {
  border: 0;
  padding: 0;
  box-shadow: none;
}

.invoice-section .invoice-travel-card .air-ticket-block {
  margin: 0;
}

.invoice-travel-section .erp-section-body {
  padding: 10px 12px;
}

.template-stack {
  display: grid;
  gap: 8px;
}

.template-flat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px 10px;
  padding: 10px;
  border: 1px solid #d7e4f2;
  border-radius: 7px;
  background: #ffffff;
}

.template-flat-grid label,
.template-subsection label {
  color: #496685;
  font-size: 11.5px;
  font-weight: 850;
}

.template-flat-grid input,
.template-flat-grid select,
.template-subsection input,
.template-subsection select {
  height: 34px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.template-subsection {
  overflow-x: auto;
  border: 1px solid #d7e4f2;
  border-radius: 7px;
  background: #ffffff;
}

.saudi-visa-section .template-flat-grid {
  grid-template-columns: minmax(210px, 1.35fr) minmax(210px, 1.35fr) 118px 138px 138px 118px 86px;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 0;
  min-width: 1060px;
  box-shadow: none;
}

.saudi-visa-section .visa-number-field {
  grid-column: 1 / span 2;
}

.saudi-visa-section .visa-id-field {
  grid-column: 3 / span 2;
}

.saudi-visa-section .visa-issue-field {
  grid-column: 5 / span 1;
}

.saudi-visa-section .visa-expiry-field {
  grid-column: 6 / span 2;
}

.template-subsection-title {
  padding: 6px 8px;
  border-bottom: 1px solid #d7e4f2;
  background: #eef4fb;
  color: #496685;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-section .erp-section-body {
  background: #fbfdff;
}

.invoice-entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.invoice-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 14px;
  align-items: start;
}

.invoice-bottom-row .memo-box {
  min-width: 0;
}

.invoice-bottom-row .memo-box textarea {
  min-height: 220px;
}

.bill-memo-box textarea {
  min-height: 132px;
}

.invoice-bottom-row .full {
  grid-column: auto;
}

.invoice-bottom-row .invoice-totals-card {
  position: static;
  justify-self: stretch;
  width: 100%;
  max-width: 420px;
}

.invoice-items-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 2px 0 0;
}

.invoice-items-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.invoice-items-head strong {
  color: #102f50;
  font-size: 14px;
  font-weight: 900;
}

.invoice-items-table {
  overflow-x: auto;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.invoice-items-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(300px, 1.8fr) minmax(150px, 0.8fr) 72px 116px 118px 88px;
  gap: 8px;
  align-items: end;
  min-width: 980px;
  padding: 10px 8px;
  border-top: 1px solid #dfe8f4;
}

.invoice-item-row {
  row-gap: 10px;
  border-top-color: #e8f0f9;
}

.inline-workspace-form .invoice-items-row,
.modal:not(.modal-customer) .invoice-items-row,
.inline-workspace-form .invoice-item-row,
.modal:not(.modal-customer) .invoice-item-row {
  grid-template-columns: minmax(190px, 1.05fr) minmax(300px, 1.8fr) minmax(150px, 0.8fr) 72px 116px 118px 88px;
  min-width: 980px;
  align-items: center;
}

.invoice-items-row:first-child {
  border-top: 0;
}

.invoice-items-header {
  align-items: center;
  background: #eef4fb;
  color: #496685;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  border-top: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.invoice-items-row label {
  display: grid;
  gap: 0;
}

.invoice-items-row label > span,
.travel-table-row label > span {
  display: none;
}

.invoice-items-row input,
.invoice-items-row select {
  min-width: 0;
  height: 42px;
  font-size: 13px;
}

.invoice-item-row .inline-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.invoice-item-row .inline-row-actions .btn.icon {
  width: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  padding: 0;
}

.line-total {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  border: 1px solid #dfe8f4;
  border-radius: 7px;
  background: #f8fbff;
  color: #102f50;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.invoice-totals-card {
  position: sticky;
  top: 12px;
  justify-self: end;
  width: min(460px, 100%);
  min-width: 0;
  padding: 12px;
  align-self: start;
  border-color: #cfe0f3;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.totals-card-title {
  display: grid !important;
  justify-content: stretch !important;
  gap: 2px !important;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfe8f4;
}

.totals-card-title strong {
  color: #102f50;
  font-size: 16px;
}

.totals-card-title span {
  color: #58708f;
  font-size: 11px;
}

.invoice-totals-card .commission-control {
  display: grid;
  gap: 6px;
}

.invoice-totals-card .commission-control > span:first-child {
  font-weight: 800;
}

.invoice-totals-card [name="commissionMode"] {
  width: 132px;
}

.invoice-totals-card > div:not(.totals-card-title):not(.grand):not(.balance-due) {
  align-items: center;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  background: #f8fbff;
}

.invoice-totals-card .total-edit {
  min-height: 32px;
  padding: 5px 8px;
}

.invoice-totals-card .total-edit.small {
  min-height: 32px;
}

.invoice-totals-card .grand,
.invoice-totals-card .balance-due {
  margin-top: 2px;
  border-radius: 8px;
  padding: 7px 10px;
}

.invoice-totals-card .grand {
  background: #eaf2ff;
  border-top: 0;
  color: #102f50;
}

.invoice-totals-card .balance-due {
  background: #fff4e5;
  color: #8a3b00;
  border: 1px solid #fed7aa;
}

.invoice-totals-card .grand strong,
.invoice-totals-card .balance-due strong {
  font-size: 18px;
}

.travel-table-header {
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #d7e4f2;
  border-radius: 0;
  background: #eef4fb;
  color: #496685;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.passenger-header,
.ticket-header {
  grid-template-columns: minmax(210px, 1.35fr) minmax(210px, 1.35fr) 118px 138px 138px 118px 86px;
}

.passenger-header span:nth-child(1),
.ticket-header span:nth-child(1) {
  grid-column: 1 / span 2;
}

.passenger-header span:nth-child(2),
.ticket-header span:nth-child(2) {
  grid-column: 3 / span 2;
}

.passenger-header span:nth-child(3),
.ticket-header span:nth-child(3) {
  grid-column: 5 / span 2;
}

.passenger-header span:nth-child(4),
.ticket-header span:nth-child(4) {
  grid-column: 7;
}

.flight-header {
  grid-template-columns: minmax(210px, 1.35fr) minmax(210px, 1.35fr) 118px 138px 138px 118px 86px;
}

.travel-table-row {
  padding: 6px 8px;
  border: 0;
  background: #ffffff;
  align-items: center;
}

.air-ticket-block .line-editor {
  padding: 0;
  overflow-x: auto;
  border: 1px solid #d7e4f2;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

.air-ticket-block .line-editor > strong {
  display: block;
  padding: 10px 0 8px;
}

.air-ticket-block {
  padding: 0;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.air-ticket-block .line-editor + .line-editor {
  margin-top: 0;
}

.inline-workspace-form .air-ticket-block .passenger-row,
.inline-workspace-form .air-ticket-block .ticket-row,
.modal:not(.modal-customer) .air-ticket-block .passenger-row,
.modal:not(.modal-customer) .air-ticket-block .ticket-row {
  grid-template-columns: minmax(210px, 1.35fr) minmax(210px, 1.35fr) 118px 138px 138px 118px 86px;
  min-width: 1060px;
}

.inline-workspace-form .air-ticket-block .passenger-row label:nth-child(1),
.inline-workspace-form .air-ticket-block .ticket-row label:nth-child(1),
.modal:not(.modal-customer) .air-ticket-block .passenger-row label:nth-child(1),
.modal:not(.modal-customer) .air-ticket-block .ticket-row label:nth-child(1) {
  grid-column: 1 / span 2;
}

.inline-workspace-form .air-ticket-block .passenger-row label:nth-child(2),
.inline-workspace-form .air-ticket-block .ticket-row label:nth-child(2),
.modal:not(.modal-customer) .air-ticket-block .passenger-row label:nth-child(2),
.modal:not(.modal-customer) .air-ticket-block .ticket-row label:nth-child(2) {
  grid-column: 3 / span 2;
}

.inline-workspace-form .air-ticket-block .passenger-row label:nth-child(3),
.inline-workspace-form .air-ticket-block .ticket-row label:nth-child(3),
.modal:not(.modal-customer) .air-ticket-block .passenger-row label:nth-child(3),
.modal:not(.modal-customer) .air-ticket-block .ticket-row label:nth-child(3) {
  grid-column: 5 / span 2;
}

.inline-workspace-form .air-ticket-block .passenger-row .inline-row-actions,
.inline-workspace-form .air-ticket-block .ticket-row .inline-row-actions,
.modal:not(.modal-customer) .air-ticket-block .passenger-row .inline-row-actions,
.modal:not(.modal-customer) .air-ticket-block .ticket-row .inline-row-actions {
  grid-column: 7;
}

.inline-workspace-form .air-ticket-block .flight-row,
.modal:not(.modal-customer) .air-ticket-block .flight-row {
  grid-template-columns: minmax(210px, 1.35fr) minmax(210px, 1.35fr) 118px 138px 138px 118px 86px;
  min-width: 1060px;
}

.inline-workspace-form .umrah-hotel-row,
.modal:not(.modal-customer) .umrah-hotel-row {
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(110px, 0.65fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) 86px;
  min-width: 980px;
  gap: 8px;
  align-items: end;
  padding: 6px 8px;
}

.inline-workspace-form .umrah-hotel-row .inline-row-actions,
.modal:not(.modal-customer) .umrah-hotel-row .inline-row-actions {
  align-self: end;
  padding-bottom: 1px;
}

.air-ticket-block input {
  height: 34px;
  min-height: 34px;
  font-size: 12px;
  padding: 6px 8px;
}

.air-ticket-block .inline-row-actions {
  justify-content: center;
  gap: 6px;
}

.air-ticket-block .inline-row-actions .btn.icon {
  width: 32px;
  min-height: 32px;
  flex: 0 0 32px;
}

.invoice-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #ffffff;
  border-top: 1px solid #dfe8f4;
  padding: 10px 14px;
  margin: 0;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px;
}

.permission-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
}

.permission-grid input {
  width: auto;
}

.role-permission-matrix {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.role-permission-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.role-permission-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.role-permission-scroll {
  overflow-x: auto;
}

.role-permission-matrix table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.role-permission-matrix th,
.role-permission-matrix td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
}

.role-permission-matrix thead th {
  background: #eaf1f9;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.role-permission-matrix tbody th {
  text-align: left;
  color: var(--ink);
  font-size: 13px;
}

.role-permission-matrix input {
  width: 16px;
  height: 16px;
}

.role-permission-matrix .hint {
  margin: 10px 14px 12px;
}

.settings-detail-preview {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.settings-detail-preview .erp-detail-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-detail-preview .erp-detail-card {
  padding: 12px;
}

.settings-compact-list {
  display: grid;
  gap: 8px;
}

.settings-compact-list > div {
  border: 1px solid #e3ecf6;
  border-radius: 7px;
  background: #f8fbff;
  padding: 9px 10px;
}

.settings-compact-list strong,
.settings-compact-list span {
  display: block;
}

.settings-compact-list span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.company-profile-progressive {
  display: grid;
  gap: 12px;
  width: 100%;
}

.invoice-print-profile-single {
  max-width: none;
}

.company-profile-card {
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.company-profile-card.expanded {
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 45, 78, 0.08);
}

.company-profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.company-profile-card-head h3 {
  margin: 2px 0 3px;
  color: var(--brand-dark);
  font-size: 18px;
}

.company-profile-card-head p {
  margin: 0;
  color: #536b88;
  font-size: 13px;
  font-weight: 800;
}

.company-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.company-profile-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e3ecf6;
}

.company-profile-editor label.full {
  grid-column: 1 / -1;
}

.company-profile-add {
  width: 100%;
  justify-content: center;
}

.company-settings-workspace {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.company-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -12px -12px 0;
  padding: 10px 12px;
  border-bottom: 1px solid #d7e4f2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.company-settings-header h2 {
  margin: 2px 0 3px;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1.1;
}

.company-settings-header p {
  margin: 0;
  color: #536b88;
  font-size: 13px;
  font-weight: 800;
}

.company-settings-header-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.company-settings-header-controls label {
  min-width: 190px;
  margin: 0;
}

.company-settings-status {
  justify-self: start;
  border: 1px solid #c8d8ea;
  border-radius: 999px;
  background: #f5f9ff;
  color: #315172;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 9px;
}

.company-settings-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.company-settings-card {
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  overflow: hidden;
}

.company-settings-card-identity,
.company-settings-card-accounting {
  grid-column: span 3;
}

.company-settings-card-address,
.company-settings-card-branding {
  grid-column: span 3;
}

.company-settings-card-new-company {
  grid-column: 1 / -1;
}

.company-master-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 0;
}

.company-master-actions .btn {
  min-height: 34px;
  padding: 7px 11px;
}

.company-settings-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #d7e4f2;
  background: #eef4fb;
}

.company-settings-card-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 16px;
}

.company-settings-card-head span {
  color: #5b7390;
  font-size: 12px;
  font-weight: 800;
}

.company-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}

.company-settings-fields-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.company-settings-fields-address,
.company-settings-fields-branding {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-settings-fields label,
.company-settings-header-controls label {
  color: #49617c;
  font-size: 11px;
  font-weight: 900;
}

.company-settings-fields input,
.company-settings-fields select,
.company-settings-fields textarea,
.company-settings-header-controls select {
  margin-top: 4px;
  min-height: 36px;
  padding: 8px 10px;
}

.company-settings-fields textarea {
  min-height: 66px;
  resize: vertical;
}

.company-settings-fields .full {
  grid-column: 1 / -1;
}

.organization-company-edit-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.organization-company-card-identity {
  grid-column: span 8;
}

.organization-company-card-registration {
  grid-column: span 4;
}

.organization-company-card-contact,
.organization-company-card-office,
.organization-company-card-accounting,
.organization-company-card-branding {
  grid-column: span 6;
}

.organization-company-fields-identity {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px 14px;
}

.organization-company-fields-registration,
.organization-company-fields-accounting,
.organization-company-fields-office {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 14px;
}

.organization-company-fields-contact {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 12px 14px;
}

.organization-company-form label,
.organization-company-add-card label,
.organization-company-field-group label {
  min-width: 0;
  line-height: 1.25;
}

.organization-company-form input,
.organization-company-form select,
.organization-company-form textarea,
.organization-company-add-card input,
.organization-company-add-card select,
.organization-company-add-card textarea {
  width: 100%;
}

.organization-company-add-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.organization-company-field-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 14px;
  align-content: start;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.organization-company-field-group h4 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--brand-dark);
  font-size: 14px;
}

.organization-company-field-group-identity,
.organization-company-field-group-contact {
  grid-column: span 6;
}

.organization-company-field-group-office {
  grid-column: span 8;
}

.organization-company-field-group-accounting {
  grid-column: span 4;
}

.organization-company-field-group-accounting {
  grid-template-columns: 1fr;
}

.organization-branch-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.organization-branch-info-fields {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px 14px;
}

.organization-branch-info-fields label,
.organization-branch-status-fields label {
  min-width: 0;
  line-height: 1.25;
}

.organization-branch-info-fields input,
.organization-branch-info-fields select,
.organization-branch-status-fields input,
.organization-branch-status-fields select {
  width: 100%;
}

.organization-branch-status-card {
  min-width: 0;
}

.organization-branch-status-fields {
  grid-template-columns: 1fr;
  gap: 14px;
}

.organization-branch-status-fields .hint {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.company-logo-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 12px 0;
  padding: 9px 10px;
  border: 1px dashed #b8cadf;
  border-radius: 8px;
  background: #f8fbff;
  color: #526b87;
  font-weight: 900;
}

.company-logo-uploader {
  align-items: center;
  background: #f8fbff;
  border: 1px dashed #b8cadf;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin: 8px 12px 0;
  padding: 9px 10px;
}

.company-logo-preview {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  display: flex;
  flex: 0 0 68px;
  height: 68px;
  justify-content: center;
  overflow: hidden;
  width: 68px;
}

.company-logo-preview .brand-mark {
  height: 54px;
  width: 54px;
}

.company-logo-preview-img {
  display: block;
  height: 64px;
  object-fit: contain;
  width: 64px;
}

.company-logo-controls {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.company-logo-controls strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.company-logo-controls span {
  color: #526b87;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.company-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.brand-logo-img {
  background: #ffffff;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  display: block;
  height: 54px;
  object-fit: contain;
  padding: 4px;
  width: 54px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media screen {
  .page,
  .panel,
  .inline-workspace-form,
  .record-view,
  .table-wrap,
  .statement-report,
  .statement-table-wrap,
  .ledger-table,
  .customer-register-panel,
  .customer-balance-summary {
    max-width: 100%;
    min-width: 0;
  }

  .table-wrap,
  .statement-table-wrap,
  .ledger-table,
  .snapshot-table-wrap,
  .customer-table-wrap,
  .bill-register-wrap,
  .invoice-register-wrap,
  .customer-balance-summary {
    overflow-x: hidden;
  }

  .table-wrap table,
  .statement-table,
  .ledger-table table,
  .snapshot-table,
  .customer-table,
  .customer-balance-summary table,
  .invoice-register-table,
  .bill-register-table,
  .ar-table,
  .journal-register-table,
  .journal-lines-mini,
  .compact-table table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .table-wrap th,
  .table-wrap td,
  .statement-table th,
  .statement-table td,
  .customer-balance-summary th,
  .customer-balance-summary td,
  .ledger-table th,
  .ledger-table td,
  .ar-table th,
  .ar-table td {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }

  .table-wrap th.amount,
  .table-wrap td.amount,
  .statement-table th.amount,
  .statement-table td.amount,
  .ledger-table th.amount,
  .ledger-table td.amount,
  .customer-balance-summary th.amount,
  .customer-balance-summary td.amount {
    text-align: right;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .amount-stack,
  .status,
  .badge,
  .balance-badge,
  .statement-balance-badge {
    max-width: 100%;
    white-space: normal;
  }

  .table-wrap .row-actions,
  .table-wrap .row-action-line,
  .approval-actions,
  .customer-register-actions,
  .customer-export-actions,
  .bulk-actions,
  .statement-actions,
  .workspace-return-actions {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .table-wrap .btn,
  .table-wrap .btn.small,
  .statement-report .btn,
  .action-dropdown summary {
    min-width: 0;
    white-space: normal;
  }

  .invoice-register-table .row-actions,
  .bill-register-table .row-actions {
    display: grid;
    grid-template-rows: repeat(2, auto);
    gap: 4px;
  }

  .invoice-register-table .row-action-line,
  .bill-register-table .row-action-line {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .invoice-register-table .row-actions .btn,
  .invoice-register-table .row-actions .btn.small,
  .bill-register-table .row-actions .btn,
  .bill-register-table .row-actions .btn.small {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-inline: 5px;
    white-space: nowrap;
  }

  .statement-filters,
  .statement-filters-pro,
  .all-sales-filters,
  .cargo-party-selector-row,
  .reports-filter-bar,
  .ar-filters,
  .b2b-commission-filters,
  .approval-filter-bar,
  .customer-filter-grid,
  .banking-register-filters,
  .toolbar .filters {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    max-width: 100%;
  }

  .cargo-party-preview-line {
    grid-template-columns: 1fr;
  }

  .statement-filter-actions,
  .all-sales-filters .customer-filter-buttons,
  .reports-filter-actions,
  .customer-filter-buttons {
    min-width: 0;
    white-space: normal;
  }

  .statement-company-header,
  .statement-customer-card,
  .statement-summary-grid,
  .customer-ledger-statement .statement-summary-grid,
  .mini-summary-grid,
  .metrics,
  .customer-summary-grid,
  .ar-kpi-grid,
  .reports-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  }

  .customer-balance-summary th,
  .customer-balance-summary td {
    padding: 9px 10px;
  }

  .customer-balance-summary .amount,
  .customer-balance-summary .link-button {
    white-space: normal;
  }

  .all-sales-register-wrap .invoice-register-table th,
  .all-sales-register-wrap .invoice-register-table td,
  .invoice-register-table th,
  .invoice-register-table td,
  .bill-register-table th,
  .bill-register-table td {
    padding-inline: 5px;
  }
}

@media (max-width: 980px) {
  .dashboard-command {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-command-actions,
  .reports-filter-actions {
    justify-content: flex-start;
  }

  .dashboard-kpi-strip,
  .reports-metric-grid,
  .settings-dashboard-grid,
  .company-profile-editor,
  .settings-detail-preview .erp-detail-summary,
  .settings-status-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .company-settings-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .company-settings-card-identity,
  .company-settings-card-accounting,
  .company-settings-card-address,
  .company-settings-card-branding {
    grid-column: span 1;
  }

  .company-settings-fields-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-filter-bar {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .reports-card-center {
    grid-template-columns: 1fr;
  }

  .settings-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .erp-admin-health {
    position: static;
  }

  .approval-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .approval-filter-bar {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .approval-filter-actions {
    justify-content: flex-start;
  }

  .airline-editor-row {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .ar-kpi-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .ar-toolbar {
    display: grid;
  }

  .ar-filters {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .b2b-commission-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .login-shell,
  .app-shell,
  .grid-2,
  .banking-command-center {
    grid-template-columns: 1fr;
  }

  .banking-quick-actions {
    justify-content: flex-start;
  }

  .banking-register-filters {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .cheque-columns {
    grid-template-columns: 1fr;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px 12px;
    gap: 10px;
    overflow: visible;
  }

  .sidebar nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 8px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-btn {
    justify-content: center;
    flex: 0 0 54px;
    min-height: 46px;
    padding: 0 8px;
  }

  .nav-btn span:last-child {
    display: none;
  }

  .sidebar .brand-row {
    padding: 0 4px 8px;
  }

  .sidebar-footer {
    display: none;
  }

  .content {
    min-height: 0;
    overflow: visible;
  }

  .page {
    overflow: visible;
  }

  .top-menu {
    padding: 0 10px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .top-menu-group {
    flex: 0 0 auto;
  }

  .top-menu-trigger {
    padding: 0 10px;
  }

  .report-center {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-admin-toolbar,
  .erp-admin-main-grid,
  .settings-tree-layout {
    grid-template-columns: 1fr;
  }

  .erp-admin-kpis,
  .erp-admin-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-admin-health {
    position: static;
  }

  .snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snapshot-breakdown {
    grid-template-columns: 1fr;
  }

  .sales-center .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar,
  .banking-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .filters,
  .banking-toolbar .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .toolbar input,
  .toolbar select,
  .toolbar .btn,
  .banking-toolbar select {
    width: 100%;
  }

  .customer-register-hero,
  .customer-register-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-register-actions,
  .customer-export-actions {
    width: 100%;
  }

  .customer-register-actions .btn,
  .customer-export-actions .btn {
    flex: 1 1 160px;
  }

  .customer-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-filter-grid .search-wide,
  .customer-filter-buttons {
    grid-column: 1 / -1;
  }

  .customer-filter-buttons .btn {
    flex: 1;
  }

  .statement-company-header,
  .statement-customer-card,
  .statement-summary-grid,
  .signature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statement-filters-pro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statement-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .modal-wide {
    width: min(100%, calc(100vw - 24px));
  }

  .invoice-info-grid,
  .invoice-customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-finance-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .invoice-top-panels {
    grid-template-columns: 1fr;
  }

  .invoice-entry-grid {
    grid-template-columns: 1fr;
  }

  .invoice-bottom-row {
    grid-template-columns: 1fr;
  }

  .invoice-totals-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .approval-dashboard .toolbar,
  .approval-command,
  .approval-filter-title,
  .approval-section-head {
    display: grid;
    gap: 8px;
  }

  .approval-dashboard .toolbar .filters {
    justify-content: stretch;
  }

  .approval-kpi-grid,
  .approval-filter-bar,
  .company-settings-grid,
  .organization-company-edit-grid,
  .organization-company-add-grid,
  .organization-branch-form-grid,
  .company-profile-editor,
  .company-settings-fields,
  .settings-detail-preview .erp-detail-summary {
    grid-template-columns: 1fr;
  }

  .organization-company-card-identity,
  .organization-company-card-registration,
  .organization-company-card-contact,
  .organization-company-card-office,
  .organization-company-card-accounting,
  .organization-company-card-branding,
  .organization-company-field-group-identity,
  .organization-company-field-group-contact,
  .organization-company-field-group-office,
  .organization-company-field-group-accounting {
    grid-column: 1 / -1;
  }

  .organization-company-fields-identity,
  .organization-company-fields-registration,
  .organization-company-fields-contact,
  .organization-company-fields-office,
  .organization-company-fields-accounting,
  .organization-company-field-group {
    grid-template-columns: 1fr;
  }

  .organization-branch-info-fields {
    grid-template-columns: 1fr;
  }

  .company-settings-card-identity,
  .company-settings-card-accounting,
  .company-settings-card-address,
  .company-settings-card-branding {
    grid-column: 1 / -1;
  }

  .company-profile-card-head,
  .company-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .company-profile-actions .btn {
    width: 100%;
  }

  .company-settings-header {
    align-items: stretch;
    flex-direction: column;
  }

  .company-settings-header-controls {
    justify-content: flex-start;
  }

  .company-settings-header-controls label {
    min-width: 0;
    width: 100%;
  }

  .approval-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .approval-filter-actions .btn {
    width: 100%;
  }

  .airline-list-toolbar,
  .airline-editor-row,
  .settings-dashboard-grid,
  .settings-dashboard-card-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-dashboard-card-head .settings-status,
  .settings-dashboard-item .settings-status {
    justify-self: start;
  }

  .approval-count {
    justify-self: start;
  }

  .ar-kpi-grid,
  .ar-filters,
  .banking-filter-strip,
  .banking-register-filters {
    grid-template-columns: 1fr;
  }

  .cheque-item {
    grid-template-columns: 1fr;
  }

  .ar-toolbar .statement-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .b2b-commission-filters {
    grid-template-columns: 1fr;
  }

  body {
    background: var(--bg);
  }

  .login-shell {
    min-height: 100svh;
  }

  .login-brand {
    padding: 22px;
  }

  .login-brand h1 {
    font-size: 34px;
  }

  .login-brand p {
    font-size: 15px;
  }

  .login-panel {
    width: calc(100vw - 24px);
    padding: 18px;
    margin-bottom: 18px;
  }

  .topbar,
  .page {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar-actions,
  .form-actions,
  .row-actions,
  .row-actions-single {
    width: 100%;
  }

  .topbar-actions,
  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .approval-top-search {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .topbar-actions .btn,
  .form-actions .btn {
    width: 100%;
  }

  .license-banner {
    margin: 10px 12px 0;
    align-items: stretch;
    flex-direction: column;
  }

  .page {
    gap: 12px;
  }

  .panel,
  .metric,
  .table-wrap,
  .modal {
    border-radius: 7px;
  }

  .metrics,
  .report-center,
  .dashboard-kpi-strip,
  .reports-metric-grid,
  .erp-admin-kpis,
  .settings-status-grid,
  .settings-tree-layout,
  .erp-admin-card-grid,
  .snapshot-grid,
  .dashboard-grid,
  .dashboard-metrics,
  .banking-summary-grid,
  .workflow-links,
  .statement-filters,
  .dashboard-block:nth-child(3) .dashboard-metrics,
  .aviation-master-grid,
    .modal-grid,
    .customer-section-grid,
    .permission-grid {
    grid-template-columns: 1fr;
  }

  .report-launch-card {
    grid-template-columns: 1fr;
  }

  .report-launch-action .workflow-link {
    width: 100%;
  }

  .erp-admin-toolbar {
    padding: 12px;
  }

  .erp-admin-tabs {
    align-items: stretch;
  }

  .settings-card.erp-admin-card {
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: start;
  }

  .settings-card.erp-admin-card .settings-status {
    justify-self: start;
  }

  .settings-list-head {
    display: none;
  }

  .settings-row-action {
    justify-self: start;
  }

  .customer-summary-grid,
  .customer-filter-grid,
  .customer-mobile-card dl,
  .statement-company-header,
  .statement-customer-card,
  .statement-summary-grid,
  .statement-filters-pro,
  .invoice-info-grid,
  .invoice-customer-grid,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .invoice-finance-row {
    grid-template-columns: 1fr;
  }

  .statement-title-row,
  .statement-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .statement-actions .btn {
    width: 100%;
  }

  .customer-register-panel {
    padding: 12px;
  }

  .customer-table-wrap {
    display: none;
  }

  .customer-card-list {
    display: grid;
    gap: 10px;
  }

  .bulk-actions {
    align-items: stretch;
  }

  .bulk-actions .btn {
    flex: 1 1 140px;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
    display: grid;
    grid-template-columns: 1fr;
  }

  .pagination-buttons {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }

  .rows-per-page {
    justify-self: stretch;
  }

  .rows-per-page select {
    margin-left: auto;
  }

  .action-dropdown,
  .action-dropdown summary {
    width: 100%;
  }

  .action-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  .customer-form-hero {
    display: grid;
    padding: 18px 16px;
  }

  .customer-form-body {
    max-height: calc(100vh - 210px);
    padding: 14px 14px 96px;
  }

  .customer-actions {
    justify-content: stretch;
  }

  .sales-center .report-links,
  .sales-center .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .snapshot-tabs {
    overflow-x: auto;
  }

  .snapshot-tabs button {
    min-width: 96px;
  }

  .snapshot-vchart {
    grid-template-columns: repeat(6, minmax(22px, 1fr));
    overflow-x: auto;
  }

  .snapshot-hbar {
    grid-template-columns: minmax(86px, 0.55fr) minmax(90px, 1fr);
  }

  .snapshot-hbar strong {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .snapshot-links {
    grid-template-columns: 1fr;
  }

  .workflow-row {
    grid-template-columns: 1fr;
  }

  .metric {
    padding: 12px;
  }

  .metric strong {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .workflow-link {
    min-height: 44px;
  }

  .table-wrap {
    overflow-x: auto;
    margin-inline: -2px;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 9px 10px;
    font-size: 13px;
  }

  th {
    font-size: 11px;
  }

  .amount-stack {
    justify-items: start;
  }

  .toolbar .filters,
  .banking-toolbar .filters {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .toolbar .filters .btn,
  .toolbar .filters button {
    width: 100%;
  }

  .btn {
    min-height: 42px;
  }

  .btn.small {
    min-height: 36px;
    padding-inline: 10px;
  }

  .row-actions,
  .row-action-line,
  .row-actions-single {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .row-actions .btn,
  .row-action-line .btn,
  .row-actions-single .btn {
    width: 100%;
  }

  .modal-backdrop {
    align-items: end;
    place-items: end stretch;
    padding: 8px;
  }

  .modal,
  .modal-wide,
  .modal-compact {
    width: 100%;
    max-height: calc(100svh - 16px);
    padding: 14px;
  }

  .modal h2 {
    font-size: 20px;
  }

  .payment-detail-view,
  .payment-detail-grid,
  .erp-detail-view,
  .erp-detail-grid,
  .erp-detail-summary,
  .ticket-case-view,
  .ticket-case-grid,
  .ticket-case-summary {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .table-head {
    gap: 10px;
    align-items: flex-start;
  }

  .panel-head .btn.icon {
    flex: 0 0 36px;
  }

  .modal-grid {
    gap: 12px;
  }

  .invoice-meta-customer {
    grid-template-columns: 1fr;
  }

  .invoice-footer-row .totals-box,
  .totals-box {
    min-width: 0;
  }

  .totals-box {
    padding: 12px;
  }

  .total-inline {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .total-edit,
  .total-edit.small {
    width: 100%;
  }

  .invoice-message {
    max-width: 100%;
  }

  .line-row,
  .opening-row,
  .opening-row:not(:has([name*="openingQty_"])),
  .period-row,
  .invoice-meta-row,
  .invoice-footer-row,
  .passenger-row,
  .ticket-row,
  .flight-row,
  .umrah-hotel-row,
  .settings-option-row,
  .tax-master-grid,
  .bank-account-row,
  .journal-row,
  .subgrid,
  .record-view {
    grid-template-columns: 1fr;
  }

  .tax-master-header {
    display: none;
  }

  .subgrid {
    padding: 12px;
  }

  .inline-row-actions {
    justify-content: stretch;
  }

  .inline-row-actions .btn {
    flex: 1;
  }

  .invoice-erp-form {
    margin-inline: 10px;
    gap: 10px;
  }

  .invoice-section-title {
    min-height: 44px;
    padding: 10px 12px;
  }

  .erp-section summary {
    padding: 11px 12px;
  }

  .invoice-items-row {
    min-width: 880px;
    grid-template-columns: minmax(155px, 1fr) minmax(220px, 1.45fr) minmax(130px, 0.8fr) 64px 88px 92px 72px;
  }

  .inline-workspace-form .invoice-items-row,
  .modal:not(.modal-customer) .invoice-items-row,
  .inline-workspace-form .invoice-item-row,
  .modal:not(.modal-customer) .invoice-item-row {
    min-width: 880px;
    grid-template-columns: minmax(155px, 1fr) minmax(220px, 1.45fr) minmax(130px, 0.8fr) 64px 88px 92px 72px;
  }

  .travel-table-header {
    display: none;
  }

  .inline-workspace-form .air-ticket-block .flight-row,
  .modal:not(.modal-customer) .air-ticket-block .flight-row,
  .passenger-row,
  .ticket-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .travel-table-row label > span,
  .invoice-items-row label > span {
    display: block;
  }

  .demo-users {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .sidebar {
    padding-inline: 8px;
  }

  .nav-btn {
    flex-basis: 48px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .sidebar .brand-row strong {
    font-size: 14px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .page {
    padding: 10px;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal,
  .modal-wide,
  .modal-compact {
    max-height: 100svh;
    border-radius: 8px 8px 0 0;
    border-inline: 0;
    border-bottom: 0;
  }

  .row-actions,
  .row-action-line,
  .row-actions-single {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 6mm;
  }

  html,
  body {
    width: auto;
    min-height: 0;
    height: auto;
    overflow: visible;
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body * {
    visibility: hidden;
  }

  body:not([data-print-target="document"]):not([data-print-target="customer-balance-summary"]) .modal,
  body:not([data-print-target="document"]):not([data-print-target="customer-balance-summary"]) .modal *,
  body[data-print-target="customer-balance-summary"] .app-shell,
  body[data-print-target="customer-balance-summary"] .content,
  body[data-print-target="customer-balance-summary"] .page,
  body[data-print-target="customer-balance-summary"] .inline-workspace-form,
  body[data-print-target="customer-balance-summary"] .customer-balance-print-area,
  body[data-print-target="customer-balance-summary"] .customer-balance-print-area *,
  .statement-report,
  .statement-report *,
  body[data-print-target="customer-register"] .customer-register,
  body[data-print-target="customer-register"] .customer-register * {
    visibility: visible;
  }

  body[data-print-target="document"] .modal * {
    visibility: hidden;
  }

  body[data-print-target="document"] .modal .document-print-only,
  body[data-print-target="document"] .modal .document-print-only *,
  body[data-print-target="document"] .modal .print-doc,
  body[data-print-target="document"] .modal .print-doc * {
    visibility: visible !important;
  }

  .modal,
  .statement-report,
  body[data-print-target="customer-register"] .customer-register {
    position: absolute;
    inset: 0;
    width: 100%;
    max-height: none;
    box-shadow: none;
    border: 0;
    background: #ffffff;
  }

  body[data-print-target="document"] .modal .panel-head,
  body[data-print-target="document"] .modal .form-actions {
    display: none !important;
  }

  body[data-print-target="document"] .modal > * {
    display: none !important;
    visibility: hidden !important;
  }

  body[data-print-target="document"] .modal > .document-print-only {
    display: block !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-print-target="document"] .modal > .document-screen-view {
    display: none !important;
    visibility: hidden !important;
  }

  body[data-print-target="document"] .modal > .record-view {
    display: block !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-print-target="document"] .modal {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  /* Print the document in normal page flow, outside the screen overlay geometry. */
  body[data-print-target="document"] :has(.modal .document-print-only) > :not(:has(.modal .document-print-only)):not(:has(.document-print-only)):not(.modal) {
    display: none !important;
  }

  body[data-print-target="document"] .modal-backdrop,
  body[data-print-target="document"] .modal:has(.document-print-only) {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    background: white !important;
  }

  body[data-print-target="document"] .document-print-only .print-doc {
    position: static !important;
  }

  body[data-print-target="document"] .modal .record-view {
    display: block !important;
  }

  body[data-print-target="document"] .modal .print-doc {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff;
  }

  body[data-print-target="customer-balance-summary"] .inline-workspace-form {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #102f50;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body[data-print-target="customer-balance-summary"] .inline-workspace-form > .panel-head {
    display: none !important;
  }

  body[data-print-target="customer-balance-summary"] .app-shell,
  body[data-print-target="customer-balance-summary"] .content,
  body[data-print-target="customer-balance-summary"] .page {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  body[data-print-target="customer-balance-summary"] .sidebar,
  body[data-print-target="customer-balance-summary"] .top-menu,
  body[data-print-target="customer-balance-summary"] .topbar,
  body[data-print-target="customer-balance-summary"] .license-banner,
  body[data-print-target="customer-balance-summary"] .inline-workspace-form > :not(.customer-balance-print-area) {
    display: none !important;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-area {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-header {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr;
    gap: 18px;
    align-items: start;
    margin: 0 0 8px !important;
    padding: 0 0 8px;
    border-bottom: 2px solid #173b63;
    color: #102f50;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-header h2,
  body[data-print-target="customer-balance-summary"] .customer-balance-print-header h1 {
    margin: 0 0 3px;
    color: #102f50;
    line-height: 1.08;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-header h2 {
    font-size: 15px;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-header h1 {
    font-size: 17px;
    text-align: right;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-header span {
    display: block;
    font-size: 9px;
    line-height: 1.25;
    color: #496685;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-header > div:last-child span {
    text-align: right;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-subtitle {
    display: block !important;
    margin: 0 0 8px;
    color: #496685;
    font-size: 9.5px;
    font-weight: 700;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-meta {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 0 0 8px !important;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-meta > div {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fbff !important;
    padding: 6px 7px;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-meta span {
    display: block;
    color: #496685;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-meta strong {
    display: block;
    color: #102f50;
    font-size: 12px;
    line-height: 1.15;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary {
    margin: 0 !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: none;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary th,
  body[data-print-target="customer-balance-summary"] .customer-balance-summary td {
    padding: 6px 7px;
    font-size: 10px;
    line-height: 1.22;
    border-bottom: 1px solid #e2e8f0;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary th {
    background: #eef4fb !important;
    color: #173b63;
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 900;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary th:first-child,
  body[data-print-target="customer-balance-summary"] .customer-balance-summary td:first-child {
    text-align: left;
    width: 28%;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary th:nth-child(n+2):nth-child(-n+5),
  body[data-print-target="customer-balance-summary"] .customer-balance-summary td:nth-child(n+2):nth-child(-n+5) {
    text-align: right;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary th:last-child,
  body[data-print-target="customer-balance-summary"] .customer-balance-summary td:last-child {
    text-align: center;
    width: 13%;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-summary .link-button {
    color: #102f50;
    font-weight: 800;
    text-decoration: none;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-grand-total {
    display: grid !important;
    width: 46%;
    margin: 8px 0 0 auto !important;
    padding: 0 !important;
    gap: 0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: none;
    background: #ffffff !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-grand-total div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 10px;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-grand-total .grand {
    border-bottom: 0;
    background: #eef4fb !important;
    border-radius: 4px;
    color: #102f50;
    font-weight: 900;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-footer {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
    color: #102f50;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    break-inside: avoid !important;
    break-after: avoid !important;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-footer > div {
    min-height: 34px;
    border-top: 1px solid #173b63;
    padding-top: 5px;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-footer span,
  body[data-print-target="customer-balance-summary"] .customer-balance-print-footer strong {
    display: block;
    font-size: 8px;
  }

  body[data-print-target="customer-balance-summary"] .customer-balance-print-footer p {
    grid-column: 1 / -1;
    margin: 0;
    color: #496685;
    font-size: 8px;
    text-align: center;
  }

  body[data-print-target="customer-balance-summary"] tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .form-actions,
  #closeModal,
  body[data-print-target="customer-balance-summary"] .form-actions,
  .statement-actions,
  .statement-filters,
  .statement-row-actions,
  .statement-close,
  body[data-print-target="customer-register"] .customer-register-actions,
  body[data-print-target="customer-register"] .customer-filter-grid,
  body[data-print-target="customer-register"] .bulk-actions,
  body[data-print-target="customer-register"] .customer-export-actions,
  body[data-print-target="customer-register"] .pagination-bar,
  body[data-print-target="customer-register"] .action-dropdown,
  body[data-print-target="customer-register"] input[type="checkbox"] {
    display: none;
  }

  .print-doc {
    font-size: 8.8px;
    line-height: 1.16;
    page-break-after: auto;
  }

  .print-head {
    margin-bottom: 5px;
  }

  body[data-print-target="document"] .modal .professional-invoice {
    zoom: 0.86;
  }

  .professional-invoice table,
  .professional-invoice .mini-table {
    min-width: 0;
    width: 100%;
  }

  .professional-invoice th,
  .professional-invoice td {
    padding: 3px 5px;
    font-size: 8px;
    line-height: 1.12;
  }

  .cargo-freight-invoice .cargo-charge-table th,
  .cargo-freight-invoice .cargo-charge-table td {
    padding: 2px 3px;
    font-size: 6.8px;
    line-height: 1.08;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .cargo-freight-invoice > .cargo-info-block .record-view {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .cargo-freight-invoice > .cargo-info-block .record-line {
    grid-column: auto;
    min-height: 0;
    padding: 4px 5px;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  tr,
  .record-line,
  .print-detail-block,
  .invoice-print-summary,
  .invoice-print-footer-grid,
  .totals-box,
  .amount-words,
  .payment-info-box,
  .signature-row {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .invoice-print-head {
    grid-template-columns: 58px 1fr 125px;
    gap: 7px;
    padding-bottom: 5px;
  }

  .professional-invoice .brand-mark,
  .professional-invoice .brand-logo-img {
    width: 52px;
    height: 52px;
  }

  .brand-mark {
    border-radius: 5px;
  }

  .print-company h2,
  .print-document h2 {
    font-size: 14px;
  }

  .print-company p,
  .print-document span {
    font-size: 7.5px;
    line-height: 1.15;
  }

  .print-document strong {
    margin-top: 2px;
    font-size: 14px;
  }

  .invoice-print-summary {
    grid-template-columns: 1.25fr 1fr 72px;
    gap: 5px;
    margin: 6px 0;
  }

  .cargo-freight-invoice .cargo-invoice-meta {
    grid-template-columns: 1fr;
  }

  .cargo-freight-invoice .cargo-party-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .invoice-party-box,
  .invoice-meta-box,
  .invoice-qr-box,
  .amount-words,
  .payment-info-box,
  .invoice-message,
  .totals-box {
    padding: 5px;
    border-radius: 5px;
  }

  .qr-svg {
    width: 50px;
    height: 50px;
  }

  .print-detail-block {
    margin: 5px 0;
    gap: 3px;
  }

  .print-detail-block h3 {
    font-size: 9px;
    margin: 0 0 2px;
  }

  .invoice-print-footer-grid {
    grid-template-columns: 1fr 245px;
    gap: 6px;
    margin-top: 5px;
  }

  .invoice-print-footer-grid .print-totals {
    grid-column: auto;
    justify-self: stretch;
    align-self: start;
  }

  .invoice-message {
    max-width: none;
    margin-top: 0;
  }

  .totals-box .grand {
    font-size: 11px;
    padding-top: 3px;
  }

  .signature-row {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 10px;
  }

  .invoice-left-notes {
    gap: 5px;
  }

  .amount-words p,
  .invoice-message p {
    margin: 2px 0 0;
  }

  .invoice-meta-box,
  .payment-info-grid {
    gap: 4px 7px;
  }

  .invoice-meta-box span,
  .payment-info-grid span {
    font-size: 7px;
  }

  .statement-report {
    display: block !important;
    gap: 0;
    font-size: 10px;
    margin: 0 !important;
    padding: 0 !important;
    color: #102f50;
  }

  .customer-ledger-statement .ledger-print-header {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    align-items: start;
    margin: 0 0 7px !important;
    padding: 0 0 7px;
    border-bottom: 2px solid #173b63;
  }

  .customer-ledger-statement .ledger-print-header h2,
  .customer-ledger-statement .ledger-print-header h1 {
    margin: 0 0 3px;
    color: #102f50;
    line-height: 1.08;
  }

  .customer-ledger-statement .ledger-print-header h2 {
    font-size: 15px;
  }

  .customer-ledger-statement .ledger-print-header h1 {
    font-size: 17px;
    text-align: right;
  }

  .customer-ledger-statement .ledger-print-header span {
    display: block;
    color: #496685;
    font-size: 8.5px;
    line-height: 1.25;
  }

  .customer-ledger-statement .ledger-print-header > div:last-child span {
    text-align: right;
  }

  .customer-ledger-statement .ledger-print-customer-row {
    display: grid !important;
    grid-template-columns: 0.9fr 1.35fr 1fr 1fr 1fr;
    gap: 0;
    margin: 0 0 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
  }

  .customer-ledger-statement .ledger-print-customer-row div {
    padding: 5px 6px;
    border-right: 1px solid #e2e8f0;
    background: #f8fbff !important;
  }

  .customer-ledger-statement .ledger-print-customer-row div:last-child {
    border-right: 0;
  }

  .customer-ledger-statement .ledger-print-customer-row span,
  .customer-ledger-statement .ledger-print-footer span {
    display: block;
    color: #496685;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .customer-ledger-statement .ledger-print-customer-row strong {
    display: block;
    color: #102f50;
    font-size: 9px;
    line-height: 1.18;
  }

  .customer-ledger-statement .ledger-print-summary-table {
    display: table !important;
    width: 100%;
    margin: 0 0 7px;
    border-collapse: collapse;
    border: 1px solid #cbd5e1;
    table-layout: fixed;
  }

  .customer-ledger-statement .ledger-print-summary-table th,
  .customer-ledger-statement .ledger-print-summary-table td {
    padding: 5px 5px;
    border: 1px solid #e2e8f0;
    text-align: right;
    font-size: 8.5px;
    line-height: 1.18;
  }

  .customer-ledger-statement .ledger-print-summary-table th {
    background: #eef4fb !important;
    color: #173b63;
    font-size: 7px;
    text-transform: uppercase;
  }

  .customer-ledger-statement .statement-title-row,
  .customer-ledger-statement .statement-company-header,
  .customer-ledger-statement .statement-customer-card,
  .customer-ledger-statement .statement-summary-card,
  .customer-ledger-statement .statement-footer,
  .customer-ledger-statement .statement-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }

  .customer-ledger-statement .statement-title-row {
    display: none !important;
  }

  .customer-ledger-statement .statement-actions,
  .customer-ledger-statement .statement-filters,
  .customer-ledger-statement .statement-summary-grid,
  .customer-ledger-statement .statement-footer {
    display: none !important;
  }

  .customer-ledger-statement .statement-company-header,
  .customer-ledger-statement .statement-customer-card,
  .customer-ledger-statement .statement-summary-grid,
  .customer-ledger-statement .signature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .customer-ledger-statement .statement-customer-card {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .customer-ledger-statement .statement-summary-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .customer-ledger-statement .statement-table-wrap {
    max-height: none;
    overflow: visible;
    margin: 0 !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: none;
  }

  .customer-ledger-statement .statement-screen-table-wrap {
    display: none !important;
  }

  .customer-ledger-statement .statement-print-table-wrap {
    display: block !important;
  }

  .customer-ledger-statement .statement-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .customer-ledger-statement .statement-table th,
  .customer-ledger-statement .statement-table td {
    padding: 5px 6px;
    font-size: 9px;
    line-height: 1.2;
    border-bottom: 1px solid #e2e8f0;
  }

  .customer-ledger-statement .statement-table th:nth-child(8),
  .customer-ledger-statement .statement-table td:nth-child(8) {
    display: none;
  }

  .customer-ledger-statement .statement-table thead th {
    position: static;
    background: #eef4fb !important;
    color: #173b63;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .customer-ledger-statement .statement-table th:nth-child(1),
  .customer-ledger-statement .statement-table td:nth-child(1) {
    width: 12%;
  }

  .customer-ledger-statement .statement-table th:nth-child(2),
  .customer-ledger-statement .statement-table td:nth-child(2) {
    width: 14%;
  }

  .customer-ledger-statement .statement-table th:nth-child(3),
  .customer-ledger-statement .statement-table td:nth-child(3) {
    width: 27%;
    min-width: 0;
  }

  .customer-ledger-statement .statement-table th:nth-child(4),
  .customer-ledger-statement .statement-table td:nth-child(4) {
    width: 13%;
  }

  .customer-ledger-statement .statement-table th:nth-child(5),
  .customer-ledger-statement .statement-table td:nth-child(5),
  .customer-ledger-statement .statement-table th:nth-child(6),
  .customer-ledger-statement .statement-table td:nth-child(6),
  .customer-ledger-statement .statement-table th:nth-child(7),
  .customer-ledger-statement .statement-table td:nth-child(7) {
    width: 11%;
    text-align: right;
  }

  .customer-ledger-statement .statement-balance-badge {
    font-size: 9px;
  }

  .customer-ledger-statement .ledger-print-total-box {
    display: grid !important;
    width: 46%;
    margin: 7px 0 0 auto;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
  }

  .customer-ledger-statement .ledger-print-total-box div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 7px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 9px;
  }

  .customer-ledger-statement .ledger-print-total-box .grand {
    border-bottom: 0;
    background: #eef4fb !important;
    font-weight: 900;
  }

  .customer-ledger-statement .ledger-print-footer {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 20px;
  }

  .customer-ledger-statement .ledger-print-footer > div {
    min-height: 28px;
    border-top: 1px solid #173b63;
    padding-top: 5px;
  }

  .customer-ledger-statement .ledger-print-footer p {
    grid-column: 1 / -1;
    margin: 0;
    color: #496685;
    font-size: 8px;
    text-align: center;
  }

  .customer-ledger-statement .statement-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body[data-print-target="customer-register"] .customer-register {
    display: block !important;
    gap: 0;
    font-size: 9px;
    background: #ffffff;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-print-target="customer-register"] .customer-register-hero,
  body[data-print-target="customer-register"] .customer-summary-card,
  body[data-print-target="customer-register"] .customer-register-panel,
  body[data-print-target="customer-register"] .table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }

  body[data-print-target="customer-register"] .customer-register-hero {
    display: block;
    padding: 0 0 4px !important;
    margin: 0 0 5px !important;
    border: 0;
  }

  body[data-print-target="customer-register"] .customer-register-hero h2 {
    font-size: 17px;
    margin: 0 0 2px;
    text-align: center;
    line-height: 1.05;
  }

  body[data-print-target="customer-register"] .customer-register-hero .eyebrow,
  body[data-print-target="customer-register"] .customer-register-hero p {
    text-align: center;
    margin: 0;
    line-height: 1.15;
  }

  body[data-print-target="customer-register"] .customer-register-hero .eyebrow {
    font-size: 7px;
    letter-spacing: 0.08em;
  }

  body[data-print-target="customer-register"] .customer-register-hero p {
    font-size: 7px;
  }

  body[data-print-target="customer-register"] .customer-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px;
    margin: 4px 0 6px !important;
  }

  body[data-print-target="customer-register"] .customer-summary-card {
    display: block !important;
    padding: 5px 6px !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 4px;
    background: #f8fbff !important;
  }

  body[data-print-target="customer-register"] .customer-summary-card > span {
    display: none;
  }

  body[data-print-target="customer-register"] .customer-summary-card small,
  body[data-print-target="customer-register"] .customer-summary-card em {
    font-size: 7px;
    line-height: 1.12;
  }

  body[data-print-target="customer-register"] .customer-summary-card strong {
    font-size: 13px;
    line-height: 1.05;
    margin: 1px 0;
  }

  body[data-print-target="customer-register"] .customer-register-panel {
    padding: 5px 0 0 !important;
    margin: 0 !important;
    border: 0;
  }

  body[data-print-target="customer-register"] .customer-register-toolbar {
    margin-bottom: 4px;
    padding: 5px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
  }

  body[data-print-target="customer-register"] .customer-register-toolbar h3 {
    font-size: 13px;
    margin: 0;
  }

  body[data-print-target="customer-register"] .customer-register-toolbar span {
    font-size: 9px;
  }

  body[data-print-target="customer-register"] .customer-table-wrap {
    display: block;
    overflow: visible;
  }

  body[data-print-target="customer-register"] .customer-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border: 1px solid #cbd5e1;
  }

  body[data-print-target="customer-register"] .customer-table th,
  body[data-print-target="customer-register"] .customer-table td {
    padding: 4px 3px;
    font-size: 7.2px;
    line-height: 1.2;
    border-bottom: 1px solid #e2e8f0;
  }

  body[data-print-target="customer-register"] .customer-table th {
    background: #eef4fb !important;
    color: #102f50;
  }

  body[data-print-target="customer-register"] .customer-table th:first-child,
  body[data-print-target="customer-register"] .customer-table td:first-child,
  body[data-print-target="customer-register"] .customer-table th:last-child,
  body[data-print-target="customer-register"] .customer-table td:last-child {
    display: none;
  }

  body[data-print-target="customer-register"] .customer-card-list {
    display: none;
  }

  body[data-print-target="customer-register"] .balance-pill,
  body[data-print-target="customer-register"] .customer-status-badge,
  body[data-print-target="customer-register"] .code-pill {
    padding: 2px 4px;
    min-width: 0;
    font-size: 7px;
  }

  body[data-print-target="customer-register"] .subtext,
  body[data-print-target="customer-register"] .whatsapp-link {
    font-size: 6.8px;
  }
}

@media (max-width: 1280px) {
  .pluserp-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .sales-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .approval-workspace-layout {
    grid-template-columns: 1fr;
  }

  .approval-executive-grid,
  .approval-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .approval-workspace-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-quick-actions,
  .sales-operation-grid,
  .sales-lower-grid,
  .sales-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-quick-actions,
  .sales-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pluserp-dashboard-grid,
  .pluserp-dashboard-grid.pluserp-chart-grid,
  .pluserp-dashboard-grid-tables {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pluserp-dashboard-lower {
    grid-template-columns: 1fr;
  }

  .pluserp-quick-actions {
    grid-template-columns: repeat(4, minmax(92px, 1fr));
  }
}

@media (max-width: 760px) {
  .pluserp-dashboard-tools {
    justify-content: flex-start;
  }

  .sales-workspace-head,
  .sales-workspace-tools,
  .approval-workspace-head,
  .approval-workspace-tools {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
  }

  .sales-search,
  .approval-search {
    width: 100%;
  }

  .pluserp-kpi-grid {
    grid-template-columns: 1fr;
  }

  .sales-kpi-grid,
  .approval-executive-grid,
  .approval-category-grid,
  .approval-workspace-side,
  .sales-quick-actions,
  .sales-operation-grid,
  .sales-lower-grid,
  .sales-report-grid,
  .sales-summary-strip {
    grid-template-columns: 1fr;
  }

  .sales-quick-actions,
  .sales-lower-grid {
    grid-template-columns: 1fr !important;
  }

  .approval-workspace .approval-tabs {
    gap: 10px;
  }

  .approval-workspace .approval-tab {
    min-width: 0;
    flex: 1 1 130px;
  }

  .approval-filter-bar {
    grid-template-columns: 1fr;
  }

  .approval-enterprise-head,
  .approval-enterprise-row {
    grid-template-columns: 28px minmax(72px, 1fr) minmax(78px, 1fr) minmax(70px, 0.75fr) minmax(82px, 0.9fr);
  }

  .approval-enterprise-head > :nth-child(4),
  .approval-enterprise-head > :nth-child(5),
  .approval-enterprise-head > :nth-child(8),
  .approval-enterprise-row > :nth-child(4),
  .approval-enterprise-row > :nth-child(5),
  .approval-enterprise-row > :nth-child(8) {
    display: none;
  }

  .approval-enterprise-head > :nth-child(9),
  .approval-enterprise-row > :nth-child(9) {
    grid-column: 1 / -1;
  }

  .pluserp-dashboard-grid,
  .pluserp-dashboard-grid.pluserp-chart-grid,
  .pluserp-dashboard-grid-tables {
    grid-template-columns: 1fr;
  }

  .pluserp-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pluserp-transaction-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pluserp-transaction-row .badge,
  .pluserp-transaction-row small {
    justify-self: start;
  }

  .pluserp-table {
    min-width: 0;
    width: 100%;
  }

  .pluserp-quick-actions {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .pluserp-feature-strip {
    justify-content: flex-start;
  }
}

@media (max-height: 820px) and (min-width: 1281px) {
  .pluserp-dashboard {
    grid-template-rows: auto auto minmax(160px, 0.9fr) minmax(136px, 0.68fr) auto;
    gap: 7px;
  }

  .pluserp-feature-strip {
    display: none;
  }

  .pluserp-line-chart svg,
  .pluserp-cash-bars {
    height: 98px;
    min-height: 98px;
  }

  .pluserp-donut,
  .pluserp-donut svg {
    width: 96px;
    height: 96px;
  }

  .pluserp-donut-wrap {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .pluserp-donut > div {
    inset: 23px;
  }

  .pluserp-quick-actions button {
    min-height: 44px;
  }
}
/* Customer receipt allocation panel */
.payment-allocation-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  margin: 16px 18px 0;
}

.payment-allocation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.payment-allocation-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.payment-allocation-head span,
.payment-allocation-panel .hint {
  color: var(--muted);
}

.payment-allocation-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.payment-allocation-summary span {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
}

.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.customer-transfer-allocation > .two-column-grid .compact-table {
  overflow-x: hidden;
}

.customer-transfer-allocation > .two-column-grid .compact-table table {
  min-width: 0;
  table-layout: fixed;
}

.customer-transfer-allocation > .two-column-grid .compact-table th,
.customer-transfer-allocation > .two-column-grid .compact-table td {
  padding: 8px 7px;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.customer-transfer-allocation > .two-column-grid .compact-table th:nth-child(1),
.customer-transfer-allocation > .two-column-grid .compact-table td:nth-child(1) {
  width: 52px;
  text-align: center;
}

.customer-transfer-allocation > .two-column-grid .compact-table th:nth-child(2),
.customer-transfer-allocation > .two-column-grid .compact-table td:nth-child(2) {
  width: 27%;
}

.customer-transfer-allocation > .two-column-grid .compact-table th:nth-child(3),
.customer-transfer-allocation > .two-column-grid .compact-table td:nth-child(3) {
  width: 96px;
}

.customer-transfer-allocation > .two-column-grid .compact-table th:nth-child(4),
.customer-transfer-allocation > .two-column-grid .compact-table td:nth-child(4) {
  width: 110px;
}

.customer-transfer-allocation > .two-column-grid .compact-table th:nth-child(5),
.customer-transfer-allocation > .two-column-grid .compact-table td:nth-child(5) {
  width: 100px;
}

.customer-transfer-allocation > .two-column-grid .compact-table th:nth-child(6),
.customer-transfer-allocation > .two-column-grid .compact-table td:nth-child(6) {
  width: 96px;
}

.customer-transfer-allocation > .two-column-grid .compact-table input[type="number"] {
  width: 86px;
  min-width: 0;
  padding: 8px 9px;
}

.customer-transfer-allocation > .two-column-grid .compact-table input[type="checkbox"] {
  width: 24px;
  height: 24px;
}

.payment-allocation-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.payment-allocation-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.payment-allocation-table th,
.payment-allocation-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.payment-allocation-table th {
  background: var(--soft);
  color: var(--muted-strong);
  font-size: 12px;
  text-transform: uppercase;
}

.payment-allocation-table tr:last-child td {
  border-bottom: 0;
}

.payment-allocation-table .amount {
  text-align: right;
}

.payment-allocation-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.status-note {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 12px 0;
  color: var(--muted);
}

.status-note strong {
  color: var(--ink);
}

.status-note.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.status-note.warning {
  background: #fffbeb;
  border-color: #fde68a;
}

@media (max-width: 900px) {
  .two-column-grid {
    grid-template-columns: 1fr;
  }
}

@media screen {
  .table-wrap .coa-action-cell {
    width: 1%;
    white-space: nowrap;
  }

  .table-wrap .coa-row-actions.row-actions-single {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: flex-end;
  }

  .table-wrap .coa-row-actions .btn,
  .table-wrap .coa-row-actions .btn.small {
    width: auto;
    min-width: max-content;
    min-height: 30px;
    padding-inline: 8px;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .table-wrap .coa-action-cell {
    width: auto;
    white-space: normal;
  }

  .table-wrap .coa-row-actions.row-actions-single {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .table-wrap .coa-row-actions .btn,
  .table-wrap .coa-row-actions .btn.small {
    min-width: 0;
    white-space: normal;
  }
}

/*
 * PlusERP Version 1.0 shared screen foundation.
 * Kept inside screen media so the certified A4/accounting print rules remain
 * authoritative and isolated from the application-shell presentation.
 */
@media screen {
  html {
    background: var(--app-background);
  }

  body {
    background: var(--app-background);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
  }

  :where(button, a, input, select, textarea, [role="button"], [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus-ring) 78%, transparent);
    outline-offset: 2px;
  }

  :where(button, input, select, textarea):disabled,
  :where(button, input, select, textarea)[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 1;
  }

  /* Authentication */
  .login-shell {
    min-height: 100svh;
    grid-template-columns: minmax(260px, 0.75fr) minmax(340px, 420px) minmax(340px, 420px);
    justify-content: center;
    align-content: center;
    gap: var(--space-6);
    padding: clamp(24px, 5vw, 64px);
    background: var(--workspace-surface);
  }

  .login-shell-single {
    grid-template-columns: minmax(260px, 420px) minmax(340px, 460px);
  }

  .login-switch {
    margin: var(--space-5) 0 0;
    font-size: 14px;
    color: var(--text-secondary);
  }

  .login-switch a {
    color: var(--action-primary);
    font-weight: 650;
  }

  .login-brand {
    min-height: 330px;
    justify-content: center;
    padding: var(--space-6);
    border-left: 3px solid var(--action-primary);
  }

  .login-brand .brand-mark,
  .sidebar .brand-mark {
    background: var(--action-primary);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-1);
  }

  .login-brand h1 {
    margin: var(--space-6) 0 var(--space-2);
    font-size: clamp(36px, 4vw, 48px);
    letter-spacing: -0.035em;
    color: var(--text-primary);
  }

  .login-brand p {
    color: var(--text-secondary);
    font-size: 16px;
  }

  .login-panel {
    width: 100%;
    align-self: center;
    justify-self: stretch;
    padding: var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-2);
  }

  .login-panel h2 {
    color: var(--text-primary);
    font-size: 21px;
    letter-spacing: -0.015em;
  }

  .customer-portal-login {
    border-top: 3px solid var(--status-information);
  }

  .login-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
  }

  .login-footer a {
    color: var(--action-primary);
    font-weight: 650;
    text-decoration: none;
  }

  .login-footer a:hover {
    text-decoration: underline;
  }

  /* Enterprise application shell */
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    background: var(--app-background);
  }

  .sidebar {
    background: var(--sidebar-background);
    border-right: 1px solid var(--sidebar-border);
    padding: var(--space-3) var(--space-2);
    gap: var(--space-3);
  }

  .sidebar .brand-row {
    min-height: 52px;
    padding: var(--space-1) var(--space-2) var(--space-3);
    border-color: var(--sidebar-border);
  }

  .sidebar .brand-row strong {
    font-size: 14px;
    letter-spacing: -0.01em;
  }

  .sidebar .brand-row strong span,
  .user-pill {
    color: var(--sidebar-muted-text);
  }

  .sidebar nav {
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
  }

  .nav-btn {
    position: relative;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 4px;
    color: var(--sidebar-text);
    font-size: 12.5px;
    font-weight: 560;
    letter-spacing: 0;
    box-shadow: none;
  }

  .nav-btn:hover {
    color: #ffffff;
    background: #13213a;
    box-shadow: none;
  }

  .nav-btn.active {
    color: #ffffff;
    background: var(--sidebar-active);
    box-shadow: inset 3px 0 0 var(--action-primary);
    font-weight: 680;
  }

  .nav-btn.active::after {
    content: "";
    position: absolute;
    right: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--action-primary);
  }

  .sidebar-footer {
    padding: var(--space-3) var(--space-2) 0;
    border-color: var(--sidebar-border);
  }

  .content {
    background: var(--workspace-surface);
  }

  .topbar {
    min-height: var(--topbar-height);
    padding: 0 var(--space-4);
    gap: var(--space-3);
    border-bottom: 1px solid var(--border-default);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-1);
  }

  .topbar h1 {
    color: var(--text-primary);
    font-size: 18px;
    letter-spacing: -0.015em;
  }

  .topbar-actions {
    gap: var(--space-2);
  }

  .top-menu {
    background: var(--elevated-surface);
    border-color: var(--border-default);
    box-shadow: none;
  }

  .top-menu-trigger {
    color: var(--text-secondary);
    font-size: 12px;
  }

  .tenant-context {
    gap: var(--space-2);
  }

  .tenant-pill,
  .tenant-switcher {
    min-height: var(--control-height-compact);
    border: 1px solid var(--border-default);
    border-radius: var(--input-radius);
    background: var(--elevated-surface);
    color: var(--text-secondary);
    box-shadow: none;
  }

  .tenant-mode {
    color: var(--text-muted);
  }

  .page {
    padding: var(--space-4);
    background: var(--workspace-surface);
    overflow-x: hidden;
  }

  /* Shared controls */
  input,
  select,
  textarea {
    min-height: var(--control-height);
    padding: 8px 10px;
    border-color: var(--border-default);
    border-radius: var(--input-radius);
    background: var(--elevated-surface);
    color: var(--text-primary);
    box-shadow: none;
  }

  textarea {
    min-height: 88px;
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.82;
  }

  input:hover,
  select:hover,
  textarea:hover {
    border-color: #bdc8d6;
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--action-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 42%, transparent);
  }

  :where(input, select, textarea)[aria-invalid="true"],
  :where(input, select, textarea).is-invalid {
    border-color: var(--status-danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-danger) 14%, transparent);
  }

  :where(input, select, textarea):read-only {
    background: #f8fafc;
    color: var(--text-secondary);
  }

  :where(input, select, textarea):disabled {
    border-color: var(--border-default);
    background: var(--disabled-background);
    color: var(--disabled-text);
  }

  :where(input[type="checkbox"], input[type="radio"]) {
    min-height: 0;
    accent-color: var(--action-primary);
  }

  label {
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 620;
  }

  .hint,
  .subtext {
    color: var(--text-muted);
    font-size: 12.5px;
  }

  .btn {
    min-height: var(--control-height);
    padding: 0 13px;
    border-radius: var(--button-radius);
    background: var(--action-primary);
    font-size: 12.5px;
    font-weight: 680;
    box-shadow: var(--shadow-1);
  }

  .btn:hover {
    background: var(--action-primary-hover);
  }

  .btn:active {
    background: var(--action-primary-pressed);
    transform: translateY(1px);
  }

  .btn.secondary,
  .btn.neutral,
  .btn.outline {
    border-color: var(--border-default);
    background: var(--elevated-surface);
    color: var(--text-secondary);
    box-shadow: none;
  }

  .btn.secondary:hover,
  .btn.neutral:hover,
  .btn.outline:hover {
    border-color: #aebdce;
    background: #f8fafc;
    color: var(--text-primary);
  }

  .btn.danger {
    background: var(--status-danger);
  }

  .btn.danger:hover {
    background: #991b1b;
  }

  .btn.small {
    min-height: var(--control-height-compact);
  }

  .btn.icon {
    width: var(--control-height);
    min-height: var(--control-height);
  }

  .btn:disabled,
  .btn[aria-disabled="true"] {
    border-color: var(--border-default);
    background: var(--disabled-background);
    color: var(--disabled-text);
    box-shadow: none;
    transform: none;
  }

  /* Shared surfaces and KPI foundation */
  .panel,
  .metric,
  .pluserp-panel,
  .customer-summary-card,
  .erp-detail-card,
  .erp-detail-summary-card,
  .settings-dashboard-card,
  .report-launch-card {
    border-color: var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-1);
  }

  .panel {
    padding: var(--space-4);
  }

  .panel-head {
    gap: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom-color: var(--divider-default);
  }

  .panel-head h2,
  .panel-head h3 {
    color: var(--text-primary);
    letter-spacing: -0.012em;
  }

  .metric {
    min-height: 104px;
    padding: var(--space-4);
  }

  .metric > span,
  .pluserp-kpi-card > span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 680;
    letter-spacing: 0.035em;
    text-transform: uppercase;
  }

  .metric > strong,
  .pluserp-kpi-card > strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
  }

  /* Feedback, state, and status foundations */
  .badge,
  .status-badge,
  .settings-status,
  .approval-count,
  .balance-pill,
  .customer-status-badge {
    border-radius: 999px;
    font-weight: 680;
  }

  .status-note,
  .empty-state,
  .loading-state,
  .error-state,
  .module-lock .empty-state {
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    color: var(--text-secondary);
    box-shadow: none;
  }

  .status-note.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: var(--status-success);
  }

  .status-note.warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: var(--status-warning);
  }

  .status-note.danger,
  .error-state {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--status-danger);
  }

  .empty-state {
    padding: var(--space-6);
  }

  .app-alert-overlay {
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(2px);
  }

  .app-alert-dialog {
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-3);
  }

  .app-alert-title {
    color: var(--text-primary);
  }

  /* Tables, filters, pagination, and overlays */
  .table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
  }

  table {
    font-size: 12.5px;
  }

  th {
    height: var(--table-row-height-compact);
    padding: 8px 10px;
    border-color: var(--divider-default);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 720;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  td {
    height: var(--table-row-height);
    padding: 8px 10px;
    border-color: var(--divider-default);
    color: var(--text-secondary);
  }

  tbody tr:hover {
    background: #f8fbff;
  }

  tbody tr[aria-selected="true"],
  tbody tr.selected {
    background: #eff6ff;
    box-shadow: inset 3px 0 0 var(--action-primary);
  }

  th.amount,
  td.amount,
  .amount {
    font-variant-numeric: tabular-nums;
  }

  .toolbar,
  .filters,
  .filter-bar,
  .reports-filter-bar,
  .approval-filter-bar {
    gap: var(--space-2);
  }

  .modal-backdrop {
    padding: var(--space-5);
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(2px);
  }

  .modal,
  .modal-wide,
  .modal-compact {
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-3);
  }

  .modal .panel-head {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--elevated-surface);
  }

  .modal .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding-top: var(--space-3);
    border-top: 1px solid var(--divider-default);
    background: var(--elevated-surface);
  }

  .inline-workspace-form {
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media screen and (max-width: 980px) and (min-width: 761px) {
  .app-shell {
    height: 100vh;
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
    overflow: hidden;
  }

  .sidebar {
    position: static;
    z-index: auto;
    padding: var(--space-3) var(--space-2);
    overflow: hidden;
  }

  .sidebar .brand-row {
    justify-content: center;
    padding-inline: 0;
  }

  .sidebar .brand-row strong,
  .sidebar .nav-btn span:last-child,
  .sidebar .user-pill {
    display: none;
  }

  .sidebar nav {
    display: grid;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
  }

  .sidebar .nav-btn {
    width: 48px;
    min-width: 48px;
    min-height: 42px;
    justify-content: center;
    padding: 0;
  }

  .sidebar .nav-btn.active::after {
    display: none;
  }

  .sidebar-footer {
    display: grid;
    justify-content: center;
    padding-inline: 0;
  }

  .content {
    min-height: 0;
    overflow: hidden;
  }

  .page {
    min-height: 0;
    overflow-y: auto;
  }
}

@media screen and (max-width: 760px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-4);
  }

  .login-brand {
    min-height: 0;
    padding: var(--space-4);
  }

  .login-brand h1 {
    font-size: 34px;
  }

  .login-brand > .hint {
    display: none;
  }

  .login-footer {
    grid-column: 1;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: auto;
    min-width: 0;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .sidebar nav {
    display: flex;
    gap: var(--space-1);
    padding: 2px 0 var(--space-2);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .sidebar .nav-btn {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    min-height: 42px;
    justify-content: center;
    padding: 0;
  }

  .sidebar .nav-btn span:last-child {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .content {
    min-width: 0;
    min-height: 0;
    overflow: visible;
  }

  .topbar {
    min-height: var(--topbar-height);
    align-items: flex-start;
    padding: var(--space-2) var(--space-3);
  }

  .topbar-title,
  .topbar-actions,
  .tenant-context {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .page {
    padding: var(--space-3);
  }

  .panel {
    padding: var(--space-3);
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal,
  .modal-wide,
  .modal-compact {
    width: 100%;
    max-height: 96svh;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
  }
}

@media screen and (max-width: 420px) {
  .login-shell {
    padding: var(--space-3);
  }

  .login-panel {
    padding: var(--space-4);
  }

  .login-panel input,
  .login-panel button.btn,
  .login-panel .login-switch a {
    min-height: 44px;
  }

  .login-panel .login-switch a {
    display: inline-flex;
    align-items: center;
  }

  .login-footer {
    flex-direction: column;
    gap: var(--space-1);
  }

  .page {
    padding: 10px;
  }

  .btn:not(.icon) {
    min-height: 40px;
  }
}

@media screen and (pointer: coarse) and (max-height: 500px) {
  .login-panel input,
  .login-panel button.btn,
  .login-panel .login-switch a {
    min-height: 44px;
  }

  .login-panel .login-switch a {
    display: inline-flex;
    align-items: center;
  }
}
/* Version 1.0 Role-Based Dashboard Lite */
.content:has(.pluserp-role-dashboard) {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #f5f7fb;
}

.content:has(.pluserp-role-dashboard) .topbar {
  display: flex;
  position: relative;
  top: 0;
  z-index: 12;
  min-height: 64px;
  padding: 10px 22px;
  border-bottom: 1px solid #e6ebf3;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 18px rgba(20, 35, 61, .045);
  backdrop-filter: blur(12px);
}

.page:has(.pluserp-role-dashboard) {
  padding: 18px 22px 28px;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f7fb;
}

.app-shell:has(.pluserp-role-dashboard) .sidebar {
  background:
    radial-gradient(circle at 22% 4%, rgba(55, 116, 231, .18), transparent 25%),
    linear-gradient(180deg, #101f39 0%, #0c1c34 100%);
  box-shadow: 8px 0 30px rgba(15, 31, 57, .08);
}

.app-shell:has(.pluserp-role-dashboard) .sidebar-nav {
  gap: 5px;
}

.app-shell:has(.pluserp-role-dashboard) .sidebar-nav button {
  min-height: 42px;
  border-radius: 9px;
}

.app-shell:has(.pluserp-role-dashboard) .sidebar-nav button.active {
  background: linear-gradient(100deg, #3270dd, #3f68da);
  box-shadow: 0 9px 20px rgba(38, 94, 205, .28);
}

.content:has(.pluserp-role-dashboard) .pluserp-global-search {
  height: 40px;
  border-color: #e2e7ef;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
}

.content:has(.pluserp-role-dashboard) .pluserp-dashboard-shell-actions {
  gap: 9px;
}

.content:has(.pluserp-role-dashboard) .pluserp-shell-icon-button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.pluserp-role-dashboard {
  --role-blue: #2865d7;
  --role-navy: #11284c;
  --role-text: #15233b;
  --role-muted: #66748a;
  --role-line: #e3e9f2;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
}

.pluserp-role-welcome,
.pluserp-role-section {
  border: 1px solid var(--role-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(20, 35, 61, .045);
}

.pluserp-role-welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(540px, 1.38fr);
  gap: 36px;
  align-items: center;
  min-height: 142px;
  padding: 23px 28px;
  border: 0;
  background: linear-gradient(112deg, #10284d 0%, #2456c7 58%, #7187e8 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(35, 76, 170, .16);
}

.pluserp-role-welcome::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -115%;
  width: 42%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(255, 255, 255, .035),
    0 0 0 36px rgba(255, 255, 255, .025);
}

.pluserp-role-eyebrow,
.pluserp-role-section-head span {
  display: block;
  color: #b9d2ff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pluserp-role-welcome h1 {
  margin: 4px 0 4px;
  color: #fff;
  font-size: clamp(26px, 2.6vw, 35px);
  line-height: 1.05;
  letter-spacing: -.025em;
}

.pluserp-role-welcome p { margin: 0; color: #e7efff; font-size: 13px; }

.pluserp-role-welcome dl,
.pluserp-system-status dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0;
  margin: 0;
}

.pluserp-role-welcome dl div,
.pluserp-system-status dl div {
  min-width: 0;
}

.pluserp-role-welcome dl div {
  padding: 5px 18px;
  border-left: 1px solid rgba(255, 255, 255, .15);
}

.pluserp-role-welcome dl div:first-child { border-left: 0; }

.pluserp-role-welcome dt,
.pluserp-system-status dt {
  color: #bdd1f8;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.pluserp-role-welcome dd,
.pluserp-system-status dd {
  margin: 5px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.pluserp-role-section { padding: 16px; }

.pluserp-role-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pluserp-role-section-head span { color: #4e72b8; }

.pluserp-role-section-head h2 {
  margin: 2px 0 0;
  color: var(--role-text);
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.pluserp-work-grid,
.pluserp-cheque-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pluserp-work-card,
.pluserp-cheque-alert-grid button,
.pluserp-shortcut-grid button {
  min-height: 44px;
  border: 1px solid var(--role-line);
  border-radius: 11px;
  background: #fff;
  color: var(--role-text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(20, 35, 61, .025);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}

.pluserp-work-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 7px 11px;
  align-items: center;
  min-height: 104px;
  padding: 14px;
}

.pluserp-work-card > span:not(.pluserp-work-icon) {
  font-size: 12px;
  font-weight: 700;
}

.pluserp-work-card strong { color: #174aa5; font-size: 24px; line-height: 1; }

.pluserp-work-card strong.empty {
  grid-column: 2 / -1;
  color: var(--role-muted);
  font-size: 12px;
  font-weight: 600;
}

.pluserp-work-card small {
  grid-column: 2 / -1;
  color: var(--role-muted);
  font-size: 11px;
}

.pluserp-work-icon,
.pluserp-shortcut-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #2767d7;
  background: #eaf2ff;
}

.pluserp-work-grid .pluserp-work-card:nth-child(2) .pluserp-work-icon {
  color: #16814a;
  background: #e8f7ee;
}

.pluserp-work-grid .pluserp-work-card:nth-child(3) .pluserp-work-icon {
  color: #d96a16;
  background: #fff0e4;
}

.pluserp-work-grid .pluserp-work-card:nth-child(4) .pluserp-work-icon {
  color: #7c3dde;
  background: #f1eaff;
}

.pluserp-cheque-alert-grid button {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 2px 11px;
  align-items: center;
  min-height: 78px;
  padding: 11px 13px;
}

.pluserp-cheque-alert-grid button::before {
  content: "";
  grid-row: 1 / 4;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #edf4ff;
  box-shadow: inset 0 0 0 10px #dbeaff;
}

.pluserp-cheque-alert-grid button:nth-child(2)::before {
  background: #fff0f0;
  box-shadow: inset 0 0 0 10px #ffe1e4;
}

.pluserp-cheque-alert-grid button:nth-child(3)::before {
  background: #fff4e9;
  box-shadow: inset 0 0 0 10px #ffe8d1;
}

.pluserp-cheque-alert-grid button:nth-child(4)::before {
  background: #f3edff;
  box-shadow: inset 0 0 0 10px #e9dcff;
}

.pluserp-cheque-alert-grid button > span { font-size: 11px; font-weight: 700; }
.pluserp-cheque-alert-grid strong { color: #183d76; font-size: 20px; line-height: 1; }
.pluserp-cheque-alert-grid small { color: var(--role-muted); font-size: 10px; }

.pluserp-role-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .55fr);
  gap: 14px;
  align-items: stretch;
}

.pluserp-role-grid > *,
.pluserp-work-grid > *,
.pluserp-cheque-alert-grid > *,
.pluserp-shortcut-grid > * {
  min-width: 0;
}

.pluserp-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pluserp-shortcut-grid button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
}

.pluserp-shortcut-grid button > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-shortcut-grid .pluserp-shortcut-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
}

.pluserp-activity-list { display: grid; gap: 0; }

.pluserp-activity-list > div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}

.pluserp-activity-list > div:last-child { border-bottom: 0; }

.pluserp-activity-mark {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #3475df;
  box-shadow: 0 0 0 4px #e9f1ff;
}

.pluserp-activity-list p { display: grid; gap: 3px; margin: 0; }
.pluserp-activity-list strong { color: #26344c; font-size: 11px; line-height: 1.35; }
.pluserp-activity-list small,
.pluserp-role-empty { color: var(--role-muted); font-size: 10px; }
.pluserp-role-empty { margin: 8px 0; }

.pluserp-system-status dl {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.pluserp-system-status dl div {
  padding: 9px 11px;
  border-radius: 9px;
  background: #f8fafc;
}

.pluserp-system-status dl div:first-child {
  background: #eaf7ef;
}

.pluserp-system-status dt { color: #758197; font-size: 9px; }
.pluserp-system-status dd { color: #1e293b; font-size: 11px; }
.pluserp-system-status dd.ok { color: #14733c; }
.pluserp-system-status dd.error { color: #b42318; }

.pluserp-role-dashboard button:is(:hover, :focus-visible) {
  border-color: #2f76c8;
  background: #f9fbff;
  box-shadow: 0 0 0 3px rgba(47, 118, 200, .14), 0 8px 20px rgba(20, 35, 61, .07);
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 1180px) {
  .pluserp-role-welcome { grid-template-columns: 1fr; }
  .pluserp-role-welcome dl div:first-child { border-left: 1px solid rgba(255, 255, 255, .15); }
  .pluserp-role-grid { grid-template-columns: 1fr; }
  .pluserp-shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pluserp-system-status dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .content:has(.pluserp-role-dashboard) .topbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 54px;
    padding: 7px 12px;
  }

  .content:has(.pluserp-role-dashboard) .pluserp-dashboard-shell-title {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex: 1 1 auto;
    width: auto;
    gap: 8px;
  }
  .content:has(.pluserp-role-dashboard) .pluserp-global-search { min-width: 0; width: min(320px, 45vw); }
  .content:has(.pluserp-role-dashboard) .pluserp-global-search kbd,
  .content:has(.pluserp-role-dashboard) .pluserp-user-chip,
  .content:has(.pluserp-role-dashboard) .pluserp-new-button { display: none; }
  .content:has(.pluserp-role-dashboard) .pluserp-dashboard-shell-actions {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
  }

  .page:has(.pluserp-role-dashboard) { padding: 12px 12px 22px; }
  .pluserp-role-dashboard { gap: 12px; }
  .pluserp-role-welcome,
  .pluserp-role-section { padding: 14px; border-radius: 12px; }
  .pluserp-role-welcome { gap: 18px; }
  .pluserp-role-welcome dl { gap: 8px; }
  .pluserp-role-welcome dl div { padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .05); }
  .pluserp-role-welcome dl,
  .pluserp-system-status dl,
  .pluserp-work-grid,
  .pluserp-cheque-alert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pluserp-shortcut-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .content:has(.pluserp-role-dashboard) .pluserp-global-search { width: 44px; padding: 0; justify-content: center; }
  .content:has(.pluserp-role-dashboard) .pluserp-global-search::before { content: "⌕"; color: #526279; font-size: 22px; }
  .content:has(.pluserp-role-dashboard) .pluserp-global-search input { position: absolute; width: 1px; height: 1px; opacity: 0; }
  .content:has(.pluserp-role-dashboard) .pluserp-shell-icon-button:last-of-type { display: none; }
  .pluserp-role-welcome dl,
  .pluserp-system-status dl,
  .pluserp-shortcut-grid { grid-template-columns: 1fr; }
  .pluserp-work-grid,
  .pluserp-cheque-alert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pluserp-work-card { grid-template-columns: 38px 1fr; padding: 12px; }
  .pluserp-work-card > strong { grid-column: 2; }
  .pluserp-role-welcome { padding: 18px; }
}

/* Version 1.0 General Business Control Center */
.content:has(.pluserp-control-center) {
  grid-template-rows: minmax(0, 1fr);
  background: #f7f9fc;
}

.content:has(.pluserp-control-center) .topbar,
.content:has(.pluserp-control-center) .top-menu {
  display: none;
}

.page:has(.pluserp-control-center) {
  padding: 0;
  overflow: auto;
  background: #f7f9fc;
}

.pluserp-control-center {
  --cc-blue: #095de8;
  --cc-navy: #06285d;
  --cc-text: #0d2145;
  --cc-muted: #63728c;
  --cc-line: #e3e9f2;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
  gap: 16px;
  width: 100%;
  max-width: none;
  min-height: 100%;
  padding: 0 20px 14px;
  color: var(--cc-text);
}

.pluserp-control-header {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr) minmax(430px, 1.45fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  margin: 0 -20px;
  padding: 10px 24px;
  color: #fff;
  background: linear-gradient(105deg, #06275a, #07387f 58%, #05245a);
  box-shadow: 0 8px 22px rgba(5, 38, 90, .14);
}

.pluserp-control-menu {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 22px;
}

.pluserp-control-welcome { display: grid; min-width: 150px; }
.pluserp-control-welcome span { font-size: 11px; font-weight: 700; }
.pluserp-control-welcome h1 { margin: 2px 0 0; color: #fff; font-size: 21px; line-height: 1; }

.pluserp-control-context {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, .18);
  font-size: 11px;
}

.pluserp-control-context strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-control-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 0;
  margin: 0;
}

.pluserp-control-meta div { padding: 2px 16px; border-left: 1px solid rgba(255, 255, 255, .16); }
.pluserp-control-meta dt { color: #bcd0ee; font-size: 9px; text-transform: uppercase; }
.pluserp-control-meta dd { margin: 3px 0 0; color: #fff; font-size: 11px; font-weight: 750; }

.pluserp-control-user { display: flex; gap: 9px; align-items: center; min-width: 150px; }
.pluserp-control-user > span:last-child { display: grid; gap: 2px; font-size: 11px; }
.pluserp-control-user small { color: #c7d6ec; }
.pluserp-control-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: #dde8f8;
  color: #14396f;
  font-weight: 850;
}

.pluserp-health-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  padding-top: 2px;
}

.pluserp-health-card,
.pluserp-quick-action {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--cc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cc-text);
  text-align: left;
  box-shadow: 0 4px 12px rgba(13, 33, 69, .045);
}

.pluserp-health-card { min-height: 104px; padding: 13px; }
.pluserp-control-action-copy { display: grid; gap: 5px; min-width: 0; }
.pluserp-control-action-copy > span { color: #385074; font-size: 10px; font-weight: 650; }
.pluserp-control-action-copy strong { color: #0c2148; font-size: clamp(14px, 1.25vw, 19px); line-height: 1.15; white-space: nowrap; }
.pluserp-control-action-copy small { color: var(--cc-muted); font-size: 9px; }

.pluserp-control-icon,
.pluserp-operation-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #56708f;
  background: #edf2f7;
}

.tone-blue .pluserp-control-icon, .tone-blue .pluserp-operation-icon { color: #1764d7; background: #e9f1ff; }
.tone-green .pluserp-control-icon, .tone-green .pluserp-operation-icon { color: #169448; background: #e8f8ee; }
.tone-teal .pluserp-control-icon, .tone-teal .pluserp-operation-icon { color: #07869a; background: #e6f6f7; }
.tone-orange .pluserp-control-icon, .tone-orange .pluserp-operation-icon { color: #e06b0b; background: #fff0e4; }
.tone-violet .pluserp-control-icon, .tone-violet .pluserp-operation-icon { color: #6d32dc; background: #f1eaff; }
.tone-red .pluserp-control-icon, .tone-red .pluserp-operation-icon,
.tone-critical .pluserp-control-icon { color: #e22a32; background: #ffebed; }
.tone-urgent .pluserp-control-icon { color: #e76e08; background: #fff0e2; }
.tone-warning .pluserp-control-icon { color: #d29305; background: #fff6d9; }
.tone-info .pluserp-control-icon { color: #2366d3; background: #eaf2ff; }

.pluserp-control-panel,
.pluserp-operation-card {
  border: 1px solid var(--cc-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(13, 33, 69, .04);
}

.pluserp-control-quick-actions { padding: 14px; }
.pluserp-control-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pluserp-control-section-head h2 { margin: 0; color: #075be4; font-size: 12px; font-weight: 850; letter-spacing: .025em; text-transform: uppercase; }
.pluserp-control-section-head > button { border: 0; background: transparent; color: #075be4; font-size: 10px; font-weight: 750; }

.pluserp-quick-action-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.pluserp-quick-action { align-items: center; min-height: 60px; padding: 9px; font-size: 10px; font-weight: 750; }
.pluserp-quick-action .pluserp-control-icon { width: 34px; height: 34px; }

.pluserp-operational-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pluserp-list-panel { min-width: 0; padding: 14px; }
.pluserp-control-list { display: grid; }
.pluserp-control-list > button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 12px;
  gap: 9px;
  align-items: center;
  min-height: 43px;
  padding: 5px 2px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: transparent;
  color: var(--cc-text);
  text-align: left;
}
.pluserp-control-list > button:last-child { border-bottom: 0; }
.pluserp-control-list .pluserp-control-icon { width: 26px; height: 26px; border-radius: 7px; }
.pluserp-control-list-copy { display: grid; gap: 2px; min-width: 0; }
.pluserp-control-list-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pluserp-control-list-copy small { overflow: hidden; color: var(--cc-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pluserp-control-list b { font-size: 10px; }
.pluserp-list-chevron { color: #8ba0bd; font-size: 16px; }
.pluserp-control-empty { margin: 28px 0; color: var(--cc-muted); font-size: 11px; text-align: center; }

.pluserp-operation-card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pluserp-operation-card { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 228px; padding: 13px; }
.pluserp-operation-card h2 { margin: 0 0 8px; color: #56708f; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.pluserp-operation-card.tone-blue h2 { color: #1764d7; }
.pluserp-operation-card.tone-green h2 { color: #169448; }
.pluserp-operation-card.tone-teal h2 { color: #07869a; }
.pluserp-operation-card.tone-orange h2 { color: #e06b0b; }
.pluserp-operation-card.tone-violet h2 { color: #6d32dc; }
.pluserp-operation-card > div { display: grid; align-content: start; }
.pluserp-operation-card > div button,
.pluserp-operation-footer {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 31px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #19345d;
  font-size: 9px;
  text-align: left;
}
.pluserp-operation-icon { width: 20px; height: 20px; border-radius: 5px; }
.pluserp-operation-icon svg { width: 13px; height: 13px; }
.pluserp-operation-footer { justify-content: space-between; color: #075be4; font-weight: 750; }
.pluserp-control-footer { color: #6f7d93; font-size: 10px; text-align: center; }

.pluserp-control-center button:is(:hover, :focus-visible) {
  outline: 0;
  border-color: #2d72dc;
  box-shadow: 0 0 0 3px rgba(45, 114, 220, .17);
  transform: translateY(-1px);
}

@media (max-width: 1250px) {
  .pluserp-control-header { grid-template-columns: auto auto 1fr auto; }
  .pluserp-control-meta { display: none; }
  .pluserp-health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pluserp-quick-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pluserp-operation-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pluserp-control-center { padding-inline: 14px; }
  .pluserp-control-header { margin-inline: -14px; grid-template-columns: auto auto 1fr; }
  .pluserp-control-context { grid-column: 2 / -1; border-left: 0; padding-left: 0; }
  .pluserp-control-user { grid-column: 3; grid-row: 1; justify-self: end; }
  .pluserp-operational-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pluserp-operational-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .pluserp-control-center { gap: 11px; padding: 0 10px 12px; }
  .pluserp-control-header { grid-template-columns: auto 1fr auto; gap: 8px; min-height: 62px; margin: 0 -10px; padding: 8px 12px; }
  .pluserp-control-menu { width: 40px; height: 40px; }
  .pluserp-control-welcome h1 { font-size: 17px; }
  .pluserp-control-context { grid-column: 1 / -1; font-size: 10px; }
  .pluserp-control-user { grid-column: 3; }
  .pluserp-control-user > span:last-child { display: none; }
  .pluserp-control-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .pluserp-health-grid { grid-template-columns: 1fr; }
  .pluserp-health-card { min-height: 78px; align-items: center; }
  .pluserp-quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pluserp-quick-action { min-height: 52px; }
  .pluserp-operational-grid,
  .pluserp-operation-card-grid { grid-template-columns: 1fr; }
  .pluserp-operational-grid > :last-child { grid-column: auto; }
  .pluserp-operation-card { min-height: 0; }
}

/* Version 1.0 frozen Business Owner Dashboard */
.pluserp-control-center {
  grid-template-rows: auto auto auto auto auto auto;
  gap: 15px;
  padding-bottom: 10px;
}

.pluserp-dashboard-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 0;
}

.pluserp-dashboard-section > .pluserp-control-section-head {
  margin: 0;
  padding: 0 12px;
}

.pluserp-control-section-head h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #174a86;
  font-size: 13px;
}

.pluserp-control-section-head h2 svg {
  width: 16px;
  height: 16px;
  color: #159f83;
}

.pluserp-control-section-head > button {
  min-height: 36px;
  padding: 0 6px;
}

.pluserp-health-grid,
.pluserp-alert-grid,
.pluserp-activity-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.pluserp-health-card,
.pluserp-alert-card,
.pluserp-activity-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 108px;
  padding: 13px;
  border: 1px solid var(--cc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cc-text);
  text-align: left;
  box-shadow: 0 4px 12px rgba(13, 33, 69, .045);
}

.pluserp-alert-card,
.pluserp-activity-card {
  min-height: 102px;
}

.pluserp-alert-card .pluserp-control-action-copy strong,
.pluserp-activity-card .pluserp-control-action-copy strong {
  font-size: clamp(13px, 1.05vw, 17px);
}

.pluserp-dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.04fr);
  gap: 12px;
  min-width: 0;
}

.pluserp-recent-transactions,
.pluserp-control-quick-actions {
  min-width: 0;
  padding: 14px;
}

.pluserp-recent-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.pluserp-recent-transactions table {
  width: 100%;
  min-width: 470px;
  border-collapse: collapse;
  font-size: 10px;
}

.pluserp-recent-transactions th,
.pluserp-recent-transactions td {
  height: 39px;
  padding: 7px 8px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  white-space: nowrap;
}

.pluserp-recent-transactions th {
  color: #425777;
  font-size: 9px;
  text-transform: none;
}

.pluserp-recent-transactions tbody tr[role="button"] {
  cursor: pointer;
}

.pluserp-recent-transactions tbody tr[role="button"]:is(:hover, :focus-visible) {
  outline: 2px solid #79a9f0;
  outline-offset: -2px;
  background: #f7faff;
}

.pluserp-transaction-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 6px;
  border-radius: 5px;
  color: #1764d7;
  background: #e9f1ff;
  font-weight: 800;
}

.pluserp-transaction-badge.type-inv,
.pluserp-transaction-badge.type-rec { color: #16814b; background: #e8f8ee; }
.pluserp-transaction-badge.type-pay { color: #d92e39; background: #ffebed; }
.pluserp-transaction-badge.type-bil,
.pluserp-transaction-badge.type-jrn { color: #d56b0b; background: #fff0e4; }
.pluserp-transaction-amount { font-weight: 750; text-align: right !important; }
.pluserp-transaction-amount.positive { color: #16814b; }
.pluserp-transaction-amount.negative { color: #d92e39; }

.pluserp-quick-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pluserp-quick-action {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 118px;
  padding: 13px 8px;
  text-align: center;
}

.pluserp-quick-action .pluserp-control-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.pluserp-quick-action .pluserp-control-icon svg {
  width: 27px;
  height: 27px;
}

.pluserp-quick-action .pluserp-control-action-copy > span {
  color: #0d2145;
  font-size: 13px;
  font-weight: 750;
}

.pluserp-control-footer {
  padding: 3px 6px 0;
  text-align: left;
}

@media (max-width: 1250px) {
  .pluserp-health-grid,
  .pluserp-alert-grid,
  .pluserp-activity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .pluserp-dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
  .pluserp-quick-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) and (min-width: 761px) {
  .pluserp-control-header { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .pluserp-control-context { grid-column: auto; grid-row: auto; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .18); }
  .pluserp-control-user { grid-column: auto; grid-row: auto; }
}

@media (max-width: 760px) {
  .pluserp-health-grid,
  .pluserp-alert-grid,
  .pluserp-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pluserp-health-card,
  .pluserp-alert-card,
  .pluserp-activity-card { min-height: 92px; padding: 10px; }
  .pluserp-quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pluserp-quick-action { min-height: 104px; }
}

@media (max-width: 420px) {
  .pluserp-health-grid,
  .pluserp-alert-grid,
  .pluserp-activity-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Dashboard-only short desktop fit: final cascade override. */
@media (min-width: 1400px) and (max-height: 899px) {
  .pluserp-control-center { gap: 6px; padding-bottom: 4px; }
  .pluserp-control-header { min-height: 70px; padding-block: 7px; }
  .pluserp-dashboard-section { gap: 8px; }
  .pluserp-health-card { min-height: 100px; padding-block: 11px; }
  .pluserp-alert-card,
  .pluserp-activity-card { min-height: 94px; padding-block: 11px; }
  .pluserp-recent-transactions,
  .pluserp-control-quick-actions { padding: 12px; }
  .pluserp-quick-action { min-height: 108px; padding-block: 10px; }
}

/* Account ledger: keep every ledger column visible without horizontal scrolling. */
/* Owner-approved Dashboard Executive Command Center. */
.pluserp-dashboard.pluserp-control-center {
  grid-template-rows: none;
  align-content: start;
  gap: 10px;
  padding-bottom: 8px;
}

.pluserp-dashboard .pluserp-dashboard-section {
  gap: 7px;
}

.pluserp-dashboard .pluserp-dashboard-section > .pluserp-control-section-head {
  min-height: 22px;
  padding-inline: 8px;
}

.pluserp-dashboard .pluserp-control-section-head h2 {
  gap: 6px;
  color: #123f77;
  font-size: 12px;
  line-height: 1.2;
}

.pluserp-dashboard .pluserp-control-section-head h2 small {
  color: #66748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.pluserp-executive-grid,
.pluserp-alert-grid,
.pluserp-performance-grid {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.pluserp-executive-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pluserp-alert-grid,
.pluserp-performance-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.pluserp-executive-card,
.pluserp-alert-card,
.pluserp-performance-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cc-text);
  text-align: left;
  box-shadow: 0 4px 12px rgba(13, 33, 69, .045);
}

.pluserp-executive-card,
.pluserp-alert-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 104px;
  padding: 12px;
}

.pluserp-alert-card { min-height: 98px; }

.pluserp-dashboard .pluserp-control-action-copy {
  flex: 1 1 auto;
  gap: 4px;
  overflow: hidden;
}

.pluserp-dashboard .pluserp-control-action-copy > span {
  overflow: hidden;
  color: #40516c;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.pluserp-dashboard .pluserp-control-action-copy strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(13px, 1.15vw, 18px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-dashboard .pluserp-control-action-copy small {
  overflow: hidden;
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-dashboard .pluserp-control-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.pluserp-dashboard .pluserp-control-icon svg {
  width: 21px;
  height: 21px;
}

.pluserp-performance-card {
  display: grid;
  grid-template-rows: auto auto minmax(44px, 1fr) auto;
  gap: 4px;
  min-height: 154px;
  padding: 11px 12px;
}

.pluserp-performance-card > span {
  color: #40516c;
  font-size: 11px;
  font-weight: 750;
}

.pluserp-performance-card > strong {
  overflow: hidden;
  font-size: clamp(14px, 1.2vw, 18px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pluserp-performance-card > small {
  color: #66748b;
  font-size: 9px;
}

.pluserp-performance-chart {
  width: 100%;
  height: 48px;
  overflow: visible;
}

.pluserp-performance-chart polyline {
  fill: none;
  stroke: #1764d7;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.pluserp-performance-card.tone-green polyline { stroke: #169448; }
.pluserp-performance-card.tone-violet polyline { stroke: #6d32dc; }
.pluserp-performance-card.tone-orange polyline { stroke: #e06b0b; }
.pluserp-performance-card.tone-teal polyline { stroke: #07869a; }

.pluserp-performance-empty {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: #8290a5;
  font-size: 9px;
  text-align: center;
}

.pluserp-dashboard .pluserp-dashboard-bottom {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 10px;
}

.pluserp-dashboard .pluserp-recent-transactions,
.pluserp-dashboard .pluserp-control-quick-actions {
  padding: 11px;
}

.pluserp-dashboard .pluserp-recent-transactions table {
  min-width: 520px;
}

.pluserp-dashboard .pluserp-recent-transactions th,
.pluserp-dashboard .pluserp-recent-transactions td {
  height: 31px;
  padding: 5px 7px;
}

.pluserp-transaction-status {
  color: #16814b;
  font-size: 9px;
  font-weight: 800;
}

.pluserp-dashboard .pluserp-quick-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pluserp-dashboard .pluserp-quick-action {
  min-height: 75px;
  padding: 8px 6px;
}

.pluserp-dashboard .pluserp-quick-action .pluserp-control-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.pluserp-dashboard .pluserp-quick-action .pluserp-control-icon svg {
  width: 21px;
  height: 21px;
}

.pluserp-dashboard .pluserp-quick-action .pluserp-control-action-copy > span {
  font-size: 10px;
}

.pluserp-dashboard-skeleton-row,
.pluserp-dashboard-skeleton-bottom {
  display: grid;
  gap: 9px;
}

.pluserp-dashboard-skeleton-row.skeleton-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pluserp-dashboard-skeleton-row.skeleton-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pluserp-dashboard-skeleton-bottom { grid-template-columns: 1.1fr .9fr; }
.pluserp-dashboard-skeleton-row > span,
.pluserp-dashboard-skeleton-bottom > span {
  min-height: 104px;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: pluserp-dashboard-shimmer 1.2s infinite;
}
.pluserp-dashboard-skeleton-row.skeleton-performance > span { min-height: 154px; }
.pluserp-dashboard-skeleton-bottom > span { min-height: 170px; }

@keyframes pluserp-dashboard-shimmer {
  to { background-position: -200% 0; }
}

@media (max-width: 1180px) {
  .pluserp-executive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pluserp-alert-grid,
  .pluserp-performance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pluserp-dashboard-skeleton-row.skeleton-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pluserp-dashboard-skeleton-row.skeleton-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pluserp-dashboard .pluserp-dashboard-bottom,
  .pluserp-dashboard-skeleton-bottom { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .pluserp-executive-grid,
  .pluserp-alert-grid,
  .pluserp-performance-grid,
  .pluserp-dashboard-skeleton-row.skeleton-six,
  .pluserp-dashboard-skeleton-row.skeleton-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .pluserp-executive-grid,
  .pluserp-alert-grid,
  .pluserp-performance-grid,
  .pluserp-dashboard-skeleton-row.skeleton-six,
  .pluserp-dashboard-skeleton-row.skeleton-five { grid-template-columns: minmax(0, 1fr); }
}

/* Account ledger: keep every ledger column visible without horizontal scrolling. */
@media screen {
  .account-ledger-table {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .account-ledger-table table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .account-ledger-table th,
  .account-ledger-table td {
    min-width: 0 !important;
    padding: 9px 8px;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    white-space: normal;
    vertical-align: middle;
  }

  .account-ledger-table th:nth-child(1),
  .account-ledger-table td:nth-child(1) { width: 12%; }
  .account-ledger-table th:nth-child(2),
  .account-ledger-table td:nth-child(2) { width: 14%; }
  .account-ledger-table th:nth-child(3),
  .account-ledger-table td:nth-child(3) { width: 10%; }
  .account-ledger-table th:nth-child(4),
  .account-ledger-table td:nth-child(4) { width: 20%; }
  .account-ledger-table th:nth-child(5),
  .account-ledger-table td:nth-child(5),
  .account-ledger-table th:nth-child(6),
  .account-ledger-table td:nth-child(6),
  .account-ledger-table th:nth-child(7),
  .account-ledger-table td:nth-child(7) {
    width: 11%;
    overflow-wrap: normal;
    white-space: nowrap;
  }
  .account-ledger-table th:nth-child(8),
  .account-ledger-table td:nth-child(8) { width: 11%; }
}

/* Approval Workspace hydrated-state overrides. */
.approval-workspace-main{gap:10px}.approval-workspace-head{align-items:center;padding:0 2px}.approval-workspace-head h1{font-size:21px;line-height:1.15;letter-spacing:-.01em}.approval-workspace-head p{margin:4px 0 0;font-size:12px}.approval-workspace-tools{flex:0 1 560px}.approval-workspace-tools .tenant-context{width:100%;justify-content:flex-end;flex-wrap:nowrap}.approval-workspace-tools .tenant-pill,.approval-workspace-tools .tenant-switcher{min-height:46px;border-radius:8px;background:#fff}.approval-executive-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.approval-workspace-kpi{min-height:96px;padding:12px;align-items:flex-start;border-radius:9px}.approval-workspace-kpi>span{width:40px;height:40px;flex-basis:40px}.approval-workspace-kpi small{font-size:12px;color:#243855}.approval-workspace-kpi strong{font-size:20px}.approval-workspace .approval-tabs{gap:32px}.approval-workspace .approval-tab{min-width:0;padding:0 16px 10px;font-size:12px;font-weight:700}.approval-workspace .approval-filter-panel{padding:10px 12px}.approval-filter-bar{grid-template-columns:minmax(150px,1.15fr) repeat(4,minmax(140px,1fr)) auto;gap:10px}.approval-master-detail{grid-template-columns:minmax(330px,30fr) minmax(0,70fr)}.approval-queue-card{display:flex;flex-direction:column;max-height:470px}.approval-queue-table{overflow-y:auto}.approval-queue-header{display:none}.approval-type-search{height:30px;max-width:178px;display:flex;align-items:center;gap:6px;padding:0 8px;border:1px solid #dbe3ef;border-radius:7px}.approval-type-search svg{width:13px;height:13px}.approval-type-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:10px}.approval-queue-row,.approval-queue-total{grid-template-columns:minmax(145px,1.65fr) 48px minmax(78px,.8fr) 62px 12px}.approval-queue-row{min-height:39px;padding:4px 10px}.approval-queue-row>span:not(.approval-queue-name){display:grid;gap:1px}.approval-queue-row small{font-size:8px;color:#64748b}.approval-queue-row .waiting{color:#f97316}.approval-queue-row .today{color:#16934a}.approval-queue-total{position:sticky;bottom:0;background:#fff}.approval-detail-summary{min-height:38px;display:flex;align-items:center;gap:18px;padding:7px 12px;border-bottom:1px solid #e6edf5;font-size:11px}.approval-detail-summary span+span{padding-left:18px;border-left:1px solid #cbd5e1}.approval-detail-summary .priority{color:#dc2626}.approval-detail-table{min-width:760px}.approval-detail-table th,.approval-detail-table td{height:38px;padding:6px 7px}.approval-waiting{font-weight:700}.approval-waiting.success{color:#16934a}.approval-waiting.warning{color:#f97316}.approval-waiting.danger{color:#dc2626}.approval-priority{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:700}.approval-priority.high{color:#dc2626;background:#fee2e2}.approval-priority.low{color:#15803d;background:#dcfce7}
@media(max-width:1280px){.approval-executive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.approval-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.approval-filter-actions{grid-column:span 3}.approval-master-detail{grid-template-columns:1fr}}
@media(max-width:900px){.approval-workspace-head{align-items:flex-start;flex-direction:column}.approval-workspace-tools{width:100%;flex:none}.approval-workspace-tools .tenant-context{justify-content:flex-start}.approval-executive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Professional Organization > Companies register.
   This is intentionally scoped so the Branches and permissions tables retain
   their own wide-data behavior. */
.organization-company-list {
  min-width: 0;
  overflow: hidden;
}

.organization-company-list > [data-org-company-refresh-indicator] {
  min-height: 20px;
  margin: 12px 0 4px;
  color: #64748b;
  font-size: 13px;
}

.organization-company-list .branch-grid-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 58, 92, 0.045);
}

.page:has(.organization-company-list) .organization-company-list .branch-grid-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.organization-company-list .branch-grid-table th,
.organization-company-list .branch-grid-table td {
  padding: 12px 13px;
  border-right: 0;
  overflow-wrap: anywhere;
}

.organization-company-list .branch-grid-table th {
  height: 44px;
  background: #f5f8fc;
  color: #425875;
  font-size: 11px;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

.organization-company-list .branch-grid-table td {
  height: 58px;
  color: #172b49;
  font-size: 13px;
}

.organization-company-list .branch-grid-table tbody tr {
  transition: background-color 0.16s ease;
}

.organization-company-list .branch-grid-table tbody tr:hover td {
  background: #f8fbff;
}

.organization-company-list .branch-grid-table tr.is-selected td {
  background: #f2f7ff;
  box-shadow: none;
}

.organization-company-list .branch-grid-table tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 #2563eb;
}

.organization-company-list .branch-grid-table :is(th, td):nth-child(1) { width: 13%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(2) { width: 17%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(3) { width: 10%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(4) { width: 11%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(5) { width: 12%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(6) { width: 8%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(7) { width: 7%; }
.organization-company-list .branch-grid-table :is(th, td):nth-child(8) { width: 22%; }

.page:has(.organization-company-list) .organization-company-list .branch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.organization-company-list .branch-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  justify-content: center;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .organization-company-list .branch-grid-table :is(th, td):nth-child(4),
  .organization-company-list .branch-grid-table :is(th, td):nth-child(7) {
    display: none;
  }

  .organization-company-list .branch-grid-table :is(th, td):nth-child(1) { width: 15%; }
  .organization-company-list .branch-grid-table :is(th, td):nth-child(2) { width: 20%; }
  .organization-company-list .branch-grid-table :is(th, td):nth-child(3) { width: 11%; }
  .organization-company-list .branch-grid-table :is(th, td):nth-child(5) { width: 14%; }
  .organization-company-list .branch-grid-table :is(th, td):nth-child(6) { width: 10%; }
  .organization-company-list .branch-grid-table :is(th, td):nth-child(8) { width: 30%; }
}

@media (max-width: 760px) {
  .organization-company-list {
    overflow: visible;
  }

  .organization-company-list .branch-grid-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .organization-company-list .branch-grid-table,
  .organization-company-list .branch-grid-table :is(thead, tbody, tr, th, td) {
    display: block;
    width: 100% !important;
  }

  .organization-company-list .branch-grid-table thead {
    display: none;
  }

  .organization-company-list .branch-grid-table tbody {
    display: grid;
    gap: 10px;
  }

  .organization-company-list .branch-grid-table tbody tr {
    padding: 13px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(31, 58, 92, 0.04);
  }

  .organization-company-list .branch-grid-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    min-height: 38px;
    height: auto;
    padding: 8px 4px;
    border-bottom: 1px solid #e8edf4;
  }

  .organization-company-list .branch-grid-table tbody td::before {
    color: #64748b;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .organization-company-list .branch-grid-table tbody td:nth-child(1)::before { content: "Company Name"; }
  .organization-company-list .branch-grid-table tbody td:nth-child(2)::before { content: "Legal Name"; }
  .organization-company-list .branch-grid-table tbody td:nth-child(3)::before { content: "Country"; }
  .organization-company-list .branch-grid-table tbody td:nth-child(4)::before { content: "Currency"; }
  .organization-company-list .branch-grid-table tbody td:nth-child(5)::before { content: "Tax / VAT No."; }
  .organization-company-list .branch-grid-table tbody td:nth-child(6)::before { content: "Branches"; }
  .organization-company-list .branch-grid-table tbody td:nth-child(7)::before { content: "Status"; }
  .organization-company-list .branch-grid-table tbody td:nth-child(8)::before { content: "Actions"; }

  .organization-company-list .branch-grid-table tbody td:last-child {
    border-bottom: 0;
  }

  .organization-company-list .branch-grid-table tr.is-selected td:first-child {
    box-shadow: none;
  }
}

/* Final sales report screen-fit authority. */
@media screen and (min-width: 1180px) {
  .sales-report-filter-panel .all-sales-filters {
    grid-template-columns: minmax(0,.9fr) minmax(0,.9fr) minmax(0,.95fr) minmax(0,1.25fr) minmax(0,.9fr) minmax(0,.9fr) minmax(154px,.85fr) !important;
    gap: 8px;
  }

  .sales-report-filter-panel .all-sales-filters > * {
    min-width: 0;
    grid-column: auto !important;
  }
}

.page:has(.sales-register-wrap) { overflow-x: hidden !important; }
.sales-register-wrap {
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
}
.sales-register-wrap .sales-register-table {
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed !important;
}
.sales-register-wrap .sales-register-table th { position: static !important; }
.sales-register-wrap .sales-register-table .row-actions,
.sales-register-wrap .sales-register-table .row-action-line { width: 100%; min-width: 0; }

/* Sales register typography and density authority for the current eight-column layout. */
.sales-register-wrap .sales-register-table {
  font-variant-numeric: tabular-nums;
}

.sales-register-wrap .sales-register-table th {
  padding: 10px 8px !important;
  color: #24476d;
  font-size: 11.5px !important;
  font-weight: 750;
  line-height: 1.2 !important;
  letter-spacing: .025em;
  text-transform: uppercase;
  vertical-align: middle;
}

.sales-register-wrap .sales-register-table td {
  height: 62px;
  padding: 10px 8px !important;
  color: #102f55;
  font-size: 13px !important;
  font-weight: 450;
  line-height: 1.38 !important;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
}

.sales-register-wrap .sales-register-table td strong,
.sales-register-wrap .sales-register-table .link-button {
  font-size: inherit;
  font-weight: 650;
}

.sales-register-wrap .sales-register-table .hint {
  display: inline-block;
  margin-top: 1px;
  color: #637b98;
  font-size: 11.5px;
  line-height: 1.3;
}

.sales-register-wrap .sales-register-table th:nth-child(1),
.sales-register-wrap .sales-register-table td:nth-child(1) { width: 9%; }
.sales-register-wrap .sales-register-table th:nth-child(2),
.sales-register-wrap .sales-register-table td:nth-child(2) { width: 12%; }
.sales-register-wrap .sales-register-table th:nth-child(3),
.sales-register-wrap .sales-register-table td:nth-child(3) { width: 12%; }
.sales-register-wrap .sales-register-table th:nth-child(4),
.sales-register-wrap .sales-register-table td:nth-child(4) { width: 21%; }
.sales-register-wrap .sales-register-table th:nth-child(5),
.sales-register-wrap .sales-register-table td:nth-child(5) { width: 12%; }
.sales-register-wrap .sales-register-table th:nth-child(6),
.sales-register-wrap .sales-register-table td:nth-child(6) { width: 10%; text-align: center; }
.sales-register-wrap .sales-register-table th:nth-child(7),
.sales-register-wrap .sales-register-table td:nth-child(7) { width: 18%; text-align: right; }
.sales-register-wrap .sales-register-table th:nth-child(8),
.sales-register-wrap .sales-register-table td:nth-child(8) { width: 6%; text-align: center; }

.sales-register-wrap .sales-register-table td:nth-child(2),
.sales-register-wrap .sales-register-table td:nth-child(3),
.sales-register-wrap .sales-register-table td:nth-child(4),
.sales-register-wrap .sales-register-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-register-wrap .sales-register-table td.amount {
  font-size: 12px !important;
  line-height: 1.32 !important;
  white-space: normal;
}

.sales-register-wrap .sales-register-table td.amount strong,
.sales-register-wrap .sales-register-table td.amount > :first-child {
  font-size: 13px;
  font-weight: 700;
}

.sales-register-wrap .sales-register-table .status {
  min-width: 72px;
  justify-content: center;
  font-size: 12px;
  font-weight: 650;
}

.sales-register-wrap .sales-register-table .register-actions-cell {
  overflow: visible;
}

.sales-register-wrap .sales-register-table tbody tr:hover td {
  background: #f7faff;
}

/* Customer payments professional register: fixed accounting columns, no nested scrollbars. */
.page:has(.customer-payments-register-wrap) { overflow-x: hidden !important; }
.customer-payments-toolbar .toolbar {
  margin-bottom: 14px;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 42, 76, .035);
}
.customer-payments-toolbar .toolbar .filters {
  grid-template-columns: minmax(150px,.75fr) minmax(230px,1.25fr) auto minmax(190px,1fr) minmax(190px,1fr) auto;
  gap: 10px;
  align-items: end;
}
.customer-payments-register-wrap {
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid #d5e0ed;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(15, 42, 76, .04);
}
.customer-payments-register-table {
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: separate;
  border-spacing: 0;
}
.customer-payments-register-table th {
  position: static !important;
  padding: 10px 6px;
  background: #eaf1f9;
  color: #294b70;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: normal;
}
.customer-payments-register-table td {
  padding: 10px 6px;
  color: #102f50;
  font-size: 10.75px;
  line-height: 1.25;
  vertical-align: middle;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #e4ebf3;
}
.customer-payments-register-table tbody tr:nth-child(even) { background: #fbfdff; }
.customer-payments-register-table tbody tr:hover { background: #f3f8fe; }
.customer-payments-register-table th:nth-child(1), .customer-payments-register-table td:nth-child(1) { width: 7%; }
.customer-payments-register-table th:nth-child(2), .customer-payments-register-table td:nth-child(2) { width: 10%; }
.customer-payments-register-table th:nth-child(3), .customer-payments-register-table td:nth-child(3) { width: 8%; }
.customer-payments-register-table th:nth-child(4), .customer-payments-register-table td:nth-child(4) { width: 8%; }
.customer-payments-register-table th:nth-child(5), .customer-payments-register-table td:nth-child(5) { width: 10%; }
.customer-payments-register-table th:nth-child(6), .customer-payments-register-table td:nth-child(6) { width: 12%; }
.customer-payments-register-table th:nth-child(7), .customer-payments-register-table td:nth-child(7) { width: 7%; }
.customer-payments-register-table th:nth-child(8), .customer-payments-register-table td:nth-child(8) { width: 9%; text-align: right; }
.customer-payments-register-table th:nth-child(9), .customer-payments-register-table td:nth-child(9) { width: 8%; text-align: center; }
.customer-payments-register-table th:nth-child(10), .customer-payments-register-table td:nth-child(10) { width: 9%; }
.customer-payments-register-table th:nth-child(11), .customer-payments-register-table td:nth-child(11) { width: 12%; }
.customer-payments-register-table .amount { white-space: normal; }
.customer-payments-register-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px;
  width: 100%;
}
.customer-payments-register-table .btn.small {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 4px;
  font-size: 9.5px;
  white-space: normal;
}

@media screen and (max-width: 1180px) {
  .customer-payments-toolbar .toolbar .filters {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .customer-payments-register-table th,
  .customer-payments-register-table td {
    padding-inline: 4px;
    font-size: 9px;
  }
}

@media screen and (max-width: 760px) {
  .customer-payments-toolbar .toolbar .filters { grid-template-columns: 1fr; }
  .customer-payments-register-table th { font-size: 8px; }
  .customer-payments-register-table td { font-size: 8.5px; }
  .customer-payments-register-table th,
  .customer-payments-register-table td { padding: 7px 2px; }
}

/* Purchase report: single-row controls, fixed accounting register and true page navigation. */
@media screen and (min-width: 1180px) {
  .purchase-report-filter-panel .all-sales-filters {
    grid-template-columns: minmax(0,.9fr) minmax(0,.9fr) minmax(0,.95fr) minmax(0,1.25fr) minmax(0,.9fr) minmax(0,.9fr) minmax(154px,.85fr) !important;
    gap: 8px;
    align-items: end;
  }

  .purchase-report-filter-panel .all-sales-filters > * {
    min-width: 0;
    grid-column: auto !important;
  }
}

.page:has(.purchase-register-wrap) { overflow-x: hidden !important; }
.purchase-register-wrap {
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid #d5e0ed;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 4px 16px rgba(15,42,76,.04);
}
.purchase-register-table {
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: separate;
  border-spacing: 0;
}
.purchase-register-table th {
  position: static !important;
  padding: 10px 5px;
  background: #eaf1f9;
  color: #294b70;
  font-size: 9.25px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: normal;
}
.purchase-register-table td {
  padding: 9px 5px;
  color: #102f50;
  font-size: 10.25px;
  line-height: 1.25;
  vertical-align: middle;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #e4ebf3;
}
.purchase-register-table tbody tr:nth-child(even) { background: #fbfdff; }
.purchase-register-table tbody tr:hover { background: #f3f8fe; }
.purchase-register-table th:nth-child(1), .purchase-register-table td:nth-child(1) { width: 8%; }
.purchase-register-table th:nth-child(2), .purchase-register-table td:nth-child(2) { width: 10%; }
.purchase-register-table th:nth-child(3), .purchase-register-table td:nth-child(3) { width: 9%; }
.purchase-register-table th:nth-child(4), .purchase-register-table td:nth-child(4) { width: 9%; }
.purchase-register-table th:nth-child(5), .purchase-register-table td:nth-child(5) { width: 13%; }
.purchase-register-table th:nth-child(6), .purchase-register-table td:nth-child(6) { width: 14%; }
.purchase-register-table th:nth-child(7), .purchase-register-table td:nth-child(7) { width: 7%; text-align: center; }
.purchase-register-table th:nth-child(8), .purchase-register-table td:nth-child(8) { width: 11%; text-align: right; }
.purchase-register-table th:nth-child(9), .purchase-register-table td:nth-child(9) { width: 19%; }
.purchase-register-table .amount { white-space: normal; }
.purchase-register-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px;
  width: 100%;
}
.purchase-register-table .btn.small {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 3px;
  font-size: 9px;
  white-space: normal;
}
.purchase-report-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #d5e0ed;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
  color: #526c89;
  font-size: 11px;
}
.purchase-report-page-buttons { display: flex; align-items: center; gap: 6px; }
.purchase-report-page-buttons .btn.small { min-width: 34px; min-height: 34px; padding: 0 8px; }
.purchase-report-page-buttons .btn[aria-current="page"] { box-shadow: 0 2px 7px rgba(37,99,235,.2); }
.purchase-report-page-size { justify-self: end; }

@media screen and (max-width: 1179px) {
  .purchase-report-filter-panel .all-sales-filters { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .purchase-register-table th, .purchase-register-table td { padding-inline: 3px; font-size: 8.75px; }
}

@media screen and (max-width: 760px) {
  .purchase-report-filter-panel .all-sales-filters { grid-template-columns: 1fr !important; }
  .purchase-register-table th { font-size: 7.5px; }
  .purchase-register-table td { font-size: 8px; padding: 7px 2px; }
  .purchase-report-pagination { grid-template-columns: 1fr; justify-items: center; }
  .purchase-report-page-size { justify-self: center; }
}

/* Active tenant context authority: redundant company/branch columns removed from transaction registers. */
@media screen and (min-width: 1180px) {
  .sales-report-filter-panel .all-sales-filters,
  .purchase-report-filter-panel .all-sales-filters {
    grid-template-columns: minmax(0,.9fr) minmax(0,1.45fr) minmax(0,.9fr) minmax(0,.9fr) minmax(154px,.9fr) !important;
  }
}

.sales-register-wrap .sales-register-table th:nth-child(1), .sales-register-wrap .sales-register-table td:nth-child(1) { width: 9%; }
.sales-register-wrap .sales-register-table th:nth-child(2), .sales-register-wrap .sales-register-table td:nth-child(2) { width: 12%; }
.sales-register-wrap .sales-register-table th:nth-child(3), .sales-register-wrap .sales-register-table td:nth-child(3) { width: 12%; }
.sales-register-wrap .sales-register-table th:nth-child(4), .sales-register-wrap .sales-register-table td:nth-child(4) { width: 20%; }
.sales-register-wrap .sales-register-table th:nth-child(5), .sales-register-wrap .sales-register-table td:nth-child(5) { width: 21%; }
.sales-register-wrap .sales-register-table th:nth-child(6), .sales-register-wrap .sales-register-table td:nth-child(6) { width: 8%; text-align: center; }
.sales-register-wrap .sales-register-table th:nth-child(7), .sales-register-wrap .sales-register-table td:nth-child(7) { width: 12%; text-align: right; }
.sales-register-wrap .sales-register-table th:nth-child(8), .sales-register-wrap .sales-register-table td:nth-child(8) { width: 6%; text-align: center; }

.purchase-register-table th:nth-child(1), .purchase-register-table td:nth-child(1) { width: 9%; }
.purchase-register-table th:nth-child(2), .purchase-register-table td:nth-child(2) { width: 11%; }
.purchase-register-table th:nth-child(3), .purchase-register-table td:nth-child(3) { width: 11%; }
.purchase-register-table th:nth-child(4), .purchase-register-table td:nth-child(4) { width: 21%; }
.purchase-register-table th:nth-child(5), .purchase-register-table td:nth-child(5) { width: 22%; }
.purchase-register-table th:nth-child(6), .purchase-register-table td:nth-child(6) { width: 8%; text-align: center; }
.purchase-register-table th:nth-child(7), .purchase-register-table td:nth-child(7) { width: 12%; text-align: right; }
.purchase-register-table th:nth-child(8), .purchase-register-table td:nth-child(8) { width: 6%; text-align: center; }

.tenant-scoped-sales-register,
.tenant-scoped-bill-register,
.tenant-scoped-payment-register {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}
.tenant-scoped-sales-register th:nth-child(1), .tenant-scoped-sales-register td:nth-child(1) { width: 9%; }
.tenant-scoped-sales-register th:nth-child(2), .tenant-scoped-sales-register td:nth-child(2) { width: 12%; }
.tenant-scoped-sales-register th:nth-child(3), .tenant-scoped-sales-register td:nth-child(3) { width: 12%; }
.tenant-scoped-sales-register th:nth-child(4), .tenant-scoped-sales-register td:nth-child(4) { width: 20%; }
.tenant-scoped-sales-register th:nth-child(5), .tenant-scoped-sales-register td:nth-child(5) { width: 21%; }
.tenant-scoped-sales-register th:nth-child(6), .tenant-scoped-sales-register td:nth-child(6) { width: 8%; }
.tenant-scoped-sales-register th:nth-child(7), .tenant-scoped-sales-register td:nth-child(7) { width: 12%; }
.tenant-scoped-sales-register th:nth-child(8), .tenant-scoped-sales-register td:nth-child(8) { width: 6%; text-align: center; }
.tenant-scoped-bill-register th:nth-child(1), .tenant-scoped-bill-register td:nth-child(1) { width: 9%; }
.tenant-scoped-bill-register th:nth-child(2), .tenant-scoped-bill-register td:nth-child(2) { width: 10%; }
.tenant-scoped-bill-register th:nth-child(3), .tenant-scoped-bill-register td:nth-child(3) { width: 8%; }
.tenant-scoped-bill-register th:nth-child(4), .tenant-scoped-bill-register td:nth-child(4) { width: 8%; }
.tenant-scoped-bill-register th:nth-child(5), .tenant-scoped-bill-register td:nth-child(5) { width: 16%; }
.tenant-scoped-bill-register th:nth-child(6), .tenant-scoped-bill-register td:nth-child(6) { width: 23%; }
.tenant-scoped-bill-register th:nth-child(7), .tenant-scoped-bill-register td:nth-child(7) { width: 8%; }
.tenant-scoped-bill-register th:nth-child(8), .tenant-scoped-bill-register td:nth-child(8) { width: 12%; }
.tenant-scoped-bill-register th:nth-child(9), .tenant-scoped-bill-register td:nth-child(9) { width: 6%; text-align: center; }
.tenant-scoped-payment-register-wrap { overflow: visible !important; max-height: none !important; }
.tenant-scoped-payment-register th, .tenant-scoped-payment-register td { overflow-wrap: anywhere; }

/* Keep the Vendor Payments and Customer Balance Transfers registers inside the workspace. */
.tenant-scoped-payment-register-wrap,
.customer-balance-transfer-register-wrap { max-width: 100%; min-width: 0; overflow: visible !important; max-height: none !important; }
.tenant-scoped-payment-register,
.customer-balance-transfer-register { width: 100% !important; max-width: 100%; min-width: 0 !important; table-layout: fixed; }
.tenant-scoped-payment-register :is(th, td),
.customer-balance-transfer-register :is(th, td) { box-sizing: border-box; min-width: 0; padding: 10px 7px; overflow-wrap: anywhere; white-space: normal; vertical-align: middle; }
.tenant-scoped-payment-register :is(th, td):nth-child(1) { width: 11%; }
.tenant-scoped-payment-register :is(th, td):nth-child(2) { width: 10%; }
.tenant-scoped-payment-register :is(th, td):nth-child(3) { width: 12%; }
.tenant-scoped-payment-register :is(th, td):nth-child(4) { width: 17%; }
.tenant-scoped-payment-register :is(th, td):nth-child(5) { width: 12%; }
.tenant-scoped-payment-register :is(th, td):nth-child(6) { width: 10%; }
.tenant-scoped-payment-register :is(th, td):nth-child(7) { width: 9%; }
.tenant-scoped-payment-register :is(th, td):nth-child(8) { width: 13%; }
.tenant-scoped-payment-register :is(th, td):nth-child(9) { width: 6%; text-align: center; }
.customer-balance-transfer-register :is(th, td):nth-child(1) { width: 11%; }
.customer-balance-transfer-register :is(th, td):nth-child(2) { width: 13%; }
.customer-balance-transfer-register :is(th, td):nth-child(3),
.customer-balance-transfer-register :is(th, td):nth-child(4) { width: 16%; }
.customer-balance-transfer-register :is(th, td):nth-child(5) { width: 12%; }
.customer-balance-transfer-register :is(th, td):nth-child(6) { width: 10%; }
.customer-balance-transfer-register :is(th, td):nth-child(7) { width: 16%; }
.customer-balance-transfer-register :is(th, td):nth-child(8) { width: 6%; text-align: center; }
.tenant-scoped-payment-register td.empty,
.customer-balance-transfer-register td.empty { width: auto !important; }
.tenant-scoped-payment-register .register-actions-cell,
.customer-balance-transfer-register .register-actions-cell { overflow: visible; }
.tenant-scoped-payment-register .erp-action-menu,
.customer-balance-transfer-register .erp-action-menu { display: inline-flex; }
.tenant-scoped-payment-register .erp-action-trigger,
.customer-balance-transfer-register .erp-action-trigger { width: 38px; height: 38px; }

@media (max-width: 1250px) {
  .tenant-scoped-payment-register-wrap,
  .customer-balance-transfer-register-wrap { border: 0; background: transparent; box-shadow: none; }
  .tenant-scoped-payment-register,
  .customer-balance-transfer-register,
  .tenant-scoped-payment-register tbody,
  .customer-balance-transfer-register tbody,
  .tenant-scoped-payment-register tbody tr,
  .customer-balance-transfer-register tbody tr { display: block; width: 100%; }
  .tenant-scoped-payment-register thead,
  .customer-balance-transfer-register thead { display: none; }
  .tenant-scoped-payment-register tbody tr,
  .customer-balance-transfer-register tbody tr { margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .tenant-scoped-payment-register tbody td,
  .customer-balance-transfer-register tbody td { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 8px; width: 100% !important; padding: 7px 0; border: 0; text-align: left !important; }
  .tenant-scoped-payment-register tbody td::before,
  .customer-balance-transfer-register tbody td::before { color: #526781; font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .tenant-scoped-payment-register tbody td:nth-child(1)::before,
  .customer-balance-transfer-register tbody td:nth-child(1)::before { content: "Date"; }
  .tenant-scoped-payment-register tbody td:nth-child(2)::before { content: "Bill"; }
  .tenant-scoped-payment-register tbody td:nth-child(3)::before { content: "Vendor"; }
  .tenant-scoped-payment-register tbody td:nth-child(4)::before { content: "Paid from account"; }
  .tenant-scoped-payment-register tbody td:nth-child(5)::before { content: "Method"; }
  .tenant-scoped-payment-register tbody td:nth-child(6)::before,
  .customer-balance-transfer-register tbody td:nth-child(5)::before { content: "Amount"; }
  .tenant-scoped-payment-register tbody td:nth-child(7)::before,
  .customer-balance-transfer-register tbody td:nth-child(6)::before { content: "Status"; }
  .tenant-scoped-payment-register tbody td:nth-child(8)::before,
  .customer-balance-transfer-register tbody td:nth-child(7)::before { content: "Reference"; }
  .tenant-scoped-payment-register tbody td:nth-child(9)::before,
  .customer-balance-transfer-register tbody td:nth-child(8)::before { content: "Actions"; }
  .customer-balance-transfer-register tbody td:nth-child(2)::before { content: "No."; }
  .customer-balance-transfer-register tbody td:nth-child(3)::before { content: "From customer"; }
  .customer-balance-transfer-register tbody td:nth-child(4)::before { content: "To customer"; }
  .tenant-scoped-payment-register tbody td.empty,
  .customer-balance-transfer-register tbody td.empty { display: block; text-align: center !important; }
  .tenant-scoped-payment-register tbody td.empty::before,
  .customer-balance-transfer-register tbody td.empty::before { content: none; }
}

.customer-payments-register-table th:nth-child(1), .customer-payments-register-table td:nth-child(1) { width: 8%; }
.customer-payments-register-table th:nth-child(2), .customer-payments-register-table td:nth-child(2) { width: 10%; }
.customer-payments-register-table th:nth-child(3), .customer-payments-register-table td:nth-child(3) { width: 10%; }
.customer-payments-register-table th:nth-child(4), .customer-payments-register-table td:nth-child(4) { width: 12%; }
.customer-payments-register-table th:nth-child(5), .customer-payments-register-table td:nth-child(5) { width: 16%; }
.customer-payments-register-table th:nth-child(6), .customer-payments-register-table td:nth-child(6) { width: 8%; }
.customer-payments-register-table th:nth-child(7), .customer-payments-register-table td:nth-child(7) { width: 10%; text-align: right; }
.customer-payments-register-table th:nth-child(8), .customer-payments-register-table td:nth-child(8) { width: 8%; text-align: center; }
.customer-payments-register-table th:nth-child(9), .customer-payments-register-table td:nth-child(9) { width: 12%; }
.customer-payments-register-table th:nth-child(10), .customer-payments-register-table td:nth-child(10) { width: 6%; text-align: center; }

/* Approved Customer Payments workspace (2026-08): scoped visual refinement only. */
.customer-payments-page{--cp-primary:#2563eb;--cp-success:#059669;--cp-danger:#dc2626;--cp-warning:#d97706;--cp-text:#0f2747;--cp-muted:#64748b;--cp-border:#dce6f2;display:grid;gap:16px;color:var(--cp-text)}
.customer-payment-tabs{display:flex;align-items:end;min-height:50px;border-bottom:1px solid var(--cp-border)}
.customer-payment-tabs button{align-self:stretch;padding:0 12px;color:var(--cp-primary);background:transparent;border:0;border-bottom:2px solid var(--cp-primary);font-size:14px;font-weight:700;cursor:default}
.customer-payment-commandbar{display:grid;grid-template-columns:minmax(310px,1.2fr) minmax(280px,1fr) auto auto;gap:12px;align-items:center}
.customer-payment-commandbar>.btn{height:44px;white-space:nowrap}
.customer-payment-date-range,.customer-payment-search{display:flex;align-items:center;min-width:0;height:44px;padding:0 12px;background:#fff;border:1px solid var(--cp-border);border-radius:9px}
.customer-payment-date-range>.nav-icon,.customer-payment-search>.nav-icon{flex:0 0 18px;width:18px;height:18px;color:#58708e}
.customer-payment-date-range label{flex:1;min-width:0}.customer-payment-date-range input{width:100%;height:40px;padding:0 8px;border:0;background:transparent;font:inherit;color:var(--cp-text)}
.customer-payment-date-range>span{color:#8a9ab0}.customer-payment-search{position:relative;gap:8px}.customer-payment-search input{width:100%;height:40px;padding:0;border:0;outline:0;background:transparent;font:inherit;color:var(--cp-text)}
.customer-payment-filter-button>span{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;color:#fff;background:var(--cp-primary);border-radius:999px;font-size:11px}
.customer-payment-filter-panel{display:flex;align-items:end;justify-content:flex-end;gap:12px;padding:14px 16px;background:#f8fbff;border:1px solid var(--cp-border);border-radius:10px}
.customer-payment-filter-panel label{display:grid;gap:6px;min-width:210px;font-size:12px;font-weight:700}.customer-payment-filter-panel select{height:42px}.customer-payment-filter-panel>div{display:flex;gap:8px}
.customer-payment-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.customer-payment-kpi{display:flex;align-items:center;gap:16px;min-height:112px;padding:18px;background:#fff;border:1px solid var(--cp-border);border-radius:13px;box-shadow:0 6px 18px rgba(15,39,71,.055)}
.customer-payment-kpi-icon{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;border-radius:50%}.customer-payment-kpi-icon .nav-icon{width:25px;height:25px}
.customer-payment-kpi>div{display:grid;gap:3px;min-width:0}.customer-payment-kpi small{color:var(--cp-muted);font-size:12px}.customer-payment-kpi strong{font-size:22px;line-height:1.2;white-space:nowrap}.customer-payment-kpi>div>span{color:var(--cp-muted);font-size:12px}
.customer-payment-kpi.blue .customer-payment-kpi-icon{color:var(--cp-primary);background:#eff6ff}.customer-payment-kpi.green .customer-payment-kpi-icon{color:var(--cp-success);background:#ecfdf5}.customer-payment-kpi.red .customer-payment-kpi-icon{color:var(--cp-danger);background:#fef2f2}.customer-payment-kpi.amber .customer-payment-kpi-icon{color:var(--cp-warning);background:#fffbeb}
.customer-payments-page .customer-payments-register-wrap{overflow-x:auto!important;background:#fff;border:1px solid var(--cp-border);border-radius:13px 13px 0 0;box-shadow:0 7px 20px rgba(15,39,71,.05)}
.customer-payments-page .customer-payments-register-table{min-width:1080px!important;border-collapse:separate!important;border-spacing:0!important}
.customer-payments-page .customer-payments-register-table thead{background:#eef4fb}.customer-payments-page .customer-payments-register-table th{height:44px;padding:10px 12px!important;color:#29415f!important;background:#eef4fb!important;font-size:11px!important;font-weight:750!important;letter-spacing:.025em;text-transform:uppercase;vertical-align:middle!important}
.customer-payments-page .customer-payments-register-table td{height:68px;padding:10px 12px!important;border-bottom:1px solid #e4ebf4!important;font-size:13px!important;line-height:1.35;vertical-align:middle!important}
.customer-payments-page .customer-payments-register-table tbody tr:nth-child(even){background:#fff}.customer-payments-page .customer-payments-register-table tbody tr:hover{background:#f7faff}
.customer-payments-page .customer-payments-register-table td:first-child small{display:block;margin-top:3px;color:var(--cp-muted);font-size:11px}.payment-date{white-space:nowrap}
.payment-type{position:relative;display:block;padding-left:14px;max-width:145px}.payment-type:before{position:absolute;top:.52em;left:0;width:6px;height:6px;border-radius:50%;background:currentColor;content:""}.payment-type.inflow{color:var(--cp-success)}.payment-type.outflow{color:var(--cp-danger)}.payment-type.inflow,.payment-type.outflow{color:var(--cp-text)}.payment-type.inflow:before{background:var(--cp-success)}.payment-type.outflow:before{background:var(--cp-danger)}
.customer-payments-page .customer-payments-register-table td.amount strong{display:block;color:var(--cp-text);font-weight:700}.payment-flow{display:block;margin-top:2px;font-size:11px;font-weight:600}.payment-flow.inflow{color:var(--cp-success)}.payment-flow.outflow{color:var(--cp-danger)}
.customer-payment-pagination{display:grid;grid-template-columns:1fr auto auto;gap:16px;align-items:center;min-height:58px;padding:10px 16px;color:var(--cp-muted);background:#fff;border:1px solid var(--cp-border);border-top:0;border-radius:0 0 13px 13px;font-size:13px}
.customer-payment-pagination nav{display:flex;align-items:center;gap:6px}.customer-payment-pagination button{display:grid;place-items:center;min-width:34px;height:34px;padding:0 8px;color:#48617f;background:#fff;border:1px solid var(--cp-border);border-radius:7px}.customer-payment-pagination button.active{color:#fff;background:var(--cp-primary);border-color:var(--cp-primary)}.customer-payment-pagination button:disabled{opacity:.45}.customer-payment-pagination select{height:36px;padding:0 32px 0 10px}
@media(max-width:1100px){.customer-payment-commandbar{grid-template-columns:1fr 1fr auto auto}.customer-payment-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.customer-payment-commandbar{grid-template-columns:1fr 1fr}.customer-payment-commandbar>*{width:100%}.customer-payment-kpis{grid-template-columns:1fr 1fr}.customer-payment-filter-panel{align-items:stretch;flex-direction:column}.customer-payment-filter-panel label{min-width:0}.customer-payment-pagination{grid-template-columns:1fr auto}.customer-payment-pagination label{grid-column:1/-1}.customer-payment-date-range{grid-column:1/-1}}
@media(max-width:480px){.customer-payment-commandbar,.customer-payment-kpis{grid-template-columns:1fr}.customer-payment-date-range{grid-column:auto}.customer-payment-kpi{min-height:96px}.customer-payment-pagination{grid-template-columns:1fr}.customer-payment-pagination nav{justify-content:flex-start;overflow-x:auto}}
@media print{.customer-payment-tabs,.customer-payment-commandbar,.customer-payment-filter-panel,.customer-payment-pagination{display:none!important}.customer-payments-page .customer-payments-register-table{min-width:0!important}}
.customer-payments-toolbar .toolbar .filters {
  grid-template-columns: minmax(150px,.75fr) minmax(280px,1.65fr) auto auto !important;
}
.tenant-scoped-expense-register-wrap { overflow: visible !important; max-height: none !important; }
.tenant-scoped-expense-register { width: 100%; min-width: 0; table-layout: fixed; }
.tenant-scoped-expense-register th:nth-child(1), .tenant-scoped-expense-register td:nth-child(1) { width: 16%; }
.tenant-scoped-expense-register th:nth-child(2), .tenant-scoped-expense-register td:nth-child(2) { width: 11%; }
.tenant-scoped-expense-register th:nth-child(3), .tenant-scoped-expense-register td:nth-child(3) { width: 15%; }
.tenant-scoped-expense-register th:nth-child(4), .tenant-scoped-expense-register td:nth-child(4) { width: 10%; }
.tenant-scoped-expense-register th:nth-child(5), .tenant-scoped-expense-register td:nth-child(5) { width: 13%; }
.tenant-scoped-expense-register th:nth-child(6), .tenant-scoped-expense-register td:nth-child(6) { width: 29%; }
.tenant-scoped-expense-register th:nth-child(7), .tenant-scoped-expense-register td:nth-child(7) { width: 6%; text-align: center; }

@media screen and (max-width: 900px) {
  .customer-payments-toolbar .toolbar .filters { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

@media screen and (max-width: 600px) {
  .customer-payments-toolbar .toolbar .filters { grid-template-columns: 1fr !important; }
}

/* Expenses Ledger: scoped report-suite presentation */
.exl-workspace{display:grid;gap:16px;padding:4px;color:var(--text,#10233f);font-variant-numeric:tabular-nums}
.exl-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:14px;box-shadow:0 4px 14px rgba(17,40,72,.05)}
.exl-heading{padding-left:16px;border-left:4px solid var(--primary,#2463eb)}
.exl-heading h1{margin:0;color:#071b36;font-size:clamp(26px,2vw,30px);line-height:1.15;font-weight:800;letter-spacing:-.025em}
.exl-heading p{margin:5px 0 0;color:#526987;font-size:14px}
.exl-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.exl-date{display:flex;align-items:center;gap:7px;min-height:44px;padding:0 10px;background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:9px}
.exl-date .nav-icon{width:17px;height:17px;color:#526987}
.exl-date input{width:126px;padding:0;border:0;background:transparent;font-weight:650;color:#10233f;outline:0}
.exl-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.exl-kpis article{display:flex;align-items:center;gap:14px;min-height:104px;padding:16px 18px;background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:13px;box-shadow:0 3px 12px rgba(17,40,72,.045)}
.exl-kpi-icon{display:grid;place-items:center;width:54px;height:54px;flex:0 0 54px;border-radius:12px}
.exl-kpi-icon .nav-icon{width:24px;height:24px}
.exl-kpi-icon.blue{color:#1f63ed;background:#e9f0ff}.exl-kpi-icon.green{color:#079b59;background:#e4f7ed}.exl-kpi-icon.purple{color:#7138d7;background:#efe7ff}.exl-kpi-icon.orange{color:#f07800;background:#fff0df}
.exl-kpis article div{display:grid;gap:3px;min-width:0}.exl-kpis small{color:#4d6280;font-size:13px;font-weight:650}.exl-kpis strong{color:#071b36;font-size:22px;line-height:1.15;font-weight:800}.exl-kpis em{color:#6c7e96;font-size:12px;font-style:normal}
.exl-report-card{min-width:0;overflow:visible;background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:14px;box-shadow:0 4px 14px rgba(17,40,72,.05)}
.exl-filters{display:grid;grid-template-columns:minmax(160px,1.3fr) repeat(2,minmax(125px,.9fr)) repeat(5,minmax(120px,.85fr)) auto;align-items:end;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border,#d6e0ec)}
.exl-filters.is-hidden{display:none}.exl-filters label{display:grid;gap:5px;min-width:0}.exl-filters label>span{color:#405673;font-size:11px;font-weight:700}.exl-filters input,.exl-filters select{width:100%;height:40px;padding:0 10px;color:#10233f;background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:8px;font:inherit;font-size:13px;font-weight:600}
.exl-search>div{position:relative}.exl-search .nav-icon{position:absolute;left:10px;top:11px;width:17px;height:17px;color:#647995}.exl-search input{padding-left:34px}
.exl-filters .ar-clear{height:40px;white-space:nowrap}
.exl-table-wrap{overflow:visible;min-width:0}.exl-table-wrap table{width:100%;table-layout:fixed;border-collapse:collapse}.exl-table-wrap th,.exl-table-wrap td{padding:11px 10px;border-bottom:1px solid #e0e7f0;color:#18304f;font-size:12.5px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}.exl-table-wrap thead th{height:42px;color:#314966;background:#eef4fb;font-size:11px;font-weight:750;text-transform:uppercase;white-space:nowrap}.exl-table-wrap tbody tr:hover{background:#f8fbff}.exl-table-wrap th.amount,.exl-table-wrap td.amount{text-align:right}.exl-table-wrap th>button{display:inline-flex;align-items:center;gap:4px;padding:0;color:inherit;background:none;border:0;font:inherit;text-transform:inherit;cursor:pointer}.exl-table-wrap th.amount>button{justify-content:flex-end;width:100%}.exl-table-wrap th>button span{color:#8ba0ba}.exl-table-wrap th>button.active span{color:#2463eb}
.exl-table-wrap th:nth-child(1){width:8%}.exl-table-wrap th:nth-child(2){width:10%}.exl-table-wrap th:nth-child(3){width:16%}.exl-table-wrap th:nth-child(4){width:12%}.exl-table-wrap th:nth-child(5){width:9%}.exl-table-wrap th:nth-child(6){width:9%}.exl-table-wrap th:nth-child(7),.exl-table-wrap th:nth-child(8){width:8%}.exl-table-wrap th:nth-child(9){width:9%}.exl-table-wrap th:nth-child(10){width:7%}.exl-table-wrap th:nth-child(11){width:4%}.exl-actions{text-align:center;overflow:visible!important}
.exl-type-badge,.exl-status-badge{display:inline-flex;align-items:center;min-height:25px;padding:3px 8px;border:1px solid transparent;border-radius:7px;font-size:11px;font-weight:700;white-space:nowrap}.exl-type-badge.blue{color:#155bd7;background:#eaf1ff;border-color:#c9dcff}.exl-type-badge.green,.exl-status-badge.green{color:#087c49;background:#e4f7ed;border-color:#bce9d1}.exl-type-badge.purple,.exl-status-badge.purple{color:#6732c5;background:#efe8ff;border-color:#dccdfd}.exl-type-badge.amber,.exl-status-badge.amber{color:#9a5a00;background:#fff1dc;border-color:#f3d6a8}.exl-type-badge.red,.exl-status-badge.red{color:#bd2635;background:#fde9eb;border-color:#f5c9ce}.exl-type-badge.neutral,.exl-status-badge.neutral{color:#425773;background:#eef2f7;border-color:#d8e0ea}
.exl-table-footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:12px 14px;color:#526987;font-size:12.5px}.exl-table-footer label{display:flex;align-items:center;gap:8px}.exl-table-footer select{height:36px;padding:0 24px 0 10px;border:1px solid var(--border,#d6e0ec);border-radius:8px;background:#fff}.exl-table-footer nav{display:flex;justify-content:flex-end;gap:6px}.exl-table-footer nav button{display:grid;place-items:center;min-width:34px;height:34px;padding:0 9px;color:#415772;background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:8px}.exl-table-footer nav button.active{color:#fff;background:#2463eb;border-color:#2463eb}.exl-table-footer nav button:disabled{color:#a7b5c7;background:#f4f7fa}
.exl-totals{justify-self:end;display:grid;grid-template-columns:repeat(3,1fr);width:min(720px,100%);background:#fff;border:1px solid var(--border,#d6e0ec);border-radius:13px;box-shadow:0 4px 14px rgba(17,40,72,.05)}.exl-totals>div{position:relative;display:grid;gap:6px;padding:16px 20px;border-left:1px solid var(--border,#d6e0ec)}.exl-totals>div:first-child{border-left:0}.exl-totals>div::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;background:transparent}.exl-totals>div.blue::before{background:#2463eb}.exl-totals>div.orange::before{background:#f07800}.exl-totals small{color:#526987;font-size:12px;font-weight:650}.exl-totals strong{color:#071b36;font-size:19px;font-weight:800}.exl-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:2px 4px;color:#5d718d;font-size:12.5px}.exl-bottom>div{display:flex;align-items:center;gap:7px}.exl-bottom .nav-icon{width:17px;height:17px;color:#2463eb}.exl-print-meta{display:none}.exl-empty{display:grid;justify-items:center;gap:7px;padding:40px 18px;color:#62758f}.exl-empty strong{color:#18304f;font-size:16px}

@media(max-width:1280px){.exl-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.exl-table-wrap{overflow-x:auto}.exl-table-wrap table{min-width:1120px}}
@media(max-width:900px){.exl-header{align-items:flex-start;flex-direction:column}.exl-header-actions{width:100%;justify-content:flex-start}.exl-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.exl-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.exl-totals{justify-self:stretch;width:100%}}
@media(max-width:600px){.exl-workspace{gap:12px}.exl-header{padding:14px}.exl-header-actions{display:grid;grid-template-columns:1fr auto auto}.exl-date{grid-column:1/-1;width:100%;justify-content:center}.exl-date input{width:min(130px,36vw)}.exl-kpis{grid-template-columns:1fr}.exl-kpis article{min-height:88px}.exl-filters{grid-template-columns:1fr}.exl-table-footer{grid-template-columns:1fr;justify-items:start}.exl-table-footer nav{justify-content:flex-start}.exl-totals{grid-template-columns:1fr}.exl-totals>div{border-left:0;border-top:1px solid var(--border,#d6e0ec)}.exl-totals>div:first-child{border-top:0}.exl-bottom{align-items:flex-start;flex-direction:column}}

@media print{.exl-workspace{display:block;padding:0}.exl-header-actions,.exl-filters,.exl-table-footer,.exl-actions,.exl-table-wrap th:last-child,.exl-table-wrap td:last-child,.exl-bottom .ar-powered{display:none!important}.exl-header,.exl-kpis,.exl-report-card,.exl-totals{box-shadow:none}.exl-header{border:0;padding:0 0 12px}.exl-table-wrap{overflow:visible}.exl-table-wrap table{min-width:0;table-layout:auto}.exl-table-wrap thead{display:table-header-group}.exl-table-wrap tr{break-inside:avoid}.exl-print-meta{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 14px;font-size:10px}.exl-totals{margin:12px 0 0 auto}.exl-bottom{margin-top:10px}}

/* Customer receipt context is authoritative in the global application header. */
.payment-context-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #d7e3f1;
  border-left: 3px solid #2563eb;
  border-radius: 10px;
  background: #f7faff;
}

.payment-context-strip span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.payment-context-strip small {
  color: #647a96;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.payment-context-strip strong {
  overflow: hidden;
  color: #102f55;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-context-strip em {
  color: #647a96;
  font-size: 11.5px;
  font-style: normal;
  text-align: right;
}

@media screen and (max-width: 760px) {
  .payment-context-strip { grid-template-columns: 1fr; }
  .payment-context-strip em { text-align: left; }
}

/* Purchase register final eight-column typography and distribution authority. */
.purchase-register-wrap .purchase-register-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  font-variant-numeric: tabular-nums;
}

.purchase-register-wrap .purchase-register-table th {
  position: static !important;
  padding: 10px 8px !important;
  color: #24476d;
  font-size: 11.5px !important;
  font-weight: 750;
  line-height: 1.2 !important;
  letter-spacing: .025em;
  vertical-align: middle;
}

.purchase-register-wrap .purchase-register-table td {
  min-height: 64px;
  padding: 10px 8px !important;
  color: #102f55;
  font-size: 13px !important;
  font-weight: 450;
  line-height: 1.36 !important;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
}

.purchase-register-wrap .purchase-register-table td strong,
.purchase-register-wrap .purchase-register-table .link-button {
  font-size: inherit;
  font-weight: 650;
}

.purchase-register-wrap .purchase-register-table .hint {
  display: inline-block;
  margin-top: 1px;
  color: #637b98;
  font-size: 11.5px;
  line-height: 1.3;
}

.purchase-register-wrap .purchase-register-table th:nth-child(1),
.purchase-register-wrap .purchase-register-table td:nth-child(1) { width: 9%; }
.purchase-register-wrap .purchase-register-table th:nth-child(2),
.purchase-register-wrap .purchase-register-table td:nth-child(2) { width: 11%; }
.purchase-register-wrap .purchase-register-table th:nth-child(3),
.purchase-register-wrap .purchase-register-table td:nth-child(3) { width: 10%; }
.purchase-register-wrap .purchase-register-table th:nth-child(4),
.purchase-register-wrap .purchase-register-table td:nth-child(4) { width: 24%; }
.purchase-register-wrap .purchase-register-table th:nth-child(5),
.purchase-register-wrap .purchase-register-table td:nth-child(5) { width: 18%; }
.purchase-register-wrap .purchase-register-table th:nth-child(6),
.purchase-register-wrap .purchase-register-table td:nth-child(6) { width: 7%; text-align: center !important; }
.purchase-register-wrap .purchase-register-table th:nth-child(7),
.purchase-register-wrap .purchase-register-table td:nth-child(7) { width: 15%; text-align: right !important; }
.purchase-register-wrap .purchase-register-table th:nth-child(8),
.purchase-register-wrap .purchase-register-table td:nth-child(8) { width: 6%; text-align: center !important; }

.purchase-register-wrap .purchase-register-table td:nth-child(2),
.purchase-register-wrap .purchase-register-table td:nth-child(3),
.purchase-register-wrap .purchase-register-table td:nth-child(4),
.purchase-register-wrap .purchase-register-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-register-wrap .purchase-register-table td.amount {
  font-size: 12px !important;
  line-height: 1.32 !important;
  white-space: normal;
}

.purchase-register-wrap .purchase-register-table td.amount strong,
.purchase-register-wrap .purchase-register-table td.amount > :first-child {
  font-size: 13px;
  font-weight: 700;
}

.purchase-register-wrap .purchase-register-table .status {
  min-width: 70px;
  justify-content: center;
  font-size: 12px;
  font-weight: 650;
}

.purchase-register-wrap .purchase-register-table .register-actions-cell {
  overflow: visible;
  text-align: center !important;
}

.purchase-register-wrap .purchase-register-table .register-actions-cell > button,
.purchase-register-wrap .purchase-register-table .register-actions-cell > .record-action-menu {
  margin-inline: auto;
}
.readonly-status-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border, #cbd8ea);
  border-radius: 10px;
  background: #f7f9fc;
}

.readonly-status-field small {
  color: var(--muted, #64748b);
  font-weight: 600;
}
.approval-date-filter{min-width:300px}.approval-date-range{display:grid;grid-template-columns:minmax(125px,1fr) auto minmax(125px,1fr);align-items:center;gap:7px}.approval-date-range>span{color:#64748b;text-align:center}.approval-date-range input{min-width:0}@media(max-width:700px){.approval-date-filter{min-width:0}.approval-date-range{grid-template-columns:1fr}.approval-date-range>span{display:none}}
.approval-workspace .approval-filter-bar{grid-template-columns:minmax(340px,1.45fr) minmax(220px,1fr) minmax(220px,1fr) auto;align-items:end;column-gap:12px}.approval-workspace .approval-date-filter{min-width:0}.approval-workspace .approval-date-range{width:100%;grid-template-columns:minmax(145px,1fr) 12px minmax(145px,1fr)}.approval-workspace .approval-filter-actions{align-self:end;justify-content:flex-start}@media(max-width:1100px){.approval-workspace .approval-filter-bar{grid-template-columns:minmax(320px,1.4fr) minmax(190px,1fr) minmax(190px,1fr)}.approval-workspace .approval-filter-actions{grid-column:1/-1}}@media(max-width:760px){.approval-workspace .approval-filter-bar{grid-template-columns:1fr}.approval-workspace .approval-filter-actions{grid-column:auto}.approval-workspace .approval-date-range{grid-template-columns:1fr}.approval-workspace .approval-date-range>span{display:none}}

/* Status-history approval tables use their own audit-column geometry. */
.approval-workspace .approval-audit-table {
  width: 100%;
  min-width: 940px;
  table-layout: fixed;
}
.approval-workspace .approval-audit-table th,
.approval-workspace .approval-audit-table td {
  box-sizing: border-box;
  height: 46px;
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.approval-workspace .approval-audit-table th {
  height: 42px;
  font-size: 9px;
  letter-spacing: .01em;
}
.approval-workspace .approval-audit-reversed th:nth-child(1),.approval-workspace .approval-audit-reversed td:nth-child(1){width:13%}
.approval-workspace .approval-audit-reversed th:nth-child(2),.approval-workspace .approval-audit-reversed td:nth-child(2){width:14%}
.approval-workspace .approval-audit-reversed th:nth-child(3),.approval-workspace .approval-audit-reversed td:nth-child(3){width:11%}
.approval-workspace .approval-audit-reversed th:nth-child(4),.approval-workspace .approval-audit-reversed td:nth-child(4){width:16%}
.approval-workspace .approval-audit-reversed th:nth-child(5),.approval-workspace .approval-audit-reversed td:nth-child(5){width:10%}
.approval-workspace .approval-audit-reversed th:nth-child(6),.approval-workspace .approval-audit-reversed td:nth-child(6){width:13%}
.approval-workspace .approval-audit-reversed th:nth-child(7),.approval-workspace .approval-audit-reversed td:nth-child(7){width:9%}
.approval-workspace .approval-audit-reversed th:nth-child(8),.approval-workspace .approval-audit-reversed td:nth-child(8){width:8%}
.approval-workspace .approval-audit-reversed th:nth-child(9),.approval-workspace .approval-audit-reversed td:nth-child(9){width:6%;text-align:center}
.approval-workspace .approval-audit-reversed {
  width: 100%;
  min-width: 0;
}
.approval-workspace .approval-audit-reversed th,
.approval-workspace .approval-audit-reversed td {
  padding-inline: 7px;
}
.approval-workspace .approval-audit-reversed th:nth-child(1),.approval-workspace .approval-audit-reversed td:nth-child(1){width:12%}
.approval-workspace .approval-audit-reversed th:nth-child(2),.approval-workspace .approval-audit-reversed td:nth-child(2){width:14%}
.approval-workspace .approval-audit-reversed th:nth-child(3),.approval-workspace .approval-audit-reversed td:nth-child(3){width:11%}
.approval-workspace .approval-audit-reversed th:nth-child(4),.approval-workspace .approval-audit-reversed td:nth-child(4){width:17%}
.approval-workspace .approval-audit-reversed th:nth-child(5),.approval-workspace .approval-audit-reversed td:nth-child(5){width:11%}
.approval-workspace .approval-audit-reversed th:nth-child(6),.approval-workspace .approval-audit-reversed td:nth-child(6){width:11%}
.approval-workspace .approval-audit-reversed th:nth-child(7),.approval-workspace .approval-audit-reversed td:nth-child(7){width:10%}
.approval-workspace .approval-audit-reversed th:nth-child(8),.approval-workspace .approval-audit-reversed td:nth-child(8){width:8%}
.approval-workspace .approval-audit-reversed th:nth-child(9),.approval-workspace .approval-audit-reversed td:nth-child(9){width:6%;text-align:center}
.approval-workspace .approval-audit-approved th:nth-child(1),.approval-workspace .approval-audit-approved td:nth-child(1){width:17%}
.approval-workspace .approval-audit-approved th:nth-child(2),.approval-workspace .approval-audit-approved td:nth-child(2){width:22%}
.approval-workspace .approval-audit-approved th:nth-child(3),.approval-workspace .approval-audit-approved td:nth-child(3){width:14%}
.approval-workspace .approval-audit-approved th:nth-child(4),.approval-workspace .approval-audit-approved td:nth-child(4){width:18%}
.approval-workspace .approval-audit-approved th:nth-child(5),.approval-workspace .approval-audit-approved td:nth-child(5){width:13%}
.approval-workspace .approval-audit-approved th:nth-child(6),.approval-workspace .approval-audit-approved td:nth-child(6){width:10%}
.approval-workspace .approval-audit-approved th:nth-child(7),.approval-workspace .approval-audit-approved td:nth-child(7){width:6%;text-align:center}
.approval-workspace .approval-audit-posted th:nth-child(1),.approval-workspace .approval-audit-posted td:nth-child(1){width:14%}
.approval-workspace .approval-audit-posted th:nth-child(2),.approval-workspace .approval-audit-posted td:nth-child(2){width:18%}
.approval-workspace .approval-audit-posted th:nth-child(3),.approval-workspace .approval-audit-posted td:nth-child(3){width:12%}
.approval-workspace .approval-audit-posted th:nth-child(4),.approval-workspace .approval-audit-posted td:nth-child(4){width:16%}
.approval-workspace .approval-audit-posted th:nth-child(5),.approval-workspace .approval-audit-posted td:nth-child(5){width:11%}
.approval-workspace .approval-audit-posted th:nth-child(6),.approval-workspace .approval-audit-posted td:nth-child(6){width:14%}
.approval-workspace .approval-audit-posted th:nth-child(7),.approval-workspace .approval-audit-posted td:nth-child(7){width:9%}
.approval-workspace .approval-audit-posted th:nth-child(8),.approval-workspace .approval-audit-posted td:nth-child(8){width:6%;text-align:center}
.approval-type-badge{display:inline-flex;align-items:center;max-width:150px;padding:4px 8px;border:1px solid #cfe0ff;border-radius:999px;background:#eef5ff;color:#1754c7;font-size:10px;font-weight:700;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.approval-detail-scroll:has(.approval-pending-table){overflow-x:hidden}
.approval-workspace .approval-pending-table{width:100%;min-width:0;table-layout:fixed}
.approval-workspace .approval-pending-table th,.approval-workspace .approval-pending-table td{box-sizing:border-box;min-width:0;height:42px;padding:5px 8px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.approval-workspace .approval-pending-table th{font-size:11px;font-weight:800;line-height:1.2;letter-spacing:.02em;color:#18345d}
.approval-workspace .approval-pending-table td{font-size:12.5px;line-height:1.35;color:#102a4c}
.approval-workspace .approval-pending-table th:nth-child(1),.approval-workspace .approval-pending-table td:nth-child(1){width:4%;text-align:center}
.approval-workspace .approval-pending-table th:nth-child(2),.approval-workspace .approval-pending-table td:nth-child(2){width:12%}
.approval-workspace .approval-pending-table th:nth-child(3),.approval-workspace .approval-pending-table td:nth-child(3){width:14%}
.approval-workspace .approval-pending-table th:nth-child(4),.approval-workspace .approval-pending-table td:nth-child(4){width:20%}
.approval-workspace .approval-pending-table th:nth-child(5),.approval-workspace .approval-pending-table td:nth-child(5){width:24%}
.approval-workspace .approval-pending-table th:nth-child(6),.approval-workspace .approval-pending-table td:nth-child(6){width:11%;text-align:right}
.approval-workspace .approval-pending-table th:nth-child(7),.approval-workspace .approval-pending-table td:nth-child(7){width:7%}
.approval-workspace .approval-pending-table th:nth-child(8),.approval-workspace .approval-pending-table td:nth-child(8){width:8%;text-align:center;overflow:visible}
.approval-workspace .approval-all-types-table th:nth-child(1),.approval-workspace .approval-all-types-table td:nth-child(1){width:4%}
.approval-workspace .approval-all-types-table th:nth-child(2),.approval-workspace .approval-all-types-table td:nth-child(2){width:12%}
.approval-workspace .approval-all-types-table th:nth-child(3),.approval-workspace .approval-all-types-table td:nth-child(3){width:9%}
.approval-workspace .approval-all-types-table th:nth-child(4),.approval-workspace .approval-all-types-table td:nth-child(4){width:10%;text-align:left}
.approval-workspace .approval-all-types-table th:nth-child(5),.approval-workspace .approval-all-types-table td:nth-child(5){width:18%;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.35}
.approval-workspace .approval-all-types-table th:nth-child(6),.approval-workspace .approval-all-types-table td:nth-child(6){width:20%;text-align:left;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.35}
.approval-workspace .approval-all-types-table th:nth-child(7),.approval-workspace .approval-all-types-table td:nth-child(7){width:12%;text-align:right;white-space:nowrap;overflow:visible;text-overflow:clip;font-variant-numeric:tabular-nums}
.approval-workspace .approval-all-types-table th:nth-child(8),.approval-workspace .approval-all-types-table td:nth-child(8){width:7%;text-align:left}
.approval-workspace .approval-all-types-table th:nth-child(9),.approval-workspace .approval-all-types-table td:nth-child(9){width:8%;text-align:center;overflow:visible}
.approval-workspace .approval-pending-table .approval-item-cell{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.approval-workspace .approval-all-types-table .approval-item-cell{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.35}
.approval-workspace .approval-all-types-table .approval-type-badge{max-width:100%;padding:3px 7px;font-size:12.5px;font-weight:700}
.approval-workspace .approval-pending-table td:last-child .erp-action-menu{display:inline-flex}
.approval-workspace .approval-pending-table input[type="checkbox"]{width:18px;height:18px;margin:0;vertical-align:middle}
.approval-workspace .approval-pending-table .erp-action-trigger{width:32px;height:32px;border-radius:8px}
.approval-workspace .approval-pending-table .erp-action-trigger .nav-icon{width:16px;height:16px}
.approval-workspace .approval-detail-pagination.is-single-page{min-height:36px;padding-top:5px;padding-bottom:5px}

/* Final PlusCRM compact cascade: intentionally last to outrank legacy panel spacing. */
.crm-workspace .crm-workspace-nav{min-height:42px;padding:0 4px}
.crm-workspace .crm-personal-views{padding:12px 14px}
.crm-workspace .crm-personal-views .panel-head{min-height:0!important;margin:0 0 8px!important;padding:0!important}
.crm-workspace .crm-personal-views .panel-head h3{margin:0;font-size:14px;line-height:1.3}
.crm-workspace .crm-personal-views .form-actions{margin:0!important}
.crm-workspace .crm-lead-card .panel-head{min-height:auto;margin:0 0 8px;padding:0}

/* PlusCRM records workspace */
.crm-workspace .crm-records-card{padding:14px 16px;overflow:hidden}
.crm-records-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}
.crm-records-head>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.crm-records-head h2{margin:0;color:var(--text-primary,#10213b);font-size:16px;line-height:1.3}
.crm-records-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding:8px;border:1px solid var(--border-default,#dce5f0);border-radius:8px;background:var(--surface-subtle,#f7f9fc)}
.crm-records-toolbar label{flex:1 1 320px;min-width:180px}
.crm-records-toolbar input{width:100%;height:38px;min-height:38px}
.crm-records-table-wrap{max-width:100%;overflow-x:hidden!important;border:1px solid var(--border-default,#dce5f0);border-radius:8px}
.crm-records-table-wrap>.crm-records-table{width:100%!important;max-width:100%;min-width:0!important;table-layout:fixed!important;border-collapse:collapse}
.crm-records-table th,.crm-records-table td{height:42px;padding:7px 9px;vertical-align:middle}
.crm-records-table th{background:#f1f6fd;color:#18345d;font-size:11px;font-weight:800;letter-spacing:.015em;text-align:left}
.crm-records-table td{color:var(--text-primary,#10213b);font-size:12px;line-height:1.25}
.crm-records-table tbody tr:hover{background:#f8fbff}
.crm-records-table th:nth-child(1),.crm-records-table td:nth-child(1){width:16%}
.crm-records-table th:nth-child(2),.crm-records-table td:nth-child(2){width:17%}
.crm-records-table th:nth-child(3),.crm-records-table td:nth-child(3){width:10%}
.crm-records-table th:nth-child(4),.crm-records-table td:nth-child(4){width:11%}
.crm-records-table th:nth-child(5),.crm-records-table td:nth-child(5){width:10%}
.crm-records-table th:nth-child(6),.crm-records-table td:nth-child(6){width:15%}
.crm-records-table .crm-col-value{width:11%;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.crm-records-table th:last-child,.crm-records-table .crm-col-actions{width:10%;text-align:right}
.crm-records-table .crm-col-actions .btn{width:100%;min-width:0;padding-inline:4px}
.crm-cell-truncate{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-col-contact small{margin-top:2px;color:var(--text-muted,#6d7f96)}
.crm-col-stage .status-badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-followup{display:grid;gap:1px;white-space:nowrap}
.crm-followup small{font-size:9px;font-weight:750;letter-spacing:.02em}
.crm-followup-overdue small{color:#a33b31}
.crm-followup-today small{color:#9a6700}
.crm-followup-upcoming small{color:#266b4f}
.crm-followup-none{color:var(--text-muted,#6d7f96)}
.crm-records-empty,.crm-records-state{min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:18px;text-align:center;border:1px dashed var(--border-default,#dce5f0);border-radius:8px;background:#fbfcfe}
.crm-records-empty svg{width:24px;height:24px;color:var(--action-primary,#2563eb)}
.crm-records-empty h3,.crm-records-empty p{margin:0}
.crm-records-empty h3{font-size:14px;color:var(--text-primary,#10213b)}
.crm-records-empty p{font-size:12px;color:var(--text-muted,#6d7f96)}
.crm-records-pagination{min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:8px;color:var(--text-muted,#6d7f96);font-size:11px}
.crm-records-pagination>div{display:flex;gap:6px}

@media screen and (max-width:700px){
  .crm-workspace .crm-records-card{padding:12px}
  .crm-records-head,.crm-records-toolbar{align-items:stretch;flex-wrap:wrap}
  .crm-records-head>div{flex:1 1 180px}
  .crm-records-toolbar label{flex-basis:100%}
  .crm-records-toolbar .btn{flex:1 1 auto}
  .crm-records-table-wrap{overflow:visible;border:0}
  .crm-records-table{display:block;min-width:0}
  .crm-records-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .crm-records-table tbody,.crm-records-table tr,.crm-records-table td{display:block;width:100%!important;height:auto}
  .crm-records-table tr{margin-bottom:8px;padding:10px;border:1px solid var(--border-default,#dce5f0);border-radius:8px;background:#fff}
  .crm-records-table td{display:grid;grid-template-columns:94px minmax(0,1fr);gap:8px;padding:5px 0;border:0;text-align:left!important}
  .crm-records-table td::before{color:var(--text-muted,#6d7f96);font-size:10px;font-weight:750}
  .crm-col-title::before{content:"Title"}.crm-col-contact::before{content:"Contact / Company"}.crm-col-source::before{content:"Source"}.crm-col-owner::before{content:"Owner"}.crm-col-stage::before{content:"Stage"}.crm-col-followup::before{content:"Follow-up"}.crm-col-value::before{content:"Expected value"}.crm-col-actions::before{content:"Actions"}
  .crm-records-pagination{align-items:flex-start;flex-direction:column}
}
/* PlusCRM dashboard: compact, permission-aware and responsive workspace. */
.crm-dashboard-workspace{display:grid;gap:14px;min-width:0}.crm-dashboard-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:2px 4px 8px;border-bottom:1px solid var(--border)}.crm-dashboard-header h1{margin:0;font-size:26px}.crm-dashboard-header p{margin:3px 0 0;color:var(--muted)}.crm-dashboard-header nav{display:flex;flex-wrap:wrap;gap:8px}.crm-dashboard-filter-card{padding:14px}.crm-dashboard-filter-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr)) auto auto auto;gap:10px;align-items:end}.crm-dashboard-filter-grid label,.crm-dashboard-more label{display:grid;gap:5px;font-size:12px;font-weight:700}.crm-dashboard-filter-grid select,.crm-dashboard-filter-grid input,.crm-dashboard-more select{min-width:0;height:40px}.crm-dashboard-more{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-subtle,#f8fafc)}.crm-dashboard-chips{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}.crm-dashboard-chip{border:1px solid #bfdbfe;border-radius:7px;background:#eff6ff;color:#174ea6;padding:7px 10px;cursor:pointer}.crm-dashboard-skeleton,.crm-dashboard-message{min-height:120px;display:flex;align-items:center;justify-content:center;gap:12px}.crm-dashboard-message{flex-direction:column}.crm-dashboard-primary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.crm-dashboard-kpi{display:grid;grid-template-columns:38px 1fr;grid-template-rows:auto auto;gap:2px 10px;text-align:left;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface,#fff);color:inherit;cursor:pointer;min-width:0}.crm-dashboard-kpi svg{grid-row:1/3;width:24px;height:24px;align-self:center;color:var(--primary)}.crm-dashboard-kpi span{font-size:13px;color:var(--muted)}.crm-dashboard-kpi strong{font-size:22px;line-height:1.15;overflow-wrap:anywhere}.crm-dashboard-kpi strong span{display:block;color:inherit;font-size:15px}.crm-dashboard-kpi:focus-visible,.crm-dashboard-stage:focus-visible,.crm-dashboard-list-row:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}.crm-dashboard-secondary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.crm-dashboard-secondary article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border:1px solid var(--border);border-radius:10px;background:var(--surface,#fff)}.crm-dashboard-secondary strong{font-size:20px}.crm-dashboard-pipeline>div:last-child{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden;border:1px solid var(--border);border-radius:9px}.crm-dashboard-stage{display:grid;gap:7px;text-align:left;padding:14px;border:0;border-right:1px solid var(--border);background:transparent;color:inherit;cursor:pointer;min-width:0}.crm-dashboard-stage:last-child{border-right:0}.crm-dashboard-stage span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-dashboard-stage i{display:inline-block;width:9px;height:9px;margin-right:7px;border-radius:50%;background:var(--primary)}.crm-dashboard-stage strong{font-size:20px}.crm-dashboard-stage small{display:grid;color:var(--muted);overflow-wrap:anywhere}.crm-dashboard-analytics{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}.crm-dashboard-analytics>.panel{min-width:0}.crm-dashboard-list{display:grid}.crm-dashboard-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;width:100%;padding:11px 0;border:0;border-bottom:1px solid var(--border);background:transparent;color:inherit;text-align:left;cursor:pointer}.crm-dashboard-list-row:last-child{border-bottom:0}.crm-dashboard-list-row span{display:grid}.crm-dashboard-list-row small,.crm-dashboard-list-row time{color:var(--muted)}.crm-dashboard-list-row b{color:var(--danger,#dc2626)}.crm-dashboard-workspace .table-wrap{max-width:100%;overflow-x:auto}.crm-dashboard-workspace table{width:100%;min-width:560px}.crm-dashboard-workspace td span{display:block;white-space:nowrap}
@media(max-width:1180px){.crm-dashboard-filter-grid{grid-template-columns:repeat(4,minmax(140px,1fr))}.crm-dashboard-primary{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-dashboard-pipeline>div:last-child{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-dashboard-stage:nth-child(3n){border-right:0}.crm-dashboard-analytics{grid-template-columns:1fr}}
@media(max-width:760px){.crm-dashboard-workspace{gap:12px}.crm-dashboard-header{align-items:flex-start}.crm-dashboard-header nav{display:none}.crm-dashboard-header h1{font-size:22px}.crm-dashboard-filter-grid{grid-template-columns:1fr 1fr}.crm-dashboard-filter-grid label:first-child{grid-column:1/2}.crm-dashboard-more-button{grid-column:2}.crm-dashboard-more{grid-template-columns:1fr 1fr}.crm-dashboard-primary{grid-template-columns:1fr 1fr;gap:10px}.crm-dashboard-kpi{padding:13px;grid-template-columns:32px 1fr}.crm-dashboard-kpi strong{font-size:19px}.crm-dashboard-secondary{grid-template-columns:1fr 1fr}.crm-dashboard-pipeline>div:last-child{grid-template-columns:1fr}.crm-dashboard-stage,.crm-dashboard-stage:nth-child(3n){grid-template-columns:minmax(0,1fr) auto auto;align-items:center;border-right:0;border-bottom:1px solid var(--border)}.crm-dashboard-stage:last-child{border-bottom:0}.crm-dashboard-stage small{text-align:right}.crm-dashboard-list-row{grid-template-columns:minmax(0,1fr) auto}.crm-dashboard-list-row>span:nth-child(2){display:none}}
@media(max-width:420px){.crm-dashboard-filter-grid,.crm-dashboard-more{grid-template-columns:1fr}.crm-dashboard-filter-grid label:first-child,.crm-dashboard-more-button{grid-column:auto}.crm-dashboard-primary{grid-template-columns:1fr 1fr}.crm-dashboard-kpi{display:block}.crm-dashboard-kpi svg{margin-bottom:8px}.crm-dashboard-kpi span,.crm-dashboard-kpi strong{display:block}.crm-dashboard-secondary{grid-template-columns:1fr}.crm-dashboard-secondary article{padding:12px}.crm-dashboard-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}.crm-dashboard-pipeline .panel-head{align-items:center}}
.crm-dashboard-header{justify-content:flex-end}
@media(max-width:760px){
  .crm-dashboard-filter-grid label:first-child{order:0}
  .crm-dashboard-more-button{order:1}
  .crm-dashboard-filter-grid label:not(:first-child){order:2}
  .crm-dashboard-filter-grid>.btn.primary,.crm-dashboard-filter-grid>[data-dashboard-reset]{order:3}
  .crm-dashboard-filter-card:has([data-dashboard-more][aria-expanded="false"]) .crm-dashboard-filter-grid label:not(:first-child),
  .crm-dashboard-filter-card:has([data-dashboard-more][aria-expanded="false"]) .crm-dashboard-filter-grid>.btn.primary,
  .crm-dashboard-filter-card:has([data-dashboard-more][aria-expanded="false"]) .crm-dashboard-filter-grid>[data-dashboard-reset]{display:none}
}

/* PlusCRM Leads List filters and server-side sorting. */
.crm-records-toolbar{display:grid;grid-template-columns:minmax(210px,1.7fr) repeat(5,minmax(112px,1fr)) auto;align-items:end;gap:8px}
.crm-records-toolbar label{display:grid;gap:4px;min-width:0!important;font-size:10px;font-weight:750;color:var(--text-muted,#6d7f96)}
.crm-records-toolbar input,.crm-records-toolbar select{width:100%;height:38px;min-width:0;border:1px solid var(--border-default,#dce5f0);border-radius:7px;background:#fff;color:var(--text-primary,#10213b);padding:0 9px}
.crm-records-toolbar-actions{display:flex;gap:6px;align-items:center}
.crm-sort-button{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-width:0;padding:3px 0;border:0;background:transparent;color:inherit;font:inherit;font-weight:800;text-align:left;cursor:pointer}
.crm-sort-button:focus-visible{outline:3px solid #93c5fd;outline-offset:2px;border-radius:3px}
.crm-records-table th:nth-child(1),.crm-records-table td:nth-child(1){width:14%}
.crm-records-table th:nth-child(2),.crm-records-table td:nth-child(2){width:11%}
.crm-records-table th:nth-child(3),.crm-records-table td:nth-child(3){width:12%}
.crm-records-table th:nth-child(4),.crm-records-table td:nth-child(4){width:9%}
.crm-records-table th:nth-child(5),.crm-records-table td:nth-child(5){width:9%}
.crm-records-table th:nth-child(6),.crm-records-table td:nth-child(6){width:9%}
.crm-records-table th:nth-child(7),.crm-records-table td:nth-child(7){width:12%}
.crm-records-table .crm-col-value{width:10%}
.crm-records-table .crm-col-created{width:8%;white-space:nowrap}
.crm-records-table th:last-child,.crm-records-table .crm-col-actions{width:6%}
.crm-records-table .crm-col-select{width:38px!important;text-align:center}.crm-records-table .crm-col-select input{width:16px;height:16px;accent-color:#2563eb}.crm-records-head-actions{display:flex;align-items:center;gap:8px}
.crm-records-head-actions [data-crm-new-lead]{display:inline-flex;align-items:center;gap:6px}.crm-records-head-actions [data-crm-new-lead] .nav-icon{width:15px;height:15px}.crm-lead-form-head-actions{display:flex;align-items:center;gap:10px}
.crm-records-table .crm-col-actions{text-align:center;overflow:visible}.crm-records-table .crm-col-actions .erp-action-menu{display:inline-flex}.crm-records-table .crm-col-actions .erp-action-trigger{width:32px;height:32px;border-radius:8px}.crm-records-table .crm-col-actions .erp-action-trigger .nav-icon{width:16px;height:16px}.crm-action-menu-title{display:flex!important;align-items:center;gap:8px;border-bottom:1px solid #e2e9f2;margin-bottom:4px}.crm-action-menu-title .nav-icon{color:#2563eb}.crm-records-table-wrap{overflow-x:auto;overflow-y:visible}
.crm-lead-action-popover[popover]{width:250px;max-height:calc(100vh - 24px);overflow:visible;padding:7px}.crm-lead-action-popover[popover] button{min-height:34px;padding:6px 9px;font-size:13px}.crm-lead-action-popover[popover] hr{margin:3px 0}.crm-lead-action-popover .crm-action-menu-title{padding:5px 9px 7px;margin-bottom:2px;font-size:13px}
@media(max-height:620px){.crm-lead-action-popover[popover]{display:grid;grid-template-columns:1fr 1fr;width:470px;max-width:calc(100vw - 24px)}.crm-lead-action-popover .crm-action-menu-title{grid-column:1/-1}.crm-lead-action-popover hr{display:none}}
@media(max-width:1100px){.crm-records-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-filter-search{grid-column:span 2}.crm-records-toolbar-actions{justify-content:flex-end}}
@media(max-width:700px){.crm-records-toolbar{display:grid;grid-template-columns:1fr 1fr}.crm-records-toolbar label{flex-basis:auto}.crm-filter-search{grid-column:1/-1}.crm-records-toolbar-actions{grid-column:1/-1}.crm-records-toolbar-actions .btn{flex:1}.crm-records-table th::before{content:none!important}.crm-col-title::before{content:"Title"}.crm-col-contact::before{content:"Contact"}.crm-col-company::before{content:"Company"}.crm-col-source::before{content:"Source"}.crm-col-owner::before{content:"Owner"}.crm-col-stage::before{content:"Stage"}.crm-col-followup::before{content:"Follow-up"}.crm-col-value::before{content:"Expected value"}.crm-col-created::before{content:"Created"}.crm-col-actions::before{content:"Actions"}}
@media(max-width:420px){.crm-records-toolbar{grid-template-columns:1fr}.crm-filter-search,.crm-records-toolbar-actions{grid-column:auto}}

/* PlusCRM Leads List refinement: compact hierarchy, complete filters and responsive data cards. */
.crm-workspace .crm-records-card{max-width:none;padding:16px;overflow:visible}
.crm-workspace>.crm-common-navigation+section.panel:has([data-crm-mode="followups"]){display:none}
.crm-workspace>section.panel:has(#crmSavedViewSelect){padding:10px 14px}.crm-workspace>section.panel:has(#crmSavedViewSelect) .panel-head{min-height:0!important;margin:0!important;padding:0!important}.crm-workspace>section.panel:has(#crmSavedViewSelect) .panel-head h3{font-size:13px}.crm-workspace>section.panel:has(#crmSavedViewSelect) .form-actions{display:grid;grid-template-columns:minmax(180px,1fr) repeat(5,auto);gap:6px;margin:7px 0 0!important}.crm-workspace>section.panel:has(#crmSavedViewSelect) select{min-width:0;height:34px}
.crm-records-head>div:first-child{align-items:center}.crm-records-head>div:first-child>div{display:grid;gap:2px}.crm-records-head p{margin:0;color:var(--text-muted,#64748b);font-size:11px}
.crm-records-toolbar{grid-template-columns:minmax(240px,1.7fr) repeat(3,minmax(120px,1fr)) minmax(120px,1fr) auto auto;background:#f8fafc}
.crm-records-more{position:relative;align-self:end}.crm-records-more>summary{display:flex;align-items:center;justify-content:center;min-width:110px;height:38px;padding:0 12px;border:1px solid var(--border-default,#dce5f0);border-radius:7px;background:#fff;color:#18345d;font-size:11px;font-weight:750;cursor:pointer;list-style:none}.crm-records-more>summary::-webkit-details-marker{display:none}.crm-records-more>summary::before{content:"+";margin-right:7px;color:#2563eb;font-size:16px}.crm-records-more[open]>summary::before{content:"−"}.crm-records-more>div{position:absolute;right:0;z-index:18;display:grid;grid-template-columns:repeat(2,minmax(170px,1fr));gap:10px;width:min(520px,calc(100vw - 40px));margin-top:6px;padding:12px;border:1px solid var(--border-default,#dce5f0);border-radius:9px;background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.16)}
.crm-records-chips{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:-2px 0 10px}.crm-records-chip{display:inline-flex;align-items:center;gap:8px;min-height:29px;padding:4px 9px;border:0;border-radius:6px;background:#eaf2ff;color:#23436f;font-size:10px;cursor:pointer}.crm-records-chip b{font-size:15px;font-weight:400;line-height:1}.crm-records-chips>.link-button{margin-left:auto;font-size:11px}
.crm-records-table .crm-title-open,.crm-records-table .crm-contact-open{width:100%;color:#075fd8;font-weight:750;text-align:left;text-decoration:none}.crm-records-table .crm-title-open:hover,.crm-records-table .crm-contact-open:hover{text-decoration:underline}.crm-records-table .crm-title-open:focus-visible,.crm-records-table .crm-contact-open:focus-visible,.crm-records-chip:focus-visible,.crm-records-more>summary:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.crm-records-table .crm-col-owner{display:table-cell}.crm-records-table .crm-col-owner small{display:block;margin-top:2px;color:var(--text-muted,#64748b);font-size:9px}.crm-records-table th{font-size:10px}.crm-records-table .crm-col-title{width:14%!important}.crm-records-table .crm-col-contact{width:10%!important}.crm-records-table .crm-col-company{width:9%!important}.crm-records-table .crm-col-source{width:8%!important}.crm-records-table .crm-col-owner{width:10%!important}.crm-records-table .crm-col-stage{width:8%!important}.crm-records-table .crm-col-followup{width:13%!important}.crm-records-table .crm-col-value{width:10%!important}.crm-records-table .crm-col-created{width:8%!important}.crm-records-table .crm-col-actions{width:5%!important}.crm-sort-button span:first-child{min-width:0;white-space:normal;line-height:1.1}
@media(max-width:1100px){.crm-records-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-records-more{align-self:end}.crm-records-toolbar-actions{justify-content:stretch}.crm-records-toolbar-actions .btn{flex:1}}
@media(max-width:700px){.crm-records-head{align-items:flex-start}.crm-records-head>div:first-child{display:grid;gap:4px}.crm-records-head-actions{flex-wrap:wrap;justify-content:flex-end}.crm-records-toolbar{grid-template-columns:1fr 1fr}.crm-records-more{align-self:auto}.crm-records-more>summary{width:100%}.crm-records-more>div{position:static;grid-template-columns:1fr 1fr;width:auto;box-shadow:none}.crm-records-chips{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.crm-records-chip{flex:0 0 auto}.crm-records-chips>.link-button{flex:0 0 auto}.crm-records-table .crm-col-owner{display:grid}.crm-col-owner::before{content:"Owner / Branch"}.crm-col-company::before{content:"Company"}.crm-col-created::before{content:"Created"}.crm-records-table .crm-col-select{display:block;width:100%!important;padding-bottom:8px}.crm-records-table .crm-col-select::before{content:"Select";margin-right:8px}.crm-records-table .crm-col-actions .erp-action-menu{justify-self:start}}
@media(max-width:700px){.crm-workspace>section.panel:has(#crmSavedViewSelect) .form-actions{grid-template-columns:1fr 1fr}.crm-workspace>section.panel:has(#crmSavedViewSelect) select{grid-column:1/-1}}
@media(max-width:420px){.crm-records-head{display:grid}.crm-records-head-actions{justify-content:stretch}.crm-records-head-actions .btn{flex:1}.crm-records-toolbar{grid-template-columns:1fr}.crm-records-more>div{grid-template-columns:1fr}.crm-records-more,.crm-records-toolbar-actions{grid-column:auto}.crm-records-pagination>div{display:grid;grid-template-columns:1fr 1fr;width:100%}.crm-records-pagination .btn{width:100%}}

/* PlusCRM dashboard reference layout: desktop command center and mobile executive view. */
.app-shell:has(.crm-dashboard-workspace){grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
.content-crm:has(.crm-dashboard-workspace)>.topbar{display:none!important}
.content-crm:has(.crm-dashboard-workspace)>.page{overflow:auto;background:#f7f9fd}
.crm-dashboard-workspace{display:grid;gap:12px;min-width:0;padding:0 0 14px;color:#101c35;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.crm-dashboard-commandbar{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;min-height:56px;margin:0;padding:7px 4px;border:1px solid #dce3ed;border-radius:8px;background:rgba(255,255,255,.96);backdrop-filter:blur(10px)}
.crm-dashboard-title{display:none;gap:2px}.crm-dashboard-title h1{margin:0;font-size:20px;line-height:1.1;letter-spacing:-.025em}
.crm-dashboard-nav{display:flex;align-items:center;gap:8px}.crm-dashboard-nav .btn{display:flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border-color:#d7dfeb;border-radius:6px;background:#fff;color:#1e293b;font-size:12px;box-shadow:0 1px 2px rgba(15,23,42,.03)}.crm-dashboard-nav .nav-icon{width:16px;height:16px;color:#334155}
.crm-dashboard-header-actions{display:flex;align-items:center;gap:6px}.crm-dashboard-header-actions button{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:50%;background:transparent;color:#14213d}.crm-dashboard-header-actions button:hover{background:#eef4ff}.crm-dashboard-header-actions button:first-child{display:grid}.crm-dashboard-header-actions .nav-icon{width:20px;height:20px}
.crm-dashboard-mobile-menu{display:none}
.crm-dashboard-filter-card{padding:12px 8px 0;background:transparent}
.crm-dashboard-filter-grid{display:grid;grid-template-columns:minmax(160px,1.25fr) repeat(5,minmax(120px,1fr)) auto auto auto;align-items:end;gap:9px}
.crm-dashboard-filter-grid label,.crm-dashboard-more label{display:grid;gap:5px;min-width:0;color:#334155;font-size:10px;font-weight:650}
.crm-dashboard-filter-grid select,.crm-dashboard-filter-grid input,.crm-dashboard-more select{width:100%;min-width:0;height:38px;border:1px solid #d7dfeb;border-radius:6px;background:#fff;color:#1e293b;padding-inline:10px;font-size:11px}
.crm-dashboard-period{order:1}.crm-dashboard-primary-filters{display:contents}.crm-dashboard-primary-filters label{order:2}.crm-dashboard-more-button{order:3;display:flex!important;align-items:center;justify-content:center;gap:6px;min-height:38px;white-space:nowrap}.crm-dashboard-more-button .nav-icon{width:15px;height:15px}.crm-dashboard-more-button .mobile-label{display:none}
.crm-dashboard-filter-actions{display:contents}.crm-dashboard-filter-actions .btn{min-height:38px;white-space:nowrap}.crm-dashboard-filter-actions .primary{order:4}.crm-dashboard-filter-actions .secondary{order:5}
.crm-dashboard-more{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:10px 0 0;padding:12px 14px;border:1px solid #dce4ef;border-radius:8px;background:#fff}
.crm-dashboard-chips{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0 0}.crm-dashboard-chip{display:inline-flex;align-items:center;gap:9px;min-height:30px;padding:5px 10px;border:0;border-radius:5px;background:#edf4ff;color:#23436f;font-size:10px;cursor:pointer}.crm-dashboard-chip b{font-size:15px;font-weight:400;line-height:1}.crm-dashboard-chips>.link-button{margin-left:auto;font-size:10px}
.crm-dashboard-skeleton,.crm-dashboard-message{min-height:104px;display:flex;align-items:center;justify-content:center;gap:10px}.crm-dashboard-message{flex-direction:column}
.crm-dashboard-primary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.crm-dashboard-kpi{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:11px;min-width:0;min-height:104px;padding:14px 12px;border:1px solid #dbe2ec;border-radius:8px;background:#fff!important;color:inherit;text-align:left;box-shadow:0 1px 2px rgba(15,23,42,.025);cursor:pointer}.crm-dashboard-kpi>i{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#e6f1ff;color:#1768e6}.crm-dashboard-kpi>i .nav-icon{width:23px;height:23px}.crm-dashboard-kpi-copy{display:grid;gap:2px;min-width:0}.crm-dashboard-kpi-copy small{color:#3f4e65;font-size:11px;white-space:nowrap}.crm-dashboard-kpi-copy strong{display:grid;min-width:0;color:#111827;font-size:21px;line-height:1.12;font-weight:650;overflow-wrap:anywhere}.crm-dashboard-kpi-copy strong span{font-size:16px}.crm-dashboard-kpi-copy em{color:#64748b;font-size:8px;font-style:normal;line-height:1.2}.crm-dashboard-kpi.tone-green>i{background:#e1f7e9;color:#079447}.crm-dashboard-kpi.tone-amber>i{background:#fff3d9;color:#e89a00}.crm-dashboard-kpi.tone-red>i{background:#ffe5e5;color:#e72d32}.crm-dashboard-kpi:focus-visible,.crm-dashboard-stage:focus-visible,.crm-dashboard-list-row:focus-visible,.crm-dashboard-header-actions button:focus-visible,.crm-dashboard-mobile-menu:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.crm-dashboard-secondary{display:grid;grid-template-columns:1fr 1.35fr 1.35fr 1.35fr;gap:10px}.crm-dashboard-secondary article{display:flex;align-items:center;gap:11px;min-height:74px;padding:11px 14px;border:1px solid #dbe2ec;border-radius:8px;background:#fff}.crm-dashboard-secondary article>i{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#e5f8eb;color:#089449}.crm-dashboard-secondary article.tone-amber>i{background:#fff2d9;color:#f59e0b}.crm-dashboard-secondary article.tone-violet>i{background:#efe7ff;color:#7c3aed}.crm-dashboard-secondary article.tone-blue>i{background:#e8f1ff;color:#2563eb}.crm-dashboard-secondary article>span{display:grid;gap:2px;min-width:0}.crm-dashboard-secondary small{color:#3f4e65;font-size:11px}.crm-dashboard-secondary strong{display:grid;font-size:20px;font-weight:650}.crm-dashboard-secondary strong span{font-size:14px}
.crm-dashboard-pipeline,.crm-dashboard-insight{min-width:0;border:1px solid #dbe2ec;border-radius:8px;background:#fff;overflow:hidden}.crm-dashboard-pipeline .panel-head,.crm-dashboard-insight .panel-head{align-items:center;justify-content:flex-start;gap:8px;min-height:44px;margin:0;padding:0 12px;border-bottom:1px solid #e5e9f0}.crm-dashboard-pipeline .panel-head::before,.crm-dashboard-insight .panel-head::before{display:none}.crm-dashboard-pipeline .panel-head h2,.crm-dashboard-insight .panel-head h2{margin:0;font-size:13px;font-weight:650}.crm-dashboard-pipeline .panel-head h2 span{display:none}.crm-dashboard-pipeline>.panel-head{display:none}.crm-dashboard-pipeline .panel-head .link-button,.crm-dashboard-insight .panel-head .link-button{margin-left:auto}.crm-dashboard-pipeline>.panel-head .link-button{display:none}.crm-dashboard-pipeline>div:last-child{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:0}.crm-dashboard-stage{position:relative;display:grid;grid-template-columns:1fr;gap:4px;min-width:0;min-height:92px;padding:14px 13px;border:0;border-right:1px solid #dfe5ee;background:#fff;color:inherit;text-align:left;cursor:pointer}.crm-dashboard-stage:last-child{border-right:0}.crm-dashboard-stage>span{display:flex;align-items:center;gap:7px;min-width:0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-dashboard-stage>span i{display:block;flex:0 0 9px;width:9px;height:9px;border-radius:50%;background:#0b6ff2}.crm-dashboard-stage>strong{font-size:18px;font-weight:650}.crm-dashboard-stage>small{display:grid;color:#5f6e83;font-size:10px}.crm-dashboard-stage>b{display:none}.crm-dashboard-stage.tone-2>span i{background:#4ea8f5}.crm-dashboard-stage.tone-3>span i{background:#0fb5b3}.crm-dashboard-stage.tone-4>span i{background:#22b86a}.crm-dashboard-stage.tone-5>span i{background:#f4a900}.crm-dashboard-stage.tone-6>span i{background:#f97316}
.crm-dashboard-insights{display:grid;grid-template-columns:1.1fr .9fr .9fr 1fr;gap:10px;min-width:0}.crm-dashboard-insight{min-height:240px}.crm-dashboard-insight .link-button{font-size:9px}.crm-dashboard-insight .table-wrap{max-width:100%;overflow:hidden;padding:0}.crm-dashboard-insight table{width:100%;min-width:0;border-collapse:collapse}.crm-dashboard-insight th,.crm-dashboard-insight td{height:34px;padding:6px 8px;border-bottom:1px solid #edf0f4;font-size:9px;text-align:left}.crm-dashboard-insight th{color:#526174;font-weight:650}.crm-dashboard-insight td{color:#1f2937}.crm-dashboard-insight tr:last-child td{border-bottom:0}
.crm-dashboard-list{display:grid;padding:0 10px}.crm-dashboard-list-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto 10px;align-items:center;gap:8px;width:100%;min-height:48px;padding:7px 0;border:0;border-bottom:1px solid #edf0f4;background:transparent;color:inherit;text-align:left;cursor:pointer}.crm-dashboard-list-row:last-child{border-bottom:0}.crm-dashboard-list-row>i{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#ffe1ec;color:#db2777;font-size:9px;font-style:normal}.crm-dashboard-list-row>i.tone-2{background:#fff0cd;color:#d97706}.crm-dashboard-list-row>i.tone-3{background:#e5efff;color:#2563eb}.crm-dashboard-list-row>i.tone-4{background:#eee8ff;color:#7c3aed}.crm-dashboard-list-row>i.tone-activity{background:#e5f8eb;color:#089449}.crm-dashboard-list-row>i .nav-icon{width:15px;height:15px}.crm-dashboard-list-row>span{display:grid;gap:1px;min-width:0}.crm-dashboard-list-row strong,.crm-dashboard-list-row small,.crm-dashboard-list-row time{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-dashboard-list-row strong{font-size:9px}.crm-dashboard-list-row small,.crm-dashboard-list-row time{color:#64748b;font-size:8px}.crm-dashboard-list-row>span:nth-child(3){text-align:right}.crm-dashboard-list-row>span:nth-child(3)>b{color:#e12d39;font-size:9px}.crm-dashboard-row-arrow{color:#718096;font-size:17px;font-weight:400}
.crm-dashboard-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 10px;color:#64748b;font-size:9px}
@media(max-width:1240px){.crm-dashboard-filter-grid{grid-template-columns:repeat(4,minmax(130px,1fr)) auto auto}.crm-dashboard-period,.crm-dashboard-primary-filters label{order:initial}.crm-dashboard-more-button,.crm-dashboard-filter-actions .btn{order:initial}.crm-dashboard-primary-filters{display:contents}.crm-dashboard-primary{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-dashboard-insights{grid-template-columns:1fr 1fr}.crm-dashboard-insight{min-height:220px}}
@media(max-width:760px){
  .app-shell:has(.crm-dashboard-workspace){display:block;min-height:100vh;background:#fff}
  .app-shell:has(.crm-dashboard-workspace)>.sidebar{display:none}
  .app-shell:has(.crm-dashboard-workspace)>.content{height:100vh;overscroll-behavior-y:contain}
  .content-crm:has(.crm-dashboard-workspace)>.page{background:#fff}
  .crm-dashboard-workspace{gap:12px;padding:0 0 14px;background:#fff}
  .crm-dashboard-commandbar{grid-template-columns:42px minmax(0,1fr) 42px;gap:8px;min-height:72px;margin:0 -14px;padding:0 16px;border:0;background:linear-gradient(115deg,#041b3c,#003472);color:#fff}
  .crm-dashboard-mobile-menu{display:grid;align-content:center;gap:5px;width:40px;height:40px;padding:7px;border:0;background:transparent}.crm-dashboard-mobile-menu span{display:block;width:24px;height:2px;border-radius:2px;background:#fff}
  .crm-dashboard-title{display:grid}.crm-dashboard-title h1{font-size:20px;letter-spacing:-.02em}
  .crm-dashboard-nav{position:absolute;top:72px;left:0;right:0;display:none;grid-template-columns:1fr 1fr;gap:8px;padding:12px 14px;border-bottom:1px solid #dbe3ef;background:#fff;box-shadow:0 12px 24px rgba(15,23,42,.16)}.crm-dashboard-nav.is-open{display:grid}.crm-dashboard-nav .btn{justify-content:flex-start;min-width:0}
  .crm-dashboard-header-actions button:first-child{display:none}.crm-dashboard-header-actions button:last-child{color:#fff}.crm-dashboard-header-actions button:last-child .nav-icon{width:27px;height:27px}
  .crm-dashboard-filter-card{padding:16px 0 0}
  .crm-dashboard-filter-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.crm-dashboard-period{order:0}.crm-dashboard-period select{height:48px;padding-left:12px;font-size:15px}.crm-dashboard-more-button{order:0;min-width:92px;height:48px;border-color:#0b6ff2!important;color:#0b61d8!important;background:#fff!important;font-size:14px}.crm-dashboard-more-button .desktop-label{display:none}.crm-dashboard-more-button .mobile-label{display:inline}.crm-dashboard-more-button .nav-icon{width:20px;height:20px}
  .crm-dashboard-primary-filters{display:none;grid-column:1/-1;grid-template-columns:1fr 1fr;gap:10px}.filters-open .crm-dashboard-primary-filters{display:grid}.crm-dashboard-primary-filters label{order:0}.crm-dashboard-filter-actions{display:none;grid-column:1/-1;grid-template-columns:1fr 1fr;gap:10px}.filters-open .crm-dashboard-filter-actions{display:grid}.crm-dashboard-filter-actions .btn{order:0;min-height:44px}.crm-dashboard-more{grid-template-columns:1fr 1fr;margin-top:10px}.crm-dashboard-filter-grid label,.crm-dashboard-more label{font-size:11px}.crm-dashboard-filter-grid select,.crm-dashboard-filter-grid input,.crm-dashboard-more select{height:44px;font-size:13px}
  .crm-dashboard-chips{gap:8px;padding-top:12px}.crm-dashboard-chip{display:none;min-height:32px;font-size:11px}.crm-dashboard-chip[data-dashboard-chip="owner_id"],.crm-dashboard-chip[data-dashboard-chip="scope"]{display:inline-flex}.crm-dashboard-chips>.link-button{display:none}
  .crm-dashboard-primary{grid-template-columns:1fr 1fr;gap:10px}.crm-dashboard-kpi{grid-template-columns:48px minmax(0,1fr);min-height:138px;padding:16px 12px;border-radius:8px}.crm-dashboard-kpi>i{width:46px;height:46px}.crm-dashboard-kpi-copy small{font-size:13px}.crm-dashboard-kpi-copy strong{font-size:25px}.crm-dashboard-kpi-copy strong span{font-size:16px}.crm-dashboard-kpi-copy em{font-size:9px;line-height:1.25}.crm-dashboard-secondary{display:none}
  .crm-dashboard-pipeline{border-radius:9px}.crm-dashboard-pipeline>.panel-head{display:flex;min-height:54px;padding:0 12px}.crm-dashboard-pipeline .panel-head h2{font-size:17px}.crm-dashboard-pipeline .panel-head h2 span{display:inline}.crm-dashboard-pipeline>.panel-head .link-button{display:block;font-size:13px}.crm-dashboard-pipeline>div:last-child{display:grid;grid-template-columns:1fr;padding:0 12px}.crm-dashboard-stage,.crm-dashboard-stage:nth-child(3n){grid-template-columns:minmax(0,1fr) 42px minmax(80px,auto) 14px;align-items:center;gap:8px;min-height:54px;padding:8px 0;border-right:0;border-bottom:1px solid #e5e9f0}.crm-dashboard-stage:last-child{border-bottom:0}.crm-dashboard-stage>span{font-size:14px}.crm-dashboard-stage>strong{font-size:14px;text-align:center}.crm-dashboard-stage>small{font-size:13px;text-align:right}.crm-dashboard-stage>b{display:block;color:#718096;font-size:24px;font-weight:400}
  .crm-dashboard-insights{display:grid;grid-template-columns:1fr}.crm-dashboard-insight{min-height:0;border-radius:9px}.crm-dashboard-source-panel,.crm-dashboard-activity-panel,.crm-dashboard-workload-panel{display:none}.crm-dashboard-urgent-panel .panel-head{min-height:54px}.crm-dashboard-urgent-panel .panel-head h2{font-size:17px}.crm-dashboard-urgent-panel .link-button{font-size:13px}.crm-dashboard-list{padding:0 12px}.crm-dashboard-list-row{grid-template-columns:44px minmax(0,1fr) auto 14px;gap:9px;min-height:80px;padding:10px 0}.crm-dashboard-list-row>i{width:40px;height:40px;font-size:11px}.crm-dashboard-list-row strong{font-size:13px}.crm-dashboard-list-row small,.crm-dashboard-list-row time{font-size:11px}.crm-dashboard-list-row>span:nth-child(3)>b{font-size:12px}.crm-dashboard-row-arrow{font-size:24px}
  .crm-dashboard-footer{justify-content:center;flex-wrap:wrap;padding:5px 0 0;font-size:10px}.crm-dashboard-footer span+span:before{content:"|";margin-right:12px;color:#94a3b8}
}
@media(max-width:390px){.crm-dashboard-workspace{padding-inline:10px}.crm-dashboard-commandbar{margin-inline:-10px;padding-inline:12px}.crm-dashboard-kpi{grid-template-columns:40px minmax(0,1fr);min-height:128px;padding:13px 10px}.crm-dashboard-kpi>i{width:40px;height:40px}.crm-dashboard-kpi-copy small{font-size:12px}.crm-dashboard-kpi-copy strong{font-size:22px}.crm-dashboard-more{grid-template-columns:1fr}}
.crm-followups-workspace{max-width:1400px;margin:0 auto;width:100%;gap:14px}.crm-followups-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.crm-followups-head h1{margin:5px 0 2px;font-size:25px}.crm-followups-head>div>p:last-child,.crm-breadcrumb{margin:0;color:var(--text-muted,#64748b)}.crm-breadcrumb{font-size:12px;color:#0757cc!important}.crm-followup-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.crm-followup-kpi{display:flex;align-items:center;justify-content:space-between;min-height:82px;padding:16px 20px;border:1px solid var(--border-default,#dbe3ed);border-radius:10px;background:#fff;text-align:left;box-shadow:0 3px 12px rgba(15,23,42,.05)}.crm-followup-kpi span{font-size:13px}.crm-followup-kpi strong{font-size:25px}.crm-followup-kpi.danger strong{color:#dc2626}.crm-followup-kpi.info strong{color:#0757cc}.crm-followup-kpi.warning strong{color:#d97706}.crm-followup-kpi.success strong{color:#15803d}.crm-followup-results{padding:0!important;overflow:hidden}.crm-followup-tabs{display:flex;gap:16px;overflow-x:auto;border-bottom:1px solid var(--border-default,#dbe3ed);padding:0 12px}.crm-followup-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:14px 10px;white-space:nowrap}.crm-followup-tabs button[aria-selected=true]{border-color:#0757cc;color:#0757cc;font-weight:750}.crm-followup-tabs button.urgent{color:#dc2626}.crm-followup-toolbar{display:grid;grid-template-columns:minmax(220px,1.7fr) repeat(4,minmax(120px,1fr)) auto auto;gap:8px;padding:12px;align-items:end;background:#fbfcfe}.crm-followup-toolbar label{display:grid;gap:4px;font-size:11px;color:var(--text-muted,#64748b)}.crm-followup-toolbar input,.crm-followup-toolbar select{min-width:0;width:100%;height:38px}.crm-followup-table{overflow-x:auto}.crm-followup-table table{width:100%;min-width:1050px;table-layout:fixed}.crm-followup-table th,.crm-followup-table td{padding:10px 11px;vertical-align:middle}.crm-followup-table th:nth-child(1){width:17%}.crm-followup-table th:nth-child(2){width:18%}.crm-followup-table th:nth-child(3){width:12%}.crm-followup-table th:nth-child(4){width:8%}.crm-followup-table th:nth-child(5){width:9%}.crm-followup-table th:nth-child(6){width:10%}.crm-followup-table th:nth-child(7){width:8%}.crm-followup-table th:nth-child(8){width:18%}.crm-followup-table td small{display:block;margin-top:4px;color:var(--text-muted,#64748b);white-space:normal}.crm-followup-table th button{border:0;background:none;font:inherit;font-weight:inherit}.crm-followup-status{display:inline-block;padding:4px 7px;border:1px solid #93c5fd;border-radius:6px;background:#eff6ff;color:#0757cc;font-size:11px}.crm-followup-status.overdue{border-color:#fca5a5;background:#fff1f2;color:#dc2626}.crm-followup-status.completed{border-color:#86efac;background:#f0fdf4;color:#15803d}.crm-followup-status.cancelled{border-color:#cbd5e1;background:#f8fafc;color:#475569}.crm-followup-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-top:1px solid var(--border-default,#dbe3ed)}.crm-followup-pagination>div{display:flex;align-items:center;gap:8px}.crm-followup-empty{padding:30px;text-align:center;color:var(--text-muted,#64748b)}.crm-followup-mobile-list{display:none}.crm-followup-mobile{padding:13px;border:1px solid var(--border-default,#dbe3ed);border-radius:9px;background:#fff}.crm-followup-mobile>div:first-child{display:flex;justify-content:space-between;gap:10px}.crm-followup-mobile p{margin:7px 0;color:var(--text-muted,#64748b)}.crm-followup-mobile dl{display:grid;gap:5px}.crm-followup-mobile dl>div{display:grid;grid-template-columns:72px minmax(0,1fr)}.crm-followup-mobile dt{color:var(--text-muted,#64748b)}.crm-followup-mobile dd{margin:0}.crm-followups-workspace :is(button,input,select):focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
@media(max-width:1050px){.crm-followup-kpis{grid-template-columns:1fr 1fr}.crm-followup-toolbar{grid-template-columns:repeat(3,1fr)}.crm-followup-toolbar label:first-child{grid-column:span 2}}
@media(max-width:760px){.crm-followups-head{align-items:flex-start;flex-direction:column}.crm-followups-head>.btn{width:100%}.crm-followup-kpis{grid-template-columns:1fr 1fr;gap:8px}.crm-followup-kpi{min-height:70px;padding:12px}.crm-followup-toolbar{grid-template-columns:1fr 1fr}.crm-followup-toolbar label:first-child{grid-column:1/-1}.crm-followup-table{display:none}.crm-followup-mobile-list{display:grid;gap:9px;padding:10px;background:#f8fafc}.crm-followup-pagination{align-items:flex-start;flex-direction:column}.crm-followup-pagination>div{width:100%;justify-content:space-between}}
@media(max-width:420px){.crm-followup-kpis{grid-template-columns:1fr 1fr}.crm-followup-kpi{min-height:64px;padding:10px}.crm-followup-kpi strong{font-size:20px}.crm-followup-toolbar{grid-template-columns:1fr}.crm-followup-toolbar label:first-child{grid-column:auto}.crm-followup-toolbar .btn{width:100%}.crm-followup-mobile .form-actions{display:grid;grid-template-columns:1fr 1fr}.crm-followup-mobile .form-actions .btn{min-width:0}.crm-followup-pagination>div span{font-size:11px}}

/* CRM Follow-ups refinement: compact daily queue and accessible row actions. */
.crm-followup-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}.crm-followup-action-menu{position:relative}.crm-followup-action-menu summary{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--border-default,#dbe3ed);border-radius:7px;background:#fff;cursor:pointer;font-size:20px;line-height:1;list-style:none}.crm-followup-action-menu summary::-webkit-details-marker{display:none}.crm-followup-action-menu[open] summary{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}.crm-followup-action-menu [role=menu]{position:absolute;z-index:30;right:0;top:calc(100% + 5px);display:grid;width:176px;padding:6px;border:1px solid var(--border-default,#dbe3ed);border-radius:9px;background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.17)}.crm-followup-action-menu [role=menu] button{border:0;border-radius:6px;background:transparent;padding:9px 10px;text-align:left;color:var(--text-primary,#0f172a);cursor:pointer}.crm-followup-action-menu [role=menu] button:hover,.crm-followup-action-menu [role=menu] button:focus-visible{background:#eff6ff}.crm-followup-action-menu [role=menu] button.danger{color:#c81e1e}.crm-followup-empty{display:grid;justify-items:center;gap:7px;min-height:190px;align-content:center}.crm-followup-empty strong{font-size:16px;color:var(--text-primary,#0f172a)}.crm-followup-empty span{display:block}.crm-followup-spinner{width:24px;height:24px;border:3px solid #dbeafe;border-top-color:#2563eb;border-radius:50%;animation:crm-followup-spin .75s linear infinite}@keyframes crm-followup-spin{to{transform:rotate(360deg)}}.crm-followup-dialog{position:relative;width:min(520px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto}.crm-followup-dialog form{display:grid;gap:14px}.crm-followup-dialog form>label{display:grid;gap:6px}.crm-followup-dialog textarea{resize:vertical}.crm-followup-dialog .crm-dialog-close{position:absolute;right:13px;top:11px;border:0;background:transparent;font-size:24px;cursor:pointer}.crm-followup-table tbody tr:focus-within{background:#f8fbff}
@media(max-width:760px){.crm-followup-actions{justify-content:space-between}.crm-followup-action-menu [role=menu]{right:0}.crm-followup-mobile .crm-followup-actions{display:flex}.crm-followup-mobile{min-width:0}.crm-followup-mobile :is(p,dd){overflow-wrap:anywhere}}
@media(max-width:420px){.crm-followup-kpis{grid-template-columns:1fr}.crm-followup-kpi{min-height:58px}.crm-followup-tabs{gap:6px}.crm-followup-tabs button{padding:12px 8px}.crm-followup-dialog{max-height:calc(100vh - 16px)}}

/* CRM Dashboard refinement: operational summary using authoritative dashboard data. */
.crm-refined-dashboard{display:grid;gap:12px;min-width:0;color:#14213d}.crm-refined-head{display:flex;align-items:end;justify-content:space-between;gap:16px}.crm-refined-head h1{margin:0;font-size:25px}.crm-refined-head p{margin:3px 0 0;color:#64748b}.crm-refined-filters{display:grid;gap:9px;padding:12px;border:1px solid #dbe3ed;border-radius:9px;background:#fff}.crm-refined-filters>form{display:flex;align-items:end;gap:9px;flex-wrap:wrap}.crm-refined-filters label,.crm-refined-more label{display:grid;gap:4px;color:#526174;font-size:11px;font-weight:700}.crm-refined-filters select,.crm-refined-filters input{min-width:165px;height:38px}.crm-refined-more{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:9px;padding-top:10px;border-top:1px solid #edf1f6}.crm-refined-more select{width:100%;min-width:0}.crm-refined-chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.crm-refined-chips button:not(.link-button){min-height:29px;padding:4px 9px;border:0;border-radius:6px;background:#edf4ff;color:#23436f}.crm-refined-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.crm-refined-kpi{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:12px;min-height:96px;padding:14px 16px;border:1px solid #dbe3ed;border-radius:9px;background:#fff;text-align:left}.crm-refined-kpi>i{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#e6f1ff;color:#1768e6}.crm-refined-kpi.today>i{background:#fff0df;color:#c65a00}.crm-refined-kpi.overdue>i{background:#ffe7e8;color:#c81e1e}.crm-refined-kpi span{display:grid;gap:2px;min-width:0}.crm-refined-kpi small{font-size:12px}.crm-refined-kpi strong{font-size:23px;overflow-wrap:anywhere}.crm-refined-kpi em{color:#64748b;font-size:10px;font-style:normal}.crm-refined-attention,.crm-refined-pipeline,.crm-refined-updates{overflow:hidden;border:1px solid #dbe3ed;border-radius:9px;background:#fff}.crm-refined-attention>header,.crm-refined-pipeline>header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:8px 14px;border-bottom:1px solid #e5e9f0}.crm-refined-attention h2,.crm-refined-pipeline h2{margin:0;font-size:16px}.crm-refined-attention header p{margin:2px 0 0;color:#64748b;font-size:11px}.crm-refined-action{display:grid;grid-template-columns:1.2fr 1.35fr .55fr .45fr auto;align-items:center;gap:10px;min-height:52px;padding:9px 14px;border-bottom:1px solid #edf0f4}.crm-refined-action.overdue{border-left:3px solid #dc2626;background:#fff8f8}.crm-refined-action.today{border-left:3px solid #d97706}.crm-refined-action>div,.crm-refined-action>span{display:grid;gap:2px;min-width:0}.crm-refined-action small{color:#64748b;font-size:10px;overflow-wrap:anywhere}.crm-refined-action>b{color:#9f1d1d}.crm-refined-attention>footer{padding:8px 14px;color:#64748b;font-size:11px}.crm-refined-pipeline>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px}.crm-refined-pipeline>div>button{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:9px;min-height:52px;padding:8px 11px;border:1px solid #d6e0ed;border-radius:7px;background:#fff;text-align:left}.crm-refined-pipeline>div>button span{display:grid;gap:2px;min-width:0}.crm-refined-pipeline>div>button small{color:#64748b;font-size:9px;overflow-wrap:anywhere}.crm-refined-pipeline>div>button>b{color:#0757cc;font-size:17px}.crm-refined-updates>button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;padding:0 14px;border:0;background:#fff;text-align:left}.crm-refined-updates>button span{display:flex;align-items:center;gap:16px}.crm-refined-updates>button small{color:#64748b}.crm-refined-updates>div{display:grid;padding:0 14px 8px}.crm-refined-updates>div>button{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border:0;border-top:1px solid #edf0f4;background:#fff;text-align:left}.crm-refined-updates>div span{display:grid}.crm-refined-updates time,.crm-refined-updates small{color:#64748b;font-size:10px}.crm-refined-state{display:grid;justify-items:center;gap:9px;min-height:150px;align-content:center;padding:20px;border:1px solid #dbe3ed;border-radius:9px;background:#fff;text-align:center}.crm-refined-state.error{border-color:#fecaca;background:#fff8f8}.crm-refined-dashboard :is(button,select,input):focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
@media(max-width:900px){.crm-refined-more{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-refined-kpis{grid-template-columns:1fr 1fr}.crm-refined-action{grid-template-columns:1fr 1fr}.crm-refined-action>span:nth-of-type(1){grid-column:1/-1}.crm-refined-pipeline>div{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.crm-refined-head{align-items:stretch;flex-direction:column}.crm-refined-head>.btn{width:100%}.crm-refined-filters>form{display:grid;grid-template-columns:1fr 1fr}.crm-refined-filters label{grid-column:span 1}.crm-refined-filters :is(select,input,.btn){width:100%;min-width:0}.crm-refined-more{grid-template-columns:1fr}.crm-refined-kpis{grid-template-columns:1fr 1fr;gap:8px}.crm-refined-kpi{display:block;min-height:122px;padding:12px}.crm-refined-kpi>i{margin-bottom:7px}.crm-refined-action{grid-template-columns:1fr;gap:7px;padding:11px}.crm-refined-action>span:nth-of-type(1){grid-column:auto}.crm-refined-action>.btn{width:100%}.crm-refined-pipeline>div{grid-template-columns:1fr}.crm-refined-attention>header{align-items:flex-start;flex-direction:column}.crm-refined-updates>button span{display:grid;gap:2px}.crm-refined-updates>div>button{align-items:flex-start;flex-direction:column}}
@media(max-width:390px){.crm-refined-kpis{grid-template-columns:1fr}.crm-refined-kpi{display:grid;min-height:88px}.crm-refined-filters>form{grid-template-columns:1fr}}

/* CRM lead forms refinement: shared create/edit hierarchy without changing API fields. */
.crm-unified-lead-form{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:13px!important}.crm-unified-lead-form>.crm-form-intro{grid-column:1/-1;margin:-6px 0 2px;color:#64748b}.crm-unified-lead-form>h2{grid-column:1/-1;margin:0;padding-right:32px}.crm-lead-section{grid-column:1/-1;min-width:0;margin:0;padding:13px 14px 14px;border:1px solid #dbe3ed;border-radius:9px;background:#fbfcfe}.crm-lead-section legend{padding:0 7px;color:#183153;font-size:12px;font-weight:800}.crm-lead-section>div{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:11px}.crm-lead-section .crm-field{grid-column:span 4;display:grid;align-content:start;gap:5px;min-width:0;margin:0;font-size:11px;font-weight:700;color:#26364e}.crm-lead-section .crm-field:has(textarea){grid-column:1/-1}.crm-lead-section .crm-field :is(input,select,textarea){width:100%;min-width:0;min-height:42px}.crm-lead-section .crm-field textarea{min-height:86px;resize:vertical}.crm-lead-section .crm-field>small:not(.crm-field-error){color:#64748b;font-size:9px;font-weight:500}.crm-field-error{min-height:14px;color:#c81e1e;font-size:10px;font-weight:600}.crm-unified-actions{grid-column:1/-1!important;display:flex!important;justify-content:flex-end;gap:9px;padding-top:2px}.crm-unified-actions .btn{min-width:112px}.crm-edit-lead-form{}.crm-dialog:has(#crmEditForm){width:min(780px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}.crm-unified-lead-form :is(input,select,textarea,button):focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}.crm-unified-lead-form [aria-invalid=true]{border-color:#dc2626}
@media(max-width:900px){.crm-lead-section .crm-field{grid-column:span 6}}
@media(max-width:600px){.crm-unified-lead-form{grid-template-columns:1fr!important}.crm-lead-section{grid-column:1;padding:11px}.crm-lead-section>div{grid-template-columns:1fr}.crm-lead-section .crm-field,.crm-lead-section .crm-field:has(textarea){grid-column:1}.crm-unified-actions{grid-column:1!important;display:grid!important;grid-template-columns:1fr 1fr}.crm-unified-actions .btn{width:100%;min-width:0}.crm-dialog:has(#crmEditForm){width:calc(100vw - 16px);max-height:calc(100vh - 16px)}}
@media(max-width:390px){.crm-unified-actions{grid-template-columns:1fr}.crm-lead-section{padding-inline:9px}}

/* PlusCRM pipeline: compact command surface with board-scoped horizontal scrolling. */
.crm-pipeline-workspace{display:grid;gap:13px;min-width:0;max-width:none}.crm-pipeline-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.crm-pipeline-head h1{margin:4px 0 2px;font-size:25px}.crm-pipeline-head p,.crm-pipeline-head span{margin:0;color:var(--text-muted,#64748b);font-size:12px}.crm-pipeline-head p{color:#0757cc}.crm-pipeline-head>div:last-child{display:flex;gap:8px;flex-wrap:wrap}
.crm-pipeline-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden;border:1px solid var(--border-default,#dbe3ed);border-radius:9px;background:#fff}.crm-pipeline-summary>div{display:grid;gap:4px;min-height:72px;padding:13px 15px;border-right:1px solid var(--border-default,#e2e8f0)}.crm-pipeline-summary>div:last-child{border-right:0}.crm-pipeline-summary span{color:var(--text-muted,#64748b);font-size:11px}.crm-pipeline-summary strong{font-size:20px;overflow-wrap:anywhere}
.crm-pipeline-toolbar{display:grid;grid-template-columns:minmax(210px,1.7fr) repeat(4,minmax(120px,1fr)) auto auto;align-items:end;gap:8px;padding:12px;border:1px solid var(--border-default,#dbe3ed);border-radius:9px;background:#fff}.crm-pipeline-toolbar label{display:grid;gap:4px;min-width:0;color:var(--text-muted,#64748b);font-size:10px;font-weight:750}.crm-pipeline-toolbar input,.crm-pipeline-toolbar select{width:100%;min-width:0;height:38px}.crm-pipeline-chips{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.crm-pipeline-chips button{min-height:29px;padding:4px 9px;border:0;border-radius:6px;background:#edf4ff;color:#23436f;font-size:10px}.crm-pipeline-chips button:last-child{margin-left:auto;background:transparent;color:#0757cc}
.crm-kanban-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(248px,1fr);gap:10px;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;align-items:start;padding:1px 1px 10px;overscroll-behavior-x:contain;scrollbar-gutter:stable}.crm-kanban-column{display:grid;grid-template-rows:auto minmax(90px,auto) auto;gap:8px;min-width:0;padding:10px;border:1px solid #dbe3ed;border-top:3px solid #1768e6;border-radius:8px;background:#f6f8fb}.crm-kanban-column>header{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.crm-kanban-column h2{margin:0;font-size:13px}.crm-kanban-column header p{margin:0;color:#64748b;font-size:10px}.crm-kanban-column>div{display:grid;gap:8px}.crm-kanban-column .empty{min-height:72px;margin:0;padding:22px 8px;text-align:center;color:#64748b;font-size:11px}
.crm-kanban-card{position:relative;display:grid;gap:6px;min-width:0;padding:10px;border:1px solid #d7dfe9;border-radius:7px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}.crm-kanban-card[draggable=true]{cursor:grab}.crm-kanban-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:6px}.crm-kanban-card-head>.link-button{min-width:0;padding:0;text-align:left}.crm-kanban-card-head strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#111827;font-size:12px}.crm-kanban-card-head details{position:relative}.crm-kanban-card-head summary{padding:0 3px;list-style:none;cursor:pointer;font-size:19px;line-height:1}.crm-kanban-card-head summary::-webkit-details-marker{display:none}.crm-kanban-card-head details>div{position:absolute;top:22px;right:0;z-index:5;display:grid;gap:6px;width:175px;padding:8px;border:1px solid #dbe3ed;border-radius:7px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.16)}.crm-kanban-card-head details button,.crm-kanban-card-head details label{font-size:10px}.crm-kanban-card-head details button{min-height:28px;border:1px solid #dbe3ed;border-radius:5px;background:#fff}.crm-kanban-card-head details select{width:100%;height:30px}.crm-kanban-card>p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:10px}.crm-kanban-tags,.crm-kanban-exceptions{display:flex;gap:5px;flex-wrap:wrap}.crm-kanban-tags span,.crm-kanban-exceptions span{padding:2px 5px;border-radius:4px;background:#eef3fa;color:#42526a;font-size:9px}.crm-kanban-exceptions span{border:1px solid #fca5a5;background:#fff1f2;color:#c81e2a}.crm-kanban-value{font-size:12px}.crm-kanban-card>small{color:#526174;font-size:9px}.crm-kanban-load{justify-self:center;padding:5px;font-size:10px}
.crm-pipeline-workspace :is(button,input,select,summary):focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
@media(max-width:1100px){.crm-pipeline-summary{grid-template-columns:repeat(3,1fr)}.crm-pipeline-summary>div:nth-child(3){border-right:0}.crm-pipeline-summary>div:nth-child(-n+3){border-bottom:1px solid #e2e8f0}.crm-pipeline-toolbar{grid-template-columns:repeat(3,1fr)}.crm-pipeline-toolbar label:first-child{grid-column:span 2}}
@media(max-width:760px){.crm-pipeline-head{align-items:flex-start;flex-direction:column}.crm-pipeline-head>div:last-child{width:100%}.crm-pipeline-head .btn{flex:1}.crm-pipeline-summary{grid-template-columns:1fr 1fr}.crm-pipeline-summary>div{min-height:64px;padding:10px}.crm-pipeline-summary>div:nth-child(3){border-right:1px solid #e2e8f0}.crm-pipeline-summary>div:nth-child(even){border-right:0}.crm-pipeline-summary>div:nth-child(-n+4){border-bottom:1px solid #e2e8f0}.crm-pipeline-toolbar{grid-template-columns:1fr 1fr}.crm-pipeline-toolbar label:first-child{grid-column:1/-1}.crm-pipeline-toolbar .btn{width:100%}.crm-kanban-board{grid-auto-columns:minmax(82vw,1fr);scroll-snap-type:x proximity}.crm-kanban-column{scroll-snap-align:start}}
@media(max-width:420px){.crm-pipeline-toolbar{grid-template-columns:1fr}.crm-pipeline-toolbar label:first-child{grid-column:auto}.crm-pipeline-summary strong{font-size:17px}.crm-kanban-board{grid-auto-columns:calc(100vw - 54px)}}

/* PlusCRM Pipeline refinement: authoritative stage navigation and operational lead cards. */
.crm-pipeline-workspace{gap:11px}.crm-pipeline-head{align-items:center}.crm-pipeline-head>div:last-child .btn{min-height:38px}.crm-pipeline-toolbar{padding:10px}.crm-pipeline-chips button{display:inline-flex;align-items:center;gap:7px;cursor:pointer}.crm-pipeline-chips button b{font-size:14px;font-weight:400}
.crm-pipeline-stage-nav{display:flex;align-items:stretch;max-width:100%;overflow-x:auto;border:1px solid #dbe3ed;border-radius:8px;background:#fff;scrollbar-width:thin}.crm-pipeline-stage-nav button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:150px;min-height:38px;padding:7px 11px;border:0;border-right:1px solid #e2e8f0;background:#fff;color:#26364d;text-align:left;cursor:pointer}.crm-pipeline-stage-nav button:last-child{border-right:0}.crm-pipeline-stage-nav button:hover{background:#f2f7ff}.crm-pipeline-stage-nav span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.crm-pipeline-stage-nav strong{color:#075fd8;font-size:12px}
.crm-kanban-board{padding-bottom:8px}.crm-kanban-column{grid-template-rows:auto minmax(104px,auto) auto;padding:9px}.crm-kanban-column>header{padding:0 2px 2px}.crm-kanban-column>header h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-kanban-card{gap:7px;padding:10px 11px}.crm-kanban-card:hover{border-color:#aebed2;box-shadow:0 3px 9px rgba(15,23,42,.08)}.crm-kanban-card:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}.crm-kanban-card-head details>div{z-index:24;width:195px}.crm-kanban-card-head details>div>strong{padding-bottom:5px;border-bottom:1px solid #e2e8f0;color:#18345d;font-size:11px}.crm-kanban-owner{display:grid;gap:1px;min-width:0;color:#334155;font-size:10px}.crm-kanban-owner span,.crm-kanban-owner small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-kanban-owner small{color:#64748b;font-size:9px}.crm-kanban-followup{display:inline-flex;align-items:center;width:max-content;max-width:100%;min-height:22px;padding:3px 6px;border-radius:5px;background:#edf5ff;color:#24558f;font-size:9px}.crm-kanban-followup.overdue{border:1px solid #fca5a5;background:#fff1f2;color:#b4232a}.crm-kanban-followup.none{background:#f1f5f9;color:#64748b}.crm-kanban-value{font-variant-numeric:tabular-nums}.crm-pipeline-state,.crm-pipeline-error{display:flex;align-items:center;justify-content:center;gap:8px;min-height:110px;padding:18px;border:1px dashed #cbd5e1;border-radius:8px;background:#fff;color:#64748b;text-align:center}.crm-pipeline-state{flex-direction:column}.crm-pipeline-error{justify-content:space-between;min-height:0;border-style:solid;border-color:#fecaca;background:#fff7f7;color:#a52222}
.crm-pipeline-workspace :is(.crm-pipeline-stage-nav button,.crm-pipeline-chips button,.crm-kanban-card):focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
@media(max-width:760px){.crm-pipeline-head>div:last-child{display:grid;grid-template-columns:1fr 1fr}.crm-pipeline-stage-nav button{min-width:135px}.crm-kanban-board{grid-auto-columns:minmax(78vw,290px)}.crm-kanban-card-head details>div{position:fixed;top:auto;right:12px;bottom:12px;left:12px;width:auto;max-height:calc(100vh - 24px)}}
@media(max-width:420px){.crm-pipeline-summary{grid-template-columns:1fr 1fr}.crm-pipeline-summary>div{min-width:0}.crm-pipeline-stage-nav button{min-width:128px}.crm-kanban-board{grid-auto-columns:calc(100vw - 48px)}.crm-pipeline-toolbar{padding:9px}.crm-pipeline-error{align-items:stretch;flex-direction:column}}

/* CRM Daily Action Dashboard */
.crm-daily-dashboard{display:grid;gap:12px;min-width:0;color:#14213d}.crm-daily-head{display:grid;grid-template-columns:minmax(180px,.55fr) minmax(320px,1.45fr) auto;align-items:center;gap:18px}.crm-daily-head h1{margin:0;font-size:26px}.crm-daily-head span{color:#64748b;font-size:11px}.crm-daily-head form{display:flex;align-items:center;gap:9px;height:42px;padding:0 12px;border:1px solid #d7dfeb;border-radius:7px;background:#fff}.crm-daily-head form .nav-icon{color:#64748b}.crm-daily-head input{width:100%;height:38px;border:0;outline:0}.crm-daily-head>.btn{display:flex;align-items:center;gap:7px;height:42px}.crm-daily-nav{display:flex;gap:8px;border-bottom:1px solid #dce3ed}.crm-daily-nav button{min-height:42px;padding:0 11px;border:0;border-bottom:2px solid transparent;background:transparent;color:#26364e}.crm-daily-nav button:hover,.crm-daily-nav button:focus-visible{border-color:#1768e6;color:#0757cc}.crm-daily-filters{display:grid;gap:8px}.crm-daily-filters>form{display:flex;align-items:end;gap:9px;flex-wrap:wrap}.crm-daily-filters label,.crm-daily-more label{display:grid;gap:4px;color:#526174;font-size:10px;font-weight:700}.crm-daily-filters select,.crm-daily-filters input{height:38px;min-width:170px}.crm-daily-filters .btn{min-height:38px}.crm-daily-more{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:9px;padding:11px;border:1px solid #dbe3ed;border-radius:8px;background:#fff}.crm-daily-more select{width:100%;min-width:0}.crm-daily-chips{display:flex;gap:7px;flex-wrap:wrap}.crm-daily-chips button{min-height:28px;padding:4px 9px;border:0;border-radius:6px;background:#edf4ff;color:#23436f;font-size:10px}.crm-daily-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.crm-daily-kpi{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;min-height:108px;padding:15px 17px;border:1px solid #dbe3ed;border-radius:9px;background:#fff;text-align:left}.crm-daily-kpi>i{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#e6f1ff;color:#1768e6}.crm-daily-kpi.today>i{background:#fff0df;color:#ea6900}.crm-daily-kpi.overdue>i{background:#ffe7e8;color:#dc2626}.crm-daily-kpi span{display:grid;gap:2px}.crm-daily-kpi small{font-size:12px}.crm-daily-kpi strong{font-size:22px;overflow-wrap:anywhere}.crm-daily-kpi em{color:#64748b;font-size:10px;font-style:normal}.crm-daily-actions,.crm-daily-pipeline,.crm-daily-updates{overflow:hidden;border:1px solid #dbe3ed;border-radius:9px;background:#fff}.crm-daily-actions>header,.crm-daily-pipeline>header{display:flex;align-items:center;gap:15px;min-height:44px;padding:0 14px;border-bottom:1px solid #e5e9f0}.crm-daily-actions h2,.crm-daily-pipeline h2{margin:0;font-size:15px}.crm-daily-actions header span{color:#64748b;font-size:10px}.crm-daily-action-head,.crm-daily-action{display:grid;grid-template-columns:1.35fr 1.4fr .7fr .55fr .9fr;align-items:center;gap:9px;padding:8px 14px;border-bottom:1px solid #e8edf3}.crm-daily-action-head{background:#f7f9fc;color:#526174;font-size:10px}.crm-daily-action{min-height:47px;font-size:11px}.crm-daily-action.overdue{background:#fff7f7}.crm-daily-action>div:first-child,.crm-daily-action>span{display:grid;gap:2px;min-width:0}.crm-daily-action small{color:#64748b;font-size:9px}.crm-daily-action>span:nth-child(3)>b{color:#dc2626}.crm-daily-action>div:last-child{display:flex;gap:6px}.crm-daily-actions footer{display:flex;justify-content:flex-end;padding:7px 14px}.crm-daily-pipeline>header{justify-content:space-between}.crm-daily-pipeline>div{display:flex;align-items:center;gap:6px;padding:10px 14px;overflow-x:auto}.crm-daily-pipeline>div>button{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:150px;height:38px;padding:0 12px;border:1px solid #ccd8e8;border-radius:6px;background:#fff;color:#1e293b}.crm-daily-pipeline>div>button strong{color:#0757cc}.crm-daily-pipeline>div>button b{position:absolute;right:-15px;color:#1768e6;font-size:25px}.crm-daily-updates>button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:46px;padding:0 14px;border:0;background:#fff;text-align:left}.crm-daily-updates>button span{display:flex;align-items:center;gap:18px}.crm-daily-updates>button small{color:#64748b}.crm-daily-updates>div{display:grid;padding:0 14px 8px}.crm-daily-updates>div>button{display:flex;justify-content:space-between;padding:8px 0;border:0;border-top:1px solid #edf0f4;background:#fff;text-align:left}.crm-daily-updates>div span{display:grid}.crm-daily-updates>div small,.crm-daily-updates time{color:#64748b;font-size:10px}
@media(max-width:900px){.crm-daily-head{grid-template-columns:1fr auto}.crm-daily-head form{grid-column:1/-1;grid-row:2}.crm-daily-kpis{grid-template-columns:1fr 1fr}.crm-daily-more{grid-template-columns:repeat(2,1fr)}.crm-daily-action-head{display:none}.crm-daily-action{grid-template-columns:1fr 1fr}.crm-daily-action>div:last-child{justify-content:flex-end}.crm-daily-action>span:nth-child(2){grid-column:1/-1;grid-row:2}.crm-daily-action>span:nth-child(3),.crm-daily-action>span:nth-child(4){grid-row:3}}
@media(max-width:560px){.crm-daily-dashboard{gap:10px}.crm-daily-head{grid-template-columns:1fr auto}.crm-daily-head>div span{display:none}.crm-daily-head h1{font-size:22px}.crm-daily-head>.btn{padding-inline:10px}.crm-daily-nav{overflow-x:auto}.crm-daily-filters>form{display:grid;grid-template-columns:1fr 1fr}.crm-daily-filters label:first-child,.crm-daily-filters label:nth-child(2){grid-column:span 1}.crm-daily-filters select{width:100%;min-width:0}.crm-daily-filters .btn{min-width:0}.crm-daily-more{grid-template-columns:1fr}.crm-daily-kpis{grid-template-columns:1fr 1fr;gap:8px}.crm-daily-kpi{display:block;min-height:126px;padding:12px}.crm-daily-kpi>i{width:40px;height:40px;margin-bottom:7px}.crm-daily-kpi strong{font-size:19px}.crm-daily-action{grid-template-columns:1fr;gap:7px;padding:11px}.crm-daily-action>span:nth-child(2),.crm-daily-action>span:nth-child(3),.crm-daily-action>span:nth-child(4){grid-column:auto;grid-row:auto}.crm-daily-action>div:last-child{justify-content:flex-start}.crm-daily-actions>header{display:grid;gap:2px;padding-block:8px}.crm-daily-pipeline>div>button{min-width:135px}.crm-daily-updates>button span{display:grid;gap:2px}}
.crm-refined-history{display:grid;gap:14px}.crm-refined-history .panel{min-width:0}.crm-refined-history table{width:100%}.crm-simple-event-type{display:block;margin-bottom:3px;color:#0757cc;font-size:10px;font-weight:750;letter-spacing:.04em;text-transform:uppercase}.crm-simple-event strong{display:block}.crm-simple-timeline>.panel-head{align-items:flex-start;margin-bottom:4px}.crm-simple-timeline>.panel-head h2{margin-bottom:3px}.crm-simple-timeline>.panel-head .form-actions{flex-wrap:wrap}.crm-simple-record .status-won{color:#15803d}.crm-simple-record .status-lost{color:#dc2626}.crm-simple-more [role=menu]{max-height:min(360px,calc(100vh - 120px));overflow-y:auto}.crm-simple-more button:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:-2px}
@media(max-width:760px){.crm-refined-history .table-wrap{overflow-x:auto}.crm-refined-history table{min-width:680px}.crm-simple-timeline>.panel-head{display:grid;gap:10px}.crm-simple-timeline>.panel-head .form-actions{width:100%}.crm-simple-timeline>.panel-head .btn{flex:1}.crm-simple-preview .panel-head{align-items:center}}
.crm-detail-workspace .crm-dialog{position:relative}.crm-detail-workspace .crm-dialog-close{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #cbd6e5;border-radius:7px;background:#fff;color:#334155;font-size:23px;line-height:1;cursor:pointer}.crm-detail-workspace .crm-dialog-close:hover{background:#f1f5f9}.crm-detail-workspace .crm-dialog-close:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}.crm-detail-workspace .crm-dialog form>h2{padding-right:44px}
@media(max-width:420px){.crm-simple-record h1{font-size:20px}.crm-simple-record header p{max-width:230px;overflow-wrap:anywhere}.crm-simple-record-tools{right:12px}.crm-simple-record-tools .btn{min-width:44px;padding-inline:10px}.crm-simple-more>div{position:fixed;top:auto;right:10px;left:10px;bottom:12px;width:auto}.crm-simple-tabs{overflow-x:auto}.crm-simple-tabs button{min-width:max-content}.crm-simple-overview>.panel{padding:14px!important}}

@media(max-width:420px){
  .content-crm .topbar-actions,.content-crm .approval-header-controls{width:100%}
  .content-crm .approval-header-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 34px 34px 42px;align-items:center;gap:6px}
  .content-crm .approval-header-context{min-width:0;width:auto;padding:6px 8px}
  .content-crm .approval-header-context>svg{display:none}
  .content-crm .approval-header-menu-wrap{min-width:0}
  .content-crm .approval-user-menu-wrap{width:42px}
  .content-crm .approval-user-menu-wrap .approval-header-user{width:40px;min-width:40px}
}

/* PlusCRM unified visual redesign: compact business density across every workspace. */
.content-crm>.page{background:#f5f7fb}.crm-workspace{--crm-border:#d9e2ee;--crm-muted:#64748b;--crm-blue:#1768e6;--crm-soft:#f7f9fc;gap:10px!important;max-width:none!important}.crm-workspace>.panel,.crm-workspace .panel{border-color:var(--crm-border);border-radius:10px;box-shadow:0 2px 8px rgba(15,23,42,.035)}
.crm-common-navigation{min-height:48px!important;padding:0 8px!important;border-radius:10px!important}.crm-common-primary button{height:48px!important;padding-inline:17px!important}.crm-common-tools summary{height:36px!important;border-radius:7px!important}
.crm-administration-workspace{min-width:0}.crm-administration-state{display:grid;place-items:center;align-content:center;min-height:260px;padding:36px;text-align:center}.crm-administration-state>i{display:grid;place-items:center;width:52px;height:52px;margin-bottom:12px;border-radius:50%;background:#eaf2ff;color:#0757cc}.crm-administration-state>i svg{width:24px;height:24px}.crm-administration-state h2{margin:0 0 8px}.crm-administration-state p{max-width:620px;margin:0;color:#43546b}.crm-administration-state strong{margin:0 0 8px;color:#a15c00}.crm-administration-state small{max-width:720px;margin-top:10px;color:#65758b}.crm-administration-state.error{border-color:#fecaca;background:#fffafa}
.crm-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.crm-setting-card{min-width:0}.crm-setting-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.crm-setting-card h2{margin:0;font-size:18px}.crm-setting-card header p{margin:4px 0 0;color:var(--muted);font-size:13px}.crm-setting-card table{width:100%;table-layout:fixed}.crm-setting-card th:first-child{width:62%}.crm-setting-card th:nth-child(2){width:20%}.crm-setting-card td:first-child{overflow-wrap:anywhere}.crm-setting-card td:last-child{text-align:right}.crm-setting-order{width:28px;height:28px;margin-right:4px;border:1px solid var(--border);border-radius:7px;background:#fff;color:#173454;cursor:pointer}.crm-setting-order:disabled{opacity:.35;cursor:not-allowed}.crm-setting-defaults form,.crm-setting-dialog form{display:grid;gap:14px}.crm-setting-defaults label,.crm-setting-dialog label{display:grid;gap:6px}.crm-setting-active{display:flex!important;align-items:center;gap:8px}.crm-setting-active input{width:auto}.crm-setting-defaults .btn{justify-self:start}.crm-setting-dialog{width:min(520px,calc(100vw - 28px))}@media(max-width:850px){.crm-settings-grid{grid-template-columns:1fr}}@media(max-width:520px){.crm-setting-card{padding:14px}.crm-setting-card>header{align-items:stretch;flex-direction:column}.crm-setting-card>header .btn{align-self:flex-start}.crm-setting-card table{font-size:13px}.crm-setting-order{width:26px;height:26px}}
.crm-mobile-navigation{display:none}
@media(max-width:700px){.crm-common-navigation{overflow:visible!important}.crm-common-primary{display:none!important}.crm-mobile-navigation{position:relative;display:flex;flex:1;align-items:center;padding:0 7px}.crm-mobile-navigation>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:42px;padding:0 12px;border:1px solid #ccd7e5;border-radius:7px;background:#fff;color:#26364b;font-weight:700;cursor:pointer;list-style:none}.crm-mobile-navigation>summary::-webkit-details-marker{display:none}.crm-mobile-navigation[open]>summary{border-color:#8bb5f5;color:#0757cc;background:#f6f9ff}.crm-mobile-navigation>div{position:fixed;top:auto;right:12px;left:12px;z-index:45;display:grid;grid-template-columns:1fr 1fr;width:auto;padding:7px;border:1px solid #d4deeb;border-radius:9px;background:#fff;box-shadow:0 14px 32px rgba(15,23,42,.18)}.crm-mobile-navigation button{min-height:44px;padding:9px 11px;border:0;border-radius:6px;background:#fff;color:#24364d;font:inherit;font-weight:650;text-align:left}.crm-mobile-navigation button:hover,.crm-mobile-navigation button.active{background:#edf4ff;color:#0757cc}.crm-common-tools{flex:0 0 auto}}
.crm-saved-views{display:flex;align-items:center;gap:6px;min-width:0}.crm-saved-views>span{color:#42526a;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.045em;white-space:nowrap}.crm-saved-views select{width:150px;min-width:110px;height:34px;padding-inline:8px;border:1px solid var(--crm-border);border-radius:7px;background:#fff;font-size:11px}.crm-saved-views>.btn,.crm-saved-views summary.btn{display:flex;align-items:center;justify-content:center;min-height:34px;height:34px;padding:0 10px;font-size:11px;list-style:none;cursor:pointer}.crm-saved-views details{position:relative}.crm-saved-views details>summary::-webkit-details-marker{display:none}.crm-saved-views details>div{position:absolute;z-index:45;top:40px;right:0;display:grid;width:180px;padding:7px;border:1px solid var(--crm-border);border-radius:9px;background:#fff;box-shadow:0 16px 34px rgba(15,23,42,.18)}.crm-saved-views details small{padding:6px 9px;color:var(--crm-muted);font-size:9px;border-bottom:1px solid #edf1f6}.crm-saved-views details button{min-height:34px;padding:7px 9px;border:0;border-radius:6px;background:#fff;text-align:left;cursor:pointer}.crm-saved-views details button:hover{background:#eef5ff}.crm-saved-views details button.danger{color:#c81e1e}
.crm-refined-head,.crm-records-head,.crm-pipeline-head,.crm-followups-head{min-height:52px;align-items:center!important}.crm-refined-head h1,.crm-pipeline-head h1,.crm-followups-head h1{font-size:22px!important;letter-spacing:-.02em}.crm-refined-head p,.crm-pipeline-head>div:first-child>span,.crm-followups-head>div>p:last-child{font-size:11px!important}.crm-breadcrumb,.crm-pipeline-head>div:first-child>p{display:none!important}
.crm-refined-filters{padding:9px 10px}.crm-refined-filters>form{gap:7px}.crm-refined-filters select,.crm-refined-filters input,.crm-refined-filters .btn{height:35px;min-height:35px}.crm-refined-kpis{gap:9px}.crm-refined-kpi{min-height:78px;padding:10px 13px;grid-template-columns:38px minmax(0,1fr);gap:10px}.crm-refined-kpi>i{width:36px;height:36px}.crm-refined-kpi strong{font-size:20px}.crm-refined-attention>header,.crm-refined-pipeline>header{min-height:43px;padding:7px 12px}.crm-refined-action{min-height:46px;padding:7px 12px}.crm-refined-pipeline>div{padding:9px}.crm-refined-pipeline>div>button{min-height:44px}.crm-dashboard-loading{grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;min-height:110px}.crm-dashboard-loading span{display:block;height:68px;border-radius:9px;background:linear-gradient(90deg,#eef2f7 25%,#f8fafc 45%,#eef2f7 65%);background-size:220% 100%;animation:crm-skeleton 1.2s ease-in-out infinite}.crm-dashboard-loading b{grid-column:1/-1;color:var(--crm-muted);font-size:11px}@keyframes crm-skeleton{to{background-position:-220% 0}}
.crm-records-card{padding:12px!important}.crm-records-head{margin-bottom:8px}.crm-records-head-actions{flex-wrap:wrap}.crm-records-toolbar{grid-template-columns:minmax(250px,2fr) repeat(4,minmax(105px,1fr)) auto auto;padding:7px;gap:7px;margin-bottom:8px}.crm-records-toolbar input,.crm-records-toolbar select,.crm-records-more>summary{height:35px;min-height:35px}.crm-records-table-wrap{border-radius:9px}.crm-records-table th,.crm-records-table td{height:46px;padding:7px 8px}.crm-records-table th{font-size:9px}.crm-records-table td{font-size:11px}.crm-records-table .crm-col-title{width:15%!important}.crm-records-table .crm-col-contact{width:13%!important}.crm-records-table .crm-col-company{width:11%!important}.crm-records-table .crm-col-source{width:10%!important}.crm-records-table .crm-col-owner{width:11%!important}.crm-records-table .crm-col-stage{width:8%!important}.crm-records-table .crm-col-followup{width:12%!important}.crm-records-table .crm-col-value{width:9%!important}.crm-records-table .crm-col-created{width:7%!important}.crm-records-table :is(.crm-col-title,.crm-col-contact,.crm-col-company,.crm-col-source,.crm-col-owner){white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.crm-records-table :is(.crm-title-open,.crm-contact-open){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.25}.crm-records-pagination{padding-top:7px}
.crm-simple-back{margin:0 2px!important}.crm-simple-record{padding:16px 18px!important}.crm-simple-record>header{padding-bottom:11px}.crm-simple-record h1{font-size:22px}.crm-simple-record header p{margin-bottom:6px}.crm-simple-record>footer{padding-top:11px}.crm-simple-status>span{padding-inline:18px}.crm-simple-actions .btn{height:36px;min-width:120px}.crm-simple-record-tools .btn,.crm-simple-more summary{height:36px}.crm-simple-more summary{width:36px}.crm-simple-tabs button{height:40px;padding-inline:15px}.crm-simple-overview{gap:10px}.crm-simple-overview>.panel{padding:13px 15px!important}.crm-simple-overview h2,.crm-simple-timeline h2{margin-bottom:11px;font-size:15px}.crm-simple-overview dl{gap:6px}.crm-simple-overview dl>div{grid-template-columns:150px minmax(0,1fr);gap:10px;font-size:11px}.crm-simple-next>strong{margin-bottom:12px}.crm-simple-preview{min-height:72px}
.crm-dialog-backdrop{align-items:center;padding:12px;background:rgba(15,23,42,.48)}.crm-detail-workspace .crm-dialog:has(#crmEditForm){display:flex;width:min(760px,calc(100vw - 24px));height:min(690px,calc(100vh - 24px));max-height:none;overflow:hidden;padding:0;border-radius:14px;box-shadow:-10px 0 38px rgba(15,23,42,.22)}.crm-dialog:has(#crmEditForm) .crm-dialog-close{z-index:6;top:13px;right:14px}.crm-dialog:has(#crmEditForm) .crm-unified-lead-form{display:grid!important;grid-template-columns:1fr 1fr!important;align-content:start;height:100%;overflow-y:auto;overscroll-behavior:contain;padding:18px 20px 0;gap:9px!important}.crm-dialog:has(#crmEditForm) .crm-unified-lead-form>h2{position:sticky;top:-18px;z-index:4;margin:-18px -20px 0;padding:17px 64px 6px 20px;background:#fff}.crm-dialog:has(#crmEditForm) .crm-form-intro{margin:0 0 3px;font-size:11px}.crm-dialog:has(#crmEditForm) .crm-lead-section{padding:9px 11px 10px}.crm-dialog:has(#crmEditForm) .crm-lead-section>div{gap:8px}.crm-dialog:has(#crmEditForm) .crm-lead-section .crm-field{grid-column:span 6}.crm-dialog:has(#crmEditForm) .crm-lead-section .crm-field :is(input,select,textarea){min-height:37px}.crm-dialog:has(#crmEditForm) .crm-lead-section .crm-field textarea{min-height:62px}.crm-dialog:has(#crmEditForm) .crm-unified-actions{position:sticky;z-index:5;bottom:0;margin:2px -20px 0!important;padding:11px 20px;border-top:1px solid var(--crm-border);background:#fff;box-shadow:0 -8px 18px rgba(15,23,42,.06)}
.crm-pipeline-workspace{gap:8px!important}.crm-pipeline-head>div:last-child{align-items:center}.crm-pipeline-summary>div{min-height:52px;padding:8px 12px}.crm-pipeline-summary span{font-size:9px}.crm-pipeline-summary strong{font-size:17px}.crm-pipeline-toolbar{padding:8px;gap:7px}.crm-pipeline-toolbar input,.crm-pipeline-toolbar select,.crm-pipeline-toolbar .btn{height:34px;min-height:34px}.crm-pipeline-stage-nav{display:none}.crm-kanban-board{grid-auto-columns:minmax(238px,1fr);gap:8px;padding-top:0}.crm-kanban-column{padding:8px;gap:7px;border-radius:9px;background:#f4f7fb}.crm-kanban-card{padding:9px;gap:5px;border-radius:8px}.crm-kanban-card-head strong{white-space:normal;line-height:1.25}.crm-kanban-column .empty{min-height:58px;padding:17px 7px}
.crm-followups-head{flex-wrap:wrap}.crm-followups-head>.btn{order:2}.crm-followups-head>.crm-saved-views{margin-left:auto}.crm-followup-kpis{gap:9px}.crm-followup-kpi{min-height:62px;padding:11px 15px;box-shadow:none}.crm-followup-kpi strong{font-size:20px}.crm-followup-results{border-radius:10px}.crm-followup-tabs{gap:8px}.crm-followup-tabs button{padding:10px 9px}.crm-followup-toolbar{padding:9px;gap:7px}.crm-followup-toolbar input,.crm-followup-toolbar select,.crm-followup-toolbar .btn{height:35px;min-height:35px}.crm-followup-empty{min-height:105px;padding:18px}.crm-followup-table th,.crm-followup-table td{padding:8px 10px}
@media(max-width:900px){.crm-saved-views{width:100%;order:5}.crm-saved-views select{flex:1}.crm-records-head-actions .crm-saved-views{flex-basis:100%}.crm-refined-kpis{grid-template-columns:1fr 1fr}.crm-records-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-filter-search{grid-column:span 2}.crm-dialog:has(#crmEditForm) .crm-unified-lead-form{grid-template-columns:1fr!important}.crm-pipeline-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.crm-common-navigation{overflow-x:auto}.crm-saved-views>span{display:none}.crm-saved-views>.btn,.crm-saved-views summary.btn{padding-inline:8px}.crm-records-head{display:grid}.crm-records-head-actions{justify-content:stretch}.crm-records-head-actions>.btn{flex:1}.crm-records-toolbar{grid-template-columns:1fr 1fr}.crm-records-table tr{padding:12px!important;border-radius:10px!important;box-shadow:0 2px 8px rgba(15,23,42,.04)}.crm-records-table td{grid-template-columns:105px minmax(0,1fr)!important}.crm-simple-record>header{flex-direction:column}.crm-simple-record header>div:first-child{padding-right:82px}.crm-simple-record>footer{align-items:stretch}.crm-simple-status{display:grid;width:100%;gap:6px}.crm-simple-status>span{padding:0;border:0}.crm-simple-actions{display:grid;grid-template-columns:1fr}.crm-simple-actions .btn{width:100%}.crm-simple-overview{grid-template-columns:1fr}.crm-dialog-backdrop{padding:6px}.crm-detail-workspace .crm-dialog:has(#crmEditForm){width:100%;height:calc(100vh - 12px);border-radius:12px}.crm-dialog:has(#crmEditForm) .crm-unified-lead-form{padding-inline:13px}.crm-dialog:has(#crmEditForm) .crm-unified-lead-form>h2{margin-inline:-13px;padding-left:13px}.crm-dialog:has(#crmEditForm) .crm-unified-actions{margin-inline:-13px!important;padding-inline:13px}.crm-pipeline-head{align-items:stretch}.crm-pipeline-head>div:last-child{display:grid;grid-template-columns:1fr 1fr}.crm-pipeline-head .crm-saved-views{grid-column:1/-1}.crm-followup-kpis{grid-template-columns:1fr 1fr}.crm-followups-head>.crm-saved-views{margin-left:0}.crm-followup-toolbar{grid-template-columns:1fr 1fr}.crm-followup-toolbar label:first-child{grid-column:1/-1}}
@media(max-width:420px){.crm-saved-views{display:grid;grid-template-columns:minmax(0,1fr) auto auto}.crm-saved-views select{width:100%}.crm-refined-head{align-items:flex-start;flex-direction:column}.crm-refined-head>.btn{width:100%}.crm-refined-filters>form{display:grid;grid-template-columns:1fr 1fr}.crm-refined-filters label{min-width:0}.crm-refined-filters select{width:100%;min-width:0}.crm-dashboard-loading{grid-template-columns:1fr 1fr}.crm-records-toolbar{grid-template-columns:1fr}.crm-filter-search{grid-column:auto}.crm-simple-overview dl>div{grid-template-columns:105px minmax(0,1fr)}.crm-dialog:has(#crmEditForm) .crm-lead-section .crm-field{grid-column:1/-1}.crm-pipeline-summary{grid-template-columns:1fr 1fr}.crm-followup-toolbar{grid-template-columns:1fr}.crm-followup-toolbar label:first-child{grid-column:auto}.crm-followup-kpis{gap:7px}.crm-followup-kpi{padding:10px 11px}}

/* The global CRM Workspace heading already identifies this screen. */
.crm-refined-dashboard > .crm-refined-head {
  min-height: 0;
  justify-content: flex-end;
}

.crm-refined-dashboard > .crm-refined-head > div:first-child {
  display: none;
}

/* Keep dropdown labels inside the compact CRM tenant cells. */
.content-crm .approval-header-context select {
  height: 22px;
  min-height: 22px;
  padding-block: 0;
}

@media (min-width: 900px) {
  .content-crm .page .global-workspace-tools .approval-header-controls {
    grid-template-columns: minmax(280px, 1.35fr) minmax(190px, 1fr) 40px 40px minmax(164px, auto);
  }
}
.crm-team-filters{display:grid;grid-template-columns:minmax(220px,1fr) 180px auto auto;gap:12px;align-items:end;margin:16px 0}.crm-team-filters label{display:grid;gap:6px}.crm-teams-workspace .table-wrap{max-width:100%;overflow-x:auto}.crm-teams-workspace table{width:100%;min-width:0;table-layout:fixed}.crm-teams-workspace th:nth-child(1){width:24%}.crm-teams-workspace th:nth-child(2){width:22%}.crm-teams-workspace th:nth-child(3),.crm-teams-workspace th:nth-child(4){width:12%}.crm-teams-workspace th:nth-child(5){width:13%}.crm-teams-workspace th:nth-child(6){width:17%}.crm-team-detail dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.crm-team-detail dt{color:var(--muted);font-size:12px;margin-bottom:5px}.crm-team-detail dd{margin:0;font-weight:600}.crm-team-dialog{width:min(680px,calc(100vw - 28px))}.crm-team-dialog form{display:grid;gap:14px}.crm-team-dialog fieldset{border:1px solid var(--border);border-radius:10px;padding:12px}.crm-team-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:160px;overflow:auto}.crm-team-checks label,.crm-team-active{display:flex!important;align-items:center;gap:8px}.crm-team-checks input,.crm-team-active input{width:auto}@media(max-width:700px){.crm-team-filters,.crm-team-detail dl{grid-template-columns:1fr}.crm-team-checks{grid-template-columns:1fr}.crm-teams-workspace table{min-width:720px}}
.crm-teams-workspace th:nth-child(1){width:20%}.crm-teams-workspace th:nth-child(2){width:18%}.crm-teams-workspace th:nth-child(3),.crm-teams-workspace th:nth-child(4),.crm-teams-workspace th:nth-child(5){width:10%}.crm-teams-workspace th:nth-child(6){width:32%}.crm-teams-workspace td:last-child{white-space:normal}.crm-teams-workspace td:last-child .btn{margin:2px}
.crm-team-cards{display:none}.crm-team-detail{order:-1}.crm-team-detail-back{display:block;margin:0 0 8px}.crm-team-empty{display:grid;justify-items:center;gap:9px;padding:38px 18px;border:1px dashed #cad6e5;border-radius:10px;background:#f8fbff;text-align:center}.crm-team-empty p{margin:0;color:var(--muted)}.crm-team-checks small{color:var(--muted);font-weight:500}@media(max-width:700px){.crm-teams-workspace .table-wrap{display:none}.crm-team-cards{display:grid;gap:10px}.crm-team-card{padding:14px;border:1px solid #d5dfeb;border-radius:10px;background:#fff}.crm-team-card header,.crm-team-card footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.crm-team-card dl{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px;margin:13px 0}.crm-team-card dt{font-size:11px;color:var(--muted)}.crm-team-card dd{margin:4px 0 0;font-weight:650;overflow-wrap:anywhere}.crm-team-card footer{justify-content:flex-start;flex-wrap:wrap}.crm-team-card footer .btn{flex:1 1 auto}.crm-team-detail .panel-head{align-items:flex-start}.crm-team-detail .panel-head>div{min-width:0}.crm-team-dialog{max-height:calc(100dvh - 24px);overflow-y:auto}.crm-team-dialog .form-actions{position:sticky;bottom:0;padding-top:10px;background:#fff}}
.crm-team-dialog-backdrop{justify-content:center}.crm-team-dialog{position:relative;width:min(840px,calc(100vw - 28px));height:auto;max-height:calc(100dvh - 24px);overflow:hidden;padding:0;border-radius:14px;box-shadow:0 24px 70px rgba(15,23,42,.28)}.crm-team-dialog>.crm-dialog-close{z-index:4;top:18px;right:18px;width:38px;height:38px;border:1px solid #d3ddea;border-radius:8px;background:#fff;color:#172033;font-size:22px;cursor:pointer}.crm-team-dialog>#crmTeamForm,.crm-team-dialog>form{grid-template-columns:1fr;gap:0;max-height:calc(100dvh - 24px);overflow-y:auto;padding:20px 22px 0}.crm-team-dialog-header{display:flex;align-items:center;gap:12px;padding:0 50px 18px 0}.crm-team-dialog-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:10px;background:#eaf2ff;color:#2563eb}.crm-team-dialog-icon .nav-icon{width:24px;height:24px}.crm-team-dialog-header h2{margin:0;padding:0;font-size:23px}.crm-team-dialog-header p{margin:4px 0 0;color:var(--muted);font-weight:500}.crm-team-details-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:16px 0 18px;border-top:1px solid #e3e9f1}.crm-team-details-grid>label{display:grid;align-content:start;gap:7px;font-size:12px;font-weight:700}.crm-team-details-grid>label>span[aria-hidden]{color:#dc2626}.crm-team-details-grid input,.crm-team-details-grid select{min-height:44px}.crm-team-details-grid label>small,.crm-team-field-meta small{color:var(--muted);font-weight:500}.crm-team-field-meta{display:flex;justify-content:space-between;gap:10px}.crm-team-selection-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:0 0 18px}.crm-team-selection-grid fieldset{min-width:0;margin:0;padding:0;border:0}.crm-team-selection-grid legend{padding:0;font-size:16px;font-weight:750;color:#172033}.crm-team-selection-grid fieldset>p,.crm-team-section-title p{margin:4px 0 12px;color:var(--muted);font-size:12px}.crm-team-members-panel{padding-right:18px!important;border-right:1px solid #e3e9f1!important}.crm-team-member-search{position:relative;display:block!important;margin-bottom:10px}.crm-team-member-search input{height:42px;padding-right:38px}.crm-team-member-search .nav-icon{position:absolute;right:12px;top:12px;color:#64748b}.crm-team-checks.crm-team-member-list,.crm-team-checks.crm-team-branch-list{display:grid;grid-template-columns:1fr;gap:0;max-height:250px;overflow-y:auto;border:1px solid #d9e2ee;border-radius:10px;background:#fff}.crm-team-member-row{display:grid!important;grid-template-columns:auto 34px minmax(0,1fr);gap:10px!important;min-height:56px;padding:8px 10px;border-bottom:1px solid #e8edf4;cursor:pointer}.crm-team-member-row:last-child,.crm-team-branch-row:last-child{border-bottom:0}.crm-team-member-row[hidden]{display:none!important}.crm-team-member-row input,.crm-team-branch-row input,.crm-team-select-all input{width:16px!important;height:16px}.crm-team-member-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e7f0ff;color:#2463c7;font-size:11px;font-weight:800}.crm-team-member-avatar[data-tone="1"]{background:#e5f8f3;color:#07856f}.crm-team-member-avatar[data-tone="2"]{background:#f1ebff;color:#7048c8}.crm-team-member-avatar[data-tone="3"]{background:#fff4dd;color:#b56b00}.crm-team-member-avatar[data-tone="4"]{background:#ffeaf2;color:#c52b68}.crm-team-member-avatar[data-tone="5"]{background:#e6f7fb;color:#137f9a}.crm-team-member-copy{display:grid;min-width:0;gap:2px}.crm-team-member-copy strong,.crm-team-member-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-team-member-copy strong{font-size:12px}.crm-team-member-copy>small{font-size:11px;color:var(--muted)}.crm-team-member-copy strong small{color:#2563eb}.crm-team-member-empty{margin:8px 0 0!important;color:var(--muted);font-size:12px}.crm-team-section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.crm-team-selected-count{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:#edf3fb;color:#475569;font-size:11px;font-weight:700}.crm-team-select-all{display:flex!important;align-items:center;gap:8px!important;min-height:42px;padding:0 10px;font-size:12px;font-weight:700}.crm-team-branch-row{display:grid!important;grid-template-columns:auto 20px minmax(0,1fr) auto;align-items:center;gap:8px!important;min-height:50px;padding:9px 10px;border-bottom:1px solid #e8edf4;cursor:pointer}.crm-team-branch-icon{display:grid;place-items:center;color:#64748b}.crm-team-branch-icon .nav-icon{width:15px;height:15px}.crm-team-branch-row strong{min-width:0;font-size:12px;overflow-wrap:anywhere}.crm-team-current-branch{padding:4px 7px;border-radius:999px;background:#e5f7ec;color:#16814b;font-size:10px!important;font-weight:750!important;white-space:nowrap}.crm-team-active{position:relative;display:flex!important;align-items:center;gap:12px!important;padding:13px 14px;border:1px solid #bdd7ff;border-radius:10px;background:#f4f8ff}.crm-team-active>input{position:absolute;width:1px!important;height:1px;opacity:0}.crm-team-toggle{position:relative;flex:0 0 34px;width:34px;height:20px;border-radius:999px;background:#94a3b8;transition:.18s}.crm-team-toggle::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.25);transition:.18s}.crm-team-active>input:checked+.crm-team-toggle{background:#2563eb}.crm-team-active>input:checked+.crm-team-toggle::after{transform:translateX(14px)}.crm-team-active>input:focus-visible+.crm-team-toggle{outline:3px solid rgba(37,99,235,.28);outline-offset:2px}.crm-team-active>span:last-child{display:grid;gap:2px}.crm-team-active strong{font-size:12px}.crm-team-active small{color:var(--muted);font-size:11px}.crm-team-dialog-footer{position:sticky;z-index:3;bottom:0;margin:18px -22px 0;padding:14px 22px;border-top:1px solid #e3e9f1;background:#fff;box-shadow:0 -8px 20px rgba(15,23,42,.04)}
@media(max-width:700px){.crm-team-dialog{width:100%;max-height:calc(100dvh - 12px)}.crm-team-dialog>#crmTeamForm,.crm-team-dialog>form{max-height:calc(100dvh - 12px);padding:16px 14px 0}.crm-team-details-grid,.crm-team-selection-grid{grid-template-columns:1fr}.crm-team-selection-grid{gap:16px}.crm-team-members-panel{padding-right:0!important;padding-bottom:16px!important;border-right:0!important;border-bottom:1px solid #e3e9f1!important}.crm-team-checks.crm-team-member-list,.crm-team-checks.crm-team-branch-list{max-height:220px}.crm-team-dialog-footer{margin-inline:-14px;padding-inline:14px}.crm-team-dialog-header{padding-right:44px}.crm-team-dialog-header h2{font-size:20px}.crm-team-current-branch{display:none}}
.crm-team-dialog>.crm-dialog-close{position:absolute}
.crm-administration-workspace .crm-setting-card .table-wrap{max-width:100%;overflow-x:visible}.crm-administration-workspace .crm-setting-card table{width:100%;min-width:0!important;table-layout:fixed}.crm-administration-workspace .crm-setting-card th:first-child{width:58%}.crm-administration-workspace .crm-setting-card th:nth-child(2){width:22%}.crm-administration-workspace .crm-setting-card th:nth-child(3){width:20%}.crm-administration-workspace .crm-setting-card td:last-child{text-align:right}@media(max-width:520px){.crm-administration-workspace .crm-setting-card th:first-child{width:52%}.crm-administration-workspace .crm-setting-card th:nth-child(2){width:24%}.crm-administration-workspace .crm-setting-card th:nth-child(3){width:24%}.crm-administration-workspace .crm-setting-card td,.crm-administration-workspace .crm-setting-card th{padding:9px 6px}}
.approval-header-icon-button.has-unread{position:relative}
.crm-notification-count{position:absolute;right:-5px;top:-6px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#dc2626;color:#fff;font-size:10px;font-weight:700;border:2px solid #fff}
.crm-notification-menu{width:min(390px,calc(100vw - 24px));max-height:min(520px,calc(100vh - 90px));overflow:hidden}
.crm-notification-menu>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 4px 10px;border-bottom:1px solid #e3e9f2}
.crm-notification-menu>header span{display:grid}.crm-notification-menu>header small{color:#64748b;font-weight:500}
.crm-notification-list{max-height:410px;overflow-y:auto;padding-top:6px}
.crm-notification-list article{display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center;border-bottom:1px solid #edf1f7}
.crm-notification-list article.unread{background:#eff6ff;border-left:3px solid #2563eb}
.crm-notification-list article>button:first-child{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;text-align:left;padding:10px;border:0;background:transparent;color:#10213b}
.crm-notification-list article>button span{display:grid;gap:2px}.crm-notification-list article small,.crm-notification-list article em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-style:normal;font-size:12px}
.crm-notification-dismiss{width:30px;height:30px;border:0;background:transparent;color:#64748b;font-size:20px;border-radius:6px}.crm-notification-dismiss:hover{background:#fee2e2;color:#b91c1c}
@media(max-width:600px){.crm-notification-menu{position:fixed!important;left:12px!important;right:12px!important;top:72px!important;width:auto;max-height:calc(100vh - 84px)}.crm-notification-list{max-height:calc(100vh - 160px)}}
.crm-meta-grid{display:grid;gap:16px}.crm-meta-grid>.panel{margin:0}.crm-meta-grid .panel>.panel-head{display:flex;align-items:flex-start;justify-content:flex-start;min-height:0;margin:0 0 14px;padding:0;border:0;text-align:left}.crm-meta-grid .panel>.panel-head::before{display:none}.crm-meta-grid .panel>.panel-head h2{margin:0 0 4px;font-size:18px}.crm-meta-grid .table-wrap{max-width:100%;overflow-x:visible}.crm-meta-grid table{width:100%;min-width:0!important;table-layout:fixed}.crm-meta-grid th,.crm-meta-grid td{overflow-wrap:anywhere}.crm-meta-grid td.empty{padding:28px 12px;color:var(--muted);text-align:center}.crm-meta-status header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.crm-meta-status header h2{margin:0 0 4px}.crm-meta-status header p{margin:0;color:var(--muted)}.crm-meta-status dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.crm-meta-status dl div{border:1px solid var(--line);border-radius:10px;padding:12px}.crm-meta-status dt{font-size:12px;color:var(--muted)}.crm-meta-status dd{margin:5px 0 0;font-weight:700}.crm-meta-status form{display:flex;align-items:end;gap:10px;max-width:640px}.crm-meta-status form label{flex:1}.crm-meta-syncs{grid-column:1/-1}.crm-meta-grid td small{display:block;color:var(--muted);margin-top:3px}.notice.warning{padding:12px;border:1px solid #f2c46d;border-radius:10px;background:#fff8e8;color:#7a4a00}
.crm-meta-setup{grid-column:1/-1}.crm-meta-setup .panel-head{justify-content:space-between}.crm-meta-source{display:grid;grid-template-columns:minmax(240px,420px) 1fr;align-items:end;gap:18px}.crm-meta-source p{margin:0 0 12px;color:var(--muted)}.crm-meta-credential-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.crm-meta-credential-grid[hidden]{display:none}.crm-meta-credential-grid .crm-meta-wide{grid-column:1/-1}.crm-meta-endpoints{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.crm-meta-endpoints label>div,.crm-meta-token>div{display:flex;gap:8px}.crm-meta-endpoints input,.crm-meta-token input{min-width:0;flex:1;background:#f8fafc}.crm-meta-token{margin-top:16px}.crm-meta-token p{margin:4px 0 10px}.crm-meta-pixel p{margin:0;color:var(--muted);line-height:1.55}
@media(max-width:600px){.crm-meta-status dl{grid-template-columns:1fr}.crm-meta-status form{align-items:stretch;flex-direction:column}.crm-meta-status form .btn{width:100%}.crm-meta-syncs{grid-column:auto}.crm-meta-source,.crm-meta-credential-grid,.crm-meta-endpoints{grid-template-columns:1fr}.crm-meta-credential-grid .crm-meta-wide{grid-column:auto}.crm-meta-endpoints label>div,.crm-meta-token>div{align-items:stretch;flex-direction:column}.crm-meta-endpoints .btn,.crm-meta-token .btn{width:100%}}
.crm-whatsapp-action{border-color:#16a34a!important;color:#166534!important}.crm-whatsapp-action:not(:disabled):hover{background:#f0fdf4!important}.crm-dialog .crm-whatsapp-form{width:100%;min-width:0;grid-template-columns:minmax(0,1fr)}.crm-whatsapp-form textarea,.crm-whatsapp-settings textarea{white-space:pre-wrap;line-height:1.5}.crm-whatsapp-settings{grid-column:1/-1}.crm-whatsapp-settings>form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,1fr) auto;gap:12px;align-items:end;margin:14px 0}.crm-whatsapp-settings .table-wrap{margin-top:12px}@media(max-width:700px){.crm-whatsapp-settings>form{grid-template-columns:1fr}.crm-simple-actions .crm-whatsapp-action{min-height:42px}}

/* PlusCRM Settings — compact, independently expandable accordion sections */
.crm-administration-workspace .crm-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start;min-width:0}.crm-administration-workspace .crm-settings-column{display:grid;grid-auto-rows:max-content;gap:10px;align-content:start;min-width:0}.crm-administration-workspace .crm-settings-accordion-item{min-width:0;padding:0!important;overflow:hidden;border-color:#dbe4ef;box-shadow:0 2px 8px rgba(15,35,70,.035)}.crm-settings-accordion-toggle{display:grid;grid-template-columns:minmax(0,1fr) auto 28px;align-items:center;gap:14px;width:100%;min-height:70px;padding:13px 16px;border:0;background:#fff;color:#10213b;text-align:left;cursor:pointer}.crm-settings-accordion-toggle:hover{background:#f8fbff}.crm-settings-accordion-toggle:focus-visible{position:relative;z-index:1;outline:3px solid rgba(37,99,235,.35);outline-offset:-3px}.crm-settings-accordion-toggle>span:first-child{display:grid;gap:4px;min-width:0}.crm-settings-accordion-toggle strong{font-size:15px;line-height:1.25}.crm-settings-accordion-toggle small{color:#60718a;font-size:11.5px;line-height:1.35}.crm-settings-accordion-summary{padding:4px 9px;border-radius:999px;background:#f0f5fb;color:#49617e;font-size:10px;font-weight:700;white-space:nowrap}.crm-settings-accordion-chevron{display:grid;place-items:center;width:28px;height:28px;color:#416182;font-size:20px;transition:transform .18s ease}.crm-settings-accordion-toggle[aria-expanded="true"]{background:#f8fbff}.crm-settings-accordion-toggle[aria-expanded="true"] .crm-settings-accordion-chevron{transform:rotate(180deg)}.crm-settings-accordion-body{min-width:0;padding:16px;border-top:1px solid #e2e8f0;background:#fff}.crm-settings-accordion-body[hidden]{display:none!important}.crm-settings-section-actions{display:flex;justify-content:flex-end;margin-bottom:10px}.crm-settings-accordion-body>.table-wrap{margin:0;max-width:100%;overflow-x:auto}.crm-administration-workspace .crm-settings-accordion-body table{min-width:0!important}.crm-settings-accordion-item.crm-setting-defaults form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.crm-settings-accordion-item.crm-setting-defaults form>.btn{justify-self:start}.crm-settings-accordion-item.crm-whatsapp-settings .crm-settings-accordion-body>form{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:end;margin:0 0 14px}.crm-settings-accordion-item.crm-whatsapp-settings .crm-settings-accordion-body>form>.btn{justify-self:start}.crm-settings-accordion-item.crm-whatsapp-settings .table-wrap{margin-top:0}@media(max-width:1099px){.crm-administration-workspace .crm-settings-grid{grid-template-columns:minmax(0,1fr)}.crm-settings-accordion-item.crm-setting-defaults form{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.crm-settings-accordion-toggle{grid-template-columns:minmax(0,1fr) 24px;gap:8px;padding:12px 13px}.crm-settings-accordion-summary{display:none}.crm-settings-accordion-body{padding:12px}.crm-settings-section-actions{justify-content:flex-start}.crm-settings-accordion-item.crm-setting-defaults form,.crm-settings-accordion-item.crm-whatsapp-settings .crm-settings-accordion-body>form{grid-template-columns:1fr}.crm-settings-accordion-body>.table-wrap{overflow-x:auto}.crm-settings-accordion-body table{font-size:12px}}
/* PlusCRM Phase 2A: compact campaign attribution workspace. */
.crm-campaign-filters{display:grid;grid-template-columns:minmax(220px,1.6fr) repeat(3,minmax(150px,1fr)) auto auto;gap:12px;align-items:end;margin:18px 0}.crm-campaign-filters label,.crm-campaign-form-grid label{display:grid;gap:6px}.crm-campaign-cards{display:none}.crm-campaign-card{border:1px solid var(--border,#d9e1e8);border-radius:12px;padding:14px;background:#fff}.crm-campaign-card header{display:flex;justify-content:space-between;gap:12px}.crm-campaign-card .link-button{display:grid;text-align:left}.crm-campaign-card small{display:block;color:var(--muted,#64748b)}.crm-campaign-card dl,.crm-campaign-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.crm-campaign-card dl div,.crm-campaign-overview div{padding:10px;border-radius:9px;background:#f7f9fb}.crm-campaign-card dt,.crm-campaign-overview dt{font-size:12px;color:var(--muted,#64748b)}.crm-campaign-card dd,.crm-campaign-overview dd{margin:4px 0 0}.crm-campaign-detail>.panel-head>div:last-child{display:flex;gap:8px;flex-wrap:wrap}.crm-campaign-kpis{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:10px;margin:18px 0}.crm-campaign-kpis article{padding:14px;border:1px solid #dce4eb;border-radius:10px;background:#fbfcfd}.crm-campaign-kpis small{display:block;color:#64748b}.crm-campaign-kpis strong{display:block;font-size:22px;margin-top:5px}.crm-campaign-attribution{margin-top:18px;padding-top:16px;border-top:1px solid #e2e8f0}.crm-campaign-attribution article{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #edf1f5}.crm-campaign-dialog{width:min(820px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}.crm-campaign-dialog>form{display:grid;gap:14px}.crm-campaign-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.crm-campaign-dialog fieldset{border:1px solid #dce4eb;border-radius:10px;padding:12px}.crm-campaign-form-checks{display:grid;gap:8px;margin:10px 0}.crm-campaign-form-checks label{display:flex;gap:9px;padding:9px;border:1px solid #e2e8f0;border-radius:8px}.crm-campaign-form-checks span,.crm-campaign-form-checks small{display:block}.crm-campaign-meta{padding:14px;border-radius:10px;background:#f7f9fb}.crm-campaign-meta h3{margin-top:0}
@media(max-width:1000px){.crm-campaign-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-campaign-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.crm-campaign-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.crm-campaign-table{display:none}.crm-campaign-cards{display:grid;gap:12px}.crm-campaign-filters,.crm-campaign-form-grid,.crm-campaign-overview{grid-template-columns:1fr}.crm-campaign-filters .btn{width:100%}.crm-campaign-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-campaign-dialog{width:calc(100vw - 18px);max-height:calc(100vh - 18px)}.crm-campaign-card dl{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* PlusCRM Campaigns — approved compact campaign-management workspace */
.crm-campaigns-workspace{min-width:0;overflow-x:hidden}.crm-campaign-list-panel{padding:0;overflow:hidden;border-color:#dce5f0;box-shadow:0 5px 18px rgba(28,55,90,.045)}
.crm-campaign-page-head{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;align-items:center;gap:24px;padding:26px 22px;border-bottom:1px solid #e2e8f0}.crm-campaign-page-head>div{position:relative;padding-left:18px}.crm-campaign-page-head>div::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;border-radius:999px;background:#2563eb}.crm-campaign-page-head h1{margin:0;color:#10213b;font-size:25px;line-height:1.15}.crm-campaign-page-head p{margin:7px 0 0;color:#60718a;font-size:13px}.crm-campaign-page-head>.btn{min-height:44px;white-space:nowrap}
.crm-campaign-summary{display:grid;grid-template-columns:repeat(4,minmax(126px,1fr));gap:10px}.crm-campaign-summary-card{min-height:66px;display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid #dce5f0;border-radius:10px;background:#fff}.crm-campaign-summary-card>i{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border-radius:50%;background:#eef4ff;color:#2563eb}.crm-campaign-summary-card>i .nav-icon{width:17px;height:17px}.crm-campaign-summary-card>span{display:grid;gap:2px}.crm-campaign-summary-card strong{font-size:17px;line-height:1;color:#13243f}.crm-campaign-summary-card small{font-size:10px;line-height:1.2;color:#40536f;white-space:nowrap}.crm-campaign-summary-card.active>i{background:#e8f8ee;color:#159447}.crm-campaign-summary-card.paused>i{background:#fff5e5;color:#c87505}.crm-campaign-summary-card.completed>i{background:#ffeded;color:#d83232}
.crm-campaign-list-panel .crm-campaign-filters{display:grid;grid-template-columns:minmax(160px,1fr) 104px 112px 120px 112px 112px auto auto;gap:8px;align-items:center;margin:0;padding:20px 22px;border-bottom:1px solid #e2e8f0}.crm-campaign-filters label{position:relative;min-width:0}.crm-campaign-filters :is(input,select){width:100%;height:44px;min-width:0;border-color:#d6e0ed;border-radius:8px;background-color:#fff;color:#263b59;font-size:12px;font-weight:600}.crm-campaign-search>.nav-icon{position:absolute;z-index:1;left:13px;top:50%;width:17px;height:17px;transform:translateY(-50%);color:#617692}.crm-campaign-search input{padding-left:40px;font-weight:500}.crm-campaign-date>span{position:absolute;z-index:1;left:9px;top:50%;transform:translateY(-50%);color:#64748b;font-size:9px;font-weight:700;pointer-events:none}.crm-campaign-date input{padding:0 5px 0 34px;font-size:10px}.crm-campaign-filters>.btn{height:44px;min-height:44px;padding-inline:11px;white-space:nowrap}.crm-campaign-filters>.btn .nav-icon{width:15px;height:15px}.crm-campaign-reset{gap:5px}
.crm-campaign-table{margin:18px 22px 0;border:1px solid #dce5ef;border-radius:10px;overflow-x:hidden;min-width:0}.crm-campaign-table table{width:100%;min-width:0!important;max-width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.crm-campaign-table th,.crm-campaign-table td{box-sizing:border-box;min-width:0!important;padding:12px 8px;border-bottom:1px solid #e1e7ef;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}.crm-campaign-table th{height:43px;background:#f5f8fc;color:#354a67;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.02em;white-space:nowrap}.crm-campaign-table td{height:70px;color:#17304f;font-size:11.5px}.crm-campaign-table tbody tr:hover{background:#f9fbff}.crm-campaign-table th:nth-child(1){width:25%}.crm-campaign-table th:nth-child(2){width:11%}.crm-campaign-table th:nth-child(3){width:8%}.crm-campaign-table th:nth-child(4){width:11%}.crm-campaign-table th:nth-child(5){width:7%}.crm-campaign-table th:nth-child(6){width:14%}.crm-campaign-table th:nth-child(7),.crm-campaign-table th:nth-child(8){width:9%}.crm-campaign-table th:nth-child(9){width:6%;text-align:center}.crm-campaign-name-cell{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px}.crm-campaign-row-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#edf4ff;color:#2563eb}.crm-campaign-row-icon .nav-icon{width:16px;height:16px}.crm-campaign-name-cell>span:last-child{min-width:0}.crm-campaign-name-cell .link-button{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:#075bd8}.crm-campaign-name-cell .link-button strong{font-size:12px}.crm-campaign-name-cell small{display:block;margin-top:4px;overflow:hidden;color:#60718a;font-size:9.5px;text-overflow:ellipsis;white-space:nowrap}.crm-campaign-name-cell small b{padding:2px 5px;border-radius:5px;background:#eef2f7;color:#40536f;font-weight:700}.crm-campaign-channel,.crm-campaign-manager{display:flex;align-items:center;min-width:0;gap:7px}.crm-campaign-channel>i,.crm-campaign-manager>i{width:28px;height:28px;display:grid;place-items:center;flex:0 0 28px;border-radius:50%;background:#edf4ff;color:#2563eb;font-style:normal;font-size:9px;font-weight:800}.crm-campaign-channel .nav-icon{width:14px;height:14px}.crm-campaign-channel>span,.crm-campaign-manager>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-campaign-manager>i{background:#079447;color:#fff}.crm-campaign-status{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:4px 7px;border-radius:999px;background:#edf2f7;color:#40536f;font-size:9.5px;font-weight:750;text-transform:capitalize;white-space:nowrap}.crm-campaign-status i{width:6px;height:6px;border-radius:50%;background:currentColor}.crm-campaign-status.status-active{background:#e5f7ea;color:#158542}.crm-campaign-status.status-paused{background:#fff3dc;color:#b96a00}.crm-campaign-status.status-completed{background:#e8f1ff;color:#1e61c9}.crm-campaign-status.status-archived{background:#f0f1f4;color:#626b7a}.crm-campaign-budget strong{white-space:nowrap}.crm-campaign-cell-note{display:block;margin-top:4px;color:#64748b;font-size:9px}.crm-campaign-actions{text-align:center;overflow:visible!important}.crm-campaign-actions .erp-action-menu{display:inline-flex}.crm-campaign-actions .erp-action-trigger{width:32px;height:32px;border-radius:8px}.crm-campaign-table footer{display:flex;align-items:center;min-height:54px;padding:0 18px;color:#53667f;font-size:11px}.crm-campaign-table tbody tr:last-child td{border-bottom:1px solid #e1e7ef}
.crm-campaign-empty{min-height:240px;display:grid;place-items:center;align-content:center;gap:8px;margin:18px 22px;padding:24px;border:1px dashed #cad6e5;border-radius:10px;text-align:center}.crm-campaign-empty>.nav-icon{width:34px;height:34px;color:#8aa9d7}.crm-campaign-empty strong{color:#10213b;font-size:17px}.crm-campaign-empty p{margin:0 0 6px;color:#64748b;font-size:12px}.crm-campaign-about{display:flex;align-items:center;gap:10px;margin:18px 22px 22px;padding:13px 15px;border:1px solid #cfe0ff;border-radius:9px;background:#f3f7ff;color:#1e5fc5}.crm-campaign-about>.nav-icon{flex:0 0 18px}.crm-campaign-about>span{display:grid;gap:3px}.crm-campaign-about strong{color:#213956;font-size:11px}.crm-campaign-about small{color:#526a8b;font-size:10px}
@media(max-width:1300px){.crm-campaign-page-head{grid-template-columns:1fr auto}.crm-campaign-summary{grid-column:1/-1;grid-row:2}.crm-campaign-list-panel .crm-campaign-filters{grid-template-columns:minmax(220px,1fr) repeat(3,minmax(110px,1fr));}.crm-campaign-date,.crm-campaign-filters>.btn{grid-row:2}.crm-campaign-table th:nth-child(7),.crm-campaign-table td:nth-child(7){display:none}.crm-campaign-table th:nth-child(1){width:27%}.crm-campaign-table th:nth-child(2){width:12%}.crm-campaign-table th:nth-child(3){width:9%}.crm-campaign-table th:nth-child(4){width:12%}.crm-campaign-table th:nth-child(5){width:8%}.crm-campaign-table th:nth-child(6){width:17%}.crm-campaign-table th:nth-child(8){width:10%}.crm-campaign-table th:nth-child(9){width:5%}}
@media(max-width:1000px){.crm-campaign-list-panel .crm-campaign-filters{grid-template-columns:2fr repeat(3,1fr)}.crm-campaign-date{grid-row:2}.crm-campaign-filters>.btn{grid-row:2}.crm-campaign-table th:nth-child(4),.crm-campaign-table td:nth-child(4),.crm-campaign-table th:nth-child(8),.crm-campaign-table td:nth-child(8){display:none}.crm-campaign-table th:nth-child(1){width:30%}.crm-campaign-table th:nth-child(2){width:17%}.crm-campaign-table th:nth-child(3){width:13%}.crm-campaign-table th:nth-child(5){width:10%}.crm-campaign-table th:nth-child(6){width:24%}.crm-campaign-table th:nth-child(9){width:6%}}
@media(max-width:700px){.crm-campaign-page-head{display:flex;align-items:flex-start;flex-wrap:wrap;padding:18px 16px;gap:16px}.crm-campaign-page-head>div{width:100%}.crm-campaign-page-head>.btn{margin-left:auto}.crm-campaign-summary{order:3;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.crm-campaign-summary-card{min-width:0}.crm-campaign-list-panel .crm-campaign-filters{grid-template-columns:1fr 1fr;padding:16px;gap:9px}.crm-campaign-search{grid-column:1/-1}.crm-campaign-date,.crm-campaign-filters>.btn{grid-row:auto}.crm-campaign-filters>.btn{width:100%}.crm-campaign-table{display:none}.crm-campaign-cards{display:grid;margin:16px;gap:10px}.crm-campaign-card{padding:13px}.crm-campaign-card dl{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-campaign-about{margin:16px}.crm-campaign-empty{margin:16px}.crm-campaign-page-head h1{font-size:22px}}
@media(max-width:440px){.crm-campaign-list-panel .crm-campaign-filters{grid-template-columns:1fr}.crm-campaign-search{grid-column:auto}.crm-campaign-summary-card{padding:8px}.crm-campaign-page-head>.btn{width:100%}.crm-campaign-reset span{display:inline}}

/* PlusCRM Opportunities — approved compact commercial workspace */
.crm-opportunity-workspace{min-width:0;overflow-x:hidden}.crm-opportunity-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:4px 3px 14px}.crm-opportunity-page-head h1{margin:0;color:#10213b;font-size:24px;line-height:1.2}.crm-opportunity-page-head p{margin:6px 0 0;color:#60718a;font-size:12.5px}.crm-opportunity-page-head>.btn{min-height:44px;white-space:nowrap}
.crm-opportunity-filter-panel{padding:16px;border-color:#dce5f0;box-shadow:0 4px 16px rgba(28,55,90,.04)}.crm-opportunity-filters{display:grid;grid-template-columns:minmax(220px,1fr) 155px 135px 150px 137px 137px auto auto;gap:9px;align-items:center}.crm-opportunity-filters label{position:relative;min-width:0}.crm-opportunity-filters :is(input,select){width:100%;height:43px;min-width:0;border-color:#d6e0ed;border-radius:8px;background-color:#fff;color:#263b59;font-size:11.5px;font-weight:600}.crm-opportunity-search>.nav-icon{position:absolute;z-index:1;left:13px;top:50%;width:16px;height:16px;transform:translateY(-50%);color:#617692}.crm-opportunity-search input{padding-left:39px;font-weight:500}.crm-opportunity-date>span{position:absolute;z-index:1;left:10px;top:50%;transform:translateY(-50%);color:#64748b;font-size:9px;font-weight:750;pointer-events:none}.crm-opportunity-date input{padding-left:42px;font-size:10.5px}.crm-opportunity-filters>.btn{height:43px;min-height:43px;padding-inline:13px;white-space:nowrap}.crm-opportunity-filters>.btn .nav-icon{width:15px;height:15px}
.crm-opportunity-filters>.btn.primary{min-width:78px}
.crm-opportunity-notice{display:flex;align-items:center;gap:9px;min-height:48px;margin:14px 0;padding:0 15px;border:1px solid #cfe0ff;border-radius:9px;background:#f4f8ff;color:#315d9b;font-size:11px}.crm-opportunity-notice>.nav-icon{width:17px;height:17px;flex:0 0 17px;color:#2563eb}
.crm-opportunity-list-panel{padding:0;overflow:hidden;border-color:#dce5f0;box-shadow:0 4px 16px rgba(28,55,90,.04)}.crm-opportunity-list-panel>header{display:flex;align-items:center;min-height:54px;padding:0 16px;border-bottom:1px solid #e0e7f0}.crm-opportunity-list-panel>header h2{margin:0;color:#233955;font-size:13px}.crm-opportunity-list-panel>header h2 span{color:#64748b;font-weight:600}.crm-opportunity-table{overflow:visible}.crm-opportunity-table table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.crm-opportunity-table th,.crm-opportunity-table td{box-sizing:border-box;padding:11px 12px;border-bottom:1px solid #e1e7ef;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}.crm-opportunity-table th{height:43px;background:#f5f8fc;color:#354a67;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.02em;white-space:nowrap}.crm-opportunity-table td{height:68px;color:#17304f;font-size:11.5px}.crm-opportunity-table tbody tr:hover{background:#f9fbff}.crm-opportunity-table th:nth-child(1){width:22%}.crm-opportunity-table th:nth-child(2){width:16%}.crm-opportunity-table th:nth-child(3){width:12%}.crm-opportunity-table th:nth-child(4){width:13%}.crm-opportunity-table th:nth-child(5){width:12%}.crm-opportunity-table th:nth-child(6){width:14%}.crm-opportunity-table th:nth-child(7){width:7%}.crm-opportunity-table th:nth-child(8){width:4%;text-align:center}.crm-opportunity-name-cell .link-button{display:block;max-width:100%;overflow:hidden;color:#075bd8;text-align:left;text-overflow:ellipsis;white-space:nowrap}.crm-opportunity-name-cell .link-button strong{font-size:12px}.crm-opportunity-name-cell small,.crm-opportunity-table td:nth-child(2)>small{display:block;margin-top:4px;overflow:hidden;color:#64748b;font-size:9.5px;text-overflow:ellipsis;white-space:nowrap}.crm-opportunity-stage{display:grid;gap:3px;justify-items:start}.crm-opportunity-stage{font-weight:700}.crm-opportunity-stage small{padding:2px 6px;border-radius:999px;background:#edf4ff;color:#2563eb;font-size:9px}.crm-opportunity-value strong{white-space:nowrap}.crm-opportunity-owner{display:flex;align-items:center;gap:7px;min-width:0}.crm-opportunity-owner>i{width:29px;height:29px;display:grid;place-items:center;flex:0 0 29px;border-radius:50%;background:#079447;color:#fff;font-size:9px;font-style:normal;font-weight:800}.crm-opportunity-owner>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-opportunity-status{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:999px;background:#edf4ff;color:#2563eb;font-size:9.5px;font-weight:750;white-space:nowrap}.crm-opportunity-status i{width:6px;height:6px;border-radius:50%;background:currentColor}.crm-opportunity-status.status-won{background:#e5f7ea;color:#158542}.crm-opportunity-status.status-lost{background:#ffeded;color:#c82e2e}.crm-opportunity-actions{text-align:center;overflow:visible!important}.crm-opportunity-actions .erp-action-menu{display:inline-flex}.crm-opportunity-actions .erp-action-trigger{width:32px;height:32px;border-radius:8px}
.crm-opportunity-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:58px;padding:0 16px;color:#53667f;font-size:10.5px}.crm-opportunity-footer>div{display:flex;align-items:center;gap:7px}.crm-opportunity-footer select{height:38px;min-width:112px;border-radius:8px}.crm-opportunity-footer .btn{width:38px;height:38px;min-height:38px;padding:0}.crm-opportunity-footer>div>strong{width:34px;height:34px;display:grid;place-items:center;border-radius:7px;background:#2563eb;color:#fff}.crm-opportunity-empty{min-height:300px;display:grid;place-items:center;align-content:center;gap:9px;padding:28px;text-align:center}.crm-opportunity-empty>.nav-icon{width:46px;height:46px;color:#a7b5c8}.crm-opportunity-empty strong{color:#10213b;font-size:17px}.crm-opportunity-empty p{margin:0 0 7px;color:#64748b;font-size:12px}
@media(max-width:1180px){.crm-opportunity-filters{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(125px,1fr))}.crm-opportunity-date,.crm-opportunity-filters>.btn{grid-row:2}.crm-opportunity-table th:nth-child(2),.crm-opportunity-table td:nth-child(2){display:none}.crm-opportunity-table th:nth-child(1){width:27%}.crm-opportunity-table th:nth-child(3){width:14%}.crm-opportunity-table th:nth-child(4){width:16%}.crm-opportunity-table th:nth-child(5){width:14%}.crm-opportunity-table th:nth-child(6){width:17%}.crm-opportunity-table th:nth-child(7){width:8%}.crm-opportunity-table th:nth-child(8){width:4%}}
@media(max-width:800px){.crm-opportunity-page-head{align-items:flex-start}.crm-opportunity-filters{grid-template-columns:1fr 1fr}.crm-opportunity-search{grid-column:1/-1}.crm-opportunity-date,.crm-opportunity-filters>.btn{grid-row:auto}.crm-opportunity-filters>.btn{width:100%}.crm-opportunity-footer{align-items:flex-start;flex-direction:column;padding-block:12px}.crm-opportunity-footer>div{width:100%;justify-content:flex-end}}
@media(max-width:700px){.crm-opportunity-page-head{flex-wrap:wrap}.crm-opportunity-page-head>div{width:100%}.crm-opportunity-page-head>.btn{margin-left:auto}.crm-opportunity-filter-panel{padding:12px}.crm-opportunity-table{padding:10px;background:#f6f8fb;overflow:visible}.crm-opportunity-table table,.crm-opportunity-table tbody,.crm-opportunity-table tr{display:block;width:100%}.crm-opportunity-table thead{display:none}.crm-opportunity-table tr{margin-bottom:10px;padding:12px;border:1px solid #dce5ef;border-radius:10px;background:#fff}.crm-opportunity-table td,.crm-opportunity-table td:nth-child(2){display:grid!important;grid-template-columns:98px minmax(0,1fr);align-items:center;width:100%;height:auto;min-height:36px;padding:7px 0;border:0;white-space:normal;overflow:visible}.crm-opportunity-table td::before{color:#64748b;font-size:9px;font-weight:800;text-transform:uppercase}.crm-opportunity-table td:nth-child(1){display:block!important;padding-bottom:10px;border-bottom:1px solid #edf1f5}.crm-opportunity-table td:nth-child(1)::before{display:none}.crm-opportunity-table td:nth-child(2)::before{content:"Customer"}.crm-opportunity-table td:nth-child(3)::before{content:"Stage"}.crm-opportunity-table td:nth-child(4)::before{content:"Value"}.crm-opportunity-table td:nth-child(5)::before{content:"Expected Close"}.crm-opportunity-table td:nth-child(6)::before{content:"Owner"}.crm-opportunity-table td:nth-child(7)::before{content:"Status"}.crm-opportunity-table td:nth-child(8)::before{content:"Actions"}.crm-opportunity-actions{text-align:left}.crm-opportunity-actions .erp-action-menu{justify-self:start}}
@media(max-width:440px){.crm-opportunity-filters{grid-template-columns:1fr}.crm-opportunity-search{grid-column:auto}.crm-opportunity-page-head>.btn{width:100%}.crm-opportunity-footer>div{justify-content:space-between}.crm-opportunity-footer select{min-width:105px}}

/* Global Task Management */
.task-workspace{display:grid;gap:14px;min-width:0}.task-workspace>.global-workspace-head{margin-bottom:0}.task-scope-nav{display:flex;align-items:center;gap:6px;padding:6px;background:#fff;border:1px solid #e2e8f0;border-radius:10px}.task-scope-nav button{border:0;background:transparent;padding:9px 14px;border-radius:7px;color:#475569;font-weight:700;cursor:pointer}.task-scope-nav button.active{background:#eaf2ff;color:#175cd3}.task-notifications{position:absolute;right:28px;top:96px;z-index:12}.task-notifications>summary{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #d9e1eb;border-radius:8px;padding:8px 11px;cursor:pointer;list-style:none}.task-notifications>summary svg{width:17px}.task-notifications>summary b{background:#d92d20;color:#fff;border-radius:10px;padding:1px 6px}.task-notifications>div{position:absolute;right:0;width:320px;max-height:360px;overflow:auto;background:#fff;border:1px solid #d9e1eb;border-radius:10px;box-shadow:0 14px 36px #0f172a24;padding:7px}.task-notifications>div button{display:grid;width:100%;text-align:left;border:0;background:transparent;padding:9px;border-radius:7px}.task-notifications>div button:hover{background:#f1f5f9}.task-notifications small{display:block;color:#64748b;margin-top:3px}.task-quick-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.task-quick-filters button{display:flex;align-items:center;gap:10px;border:1px solid #dce4ee;background:#fff;border-radius:10px;padding:12px;text-align:left;cursor:pointer}.task-quick-filters button.active{border-color:#3b82f6;background:#eff6ff}.task-quick-filters strong{font-size:22px;color:#0f172a}.task-quick-filters span{font-weight:700;color:#475569}.task-filters{display:grid;grid-template-columns:minmax(210px,2fr) minmax(135px,1fr) minmax(135px,1fr) auto auto auto;gap:10px;align-items:end;margin:14px 0}.task-filters label,.task-form-grid label,.task-dialog>form>label{display:grid;gap:5px;font-weight:700;color:#344054}.task-filters input,.task-filters select,.task-form-grid input,.task-form-grid select,.task-dialog textarea,.task-dialog>form>label input{width:100%}.task-filters details{position:relative}.task-filters details>summary{padding:9px 11px;border:1px solid #d0d5dd;border-radius:7px;cursor:pointer}.task-filters details>div{position:absolute;right:0;top:44px;z-index:8;width:430px;padding:12px;background:#fff;border:1px solid #d9e1eb;border-radius:9px;box-shadow:0 12px 30px #0f172a1f;display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px}.task-table .link-button{display:grid;text-align:left}.task-table .link-button small{color:#667085}.task-cards{display:none}.task-due{font-weight:700;color:#475569}.task-due.overdue{color:#b42318}.task-due.today{color:#b54708}.task-due.completed{color:#027a48}.task-detail{display:grid;gap:18px}.task-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.task-detail-grid>section{border:1px solid #e4e7ec;border-radius:10px;padding:14px}.task-detail-grid h3,.task-history h3{margin:0 0 10px}.task-detail-grid dl{display:grid;gap:8px;margin:0}.task-detail-grid dl>div{display:grid;grid-template-columns:130px 1fr;gap:10px}.task-detail-grid dt{color:#667085}.task-detail-grid dd{margin:0;font-weight:700;min-width:0}.task-history{border-top:1px solid #e4e7ec;padding-top:14px}.task-history article{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #f0f2f5}.task-history article strong{text-transform:capitalize}.task-history article small{color:#667085}.task-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}.task-dialog.compact{width:min(520px,calc(100vw - 32px))}.task-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.task-dialog fieldset{border:1px solid #dce4ee;border-radius:9px;margin:12px 0;padding:12px}.task-dialog legend{font-weight:800;padding:0 6px}.task-related-results{display:grid;gap:4px;margin-top:8px}.task-related-results button{border:1px solid #dce4ee;background:#fff;border-radius:6px;padding:8px;text-align:left}.global-task-context .panel-head>div:last-child{display:flex;gap:7px}.task-context-list{display:grid;gap:6px;margin-top:9px}.task-context-list button{display:flex;justify-content:space-between;gap:12px;border:1px solid #e4e7ec;background:#fff;border-radius:8px;padding:9px;text-align:left}.task-context-list span,.task-context-list small{display:grid;gap:3px}.task-context-list small{color:#667085}
@media(max-width:900px){.task-filters{grid-template-columns:1fr 1fr}.task-filters details>div{left:0;right:auto;grid-template-columns:1fr;width:min(430px,calc(100vw - 64px))}.task-notifications{right:18px}.task-detail-grid{grid-template-columns:1fr}}
@media(max-width:600px){.task-workspace{gap:10px}.task-scope-nav{overflow-x:auto}.task-scope-nav button{white-space:nowrap;padding:8px 10px}.task-notifications{position:relative;right:auto;top:auto;justify-self:end;margin-top:-62px}.task-notifications>div{width:min(330px,calc(100vw - 38px))}.task-quick-filters{grid-template-columns:1fr 1fr}.task-filters{grid-template-columns:1fr}.task-filters details>div{width:calc(100vw - 54px)}.task-table{display:none}.task-cards{display:grid;gap:9px}.task-card{display:grid;gap:8px;border:1px solid #e4e7ec;border-radius:10px;padding:12px}.task-card header{display:flex;justify-content:space-between;gap:10px}.task-card .link-button{display:grid;text-align:left}.task-card small{color:#667085}.task-form-grid{grid-template-columns:1fr}.task-dialog{width:calc(100vw - 20px);max-height:calc(100vh - 20px)}.task-detail .panel-head{align-items:flex-start}.task-detail .panel-head>div:last-child{display:flex;flex-wrap:wrap}.task-detail-grid dl>div{grid-template-columns:110px 1fr}.task-history article,.task-context-list button{display:grid}.global-task-context .panel-head{align-items:flex-start}.global-task-context .panel-head>div:last-child{flex-wrap:wrap}}

.task-table table{width:100%;min-width:900px;table-layout:fixed}.task-table th:nth-child(1){width:24%}.task-table th:nth-child(2),.task-table th:nth-child(3){width:10%}.task-table th:nth-child(4){width:14%}.task-table th:nth-child(5){width:14%}.task-table th:nth-child(6){width:20%}.task-table th:nth-child(7){width:8%}.task-table td{overflow:hidden;text-overflow:ellipsis}

/* PlusCRM Phase 2B.1: compact, scoped Lead conversion workflow. */
.crm-dialog:has(#crmConvertForm){width:min(780px,calc(100vw - 24px));max-height:calc(100vh - 24px);height:auto;overflow:auto}.crm-dialog .crm-conversion-form{display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0;max-height:none;overflow:visible;padding-right:0}.crm-conversion-form>*{grid-column:1/-1;min-width:0}.crm-conversion-form fieldset{margin:14px 0 0;padding:14px;border:1px solid #dbe4ee;border-radius:10px;background:#fbfdff}.crm-conversion-form legend{padding:0 6px;font-size:13px;font-weight:700;color:#29445f}.crm-conversion-form fieldset>label,.crm-conversion-form fieldset>div>label{display:grid;gap:6px;margin-top:10px}.crm-conversion-form [data-conversion-new-customer],.crm-conversion-form [data-conversion-new-contact]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}.crm-conversion-warning{display:grid;gap:7px;margin:12px 0;padding:12px;border:1px solid #f0c36a;border-radius:9px;background:#fff9e9;color:#684b0d}.crm-conversion-warning button{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid #ead18e;border-radius:7px;background:#fff;text-align:left;color:inherit}.crm-conversion-warning small{font-weight:500}.crm-conversion-review dl,.crm-conversion-summary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;margin:10px 0}.crm-conversion-review dl>div,.crm-conversion-summary dl>div{display:grid;gap:3px}.crm-conversion-review dt,.crm-conversion-summary dt{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#64748b}.crm-conversion-review dd,.crm-conversion-summary dd{margin:0;color:#172b3f}.crm-conversion-review dd small,.crm-conversion-summary dd small{display:block;color:#64748b}.crm-conversion-confirm,.crm-conversion-conflict{grid-column:1/-1;display:flex!important;grid-template-columns:auto 1fr!important;align-items:flex-start;gap:9px!important;padding:10px;border-radius:8px;background:#eef6ff}.crm-conversion-confirm input,.crm-conversion-conflict input{width:auto;margin-top:2px}.crm-conversion-summary{grid-column:1/-1;border-left:4px solid #22a06b;background:linear-gradient(135deg,#f3fff9,#fff)}.crm-conversion-summary>div{display:flex;align-items:center;gap:10px}.crm-conversion-summary>p{margin:8px 0 0;color:#526273}
@media(max-width:640px){.crm-conversion-form{width:calc(100vw - 24px);max-height:88vh}.crm-conversion-form [data-conversion-new-customer],.crm-conversion-form [data-conversion-new-contact],.crm-conversion-review dl,.crm-conversion-summary dl{grid-template-columns:1fr}.crm-conversion-form fieldset{padding:11px}}
.crm-website-source{min-width:0}.crm-website-source dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.crm-website-source dl>div{min-width:0}.crm-website-source dd{overflow-wrap:anywhere}.crm-website-documents{margin-bottom:16px}.crm-website-documents>article{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--border,#dbe3ee)}.crm-website-documents>article:last-child{border-bottom:0}.crm-website-documents article>div{display:grid;min-width:0}.crm-website-documents strong,.crm-website-documents small{overflow-wrap:anywhere}.crm-website-activity>span{font-weight:700}@media(max-width:720px){.crm-website-documents>article{align-items:flex-start;flex-direction:column}.crm-website-documents .btn{width:100%}}
/* Group reporting is a separate read-only workspace, never a tenant selector mode. */
.group-dashboard { min-width: 0; }
.group-dashboard-context { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: 1rem 1.25rem; margin-bottom: 1rem; border: 1px solid #c8dcff; border-left: 4px solid #2563eb; border-radius: 12px; background: #f1f6ff; }
.group-dashboard-context strong { color: #12366d; }
.group-dashboard-context span, .group-dashboard-note { color: #52647c; }
.group-dashboard-period { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin-bottom: 1rem; }
.group-dashboard-period label { display: grid; gap: .3rem; font-weight: 600; }
.group-dashboard-period input { min-width: 0; }
.group-dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.group-dashboard-kpi { min-width: 0; display: grid; gap: .35rem; padding: 1rem; background: #fff; border: 1px solid #d7e3f5; border-radius: 12px; }
.group-dashboard-kpi span, .group-dashboard-kpi small { color: #586a84; }
.group-dashboard-kpi strong { overflow-wrap: anywhere; font-size: clamp(1.05rem, 1.7vw, 1.5rem); color: #102341; }
.group-dashboard-comparison { min-width: 0; }
.group-dashboard-comparison h2 { margin-bottom: .75rem; }
.group-dashboard-table-wrap { max-width: 100%; overflow-x: auto; }
.group-dashboard-table-wrap table { width: 100%; border-collapse: collapse; }
.group-dashboard-table-wrap th, .group-dashboard-table-wrap td { padding: .75rem; border-bottom: 1px solid #e1e9f5; text-align: right; white-space: nowrap; }
.group-dashboard-table-wrap th:first-child { text-align: left; }
.group-dashboard-table-wrap th small { display: block; margin-top: .2rem; font-weight: 400; color: #64748b; }
.group-dashboard-total { background: #edf4ff; font-weight: 700; }
.group-dashboard-note { margin: .85rem 0; font-size: .9rem; }
.group-dashboard-loading { padding: 2rem; }
@media (max-width: 900px) { .group-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .group-dashboard-kpis { grid-template-columns: 1fr; } .group-dashboard-period label { flex: 1 1 100%; } .group-dashboard-period input { width: 100%; } .group-dashboard-period .btn { flex: 1 1 calc(50% - .75rem); } }

/* Currency settings: keep the complete five-column register within its panel. */
.currency-settings-panel { min-width: 0; }
.currency-settings-panel > .panel-head { justify-content: flex-start; align-items: center; }
.currency-settings-panel > .panel-head > div:first-child { flex: 1 1 auto; min-width: 0; text-align: left; }
.currency-settings-panel > .panel-head > .topbar-actions { flex: 0 0 auto; margin-left: auto; }
.currency-settings-panel > .toolbar { min-width: 0; }
.currency-settings-panel > .toolbar .table-head { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; justify-content: flex-start; text-align: left; }
.currency-settings-panel > .toolbar .table-head h2 { margin: 0; }
.currency-settings-panel > .toolbar .filters { display: flex; flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; justify-content: flex-end; }
.currency-settings-panel > .toolbar .filters .btn { flex: 0 0 auto; width: auto; }
.currency-settings-panel > .toolbar .filters input { width: min(250px, 30vw); min-width: 0; }
.currency-settings-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
.currency-settings-table-wrap > .currency-settings-table { width: 100%; max-width: 100%; min-width: 0 !important; table-layout: fixed; }
.currency-settings-table th, .currency-settings-table td { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.currency-settings-table th:nth-child(1) { width: 18%; }
.currency-settings-table th:nth-child(2) { width: 18%; }
.currency-settings-table th:nth-child(3) { width: 22%; }
.currency-settings-table th:nth-child(4) { width: 18%; }
.currency-settings-table th:nth-child(5) { width: 24%; }
.currency-settings-table td:last-child .row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
@media (max-width: 720px) {
  .currency-settings-panel > .panel-head, .currency-settings-panel > .toolbar { flex-wrap: wrap; }
  .currency-settings-panel > .panel-head > div:first-child { flex-basis: calc(100% - 6px); }
  .currency-settings-panel > .toolbar .filters { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .currency-settings-panel > .toolbar .filters input { flex: 1 1 140px; width: auto; }
  .currency-settings-table th, .currency-settings-table td { padding: 8px 5px; font-size: 11px; }
}

/* One compact pager for retrieved PlusERP record collections. */
.global-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; min-width: 0; padding: 12px 14px; border-top: 1px solid #d9e3f2; background: #fff; color: #45556f; font-size: 13px; }
.global-pagination-range { min-width: 0; }
.global-pagination nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.global-pagination button { min-width: 32px; min-height: 32px; border: 1px solid #d4e0f1; border-radius: 7px; padding: 4px 8px; background: #fff; color: #24364f; font: inherit; cursor: pointer; }
.global-pagination button.active { background: #1d5eea; border-color: #1d5eea; color: #fff; font-weight: 700; }
.global-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.global-pagination button:focus-visible, .global-pagination select:focus-visible { outline: 3px solid #80aaff; outline-offset: 2px; }
.global-pagination-ellipsis { padding: 0 4px; }
.global-pagination-size select { min-height: 32px; border: 1px solid #d4e0f1; border-radius: 7px; padding: 3px 26px 3px 8px; background: #fff; color: #24364f; font: inherit; }
.company-pagination:has(> .global-pagination) { display: block; padding: 0; }
@media (max-width: 600px) {
  .global-pagination { justify-content: center; padding: 10px; }
  .global-pagination-range { flex: 1 0 100%; text-align: center; }
  .global-pagination nav { order: 2; flex: 1 1 100%; }
  .global-pagination-size { order: 3; }
  .global-pagination button { min-width: 30px; }
}
@media (max-width: 700px) {
  html:has(.global-pagination), body:has(.global-pagination) { height: auto !important; min-height: 100vh !important; overflow-y: auto !important; overflow-x: hidden !important; }
  body:has(.global-pagination) .app-shell,
  body:has(.global-pagination) .app-shell > .content,
  body:has(.global-pagination) .page { height: auto !important; max-height: none !important; min-height: 0 !important; overflow-y: visible !important; }
}
.inventory-register-export{display:flex;justify-content:flex-end;padding:10px 14px}
@media screen and (max-width: 420px) {
  .vendor-register {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  .vendor-register .customer-register-hero,
  .vendor-register .customer-register-hero > div {
    min-width: 0;
    max-width: 100%;
  }

  .vendor-register .customer-register-hero .customer-register-actions {
    box-sizing: border-box;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .vendor-register .customer-register-hero .customer-register-actions .btn {
    box-sizing: border-box;
    flex: 1 1 100%;
    min-width: 0;
  }
}

.backup-page .backup-policy{margin:16px 0;padding:14px;border:1px solid #dbe4ef;border-radius:8px}.backup-policy fieldset{border:0;margin:0;padding:0;min-width:0}.backup-policy-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:start;margin-bottom:12px}.backup-policy-grid label{min-width:0}.backup-policy-grid input{width:100%;min-width:0}.backup-policy-grid .backup-policy-toggle{display:flex;gap:8px;align-items:center}.backup-policy-toggle input{width:18px;height:18px;min-height:18px;flex:none}.backup-page .backup-advanced{margin:12px 0;overflow-wrap:anywhere}.backup-history-row strong{overflow-wrap:anywhere}@media(max-width:800px){.backup-policy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.backup-policy-grid{grid-template-columns:minmax(0,1fr)}.backup-page .backup-status-lines{display:block}}
