/* ============================================
   GoRockit Base Stylesheet
   Single source of truth for variables, reset,
   typography, layout, and common components.
   ============================================ */

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

/* === CSS Variables (canonical) === */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #161616;
  --surface3: #1a1a1a;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.10);
  --text: #e5e5e5;
  --muted: #737373;
  --muted2: #a3a3a3;
  --accent: #635BFF;
  --accent-dim: rgba(99,91,255,0.08);
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #fbbf24;
  --blue: #60a5fa;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* === Body === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

/* === App Layout === */
.app-layout { display: flex; min-height: 100vh; }
.main { flex: 1; margin-left: 300px; min-height: 100vh; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 8px 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  border-radius: 8px; font-size: 0.85rem; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.btn:hover { border-color: var(--border2); }
.btn-primary { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }
.btn-danger { color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.08); }

/* === Forms === */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.85rem;
  color: var(--muted); margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: 6px;
  font-size: 0.85rem; font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
}

/* === Modals === */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.show,
.modal-overlay.visible { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 2rem;
  width: 440px; max-width: 90vw;
}
.modal h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* === Mobile === */
@media (max-width: 768px) {
  .main { margin-left: 0 !important; }
  .modal { width: 95vw; padding: 1.5rem; }
  input, select, textarea { font-size: 16px; min-height: 44px; }
}
