:root, [data-theme="generic"] {
    --brand-50: 248 250 252;
    --brand-100: 241 245 249;
    --brand-200: 226 232 240;
    --brand-300: 203 213 225;
    --brand-400: 148 163 184;
    --brand-500: 30 41 59;
    --brand-600: 15 23 42;
    --brand-700: 2 6 23;
    --brand-800: 2 6 23;
    --brand-900: 2 6 23;
    --brand-dark: 15 23 42;
    --brand-accent: 37 99 235;
    --brand-font: 'Inter';
    --auth-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #2563eb 100%);
}
body { font-family: var(--brand-font), sans-serif; }
.brand-gradient { background-image: linear-gradient(90deg, #0f172a 13%, #2563eb 87%); }
.auth-bg { background-image: var(--auth-bg); }
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.animate-fade-in { animation: fadeIn 0.2s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.spinner { width: 24px; height: 24px; border: 3px solid #e2e8f0; border-top-color: rgb(var(--brand-600)); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.confirm-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); animation: fadeIn 0.15s ease; }
.confirm-box { background: white; border-radius: 16px; padding: 24px; max-width: 400px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; color: #94a3b8; }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; text-align: center; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.12); max-height: 360px; overflow-y: auto; z-index: 50; margin-top: 4px; }
.search-dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 13px; color: #334155; transition: background 0.1s; text-decoration: none; }
.search-dropdown a:hover { background: #f1f5f9; }
.search-dropdown .search-empty { padding: 24px; text-align: center; color: #94a3b8; font-size: 13px; }
@media (max-width: 768px) {
  .sidebar-nav { position: fixed; top: 0; left: -280px; width: 280px; height: 100vh; transition: left 0.25s ease; z-index: 40; }
  .sidebar-nav.sidebar-open { left: 0; box-shadow: 4px 0 30px rgba(0,0,0,0.3); }
  .mobile-header { display: flex !important; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .confirm-box { max-width: calc(100vw - 2rem); }
}

body {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

#toast-container {
  padding-top: env(safe-area-inset-top);
}
