:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --border: #e4e4e7;
  --text: #18181b;
  --text-muted: #71717a;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-soft: #fff7ed;
  --font-sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --bg-elevated: #18181b;
    --border: #27272a;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-soft: #1c1410;
  }
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

.app {
  display: flex;
  height: 100%;
}

.sidebar {
  width: 240px;
  flex: 0 0 240px;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar h1 {
  font-size: 0.95rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar h1::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  background: var(--accent);
  border-radius: 0.25rem;
}

.sidebar-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--text);
  font-size: 0.9rem;
}
.sidebar-link:hover {
  background: var(--bg);
  text-decoration: none;
}
.sidebar-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.toolbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.center {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  transition: background 120ms;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.error {
  color: #b91c1c;
  font-size: 0.85rem;
}
