/* ── LangDB Theme — CSS custom properties & base styles ── */

:root, [data-theme="dark"] {
  --bg: #0c1017;
  --panel-bg: #131923;
  --panel-bg-hover: #192030;
  --panel-border: #1e2d3d;
  --panel-border-light: #243447;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #56687a;
  --accent-primary: #00c8a7;
  --accent-hover: #00b394;
  --accent-bg: rgba(0,200,167,.08);
  --accent-border: rgba(0,200,167,.3);
  --danger: #e05a5a;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --nav-height: 60px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
}

[data-theme="light"] {
  --bg: #f6f9fc;
  --panel-bg: #ffffff;
  --panel-bg-hover: #f1f5f9;
  --panel-border: #dde4ef;
  --panel-border-light: #e8eef5;
  --text-primary: #0f1923;
  --text-secondary: #476070;
  --text-muted: #8096a8;
  --accent-primary: #009b80;
  --accent-hover: #007d67;
  --accent-bg: rgba(0,155,128,.08);
  --accent-border: rgba(0,155,128,.3);
  --danger: #dc2626;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Layout ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 660px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover { background: var(--panel-bg-hover); color: var(--text-primary); }
.btn-lg { padding: .875rem 1.75rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: .375rem .875rem; font-size: .8125rem; }
.btn-full { width: 100%; }

/* ── Form fields ── */
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-input,
.form-select,
.form-textarea {
  background: var(--panel-bg-hover);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .9375rem;
  padding: .625rem .875rem;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-bg);
  outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--danger); font-size: .8rem; }
