/* PlusERP Version 1.0 Prompt 4
   Reports, administration, approved branding integration and final UI QA.
   Visual-only: no workflow, calculation, permission or contract changes. */
@media screen {
  /* Approved product identity */
  .login-product-logo {
    display: block;
    width: min(100%, 310px);
    height: auto;
    object-fit: contain;
    object-position: left center;
  }

  .login-brand h1 {
    margin-top: var(--space-5);
    max-width: 420px;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.08;
  }

  .login-brand .login-product-tagline {
    margin: var(--space-3) 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 720;
    letter-spacing: 0.06em;
    line-height: 1.45;
    text-transform: uppercase;
  }

  .sidebar .brand-row {
    min-height: 66px;
  }

  .sidebar-brand-lockup {
    display: block;
    width: min(100%, 188px);
    height: 48px;
    object-fit: contain;
    object-position: left center;
  }

  .sidebar-brand-icon {
    display: none;
    width: 38px;
    height: 40px;
    object-fit: contain;
  }

  .license-product-identity {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-4) 0;
    padding: var(--space-4);
    border: 1px solid #d7e3f4;
    border-radius: var(--card-radius);
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  }

  .license-product-identity img {
    display: block;
    width: clamp(190px, 28vw, 280px);
    height: auto;
    object-fit: contain;
  }

  .license-product-identity > div {
    display: grid;
    gap: 3px;
    padding-left: var(--space-4);
    border-left: 1px solid #cbd9ef;
  }

  .license-product-identity span,
  .license-product-identity small {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .license-product-identity strong {
    color: var(--text-primary);
    font-size: 16px;
  }

  .report-product-signature {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-top: var(--space-3);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .report-product-signature img {
    display: block;
    width: 20px;
    height: 22px;
    object-fit: contain;
  }

  /* Reports Center */
  .reports-workspace {
    display: grid;
    gap: var(--space-4);
    min-width: 0;
  }

  .reports-center-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-5);
    border: 1px solid #d5e1f2;
    border-radius: var(--card-radius);
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    box-shadow: var(--shadow-1);
  }

  .reports-center-heading h2 {
    margin: 4px 0;
    color: var(--text-primary);
    font-size: 25px;
    letter-spacing: -0.025em;
  }

  .reports-center-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
  }

  .reports-context-badge {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid #bfcef0;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 750;
    text-align: center;
  }

  .reports-command.panel {
    margin: 0;
    padding: var(--space-4);
    border-color: #d7e2f1;
    box-shadow: none;
  }

  .reports-command .table-head {
    margin-bottom: var(--space-3);
  }

  .reports-command .table-head h2 {
    color: var(--text-primary);
    font-size: 17px;
  }

  .reports-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(140px, 0.8fr)) auto;
    gap: var(--space-3);
    align-items: end;
  }

  .reports-filter-bar label {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
  }

  .reports-filter-bar input,
  .reports-filter-bar select {
    width: 100%;
    min-height: 36px;
    margin-top: 5px;
  }

  .reports-filter-bar input:disabled {
    border-style: dashed;
    background: #f8fafc;
    color: var(--text-muted);
  }

  .reports-filter-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
  }

  .reports-metric-grid {
    gap: var(--space-3);
  }

  .reports-metric-grid .metric {
    min-height: 92px;
    padding: var(--space-4);
    border-color: #d8e2f0;
    box-shadow: none;
  }

  .reports-metric-grid .metric strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums lining-nums;
  }

  .report-center.reports-card-center {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .reports-category-card {
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-color: #d8e2f0;
    box-shadow: none;
  }

  .reports-category-card > .panel-head {
    min-height: 58px;
    margin: 0;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid #d8e2f0;
    background: #f7f9fc;
  }

  .reports-category-card > .panel-head h2 {
    margin: 0 0 3px;
    color: var(--text-primary);
    font-size: 15px;
  }

  .reports-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .report-launch-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
    min-width: 0;
    min-height: 102px;
    padding: var(--space-3) var(--space-4);
    border: 0;
    border-right: 1px solid #e3e9f2;
    border-bottom: 1px solid #e3e9f2;
    background: #ffffff;
  }

  .report-launch-card:nth-child(2n) {
    border-right: 0;
  }

  .report-launch-card h3 {
    margin: 0 0 4px;
    color: var(--text-primary);
    font-size: 13px;
  }

  .report-launch-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.45;
  }

  .report-launch-card > div > span {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 10px;
  }

  .report-launch-action .workflow-link {
    min-width: 58px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #bdcdf0;
    border-radius: 4px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 750;
  }

  .report-launch-action .workflow-link:is(:hover, :focus-visible) {
    border-color: #2563eb;
    background: #eff5ff;
  }

  .report-launch-action .workflow-link:disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
  }

  /* Financial report presentation */
  .modal:has(.ledger-table) {
    width: min(1180px, calc(100vw - 32px));
  }

  .modal:has(.ledger-table) .modal-head {
    padding-bottom: var(--space-3);
    border-bottom: 1px solid #d8e2f0;
  }

  .modal:has(.ledger-table) .modal-head h2 {
    color: var(--text-primary);
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  .ledger-table {
    border: 1px solid #d8e2f0;
    border-radius: 5px;
    background: #ffffff;
    overflow: auto;
  }

  .ledger-table table {
    min-width: 760px;
  }

  .ledger-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #edf2f8;
    color: #334155;
    font-size: 10.5px;
    letter-spacing: 0.045em;
    text-transform: uppercase;
  }

  .ledger-table th,
  .ledger-table td {
    padding: 9px 10px;
    border-color: #e2e8f0;
    font-size: 12px;
    vertical-align: top;
  }

  .ledger-table tbody tr:nth-child(even) {
    background: #fafcff;
  }

  .ledger-table tbody tr:hover {
    background: #f2f6fd;
  }

  .ledger-table .amount,
  .ledger-total strong,
  .customer-balance-print-meta strong,
  .customer-balance-grand-total strong {
    text-align: right;
    font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
  }

  .ledger-total {
    margin-top: var(--space-3);
    border: 1px solid #c9d6e8;
    border-radius: 5px;
    background: #f5f8fc;
  }

  .ledger-total .grand {
    padding: var(--space-3) var(--space-4);
    border-left: 3px solid #2563eb;
  }

  .ledger-total .grand span {
    color: var(--text-secondary);
    font-weight: 700;
  }

  .ledger-total .grand strong {
    color: var(--text-primary);
    font-size: 16px;
  }

  /* Settings and administration */
  .erp-admin-center {
    display: grid;
    gap: var(--space-4);
    min-width: 0;
  }

  .erp-admin-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-5);
    margin: 0;
    padding: var(--space-5);
    border: 1px solid #d5e1f2;
    border-radius: var(--card-radius);
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    box-shadow: var(--shadow-1);
  }

  .erp-admin-toolbar h2 {
    margin: 4px 0;
    color: var(--text-primary);
    font-size: 25px;
    letter-spacing: -0.025em;
  }

  .erp-admin-toolbar p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
  }

  .erp-admin-search {
    width: min(100%, 420px);
  }

  .erp-admin-search label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
  }

  .erp-admin-search input {
    width: 100%;
    min-height: 38px;
    margin-top: 5px;
  }

  .erp-admin-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
    padding: 7px;
    border: 1px solid #d8e2f0;
    border-radius: 6px;
    background: #ffffff;
  }

  .settings-favorite {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 700;
  }

  .settings-favorite:is(:hover, :focus-visible) {
    border-color: #c8d5ec;
    background: #f2f6fd;
    color: #1d4ed8;
  }

  .settings-favorite svg {
    width: 16px;
    height: 16px;
  }

  .settings-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: var(--space-4);
    align-items: start;
  }

  .settings-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .settings-dashboard-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d8e2f0;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
  }

  .settings-dashboard-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
    width: 100%;
    min-height: 68px;
    padding: var(--space-3) var(--space-4);
    border: 0;
    border-bottom: 1px solid #d8e2f0;
    border-radius: 0;
    background: #f7f9fc;
    color: var(--text-primary);
    text-align: left;
  }

  .settings-dashboard-card-head:is(:hover, :focus-visible) {
    background: #eef4ff;
  }

  .settings-dashboard-card-head strong,
  .settings-dashboard-card-head small {
    display: block;
  }

  .settings-dashboard-card-head strong {
    font-size: 14px;
  }

  .settings-dashboard-card-head small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
  }

  .settings-dashboard-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #c9d7f3;
    border-radius: 5px;
    background: #ffffff;
    color: #2563eb;
  }

  .settings-dashboard-icon svg {
    width: 18px;
    height: 18px;
  }

  .settings-dashboard-list {
    display: grid;
  }

  .settings-dashboard-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px var(--space-3);
    width: 100%;
    min-height: 66px;
    padding: var(--space-3) var(--space-4);
    border: 0;
    border-bottom: 1px solid #edf1f6;
    border-radius: 0;
    background: #ffffff;
    color: var(--text-primary);
    text-align: left;
  }

  .settings-dashboard-item:last-child {
    border-bottom: 0;
  }

  .settings-dashboard-item:is(:hover, :focus-visible) {
    background: #f8faff;
  }

  .settings-dashboard-item-title {
    font-size: 12.5px;
    font-weight: 700;
  }

  .settings-dashboard-item small {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.4;
  }

  .settings-status,
  .status-badge,
  .badge {
    line-height: 1.25;
  }

  .erp-admin-health {
    position: sticky;
    top: var(--space-3);
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d8e2f0;
    border-radius: 6px;
    background: #ffffff;
  }

  .erp-admin-health-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid #d8e2f0;
    background: #f7f9fc;
  }

  .erp-admin-health-head h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
  }

  .erp-admin-health-head span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .erp-health-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    padding: 10px var(--space-4);
    border-bottom: 1px solid #edf1f6;
  }

  .erp-health-row strong,
  .erp-health-row small {
    display: block;
  }

  .erp-health-row strong {
    color: var(--text-primary);
    font-size: 11.5px;
  }

  .erp-health-row small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10.5px;
    overflow-wrap: anywhere;
  }

  .erp-health-dot {
    width: 9px;
    height: 9px;
    margin-top: 4px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px #ffffff;
  }

  .erp-health-dot.ok {
    color: #16a34a;
  }

  .erp-health-dot.warn {
    color: #d97706;
  }

  .erp-admin-sidebar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .panel > .panel-head:first-child {
    min-height: 52px;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid #e1e7f0;
  }

  .panel > .panel-head:first-child h2 {
    color: var(--text-primary);
    font-size: 18px;
    letter-spacing: -0.015em;
  }

  .branch-grid-wrap,
  .role-permission-scroll {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #d8e2f0;
    border-radius: 5px;
  }

  .branch-grid-table,
  .role-permission-matrix table {
    min-width: 820px;
  }

  .branch-grid-table th,
  .role-permission-matrix thead th {
    background: #edf2f8;
    color: #475569;
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .branch-grid-table th,
  .branch-grid-table td,
  .role-permission-matrix th,
  .role-permission-matrix td {
    padding: 9px 10px;
    border-color: #e2e8f0;
    font-size: 11.5px;
  }

  .branch-actions,
  .user-management-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
  }

  .user-access-panel {
    min-width: 0;
  }

  .user-access-panel > .form-grid {
    gap: var(--space-4);
  }

  .permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .permission-grid > div {
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid #d8e2f0;
    border-radius: 5px;
    background: #fafcff;
  }

  .permission-grid label,
  .user-access-company-branch-group {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 12px;
  }

  .user-access-company-branch-group {
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
  }

  .role-permission-matrix {
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid #d8e2f0;
    border-radius: 5px;
    background: #ffffff;
  }

  .role-permission-head strong,
  .role-permission-head span {
    display: block;
  }

  .role-permission-head span {
    margin: 3px 0 var(--space-3);
    color: var(--text-muted);
    font-size: 11px;
  }

  .line-editor {
    overflow: auto;
    padding: var(--space-4);
    border: 1px solid #d8e2f0;
    border-radius: 5px;
    background: #fafcff;
  }

  .line-editor > .hint {
    max-width: 900px;
    padding: 9px 11px;
    border-left: 3px solid #d97706;
    background: #fff9eb;
    color: #7c4a03;
  }

  .migration-panel {
    min-width: 0;
  }

  .migration-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .migration-card {
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid #d8e2f0;
    border-radius: 5px;
    background: #fafcff;
    box-shadow: none;
  }

  .migration-card h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 15px;
  }

  .record-lines > div {
    display: grid;
    grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1fr);
    gap: var(--space-3);
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .record-lines dt {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
  }

  .record-lines dd {
    min-width: 0;
    margin: 0;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  .migration-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-4);
  }

  .migration-output {
    max-width: 100%;
    overflow: auto;
    border-radius: 5px;
    font-size: 11px;
  }

  .organization-dashboard,
  .erp-detail-page,
  .company-settings-workspace {
    min-width: 0;
  }

  .company-settings-card,
  .erp-detail-card {
    border-color: #d8e2f0;
    border-radius: 5px;
    box-shadow: none;
  }

  .company-settings-card-head,
  .erp-detail-card-head {
    background: #f7f9fc;
  }

  .company-settings-card-head h3,
  .erp-detail-card-head h3 {
    color: var(--text-primary);
  }
}
@media screen and (max-width: 1280px) {
  .reports-filter-bar {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .reports-filter-actions {
    align-self: end;
  }

  .report-center.reports-card-center {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 980px) {
  .sidebar-brand-lockup {
    display: none;
  }

  .sidebar-brand-icon {
    display: block;
  }

  .reports-center-heading,
  .erp-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-context-badge {
    align-self: flex-start;
  }

  .reports-filter-bar {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .reports-filter-actions {
    justify-content: flex-start;
  }

  .settings-dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-admin-health {
    position: static;
  }

  .migration-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 760px) {
  .sidebar .brand-row {
    min-height: 42px;
    justify-content: center;
    padding: 0 0 var(--space-2);
  }

  .sidebar-brand-lockup {
    display: none;
  }

  .sidebar-brand-icon {
    display: block;
    width: 32px;
    height: 34px;
  }

  .login-product-logo {
    width: min(100%, 260px);
  }

  .reports-center-heading,
  .erp-admin-toolbar {
    padding: var(--space-4);
  }

  .reports-filter-bar,
  .settings-dashboard-grid,
  .permission-grid,
  .migration-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .reports-filter-actions,
  .migration-actions,
  .branch-actions,
  .user-management-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .reports-filter-actions .btn,
  .migration-actions .btn,
  .branch-actions .btn,
  .user-management-actions .btn {
    width: 100%;
  }

  .reports-card-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-launch-card {
    border-right: 0;
  }

  .erp-admin-search {
    width: 100%;
  }

  .license-product-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .license-product-identity img {
    width: min(100%, 260px);
  }

  .license-product-identity > div {
    padding: var(--space-3) 0 0;
    border-top: 1px solid #cbd9ef;
    border-left: 0;
  }

  .record-lines > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .role-permission-matrix {
    padding: var(--space-3);
  }
}

@media screen and (max-width: 420px) {
  .login-brand h1,
  .reports-center-heading h2,
  .erp-admin-toolbar h2 {
    font-size: 24px;
  }

  .login-brand .login-product-tagline {
    font-size: 12px;
  }

  .reports-context-badge {
    width: 100%;
    border-radius: 5px;
  }

  .erp-admin-tabs,
  .erp-admin-sidebar-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-favorite {
    flex: 1 1 130px;
  }
}

@media print {
  .sidebar,
  .top-menu,
  .topbar,
  .license-banner,
  .reports-center-heading,
  .reports-command,
  .reports-metric-grid,
  .report-center,
  .erp-admin-toolbar,
  .erp-admin-tabs,
  .erp-admin-health,
  .form-actions,
  .modal-head button,
  .report-launch-action {
    display: none !important;
  }

  .modal:has(.ledger-table),
  .modal:has(.ledger-table) .modal-content {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .ledger-table {
    overflow: visible !important;
    border-color: #a8b0ba;
  }

  .ledger-table table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    break-inside: auto;
  }

  .ledger-table thead {
    display: table-header-group;
  }

  .ledger-table tr {
    break-inside: avoid;
  }

  .ledger-table th,
  .ledger-table td {
    padding: 6px 7px;
    color: #000000;
    font-size: 9pt;
  }

  .ledger-table thead th {
    position: static;
    background: #edf0f3 !important;
  }

  .ledger-total {
    break-inside: avoid;
    border-color: #8f98a3;
    background: #ffffff !important;
  }

  .report-product-signature {
    display: flex !important;
    margin-top: 10mm;
    color: #475569;
  }

  .report-product-signature img {
    width: 5mm;
    height: 5mm;
  }
}

/*
 * PlusERP Version 1.0 Prompt 3
 * CEO dashboard and universal operational workspace presentation.
 * Screen-only and selector-scoped: no report, accounting-document, settings,
 * administration, route, workflow, or payload behavior is changed.
 */
@media screen {
  :is(
    .pluserp-ceo-dashboard,
    .sales-workspace,
    .approval-workspace,
    .report-center.sales-center
  ) {
    --workspace-accent: var(--action-primary);
    --workspace-soft-accent: #eff6ff;
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin-inline: auto;
    gap: var(--space-3);
  }

  :is(
    .pluserp-dashboard-heading,
    .sales-workspace-head,
    .approval-workspace-head,
    .workspace-return-bar,
    .customer-register-hero,
    .banking-command-center
  ) {
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-1);
  }

  .pluserp-dashboard-heading,
  .sales-workspace-head,
  .approval-workspace-head {
    min-height: 68px;
    padding: var(--space-3) var(--space-4);
    align-items: center;
  }

  :is(
    .pluserp-dashboard-title,
    .sales-workspace-head > div:first-child,
    .approval-workspace-head > div:first-child
  ) h1 {
    color: var(--text-primary);
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.1;
    letter-spacing: -0.025em;
  }

  :is(
    .pluserp-dashboard-title,
    .sales-workspace-head,
    .approval-workspace-head
  ) :is(.tenant-context, .pluserp-dashboard-tools, .sales-workspace-tools, .approval-workspace-tools) {
    gap: var(--space-2);
  }

  :is(
    .pluserp-kpi-grid,
    .sales-kpi-grid,
    .approval-executive-grid,
    .approval-category-grid,
    .approval-kpi-grid,
    .dashboard-metrics
  ) {
    gap: var(--space-3);
  }

  :is(
    .pluserp-kpi-card,
    .sales-kpi-card,
    .approval-workspace-kpi,
    .approval-category-card,
    .metric
  ) {
    min-width: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-1);
  }

  :is(.pluserp-kpi-card, .sales-kpi-card, .approval-workspace-kpi) {
    min-height: 88px;
    padding: var(--space-3);
  }

  :is(
    .pluserp-kpi-icon,
    .sales-kpi-card > span,
    .approval-workspace-kpi > span,
    .approval-category-card > span
  ) {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: var(--input-radius);
    background: var(--action-primary);
    box-shadow: none;
  }

  :is(.sales-kpi-card.success, .approval-workspace-kpi.success, .approval-category-card.success) > span {
    background: var(--status-success);
  }

  :is(.sales-kpi-card.danger, .approval-workspace-kpi.danger, .approval-category-card.danger) > span {
    background: var(--status-danger);
  }

  :is(.approval-workspace-kpi.warning, .approval-category-card.warning) > span {
    background: var(--status-warning);
  }

  .sales-kpi-card.info > span {
    background: var(--status-information);
  }

  :is(
    .pluserp-kpi-card,
    .sales-kpi-card,
    .approval-workspace-kpi,
    .approval-category-card,
    .metric
  ) strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
  }

  :is(
    .pluserp-kpi-card-clickable,
    .approval-category-card,
    .approval-jump-card,
    .metric
  ):is(:hover, :focus-visible) {
    border-color: #93b4e8;
    background: #f8fbff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
    transform: none;
  }

  :is(
    .pluserp-panel,
    .sales-quick-panel,
    .sales-operations-panel,
    .sales-panel,
    .sales-summary-strip,
    .approval-main-table,
    .approval-side-card,
    .approval-workspace .approval-filter-panel,
    .report-center.sales-center .report-block
  ) {
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    box-shadow: var(--shadow-1);
  }

  :is(.pluserp-panel-head, .sales-section-head, .approval-main-head, .panel-head) {
    min-height: 42px;
    border-color: var(--divider-default);
  }

  :is(.pluserp-panel-head, .sales-section-head, .approval-main-head) h2,
  :is(.pluserp-panel-head, .sales-section-head, .approval-main-head) h3 {
    color: var(--text-primary);
    font-size: 15px;
    letter-spacing: -0.01em;
  }

  .pluserp-chart-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.8fr) minmax(0, 1.1fr) minmax(250px, 0.8fr);
  }

  .pluserp-chart-grid .pluserp-panel {
    min-height: 272px;
  }

  :is(.pluserp-line-chart, .pluserp-cash-chart, .pluserp-donut-wrap, .pluserp-health) {
    min-height: 188px;
  }

  .pluserp-line-chart .grid {
    stroke: var(--divider-default);
  }

  :is(.pluserp-compact-head, .approval-enterprise-head) {
    background: #f4f7fb;
    color: var(--text-secondary);
    border-color: var(--divider-default);
    letter-spacing: 0.035em;
  }

  :is(.pluserp-compact-row, .approval-enterprise-row) {
    border-color: var(--divider-default);
    color: var(--text-primary);
  }

  :is(.pluserp-compact-row, .approval-enterprise-row):hover {
    background: #f8fbff;
  }

  :is(
    .pluserp-compact-row strong,
    .approval-enterprise-row strong,
    td.amount,
    th.amount,
    .amount,
    .metric strong
  ) {
    font-variant-numeric: tabular-nums;
  }

  .pluserp-feature-strip {
    min-height: 34px;
    border: 1px solid var(--border-default);
    border-radius: var(--card-radius);
    background: var(--elevated-surface);
    color: var(--text-muted);
    box-shadow: none;
  }

  .pluserp-quick-actions button,
  .sales-action-button,
  .sales-operation-card,
  .sales-operation-item,
  .sales-report-link,
  .approval-shortcut {
    border-radius: var(--input-radius);
  }

  .pluserp-quick-actions button,
  .sales-action-button,
  .sales-operation-card {
    border-color: var(--border-default);
    box-shadow: none;
  }

  .sales-action-button:is(:hover, :focus-visible),
  .sales-operation-item:is(:hover, :focus-visible),
  .sales-report-link:is(:hover, :focus-visible),
  .approval-shortcut:is(:hover, :focus-visible) {
    border-color: #93b4e8;
    background: #f8fbff;
    color: var(--action-primary-hover);
  }

  .report-center.sales-center {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
  }

  .report-center.sales-center .report-block {
    min-width: 0;
    padding: 0;
    overflow: hidden;
  }

  .report-center.sales-center .report-block > .panel-head {
    padding: var(--space-3);
    background: #f8fafc;
  }

  .report-center.sales-center .report-links,
  .report-center.sales-center .quick-list,
  .report-center.sales-center .dashboard-metrics {
    padding: var(--space-3);
  }

  .report-center.sales-center .workflow-link {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: var(--input-radius);
    color: var(--text-primary);
    padding: var(--space-2);
  }

  .report-center.sales-center .workflow-link:is(:hover, :focus-visible) {
    border-color: #bfdbfe;
    background: var(--workspace-soft-accent);
    color: var(--action-primary-hover);
  }

  .workspace-return-bar {
    min-height: 50px;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-3);
  }

  .workspace-title-stack {
    min-width: 0;
  }

  .workspace-title-stack strong {
    color: var(--text-primary);
    font-size: 15px;
  }

  .workspace-title-stack small {
    color: var(--text-muted);
  }

  .customer-register-hero {
    padding: var(--space-3) var(--space-4);
  }

  :is(
    .content:has(.customer-register-hero),
    .content:has(.banking-command-center),
    .content:has(.journal-register-wrap),
    .content:has(.inventory-table-wrap),
    .content:has(.hr-register-table),
    .content:has(.coa-action-cell)
  ) :is(.panel, .table-wrap) {
    border-color: var(--border-default);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-1);
  }

  :is(
    .content:has(.customer-register-hero),
    .content:has(.banking-command-center),
    .content:has(.journal-register-wrap),
    .content:has(.inventory-table-wrap),
    .content:has(.hr-register-table),
    .content:has(.coa-action-cell)
  ) table thead th {
    background: #f4f7fb;
    color: var(--text-secondary);
    border-color: var(--divider-default);
    font-size: 11px;
    letter-spacing: 0.035em;
  }

  :is(
    .content:has(.customer-register-hero),
    .content:has(.banking-command-center),
    .content:has(.journal-register-wrap),
    .content:has(.inventory-table-wrap),
    .content:has(.hr-register-table),
    .content:has(.coa-action-cell)
  ) table tbody tr:hover {
    background: #f8fbff;
  }

  .banking-command-center {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
    padding: var(--space-3) var(--space-4);
  }

  .banking-command-center h2 {
    color: var(--text-primary);
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  .banking-section-tabs button {
    min-height: 34px;
    border-radius: var(--button-radius);
    color: var(--text-secondary);
    font-weight: 700;
  }

  .banking-section-tabs button:is(:hover, :focus-visible) {
    border-color: #93b4e8;
    background: var(--workspace-soft-accent);
    color: var(--action-primary-hover);
    box-shadow: none;
  }

  :is(
    .journal-register-table,
    .hr-register-table,
    .inventory-table-wrap table,
    .approval-table,
    .customer-register-table
  ) {
    font-variant-numeric: tabular-nums;
  }

  .journal-register-table :is(th:nth-child(4), th:nth-child(5), td:nth-child(4), td:nth-child(5)),
  .journal-lines :is(input[name="debit"], input[name="credit"]) {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .coa-row-actions,
  .hr-action-cell,
  .approval-action-cell {
    white-space: nowrap;
  }

  .inventory-action-panel {
    border-left: 3px solid var(--status-information);
  }

  .hr-register-grid {
    gap: var(--space-3);
  }

  :is(.approval-workspace .approval-tabs, .banking-section-tabs) {
    scrollbar-width: thin;
  }

  :is(.approval-section, .approval-main-table) .approval-count {
    border-radius: var(--button-radius);
    background: var(--workspace-soft-accent);
    color: var(--action-primary-hover);
  }

  :is(.empty, .approval-empty, .pluserp-compact-empty, .pluserp-empty-chart) {
    color: var(--text-muted);
  }

  .inline-workspace-form {
    gap: var(--space-3);
  }

  .inline-workspace-form :is(.panel, .form-section, .form-card, .invoice-form-section) {
    border-color: var(--border-default);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-1);
  }

  .inline-workspace-form :is(.totals, .summary-card, .amount-summary) {
    font-variant-numeric: tabular-nums;
  }
}

@media screen and (max-width: 1280px) {
  .pluserp-kpi-grid,
  .sales-kpi-grid,
  .approval-executive-grid,
  .approval-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .report-center.sales-center {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 980px) {
  .pluserp-dashboard-heading,
  .sales-workspace-head,
  .approval-workspace-head,
  .banking-command-center {
    grid-template-columns: minmax(0, 1fr);
    flex-direction: column;
    align-items: stretch;
  }

  :is(.pluserp-dashboard-tools, .sales-workspace-tools, .approval-workspace-tools, .banking-quick-actions) {
    width: 100%;
    justify-content: flex-start;
  }

  :is(.sales-search, .approval-search) {
    width: min(100%, 440px);
  }

  .sales-operation-grid,
  .sales-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 760px) {
  .pluserp-dashboard-heading,
  .sales-workspace-head,
  .approval-workspace-head,
  .workspace-return-bar,
  .customer-register-hero,
  .banking-command-center {
    padding: var(--space-3);
  }

  .pluserp-kpi-grid,
  .sales-kpi-grid,
  .approval-executive-grid,
  .approval-category-grid,
  .approval-kpi-grid,
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pluserp-chart-grid,
  .pluserp-dashboard-grid-tables,
  .sales-operation-grid,
  .sales-lower-grid,
  .report-center.sales-center,
  .banking-summary-grid,
  .hr-register-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-return-bar-with-actions,
  .customer-register-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-return-actions,
  .inventory-return-actions,
  .customer-register-actions {
    width: 100%;
  }

  .approval-enterprise-table,
  .journal-register-wrap,
  .inventory-table-wrap,
  .hr-table-wrap {
    overflow-x: auto;
  }
}

@media screen and (max-width: 420px) {
  .pluserp-kpi-grid,
  .sales-kpi-grid,
  .approval-executive-grid,
  .approval-category-grid,
  .approval-kpi-grid,
  .dashboard-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-quick-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .pluserp-kpi-card,
  .sales-kpi-card,
  .approval-workspace-kpi {
    min-height: 78px;
  }
}
