/* Dark theme, modern dashboard styling */
:root {
  --bg: #0f1218;
  --panel: #151a22;
  --muted: #8c96a5;
  --text: #e6e9f0;
  --accent: #4f9cff;
  --accent-2: #2dd4bf;
  --danger: #ff6b6b;
  --border: #232a35;
  --card: #171c24;
  --success: #22c55e;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 16px; }

.app-header, .app-footer { background: var(--panel); border-bottom: 1px solid var(--border); }
.app-footer { border-top: 1px solid var(--border); border-bottom: none; }
.app-header h1 { margin: 0; padding: 16px; font-size: 20px; font-weight: 600; }
.app-footer div { padding: 12px 16px; color: var(--muted); font-size: 13px; }

.controls { background: var(--panel); padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.control-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.control-group { display: flex; flex-direction: column; gap: 6px; }
.control-group.full { grid-column: 1 / -1; }
.control-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

label { font-size: 12px; color: var(--muted); }
input, select { 
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
input::placeholder { color: #6b7280; }

.btn { 
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.btn.primary { background: linear-gradient(180deg, #4f9cff, #297ee6); border-color: #2a6fd1; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.subtle { background: transparent; color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.inline-actions { display: flex; align-items: center; gap: 12px; }
.hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.hint.small { margin-top: 0; }

.tabs { margin-top: 16px; }
.tab-list { display: flex; gap: 8px; position: sticky; top: 0; background: var(--bg); padding: 8px 0; z-index: 2; }
.tab { 
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); cursor: pointer; font-weight: 500; font-size: 14px;
}
.tab.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(79,156,255,0.2) inset; }

.tab-panel { display: none; padding: 12px 0; }
.tab-panel.active { display: block; }

.tables { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.card h3 { margin: 0 0 8px; font-size: 16px; }

.table-wrapper { overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrapper th, .table-wrapper td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table-wrapper th { background: #121720; position: sticky; top: 0; z-index: 1; }
.table-wrapper tr:hover td { background: rgba(255,255,255,0.02); }

.status { padding: 12px; color: var(--muted); font-size: 13px; }
.status.error { color: var(--danger); }
.status.success { color: var(--success); }

.loader { display: inline-flex; align-items: center; gap: 8px; }
.loader .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite ease-in-out; }
.loader .dot:nth-child(2) { animation-delay: 0.2s; }
.loader .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.6;} 40% { transform: scale(1); opacity: 1; } }

@media (max-width: 900px) { .control-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .control-grid { grid-template-columns: 1fr; } .inline-actions { flex-wrap: wrap; } }
