/* OriginBI Admin Panel — base styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --green: #1ED36A;
  --green-dark: #1A8A47;
  --green-glow: rgba(30, 211, 106, 0.4);
  --green-soft: rgba(30, 211, 106, 0.1);

  /* Dark surfaces */
  --bg: #0f1411;
  --bg-2: #141a17;
  --surface: #19211C;
  --surface-2: #1f2723;
  --surface-3: #24302a;
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);

  /* Text */
  --fg: #FFFFFF;
  --fg-2: #C7CDD0;
  --fg-3: #8a9196;
  --fg-4: #5e676c;

  /* Status */
  --red: #ED2F34;
  --red-soft: rgba(237, 47, 52, 0.12);
  --amber: #FFB703;
  --amber-soft: rgba(255, 183, 3, 0.14);
  --blue: #4AC6EA;
  --blue-soft: rgba(74, 198, 234, 0.14);
  --purple: #5337BC;
  --purple-soft: rgba(83, 55, 188, 0.18);
  --pink: #D84C74;
  --pink-soft: rgba(216, 76, 116, 0.18);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-pill: 999px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100vh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
}

/* Subtle grid bg */
.assessment-grid {
  background-image:
    linear-gradient(rgba(30, 211, 106, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 211, 106, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* Scrollbars */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(30, 211, 106, 0.25); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(30, 211, 106, 0.45); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn {
  0%   { opacity: 0; transform: translateY(18px) scale(0.94); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.animate-fade { animation: fadeIn 240ms ease-out; }
.animate-slide { animation: slideUp 240ms cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.animate-pop { animation: popIn 420ms cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.animate-spin { animation: spin 800ms linear infinite; }

/* Reusable */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.card-2 {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: all 180ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: #0a1410;
}
.btn-primary:hover { background: #2ce07b; }
.btn-secondary {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--fg);
}
.btn-secondary:hover { background: var(--card-2); border-color: rgba(255,255,255,0.18); }
.btn-ghost {
  color: var(--fg-2);
}
.btn-ghost:hover { color: var(--fg); background: var(--card); }
.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn-danger:hover { background: rgba(237,47,52,0.2); }
.btn-icon {
  padding: 8px;
  border-radius: var(--r-md);
  color: var(--fg-3);
}
.btn-icon:hover { color: var(--fg); background: var(--card); }

/* Inputs */
.input {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 12px;
  color: var(--fg);
  font-size: 13px;
  width: 100%;
  transition: border-color 150ms ease, background 150ms ease;
}
.input:focus {
  outline: none;
  border-color: rgba(30, 211, 106, 0.5);
  background: rgba(255,255,255,0.05);
}
.input::placeholder { color: var(--fg-4); }

.input-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 6px;
  display: block;
}

/* Tag/Badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-green { background: var(--green-soft); color: var(--green); border-color: rgba(30,211,106,0.25); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(255,183,3,0.3); }
.badge-red { background: var(--red-soft); color: #ff5a5f; border-color: rgba(237,47,52,0.3); }
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(74,198,234,0.3); }
.badge-purple { background: var(--purple-soft); color: #a18cf0; border-color: rgba(83,55,188,0.35); }
.badge-pink { background: var(--pink-soft); color: #f08bb0; border-color: rgba(216,76,116,0.3); }
.badge-neutral { background: var(--card); color: var(--fg-2); border-color: var(--border-strong); }

/* Dot status */
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-grey { background: var(--fg-4); }

/* Tables */
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.tbl thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.tbl tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.tbl tbody tr:last-child td { border-bottom: none; }

/* Toggle switch */
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 180ms ease;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg-3);
  transition: all 180ms ease;
}
.switch.on { background: var(--green); border-color: var(--green); }
.switch.on::after { left: 18px; background: #0a1410; }

/* Avatar */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}

/* Code block */
.code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.6;
}
.code-block {
  background: #0a0e0c;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #d8e1dc;
  overflow-x: auto;
  white-space: pre;
}

.divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

/* Module color accents */
.acc-green { --acc: #1ED36A; --acc-bg: rgba(30,211,106,0.12); }
.acc-purple { --acc: #8b6df0; --acc-bg: rgba(99,102,241,0.18); }
.acc-cyan { --acc: #06b6d4; --acc-bg: rgba(6,182,212,0.16); }
.acc-lime { --acc: #84cc16; --acc-bg: rgba(132,204,22,0.16); }
.acc-amber { --acc: #FFB703; --acc-bg: rgba(255,183,3,0.18); }
.acc-rose { --acc: #f43f5e; --acc-bg: rgba(244,63,94,0.16); }

/* Hide native number spinner */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}
input[type=number] { -moz-appearance: textfield; }
