

    /* Layout (legacy rules; .admin-layout flex rules below are authoritative) */
    .admin-shell.admin-collapsed .admin-sidebar { margin-left: calc(-1 * var(--sidebar-width, 236px)); }

    /* Mobile Header */
    .mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); padding: 0 16px; align-items: center; gap: 12px; z-index: 150; }
    .mobile-header-toggle:hover { background: var(--accent-light); }
    .mobile-header-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .hamburger { display: block; width: 20px; height: 2px; background: var(--text-primary); position: relative; }
    .hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-primary); transition: transform var(--transition-base); }
    .hamburger::before { top: -6px; }
    .hamburger::after { bottom: -6px; }
    .mobile-header-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
    .admin-logo-text { font-size: 16px; font-weight: 600; color: var(--text-primary); }
    .admin-logo-text span { color: var(--accent); }
    /* Primary text tone: the muted/secondary shades fall under AA on the
       subtle badge surface at 11px. */
    .admin-badge { font-size: 11px; background: var(--border-subtle); color: var(--text-primary); padding: 2px 8px; border-radius: 4px; font-weight: 600; margin-left: auto; }

    /* Stacked submenu: indented group beneath its section header.
       No connector line: the ::before rail painted over unrelated sections
       whenever the nav grew. */
    .nav-submenu { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; padding-left: 24px; }
    .nav-link.active::before { content: none; }
    .page-header h1 { font-size: 24px; font-weight: 700; }

    /* Stats */
    .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
    .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
    .stat-card .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
    .stat-card .value { font-size: 28px; font-weight: 700; }
    .stat-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
    th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
    th { background: var(--surface-2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
    tr:last-child td { border-bottom: none; }
    tr:hover td { background: var(--surface-2); }
    .btn-primary:hover { background: var(--accent-hover); }
    .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
    .btn-danger:hover { background: var(--error); }

    /* Settings */
    .settings-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
    .settings-cat-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
    .settings-cat-btn:hover { border-color: var(--accent); color: var(--accent); }
    .settings-cat-btn.active { background: var(--accent); color: var(--text-inverse); border-color: var(--accent); }
    .settings-content { display: grid; gap: 16px; }
    .settings-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
    .settings-group-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
    .setting-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--surface-2); }
    .setting-row:last-child { border-bottom: none; }
    .setting-label { font-size: 13px; }
    .setting-label .key { font-weight: 600; color: var(--text); }
    .setting-label .desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
    .setting-input { width: 100%; }
    .setting-dirty { border-left: 3px solid var(--warning); padding-left: 8px; }
    /* Form controls are owned by styles/components.css (one 40px input). */
    .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
    .form-check input { width: auto; }

    /* Pages */
    .page { display: none; }
    .page.active { display: block; }
    .modal-overlay.open { display: flex; }

    /* Modern admin modal: padded card, sticky header band, sticky footer,
       corner close button. Light-first token system (no gradients/glass). */
    .modal-overlay .modal {
      max-width: 840px;
      width: min(840px, 100%);
      padding: var(--space-6);
      border: 1px solid var(--border-default);
      box-shadow: var(--shadow-2xl);
    }

    /* Bare h2 becomes the modal header: full-bleed band with hairline rule,
       sticky while the body scrolls beneath it. */
    .modal-overlay .modal > h2 {
      margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-5);
      padding: var(--space-5) var(--space-14) var(--space-5) var(--space-6);
      border-bottom: 1px solid var(--border-subtle);
      font-size: var(--text-xl);
      font-weight: var(--font-semibold);
      letter-spacing: var(--tracking-tight);
      color: var(--text-primary);
      background: var(--bg-elevated);
      position: sticky;
      top: 0;
      z-index: 2;
    }

    /* Sticky footer band: actions stay reachable on tall modals. */
    .modal-overlay .modal > .modal-footer {
      margin: var(--space-5) calc(-1 * var(--space-6)) calc(-1 * var(--space-6));
      background: var(--bg-elevated);
      position: sticky;
      bottom: 0;
      z-index: 2;
    }

    /* Corner close button (injected by the modal bootstrap script). */
    .modal-close-x {
      position: absolute;
      top: var(--space-3);
      right: var(--space-3);
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-size: 20px;
      line-height: 1;
      border-radius: var(--radius-md);
      cursor: pointer;
      z-index: 3;
      transition: background var(--transition-fast), color var(--transition-fast);
    }
    .modal-close-x:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }
    .modal-close-x:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }

    /* Status Bar */
    .status-bar { position: fixed; bottom: 24px; right: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 20px; box-shadow: var(--shadow-lg); font-size: 13px; z-index: 100; display: none; }
    .status-bar.show { display: block; }
    .status-bar.success { border-color: var(--success); color: var(--success); }
    .status-bar.error { border-color: var(--error); color: var(--error); }
    .status-bar.working { border-color: var(--accent); }

    /* Search */
    .search-bar { margin-bottom: 20px; }
    .search-bar input { width: 100%; max-width: 300px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); }
    .empty-state-compact {
      min-height: 120px;
      max-height: 160px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      text-align: center;
      padding: 20px;
    }
    td.empty-state-compact { display: table-cell; }

    .dashboard-stat-card::before { content: none; }

    .dashboard-stat-card.stat-success::before { content: none; }
    .dashboard-stat-card.stat-info::before { content: none; }
    .dashboard-stat-card.stat-warning::before { content: none; }

    /* Provider Health Status */
    .provider-health-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .provider-health-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      background: var(--surface-2);
      border-radius: 10px;
      transition: all 0.15s ease;
    }

    .provider-health-item:hover {
      background: var(--border-soft);
    }

    .provider-health-indicator {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
      animation: pulse 2s infinite;
    }

    .provider-health-indicator.healthy { background: var(--success); }
    .provider-health-indicator.degraded { background: var(--warning); animation: pulse-degraded 2s infinite; }
    .provider-health-indicator.unhealthy { background: var(--error); }
    .provider-health-indicator.unknown { background: var(--text-muted); animation: none; }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    @keyframes pulse-degraded {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.75; }
    }

    .provider-health-info {
      flex: 1;
      min-width: 0;
    }

    .provider-health-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 2px;
    }

    .provider-health-meta {
      font-size: 11px;
      color: var(--text-muted);
    }

    .provider-health-badge {
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
    }

    .provider-health-badge.healthy { background: var(--success-bg); color: var(--success); }
    .provider-health-badge.degraded { background: var(--warning-bg); color: var(--warning); }
    .provider-health-badge.unhealthy { background: var(--error-bg); color: var(--error); }
    .provider-health-badge.unknown { background: var(--surface-2); color: var(--text-muted); }

    /* Usage Chart */
    .dash-usage-chart-bar {
      flex: 1;
      background: var(--accent);
      border-radius: 6px 6px 0 0;
      min-height: 8px;
      transition: all 0.2s ease;
      position: relative;
      cursor: pointer;
    }

    .dash-usage-chart-bar:hover {
      background: var(--accent-hover);
      transform: scaleY(1.02);
      transform-origin: bottom;
    }

    .dash-usage-chart-label {
      font-size: 10px;
      color: var(--text-muted);
      text-align: center;
      margin-top: 8px;
    }

    .dash-usage-chart-tooltip {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      background: var(--text);
      color: var(--text-inverse);
      padding: 6px 10px;
      border-radius: 6px;
      font-size: 12px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s;
      margin-bottom: 8px;
      z-index: 10;
    }

    .dash-usage-chart-bar:hover .dash-usage-chart-tooltip {
      opacity: 1;
    }

    /* Top Models */
    .top-models-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .top-model-item {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .top-model-rank {
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--surface-2);
      border-radius: 6px;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
    }

    .top-model-item:first-child .top-model-rank { background: var(--warning-bg); color: var(--warning); }
    .top-model-item:nth-child(2) .top-model-rank { background: var(--border-soft); color: var(--text-secondary); }
    .top-model-item:nth-child(3) .top-model-rank { background: var(--warning-bg); color: var(--warning); }

    .top-model-info {
      flex: 1;
      min-width: 0;
    }

    .top-model-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .top-model-requests {
      font-size: 11px;
      color: var(--text-muted);
    }

    .top-model-bar {
      width: 60px;
      height: 6px;
      background: var(--surface-2);
      border-radius: 3px;
      overflow: hidden;
    }

    .top-model-bar-fill {
      height: 100%;
      background: var(--accent);
      border-radius: 3px;
      transition: width 0.3s ease;
    }

    /* Activity Feed */
    .activity-feed {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 320px;
      overflow-y: auto;
    }

    .activity-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px;
      background: var(--surface-2);
      border-radius: 8px;
      transition: background 0.15s;
    }

    .activity-item:hover {
      background: var(--border-soft);
    }

    .activity-icon {
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .activity-icon svg {
      width: 14px;
      height: 14px;
    }

    .activity-icon.user { background: var(--info-bg); color: var(--info); }
    .activity-icon.subscription { background: var(--success-bg); color: var(--success); }
    .activity-icon.payment { background: var(--warning-bg); color: var(--warning); }
    .activity-icon.api { background: var(--accent-light); color: var(--accent); }
    .activity-icon.alert { background: var(--error-bg); color: var(--error); }

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

    .activity-text {
      font-size: 12px;
      color: var(--text);
      line-height: 1.4;
    }

    .activity-text strong {
      font-weight: 600;
    }

    .activity-time {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 2px;
    }

    /* Quick Actions */
    .quick-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .quick-action-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 16px 12px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.15s ease;
      font-family: inherit;
    }

    .quick-action-btn:hover {
      background: var(--accent-light);
      border-color: var(--accent);
      color: var(--accent);
    }

    .quick-action-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .quick-action-btn svg {
      width: 20px;
      height: 20px;
      color: var(--text-muted);
      transition: color 0.15s;
    }

    .quick-action-btn:hover svg {
      color: var(--accent);
    }

    .quick-action-btn span {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      transition: color 0.15s;
    }

    .quick-action-btn:hover span {
      color: var(--accent);
    }

    /* Responsive adjustments for dashboard */
    @media (max-width: 1279px) {
    }

    @media (max-width: 768px) {

      div[style*="grid-template-columns:1.2fr 1fr"] {
        grid-template-columns: 1fr !important;
      }

      div[style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
      }
    }

    @media (max-width: 640px) {

      .quick-actions {
        grid-template-columns: 1fr 1fr 1fr 1fr;
      }
    }

    /* Mono */
    .mono { font-family: 'SF Mono', 'Fira Code', Consolas, monospace; font-size: 12px; }

    /* Toggle */
    .toggle { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-2); position: relative; cursor: pointer; transition: background 0.15s; border: 1px solid var(--border); }
    .toggle::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: white; top: 2px; left: 2px; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
    .toggle.on { background: var(--success); border-color: var(--success); }
    .toggle.on::after { transform: translateX(18px); }

    /* Effective Value Display in Plan Editor */
    .effective-value-card {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      margin-top: 20px;
    }
    
    .effective-value-card h4 {
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .effective-value-card h4::before {
      content: '';
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--info);
    }
    
    .effective-values-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    
    .effective-value-item {
      text-align: center;
      padding: 12px;
      background: var(--surface);
      border-radius: 8px;
      border: 1px solid var(--border);
    }
    
    .effective-value-label {
      font-size: 11px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }
    
    .effective-value-number {
      font-size: 20px;
      font-weight: 700;
      color: var(--accent);
    }
    
    .effective-value-note {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    
    .effective-value-state {
      margin-top: 12px;
      padding: 8px 12px;
      background: var(--warning-bg);
      border: 1px solid var(--warning);
      border-radius: 6px;
      font-size: 12px;
      color: var(--warning);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .state-normal { background: var(--success-bg); border-color: var(--success); color: var(--success); }
    .state-guarded { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
    .state-throttled { background: var(--error-bg); border-color: var(--error); color: var(--error); }
    .state-restricted { background: var(--error-bg); border-color: var(--error); color: var(--error); }
    
    /* Throttle Limits Section */
    .throttle-limits-info {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }
    
    .throttle-limit-item {
      padding: 12px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      text-align: center;
    }
    
    .throttle-limit-label {
      font-size: 11px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }
    
    .throttle-limit-value {
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
    }
    
    .throttle-limit-empty {
      color: var(--text-muted);
      font-style: italic;
    }
    
    /* Configured vs Effective Column Layout */
    .limits-comparison-table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 16px;
    }
    
    .limits-comparison-table th {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      padding: 8px 12px;
      border-bottom: 2px solid var(--border);
      text-align: left;
    }
    
    .limits-comparison-table th:nth-child(2) {
      background: var(--accent-light);
      color: var(--accent);
    }
    
    .limits-comparison-table th:nth-child(3) {
      background: var(--info-bg);
      color: var(--info);
    }
    
    .limits-comparison-table td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--surface-2);
      font-size: 13px;
    }
    
    .limits-comparison-table tr:hover td {
      background: var(--surface-2);
    }
    
    .limit-input-cell input {
      width: 100%;
      padding: 8px 10px;
      border: 1px solid var(--border);
      border-radius: 6px;
      font-size: 14px;
      font-family: inherit;
      background: var(--surface);
    }
    
    .limit-input-cell input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(23, 105, 209, 0.1);
    }
    
    .effective-value-cell {
      font-weight: 600;
      color: var(--accent);
    }
    
    .effective-value-cell.modified {
      color: var(--warning);
    }
    
    .effective-source {
      font-size: 10px;
      color: var(--text-muted);
      display: block;
      margin-top: 2px;
    }

    /* Plan Editor - Premium Tabbed Interface */
    .plan-editor {
      max-width: 760px;
      min-height: 500px;
      display: flex;
      flex-direction: column;
    }

    .plan-editor-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .plan-editor-header h2 {
      font-size: 20px;
      font-weight: 700;
      margin: 0;
    }

    .plan-editor-footer {
      margin-top: 24px;
      padding-top: 20px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: flex-end;
    }

    .plan-tabs {
      display: flex;
      gap: 2px;
      margin-bottom: 20px;
      border-bottom: 2px solid var(--border);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .plan-tabs::-webkit-scrollbar { display: none; }

    .plan-tab {
      padding: 10px 18px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-muted);
      background: none;
      border: none;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
      border-radius: 6px 6px 0 0;
    }

    .plan-tab:hover {
      color: var(--text);
      background: var(--surface-2);
    }

    .plan-tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
      background: var(--accent-light);
    }

    .plan-tab-content {
      display: none;
      flex: 1;
      overflow-y: auto;
      max-height: 65vh;
      padding-right: 8px;
    }

    .plan-tab-content.active {
      display: block;
    }

    .tab-section-title {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--surface-2);
    }

    .req {
      color: var(--error);
    }

    /* Wire toggle grid */
    .wire-toggle-grid {
      display: grid;
      gap: 8px;
    }

    .wire-toggle-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 8px;
      transition: border-color 0.15s;
    }

    .wire-toggle-item:hover {
      border-color: var(--accent);
    }

    .wire-toggle-name {
      font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
      font-size: 13px;
      color: var(--text);
    }

    .wire-toggle-btns {
      display: flex;
      gap: 4px;
    }

    .wt-btn {
      padding: 4px 10px;
      font-size: 11px;
      font-weight: 600;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--surface);
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s;
    }

    .wt-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .wt-btn.wt-allowed-active {
      background: var(--success-bg);
      border-color: var(--success);
      color: var(--success);
    }

    .wt-btn.wt-blocked-active {
      background: var(--error-bg);
      border-color: var(--error);
      color: var(--error);
    }

    .wt-btn.wt-excluded-active {
      background: var(--surface-2);
      border-color: var(--border-strong);
      color: var(--text);
    }

    /* Form improvements for plan editor */
    .plan-tab-content .form-group {
      margin-bottom: 16px;
    }

    .plan-tab-content .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .plan-tab-content label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 4px;
      color: var(--text);
    }

    .plan-tab-content input,
    .plan-tab-content select,
    .plan-tab-content textarea {
      width: 100%;
      padding: 9px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      background: var(--surface);
      color: var(--text);
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .plan-tab-content input:focus,
    .plan-tab-content select:focus,
    .plan-tab-content textarea:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(23, 105, 209, 0.1);
    }

    .plan-tab-content input[readonly] {
      background: var(--surface-2);
      color: var(--text-muted);
      cursor: not-allowed;
    }

    .input-hint {
      display: block;
      margin-top: 4px;
      font-size: 12px;
      color: var(--text-muted);
    }

    /* === Premium Wire Management === */

    /* Wire detail page */
    .wire-detail-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 24px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--border);
    }

    .wire-detail-title {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .wire-detail-title h2 {
      font-size: 24px;
      font-weight: 700;
      margin: 0;
    }

    .wire-detail-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 8px;
    }

    .wire-actions {
      display: flex;
      gap: 8px;
    }

    /* Wire chain visualization */
    .wire-chain-container {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px;
      margin-bottom: 24px;
    }

    .wire-chain-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .wire-chain {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .route-card {
      background: var(--surface);
      border: 2px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 20px;
      position: relative;
      transition: all 0.15s ease;
      cursor: grab;
    }

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

    .route-card.dragging {
      opacity: 0.5;
      cursor: grabbing;
    }

    .route-card.drag-over {
      border-color: var(--accent);
      background: var(--accent-light);
    }

    .route-card.primary {
      border-color: var(--accent);
      background: var(--accent-light) 100%);
    }

    .route-card.fallback {
      border-color: var(--info);
    }

    .route-chain-connector {
      display: flex;
      justify-content: center;
      padding: 8px 0;
      position: relative;
    }

    .route-chain-connector::before {
      content: '';
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 2px;
      height: 16px;
      background: var(--border));
    }

    .route-chain-connector::after {
      content: 'â†“';
      position: absolute;
      top: -4px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 14px;
      color: var(--info);
    }

    .route-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .route-priority-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .route-priority-badge.primary {
      background: var(--accent);
      color: var(--text-inverse);
    }

    .route-priority-badge.fallback {
      background: var(--info);
      color: var(--text-inverse);
    }

    .route-priority-badge .priority-number {
      font-size: 14px;
    }

    .route-health-status {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 500;
    }

    .route-health-indicator {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      animation: pulse 2s infinite;
    }

    .route-health-indicator.healthy {
      background: var(--success);
    }

    .route-health-indicator.degraded {
      background: var(--warning);
      animation: pulse-degraded 2s infinite;
    }

    .route-health-indicator.unhealthy {
      background: var(--error);
    }

    .route-health-indicator.unknown {
      background: var(--text-muted);
      animation: none;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    @keyframes pulse-degraded {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.7; }
    }

    .route-card-body {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 16px;
    }

    .route-info-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .route-info-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
    }

    .route-info-value {
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
    }

    .route-info-value.mono {
      font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
      font-size: 13px;
    }

    .route-provider-label {
      color: var(--accent);
    }

    .route-target-model {
      color: var(--info);
    }

    .route-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--surface-2);
    }

    .route-toggles {
      display: flex;
      gap: 16px;
    }

    .route-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
    }

    .route-toggle input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: var(--accent);
    }

    .route-toggle label {
      cursor: pointer;
    }

    .route-actions {
      display: flex;
      gap: 8px;
    }

    /* Priority input */
    .priority-input-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .priority-input {
      width: 70px;
      padding: 6px 10px;
      border: 1px solid var(--border);
      border-radius: 6px;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
    }

    .priority-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(23, 105, 209, 0.1);
    }

    /* Drag handle */
    .drag-handle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      color: var(--text-muted);
      cursor: grab;
      border-radius: 4px;
      transition: all 0.15s;
    }

    .drag-handle:hover {
      background: var(--surface-2);
      color: var(--text);
    }

    .drag-handle:active {
      cursor: grabbing;
    }

    /* Wire list card improvements */
    .wire-list-card {
      margin-bottom: 24px;
      padding: 24px;
      background: var(--surface);
      border: 2px solid var(--border);
      border-radius: var(--radius);
      transition: all 0.15s;
    }

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

    .wire-list-card.chat-enabled {
      border-color: var(--success);
    }

    .wire-list-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 16px;
    }

    .wire-list-title {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .wire-list-title h3 {
      font-size: 18px;
      font-weight: 700;
      margin: 0;
    }

    .wire-list-stats {
      display: flex;
      gap: 8px;
    }

    .wire-list-actions {
      display: flex;
      gap: 8px;
    }

    .wire-chain-mini {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .route-mini {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      background: var(--surface-2);
      border-radius: 8px;
      font-size: 13px;
    }

    .route-mini-badge {
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .route-mini-badge.primary {
      background: var(--accent);
      color: var(--text-inverse);
    }

    .route-mini-badge.fallback {
      background: var(--info);
      color: var(--text-inverse);
    }

    .route-mini-provider {
      font-weight: 600;
      color: var(--text);
    }

    .route-mini-arrow {
      color: var(--text-muted);
    }

    .route-mini-model {
      font-family: monospace;
      color: var(--accent);
    }

    .route-mini-status {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Health status section */
    .health-summary {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }

    .health-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      text-align: center;
    }

    .health-card-value {
      font-size: 28px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .health-card-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .health-card.healthy .health-card-value {
      color: var(--success);
    }

    .health-card.degraded .health-card-value {
      color: var(--warning);
    }

    .health-card.unhealthy .health-card-value {
      color: var(--error);
    }

    /* Wire detail tabs */
    .wire-detail-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 20px;
      border-bottom: 2px solid var(--border);
    }

    .wire-detail-tab {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-muted);
      background: none;
      border: none;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .wire-detail-tab:hover {
      color: var(--text);
      background: var(--surface-2);
    }

    .wire-detail-tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .wire-detail-content {
      display: none;
    }

    .wire-detail-content.active {
      display: block;
    }

    /* Responsive */
    /* === Provider Detail Page === */
    .provider-detail-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 24px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--border);
    }

    .provider-detail-title {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .provider-detail-title h2 {
      font-size: 24px;
      font-weight: 700;
      margin: 0;
    }

    .provider-detail-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 8px;
      flex-wrap: wrap;
    }

    .provider-detail-actions {
      display: flex;
      gap: 8px;
    }

    /* Provider summary metrics */
    .provider-metrics-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .provider-metric-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 20px;
      text-align: center;
    }

    .provider-metric-value {
      font-size: 28px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .provider-metric-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .provider-metric-value.success { color: var(--success); }
    .provider-metric-value.warning { color: var(--warning); }
    .provider-metric-value.error { color: var(--error); }

    /* Provider detail tabs */
    .provider-detail-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 20px;
      border-bottom: 2px solid var(--border);
    }

    .provider-detail-tab {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-muted);
      background: none;
      border: none;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      cursor: pointer;
      transition: all 0.15s;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .provider-detail-tab:hover {
      color: var(--text);
      background: var(--surface-2);
    }

    .provider-detail-tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .provider-detail-content {
      display: none;
    }

    .provider-detail-content.active {
      display: block;
    }

    /* Provider info grid */
    .provider-info-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px;
      margin-bottom: 24px;
    }

    .provider-info-section h3 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }

    .provider-info-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 16px;
    }

    .provider-info-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .provider-info-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .provider-info-value {
      font-size: 14px;
      color: var(--text);
      word-break: break-all;
    }

    .provider-info-value.mono {
      font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
      font-size: 13px;
    }

    /* Provider routes list */
    .provider-routes-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .provider-route-item {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 16px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      transition: all 0.15s;
    }

    .provider-route-item:hover {
      border-color: var(--accent);
    }

    .provider-route-priority {
      width: 80px;
      flex-shrink: 0;
    }

    .provider-route-priority-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .provider-route-priority-badge.primary {
      background: var(--accent);
      color: var(--text-inverse);
    }

    .provider-route-priority-badge.fallback {
      background: var(--info);
      color: var(--text-inverse);
    }

    .provider-route-info {
      flex: 1;
      min-width: 0;
    }

    .provider-route-wire {
      font-weight: 600;
      color: var(--text);
      margin-bottom: 4px;
    }

    .provider-route-target {
      font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
      font-size: 12px;
      color: var(--text-muted);
    }

    .provider-route-status {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Provider health section */
    .health-status-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }

    .health-status-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      text-align: center;
    }

    .health-status-value {
      font-size: 32px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .health-status-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .health-status-card.healthy .health-status-value { color: var(--success); }
    .health-status-card.degraded .health-status-value { color: var(--warning); }
    .health-status-card.unhealthy .health-status-value { color: var(--error); }
    .health-status-card.healthy { border-color: var(--success); }
    .health-status-card.degraded { border-color: var(--warning); }
    .health-status-card.unhealthy { border-color: var(--error); }

    /* Provider economics section */
    .economics-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }

    @media (max-width: 900px) {
      .mobile-header { display: flex; }
      .route-card-body { grid-template-columns: 1fr 1fr; }
      .health-summary { grid-template-columns: repeat(2, 1fr); }
      .economics-grid { grid-template-columns: 1fr; }
      .health-status-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 640px) {
      .plan-tabs { gap: 0; }
      .plan-tab { padding: 8px 12px; font-size: 12px; }
      .plan-tab-content .form-row { grid-template-columns: 1fr; }
      .wire-toggle-item { flex-direction: column; align-items: flex-start; gap: 8px; }
      .wire-toggle-btns { width: 100%; }
      .wt-btn { flex: 1; }
      .route-card-body { grid-template-columns: 1fr; }
      .route-card-header { flex-direction: column; gap: 8px; }
      .route-card-footer { flex-direction: column; gap: 12px; }
      .route-toggles { flex-wrap: wrap; }
      .health-summary { grid-template-columns: 1fr 1fr; }
      .provider-detail-header { flex-direction: column; gap: 16px; }
      .provider-detail-title { flex-direction: column; align-items: flex-start; gap: 8px; }
    }

/* ===========================================
   GENERATED UTILITY LAYER
   One rule per former inline style="" attribute (data-ax tokens).
   =========================================== */
[data-ax="ax1"] { margin-top:24px }
[data-ax="ax2"] { font-size:12px }
[data-ax="ax3"] { margin-bottom:24px }
[data-ax="ax4"] { font-size:11px;color:var(--text-muted) }
[data-ax="ax5"] { text-align:right;padding:8px }
[data-ax="ax6"] { margin-bottom:20px }
[data-ax="ax7"] { font-size:12px;margin-bottom:16px }
[data-ax="ax8"] { border:none }
[data-ax="ax9"] { display:flex;justify-content:space-between;align-items:center;margin-bottom:12px }
[data-ax="ax10"] { padding:8px;border:1px solid var(--border-strong);border-radius:6px;width:100% }
[data-ax="ax11"] { width:100%;padding:8px;border:1px solid var(--border-strong);border-radius:6px }
[data-ax="ax12"] { margin-bottom:12px }
[data-ax="ax13"] { padding:8px }
[data-ax="ax14"] { text-align:center;padding:16px }
[data-ax="ax15"] { font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.05em }
[data-ax="ax16"] { padding:40px }
[data-ax="ax17"] { font-size:12px;color:var(--text-muted) }
[data-ax="ax18"] { font-size:11px }
[data-ax="ax19"] { background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:16px }
[data-ax="ax20"] { font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted) }
[data-ax="ax21"] { font-size:28px;font-weight:700;margin-bottom:8px }
[data-ax="ax22"] { height:6px;background:var(--surface);border-radius:3px;overflow:hidden }
[data-ax="ax23"] { color:var(--accent) }
[data-ax="ax24"] { cursor:pointer }
[data-ax="ax25"] { margin:16px 0 }
[data-ax="ax26"] { display:grid;grid-template-columns:80px 1fr 1fr;gap:12px }
[data-ax="ax27"] { font-size:12px;color:var(--text-muted);display:block;margin-bottom:4px }
[data-ax="ax28"] { font-size:11px;color:var(--text-muted);margin-top:4px }
[data-ax="ax29"] { font-size:14px;color:var(--text-muted) }
[data-ax="ax30"] { border-bottom:1px solid var(--surface-2) }
[data-ax="ax31"] { text-align:right;padding:8px;color:var(--accent);font-weight:700 }
[data-ax="ax32"] { padding:8px;font-size:11px;color:var(--text-muted) }
[data-ax="ax33"] { padding:12px;background:var(--surface-2);border-radius:8px;text-align:center }
[data-ax="ax34"] { font-size:20px;font-weight:700 }
[data-ax="ax35"] { display:flex;gap:12px;flex-wrap:wrap }
[data-ax="ax36"] { color:var(--text-muted);font-size:13px;text-align:center;width:100%;padding:40px 0 }
[data-ax="ax37"] { display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap }
[data-ax="ax38"] { margin-bottom:0 }
[data-ax="ax39"] { font-size:12px;margin-top:8px }
[data-ax="ax40"] { flex:1;display:flex;flex-direction:column;align-items:center }
[data-ax="ax41"] { margin-top:24px;padding-top:16px;border-top:1px solid var(--surface-2) }
[data-ax="ax42"] { font-size:12px;margin-top:4px }
[data-ax="ax43"] { display:flex;gap:8px }
[data-ax="ax44"] { font-weight:600 }
[data-ax="ax45"] { margin-bottom:16px }
[data-ax="ax46"] { padding:40px;text-align:center;background:var(--bg-hover);border-radius:12px }
[data-ax="ax47"] { color:var(--text-muted);margin:0 0 8px }
[data-ax="ax48"] { color:var(--text-muted);margin:0 }
[data-ax="ax49"] { font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted);margin-bottom:4px }
[data-ax="ax50"] { font-size:14px;padding:6px 12px }
[data-ax="ax51"] { text-align:right }
[data-ax="ax52"] { font-size:11px;font-weight:400;color:var(--text-muted);margin-left:8px }
[data-ax="ax53"] { font-size:10px;color:var(--text-muted);margin-top:6px }
[data-ax="ax54"] { background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:16px;text-align:center }
[data-ax="ax55"] { font-size:28px;font-weight:700 }
[data-ax="ax56"] { font-size:11px;color:var(--text-muted);margin-bottom:4px }
[data-ax="ax57"] { font-size:16px;padding:6px 14px }
[data-ax="ax58"] { text-align:left;padding:8px }
[data-ax="ax59"] { display:grid;grid-template-columns:1.2fr 1fr;gap:24px;margin-bottom:24px }
[data-ax="ax60"] { border:none;margin-top:16px }
[data-ax="ax61"] { max-height:340px;overflow-y:auto }
[data-ax="ax62"] { display:grid;grid-template-columns:1fr 1fr 1fr;gap:24px }
[data-ax="ax63"] { margin-top:16px;text-align:center }
[data-ax="ax64"] { max-width:320px }
[data-ax="ax65"] { padding-left:40px }
[data-ax="ax66"] { display:flex;align-items:center;gap:12px }
[data-ax="ax67"] { margin-top:4px;margin-left:44px }
[data-ax="ax68"] { padding:0 0 16px 0;border:none }
[data-ax="ax69"] { display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr);gap:24px;align-items:start }
[data-ax="ax70"] { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px }
[data-ax="ax71"] { margin:0 }
[data-ax="ax72"] { display:none }
[data-ax="ax73"] { display:grid;grid-template-columns:1fr 1fr;gap:24px }
[data-ax="ax74"] { display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px;margin-bottom:24px }
[data-ax="ax75"] { font-size:28px;font-weight:700;color:var(--success) }
[data-ax="ax76"] { font-size:28px;font-weight:700;color:var(--accent) }
[data-ax="ax77"] { font-size:28px;font-weight:700;color:var(--warning-light) }
[data-ax="ax78"] { font-size:28px;font-weight:700;color:var(--info) }
[data-ax="ax79"] { display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:24px }
[data-ax="ax80"] { border:none;max-height:400px;overflow-y:auto }
[data-ax="ax81"] { padding:12px;background:var(--surface-2);border-radius:8px }
[data-ax="ax82"] { font-size:12px;margin-bottom:12px }
[data-ax="ax83"] { display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap }
[data-ax="ax84"] { margin-bottom:16px;font-size:13px }
[data-ax="ax85"] { font-family:var(--font-mono,monospace);font-size:12px }
[data-ax="ax86"] { margin-bottom:20px;padding:16px;border-radius:12px }
[data-ax="ax87"] { font-size:18px }
[data-ax="ax88"] { margin-left:8px;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;color:var(--text-inverse) }
[data-ax="ax89"] { background:var(--success);color: var(--text-inverse);border:none;padding:6px 12px;border-radius:6px;cursor:pointer }
[data-ax="ax90"] { background:var(--info);color: var(--text-inverse);border:none;padding:6px 12px;border-radius:6px;cursor:pointer }
[data-ax="ax91"] { background:var(--error);color: var(--text-inverse);border:none;padding:6px 12px;border-radius:6px;cursor:pointer }
[data-ax="ax92"] { margin:6px 0;padding:8px;background:white;border-radius:6px;display:flex;align-items:center;gap:12px }
[data-ax="ax93"] { background:var(--accent);color: var(--text-inverse);padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600 }
[data-ax="ax94"] { color:var(--text-muted) }
[data-ax="ax95"] { color:var(--info) }
[data-ax="ax96"] { font-size:20px;margin-bottom:8px }
[data-ax="ax97"] { padding:20px;text-align:center;background:var(--warning-bg);border-radius:8px;margin-bottom:20px }
[data-ax="ax98"] { max-height:300px;overflow-y:auto;margin-bottom:20px }
[data-ax="ax99"] { color:var(--text-muted);text-align:center;padding:20px }
[data-ax="ax100"] { border-top:1px solid var(--border-default);padding-top:20px }
[data-ax="ax101"] { font-size:16px;margin-bottom:16px }
[data-ax="ax102"] { font-weight:600;margin-bottom:4px;display:block }
[data-ax="ax103"] { width:100%;padding:10px;border:1px solid var(--border-strong);border-radius:8px;font-size:14px }
[data-ax="ax104"] { margin-top:12px;font-size:12px }
[data-ax="ax105"] { display:flex;align-items:center;gap:6px;cursor:pointer;margin-top:16px }
[data-ax="ax106"] { margin-top:16px;width:100%;background:var(--success);color: var(--text-inverse);border:none;padding:12px;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer }
[data-ax="ax107"] { margin-bottom:4px }
[data-ax="ax108"] { padding:10px;border:1px solid var(--border-strong);border-radius:8px;font-size:14px;width:100% }
[data-ax="ax109"] { margin-top:4px;display:block }
[data-ax="ax110"] { margin-top:20px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center }
[data-ax="ax111"] { font-size:14px }
[data-ax="ax112"] { background:var(--success);color: var(--text-inverse);border:none;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500 }
[data-ax="ax113"] { display:flex;gap:8px;margin-top:20px }
[data-ax="ax114"] { flex:1;background:var(--success);color: var(--text-inverse);border:none;padding:12px;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer }
[data-ax="ax115"] { padding:12px 20px }
[data-ax="ax116"] { margin-bottom:16px;padding:16px;background:var(--bg-surface);border-radius:10px;border:1px solid var(--border-default) }
[data-ax="ax117"] { font-weight:600;padding:4px 10px;border-radius:6px;font-size:12px;color:var(--text-inverse) }
[data-ax="ax118"] { background:var(--error);color: var(--text-inverse);border:none;padding:4px 10px;border-radius:5px;cursor:pointer;font-size:12px }
[data-ax="ax119"] { display:grid;grid-template-columns:1fr 1fr;gap:8px }
[data-ax="ax120"] { font-size:24px;font-weight:700;margin:0 }
[data-ax="ax121"] { color:var(--text-muted) }
[data-ax="ax122"] { font-weight:400;font-size:13px }
[data-ax="ax123"] { margin-bottom:20px;font-size:13px }
[data-ax="ax124"] { width:6px;height:6px }
[data-ax="ax125"] { justify-content:center;color:var(--text-muted);font-size:12px }
[data-ax="ax126"] { margin-bottom:16px;padding:12px 16px;background:var(--warning-bg);border-radius:8px;display:flex;align-items:center;gap:16px;flex-wrap:wrap }
[data-ax="ax127"] { display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:500 }
[data-ax="ax128"] { width:18px;height:18px;cursor:pointer }
[data-ax="ax129"] { color:var(--warning);font-weight:600 }
[data-ax="ax130"] { display:flex;gap:8px;margin-left:auto }
[data-ax="ax131"] { background:var(--error);color: var(--text-inverse);border:none;padding:8px 16px;border-radius:6px;cursor:not-allowed;font-size:13px;font-weight:500;opacity:0.5 }
[data-ax="ax132"] { margin-bottom:12px;padding:14px 16px;background:white;border-radius:10px;border:2px solid var(--warning);box-shadow:0 1px 3px rgba(0,0,0,0.1) }
[data-ax="ax133"] { display:flex;align-items:flex-start;gap:12px }
[data-ax="ax134"] { margin-top:4px;width:18px;height:18px;cursor:pointer }
[data-ax="ax135"] { flex:1 }
[data-ax="ax136"] { display:flex;align-items:center;gap:10px;margin-bottom:6px }
[data-ax="ax137"] { font-weight:600;font-size:16px }
[data-ax="ax138"] { padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;background:var(--warning);color: var(--text-inverse) }
[data-ax="ax139"] { padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;background:var(--border-default);color:var(--text-muted) }
[data-ax="ax140"] { color:var(--text-muted);font-size:13px;margin:0 0 4px }
[data-ax="ax141"] { background:var(--success);color: var(--text-inverse);border:none;padding:7px 14px;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500 }
[data-ax="ax142"] { background:var(--error);color: var(--text-inverse);border:none;padding:7px 14px;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500 }
[data-ax="ax143"] { background:var(--warning-bg);padding:12px;border-radius:8px;margin-bottom:12px }
[data-ax="ax144"] { font-size:12px;margin:-6px 0 14px }
[data-ax="ax145"] { margin-top:24px;border-color:var(--error);background:var(--error-bg) }
[data-ax="ax146"] { color:var(--error) }
[data-ax="ax147"] { margin-top:24px;padding:16px;background:var(--surface-2);border-radius:12px }
[data-ax="ax148"] { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px }
[data-ax="ax149"] { display:flex;align-items:center;gap:8px }
[data-ax="ax150"] { display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px }
[data-ax="ax151"] { margin-top:20px }
[data-ax="ax152"] { font-size:13px;font-weight:700;margin-bottom:12px;color:var(--text-muted) }
[data-ax="ax153"] { margin-top:16px;padding:12px;background:var(--warning-bg);border:1px solid var(--warning);border-radius:8px }
[data-ax="ax154"] { font-size:12px;font-weight:600;color:var(--warning);margin-bottom:8px }
[data-ax="ax155"] { font-size:12px;color:var(--text-muted) }
[data-ax="ax156"] { margin-top:8px;font-size:11px;color:var(--text-muted) }
[data-ax="ax157"] { display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px }
[data-ax="ax158"] { padding:12px;background:var(--surface-2);border-radius:8px;margin-bottom:20px }
[data-ax="ax159"] { display:flex;justify-content:space-between;align-items:center }
[data-ax="ax160"] { width:100%;border-collapse:collapse;font-size:13px }
[data-ax="ax161"] { border-bottom:2px solid var(--border) }
[data-ax="ax162"] { display:grid;grid-template-columns:repeat(3,1fr);gap:12px }
[data-ax="ax163"] { padding:12px;background:var(--surface-2);border-radius:8px;font-size:12px }
[data-ax="ax164"] { margin-top:8px;color:var(--text-muted) }
[data-ax="ax165"] { display:flex;justify-content:space-between;gap:12px;align-items:start }
[data-ax="ax166"] { margin-top:16px }
[data-ax="ax167"] { margin:18px 0;max-height:300px;overflow:auto }
[data-ax="ax168"] { padding:10px 0;border-bottom:1px solid var(--border) }
[data-ax="ax169"] { white-space:pre-wrap;margin-top:4px }
[data-ax="ax170"] { white-space:nowrap }
[data-ax="ax171"] { width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:8px;font-size:14px;font-family:inherit }
[data-ax="ax172"] { color:var(--success) }
[data-ax="ax173"] { color:var(--warning) }
[data-ax="ax174"] { flex:1;display:flex;flex-direction:column;align-items:center;gap:4px }
[data-ax="ax175"] { font-size:10px;color:var(--text-muted);text-align:center }
[data-ax="ax176"] { font-size:10px;color:var(--success);font-weight:600 }
[data-ax="ax177"] { font-family:monospace;font-size:12px;background:var(--bg-surface);color:var(--info);padding:2px 6px;border-radius:4px }
[data-ax="ax178"] { color:var(--error);font-weight:600 }
[data-ax="ax179"] { font-family:monospace;font-size:12px }
[data-ax="ax180"] { text-align:center }


/* ===========================================
   DYNAMIC BAR CLASSES (chart fills; integer percent steps)
   =========================================== */
.barh-0{height:0%}
.barh-1{height:1%}
.barh-2{height:2%}
.barh-3{height:3%}
.barh-4{height:4%}
.barh-5{height:5%}
.barh-6{height:6%}
.barh-7{height:7%}
.barh-8{height:8%}
.barh-9{height:9%}
.barh-10{height:10%}
.barh-11{height:11%}
.barh-12{height:12%}
.barh-13{height:13%}
.barh-14{height:14%}
.barh-15{height:15%}
.barh-16{height:16%}
.barh-17{height:17%}
.barh-18{height:18%}
.barh-19{height:19%}
.barh-20{height:20%}
.barh-21{height:21%}
.barh-22{height:22%}
.barh-23{height:23%}
.barh-24{height:24%}
.barh-25{height:25%}
.barh-26{height:26%}
.barh-27{height:27%}
.barh-28{height:28%}
.barh-29{height:29%}
.barh-30{height:30%}
.barh-31{height:31%}
.barh-32{height:32%}
.barh-33{height:33%}
.barh-34{height:34%}
.barh-35{height:35%}
.barh-36{height:36%}
.barh-37{height:37%}
.barh-38{height:38%}
.barh-39{height:39%}
.barh-40{height:40%}
.barh-41{height:41%}
.barh-42{height:42%}
.barh-43{height:43%}
.barh-44{height:44%}
.barh-45{height:45%}
.barh-46{height:46%}
.barh-47{height:47%}
.barh-48{height:48%}
.barh-49{height:49%}
.barh-50{height:50%}
.barh-51{height:51%}
.barh-52{height:52%}
.barh-53{height:53%}
.barh-54{height:54%}
.barh-55{height:55%}
.barh-56{height:56%}
.barh-57{height:57%}
.barh-58{height:58%}
.barh-59{height:59%}
.barh-60{height:60%}
.barh-61{height:61%}
.barh-62{height:62%}
.barh-63{height:63%}
.barh-64{height:64%}
.barh-65{height:65%}
.barh-66{height:66%}
.barh-67{height:67%}
.barh-68{height:68%}
.barh-69{height:69%}
.barh-70{height:70%}
.barh-71{height:71%}
.barh-72{height:72%}
.barh-73{height:73%}
.barh-74{height:74%}
.barh-75{height:75%}
.barh-76{height:76%}
.barh-77{height:77%}
.barh-78{height:78%}
.barh-79{height:79%}
.barh-80{height:80%}
.barh-81{height:81%}
.barh-82{height:82%}
.barh-83{height:83%}
.barh-84{height:84%}
.barh-85{height:85%}
.barh-86{height:86%}
.barh-87{height:87%}
.barh-88{height:88%}
.barh-89{height:89%}
.barh-90{height:90%}
.barh-91{height:91%}
.barh-92{height:92%}
.barh-93{height:93%}
.barh-94{height:94%}
.barh-95{height:95%}
.barh-96{height:96%}
.barh-97{height:97%}
.barh-98{height:98%}
.barh-99{height:99%}
.barh-100{height:100%}
.barw-0{width:0%}
.barw-1{width:1%}
.barw-2{width:2%}
.barw-3{width:3%}
.barw-4{width:4%}
.barw-5{width:5%}
.barw-6{width:6%}
.barw-7{width:7%}
.barw-8{width:8%}
.barw-9{width:9%}
.barw-10{width:10%}
.barw-11{width:11%}
.barw-12{width:12%}
.barw-13{width:13%}
.barw-14{width:14%}
.barw-15{width:15%}
.barw-16{width:16%}
.barw-17{width:17%}
.barw-18{width:18%}
.barw-19{width:19%}
.barw-20{width:20%}
.barw-21{width:21%}
.barw-22{width:22%}
.barw-23{width:23%}
.barw-24{width:24%}
.barw-25{width:25%}
.barw-26{width:26%}
.barw-27{width:27%}
.barw-28{width:28%}
.barw-29{width:29%}
.barw-30{width:30%}
.barw-31{width:31%}
.barw-32{width:32%}
.barw-33{width:33%}
.barw-34{width:34%}
.barw-35{width:35%}
.barw-36{width:36%}
.barw-37{width:37%}
.barw-38{width:38%}
.barw-39{width:39%}
.barw-40{width:40%}
.barw-41{width:41%}
.barw-42{width:42%}
.barw-43{width:43%}
.barw-44{width:44%}
.barw-45{width:45%}
.barw-46{width:46%}
.barw-47{width:47%}
.barw-48{width:48%}
.barw-49{width:49%}
.barw-50{width:50%}
.barw-51{width:51%}
.barw-52{width:52%}
.barw-53{width:53%}
.barw-54{width:54%}
.barw-55{width:55%}
.barw-56{width:56%}
.barw-57{width:57%}
.barw-58{width:58%}
.barw-59{width:59%}
.barw-60{width:60%}
.barw-61{width:61%}
.barw-62{width:62%}
.barw-63{width:63%}
.barw-64{width:64%}
.barw-65{width:65%}
.barw-66{width:66%}
.barw-67{width:67%}
.barw-68{width:68%}
.barw-69{width:69%}
.barw-70{width:70%}
.barw-71{width:71%}
.barw-72{width:72%}
.barw-73{width:73%}
.barw-74{width:74%}
.barw-75{width:75%}
.barw-76{width:76%}
.barw-77{width:77%}
.barw-78{width:78%}
.barw-79{width:79%}
.barw-80{width:80%}
.barw-81{width:81%}
.barw-82{width:82%}
.barw-83{width:83%}
.barw-84{width:84%}
.barw-85{width:85%}
.barw-86{width:86%}
.barw-87{width:87%}
.barw-88{width:88%}
.barw-89{width:89%}
.barw-90{width:90%}
.barw-91{width:91%}
.barw-92{width:92%}
.barw-93{width:93%}
.barw-94{width:94%}
.barw-95{width:95%}
.barw-96{width:96%}
.barw-97{width:97%}
.barw-98{width:98%}
.barw-99{width:99%}
.barw-100{width:100%}

.dash-usage-chart-bar.barh-0, .barh-0 { min-height: 2px; }

/* ===========================================
   FIXED-HEIGHT CHART CONTAINERS
   (formerly inline min-heights; definite heights so %-bars resolve)
   =========================================== */
#dash-usage-chart,
#user-usage-chart { height: 180px; display: flex; align-items: flex-end; gap: 8px; padding: 16px 8px; }
#usage-chart { height: 120px; padding: 16px 8px; display: flex; align-items: flex-end; gap: 4px; }
.dash-usage-chart-bar.is-info { background: var(--info); }
.usage-day-bar { width: 100%; max-width: 40px; background: var(--success); border-radius: 4px 4px 0 0; }

/* ===========================================
   SUPPORT TICKET DETAIL VISIBILITY
   =========================================== */
#support-ticket-detail { display: none; margin-top: 20px; border-top: 1px solid var(--border-default); padding-top: 20px; }
#support-ticket-detail.open { display: block; }

/* ===========================================
   ERROR / NETWORK ERROR / SERVER ERROR STATES
   (light-token restyle of the components.js surfaces)
   =========================================== */
.error-state { text-align: center; padding: var(--space-16) var(--space-6); max-width: 480px; margin: 0 auto; }
.error-state-icon {
  width: 72px; height: 72px; margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  background: var(--error-bg); border-radius: 50%; color: var(--error);
}
.error-state-icon svg, .error-state-icon i { width: 32px; height: 32px; stroke: currentColor; stroke-width: 1.5; }
.error-state-title { font-size: var(--text-lg); font-weight: var(--font-semibold); color: var(--text-primary); margin-bottom: var(--space-2); }
.error-state-message { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-relaxed); margin-bottom: var(--space-6); }
.error-state-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.error-state-actions .btn { min-height: 40px; }

.network-error-state { text-align: center; padding: var(--space-16) var(--space-6); max-width: 480px; margin: 0 auto; }
.network-error-state-icon {
  width: 72px; height: 72px; margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  background: var(--warning-bg); border-radius: 50%; color: var(--warning);
}
.network-error-state-icon svg, .network-error-state-icon i { width: 36px; height: 36px; stroke: currentColor; stroke-width: 1.5; }
.network-error-state-title { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--text-primary); margin-bottom: var(--space-2); }
.network-error-state-message { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-relaxed); margin-bottom: var(--space-6); }
.network-error-state-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.network-error-state-actions .btn { min-height: 44px; }

.server-error-state { text-align: center; padding: var(--space-16) var(--space-6); max-width: 480px; margin: 0 auto; }
.server-error-state-icon {
  width: 72px; height: 72px; margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  background: var(--error-bg); border-radius: 50%; color: var(--error);
}
.server-error-state-icon svg, .server-error-state-icon i { width: 36px; height: 36px; stroke: currentColor; stroke-width: 1.5; }
.server-error-state-title { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--text-primary); margin-bottom: var(--space-2); }
.server-error-state-message { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-relaxed); margin-bottom: var(--space-6); }
.server-error-state-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ===========================================
   GATING DEGRADATION (403 role denial / suspension lockout)
   =========================================== */
.admin-page-error { margin-bottom: var(--space-6); }
.admin-lockout {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  max-width: 520px;
  margin: var(--space-10) auto;
  background: var(--bg-surface);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-lg);
}
.admin-lockout-icon {
  width: 72px; height: 72px; margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  background: var(--error-bg); border-radius: 50%; color: var(--error);
}
.admin-lockout-icon svg, .admin-lockout-icon i { width: 36px; height: 36px; stroke: currentColor; stroke-width: 1.5; }
.admin-lockout-title { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--text-primary); margin-bottom: var(--space-2); }
.admin-lockout-message { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-relaxed); margin-bottom: var(--space-6); }

/* Disabled-state helper (replaces former inline cursor/opacity mutation) */
.btn.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* Meter fills (limit diagnostics) */
.meter-fill { height: 100%; border-radius: 3px; }
.meter-fill.meter-ok { background: var(--success); }
.meter-fill.meter-warn { background: var(--warning); }
.meter-fill.meter-crit { background: var(--error); }
.diag-admission { padding: 12px; border-radius: 8px; }
.diag-admission.allowed { background: var(--success-bg); border: 1px solid var(--success); }
.diag-admission.denied { background: var(--error-bg); border: 1px solid var(--error); }
.diag-verdict { font-weight: 600; }
.diag-verdict.ok { color: var(--success); }
.diag-verdict.bad { color: var(--error); }
.plan-access-label { font-style: normal; }
.plan-access-label.is-free { color: var(--success); }
.plan-access-label.is-muted { color: var(--text-muted); }

/* ===========================================
   MOBILE SIDEBAR (shared-shell off-canvas)
   =========================================== */
@media (max-width: 900px) {
}

/* Conditional chat/route state surfaces (former JS-concatenated inline styles) */
.chat-panel-on { background: var(--success-bg); border: 2px solid var(--success); }
.chat-panel-off { background: var(--warning-bg); border: 2px solid var(--warning-light); }
.chip-on { background: var(--success); }
.chip-off { background: var(--warning-light); }
.pill-primary { background: var(--accent); }
.pill-fallback { background: var(--text-muted); }

/* ---- App boot screen: the only thing visible until session/role resolves ---- */
.app-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-elevated);
}
.app-boot-logo { width: 200px; height: auto; }
.app-boot-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent);
  animation: app-boot-spin 0.8s linear infinite;
}
@keyframes app-boot-spin { to { transform: rotate(360deg); } }
/* ---- Admin sidebar: 3 fixed areas (logo / scrollable nav / footer) ----
   The nav area must scroll on its own. Without overflow-y here the nav
   content painted straight through the footer whenever the admin nav was
   taller than the viewport (footer items appeared interleaved between
   Usage/Jobs/Safety). Admin-only: the user panel keeps its shared rule. */
.admin-shell .admin-sidebar-nav {
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 0;
}
.admin-shell .sidebar-footer {
  flex: 0 0 auto;
  margin-top: auto;
  background: var(--surface);
}
.admin-shell .nav-submenu { gap: var(--space-xs); }
.admin-shell .nav-link.active::before { content: none; }

/* ---- Typography hierarchy ---- */
.admin-shell .card-title,
.admin-shell .settings-group-title,
.admin-shell .provider-info-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-shell,
.admin-shell td,
.admin-shell .provider-info-value,
.admin-shell .route-info-value { font-size: 14px; }
.admin-shell th,
.admin-shell .stat-card .label,
.admin-shell .dashboard-stat-card-label,
.admin-shell .provider-info-label,
.admin-shell .route-info-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* ---- Cards & tables: the .card surface itself is owned by app-ui.css.
   These are the admin-only panel classes that share the same anatomy. ---- */
.admin-shell .stat-card,
.admin-shell .provider-info-section,
.admin-shell .provider-metric-card,
.admin-shell .health-card,
.admin-shell .health-status-card,
.admin-shell .settings-group,
.admin-shell .wire-chain-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
/* One table system: 44px header, 56px rows, 16px cells (see app-ui.css). */
.admin-shell tbody tr:hover td { background: var(--bg-surface); }
.admin-shell td .badge { margin: 1px 2px; }

/* ---- Provider overview strip ---- */
.admin-shell .provider-overview-card { padding: var(--space-5); }
.admin-shell .card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.admin-shell .card-title-row .card-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.admin-shell .provider-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.admin-shell .provider-overview-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: var(--space-lg);
  background: var(--surface);
  cursor: pointer;
}
.admin-shell .provider-overview-block:hover { background: var(--bg-surface); }
.admin-shell .provider-overview-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-shell .provider-overview-rows { display: flex; flex-direction: column; gap: 2px; }
.admin-shell .provider-overview-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 11px;
  color: var(--text-secondary);
}
.admin-shell .provider-overview-row strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ---- Filter bar: one compact 56px row, shared Select/Button sizes ---- */
.admin-shell .dashboard-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 56px;
  padding: var(--space-sm) var(--space-lg);
}
.admin-shell .dashboard-filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.admin-shell .dashboard-filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.admin-shell .dashboard-filter-group .input {
  min-height: 36px;
  border-radius: var(--radius-control);
}

/* ---- Lower grid: 50/50 ---- */
.admin-shell .dashboard-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.admin-shell .dashboard-lower-grid .card { min-width: 0; }
.admin-shell .provider-health-table { margin-top: var(--space-lg); }

/* ---- Compact empty states: 120-160px, not half the page ---- */
.admin-shell .empty-state-compact {
  min-height: 120px;
  max-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
}
.admin-shell td.empty-state-compact { display: table-cell; }
.admin-shell .btn svg,
.admin-shell .btn i { width: 16px; height: 16px; flex-shrink: 0; }
.admin-shell .btn-primary:hover { background: var(--accent-hover); }
.admin-shell .btn-secondary:hover { background: var(--page-bg); border-color: var(--border-color); color: var(--text-primary); }
.admin-shell .btn-danger:hover { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.admin-shell .page-header-actions .btn + .btn { margin-left: 0; }
.admin-shell .provider-health-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* ---- Section rhythm ---- */
.admin-shell .search-bar { margin-bottom: var(--space-xl); }
.admin-shell .settings-categories { gap: var(--space-sm); margin-bottom: var(--space-xl); }
.admin-shell .settings-content { gap: var(--space-lg); }
.admin-shell .settings-group { padding: 20px var(--space-xl); }

/* ---- Responsive: keep the 28px desktop canvas, step down cleanly ---- */
@media (max-width: 1279px) {
  .admin-shell .provider-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell .dashboard-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
}
@media (max-width: 767px) {
  .admin-shell .provider-overview-grid { grid-template-columns: 1fr; }
  .admin-shell .dashboard-filter-bar { flex-direction: column; align-items: stretch; }
}
