/* Extracted from dashboard.html */

/* ==========================================================================
       BASE RESET
       ========================================================================== */

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

    html {
      height: 100%;
    }

    body {
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-regular);
      background-color: var(--color-bg-base);
      color: var(--color-text-primary);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Modern theme dot-grid on body */
    [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);
    }

    a {
      text-decoration: none;
      color: inherit;
    }

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

    .theme-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 36px;
      z-index: var(--z-sticky);
      background-color: var(--color-surface-3);
      border-bottom: 1px solid var(--color-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 var(--space-5);
      font-size: var(--text-caption);
      font-family: var(--font-body);
      color: var(--color-text-muted);
      letter-spacing: var(--tracking-wide);
    }

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

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

    .theme-bar__label {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

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

    .theme-btn {
      height: 22px;
      padding: 0 var(--space-3);
      border-radius: var(--radius-full);
      border: none;
      cursor: pointer;
      font-family: var(--font-body);
      font-size: 11px;
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      background: transparent;
      color: var(--color-text-muted);
      transition: var(--transition-fast);
    }

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

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

    /* ==========================================================================
       APP SHELL — sidebar + main
       ========================================================================== */

    .app-shell {
      display: flex;
      flex: 1;
      margin-top: 36px; /* offset for fixed theme bar */
      min-height: calc(100vh - 36px);
      position: relative;
    }

    /* ==========================================================================
       SIDEBAR
       ========================================================================== */

    .sidebar {
      width: 260px;
      flex-shrink: 0;
      background-color: var(--color-bg-elevated);
      border-right: 1px solid var(--color-border);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 36px;
      left: 0;
      bottom: 0;
      z-index: var(--z-dropdown);
      transition: transform var(--duration-normal) var(--ease-in-out);
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }

    .sidebar__logo {
      padding: var(--space-5) var(--space-5) var(--space-4);
      border-bottom: 1px solid var(--color-border);
    }

    .sidebar__logo-text {
      font-family: var(--font-heading);
      font-weight: var(--heading-weight-primary);
      font-size: 1.125rem;
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      color: var(--color-primary);
      line-height: 1;
    }

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

    .sidebar__nav {
      flex: 1;
      padding: var(--space-4) 0;
    }

    .sidebar__section-label {
      font-size: 10px;
      font-weight: var(--font-weight-bold);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-muted);
      padding: var(--space-3) var(--space-5) var(--space-2);
      margin-top: var(--space-2);
    }

    .nav-link {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-3) var(--space-5);
      color: var(--color-text-secondary);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-regular);
      transition: var(--transition-fast);
      border-left: 3px solid transparent;
      position: relative;
    }

    .nav-link:hover {
      background-color: var(--color-surface-2);
      color: var(--color-text-primary);
    }

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

    .nav-link__icon {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      opacity: 0.7;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-link.active .nav-link__icon {
      opacity: 1;
    }

    .sidebar__footer {
      padding: var(--space-4) var(--space-5);
      border-top: 1px solid var(--color-border);
    }

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

    .user-chip__avatar {
      width: 32px;
      height: 32px;
      border-radius: var(--radius-full);
      background-color: var(--color-primary);
      color: var(--color-text-inverse);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-heading);
      font-weight: var(--font-weight-bold);
      font-size: 13px;
      flex-shrink: 0;
    }

    .user-chip__info {
      flex: 1;
      min-width: 0;
    }

    .user-chip__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;
    }

    .user-chip__role {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    /* ==========================================================================
       SIDEBAR OVERLAY (mobile backdrop)
       ========================================================================== */

    .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      top: 36px;
      background-color: var(--overlay-backdrop);
      z-index: calc(var(--z-dropdown) - 1);
    }

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

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

    /* ==========================================================================
       TOP HEADER BAR
       ========================================================================== */

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

    .header__left {
      display: flex;
      align-items: center;
      gap: var(--space-4);
    }

    .hamburger-btn {
      display: none;
      width: 36px;
      height: 36px;
      background: none;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      cursor: pointer;
      color: var(--color-text-secondary);
      align-items: center;
      justify-content: center;
      transition: var(--transition-fast);
    }

    .hamburger-btn:hover {
      background-color: var(--color-surface-2);
      color: var(--color-text-primary);
    }

    .header__greeting {
      display: flex;
      flex-direction: column;
    }

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

    .header__subtitle {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      margin-top: 1px;
    }

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

    .header__store-badge {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-2) var(--space-4);
      background-color: var(--color-primary-muted);
      border: 1px solid var(--color-border-accent);
      border-radius: var(--radius-md);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      color: var(--color-primary);
      letter-spacing: var(--tracking-wide);
    }

    .icon-btn {
      width: 36px;
      height: 36px;
      background: none;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      cursor: pointer;
      color: var(--color-text-secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition-fast);
      position: relative;
    }

    .icon-btn:hover {
      background-color: var(--color-surface-2);
      color: var(--color-text-primary);
    }

    .notif-dot {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 7px;
      height: 7px;
      border-radius: var(--radius-full);
      background-color: var(--color-error);
      border: 1.5px solid var(--color-bg-elevated);
    }

    /* ==========================================================================
       DASHBOARD CONTENT AREA
       ========================================================================== */

    .dashboard {
      flex: 1;
      padding: var(--space-6);
      display: flex;
      flex-direction: column;
      gap: var(--space-6);
      overflow-y: auto;
    }

    /* ==========================================================================
       SECTION TITLE
       ========================================================================== */

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

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

    .section-action {
      font-size: var(--text-caption);
      color: var(--color-primary);
      font-weight: var(--font-weight-semibold);
      cursor: pointer;
      letter-spacing: var(--tracking-wide);
    }

    .section-action:hover {
      text-decoration: underline;
    }

    /* ==========================================================================
       KPI CARDS ROW
       ========================================================================== */

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

    .kpi-card {
      background-color: 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-3);
      transition: var(--transition-normal);
      position: relative;
      overflow: hidden;
    }

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

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

    .kpi-card:hover {
      border-color: var(--color-border-strong);
      transform: translateY(-1px);
    }

    .kpi-card__accent-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background-color: var(--color-primary);
    }

    .kpi-card__label {
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .kpi-card__icon {
      width: 28px;
      height: 28px;
      border-radius: var(--radius-md);
      background-color: var(--color-primary-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-primary);
    }

    .kpi-card__value {
      font-family: var(--font-mono);
      font-size: 1.625rem;
      font-weight: var(--font-weight-bold);
      color: var(--color-text-primary);
      line-height: 1;
      letter-spacing: var(--tracking-tight);
    }

    .kpi-card__meta {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      font-size: var(--text-caption);
    }

    .kpi-tag {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      font-size: 11px;
      font-weight: var(--font-weight-semibold);
      padding: 2px var(--space-2);
      border-radius: var(--radius-full);
    }

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

    .kpi-tag--neutral {
      background-color: var(--color-surface-2);
      color: var(--color-text-muted);
    }

    .kpi-meta-text {
      color: var(--color-text-muted);
    }

    /* Progress bar inside KPI */
    .kpi-progress {
      margin-top: var(--space-1);
    }

    .kpi-progress__track {
      height: 4px;
      background-color: var(--color-surface-3);
      border-radius: var(--radius-full);
      overflow: hidden;
    }

    .kpi-progress__fill {
      height: 100%;
      background-color: var(--color-primary);
      border-radius: var(--radius-full);
      transition: width var(--duration-slow) var(--ease-out);
    }

    .kpi-progress__label {
      display: flex;
      justify-content: space-between;
      font-size: 10px;
      color: var(--color-text-muted);
      margin-top: var(--space-1);
    }

    /* ==========================================================================
       SALES CHART SECTION
       ========================================================================== */

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

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

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

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

    .period-selector {
      display: flex;
      gap: var(--space-1);
      background-color: var(--color-surface-2);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      padding: 3px;
    }

    .period-btn {
      padding: var(--space-1) var(--space-3);
      border-radius: var(--radius-sm);
      border: none;
      font-family: var(--font-body);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      cursor: pointer;
      background: transparent;
      color: var(--color-text-muted);
      transition: var(--transition-fast);
      letter-spacing: var(--tracking-wide);
    }

    .period-btn.active {
      background-color: var(--color-primary);
      color: var(--color-text-inverse);
    }

    .period-btn:not(.active):hover {
      color: var(--color-text-primary);
      background-color: var(--color-surface-3);
    }

    /* Bar chart */
    .bar-chart {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: var(--space-2);
      height: 140px;
      padding-bottom: var(--space-6);
      position: relative;
    }

    /* Horizontal grid lines */
    .bar-chart::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: var(--space-6);
      background-image:
        linear-gradient(to bottom,
          var(--color-border) 1px,
          transparent 1px,
          transparent 33%,
          var(--color-border) 33%,
          transparent 34%,
          transparent 66%,
          var(--color-border) 66%,
          transparent 67%
        );
      pointer-events: none;
    }

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

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

    .bar-chart__bar {
      width: 70%;
      max-width: 36px;
      background-color: var(--color-primary);
      border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      opacity: 0.85;
      transition: opacity var(--transition-fast), transform var(--transition-fast);
      cursor: pointer;
      position: relative;
    }

    .bar-chart__bar.today {
      opacity: 1;
      box-shadow: 0 0 12px rgba(0,0,0,0.3);
    }

    .bar-chart__bar:hover {
      opacity: 1;
      transform: scaleX(1.1);
    }

    /* Tooltip on hover */
    .bar-chart__bar::after {
      content: attr(data-value);
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      background-color: var(--color-surface-3);
      color: var(--color-text-primary);
      font-size: 10px;
      font-family: var(--font-mono);
      padding: 3px var(--space-2);
      border-radius: var(--radius-sm);
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      margin-bottom: 4px;
      border: 1px solid var(--color-border);
      transition: opacity var(--transition-fast);
    }

    .bar-chart__bar:hover::after {
      opacity: 1;
    }

    .bar-chart__label {
      font-size: 11px;
      color: var(--color-text-muted);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      position: absolute;
      bottom: 0;
    }

    .chart-legend {
      display: flex;
      gap: var(--space-5);
      margin-top: var(--space-3);
      flex-wrap: wrap;
    }

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

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

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

    /* ==========================================================================
       TWO-COLUMN SECTION (Top Productos / Top Clientes)
       ========================================================================== */

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

    .rank-card {
      background-color: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: var(--space-5);
    }

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

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

    .chart-canvas-wrap {
      position: relative;
      height: 220px;
      width: 100%;
    }

    .chart-canvas-wrap canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
    }

    .rank-list {
      display: flex;
      flex-direction: column;
      gap: var(--space-1);
    }

    .rank-item {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-3) var(--space-3);
      border-radius: var(--radius-md);
      transition: var(--transition-fast);
    }

    .rank-item:hover {
      background-color: var(--color-surface-2);
    }

    .rank-num {
      width: 22px;
      height: 22px;
      border-radius: var(--radius-full);
      background-color: var(--color-surface-3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: var(--font-weight-bold);
      color: var(--color-text-muted);
      flex-shrink: 0;
    }

    .rank-num--1 {
      background-color: rgba(234, 179, 8, 0.2);
      color: var(--color-warning);
    }

    .rank-num--2 {
      background-color: var(--color-surface-3);
      color: var(--color-text-secondary);
    }

    .rank-item__info {
      flex: 1;
      min-width: 0;
    }

    .rank-item__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;
    }

    .rank-item__sub {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      margin-top: 1px;
    }

    .rank-item__value {
      font-family: var(--font-mono);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-bold);
      color: var(--color-primary);
      flex-shrink: 0;
      text-align: right;
    }

    .rank-item__bar-bg {
      position: relative;
      height: 3px;
      background-color: var(--color-surface-3);
      border-radius: var(--radius-full);
      margin-top: var(--space-1);
      overflow: hidden;
    }

    .rank-item__bar-fill {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      background-color: var(--color-primary);
      border-radius: var(--radius-full);
      opacity: 0.6;
    }

    /* ==========================================================================
       ALERTS SECTION
       ========================================================================== */

    .alerts-grid {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
    }

    .alert-item {
      display: flex;
      align-items: flex-start;
      gap: var(--space-4);
      padding: var(--space-4);
      background-color: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      transition: var(--transition-fast);
    }

    .alert-item:hover {
      border-color: var(--color-border-strong);
    }

    .alert-item--error {
      border-left: 4px solid var(--color-error);
    }

    .alert-item--warning {
      border-left: 4px solid var(--color-warning);
    }

    .alert-item--orange {
      border-left: 4px solid var(--color-primary);
    }

    .alert-badge {
      flex-shrink: 0;
      min-width: 24px;
      height: 24px;
      padding: 0 var(--space-2);
      border-radius: var(--radius-full);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: var(--font-weight-bold);
      letter-spacing: var(--tracking-wide);
    }

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

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

    .alert-badge--orange {
      background-color: var(--color-primary-muted);
      color: var(--color-primary);
    }

    .alert-icon-wrap {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .alert-icon-wrap--error {
      background-color: rgba(239, 68, 68, 0.1);
      color: var(--color-error);
    }

    .alert-icon-wrap--warning {
      background-color: rgba(234, 179, 8, 0.1);
      color: var(--color-warning);
    }

    .alert-icon-wrap--orange {
      background-color: var(--color-primary-muted);
      color: var(--color-primary);
    }

    .alert-content {
      flex: 1;
      min-width: 0;
    }

    .alert-title {
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-primary);
    }

    .alert-desc {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      margin-top: 2px;
    }

    .alert-action {
      font-size: var(--text-caption);
      color: var(--color-primary);
      font-weight: var(--font-weight-semibold);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      align-self: center;
      padding: var(--space-1) var(--space-3);
      border: 1px solid var(--color-border-accent);
      border-radius: var(--radius-sm);
      transition: var(--transition-fast);
    }

    .alert-action:hover {
      background-color: var(--color-primary-muted);
    }

    /* ==========================================================================
       RECENT SALES TABLE
       ========================================================================== */

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

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

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

    .table-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: var(--space-4) var(--space-5);
      border-bottom: 1px solid var(--color-border);
    }

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

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: var(--text-body-sm);
      min-width: 520px;
    }

    thead {
      background-color: var(--color-surface-2);
    }

    th {
      padding: var(--space-3) var(--space-5);
      text-align: left;
      font-size: 11px;
      font-weight: var(--font-weight-bold);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-muted);
      white-space: nowrap;
    }

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

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

    tr:hover td {
      background-color: var(--color-surface-1);
    }

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

    .td-time {
      font-family: var(--font-mono);
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

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

    .td-products {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
      max-width: 180px;
    }

    .pago-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px var(--space-3);
      border-radius: var(--radius-full);
      font-size: 10px;
      font-weight: var(--font-weight-bold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
    }

    .pago-badge--efectivo {
      background-color: rgba(34, 197, 94, 0.12);
      color: var(--color-success);
    }

    .pago-badge--tarjeta {
      background-color: rgba(99, 102, 241, 0.12);
      color: #818cf8;
    }

    .pago-badge--transferencia {
      background-color: rgba(234, 179, 8, 0.12);
      color: var(--color-warning);
    }

    .pago-badge--credito {
      background-color: var(--color-primary-muted);
      color: var(--color-primary);
    }

    /* ==========================================================================
       MOBILE — Hamburger Menu & Responsive
       ========================================================================== */

    @media (max-width: 767px) {
      .sidebar {
        transform: translateX(-100%);
      }

      .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
      }

      .sidebar-overlay.open {
        display: block;
      }

      .main {
        margin-left: 0;
      }

      .hamburger-btn {
        display: flex;
      }

      .header__store-badge {
        display: none;
      }

      .dashboard {
        padding: var(--space-4);
        gap: var(--space-5);
      }

      .kpi-card__value {
        font-size: 1.25rem;
      }

      .header {
        padding: var(--space-3) var(--space-4);
      }
    }

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

      .alerts-grid {
        display: grid;
        grid-template-columns: 1fr;
      }
    }

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

      .alerts-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (min-width: 1280px) {
      .dashboard {
        padding: var(--space-8);
        gap: var(--space-8);
      }
    }

    /* ==========================================================================
       SVG ICONS — Inline utility
       ========================================================================== */

    svg {
      display: block;
    }
