:root {
  --bg: #fafafa;
  --fg: #000;
  --accents-1: #eaeaea;
  --accents-2: #999;
  --accents-3: #888;
  --accents-4: #666;
  --accents-5: #444;
  --accents-6: #333;
  --accents-7: #111;
  --border: #eaeaea;
  --success: #0070f3;
  --error: #e00;
  --warning: #f5a623;
  --radius: 6px;
}

body {
  font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

#app-header {
  height: 92px;
}

.font-mono {
  font-family: 'Geist Mono', monospace;
}

.table-empty {
  color: var(--accents-4);
  font-size: 12px;
  font-weight: 400;
  padding: 48px 0;
  text-align: center;
}

td.table-empty {
  height: auto;
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-centered {
  animation: fadeInCentered 0.5s ease-out forwards;
}

@keyframes fadeInCentered {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.geist-input {
  width: 100%;
  font-size: 0.8125rem;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  outline: none;
  border: 1px solid transparent;
  transition: all 0.2s;
  background: #fff;
  border: 1px solid #e6e6e6;
  color: var(--accents-7);
}

.geist-input:focus {
  border-color: #bdbdbd;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.03);
}

.geist-input:disabled {
  background: #f5f5f5;
  color: var(--accents-4);
  cursor: not-allowed;
}

.geist-input::placeholder {
  color: var(--accents-3);
}

.geist-button {
  height: 32px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #000;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0 1rem;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.geist-button:hover {
  opacity: 0.9;
}

.geist-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.geist-button-outline {
  height: 32px;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.geist-button-outline:hover {
  border-color: #000;
}

.geist-button-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.geist-button-danger {
  height: 32px;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #e00;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0 1rem;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.geist-button-danger:hover {
  opacity: 0.9;
}

.geist-button-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-link {
  color: #4b5563;
  transition: all 0.18s;
}

.nav-link:hover {
  color: #111827;
}

.nav-link.active {
  color: #111827;
  font-weight: 500;
}

.admin-topbar {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 250, 0.92));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-topbar-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-brand-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.admin-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(120deg, #0f172a, #3b82f6);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.admin-brand-text {
  white-space: nowrap;
}

.admin-nav-strip {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px;
}

.admin-nav-strip::-webkit-scrollbar {
  display: none;
}

.admin-nav-item {
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.admin-nav-item:hover {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.admin-nav-item.active {
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.3);
  background: linear-gradient(120deg, rgba(219, 234, 254, 0.95), rgba(240, 249, 255, 0.95));
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.nav-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-action-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-action-btn:hover {
  border-color: rgba(15, 23, 42, 0.35);
  color: #0f172a;
  background: #fff;
}

.nav-action-btn.storage-ready {
  background: #e8f7ee;
  border-color: #8fd8ac;
  color: #0f766e;
}

.nav-action-btn.storage-offline {
  background: #fef2f2;
  border-color: #f5a5a5;
  color: #b91c1c;
}

.app-footer {
  position: fixed;
  right: 12px;
  left: 12px;
  bottom: 12px;
  color: #64748b;
  font-size: 12px;
  background: transparent;
  text-align: center;
  z-index: 10;
}

.app-footer a {
  color: inherit;
  transition: color 0.15s;
}

.app-footer a:hover {
  color: var(--fg);
}

@media (max-width: 1024px) {
  #app-header {
    height: 126px;
  }

  .admin-topbar-inner {
    min-height: 108px;
    flex-wrap: wrap;
    align-content: center;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .admin-nav-strip {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .admin-brand-text {
    font-size: 11px;
  }

  .admin-nav-item {
    padding: 6px 10px;
    font-size: 11px;
  }

  .nav-action-btn {
    height: 28px;
    font-size: 11px;
    padding: 0 9px;
  }
}

.stat-card {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: none;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: #000;
  box-shadow: none;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 12px;
  color: var(--accents-4);
  margin-top: 2px;
}
