/* Gotham City — Shared Styles */

:root {
  --bg-primary: #0d0f14;
  --bg-secondary: #141720;
  --bg-card: #1a1e2b;
  --bg-input: #1e2332;
  --border: #2a3147;
  --border-light: #323a52;
  --text-primary: #e8ecf5;
  --text-secondary: #8892aa;
  --text-muted: #545e78;
  --accent-blue: #1e88e5;
  --accent-blue-dark: #0b5394;
  --accent-blue-bright: #42a5f5;
  --accent-glow: rgba(30, 136, 229, 0.15);
  --success: #2e7d32;
  --success-text: #66bb6a;
  --danger: #b71c1c;
  --danger-text: #ef5350;
  --warning-text: #ffa726;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(30, 136, 229, 0.2);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-blue-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-blue-bright);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-card);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #c62828;
}

/* --- Form elements --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: var(--font);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* --- Alert --- */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: rgba(183, 28, 28, 0.15);
  border: 1px solid rgba(183, 28, 28, 0.4);
  color: var(--danger-text);
}

.alert-success {
  background: rgba(46, 125, 50, 0.15);
  border: 1px solid rgba(46, 125, 50, 0.4);
  color: var(--success-text);
}

/* --- Logo / Brand --- */
.gotham-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gotham-logo .bat-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(30, 136, 229, 0.6));
}

.gotham-logo .brand-text {
  display: flex;
  flex-direction: column;
}

.gotham-logo .brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.gotham-logo .brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* --- Status badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-fast {
  background: rgba(46, 125, 50, 0.2);
  color: var(--success-text);
  border: 1px solid rgba(46, 125, 50, 0.3);
}

.badge-deep {
  background: rgba(11, 83, 148, 0.3);
  color: var(--accent-blue-bright);
  border: 1px solid rgba(30, 136, 229, 0.3);
}

.badge-batcave {
  background: rgba(80, 0, 120, 0.3);
  color: #ce93d8;
  border: 1px solid rgba(156, 39, 176, 0.3);
}

.badge-claude {
  background: rgba(191, 148, 35, 0.2);
  color: var(--warning-text);
  border: 1px solid rgba(191, 148, 35, 0.3);
}

.badge-error {
  background: rgba(183, 28, 28, 0.2);
  color: var(--danger-text);
  border: 1px solid rgba(183, 28, 28, 0.3);
}

.badge-vision-fast {
  background: rgba(46, 125, 50, 0.2);
  color: #6ECEB2;
  border: 1px solid rgba(110, 206, 178, 0.4);
}

.badge-vision-deep {
  background: rgba(128, 60, 180, 0.25);
  color: #c77dff;
  border: 1px solid rgba(199, 125, 255, 0.4);
}

.vision-escalation-notice {
  color: #6ECEB2;
  font-style: italic;
  font-size: 13px;
  padding: 6px 12px;
  margin: 6px 0;
  border-left: 3px solid #6ECEB2;
  background: rgba(110, 206, 178, 0.08);
  border-radius: 0 6px 6px 0;
  animation: fadeInEsc 0.3s ease-in;
}

@keyframes fadeInEsc {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* --- Spinner --- */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* --- Responsive --- */
@media (max-width: 600px) {
  :root {
    font-size: 14px;
  }
}
