@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import url("https://unpkg.com/trix@2.1.10/dist/trix.css");

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #6b7280;
}

* {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at 20% 20%, #e0f2fe, transparent 35%),
              radial-gradient(circle at 80% 10%, #e0e7ff, transparent 30%),
              radial-gradient(circle at 50% 80%, #f1f5f9, transparent 30%),
              #f8fafc;
  color: var(--text);
}

input,
select,
textarea {
  border: 1px solid #d7dce5;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.field-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 128px 20px 56px;
}

@media (max-width: 768px) {
  .page-shell {
    padding: 104px 16px 48px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid #d7dce5;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  padding: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: transparent;
}

.btn-ghost {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0f172a;
  border: 1px solid #bfdbfe;
}

select {
  margin: 5px 0;
}

.table-shell table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-shell th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #d7dce5;
}

.table-shell td {
  padding: 14px 16px;
  border-bottom: 1px solid #e4e7ee;
}

.table-shell tr:hover td {
  background: #f8fafc;
}

.flash {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
}

trix-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  background: #ffffff;
  padding: 6px 8px;
  margin-bottom: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

trix-toolbar .trix-button-group {
  display: inline-flex;
  gap: 4px;
  border: none;
  padding: 0;
  margin: 0;
}

trix-toolbar .trix-button {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 8px;
  padding: 6px 8px;
  min-height: 32px;
  min-width: 32px;
  transition: all 0.12s ease-in-out;
  font-size: 13px;
}

trix-toolbar .trix-button:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1d4ed8;
}

trix-toolbar .trix-button.trix-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

trix-toolbar .trix-button--icon-undo,
trix-toolbar .trix-button--icon-redo {
  border-color: #e2e8f0;
}

trix-toolbar .trix-button-group--file-tools {
  display: none;
}

trix-editor {
  min-height: 120px;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.6;
}

trix-editor:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
  background: #ffffff;
}

.note-body {
  color: var(--text);
}

.note-body :where(p, ul, ol, blockquote) {
  margin-bottom: 0.4rem;
}

.note-body ul {
  list-style-type: disc;
  padding-left: 1.25rem;
}

.note-body ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
}

.note-body a {
  color: #1d4ed8;
  text-decoration: underline;
}

.pagy.series-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.pagy.series-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d7dce5;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: all 120ms ease;
}

.pagy.series-nav a:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.pagy.series-nav a[aria-current="page"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.pagy.series-nav a[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}
