:root {
  --bg-sidebar: #f8fafc;
  --bg-main: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
  --bg-sidebar: #0f172a;
  --bg-main: #0b1220;
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --border: #334155;
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --danger: #f87171;
  --danger-hover: #ef4444;
  --surface: #111827;
  --surface-hover: #1f2937;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 8px -1px rgb(0 0 0 / 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
  color: var(--text-main);
  background: var(--bg-main);
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  line-height: 1.5;
}

h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.5rem; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  outline: none;
}

button {
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

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

button:disabled {
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
  opacity: 0.8;
}

button.secondary { background: var(--text-muted); }
button.secondary:hover { background: #475569; }

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

button.ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}
button.ghost:hover { background: var(--surface-hover); }

.btn-ghost-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-ghost-link:hover {
  background: var(--surface-hover);
}

input, select, textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--surface);
  transition: border-color 0.2s;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }

textarea {
  min-height: 200px;
  resize: vertical;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.text-muted { color: var(--text-muted); }
.status-ok { background: #dcfce7; color: #166534; }
[data-theme="dark"] .status-ok { background: #14532d; color: #bbf7d0; }
