/* ── GJ Bullion Admin Panel — Global Styles ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --gold:         #D4AF37;
  --gold-light:   #F5E6C0;
  --gold-dark:    #B5952F;
  --gold-bg:      #FBECA9;
  --bg:           #FDFCF9;
  --surface:      #FFFFFF;
  --surface-2:    #F9F9F9;
  --sidebar-bg:   #F9F6F0;
  --border:       #EAEAEA;
  --border-light: #F4F4F4;
  --text:         #111827;
  --text-2:       #374151;
  --text-muted:   #6B7280;
  --text-light:   #9CA3AF;
  
  --green:        #16A34A;
  --green-bg:     #DCFCE7;
  --red:          #DC2626;
  --red-bg:       #FEE2E2;
  --purple:       #9333EA;
  --purple-bg:    #F3E8FF;
  --orange:       #EA580C;
  --orange-bg:    #FFEDD5;
  --silver-bg:    #E5E7EB;
  
  --sidebar-w:    250px;
  --header-h:     72px;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 1px 4px rgba(0,0,0,0.05);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.06);
  --transition:   0.15s ease;
}

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

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.layout { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
}
.sidebar-logo img { height: 32px; object-fit: contain; }
.sidebar-logo-text { display: none; }

.nav { flex: 1; overflow-y: auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 0 16px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border-left: 3px solid transparent;
}
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: rgba(0,0,0,0.03); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { 
  background: var(--surface); 
  color: var(--gold); 
  font-weight: 600; 
  border-left: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.nav-item.active svg { opacity: 1; color: var(--gold); }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-profile {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  padding: 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.profile-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.profile-info { display: flex; flex-direction: column; }
.profile-name { font-size: 13px; font-weight: 700; color: var(--text); }
.profile-role { font-size: 11px; color: var(--text-muted); }

/* ── Main Content ──────────────────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; width: 400px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-search {
  position: relative;
  width: 100%;
}
.topbar-search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.topbar-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.topbar-search input:focus { border-color: var(--gold); }

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--surface-2); }

.page { flex: 1; overflow-y: auto; padding: 16px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Stat Cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-card-header {
  display: flex; align-items: center; justify-content: space-between;
}
.stat-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ── Grids ─────────────────────────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: white; }
.btn-primary:hover { background: var(--gold-dark); box-shadow: 0 4px 12px rgba(212,175,55,0.3); }
.btn-secondary { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid #FECACA; }
.btn-danger:hover { background: var(--red); color: white; }
.btn-success { background: var(--green-bg); color: var(--green); border: 1px solid #A7F3D0; }
.btn-success:hover { background: var(--green); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Custom Select Dropdowns ── */
.custom-select-wrapper { position: relative; user-select: none; width: 100%; }
.custom-select-trigger {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13px; color: var(--text); cursor: pointer;
  transition: border-color var(--transition);
}
.custom-select-trigger:hover, .custom-select-wrapper.open .custom-select-trigger { border-color: var(--gold); }
.custom-select-options {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5); z-index: 1000;
  opacity: 0; visibility: hidden; transform: translateY(-5px); transition: all 0.2s ease;
}
.custom-select-wrapper.open .custom-select-options { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-option { padding: 10px 14px; font-size: 13px; color: #000000; cursor: pointer; transition: all 0.15s ease; }
.custom-option:hover { background: rgba(0,0,0,0.05); color: #000000; }
.custom-option.active { color: #000000; font-weight: 600; background: rgba(212,175,55,0.3); }
/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrapper { 
  width: calc(100% - 48px); 
  margin: 20px 24px;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 800px; }
th, td {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  vertical-align: middle;
}
th {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}
td {
  font-size: 13px;
}
/* Remove outer edges of th/td so they don't double up with .table-wrapper border */
th:first-child, td:first-child { border-left: none; }
th:last-child, td:last-child { border-right: none; }
tr:first-child th { border-top: none; }
tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--surface-2); }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px; font-weight: 600;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--orange-bg); color: var(--orange); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-gold { background: var(--gold-bg); color: var(--text); }
.badge-silver { background: var(--silver-bg); color: var(--text-2); }
.badge-gray { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Action Menu ("...") ───────────────────────────────────────────────────── */
.action-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 4px; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  transition: all var(--transition);
}
.action-btn:hover { background: var(--surface-2); color: var(--text); }
.action-menu {
  position: absolute; right: 0; top: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 8px 0; min-width: 140px;
  z-index: 100;
  display: none; flex-direction: column;
}
.action-menu.open { display: flex; }
.action-menu-item {
  padding: 8px 16px; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.action-menu-item:hover { background: var(--surface-2); }
.action-menu-item.danger { color: var(--red); }

/* ── Custom Select ─────────────────────────────────────────────────────────── */
.custom-select-wrapper { position: relative; flex: 1; min-width: 160px; max-width: 220px; }
.custom-select-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: block; }
.custom-select-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text);
  cursor: pointer;
}
.custom-select-btn::after {
  content: ""; display: block;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); margin-top: -4px;
}
.custom-select-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 100; display: none; padding: 8px;
}
.custom-select-dropdown.open { display: block; }
.custom-option {
  padding: 8px 12px; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  border-radius: 4px;
}
.custom-option:hover { background: var(--surface-2); }
.custom-option.selected { background: var(--surface-2); }
.custom-option-indicator {
  width: 14px; height: 14px; border: 1.5px solid var(--text-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Search / Filter Bar ───────────────────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: flex-end; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-input { padding-left: 36px !important; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  transform: translateY(10px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { cursor: pointer; background: none; border: none; color: var(--text-muted); padding: 4px; border-radius: 4px; }
.modal-close:hover { background: var(--surface-2); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2000;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  min-width: 260px; max-width: 380px;
  animation: slideIn 0.25s ease;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--gold); }
@keyframes slideIn { from { transform: translateX(60px); opacity:0; } to { transform:translateX(0); opacity:1; } }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.pagination-btns { display: flex; gap: 8px; }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: all var(--transition);
}
.page-btn:hover { background: var(--surface-2); }
.page-btn.active { background: var(--gold); color: var(--text); border-color: var(--gold); font-weight: 700; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Toggle Switch ─────────────────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative; width: 42px; height: 24px;
  cursor: pointer; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 99px;
  transition: background var(--transition);
}
.toggle input:checked + .toggle-track { background: var(--gold); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform var(--transition);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }

/* ── Section Tabs ──────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 16px;
  border: none; background: none;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 700; }

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin-bottom: 14px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ── Helpers ───────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.gap-8 { gap: 8px; }
.flex { display: flex; align-items: center; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.section-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

/* ── Loading Spinner ───────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row td { text-align: center; padding: 40px; }

/* ── Dashboard Figma Layout ────────────────────────────────────────────────── */
.dashboard-layout { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 104px); overflow: hidden; }

/* Metrics */
.metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow);
}
.metric-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.metric-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.metric-dots { color: var(--text-light); }
.metric-value { font-size: 28px; font-weight: 800; color: var(--text); }

/* Main Content Row */
.dashboard-content-row {
  display: flex; gap: 12px;
  align-items: stretch;
  flex: 1;
  min-height: 0; /* allows flex children to shrink */
}
.charts-column {
  flex: 1.8; display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
.updates-column {
  flex: 1.2; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden; /* To allow inner scroll */
  min-height: 0;
}

/* Charts */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; flex: 1;
  min-height: 0;
}
.chart-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.chart-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.chart-price { font-size: 24px; font-weight: 800; color: var(--text); }
.live-indicator {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  color: var(--text-2); background: var(--surface-2);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10B981; /* Green by default */
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 2s infinite;
}
.silver-dot {
  background: #3B82F6; /* Blue/Silver indicator */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.chart-canvas-container { position: relative; width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chart-avg-badge {
  position: absolute; left: 32px; bottom: 50%; /* Roughly aligned with dotted line */
  background: #EF4444; color: white;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px;
}

/* Recent Updates */
.updates-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.updates-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.updates-filter-btn {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer;
}
.updates-list {
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; flex: 1;
}
.update-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
}
.update-card-top {
  padding: 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-light);
}
.update-avatar {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.update-avatar.gold { background: #FEF9C3; color: #CA8A04; border: 1px solid #FEF08A; }
.update-avatar.silver { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }
.update-avatar.red { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }

.update-info { flex: 1; }
.update-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.update-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.update-status.pending { color: #EF4444; }
.update-status.confirmed { color: #10B981; }
.update-status.completed { color: #8B5CF6; }

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

.update-card-bottom {
  padding: 12px 16px; background: var(--surface-2);
  font-size: 11px; color: var(--text-muted);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.update-card-bottom strong { color: var(--text); font-weight: 600; }


/* ── Action Dropdown Menu ────────────────────────────────────────────────── */
.action-dropdown {
  position: relative;
  display: inline-block;
}
.action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--text-muted);
}
.action-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.action-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--surface);
  min-width: 130px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 100;
  overflow: hidden;
  margin-top: 4px;
}
/* Drop-up: menu opens above the button when near bottom of viewport */
.action-dropdown.drop-up .action-menu {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}
.action-dropdown.open .action-menu {
  display: block;
}
.action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.action-item:hover {
  background: var(--surface-2);
  color: var(--gold);
}
.action-item.text-red:hover {
  color: var(--red);
}


/* ── Premium Search & Filter Redesign ── */
.search-pill-input {
  border-radius: 99px;
  border: 1.5px solid var(--gold) !important;
  font-size: 13px !important;
  padding: 8px 14px 8px 36px !important;
  background: white;
  color: var(--text);
  height: 38px;
  outline: none;
  transition: box-shadow 0.2s ease;
}
.search-pill-input:focus {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}
.search-input-wrap svg.search-icon-gold {
  color: #64748b !important;
  left: 14px;
}
.filter-btn-circle {
  border-radius: 50% !important;
  width: 38px !important;
  height: 38px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn-circle:hover {
  background: #f8fafc;
  border-color: #cbd5e1 !important;
}
.filter-btn-circle.active {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.05);
}

