/* Appstore Control Plane — Custom Styles */

:root {
  /* Technical/Engineering palette — dark with green terminal accent */
  --dash-bg: #0F172A;
  --dash-surface: #1B2336;
  --dash-surface-hover: #222b3d;
  --dash-border: #334155;
  --dash-text: #F8FAFC;
  --dash-muted: #94A3B8;
  --dash-accent: #22C55E;
  --dash-accent-hover: #16A34A;
  --dash-danger: #EF4444;
  --dash-danger-hover: #DC2626;
  --dash-success: #22C55E;
  --dash-warning: #F59E0B;
  --dash-sidebar-w: 260px;
  --dash-input-bg: #151d2e;
  --dash-focus-ring: rgba(34, 197, 94, 0.2);
}

/* Dot-grid background for dashboard */
.dot-grid-bg {
  background-image: radial-gradient(circle, #334155 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Monospace font class */
.mono { font-family: 'JetBrains Mono', monospace; }

/* Fade-in animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.5s ease-out both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.1s; }
.fade-up-3 { animation-delay: 0.15s; }
.fade-up-4 { animation-delay: 0.2s; }
.fade-up-5 { animation-delay: 0.25s; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Sidebar transitions */
.sidebar-link {
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: var(--dash-surface-hover);
}

.sidebar-link.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--dash-accent);
  border-right: 2px solid var(--dash-accent);
}

/* Table row hover */
.table-row {
  transition: background 0.12s;
}

.table-row:hover {
  background: var(--dash-surface-hover);
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  border: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--dash-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--dash-accent-hover);
}

.btn-danger {
  background: var(--dash-danger);
  color: white;
}

.btn-danger:hover {
  background: var(--dash-danger-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--dash-border);
  color: var(--dash-muted);
}

.btn-outline:hover {
  border-color: var(--dash-muted);
  color: var(--dash-text);
}

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request .htmx-hide-on-request {
  display: none;
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Toast notification */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.toast {
  animation: slideIn 0.3s ease-out;
}

.toast-exit {
  animation: slideOut 0.3s ease-in forwards;
}

/* Input focus — green accent */
.tech-input:focus {
  outline: none;
  border-color: var(--dash-accent);
  box-shadow: 0 0 0 3px var(--dash-focus-ring);
}

/* Pulse animation for loading */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 1.5s ease-in-out infinite;
}
