    /* Stat cards */
    .ap-stat {
      padding: 1.2rem 1.35rem;
      display: flex;
      align-items: center;
      gap: 1rem;
      cursor: pointer;
      border: 1px solid var(--ap-border);
    }

    .ap-stat.active {
      border-color: var(--ap-primary);
      background: var(--ap-primary-100);
    }

    .ap-stat-icon {
      width: 44px;
      height: 44px;
      border-radius: var(--ap-radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      flex-shrink: 0;
    }

    .ap-stat-label {
      font-size: .78rem;
      color: var(--ap-secondary);
      font-weight: 600;
    }

    .ap-stat-value {
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--ap-text-strong);
      letter-spacing: -.02em;
    }

    /* Filters */
    .ap-filter-input,
    .ap-filter-select {
      background: var(--ap-bg);
      border: 1px solid var(--ap-border);
      border-radius: var(--ap-radius-sm);
      font-size: .83rem;
      color: var(--ap-text-strong);
      padding: .5rem .75rem;
    }

    .ap-filter-input:focus,
    .ap-filter-select:focus {
      outline: none;
      border-color: var(--ap-primary);
      background: var(--ap-surface);
    }

    /* Table */
    .ap-table thead th {
      font-size: .72rem;
      color: var(--ap-secondary);
      font-weight: 700;
      border-bottom: 1px solid var(--ap-border);
      padding: .75rem .6rem;
      white-space: nowrap;
    }

    .ap-table tbody td {
      padding: .8rem .6rem;
      border-bottom: 1px solid var(--ap-border);
      vertical-align: middle;
      font-size: .85rem;
      color: var(--ap-text);
    }

    .ap-cell-sub {
      font-size: .76rem;
      color: var(--ap-secondary);
    }

    .ap-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
    }

    .ap-row-check {
      cursor: pointer;
    }

    .ap-action-btn {
      width: 32px;
      height: 32px;
      border-radius: var(--ap-radius-sm);
      border: 1px solid var(--ap-border);
      background: var(--ap-surface);
      color: var(--ap-secondary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .ap-action-btn:hover {
      background: var(--ap-bg);
      color: var(--ap-text-strong);
    }

    /* Invoice preview / builder */
    .ap-inv-doc {
      background: var(--ap-surface);
      border: 1px solid var(--ap-border);
      border-radius: var(--ap-radius);
      padding: 2rem;
    }

    .ap-inv-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 2rem;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .ap-inv-logo {
      display: flex;
      align-items: center;
      gap: .6rem;
    }

    .ap-inv-logo .mark {
      width: 38px;
      height: 38px;
      border-radius: 9px;
      background: linear-gradient(135deg, var(--ap-primary), #7C74F0);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 800;
    }

    .ap-inv-meta-label {
      font-size: .7rem;
      color: var(--ap-secondary);
      text-transform: uppercase;
      letter-spacing: .04em;
      font-weight: 700;
    }

    .ap-inv-meta-value {
      font-size: .85rem;
      color: var(--ap-text-strong);
      font-weight: 600;
    }

    .ap-line-table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 1.5rem;
    }

    .ap-line-table th {
      font-size: .72rem;
      color: var(--ap-secondary);
      text-transform: uppercase;
      letter-spacing: .03em;
      border-bottom: 2px solid var(--ap-border);
      padding: .6rem .4rem;
      text-align: left;
    }

    .ap-line-table td {
      padding: .6rem .4rem;
      border-bottom: 1px solid var(--ap-border);
      font-size: .85rem;
      color: var(--ap-text-strong);
    }

    .ap-line-table input,
    .ap-line-table select {
      width: 100%;
      background: var(--ap-bg);
      border: 1px solid var(--ap-border);
      border-radius: 6px;
      padding: .3rem .5rem;
      font-size: .82rem;
      color: var(--ap-text-strong);
    }

    .ap-summary-box {
      max-width: 280px;
      margin-left: auto;
    }

    .ap-summary-row {
      display: flex;
      justify-content: space-between;
      font-size: .85rem;
      padding: .4rem 0;
    }

    .ap-summary-row.total {
      font-weight: 800;
      color: var(--ap-text-strong);
      font-size: 1.05rem;
      border-top: 1px solid var(--ap-border);
      padding-top: .7rem;
      margin-top: .3rem;
    }

    .ap-remove-line {
      color: var(--ap-danger);
      cursor: pointer;
      font-size: 1rem;
    }

    .modal-content {
      border-radius: var(--ap-radius);
      border: 1px solid var(--ap-border);
      background: var(--ap-surface);
    }

    .modal-header,
    .modal-footer {
      border-color: var(--ap-border);
    }

    .form-label {
      font-size: .82rem;
      font-weight: 600;
      color: var(--ap-text-strong);
    }

    .form-control,
    .form-select {
      background: var(--ap-bg);
      border: 1px solid var(--ap-border);
      border-radius: var(--ap-radius-sm);
      font-size: .85rem;
      color: var(--ap-text-strong);
    }

    .form-control:focus,
    .form-select:focus {
      border-color: var(--ap-primary);
      box-shadow: 0 0 0 3px var(--ap-primary-100);
    }

    /* ============ Utility classes (extracted from inline styles) ============ */

    /* Font sizes */
    .ap-fs-13 {
      font-size: 1.3rem;
    }

    .ap-fs-06 {
      font-size: .6rem;
    }

    .ap-fs-085 {
      font-size: .85rem;
    }

    .ap-fs-083 {
      font-size: .83rem;
    }

    .ap-fs-11 {
      font-size: 1.1rem;
    }

    .ap-fs-14 {
      font-size: 1.4rem;
    }

    /* Text colors */
    .ap-color-strong {
      color: var(--ap-text-strong);
    }

    .ap-color-secondary {
      color: var(--ap-secondary);
    }

    /* Font weight */
    .ap-fw-800 {
      font-weight: 800;
    }

    /* Transparent button */
    .ap-btn-transparent {
      background: transparent;
    }

    /* Small dropdown menu */
    .ap-menu-sm {
      font-size: .85rem;
    }

    /* Extra-small dropdown menu (row actions) */
    .ap-menu-xs {
      font-size: .83rem;
    }

    /* Stat icon background variants */
    .ap-ic-primary {
      background: var(--ap-primary-100);
      color: var(--ap-primary);
    }

    .ap-ic-success {
      background: var(--ap-success-100);
      color: var(--ap-success);
    }

    .ap-ic-warning {
      background: var(--ap-warning-100);
      color: var(--ap-warning);
    }

    .ap-ic-danger {
      background: var(--ap-danger-100);
      color: var(--ap-danger);
    }

    /* Search field with inset icon */
    .ap-search-inset-icon {
      position: absolute;
      left: .75rem;
      top: 50%;
      transform: translateY(-50%);
      color: var(--ap-secondary);
      font-size: .85rem;
    }

    .ap-search-inset-input {
      padding-left: 2rem;
      width: 220px;
    }

    /* Table column widths */
    .ap-col-checkbox {
      width: 36px;
    }

    .ap-col-actions {
      width: 70px;
    }

    /* Invoice doc: line item numeric inputs */
    .ap-input-num-sm {
      width: 70px;
    }

    .ap-input-num-md {
      width: 90px;
    }

    /* Invoice doc: tax / discount mini inputs */
    .ap-input-inline {
      background: var(--ap-bg);
      border: 1px solid var(--ap-border);
      border-radius: 6px;
      padding: .15rem .3rem;
      font-size: .82rem;
      text-align: right;
    }

    .ap-input-inline-pct {
      width: 55px;
    }

    .ap-input-inline-amt {
      width: 65px;
    }

    /* Footer */
    .ap-footer {
      color: var(--ap-secondary);
    }
