.dealer-workspace {
  --dw-radius:14px;
  display:grid;
  gap:20px;
  max-width:1560px;
  margin:0 auto
}
.dealer-workspace button,.dealer-workspace input,.dealer-workspace select {
  font:inherit
}
.dealer-workspace button:focus-visible,.dealer-workspace summary:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:3px
}
.dw-heading,.dw-section-heading,.dw-dialog-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}
.dw-heading h2 {
  font-size:28px;
  letter-spacing:-.8px;
  margin:3px 0 8px
}
.dw-heading p:not(.dw-eyebrow),.dw-section-heading p {
  font-size:13px;
  color:var(--muted);
  line-height:1.6
}
.dw-eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--accent-text)
}
.dw-stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px
}
.dw-stats>div,.dw-stats>button {
  display:grid;
  gap:8px;
  padding:18px 20px;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:var(--dw-radius);
  text-align:left;
  color:var(--text)
}
.dw-stats>button {
  cursor:pointer
}
.dw-stats>button:hover {
  border-color:var(--accent)
}
.dw-stats span {
  font-size:12px;
  font-weight:600
}
.dw-stats strong {
  font-size:27px;
  letter-spacing:-.7px;
  line-height:1.15
}
.dw-stats small {
  font-size:11px;
  color:var(--muted);
  line-height:1.45
}
.dw-stats .dw-alert {
  border-left:3px solid var(--bad)
}
.dw-alert strong {
  color:var(--bad)
}
.dw-tabs,.dw-filters {
  display:flex;
  flex-wrap:wrap;
  gap:5px
}
.dw-tabs {
  border-bottom:1px solid var(--border);
  padding-bottom:10px
}
.dw-tabs button,.dw-filters button {
  border:1px solid transparent;
  background:transparent;
  border-radius:8px;
  padding:10px 14px;
  cursor:pointer;
  color:var(--muted);
  font-weight:600;
  font-size:12px
}
.dw-tabs button[aria-pressed=true] {
  color:var(--accent-text);
  background:var(--accent-soft);
  border-color:var(--accent-border)
}
.dw-filters {
  margin:14px 0
}
.dw-filters button {
  background:var(--surface);
  border-color:var(--border)
}
.dw-filters button[aria-pressed=true] {
  background:var(--text);
  color:var(--surface);
  border-color:var(--text)
}
.dw-toolbar {
  display:flex;
  gap:14px;
  align-items:end
}
.dw-toolbar label,.dw-reference label {
  display:grid;
  gap:7px;
  color:var(--text-3);
  font-size:11px;
  font-weight:600
}
.dw-search {
  flex:1
}
.dw-toolbar input {
  max-width:480px
}
.dw-toolbar input,.dw-toolbar select {
  min-height:42px;
  background:var(--surface);
  border:1px solid var(--border-strong);
  border-radius:8px;
  padding:10px 12px;
  width:100%;
  font-size:13px
}
.dw-toolbar>label:last-child {
  min-width:190px
}
.dw-note {
  font-size:12px;
  color:var(--muted);
  line-height:1.55
}
.dw-result-count {
  font-size:11px;
  color:var(--muted);
  margin:16px 0 8px
}
.dw-order-list {
  border:1px solid var(--border);
  border-radius:var(--dw-radius);
  overflow:hidden;
  background:var(--surface)
}
.dw-order {
  display:grid;
  grid-template-columns:minmax(180px,1.5fr) minmax(145px,1fr) 115px minmax(150px,auto);
  gap:20px;
  align-items:center;
  padding:20px;
  border-bottom:1px solid var(--border)
}
.dw-order:last-child {
  border-bottom:0
}
.dw-order-main {
  min-width:0
}
.dw-status {
  display:table;
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  margin-bottom:8px;
  border-radius:5px;
  padding:3px 7px;
  background:var(--surface-3);
  color:var(--muted)
}
.dw-status-late {
  color:var(--bad);
  background:rgba(220,38,38,.08)
}
.dw-status-upcoming,.dw-status-open {
  color:var(--accent-text);
  background:var(--accent-soft)
}
.dw-status-done {
  color:var(--good);
  background:rgba(5,150,105,.08)
}
.dw-status-undated {
  color:var(--warn);
  background:rgba(180,83,9,.08)
}
.dw-account-link,.dw-link {
  border:0;
  background:none;
  color:var(--accent-text);
  cursor:pointer;
  text-align:left
}
.dw-account-link {
  font-size:14px!important;
  font-weight:700!important;
  color:var(--text);
  line-height:1.4
}
.dw-account-link:hover,.dw-link:hover {
  text-decoration:underline
}
.dw-order-main p {
  font-size:12px;
  margin-top:5px;
  line-height:1.5
}
.dw-order-main p span {
  color:var(--muted)
}
.dw-order-date,.dw-order-amount {
  display:grid;
  gap:6px
}
.dw-order-date span,.dw-order-date small,.dw-order-amount small {
  font-size:11px;
  color:var(--muted)
}
.dw-order-date strong {
  font-size:12px;
  font-weight:500
}
.dw-order-amount strong {
  font-size:14px;
  white-space:nowrap
}
.dw-order-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  justify-content:end
}
.dw-order-actions .btn {
  font-size:11px;
  padding:9px 11px;
  min-height:36px
}
.dealer-workspace button:disabled {
  opacity:.55;
  cursor:wait
}
.dw-empty {
  padding:44px 24px;
  text-align:center;
  background:var(--surface);
  border:1px dashed var(--border-strong);
  border-radius:14px;
  color:var(--muted);
  font-size:13px
}
.dw-empty h3 {
  font-size:16px;
  color:var(--text);
  margin-bottom:9px
}
.dw-warning {
  padding:14px 18px;
  border:1px solid rgba(180,83,9,.25);
  border-radius:10px;
  color:var(--warn);
  background:rgba(180,83,9,.06);
  font-size:13px
}
.dw-section-heading {
  margin-bottom:18px
}
.dw-section-heading h3 {
  font-size:17px;
  margin-bottom:6px
}
.dw-section-heading>span {
  font-size:12px;
  color:var(--muted)
}
.dw-account-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:14px
}
.dw-account-card {
  display:grid;
  gap:12px;
  text-align:left;
  padding:22px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  cursor:pointer;
  color:var(--text)
}
.dw-account-card:hover {
  border-color:var(--accent)
}
.dw-account-card strong {
  font-size:15px
}
.dw-account-card span,.dw-account-card small {
  font-size:12px;
  color:var(--muted)
}
.dw-account-card .dw-link {
  color:var(--accent-text);
  display:flex;
  align-items:center;
  gap:6px
}
.dw-flags {
  margin-top:22px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface)
}
.dw-flags summary {
  padding:17px 20px;
  cursor:pointer;
  font-size:13px;
  font-weight:600
}
.dw-flags summary span {
  font-weight:400;
  color:var(--muted);
  margin-left:8px
}
.dw-flags article {
  padding:15px 20px;
  border-top:1px solid var(--border);
  font-size:12px
}
.dw-flags article span {
  margin-left:12px
}
.dw-flags article p {
  margin-top:8px;
  line-height:1.6;
  color:var(--text-3)
}
.dw-performance-grid {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);
  gap:18px
}
.dw-map {
  position:relative;
  margin-top:14px
}
.dw-map-tip {
  display:none;
  position:absolute;
  pointer-events:none;
  background:var(--surface);
  padding:10px;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:var(--shadow-lg);
  font-size:12px;
  z-index:1
}
.dw-territory-key {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  font-size:11px
}
.dw-territory-key div {
  display:grid;
  gap:5px
}
.dw-territory-key span {
  color:var(--muted);
  line-height:1.6
}
.dw-reps {
  display:grid;
  gap:12px;
  align-content:start
}
.dw-reps h3 {
  font-size:15px
}
.dw-reps .dw-section-heading {
  margin-bottom:10px
}
.dw-reps .card p {
  font-size:12px;
  line-height:1.6
}
.dw-reps .card .dw-note {
  margin-top:10px
}
.dw-product-mix {
  margin-top:18px
}
.dw-product-mix h3 {
  font-size:16px;
  margin-bottom:8px
}
.dw-table-scroll {
  overflow:auto;
  margin-top:14px
}
.dw-dialog {
  width:min(780px,calc(100% - 32px));
  max-height:90dvh;
  margin:auto;
  border:1px solid var(--border);
  border-radius:18px;
  padding:0;
  color:var(--text);
  background:var(--surface);
  box-shadow:var(--shadow-lg)
}
.dw-dialog::backdrop {
  background:rgba(15,27,45,.4)
}
.dw-dialog-head {
  padding:24px 28px;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  background:var(--surface);
  z-index:2
}
.dw-dialog-head h2 {
  font-size:22px;
  margin-top:5px
}
.dw-dialog-body {
  padding:24px 28px
}
.dw-dialog-body>h3 {
  margin:24px 0 14px;
  font-size:16px
}
.dw-account-facts {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px
}
.dw-account-facts dt {
  font-size:11px;
  color:var(--muted);
  margin-bottom:7px
}
.dw-account-facts dd {
  font-size:13px
}
.dw-account-order {
  padding:20px;
  border:1px solid var(--border);
  border-radius:12px;
  margin-top:12px
}
.dw-account-order .dw-section-heading {
  margin-bottom:12px
}
.dw-account-order p {
  font-size:12px;
  line-height:1.6
}
.dw-account-order .dw-order-actions {
  margin-top:16px;
  justify-content:start
}
.dw-reference {
  display:flex;
  align-items:end;
  gap:10px;
  border-top:1px solid var(--border);
  margin-top:16px;
  padding-top:16px
}
.dw-reference label {
  flex:1
}
.dw-reference .btn {
  min-height:39px;
  font-size:11px
}
.dw-loading {
  height:400px
}
@media(max-width:1100px) {
  .dw-order {
    grid-template-columns:minmax(170px,1.4fr) minmax(145px,1fr) 115px
  }
  .dw-order-actions {
    grid-column:1/-1;
    justify-content:start
  }
  .dw-performance-grid {
    grid-template-columns:1fr
  }
  .dw-reps {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .dw-reps>h3 {
    grid-column:1/-1
  }
}
@media(max-width:650px) {
  .dw-heading {
    align-items:start
  }
  .dw-heading h2 {
    font-size:24px
  }
  .dw-heading>.btn {
    padding:9px
  }
  .dw-stats {
    grid-template-columns:1fr 1fr;
    gap:8px
  }
  .dw-stats>div,.dw-stats>button {
    padding:14px
  }
  .dw-stats strong {
    font-size:23px
  }
  .dw-stats small {
    font-size:10px
  }
  .dw-toolbar {
    align-items:stretch;
    flex-direction:column
  }
  .dw-toolbar input {
    max-width:none
  }
  .dw-order {
    grid-template-columns:1fr 110px;
    gap:14px;
    padding:16px
  }
  .dw-order-main {
    grid-column:1/-1
  }
  .dw-order-date {
    grid-column:1
  }
  .dw-order-amount {
    grid-column:2
  }
  .dw-order-actions {
    grid-column:1/-1
  }
  .dw-tabs button {
    padding:9px 10px;
    font-size:11px
  }
  .dw-reps,.dw-territory-key {
    grid-template-columns:1fr
  }
  .dw-dialog-head,.dw-dialog-body {
    padding:20px
  }
  .dw-dialog-head h2 {
    font-size:18px
  }
  .dw-account-facts {
    grid-template-columns:1fr 1fr
  }
  .dw-reference {
    align-items:stretch;
    flex-direction:column
  }
  .dw-dialog-head {
    position:static
  }
  .dw-section-heading {
    align-items:start;
    flex-wrap:wrap
  }
}
.dw-account-search {
  display:grid;
  gap:7px;
  font-size:11px;
  font-weight:600;
  max-width:400px;
  margin-bottom:18px;
  color:var(--muted)
}
.dw-account-search input {
  border:1px solid var(--border-strong);
  border-radius:8px;
  background:var(--surface);
  padding:10px 12px;
  font-size:13px;
  min-height:42px
}
.dw-account-card[hidden] {
  display:none
}
