/* Minimal Dark Theme Shared Stylesheet */
:root {
  --bg-base: #0b0f19;
  --bg-surface: #111827;
  --bg-elevated: #1f2937;
  --bg-hover: #374151;
  --border-color: #374151;
  --border-subtle: #1f2937;
  --border-focus: #8b5cf6;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-color: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin: 0 0 10px 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Form Elements & Inputs */
input:not([type="checkbox"]):not([type="radio"]),
select,
button,
.button,
textarea {
  font-family: inherit;
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

button,
.button {
  line-height: normal;
  padding: 0 8px;
  height: 26px;
  vertical-align: middle;
}

textarea {
  line-height: 1.4;
  padding: 6px 8px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

select {
  cursor: pointer;
  padding: 4px 24px 4px 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  appearance: none;
  -webkit-appearance: none;
}

/* Buttons */
button, .button {
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
  user-select: none;
  white-space: nowrap;
}

button:hover, .button:hover {
  background: var(--primary-hover);
}

button:disabled, .button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.button-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.button-outline:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--text-secondary);
}

.button-small, .select-small, .input-small {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

/* Data Tables */
table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

table th, .data-table th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

table td, .data-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

table tr:hover td, .data-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

/* Code & Pre */
pre, code {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

code {
  background: var(--bg-elevated);
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  color: #e2e8f0;
}

pre {
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  overflow-x: auto;
  color: #e2e8f0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.4);
}
