    /* ========================================================
       URUCHAT & SAAS 2026 DESIGN SYSTEM TOKENS
       ======================================================== */
    :root {
      --bg-app: #f8fafc;
      --bg-surface: #ffffff;
      --bg-surface-subtle: #f1f5f9;
      --border-subtle: #e2e8f0;
      --border-focus: #cbd5e1;
      
      --primary: #CC0000;
      --primary-hover: #b30000;
      --primary-50: #fef2f2;
      --primary-100: #fee2e2;
      --primary-glow: rgba(204, 0, 0, 0.25);

      --uruchat-blue: #1f69ff;
      --uruchat-indigo: #4f46e5;
      
      --text-main: #0f172a;
      --text-muted: #64748b;
      --text-light: #94a3b8;
      
      --success: #10b981;
      --success-bg: #ecfdf5;
      --success-text: #047857;
      
      --warning: #f59e0b;
      --warning-bg: #fffbeb;
      --warning-text: #b45309;
      
      --danger: #ef4444;
      --danger-bg: #fef2f2;
      --danger-text: #b91c1c;

      --header-bg: #0f172a;
      --header-surface: #1e293b;
      --header-border: rgba(255, 255, 255, 0.08);

      --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.07);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    }

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

    :focus-visible {
      outline: 2px solid #4f46e5 !important;
      outline-offset: 2px !important;
    }

    .metric-value, .badge, table td, .price, .badge-num {
      font-variant-numeric: tabular-nums lining-nums;
    }

    h1, h2, h3 {
      text-wrap: balance;
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    body {
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background-color: var(--bg-app);
      color: var(--text-main);
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      -webkit-tap-highlight-color: transparent;
    }

    /* ========================================================
       SINGLE UNIFIED TOP NAVIGATION BAR (ONE ROW ONLY)
       ======================================================== */
    .app-header {
      background: var(--header-bg);
      border-bottom: 1px solid var(--header-border);
      position: sticky;
      top: 0;
      z-index: 1000;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }

    .header-unified-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.55rem 1.25rem;
      gap: 1rem;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 0.85rem;
    }

    .brand-text-link {
      text-decoration: none;
      display: flex;
      align-items: center;
    }

    .brand-app-name {
      color: #ffffff;
      font-size: 1.05rem;
      font-weight: 800;
      letter-spacing: -0.3px;
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }

    .brand-version-badge {
      background: var(--primary);
      color: #ffffff;
      font-size: 0.62rem;
      padding: 0.15rem 0.45rem;
      border-radius: 9999px;
      font-weight: 700;
      letter-spacing: 0.4px;
      box-shadow: 0 0 10px var(--primary-glow);
    }

    .nav-pipe-divider {
      width: 1px;
      height: 22px;
      background: rgba(255, 255, 255, 0.14);
      margin: 0 0.25rem;
    }

    /* Inline Nav Menu (One Single Row) */
    .header-nav-inline {
      display: flex;
      align-items: center;
      gap: 0.3rem;
    }

    .nav-btn-direct {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.45rem 0.85rem;
      border-radius: 4px;
      border: 1px solid transparent;
      background: transparent;
      color: #cbd5e1;
      font-family: inherit;
      font-size: 0.86rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      user-select: none;
    }
    .nav-btn-direct:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
    }
    .nav-btn-direct.active {
      background: var(--primary);
      color: #ffffff;
      font-weight: 700;
      box-shadow: 0 2px 8px var(--primary-glow);
    }

    /* Dropdown Group Container */
    .dropdown-group {
      position: relative;
      display: inline-block;
    }

    .dropdown-trigger-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.45rem 0.85rem;
      border-radius: 4px;
      border: 1px solid transparent;
      background: transparent;
      color: #cbd5e1;
      font-family: inherit;
      font-size: 0.86rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      user-select: none;
    }
    .dropdown-trigger-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
    }
    .dropdown-trigger-btn.active-parent {
      background: var(--primary) !important;
      color: #ffffff !important;
      font-weight: 700 !important;
      border-color: transparent !important;
      box-shadow: 0 2px 8px var(--primary-glow);
    }

    /* Dropdown Floating Menu Box */
    .dropdown-menu-box {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      min-width: 240px;
      background: #1e293b;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 4px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
      padding: 0.35rem;
      display: none;
      flex-direction: column;
      gap: 0.2rem;
      z-index: 1200;
      backdrop-filter: blur(12px);
      animation: dropdownFadeIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes dropdownFadeIn {
      from { opacity: 0; transform: translateY(-3px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (min-width: 861px) {
      .dropdown-group:hover .dropdown-menu-box,
      .dropdown-group.open .dropdown-menu-box {
        display: flex;
      }
    }

    .dropdown-item-btn {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.55rem 0.85rem;
      border-radius: 4px;
      border: none;
      background: transparent;
      color: #cbd5e1;
      font-family: inherit;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      text-align: left;
      transition: all 0.15s ease;
      width: 100%;
    }
    .dropdown-item-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
      transform: translateX(2px);
    }
    .dropdown-item-btn.active {
      background: var(--primary);
      color: #ffffff;
      font-weight: 700;
      box-shadow: 0 2px 6px var(--primary-glow);
    }

    /* Right Zone: Badges and User Actions */
    .header-right {
      display: flex;
      align-items: center;
      gap: 0.65rem;
    }

    .header-badges {
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }

    .header-pill-badge {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 0.22rem 0.6rem;
      border-radius: 9999px;
      font-size: 0.74rem;
      font-weight: 600;
      color: #cbd5e1;
      display: flex;
      align-items: center;
      gap: 0.35rem;
      white-space: nowrap;
    }

    .pulse-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 8px var(--success);
      display: inline-block;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.55rem;
    }

    .btn-header-link {
      background: rgba(255, 255, 255, 0.08);
      color: #f1f5f9;
      border: 1px solid rgba(255, 255, 255, 0.14);
      padding: 0.35rem 0.75rem;
      border-radius: 0.5rem;
      font-size: 0.78rem;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .btn-header-link:hover {
      background: rgba(255, 255, 255, 0.16);
      color: #ffffff;
    }

    .user-tag {
      background: rgba(0, 0, 0, 0.3);
      padding: 0.3rem 0.65rem;
      border-radius: 0.5rem;
      color: #cbd5e1;
      font-size: 0.78rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.35rem;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .btn-header-logout {
      background: rgba(239, 68, 68, 0.18);
      color: #fca5a5;
      border: 1px solid rgba(239, 68, 68, 0.35);
      padding: 0.35rem 0.75rem;
      border-radius: 0.5rem;
      font-size: 0.78rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .btn-header-logout:hover {
      background: var(--danger);
      color: #ffffff;
    }

    /* Mobile Hamburger */
    .mobile-hamburger-btn {
      display: none;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.14);
      color: #ffffff;
      width: 36px;
      height: 36px;
      border-radius: 0.5rem;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .mobile-hamburger-btn:hover {
      background: rgba(255, 255, 255, 0.18);
    }

    @media (max-width: 1100px) {
      .header-badges {
        display: none;
      }
    }

    @media (max-width: 860px) {
      .header-nav-inline, .nav-pipe-divider {
        display: none;
      }
      .mobile-hamburger-btn {
        display: inline-flex;
      }
    }

    /* ========================================================
       MOBILE DRAWER SLIDE-IN (STRICTLY HIDDEN ON DESKTOP)
       ======================================================== */
    .mobile-drawer {
      display: none;
    }
    .mobile-backdrop {
      display: none;
    }

    @media (max-width: 860px) {
      .mobile-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.7);
        backdrop-filter: blur(4px);
        z-index: 2000;
      }

      .mobile-drawer {
        display: flex;
        position: fixed;
        top: 0;
        left: -300px;
        width: 285px;
        height: 100vh;
        background: #0f172a;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 2050;
        flex-direction: column;
        overflow-y: auto;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      }
      .mobile-drawer.open {
        transform: translateX(300px);
      }

      .mobile-drawer-header {
        padding: 1.25rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .mobile-drawer-close {
        background: transparent;
        border: none;
        color: #94a3b8;
        font-size: 1.4rem;
        cursor: pointer;
        padding: 0.25rem;
      }

      .mobile-drawer-body {
        padding: 1rem 0.75rem 2rem;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
      }

      .mobile-section-header {
        font-size: 0.72rem;
        font-weight: 800;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: 0.6px;
        margin: 0.8rem 0.5rem 0.25rem;
      }

      .mobile-nav-link {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.65rem 0.85rem;
        border-radius: 0.5rem;
        border: none;
        background: transparent;
        color: #cbd5e1;
        font-family: inherit;
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        text-align: left;
        width: 100%;
        transition: all 0.15s ease;
      }
      .mobile-nav-link:hover, .mobile-nav-link:active {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
      }
      .mobile-nav-link.active {
        background: var(--primary);
        color: #ffffff;
        font-weight: 700;
      }
    }

    /* ========================================================
       MAIN APP WORKSPACE
       ======================================================== */
    .main-workspace {
      flex: 1;
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 1.35rem 1.5rem 3rem;
    }

    @media (max-width: 768px) {
      .main-workspace {
        padding: 0.85rem 0.85rem 3rem;
      }
    }

    .page-header-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.25rem;
      padding-bottom: 0.65rem;
      border-bottom: 1.5px solid var(--border-subtle);
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .page-title {
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--text-main);
      letter-spacing: -0.3px;
    }

    /* Tab Sections */
    .tab-view-section { display: none; }
    .tab-view-section.active { display: block; }

    /* ========================================================
       DASHBOARD & STATS CARDS
       ======================================================== */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 1rem;
      margin-bottom: 1.25rem;
    }

    @media (max-width: 600px) {
      .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
      }
    }

    .stat-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 1.15rem;
      box-shadow: var(--shadow-sm);
      transition: all 0.2s ease;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .stat-card:hover {
      box-shadow: var(--shadow-md);
      border-color: #cbd5e1;
      transform: translateY(-2px);
    }
    .stat-label {
      font-size: 0.78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .stat-value {
      font-size: 1.85rem;
      font-weight: 800;
      color: var(--primary);
      margin-top: 0.35rem;
      letter-spacing: -0.5px;
    }

    @media (max-width: 600px) {
      .stat-card {
        padding: 0.85rem;
      }
      .stat-value {
        font-size: 1.45rem;
      }
    }

    /* ========================================================
       URUCHAT CONVERSATION VIEW & RAG TELEMETRY SUITE
       ======================================================== */
    .uruchat-suite-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 1.25rem;
      box-shadow: var(--shadow-sm);
    }

    /* Mobile Segmented Switch (Chat vs Telemetry) */
    .mobile-segmented-switch {
      display: none;
      background: var(--bg-surface-subtle);
      padding: 0.25rem;
      border-radius: 4px;
      border: 1px solid var(--border-subtle);
      margin-bottom: 1rem;
      grid-template-columns: 1fr 1fr;
      gap: 0.25rem;
    }

    @media (max-width: 1024px) {
      .mobile-segmented-switch {
        display: grid;
      }
    }

    .segmented-btn {
      padding: 0.5rem;
      border-radius: 4px;
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-family: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .segmented-btn.active {
      background: var(--bg-surface);
      color: var(--text-main);
      box-shadow: var(--shadow-xs);
      font-weight: 700;
    }

    .uruchat-grid-layout {
      display: grid;
      grid-template-columns: 1.25fr 1fr;
      gap: 1.25rem;
      height: calc(100vh - 340px);
      min-height: 540px;
      margin-top: 1rem;
    }

    @media (max-width: 1024px) {
      .uruchat-grid-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
      }
      .panel-telemetry {
        display: none;
      }
      .panel-telemetry.mobile-active {
        display: flex !important;
      }
      .panel-conversation.mobile-hidden {
        display: none !important;
      }
    }

    /* Left Pane: Conversation */
    .panel-conversation {
      background: #ffffff;
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: var(--shadow-xs);
      height: 100%;
      min-height: 480px;
    }

    .conversation-header {
      background: #0f172a;
      color: #ffffff;
      padding: 0.75rem 1.15rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .conversation-messages {
      flex: 1;
      overflow-y: auto;
      padding: 1.15rem;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      background: #f8fafc;
    }

    /* Uruchat Speech Bubbles */
    .chat-bubble-user {
      align-self: flex-end;
      max-width: 85%;
      background: #0f172a;
      color: #ffffff;
      border-radius: 0.85rem 0.85rem 0.2rem 0.85rem;
      padding: 0.75rem 1rem;
      font-size: 0.9rem;
      line-height: 1.45;
      box-shadow: var(--shadow-sm);
      word-break: break-word;
    }

    .chat-bubble-bot {
      align-self: flex-start;
      max-width: 88%;
      background: #ffffff;
      color: var(--text-main);
      border: 1px solid var(--border-subtle);
      border-radius: 0.85rem 0.85rem 0.85rem 0.2rem;
      padding: 0.85rem 1.1rem;
      font-size: 0.9rem;
      line-height: 1.5;
      box-shadow: var(--shadow-xs);
      word-break: break-word;
    }

    /* Typing wave indicator */
    .uruchat-typing {
      display: none;
      align-self: flex-start;
      background: #ffffff;
      border: 1px solid var(--border-subtle);
      border-radius: 1rem;
      padding: 0.5rem 0.85rem;
      box-shadow: var(--shadow-xs);
    }
    .typing-dots {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .typing-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--text-muted);
      animation: typingWave 1.4s infinite ease-in-out both;
    }
    .typing-dot:nth-child(1) { animation-delay: -0.32s; }
    .typing-dot:nth-child(2) { animation-delay: -0.16s; }

    @keyframes typingWave {
      0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
      40% { transform: scale(1); opacity: 1; }
    }

    /* Chat Composer */
    .conversation-composer {
      display: flex;
      gap: 0.5rem;
      padding: 0.75rem 1rem;
      background: #ffffff;
      border-top: 1px solid var(--border-subtle);
      align-items: center;
    }

    .composer-input {
      flex: 1;
      margin: 0;
      padding: 0.65rem 0.9rem;
      font-size: 0.92rem;
      border-radius: 4px;
      border: 1px solid var(--border-subtle);
      background: #f8fafc;
      transition: all 0.15s ease;
    }
    .composer-input:focus {
      background: #ffffff;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--primary-glow);
    }

    /* Right Pane: Telemetry */
    .panel-telemetry {
      background: #ffffff;
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: var(--shadow-xs);
      height: 100%;
      min-height: 480px;
    }

    .telemetry-header-bar {
      background: #f8fafc;
      padding: 0.75rem 1.15rem;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .telemetry-body-content {
      flex: 1;
      overflow-y: auto;
      padding: 1.15rem;
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
      font-size: 0.85rem;
    }

    /* Telemetry Card Containers */
    .prop-card {
      background: #f8fafc;
      border: 1px solid var(--border-subtle);
      border-radius: 4px;
      padding: 0.75rem 0.9rem;
    }

    .prop-title {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      margin-bottom: 0.4rem;
      display: flex;
      justify-content: space-between;
    }

    /* Quick Prompts Bar */
    .quick-chips-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      align-items: center;
      margin-top: 0.75rem;
    }

    .chip-btn {
      background: #f1f5f9;
      border: 1px solid var(--border-subtle);
      color: var(--text-main);
      padding: 0.35rem 0.75rem;
      border-radius: 4px;
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
    }
    .chip-btn:hover {
      background: var(--primary-50);
      border-color: var(--primary);
      color: var(--primary);
      transform: translateY(-1px);
    }

    /* ========================================================
       FORMS, TABLES & MODALS
       ======================================================== */
    .card-box {
      background-color: var(--bg-surface);
      padding: 1.5rem;
      border-radius: 6px;
      border: 1px solid var(--border-subtle);
      margin-top: 1rem;
      box-shadow: var(--shadow-sm);
    }

    label {
      display: block;
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--text-muted);
      margin-top: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    textarea, input, select {
      width: 100%;
      padding: 0.65rem 0.85rem;
      border-radius: 4px;
      border: 1px solid var(--border-subtle);
      background-color: #fff;
      color: var(--text-main);
      font-family: inherit;
      font-size: 0.92rem;
      margin-top: 0.35rem;
      transition: all 0.15s ease;
    }

    @media (max-width: 768px) {
      textarea, input, select {
        font-size: 16px; /* Avoid auto-zoom */
      }
    }

    textarea:focus, input:focus, select:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--primary-glow);
    }

    button.btn-action {
      padding: 0.55rem 1.15rem;
      border-radius: 4px;
      border: none;
      background-color: var(--primary);
      color: white;
      font-family: inherit;
      font-weight: 700;
      font-size: 0.86rem;
      cursor: pointer;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      user-select: none;
    }
    button.btn-action:hover {
      background-color: var(--primary-hover);
      transform: translateY(-1px);
      box-shadow: var(--shadow-md);
    }
    button.btn-action:active { transform: translateY(0); }
    button.btn-danger { background-color: var(--danger); }
    button.btn-danger:hover { background-color: #dc2626; }
    button.btn-success { background-color: var(--success); }
    button.btn-success:hover { background-color: #059669; }
    button.btn-secondary { background-color: #64748b; }
    button.btn-secondary:hover { background-color: #475569; }

    /* Tables */
    .table-container {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin-top: 1rem;
      border-radius: 6px;
      border: 1px solid var(--border-subtle);
      box-shadow: var(--shadow-xs);
      background-color: var(--bg-surface);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      background-color: var(--bg-surface);
      min-width: 650px;
    }

    th, td {
      padding: 0.8rem 1rem;
      text-align: left;
      border-bottom: 1px solid var(--border-subtle);
      font-size: 0.88rem;
    }

    th {
      background-color: #f8fafc;
      color: var(--text-muted);
      font-size: 0.74rem;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.5px;
    }

    tr:hover { background-color: #f8fafc; }

    .badge {
      padding: 0.25rem 0.6rem;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: capitalize;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
    }
    .badge.pendiente { background-color: var(--warning-bg); color: var(--warning-text); }
    .badge.confirmado { background-color: var(--success-bg); color: var(--success-text); }
    .badge.rechazado { background-color: var(--danger-bg); color: var(--danger-text); }
    .badge.entregado { background-color: var(--primary-50); color: var(--primary); }

    .img-thumb {
      width: 44px;
      height: 44px;
      object-fit: cover;
      border-radius: 4px;
      border: 1px solid var(--border-subtle);
      background-color: #f8fafc;
    }

    /* Filters */
    .filter-bar {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 1rem;
      flex-wrap: wrap;
    }
    .filter-btn {
      padding: 0.45rem 0.85rem;
      border-radius: 4px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-muted);
      cursor: pointer;
      font-family: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      transition: all 0.15s;
    }
    .filter-btn:hover {
      border-color: var(--primary);
      color: var(--primary);
    }
    .filter-btn.active {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    h3 { color: var(--text-main); font-size: 1.18rem; font-weight: 800; }

    /* Modals */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: rgba(15, 23, 42, 0.7);
      backdrop-filter: blur(5px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 3000;
      padding: 1rem;
    }
    .modal-overlay.active { display: flex; }
    .modal-card {
      background-color: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      width: 100%;
      max-width: 750px;
      max-height: 90vh;
      overflow-y: auto;
      padding: 1.5rem;
      box-shadow: var(--shadow-xl);
      animation: modalFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes modalFadeIn {
      from { opacity: 0; transform: scale(0.96); }
      to { opacity: 1; transform: scale(1); }
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 0.75rem;
      border-bottom: 2px solid var(--primary);
      margin-bottom: 1rem;
      gap: 0.5rem;
    }

    @media print {
      body { background: white; color: black; }
      .app-header, .page-header-bar, .filter-bar, .modal-header button, .no-print, .mobile-drawer, .mobile-backdrop { display: none !important; }
      .modal-card { border: none; width: 100%; max-width: 100%; box-shadow: none; padding: 0; }
      table { background: white; color: black; border: 1px solid #ccc; min-width: 100%; }
      th, td { border: 1px solid #ccc; color: black; }
    }