/* ============================================================
   style.css - Design System Aplikasi Perencanaan Anggaran
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --sidebar-width: 280px;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #3b82f6;
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --card-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.06);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: #f1f5f9;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideDown {
  from { max-height: 0; opacity: 0; }
  to   { max-height: 2000px; opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

.animate-fade-in     { animation: fadeIn 0.4s ease-out; }
.animate-fade-in-up  { animation: fadeInUp 0.5s ease-out; }
.animate-slide-up    { animation: slideUp 0.5s ease-out; }
.animate-slide-left  { animation: slideInLeft 0.4s ease-out; }
.animate-bounce-in   { animation: bounceIn 0.5s ease-out; }
.animate-pulse       { animation: pulse 2s infinite; }

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ---- Login Page ---- */
.login-bg {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e293b 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(99,102,241,0.06) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}
.login-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}
.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 25px rgba(37,99,235,0.3);
}
.captcha-box {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 4px;
  user-select: none;
}

/* ---- Layout ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
}
.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.top-bar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.page-content {
  flex: 1;
  padding: 1.5rem;
}

/* ---- Sidebar Nav Items ---- */
.nav-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  margin: 1px 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.835rem;
  gap: 0.65rem;
  color: #94a3b8;
  text-decoration: none;
  user-select: none;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: white;
  font-weight: 500;
}
.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item .nav-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.nav-item.expanded .nav-arrow {
  transform: rotate(90deg);
}
.nav-section-title {
  padding: 0.75rem 1.25rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
}
.nav-children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.nav-children.open {
  max-height: 5000px;
}
.nav-children .nav-item {
  padding-left: 2.2rem;
  font-size: 0.8rem;
}
.nav-children .nav-children .nav-item {
  padding-left: 3rem;
  font-size: 0.78rem;
}
.nav-children .nav-children .nav-children .nav-item {
  padding-left: 3.5rem;
  font-size: 0.76rem;
}

/* ---- Cards ---- */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: var(--card-shadow-lg);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body {
  padding: 1.25rem;
}

/* Stat Cards */
.stat-card {
  border-radius: 12px;
  padding: 1.25rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.stat-card.blue   { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.stat-card.green  { background: linear-gradient(135deg, #16a34a, #22c55e); }
.stat-card.purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.stat-card.orange { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-card.cyan   { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.stat-card.red    { background: linear-gradient(135deg, #dc2626, #ef4444); }

/* ---- Tree View (Hierarki Anggaran) ---- */
.tree-container {
  position: relative;
}
.tree-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
  position: relative;
}
.tree-row:hover {
  background: #f8fafc;
}
.tree-row.level-0 { background: #eff6ff; font-weight: 600; }
.tree-row.level-1 { background: #f0fdf4; }
.tree-row.level-2 { background: #fefce8; }
.tree-row.level-3 { background: #faf5ff; }
.tree-row.level-4 { background: #fff7ed; }
.tree-row.level-5 { background: #f0fdfa; }
.tree-row.level-6 { background: #fdf2f8; }
.tree-row.level-7 { background: #fff; }

.tree-row.level-0:hover { background: #dbeafe; }
.tree-row.level-1:hover { background: #dcfce7; }
.tree-row.level-2:hover { background: #fef9c3; }
.tree-row.level-3:hover { background: #f3e8ff; }

.tree-indent {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}
.tree-indent-unit {
  width: 24px;
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
}
/* Vertical connector line */
.tree-indent-unit.has-line::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed #cbd5e1;
}
/* Horizontal connector */
.tree-indent-unit.has-branch::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  width: 12px;
  height: 1px;
  border-top: 1px dashed #cbd5e1;
}
/* Last child — truncate the vertical line */
.tree-indent-unit.last-child::before {
  bottom: 50%;
}

.tree-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #64748b;
}
.tree-toggle:hover {
  background: #e2e8f0;
  color: var(--primary);
}
.tree-cell {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  min-height: 36px;
}
.tree-cell-code {
  min-width: 120px;
  max-width: 180px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}
.tree-cell-name {
  flex: 1;
  min-width: 200px;
}
.tree-cell-number {
  min-width: 130px;
  text-align: right;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  justify-content: flex-end;
}
.tree-cell-actions {
  min-width: 80px;
  justify-content: center;
  gap: 4px;
}
.tree-header {
  display: flex;
  background: #1e293b;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: 8px 8px 0 0;
}
.tree-header .tree-cell {
  padding: 0.65rem 0.75rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.835rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-success   { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #15803d; }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-warning   { background: var(--warning); color: white; }
.btn-warning:hover:not(:disabled) { background: #b45309; }
.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-secondary:hover:not(:disabled) { background: #cbd5e1; }
.btn-ghost     { background: transparent; color: #64748b; }
.btn-ghost:hover:not(:disabled) { background: #f1f5f9; color: var(--text-primary); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; border-radius: 6px; }
.btn-xs { padding: 0.2rem 0.4rem; font-size: 0.7rem; border-radius: 4px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 8px; }
.btn-icon.btn-sm { width: 28px; height: 28px; }

/* ---- Form Inputs ---- */
.form-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  outline: none;
  background: white;
  color: var(--text-primary);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-input::placeholder { color: #94a3b8; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.35rem;
}
.form-group { margin-bottom: 1rem; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em;
  padding-right: 2.5rem;
}

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* ---- Toast Notifications ---- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  background: white;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border-left: 4px solid;
  min-width: 320px;
  max-width: 420px;
  animation: toastIn 0.35s ease-out;
}
.toast.removing { animation: toastOut 0.3s ease-in forwards; }
.toast.toast-success { border-color: var(--success); }
.toast.toast-error   { border-color: var(--danger); }
.toast.toast-warning { border-color: var(--warning); }
.toast.toast-info    { border-color: var(--info); }
.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--info); }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.15rem; }
.toast-message { font-size: 0.78rem; color: var(--text-secondary); }
.toast-close {
  background: none; border: none; cursor: pointer; color: #94a3b8;
  font-size: 1rem; padding: 0; line-height: 1;
}
.toast-close:hover { color: var(--text-primary); }

/* ---- Loading Spinner ---- */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 20;
  border-radius: inherit;
}
.loading-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow: auto;
  animation: fadeInUp 0.3s ease-out;
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.05rem; font-weight: 600; }
.modal-body  { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ---- Table ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.835rem;
}
.data-table thead th {
  background: #f8fafc;
  padding: 0.7rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  color: #475569;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.data-table tbody td {
  word-break: break-word;
  white-space: normal;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
}
.tab-item {
  padding: 0.65rem 1.25rem;
  font-size: 0.835rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tab-item:hover { color: var(--primary); }
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}
.empty-state i {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}
.empty-state h3 { font-size: 1.1rem; color: var(--text-primary); margin: 0 0 0.5rem; }
.empty-state p  { font-size: 0.85rem; margin: 0; }

/* ---- Page Header ---- */
.page-header {
  margin-bottom: 1.5rem;
}
.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ---- Misc ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1rem 0;
}
.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}

/* ---- Print ---- */
@media print {
  .sidebar, .top-bar, .btn, .toast-container { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  body { background: white !important; }
  .tree-row { break-inside: avoid; }
}

/* ---- Mobile Overlay ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 35;
}
@media (max-width: 1024px) {
  .sidebar.mobile-open ~ .sidebar-overlay { display: block; }
}

/* ---- Summary Bar ---- */
.summary-bar {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  flex-wrap: wrap;
}
.summary-item {
  display: flex;
  flex-direction: column;
}
.summary-label { font-size: 0.7rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.summary-value { font-size: 1rem; font-weight: 700; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }

/* ---- Search Box ---- */
.search-box {
  position: relative;
}
.search-box input {
  padding-left: 2.25rem;
}
.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

/* ---- Verification Flow ---- */
.verification-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.verification-step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
}
.verification-step.active { background: #dbeafe; color: #1d4ed8; }
.verification-step.done   { background: #dcfce7; color: #166534; }
.verification-arrow { color: #cbd5e1; font-size: 0.75rem; }

/* ---- Sidebar Minimized ---- */
.sidebar-minimized { 
    width: 0 !important; 
    min-width: 0 !important; 
    padding: 0 !important; 
    border: none !important; 
    overflow: hidden !important; 
    opacity: 0; 
    transform: translateX(-100%);
}
