/* ============================================================
   SVC App — Shared Component Styles
   Supplements the inline design system in index.html
   ============================================================ */

/* ── Search Bar ──────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: var(--space-md);
}

.search-bar-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-bar-input:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(209, 16, 57, 0.1);
}

.search-bar-input::placeholder { color: var(--text-muted); }

.search-bar-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Filter Tabs ─────────────────────────── */
.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.filter-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-tab.active {
  background: var(--red-primary);
  color: white;
  border-color: var(--red-primary);
  box-shadow: 0 0 12px var(--red-glow);
}

/* ── FAB (Floating Action Button) ────────── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(209, 16, 57, 0.35);
  z-index: 50;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.fab:active { transform: scale(0.9); }
.fab svg { width: 24px; height: 24px; }

/* ── Empty State ─────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  min-height: 200px;
}

.empty-state svg { color: var(--text-muted); margin-bottom: var(--space-md); }
.empty-state-text { color: var(--text-muted); font-size: 0.9rem; }

/* ── List Items ──────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.list-item:active { transform: scale(0.98); background: var(--bg-tertiary); }

.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; font-size: 0.95rem; }
.list-item-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.list-item-meta { text-align: right; flex-shrink: 0; }

/* ── Data Table ──────────────────────────── */
.data-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

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

.data-table tr:active td { background: var(--bg-tertiary); }

/* ── Stat Cards ──────────────────────────── */
.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  border-radius: 0 0 0 60px;
  opacity: 0.08;
}

.metric-card.red::after { background: var(--red-accent); }
.metric-card.green::after { background: var(--success); }
.metric-card.blue::after { background: var(--info); }
.metric-card.amber::after { background: var(--warning); }

.metric-value {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 8px;
}

/* ── Quick Actions Grid ──────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-action-btn:active { transform: scale(0.95); background: var(--bg-tertiary); }
.quick-action-btn svg { color: var(--red-accent); }

/* ── Sub-View Tabs (within admin) ────────── */
.sub-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-md);
  overflow-x: auto;
}

.sub-tab {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sub-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Desktop overrides moved to /assets/css/desktop.css */
