* {
  box-sizing: border-box;
}

:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #17202a;
  --muted: #5f6c7b;
  --border: #dde3ea;
  --primary: #1f6feb;
  --primary-strong: #174ea6;
  --danger: #c0392b;
}

[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #17212c;
  --surface-soft: #1d2a36;
  --text: #eef4f8;
  --muted: #a8b6c5;
  --border: #2f3f50;
  --primary: #5ea0ff;
  --primary-strong: #8abaff;
  --danger: #ef6b5c;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.title {
  margin: 0 0 0.75rem;
}

.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  line-height: 1.1;
  text-align: center;
  vertical-align: middle;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0.6rem 0.7rem;
}

.form-row {
  margin-bottom: 0.8rem;
}

.error {
  color: #b42318;
  font-size: 0.9rem;
}

.is-hidden {
  display: none !important;
}

.btn:disabled,
.input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.callout {
  background: #f8fbff;
  border: 1px solid #b8d7ff;
  border-radius: 8px;
  color: #12355b;
  margin-bottom: 0.9rem;
  padding: 0.85rem 0.95rem;
}

.callout-warning {
  background: #fff9ed;
  border-color: #f4c76f;
  color: #613f00;
}

.callout-title {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.callout p {
  margin: 0.25rem 0 0;
}

.callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.empty-state {
  color: #5f6c7b;
  padding: 1rem;
  text-align: center;
}

.help-tip {
  color: #5f6c7b;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.app-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 32, 0.16);
  color: var(--text);
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 3000;
}

.app-toast-success {
  border-left-color: #1e7a46;
}

.app-toast-error {
  border-left-color: var(--danger);
}

.app-toast-title {
  font-weight: 800;
  margin: 0 0 0.18rem;
}

.app-toast-body {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.rich-editor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  line-height: 1.45;
  min-height: 280px;
  overflow: auto;
  padding: 0.75rem;
}

.rich-editor:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(31, 111, 235, 0.14);
}
