:root {
  /* Clean Apple Web Standard Tokens */
  --bg-primary: #f6f8fb;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfd;
  --bg-card-solid: #ffffff;
  
  --glass-blur: blur(8px);
  --glass-blur-heavy: blur(12px);
  --glass-border: 1px solid rgba(0, 0, 0, 0.08);
  --glass-border-subtle: 1px solid rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --glass-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.06);

  --text-main: #1d1d1f;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --accent-apple-blue: #0071e3;
  --accent-apple-blue-hover: #0077ed;
  --accent-apple-blue-glow: rgba(0, 113, 227, 0.10);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.10);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.10);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.10);
  --accent-rose: #ef4444;
  --accent-rose-glow: rgba(239, 68, 68, 0.10);

  --sidebar-width: 245px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  --transition: all 0.18s ease-in-out;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.82em;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-apple-blue);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Compact Apple Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.brand {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brand-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
}

.brand-text h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
}

.badge-env {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-apple-blue);
  background: var(--accent-apple-blue-glow);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 113, 227, 0.15);
  margin-top: 2px;
}

/* Nav Menu */
.nav-menu {
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 10px 4px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.nav-item:focus {
  outline: none;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  transition: var(--transition);
  color: var(--text-dim);
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--accent-apple-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
  outline: none;
}

.nav-item.active svg {
  color: #ffffff;
}

.badge-count {
  margin-left: auto;
  background: #ffffff;
  color: var(--accent-apple-blue);
  font-size: 0.70rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-item:not(.active) .badge-count {
  background: var(--accent-amber);
  color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.admin-user-card .avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  max-width: 38px;
  max-height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.22);
}

.admin-user-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.admin-user-card .name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-online {
  font-size: 0.70rem;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 4px var(--accent-emerald);
}

/* Main Content Area - Full-Width Fluid Apple Web Standard */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 14px 24px;
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
}

/* Top Header */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.header-title p {
  color: var(--text-muted);
  font-size: 0.80rem;
  margin-top: 2px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-health {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.20);
  font-size: 0.74rem;
  color: #047857;
  font-weight: 600;
}

.dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* Apple Web Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.2;
}

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

.btn-primary {
  background: var(--accent-apple-blue);
  color: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.25);
}

.btn-primary:hover {
  background: #0077ed;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.35);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.20);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-rose);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: var(--accent-rose);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: rgba(16, 185, 129, 0.10);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeInApp 0.16s ease-in-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeInApp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 50% Compact KPI Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.metric-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.metric-card:hover {
  background: #fafbfd;
  box-shadow: var(--glass-shadow-hover);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.metric-card.cyan-glow::before {
  background: linear-gradient(90deg, #0071e3, #38bdf8);
}

.metric-card.emerald-glow::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.metric-card.purple-glow::before {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
}

.metric-card.amber-glow::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.metric-tag {
  font-size: 0.64rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-dim);
}

.metric-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.2;
}

.metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
}

.text-positive { color: #16a34a; font-weight: 600; }
.text-negative { color: #dc2626; font-weight: 600; }
.text-neutral { color: var(--accent-apple-blue); font-weight: 600; }
.text-warning { color: #d97706; font-weight: 600; }
.text-highlight { color: #0071e3; font-weight: 700; }
.text-muted { color: var(--text-dim); }

/* Trend Bars Compact Apple Chart */
.trend-bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 125px;
  padding: 10px 10px 4px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.trend-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
  min-width: 36px;
}

.trend-bars-wrapper {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  width: 100%;
  height: 85px;
  justify-content: center;
  position: relative;
}

.trend-bar-fill {
  width: 12px;
  border-radius: 4px 4px 1px 1px;
  background: var(--accent-apple-blue);
  transition: all 0.20s ease-in-out;
  position: relative;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.trend-bar-fill:hover {
  filter: brightness(1.15);
  transform: scaleY(1.04);
}

.trend-bar-fill.discard {
  background: var(--accent-amber);
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

.trend-bar-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

.trend-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 4px;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.trend-bar-fill:hover .trend-tooltip {
  display: block;
}

/* Layout Grids */
.two-col-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
}

.panel-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 12px;
}

.panel-header {
  margin-bottom: 8px;
}

.panel-header h2, .panel-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.panel-subtitle, .panel-header p {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 2px;
}

.panel-header-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.panel-header-action h2 {
  font-size: 1.10rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.panel-header-action p {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 2px;
}

/* High-Density Data Tables */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 6px 8px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.78rem;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.12s ease;
}

.data-table tbody tr:hover {
  background: rgba(0, 113, 227, 0.03);
}

/* Badges & Tags */
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.70rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-success { background: rgba(16, 185, 129, 0.12); color: #047857; }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.badge-purple { background: rgba(139, 92, 246, 0.12); color: #6d28d9; }
.badge-emerald { background: rgba(16, 185, 129, 0.12); color: #047857; }
.badge-cyan { background: rgba(6, 182, 212, 0.12); color: #0e7490; }
.badge-neutral { background: rgba(100, 116, 139, 0.10); color: #475569; }

.power-tag {
  display: inline-block;
  font-size: 0.66rem;
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.15);
  color: #0071e3;
  padding: 1px 5px;
  border-radius: 4px;
  margin: 1px;
  font-family: 'SF Mono', Menlo, monospace;
  font-weight: 500;
}

/* Apple Segmented Controls */
.segmented-control {
  display: inline-flex;
  flex-wrap: nowrap;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
  gap: 2px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  max-width: 100%;
  overflow-x: auto;
}

.segment-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.segment-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.segment-btn.active {
  background: #ffffff;
  color: var(--accent-apple-blue);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Apple Glass Notice Banner */
.assembly-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 113, 227, 0.04);
  border: 1px solid rgba(0, 113, 227, 0.12);
  margin-bottom: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-main);
}

.assembly-notice-banner .notice-icon {
  font-size: 1rem;
  line-height: 1;
}

.assembly-notice-banner strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-apple-blue);
  margin-bottom: 1px;
}

.assembly-notice-banner p {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin: 0;
}

/* Staff Custody Cards */
.staff-custody-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.staff-custody-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
  background: var(--bg-card-hover);
}

.staff-custody-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.staff-custody-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.staff-custody-phone {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: monospace;
}

.staff-custody-liability {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-apple-blue);
  letter-spacing: -0.02em;
  margin: 4px 0 10px 0;
}

.staff-custody-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.badge-unit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent-apple-blue);
  border: 1px solid rgba(0, 113, 227, 0.16);
}

/* Trial Balance Card */
.trial-balance-card {
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  backdrop-filter: blur(12px);
}

/* Sub-App List */
.subapp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subapp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
}

.subapp-item:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.subapp-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.15), rgba(56, 189, 248, 0.15));
  color: var(--accent-apple-blue);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.subapp-details h4 {
  font-size: 0.92rem;
  color: var(--text-main);
  font-weight: 600;
}

.subapp-ip {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.subapp-status {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subapp-status.online { color: #16a34a; }
.subapp-status.standby { color: var(--text-dim); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Branch Hisab Grid & Pipeline */
.hisab-panel-card {
  border: 1px solid rgba(0, 113, 227, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.branch-selector-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.branch-pin-icon {
  font-size: 1rem;
}

.branch-selector-pill label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.select-hub-styled {
  border: none;
  background: transparent;
  font-weight: 700;
  color: #0071e3;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  padding: 0 4px;
}

/* Mathematical Equation Pipeline */
.hisab-equation-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  margin-bottom: 24px;
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.eq-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  min-width: 110px;
}

.eq-step.plus { background: rgba(52, 199, 89, 0.08); }
.eq-step.minus { background: rgba(255, 59, 48, 0.06); }
.eq-step.equals { 
  background: rgba(0, 113, 227, 0.1); 
  border: 1px solid rgba(0, 113, 227, 0.25); 
}

.eq-badge {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.eq-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.eq-operator {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dim);
  padding: 0 2px;
}

/* Enhanced Hisab Cards */
.hisab-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.hisab-card {
  position: relative;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.hisab-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.card-icon-tag {
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1;
}

.card-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-micro-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.hisab-card.card-closing.highlight {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.08) 0%, rgba(56, 189, 248, 0.05) 100%);
  border: 1px solid rgba(0, 113, 227, 0.35);
  box-shadow: 0 6px 24px rgba(0, 113, 227, 0.12);
}

.text-gold { color: #d97706; }

.hisab-card .label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.hisab-card .value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Technician Custody Table Styling */
.tech-table-header {
  margin-bottom: 16px;
}

.tech-table-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.tech-table-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.tech-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tech-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #38bdf8);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
  flex-shrink: 0;
}

.tech-phone-sub {
  margin-top: 3px;
}

.serial-chips-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.serial-tag {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.18);
  color: #0071e3;
  letter-spacing: 0.02em;
}

.text-liability {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: block;
}

.liability-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Gateway Config Grid */
.gateway-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.gateway-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.65);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.gateway-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.icon-tag {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.icon-tag.upi { background: rgba(52, 199, 89, 0.15); color: #15803d; }
.icon-tag.card { background: rgba(175, 82, 222, 0.15); color: #7e22ce; }

.gateway-card-header h3 {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 700;
}

.gateway-card-header .desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gateway-form-group {
  margin-bottom: 18px;
}

.gateway-form-group label {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.gateway-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #16a34a;
}

.gateway-save-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.save-feedback {
  font-size: 0.85rem;
  color: #16a34a;
  font-weight: 600;
}

/* Ledger Tags */
.ledger-balance-tag {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}

.ledger-balance-tag.valid {
  background: rgba(52, 199, 89, 0.12);
  color: #15803d;
  border: 1px solid rgba(52, 199, 89, 0.25);
}

/* Apple Mac Frosted Modal & Modal Overlay */
.hidden {
  display: none !important;
}

.modal-backdrop,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open,
.modal-overlay:not(.hidden) {
  display: flex;
}

.modal-backdrop.hidden,
.modal-overlay.hidden {
  display: none !important;
}

.modal-card,
.modal-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: var(--radius-md);
  max-width: 800px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16);
  animation: modalScale 0.18s ease-out;
}

@keyframes modalScale {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 2px;
}

.modal-close,
.btn-close-modal {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover,
.btn-close-modal:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 14px 16px;
}

.modal-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 3px;
}

.form-control, .form-control-inline {
  width: 100%;
  padding: 5px 10px;
  height: 32px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus, .form-control-inline:focus {
  outline: none;
  border-color: var(--accent-apple-blue);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}

/* Powers Selector Box */
.powers-selector-box {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.powers-selector-box h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 4px;
}

.powers-selector-box .desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.checkbox-label:hover {
  background: rgba(0, 113, 227, 0.05);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-apple-blue);
  margin-top: 3px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 20px;
}

/* Assembly Architecture Banner */
.assembly-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.assembly-notice-banner .notice-icon {
  font-size: 1.3rem;
  line-height: 1.2;
}

.assembly-notice-banner strong {
  display: block;
  font-size: 0.9rem;
  color: #0071e3;
  margin-bottom: 3px;
}

.assembly-notice-banner p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; position: relative; height: auto; }
  .main-content { margin-left: 0; padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: span 1; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .segmented-control { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   Premium Add Component Modal & Nature Segmented Control
   ========================================================================== */
.modal-card-premium {
  max-width: 760px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16);
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-pill-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-apple-blue);
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 2px;
}

/* Form Section Headers */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-section-header:first-of-type {
  margin-top: 2px;
}

.section-num-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-apple-blue);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.3);
}

.form-section-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin: 0;
}

.section-subtext {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

/* Input Icon Wrappers */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-family: 'JetBrains Mono', -apple-system, sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dim);
  pointer-events: none;
  user-select: none;
}

.form-control-icon {
  padding-left: 36px !important;
}

.uppercase-input {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: 'JetBrains Mono', monospace;
}

/* Component Nature Segmented Control */
.component-nature-box {
  background: rgba(246, 248, 252, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.seg-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.seg-btn:hover {
  border-color: rgba(0, 113, 227, 0.28);
  transform: translateY(-1px);
}

.seg-btn.active {
  border-color: var(--accent-apple-blue);
  background: linear-gradient(180deg, #ffffff 0%, rgba(0, 113, 227, 0.05) 100%);
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.16);
}

.seg-icon {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.seg-text {
  display: flex;
  flex-direction: column;
}

.seg-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.seg-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Quick Select Chips */
.input-with-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-chips-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.chips-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quick-chip {
  border: 1px solid rgba(0, 113, 227, 0.22);
  background: rgba(255, 255, 255, 0.95);
  color: #0071e3;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'JetBrains Mono', -apple-system, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.quick-chip:hover {
  background: var(--accent-apple-blue);
  color: #ffffff;
  border-color: var(--accent-apple-blue);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 113, 227, 0.25);
}

.quick-chip:active {
  transform: translateY(0);
}

/* Spinner Animation */
.spin-icon {
  animation: spinRotate 0.9s linear infinite;
}

@keyframes spinRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Table Action Buttons (Edit / Delete) */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action-edit, .btn-action-delete {
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.16s ease;
  line-height: 1.2;
}

.btn-action-edit {
  color: #0071e3;
  border: 1px solid rgba(0, 113, 227, 0.25);
  background: rgba(0, 113, 227, 0.04);
}

.btn-action-edit:hover {
  background: #0071e3;
  color: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
  transform: translateY(-1px);
}

.btn-action-delete {
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.04);
}

.btn-action-delete:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
  transform: translateY(-1px);
}

/* ========================================================
   WHATSAPP OTP STAFF AUTHENTICATION OVERLAY
   ======================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.auth-overlay.hidden {
  display: none !important;
}

.auth-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  animation: scaleUp 0.20s ease-out;
}

.auth-header {
  padding: 16px 20px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
}

.auth-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  margin-bottom: 8px;
}

.auth-header h3 {
  font-size: 1.10rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.auth-subtext {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-body {
  padding: 16px 20px 20px;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  background: #ffffff;
  transition: all 0.18s ease;
  overflow: hidden;
}

.phone-input-wrap:focus-within {
  border-color: #25D366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.18);
}

.country-prefix {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.03);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.phone-input-wrap input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 6px 10px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: 100%;
}

.otp-input {
  text-align: center;
  font-size: 1.25rem !important;
  letter-spacing: 0.25em !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  padding: 8px !important;
}

.cooldown-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 113, 227, 0.1);
  color: #0071e3;
}

.btn-block {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.btn-link {
  background: none;
  border: none;
  color: #0071e3;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-link:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.auth-alert.error {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.auth-alert.success {
  background: rgba(37, 211, 102, 0.12);
  color: #128C7E;
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.auth-security-notice {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}




/* Inventory Tree View */
.inventory-tree {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, monospace;
  font-size: 0.85rem;
}

.tree-node {
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.tree-node.batch {
  border-left: 4px solid #f59e0b;
}

.tree-node.kit {
  border-left: 4px solid #8b5cf6;
}

.tree-node.piece {
  border-left: 4px solid #10b981;
}

.tree-node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.tree-children {
  margin-left: 20px;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 1px dashed rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tree-child-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #ffffff;
  border-radius: 6px;
  font-size: 0.82rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.hidden {
  display: none !important;
}

/* Staff 360 Dossier Sub-tabs */
.dossier-subtabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.dossier-tab-btn {
  background: none;
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dossier-tab-btn:hover {
  background: rgba(0, 113, 227, 0.06);
  color: #0071e3;
}

.dossier-tab-btn.active {
  background: #ffffff;
  color: #0071e3;
  border: 1px solid var(--border-subtle);
  border-bottom: 2px solid #0071e3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* Account Filter Pills */
.account-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.account-pill-btn {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.account-pill-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-main);
}

.account-pill-btn.active {
  background: #0071e3;
  color: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
}

/* ==========================================================================
   Unified Nested Tree Transaction Styles
   ========================================================================== */
.nested-txn-tree {
  padding: 12px 16px;
  background: rgba(248, 250, 252, 0.9);
  border-radius: 10px;
  margin-top: 6px;
  margin-bottom: 6px;
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.tree-row-batch {
  background: #ffffff;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.tree-row-kit {
  background: rgba(139, 92, 246, 0.04);
  border-left: 4px solid #8b5cf6;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
}

.tree-row-component {
  background: #ffffff;
  border-left: 3px solid #0071e3;
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.custody-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toggle-tree-btn {
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  color: #64748b;
  padding: 4px 6px;
  border-radius: 4px;
  transition: transform 0.15s ease;
  user-select: none;
}

.toggle-tree-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

