/* Extracted from reports.html */

/* =========================================================================
       BASE RESET & SHELL
       ========================================================================= */

    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      height: 100%;
    }

    body {
      font-family: var(--font-body);
      font-size: var(--text-body);
      color: var(--color-text-primary);
      background-color: var(--color-bg-base);
      overflow: hidden;
    }

    [data-theme="modern"] body {
      background-color: var(--color-bg-base);
      background-image: radial-gradient(
        circle,
        var(--dot-grid-color) 1px,
        transparent 1px
      );
      background-size: var(--dot-grid-size) var(--dot-grid-size);
    }

    /* =========================================================================
       THEME SWITCHER BAR (fixed, 36px)
       ========================================================================= */

    .theme-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: var(--z-toast);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 var(--space-5);
      background: var(--color-bg-overlay);
      border-bottom: 1px solid var(--color-border);
      backdrop-filter: blur(8px);
      height: 36px;
      flex-shrink: 0;
    }

    [data-theme="industrial"] .theme-bar {
      background: #111111;
      border-bottom-color: var(--color-primary-muted);
    }

    .theme-bar__left {
      display: flex;
      align-items: center;
      gap: var(--space-3);
    }

    .theme-bar__brand {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: 0.75rem;
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-accent);
    }

    .theme-bar__sep {
      width: 1px;
      height: 16px;
      background: var(--color-border);
    }

    .theme-bar__page {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
    }

    .theme-bar__right {
      display: flex;
      align-items: center;
      gap: var(--space-3);
    }

    .theme-bar__label {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
    }

    .theme-switcher {
      display: flex;
      align-items: center;
      background: var(--color-surface-1);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-full);
      padding: 2px;
      gap: 2px;
    }

    .theme-btn {
      display: inline-flex;
      align-items: center;
      gap: var(--space-1);
      padding: 3px var(--space-3);
      border: none;
      border-radius: var(--radius-full);
      background: transparent;
      color: var(--color-text-muted);
      font-family: var(--font-body);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      cursor: pointer;
      transition: var(--transition-fast);
    }

    .theme-btn:hover {
      color: var(--color-text-primary);
    }

    .theme-btn.is-active {
      background: var(--color-primary);
      color: var(--color-text-inverse);
      box-shadow: var(--shadow-sm);
    }

    [data-theme="industrial"] .theme-btn.is-active {
      color: #000;
    }

    /* =========================================================================
       APP SHELL
       ========================================================================= */

    .app-shell {
      display: flex;
      height: 100vh;
      padding-top: 36px;
    }

    /* =========================================================================
       SIDEBAR (~220px)
       ========================================================================= */

    .sidebar {
      width: 260px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      background: var(--color-bg-elevated);
      border-right: 1px solid var(--color-border);
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
      transition: var(--transition-normal);
    }

    .sidebar::-webkit-scrollbar { width: 4px; }
    .sidebar::-webkit-scrollbar-track { background: var(--scrollbar-track); }
    .sidebar::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-full); }

    /* Brand */
    .sidebar__brand {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-4) var(--space-4) var(--space-3);
      border-bottom: 1px solid var(--color-border);
      flex-shrink: 0;
    }

    .brand-logo {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--color-primary);
      color: var(--color-text-inverse);
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: 1.2rem;
      letter-spacing: var(--tracking-tight);
      flex-shrink: 0;
    }

    [data-theme="industrial"] .brand-logo {
      clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
    }

    [data-theme="modern"] .brand-logo {
      border-radius: var(--radius-md);
    }

    .brand-name__primary {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: 0.95rem;
      letter-spacing: var(--tracking-wide);
      color: var(--color-text-primary);
      text-transform: uppercase;
      line-height: 1;
    }

    .brand-name__sub {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      margin-top: 2px;
    }

    /* Nav */
    .sidebar__nav {
      flex: 1;
      padding: var(--space-2) 0;
    }

    .nav-section-label {
      padding: var(--space-3) var(--space-4) var(--space-1);
      font-size: 0.65rem;
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-2) var(--space-4);
      color: var(--color-text-secondary);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-regular);
      text-decoration: none;
      cursor: pointer;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
      transition: var(--transition-fast);
      border-left: 3px solid transparent;
    }

    .nav-item:hover {
      background: var(--color-primary-muted);
      color: var(--color-text-primary);
      border-left-color: var(--color-primary);
    }

    .nav-item.is-active {
      background: var(--color-primary-muted);
      color: var(--color-primary);
      font-weight: var(--font-weight-semibold);
      border-left-color: var(--color-primary);
    }

    .nav-item__icon {
      width: 16px;
      height: 16px;
      opacity: 0.7;
      flex-shrink: 0;
    }

    .nav-item.is-active .nav-item__icon,
    .nav-item:hover .nav-item__icon {
      opacity: 1;
    }

    /* Profile */
    .sidebar__profile {
      padding: var(--space-3) var(--space-4);
      border-top: 1px solid var(--color-border);
      display: flex;
      align-items: center;
      gap: var(--space-3);
      flex-shrink: 0;
    }

    .profile-avatar {
      width: 32px;
      height: 32px;
      background: var(--color-primary);
      color: var(--color-text-inverse);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: 0.8rem;
      flex-shrink: 0;
    }

    [data-theme="industrial"] .profile-avatar {
      clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
    }

    [data-theme="modern"] .profile-avatar {
      border-radius: var(--radius-full);
    }

    .profile-info__name {
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .profile-info__role {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    /* =========================================================================
       MAIN CONTENT
       ========================================================================= */

    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
      margin-left: 260px;
    }

    /* Header */
    .content-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: var(--space-4) var(--space-6);
      background: var(--color-bg-elevated);
      border-bottom: 1px solid var(--color-border);
      flex-shrink: 0;
      gap: var(--space-4);
    }

    [data-theme="industrial"] .content-header {
      background: var(--color-surface-1);
    }

    .content-header__title-block {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .content-header__eyebrow {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
    }

    .content-header__title {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: var(--text-h4);
      letter-spacing: var(--heading-tracking-h4);
      color: var(--color-text-primary);
      line-height: 1.2;
    }

    [data-theme="industrial"] .content-header__title {
      text-transform: uppercase;
    }

    .content-header__actions {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      flex-shrink: 0;
    }

    /* Scrollable body */
    .content-body {
      flex: 1;
      overflow-y: auto;
      padding: var(--space-5) var(--space-6);
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }

    .content-body::-webkit-scrollbar { width: 6px; }
    .content-body::-webkit-scrollbar-track { background: var(--scrollbar-track); }
    .content-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-full); }
    .content-body::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

    /* =========================================================================
       BUTTONS
       ========================================================================= */

    .btn {
      display: inline-flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-2) var(--space-4);
      border: 1px solid transparent;
      border-radius: var(--radius-md);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      cursor: pointer;
      transition: var(--transition-fast);
      white-space: nowrap;
      text-decoration: none;
    }

    [data-theme="industrial"] .btn {
      border-radius: 0;
    }

    .btn-primary {
      background: var(--btn-primary-bg);
      color: var(--btn-primary-text);
      border-color: var(--btn-primary-border);
    }

    .btn-primary:hover {
      background: var(--btn-primary-bg-hover);
    }

    .btn-secondary {
      background: var(--btn-secondary-bg);
      color: var(--btn-secondary-text);
      border-color: var(--btn-secondary-border);
    }

    .btn-secondary:hover {
      background: var(--btn-secondary-bg-hover);
    }

    .btn-ghost {
      background: var(--btn-ghost-bg);
      color: var(--btn-ghost-text);
      border-color: var(--btn-ghost-border);
    }

    .btn-ghost:hover {
      background: var(--color-primary-muted);
      color: var(--color-primary);
      border-color: var(--color-primary);
    }

    .btn-sm {
      padding: var(--space-1) var(--space-3);
      font-size: var(--text-caption);
    }

    .btn svg {
      width: 14px;
      height: 14px;
    }

    /* =========================================================================
       TAB NAV
       ========================================================================= */

    .tab-nav {
      display: flex;
      align-items: flex-end;
      gap: 0;
      border-bottom: 2px solid var(--color-border);
      margin-bottom: var(--space-5);
    }

    .tab-btn {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-3) var(--space-5);
      border: none;
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      background: transparent;
      color: var(--color-text-muted);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      cursor: pointer;
      transition: var(--transition-fast);
      white-space: nowrap;
      letter-spacing: var(--tracking-wide);
    }

    .tab-btn svg {
      width: 15px;
      height: 15px;
      opacity: 0.7;
    }

    .tab-btn:hover {
      color: var(--color-text-primary);
      background: var(--color-primary-muted);
    }

    .tab-btn.is-active {
      color: var(--color-primary);
      border-bottom-color: var(--color-primary);
    }

    .tab-btn.is-active svg {
      opacity: 1;
    }

    /* Tab panels */
    .tab-panel {
      display: none;
    }

    .tab-panel.is-active {
      display: block;
    }

    /* =========================================================================
       FILTER BAR
       ========================================================================= */

    .filter-bar {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-3) var(--space-4);
      background: var(--color-surface-1);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      margin-bottom: var(--space-5);
      flex-wrap: wrap;
    }

    [data-theme="industrial"] .filter-bar {
      border-radius: 0;
      border-left: 3px solid var(--color-primary);
    }

    .filter-bar__label {
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      white-space: nowrap;
    }

    .filter-input,
    .filter-select {
      padding: var(--space-2) var(--space-3);
      background: var(--color-bg-overlay);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      color: var(--color-text-primary);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      outline: none;
      transition: var(--transition-fast);
    }

    [data-theme="industrial"] .filter-input,
    [data-theme="industrial"] .filter-select {
      border-radius: 0;
    }

    .filter-input:focus,
    .filter-select:focus {
      border-color: var(--color-border-focus);
      box-shadow: var(--shadow-focus);
    }

    .filter-input[type="date"] {
      color-scheme: dark;
    }

    [data-theme="modern"] .filter-input[type="date"] {
      color-scheme: light;
    }

    .filter-sep {
      color: var(--color-text-muted);
      font-size: var(--text-caption);
    }

    .filter-bar__spacer {
      flex: 1;
    }

    /* =========================================================================
       KPI CARDS GRID
       ========================================================================= */

    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: var(--space-4);
      margin-bottom: var(--space-5);
    }

    @media (max-width: 1024px) {
      .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 640px) {
      .kpi-grid { grid-template-columns: 1fr; }
    }

    .kpi-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: var(--space-4) var(--space-5);
      display: flex;
      flex-direction: column;
      gap: var(--space-1);
      position: relative;
      overflow: hidden;
      transition: var(--transition-fast);
    }

    [data-theme="industrial"] .kpi-card {
      border-radius: 0;
      border-top: 2px solid var(--color-primary);
    }

    [data-theme="modern"] .kpi-card {
      box-shadow: var(--shadow-sm);
    }

    .kpi-card:hover {
      border-color: var(--color-border-accent);
      box-shadow: var(--shadow-md);
    }

    [data-theme="industrial"] .kpi-card:hover {
      border-top-color: var(--color-primary);
    }

    .kpi-card__icon {
      position: absolute;
      top: var(--space-3);
      right: var(--space-4);
      width: 32px;
      height: 32px;
      background: var(--color-primary-muted);
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-primary);
    }

    .kpi-card__icon svg {
      width: 16px;
      height: 16px;
    }

    .kpi-card__label {
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
    }

    .kpi-card__value {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: var(--text-h4);
      color: var(--color-text-primary);
      line-height: 1.1;
    }

    .kpi-card__sub {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      display: flex;
      align-items: center;
      gap: var(--space-1);
      margin-top: var(--space-1);
    }

    .kpi-card__delta {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      padding: 1px 6px;
      border-radius: var(--radius-full);
    }

    .kpi-card__delta--up {
      background: var(--color-success-light);
      color: var(--color-success-dark);
    }

    [data-theme="industrial"] .kpi-card__delta--up {
      background: rgba(34, 197, 94, 0.15);
      color: var(--color-success);
    }

    .kpi-card__delta--down {
      background: var(--color-error-light);
      color: var(--color-error-dark);
    }

    [data-theme="industrial"] .kpi-card__delta--down {
      background: rgba(239, 68, 68, 0.15);
      color: var(--color-error);
    }

    /* =========================================================================
       SECTION HEADER
       ========================================================================= */

    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: var(--space-3);
      gap: var(--space-3);
    }

    .section-title {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-secondary);
      font-size: var(--text-h6);
      color: var(--color-text-primary);
      letter-spacing: var(--heading-tracking-h6);
      text-transform: uppercase;
    }

    [data-theme="industrial"] .section-title {
      color: var(--color-primary);
      letter-spacing: var(--tracking-wider);
    }

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

    /* =========================================================================
       CSS BAR CHART
       ========================================================================= */

    .bar-chart-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: var(--space-4) var(--space-5);
      margin-bottom: var(--space-5);
    }

    [data-theme="industrial"] .bar-chart-card {
      border-radius: 0;
      border-left: 3px solid var(--color-primary);
    }

    [data-theme="modern"] .bar-chart-card {
      box-shadow: var(--shadow-sm);
    }

    .bar-chart-card__title {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-secondary);
      font-size: var(--text-body-sm);
      color: var(--color-text-primary);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      margin-bottom: var(--space-4);
    }

    [data-theme="industrial"] .bar-chart-card__title {
      color: var(--color-text-accent);
    }

    .bar-chart {
      display: flex;
      align-items: flex-end;
      gap: var(--space-3);
      height: 140px;
    }

    .bar-chart__col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-1);
      flex: 1;
      height: 100%;
      justify-content: flex-end;
    }

    .bar-chart__bar-wrap {
      flex: 1;
      width: 100%;
      display: flex;
      align-items: flex-end;
    }

    .bar-chart__bar {
      width: 100%;
      background: var(--color-primary);
      border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      transition: opacity var(--duration-fast) var(--ease-in-out);
      position: relative;
      min-height: 4px;
    }

    [data-theme="industrial"] .bar-chart__bar {
      border-radius: 0;
      clip-path: polygon(0 6px, 6px 0, 100% 0, 100% 100%, 0 100%);
    }

    .bar-chart__bar:hover {
      opacity: 0.8;
    }

    .bar-chart__bar-val {
      position: absolute;
      top: -18px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.6rem;
      font-weight: var(--font-weight-bold);
      color: var(--color-text-accent);
      white-space: nowrap;
    }

    .bar-chart__day {
      font-size: 0.65rem;
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      white-space: nowrap;
    }

    /* =========================================================================
       DATA TABLES
       ========================================================================= */

    .table-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      margin-bottom: var(--space-5);
    }

    [data-theme="industrial"] .table-card {
      border-radius: 0;
    }

    [data-theme="modern"] .table-card {
      box-shadow: var(--shadow-sm);
    }

    .table-card__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: var(--space-3) var(--space-5);
      border-bottom: 1px solid var(--color-border);
      background: var(--color-surface-2);
      gap: var(--space-3);
    }

    [data-theme="industrial"] .table-card__header {
      background: var(--color-surface-3);
    }

    .table-card__title {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-secondary);
      font-size: var(--text-body-sm);
      color: var(--color-text-primary);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
    }

    [data-theme="industrial"] .table-card__title {
      color: var(--color-text-accent);
    }

    .table-wrap {
      overflow-x: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }

    .data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: var(--text-body-sm);
    }

    .data-table thead {
      background: var(--color-surface-1);
    }

    [data-theme="industrial"] .data-table thead {
      background: var(--color-surface-2);
    }

    .data-table th {
      padding: var(--space-2) var(--space-4);
      text-align: left;
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      white-space: nowrap;
      border-bottom: 1px solid var(--color-border);
    }

    .data-table th.align-right,
    .data-table td.align-right {
      text-align: right;
    }

    .data-table th.align-center,
    .data-table td.align-center {
      text-align: center;
    }

    .data-table td {
      padding: var(--space-3) var(--space-4);
      color: var(--color-text-secondary);
      border-bottom: 1px solid var(--color-border);
      vertical-align: middle;
    }

    .data-table tr:last-child td {
      border-bottom: none;
    }

    .data-table tbody tr {
      transition: background var(--duration-fast) var(--ease-in-out);
    }

    .data-table tbody tr:hover {
      background: var(--color-primary-muted);
    }

    .td-strong {
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-primary);
    }

    .td-mono {
      font-family: var(--font-mono);
      font-size: var(--text-body-sm);
      color: var(--color-text-primary);
    }

    .td-mono-accent {
      font-family: var(--font-mono);
      font-size: var(--text-body-sm);
      color: var(--color-text-accent);
      font-weight: var(--font-weight-bold);
    }

    /* Rank badge */
    .rank-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      background: var(--color-primary-muted);
      color: var(--color-primary);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-bold);
      border-radius: var(--radius-sm);
    }

    [data-theme="industrial"] .rank-badge {
      border-radius: 0;
    }

    .rank-badge--gold {
      background: rgba(234, 179, 8, 0.15);
      color: var(--color-warning);
    }

    /* Progress bar inline */
    .progress-mini {
      display: flex;
      align-items: center;
      gap: var(--space-2);
    }

    .progress-mini__bar {
      flex: 1;
      height: 4px;
      background: var(--color-border);
      border-radius: var(--radius-full);
      overflow: hidden;
      min-width: 60px;
    }

    .progress-mini__fill {
      height: 100%;
      background: var(--color-primary);
      border-radius: var(--radius-full);
    }

    .progress-mini__pct {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      white-space: nowrap;
      min-width: 32px;
      text-align: right;
    }

    /* Status pills */
    .pill {
      display: inline-flex;
      align-items: center;
      gap: var(--space-1);
      padding: 2px var(--space-2);
      border-radius: var(--radius-full);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      white-space: nowrap;
    }

    .pill--warning {
      background: rgba(234, 179, 8, 0.15);
      color: var(--color-warning);
    }

    .pill--error {
      background: rgba(239, 68, 68, 0.15);
      color: var(--color-error);
    }

    .pill--success {
      background: rgba(34, 197, 94, 0.15);
      color: var(--color-success);
    }

    .pill--muted {
      background: var(--color-surface-3);
      color: var(--color-text-muted);
    }

    .pill--dot::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: var(--radius-full);
      background: currentColor;
      flex-shrink: 0;
    }

    /* Export button group */
    .export-group {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      padding-top: var(--space-2);
    }

    .export-label {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
    }

    /* =========================================================================
       AGING TABLE (Financieros)
       ========================================================================= */

    .aging-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: var(--space-4);
      margin-bottom: var(--space-5);
    }

    @media (max-width: 768px) {
      .aging-grid { grid-template-columns: repeat(2, 1fr); }
    }

    .aging-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: var(--space-4);
      text-align: center;
      transition: var(--transition-fast);
    }

    [data-theme="industrial"] .aging-card {
      border-radius: 0;
    }

    [data-theme="modern"] .aging-card {
      box-shadow: var(--shadow-sm);
    }

    .aging-card:hover {
      border-color: var(--color-border-accent);
    }

    .aging-card__range {
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      margin-bottom: var(--space-2);
    }

    .aging-card__amount {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: var(--text-h5);
      color: var(--color-text-primary);
      margin-bottom: var(--space-1);
    }

    .aging-card__count {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    .aging-card__bar {
      height: 4px;
      border-radius: var(--radius-full);
      margin-top: var(--space-3);
    }

    .aging-card--ok .aging-card__bar { background: var(--color-success); }
    .aging-card--warn .aging-card__bar { background: var(--color-warning); }
    .aging-card--danger .aging-card__bar { background: var(--color-error); }
    .aging-card--critical .aging-card__bar { background: #991b1b; }

    /* =========================================================================
       CASH FLOW SUMMARY
       ========================================================================= */

    .cashflow-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-4);
      margin-bottom: var(--space-5);
    }

    @media (max-width: 768px) {
      .cashflow-grid { grid-template-columns: 1fr; }
    }

    .cashflow-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: var(--space-5);
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
    }

    [data-theme="industrial"] .cashflow-card {
      border-radius: 0;
    }

    [data-theme="modern"] .cashflow-card {
      box-shadow: var(--shadow-sm);
    }

    .cashflow-card--inflow {
      border-top: 3px solid var(--color-success);
    }

    .cashflow-card--outflow {
      border-top: 3px solid var(--color-error);
    }

    .cashflow-card--net {
      border-top: 3px solid var(--color-primary);
    }

    .cashflow-card__label {
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
    }

    .cashflow-card__value {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: var(--text-h4);
    }

    .cashflow-card--inflow .cashflow-card__value { color: var(--color-success); }
    .cashflow-card--outflow .cashflow-card__value { color: var(--color-error); }
    .cashflow-card--net .cashflow-card__value { color: var(--color-primary); }

    .cashflow-card__items {
      list-style: none;
      margin-top: var(--space-2);
      display: flex;
      flex-direction: column;
      gap: var(--space-1);
    }

    .cashflow-card__item {
      display: flex;
      justify-content: space-between;
      font-size: var(--text-caption);
      color: var(--color-text-secondary);
      padding-top: var(--space-1);
      border-top: 1px solid var(--color-border);
    }

    .cashflow-card__item-val {
      font-weight: var(--font-weight-semibold);
      font-family: var(--font-mono);
    }

    /* =========================================================================
       TWO-COLUMN LAYOUT HELPER
       ========================================================================= */

    .two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-4);
    }

    @media (max-width: 900px) {
      .two-col { grid-template-columns: 1fr; }
    }

    /* =========================================================================
       PAYMENT METHOD BARS
       ========================================================================= */

    .pay-method-row {
      display: flex;
      align-items: center;
      gap: var(--space-4);
      margin-bottom: var(--space-4);
    }

    .pay-method-row:last-child {
      margin-bottom: 0;
    }

    .pay-method__label {
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-secondary);
      min-width: 110px;
      white-space: nowrap;
    }

    .pay-method__bar-wrap {
      flex: 1;
      height: 10px;
      background: var(--color-border);
      border-radius: var(--radius-full);
      overflow: hidden;
    }

    [data-theme="industrial"] .pay-method__bar-wrap {
      border-radius: 0;
    }

    .pay-method__bar {
      height: 100%;
      background: var(--color-primary);
      border-radius: var(--radius-full);
      transition: width 0.6s var(--ease-in-out);
    }

    [data-theme="industrial"] .pay-method__bar {
      border-radius: 0;
    }

    .pay-method__bar--b { background: var(--color-success); }
    .pay-method__bar--c { background: var(--color-warning); }
    .pay-method__bar--d { background: var(--color-primary-muted); border: 1px solid var(--color-primary); }

    [data-theme="industrial"] .pay-method__bar--d {
      background: rgba(245, 166, 35, 0.2);
    }

    .pay-method__val {
      font-family: var(--font-mono);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-primary);
      min-width: 150px;
      text-align: right;
      white-space: nowrap;
    }

    /* =========================================================================
       DUAL BAR CHART (Ingresos vs Egresos)
       ========================================================================= */

    .dual-bar-chart {
      display: flex;
      align-items: flex-end;
      gap: var(--space-4);
      height: 160px;
      padding-bottom: var(--space-1);
    }

    .dual-bar-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-1);
      flex: 1;
      height: 100%;
      justify-content: flex-end;
    }

    .dual-bar-cols {
      display: flex;
      align-items: flex-end;
      gap: 3px;
      width: 100%;
      flex: 1;
    }

    .dual-bar {
      flex: 1;
      border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      min-height: 4px;
      transition: opacity var(--duration-fast) var(--ease-in-out);
    }

    [data-theme="industrial"] .dual-bar {
      border-radius: 0;
    }

    .dual-bar:hover {
      opacity: 0.8;
    }

    .dual-bar--ingreso {
      background: var(--color-success);
    }

    .dual-bar--egreso {
      background: var(--color-error);
    }

    .dual-bar-group__label {
      font-size: 0.65rem;
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      white-space: nowrap;
    }

    .dual-chart-legend {
      display: flex;
      gap: var(--space-4);
      margin-top: var(--space-3);
      margin-bottom: var(--space-4);
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: var(--radius-full);
      flex-shrink: 0;
    }

    .legend-dot--ingreso { background: var(--color-success); }
    .legend-dot--egreso  { background: var(--color-error); }

    /* =========================================================================
       MARGIN HELPERS
       ========================================================================= */

    .mb-4 { margin-bottom: var(--space-4); }
    .mb-5 { margin-bottom: var(--space-5); }

    /* =========================================================================
       PRINT STYLES
       ========================================================================= */

    @media print {
      .theme-bar,
      .sidebar,
      .tab-nav,
      .filter-bar,
      .content-header__actions,
      .export-group,
      .btn {
        display: none !important;
      }

      body {
        overflow: visible !important;
        font-size: 11pt;
        color: #000;
        background: #fff;
      }

      .app-shell {
        display: block;
        padding-top: 0;
        height: auto;
      }

      .main-content {
        overflow: visible;
        height: auto;
      }

      .content-body {
        overflow: visible;
        height: auto;
        padding: 0;
      }

      .tab-panel {
        display: block !important;
      }

      .kpi-card,
      .table-card,
      .bar-chart-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        border-radius: 0 !important;
      }

      .kpi-grid {
        grid-template-columns: repeat(4, 1fr) !important;
      }

      .data-table th,
      .data-table td {
        border: 1px solid #ddd;
        color: #000;
        background: #fff !important;
      }

      .content-header__title {
        color: #000;
        font-size: 18pt;
      }

      @page {
        margin: 1.5cm;
        size: A4 landscape;
      }
    }

    /* =========================================================================
       RESPONSIVE SIDEBAR COLLAPSE
       ========================================================================= */

    @media (max-width: 768px) {
      .sidebar {
        width: 56px;
      }

      .sidebar .brand-name,
      .sidebar .nav-item span,
      .sidebar .nav-section-label,
      .sidebar .profile-info {
        display: none;
      }

      .sidebar .nav-item {
        justify-content: center;
        padding: var(--space-3);
        border-left: none;
        border-bottom: 3px solid transparent;
      }

      .sidebar .nav-item.is-active {
        border-bottom-color: var(--color-primary);
      }

      .sidebar__brand {
        justify-content: center;
        padding: var(--space-3);
      }

      .sidebar__profile {
        justify-content: center;
      }

      .content-body {
        padding: var(--space-4);
      }

      .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }
