/* ==========================================================================
   PUFF PUFF PASS — Ultra-Clean POS Terminal & Cashier Engine v4.0
   Modern, Developer-Grade, High-Aesthetic Dark Theme
   ========================================================================== */

:root {
  --bg-root: #0b0d10;
  --bg-surface: #12151a;
  --bg-surface-subtle: #171b22;
  --bg-surface-hover: #1e232c;
  --bg-input: #14171e;
  --bg-card: #13161c;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-muted: rgba(255, 255, 255, 0.12);
  --border-focus: #10b981;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --color-brand: #10b981;
  --color-brand-glow: rgba(16, 185, 129, 0.2);
  --color-brand-hover: #059669;
  --color-brand-text: #34d399;

  --color-accent: #3b82f6;
  --color-warning: #f59e0b;
  --color-warning-glow: rgba(245, 158, 11, 0.2);
  --color-danger: #ef4444;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-root);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ==========================================================================
   TOPBAR NAVIGATION
   ========================================================================== */
.topbar {
  height: 56px;
  background: rgba(18, 21, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
  z-index: 10;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  object-fit: cover;
  background: #000;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-heading {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--color-brand-text);
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

/* Topbar Metrics Deck */
.topbar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  transition: border-color 0.15s ease;
}
.stat-capsule:hover {
  border-color: var(--border-muted);
}
.stat-capsule .label {
  color: var(--text-dim);
  font-size: 11px;
}
.stat-capsule .value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}
.stat-capsule .value.profit {
  color: var(--color-brand-text);
}

/* Topbar Action Buttons */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-mysql {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.badge-mysql .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}
.badge-mysql.online {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-brand-text);
  background: rgba(16, 185, 129, 0.08);
}
.badge-mysql.online .dot {
  background: var(--color-brand);
  box-shadow: 0 0 8px var(--color-brand);
}
.badge-mysql.offline {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}
.badge-mysql:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-muted);
}

/* Base Buttons */
button, .btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s ease;
  user-select: none;
  line-height: 1;
}

button:disabled, .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.btn-primary {
  background: var(--color-brand);
  color: #04160d;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-hover);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-default {
  background: var(--bg-surface-subtle);
  border-color: var(--border-subtle);
  color: var(--text-main);
}
.btn-default:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: var(--border-muted);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.16);
  border-color: var(--color-danger);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}
.btn-warning:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--color-warning);
}

/* ==========================================================================
   WORKSPACE GRID LAYOUT
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  height: calc(100vh - 56px);
}

/* ==========================================================================
   LEFT PANEL: PRODUCT CATALOG
   ========================================================================== */
.catalog-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-root);
  overflow: hidden;
}

.catalog-control-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box-row {
  display: flex;
  position: relative;
  width: 100%;
}

.search-icon-inline {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-search-field {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.15s ease;
}
.input-search-field:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px var(--color-brand-glow);
  background: #171b24;
}

.search-shortcut-hint {
  position: absolute;
  right: 10px;
  top: 9px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-surface-subtle);
  pointer-events: none;
}

.category-pills-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.cat-pill {
  height: 30px;
  padding: 0 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}
.cat-pill:hover {
  color: #fff;
  background: var(--bg-surface-hover);
  border-color: var(--border-muted);
}
.cat-pill.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #fff;
}
.cat-pill .pill-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 8px;
}
.cat-pill.active .pill-count {
  color: var(--color-brand-text);
  background: rgba(16, 185, 129, 0.2);
}

.catalog-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.category-block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.category-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
}

.products-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

/* Modern Product Card */
.product-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
  position: relative;
}
.product-tile:hover {
  border-color: var(--border-muted);
  background: #171b22;
  transform: translateY(-1px);
}
.product-tile.in-cart {
  border-color: rgba(16, 185, 129, 0.45);
  background: #101915;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.product-tile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.product-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.product-tile-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-brand-text);
  white-space: nowrap;
}

.product-tile-sub {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding-bottom: 2px;
}

.product-tile-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-control {
  display: flex;
  align-items: center;
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 28px;
  flex: 1;
}

.qty-btn {
  width: 26px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: bold;
}
.qty-btn:hover {
  color: #fff;
  background: var(--bg-surface-subtle);
}

.qty-field {
  flex: 1;
  width: 32px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}
.qty-field::-webkit-outer-spin-button,
.qty-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-field:focus {
  outline: none;
}

.quick-chip {
  height: 28px;
  padding: 0 7px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-dim);
}
.quick-chip:hover {
  color: var(--text-main);
  border-color: var(--border-muted);
  background: var(--bg-surface-hover);
}

/* ==========================================================================
   RIGHT PANEL: CASHIER TERMINAL
   ========================================================================== */
.terminal-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  overflow-y: auto;
}

.terminal-block {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-block-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.shift-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.field-input {
  height: 32px;
  padding: 0 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  transition: all 0.15s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px var(--color-brand-glow);
}

select.field-input {
  cursor: pointer;
}

.shift-status-tag {
  height: 32px;
  padding: 0 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.shift-status-tag.active { color: var(--color-brand-text); border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.08); }
.shift-status-tag.break { color: var(--color-warning); border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.08); }
.shift-status-tag.idle { color: var(--text-dim); }

.shift-action-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* Client Select & Role */
.client-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.role-switcher-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
  height: 32px;
}

.role-switcher-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 0;
  transition: all 0.12s ease;
}
.role-switcher-btn.active {
  background: var(--bg-surface-hover);
  color: #fff;
  font-weight: 700;
}

.badge-discount-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-brand-text);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Cart Table Area */
.cart-listing-block {
  flex: 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-table-pane {
  flex: 1;
  overflow-y: auto;
  max-height: 140px;
  margin-top: 4px;
}

.itemized-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.itemized-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.itemized-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
}

.itemized-table td.cell-desc {
  font-family: var(--font-sans);
  color: var(--text-main);
  font-weight: 500;
}

.itemized-table td.cell-del {
  text-align: right;
  width: 20px;
}

.btn-item-del {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  font-size: 11px;
}
.btn-item-del:hover {
  color: #f87171;
}

.cart-empty-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 60px;
  color: var(--text-dim);
  font-size: 12px;
}

/* Ledger Breakdown */
.ledger-block {
  background: #0d0f13;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}
.ledger-line span.num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}
.ledger-line.highlight span.num {
  color: var(--color-brand-text);
}

/* ==========================================================================
   PROFIT SPLIT WIDGET (DO SZAFKI / DLA CIEBIE) — REDESIGNED & POLISHED
   ========================================================================== */
.split-ratio-block {
  background: #0f1217;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.split-ratio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

.split-preset-row {
  display: flex;
  gap: 4px;
}

.split-preset-btn {
  height: 24px;
  padding: 0 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: all 0.12s ease;
}
.split-preset-btn:hover {
  color: #fff;
  border-color: var(--border-muted);
}
.split-preset-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--color-brand-text);
  font-weight: 700;
}

.split-display-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.split-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
}

.split-box.vault {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.01) 100%);
}
.split-box.vault::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-warning);
}

.split-box.seller {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.01) 100%);
}
.split-box.seller::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
}

.split-box-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.split-box.vault .split-box-tag { color: var(--color-warning); }
.split-box.seller .split-box-tag { color: var(--color-brand-text); }

.split-box-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.split-box-sub {
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ==========================================================================
   CHECKOUT ACTIONS
   ========================================================================== */
.checkout-panel-bottom {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
}

.due-summary-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.due-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.due-amount {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.btn-confirm-checkout {
  height: 42px;
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  border-radius: var(--radius-sm);
  letter-spacing: 0.2px;
}

.checkout-grid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* ==========================================================================
   MODAL WINDOWS & REPORTS
   ========================================================================== */
.modal-layer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-layer.open {
  display: flex;
}

.modal-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.modal-frame-head {
  height: 50px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-subtle);
}

.modal-frame-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-frame-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* KPI Summary Cards in Reports */
.kpi-row-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}

.kpi-metric-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi-metric-tile .kpi-tag {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.kpi-metric-tile .kpi-num {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.kpi-metric-tile .kpi-sub {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Data Tables */
.table-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.tabular-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tabular-grid th {
  background: var(--bg-surface-subtle);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.tabular-grid td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.tabular-grid tr:hover td {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

/* Toast Message Outlet */
.toast-rack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-bubble {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-left: 3px solid var(--color-brand);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  min-width: 240px;
}
.toast-bubble.warn {
  border-left-color: var(--color-warning);
}
.toast-bubble.error {
  border-left-color: var(--color-danger);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  body {
    overflow: auto;
    height: auto;
  }
  .app-shell {
    height: auto;
  }
  .catalog-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    height: 520px;
  }
  .terminal-panel {
    height: auto;
  }
  .topbar-stats {
    display: none;
  }
}
