:root {
  --sidebar: #1f2a44;
  --sidebar-hover: #2b3b5c;
  --accent: #3b82f6;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

body.panel-body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.panel-shell {
  display: flex;
  min-height: 100vh;
}

.panel-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #1a243a 0%, #243352 100%);
  color: #fff;
  padding: 1.25rem 1rem;
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width .2s ease, padding .2s ease;
}

.panel-shell.sidebar-collapsed .panel-sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-toggle {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  padding: .35rem .6rem;
  border-radius: 10px;
}

.sidebar-toggle:hover {
  background: #eef2ff;
}

.brand {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 .5rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand strong { display: block; }
.brand small { opacity: .7; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.side-nav-link {
  color: #dbe4f5;
  text-decoration: none;
  padding: .7rem .85rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: .65rem;
}

.side-nav-link:hover,
.side-nav-link.active {
  background: var(--sidebar-hover);
  color: #fff;
}

.side-nav-group {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin-top: .35rem;
}

.side-nav-group-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9fb0cc;
  padding: .55rem .85rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
}

.side-nav-group-toggle:hover,
.side-nav-group.is-active .side-nav-group-toggle,
.side-nav-group.is-open .side-nav-group-toggle {
  color: #e8eef9;
  background: rgba(255, 255, 255, .04);
}

.side-nav-group-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.side-nav-chevron {
  font-size: .75rem;
  opacity: .75;
  transition: transform .18s ease;
}

.side-nav-group.is-open .side-nav-chevron {
  transform: rotate(180deg);
}

.side-nav-sub {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .1rem 0 .35rem .35rem;
}

.side-nav-sub .side-nav-link {
  padding: .55rem .75rem;
  font-size: .95rem;
}

.side-nav a,
.side-nav-link {
  color: #dbe4f5;
  text-decoration: none;
}

/* geriye dönük: eski düz a stilleri */
.side-nav > a {
  color: #dbe4f5;
  text-decoration: none;
  padding: .7rem .85rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: .65rem;
}

.side-nav > a:hover,
.side-nav > a.active {
  background: var(--sidebar-hover);
  color: #fff;
}

.book-cover-editor {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.book-cover-preview-wrap {
  width: 120px;
  height: 168px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2ff;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.book-cover-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-cover-preview-empty {
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
  padding: .5rem;
}

.book-cover-controls {
  flex: 1;
  min-width: 220px;
}

.book-list-cover {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.panel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.panel-topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.user-chip {
  color: var(--muted);
  font-size: .95rem;
}

.panel-content {
  padding: 1.5rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .06);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.2rem;
}

.stat-icon.purple { background: #7c3aed; }
.stat-icon.pink { background: #db2777; }
.stat-icon.green { background: #059669; }
.stat-icon.blue { background: #2563eb; }

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-size: .9rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quick-card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.4rem 1.2rem 1.2rem;
  box-shadow: 0 10px 28px rgba(31, 41, 55, .06);
  text-align: center;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quick-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: .85rem;
  font-size: 1.35rem;
}

.quick-icon.blue { background: #3b82f6; }
.quick-icon.indigo { background: #4f46e5; }
.quick-icon.violet { background: #7c3aed; }
.quick-icon.slate { background: #334155; }

.quick-card h3 {
  font-size: 1.15rem;
  margin: 0 0 .35rem;
}

.quick-card p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 1rem;
  flex: 1;
}

.quick-card .btn {
  border-radius: 999px;
  padding: .45rem 1.1rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-table-card {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .05);
}

.form-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 820px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .05);
}

.book-page-form-card {
  max-width: 1180px;
}

.rz-editor {
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.rz-editor.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1090;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

body.rz-fullscreen-open {
  overflow: hidden;
}

.rz-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rz-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .5rem .6rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 2;
}

.rz-group {
  display: flex;
  gap: .25rem;
  padding-right: .5rem;
  border-right: 1px solid #e5e7eb;
}

.rz-group:last-child {
  border-right: 0;
  padding-right: 0;
}

.rz-group-end {
  margin-left: auto;
}

.rz-btn {
  border: 1px solid transparent;
  background: #fff;
  color: #1f2937;
  border-radius: 8px;
  padding: .35rem .6rem;
  font-size: .88rem;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.rz-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.rz-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.rz-btn-danger {
  color: #b91c1c;
}

.rz-btn-danger:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

.rz-btn-ar {
  font-family: "Traditional Arabic", "Amiri", serif;
  font-size: .95rem;
}

.rz-content {
  min-height: 420px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 1.1rem 1.25rem;
  line-height: 1.75;
  outline: none;
}

.rz-editor.is-fullscreen .rz-content,
.rz-editor.is-fullscreen .rz-source {
  max-height: none;
  flex: 1;
}

.rz-content p {
  margin-bottom: .9rem;
}

.rz-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .9rem;
}

.rz-content:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .18);
}

.rz-source {
  width: 100%;
  min-height: 420px;
  max-height: 62vh;
  border: 0;
  outline: none;
  padding: 1rem 1.25rem;
  font: 13px/1.6 Consolas, "Courier New", monospace;
  resize: vertical;
}

.rz-status {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .4rem .9rem;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  font-size: .8rem;
  color: #64748b;
}

.rz-content ar,
.detail-content-body ar,
.word-import-page-body ar {
  font-family: "Amiri", "Traditional Arabic", "Scheherazade New", "Times New Roman", serif;
  font-size: 1.18em;
  line-height: 1.85;
  direction: rtl;
  unicode-bidi: isolate;
}

.risale-ar-btn {
  font-family: "Traditional Arabic", "Amiri", serif;
  font-weight: 700;
  font-size: 1.05em;
  margin-inline-end: .15rem;
}

.rz-content ar {
  background: rgba(16, 185, 129, .10);
  border-radius: 4px;
  padding: 0 .15em;
}

.link-results {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  max-height: 220px;
  overflow: auto;
  background: #f8fafc;
}

.link-result-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
  padding: .7rem .85rem;
}

.link-result-item:last-child {
  border-bottom: 0;
}

.link-result-item:hover {
  background: #eef2ff;
}

.link-result-item strong {
  display: block;
  margin-bottom: .2rem;
}

.link-result-item span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #64748b;
  font-size: .9rem;
}

.rz-content lgt {
  color: #1d4ed8;
  border-bottom: 1px dotted #1d4ed8;
  cursor: pointer;
}

.rz-content lgt[id] {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
  background: rgba(124, 58, 237, .07);
}

.editor-help {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.editor-help-step {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: .35rem .75rem;
  font-size: .88rem;
}

.editor-help-step span {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
}

.link-bubble {
  position: absolute;
  z-index: 1080;
  display: none;
  gap: .35rem;
  padding: .35rem;
  background: #111827;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
}

.link-bubble.is-visible {
  display: flex;
}

.link-bubble-btn {
  border: 0;
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: .4rem .75rem;
  font-size: .88rem;
  white-space: nowrap;
}

.link-bubble-btn:hover {
  background: rgba(255, 255, 255, .12);
}

.link-bubble-btn.is-danger {
  color: #fecaca;
}

.link-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  z-index: 1085;
}

.link-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  z-index: 1090;
  transform: translateX(105%);
  transition: transform .2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
}

.link-drawer.is-open {
  transform: translateX(0);
}

.link-drawer-head,
.link-drawer-foot {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #eef2f7;
}

.link-drawer-foot {
  border-bottom: 0;
  border-top: 1px solid #eef2f7;
  margin-top: auto;
}

.link-drawer-body {
  padding: 1rem 1.1rem;
  overflow: auto;
  flex: 1;
}

.link-results-tall {
  max-height: min(55vh, 480px);
}

.link-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  z-index: 1100;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
  font-size: .92rem;
}

.link-toast.is-error {
  background: #b91c1c;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 70% 55% at 12% 18%, rgba(59, 130, 246, .22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 82%, rgba(30, 58, 95, .18), transparent 50%),
    linear-gradient(165deg, #1a243a 0%, #243352 42%, #1f2a44 100%);
}

.login-shell.is-welcome {
  place-items: start center;
  padding-top: clamp(2rem, 8vh, 4.5rem);
  padding-bottom: 2.5rem;
}

.public-welcome {
  width: min(40rem, 100%);
  background: rgba(255, 255, 255, .97);
  border-radius: 22px;
  padding: 1.65rem 1.6rem 1.5rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 28px 60px rgba(8, 15, 30, .35);
  border: 1px solid rgba(255, 255, 255, .2);
}

.public-welcome-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.public-welcome-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1e3a5f, #6e2722);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.public-welcome-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e2722;
  opacity: 0.85;
  font-weight: 700;
}

.public-welcome h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 750;
  color: #1a243a;
  letter-spacing: -0.02em;
}

.public-welcome-lead {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #2a3348;
}

.public-welcome-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: #f5f7fb;
  border: 1px solid rgba(30, 58, 95, 0.08);
  color: #334155;
  line-height: 1.6;
}

.public-welcome-card p {
  margin: 0;
}

.public-welcome-actions {
  margin-top: 1.25rem;
}

.public-welcome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: #6e2722;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(110, 39, 34, 0.28);
}

.public-welcome-btn:hover {
  color: #fff;
  filter: brightness(1.06);
}

.login-card {
  width: min(400px, 100%);
  background: rgba(255, 255, 255, .97);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 28px 60px rgba(8, 15, 30, .35);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.1rem;
}

.login-brand__mark {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1e3a5f, #2563eb);
  color: #fff;
  font-weight: 700;
  letter-spacing: .04em;
  font-size: .95rem;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .28);
}

.login-brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.login-brand p {
  margin: .2rem 0 0;
  color: #64748b;
  font-size: .9rem;
}

.login-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.login-alert {
  margin: 0;
  padding: .7rem .85rem;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: .9rem;
  list-style: none;
}

.login-alert:empty,
.login-alert:not(:has(li)):not(:has(ul)) {
  display: none;
}

.login-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.login-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.login-field > label,
.login-captcha-label {
  margin: 0;
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
}

.login-captcha-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  margin-bottom: 0;
}

.login-input {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 0 .85rem;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.login-input:focus-within {
  background: #fff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.login-input i {
  color: #94a3b8;
  font-size: 1rem;
}

.login-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: .65rem 0;
  outline: none;
  color: #0f172a;
  font-size: .98rem;
}

.login-input input::placeholder {
  color: #94a3b8;
}

.login-field-error {
  color: #dc2626;
  font-size: .8rem;
  min-height: 0;
  line-height: 1.25;
}

.login-field-error:empty,
.login-field .field-validation-valid {
  display: none !important;
}

.login-captcha-q {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: .88rem;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  color: #475569;
  font-size: .9rem;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
}

.login-submit {
  margin-top: .1rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  font-weight: 650;
  font-size: 1rem;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.login-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .34);
}

.login-submit:active {
  transform: translateY(1px);
}

@media (max-width: 1200px) {
  .stat-grid,
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .panel-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 260px;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .panel-shell.sidebar-open .panel-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(15, 23, 42, .45);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  body.sidebar-locked {
    overflow: hidden;
  }

  .stat-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

.filter-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .05);
}

.page-filter-card {
  border: 1px solid #e8ecf3;
  padding: 1.15rem 1.25rem 1rem;
}

.page-filter-search {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eef2f7;
}

.page-filter-search-row {
  display: flex;
  gap: .6rem;
  align-items: stretch;
}

.page-filter-search-input {
  position: relative;
  flex: 1;
  min-width: 0;
}

.page-filter-search-input > i {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.page-filter-search-input .form-control {
  padding-left: 2.35rem;
}

.page-filter-grid {
  display: grid;
  gap: 1rem;
}

.page-filter-group {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: .85rem 1rem 1rem;
}

.page-filter-group-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: .65rem;
}

.page-filter-group .form-label {
  font-size: .82rem;
  margin-bottom: .3rem;
  color: #334155;
}

.page-filter-group .form-text {
  font-size: .75rem;
}

.page-filter-range {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.page-filter-range-sep {
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}

.page-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: .95rem;
  padding-top: .85rem;
  border-top: 1px solid #eef2f7;
}

.page-filter-chips-label {
  font-size: .8rem;
  color: #64748b;
  margin-right: .15rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: .8rem;
  font-weight: 600;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-clear {
  font-size: .8rem;
  color: #64748b;
  text-decoration: none;
  margin-left: .25rem;
}

.filter-chip-clear:hover {
  color: #0f172a;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .page-filter-search-row {
    flex-wrap: wrap;
  }

  .page-filter-search-row .btn-primary {
    flex: 1;
  }
}

.bulk-sections-card {
  max-width: 760px;
}

.bulk-workspace {
  display: grid;
  gap: 1rem;
  max-width: 1100px;
}

.bulk-step-card {
  max-width: none;
  padding: 1.25rem;
}

.bulk-step-head {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: 1rem;
}

.bulk-step-head h2 {
  margin: 0 0 .15rem;
  color: #0f172a;
  font-size: 1.08rem;
}

.bulk-step-head p {
  margin: 0;
  color: #64748b;
  font-size: .9rem;
}

.bulk-step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}

.bulk-book-toolbar,
.bulk-editor-toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .65rem;
  flex-wrap: wrap;
}

.bulk-book-search {
  max-width: 300px;
  margin-right: auto;
}

.bulk-book-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  max-height: 280px;
  overflow: auto;
  padding: .35rem;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #f8fafc;
}

.bulk-book-item {
  position: relative;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin: 0;
  padding: .65rem .75rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid transparent;
  cursor: pointer;
}

.bulk-book-item[hidden] {
  display: none;
}

.bulk-book-item:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
}

.bulk-book-item span {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.bulk-book-item strong {
  color: #0f172a;
  font-size: .95rem;
}

.bulk-book-item small {
  color: #64748b;
}

.bulk-book-checkmark {
  display: none;
  margin-left: auto;
  color: #2563eb;
}

.bulk-book-item:has(input:checked) .bulk-book-checkmark {
  display: inline-block;
}

.bulk-selection-note {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: .65rem;
  color: #475569;
  font-size: .9rem;
}

.bulk-selection-note i,
.bulk-selection-note strong {
  color: #2563eb;
}

.bulk-outline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 1rem;
  align-items: stretch;
}

.bulk-outline-input {
  min-height: 340px;
  line-height: 1.65;
  resize: vertical;
}

.bulk-syntax-hint {
  margin-top: .55rem;
  padding: .75rem .9rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  color: #475569;
  font-size: .88rem;
  display: grid;
  gap: .25rem;
}

.bulk-syntax-hint i {
  color: #d97706;
}

.bulk-syntax-hint code {
  background: #e2e8f0;
  padding: .05rem .35rem;
  border-radius: 4px;
  font-size: .85em;
}

.bulk-outline-preview {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.bulk-preview-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;
  border-bottom: 1px solid #dbe4ef;
  background: #fff;
  color: #0f172a;
}

.bulk-preview-head span {
  color: #64748b;
  font-size: .85rem;
}

.bulk-preview-body {
  flex: 1;
  overflow: auto;
  max-height: 360px;
  padding: .75rem;
}

.bulk-preview-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: .5rem;
  min-height: 250px;
  color: #94a3b8;
  text-align: center;
}

.bulk-preview-empty i {
  font-size: 2rem;
}

.bulk-preview-section {
  padding: .65rem .7rem;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #e8eef5;
}

.bulk-preview-section + .bulk-preview-section {
  margin-top: .5rem;
}

.bulk-preview-section strong {
  color: #1e3a8a;
  font-size: .92rem;
}

.bulk-preview-section ul {
  margin: .45rem 0 0 1.15rem;
  padding: 0;
  color: #475569;
  font-size: .88rem;
}

.bulk-preview-section li + li {
  margin-top: .2rem;
}

.bulk-preview-error {
  padding: .55rem .75rem;
  background: #fef2f2;
  border-top: 1px solid #fecaca;
  color: #b91c1c;
  font-size: .85rem;
}

.bulk-settings {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) repeat(2, minmax(220px, 1fr));
  gap: .75rem;
  align-items: stretch;
}

.bulk-settings > div > small {
  display: block;
  margin-top: .35rem;
  color: #64748b;
  font-size: .8rem;
}

.bulk-setting-option {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .85rem;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  cursor: pointer;
}

.bulk-setting-option:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
}

.bulk-setting-option span {
  display: grid;
  gap: .15rem;
}

.bulk-setting-option strong {
  color: #0f172a;
  font-size: .9rem;
}

.bulk-setting-option small {
  color: #64748b;
  font-size: .8rem;
}

.bulk-submit-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
  backdrop-filter: blur(8px);
}

.bulk-submit-bar > div {
  display: grid;
  gap: .1rem;
}

.bulk-submit-bar strong {
  color: #0f172a;
}

.bulk-submit-bar small {
  color: #64748b;
}

.word-import-card {
  max-width: 820px;
}

.word-import-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.word-import-step {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .85rem .9rem;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

.word-import-step.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.word-import-step span {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}

.word-import-step.is-active span {
  background: #2563eb;
}

.word-import-step strong {
  display: block;
  font-size: .92rem;
}

.word-import-step small {
  display: block;
  font-size: .8rem;
  opacity: .85;
}

.word-import-hint {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .8rem .9rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.word-import-hint i {
  margin-top: .15rem;
}

.word-import-hint small {
  display: block;
  margin-top: .15rem;
  color: #a16207;
}

.word-import-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .85rem;
}

.word-import-summary > div {
  display: grid;
  gap: .2rem;
}

.word-import-summary span {
  font-size: .8rem;
}

.word-import-count strong {
  font-size: 1.5rem;
  color: #1d4ed8;
}

.word-import-preview-text {
  color: #334155;
  line-height: 1.45;
}

.word-import-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.word-import-page-list {
  display: grid;
  gap: .75rem;
}

.word-import-page-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
  overflow: hidden;
}

.word-import-page-card > summary {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: .9rem 1rem;
  cursor: pointer;
  list-style: none;
  background: #f8fafc;
  border-bottom: 1px solid transparent;
}

.word-import-page-card[open] > summary {
  border-bottom-color: #e2e8f0;
}

.word-import-page-card > summary::-webkit-details-marker {
  display: none;
}

.word-import-page-meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
}

.word-import-page-meta strong {
  color: #0f172a;
}

.word-import-page-meta small {
  color: #64748b;
}

.word-import-page-snippet {
  color: #64748b;
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-import-page-card > summary > i {
  color: #94a3b8;
  transition: transform .15s ease;
}

.word-import-page-card[open] > summary > i {
  transform: rotate(180deg);
}

.word-import-page-body {
  max-width: none;
  padding: 1.15rem 1.25rem 1.4rem;
  background: #fff;
  line-height: 1.75;
  font-size: 1.02rem;
  color: #0f172a;
}

.word-import-page-body h1,
.word-import-page-body h2,
.word-import-page-body h3,
.word-import-page-body h4,
.word-import-page-body h5,
.word-import-page-body h6 {
  margin: .4rem 0 .7rem;
  line-height: 1.3;
  color: #0f172a;
}

.word-import-page-body p {
  margin: 0 0 .75rem;
}

.word-import-page-body p:last-child,
.word-import-page-body h1:last-child,
.word-import-page-body h2:last-child,
.word-import-page-body h3:last-child {
  margin-bottom: 0;
}

.word-import-page-body strong {
  font-weight: 700;
}

@media (max-width: 760px) {
  .word-import-page-card > summary {
    grid-template-columns: 1fr auto;
  }

  .word-import-page-snippet {
    display: none;
  }
}

.word-import-confirm-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .95rem 1.1rem;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}

.word-import-confirm-bar > div:first-child {
  display: grid;
  gap: .15rem;
}

.word-import-confirm-bar small {
  color: #64748b;
}

@media (max-width: 900px) {
  .word-import-steps,
  .word-import-summary {
    grid-template-columns: 1fr;
  }

  .word-import-confirm-bar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 850px) {
  .bulk-outline-grid,
  .bulk-settings {
    grid-template-columns: 1fr;
  }

  .bulk-book-list {
    grid-template-columns: 1fr;
  }

  .bulk-submit-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-submit-bar .btn {
    width: 100%;
  }
}

.list-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: var(--muted);
  font-size: .92rem;
}

.page-list-table tbody tr:hover {
  background: #f8fafc;
}

.page-badge {
  display: inline-flex;
  min-width: 2rem;
  justify-content: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}

.preview-link {
  color: #334155;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-link:hover {
  color: var(--accent);
}

.empty-list {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-list i {
  font-size: 2rem;
  display: block;
  margin-bottom: .75rem;
}

.empty-list h2 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: .35rem;
}

.pager-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pager-pages {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}

.pager-link {
  min-width: 2.2rem;
  height: 2.2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1px solid #e5e7eb;
}

.pager-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 14px;
  padding: .75rem 1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .05);
}

.detail-nav-label {
  font-size: .92rem;
  text-align: center;
  flex: 1;
}

.edit-page-nav {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.4fr) minmax(140px, 1fr);
  gap: .75rem;
  align-items: stretch;
  margin-bottom: 1rem;
  padding: .55rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e8eef5;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.edit-page-nav--sticky {
  position: sticky;
  bottom: .85rem;
  z-index: 40;
  margin-top: 1rem;
  margin-bottom: .25rem;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .12);
}

.edit-page-nav-side {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  text-decoration: none;
  color: #0f172a;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.edit-page-nav-side:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #0f172a;
  transform: translateY(-1px);
}

.edit-page-nav-side--next {
  justify-content: flex-end;
  text-align: right;
}

.edit-page-nav-side.is-disabled {
  opacity: .45;
  background: #f8fafc;
  border-color: #eef2f7;
  pointer-events: none;
}

.edit-page-nav-side i {
  font-size: 1.1rem;
  color: #2563eb;
}

.edit-page-nav-side-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.edit-page-nav-side-text small {
  color: #64748b;
  font-size: .75rem;
}

.edit-page-nav-side-text strong {
  font-size: .95rem;
  font-weight: 650;
}

.edit-page-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  text-align: center;
  padding: .35rem .5rem;
  min-width: 0;
}

.edit-page-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: .01em;
}

.edit-page-nav-book {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: .86rem;
}

.edit-page-nav-hint {
  color: #94a3b8;
  font-size: .72rem;
}

.edit-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  padding-top: .25rem;
}

@media (max-width: 760px) {
  .edit-page-nav {
    grid-template-columns: 1fr 1fr;
  }

  .edit-page-nav-center {
    grid-column: 1 / -1;
    order: -1;
    padding-bottom: .35rem;
  }

  .edit-page-nav-hint {
    display: none;
  }
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}

.detail-meta-card {
  background: #fff;
  border-radius: 14px;
  padding: .95rem 1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .05);
}

.detail-meta-card span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: .25rem;
}

.detail-meta-card strong {
  font-size: 1rem;
}

.detail-content-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .05);
  overflow: hidden;
}

.detail-content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
}

.detail-content-body {
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.75;
  font-size: 1.02rem;
  max-width: 900px;
}

.export-page {
  width: 100%;
  max-width: none;
}

.export-page__head {
  align-items: flex-start;
}

.export-page__badge {
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}

.export-page__badge i {
  font-size: 1.15rem;
}

.export-page__book {
  max-width: none;
  margin-bottom: 1rem;
  padding: 1.25rem 1.4rem;
}

.export-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.export-step__num {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e3a5f;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
}

.export-step__body {
  flex: 1;
  min-width: 0;
}

.export-step__hint {
  color: #64748b;
  font-size: .9rem;
}

.export-book-select {
  max-width: 42rem;
}

.export-page__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.export-action-card {
  max-width: none;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.35rem 1.35rem;
  height: 100%;
}

.export-action-card__head {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.export-action-card__points {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: #475569;
  font-size: .92rem;
  line-height: 1.55;
}

.export-action-card__points li + li {
  margin-top: .35rem;
}

.export-action-card__footer {
  margin-top: auto;
}

.export-action-card--outline {
  background: linear-gradient(180deg, #f8fbff 0%, #fff 42%);
  border: 1px solid #dbeafe;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .06);
}

.export-action-card--content {
  border: 1px solid #e8eef5;
}

.export-content-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.export-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .25rem;
}

.export-scope-option {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  margin: 0;
  height: 100%;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.export-scope-option:hover {
  border-color: #bfdbfe;
}

.export-scope-option:has(input:checked),
.export-scope-option.is-selected {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.export-scope-option input {
  margin-top: .25rem;
  flex: 0 0 auto;
}

.export-scope-option span {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.export-scope-option span > i {
  color: #2563eb;
  font-size: 1.15rem;
  margin-bottom: .15rem;
}

.export-scope-option strong {
  color: #0f172a;
}

.export-scope-option small {
  color: #64748b;
  line-height: 1.35;
}

.export-filters {
  min-height: 0;
}

.export-preview {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  margin-top: auto;
  margin-bottom: 0;
}

.export-preview i {
  font-size: 1.75rem;
  color: #2563eb;
}

.export-preview strong {
  display: block;
  font-size: 1.35rem;
  color: #0f172a;
  line-height: 1.2;
}

.export-preview span {
  color: #64748b;
  font-size: .9rem;
}

.export-page__tips {
  max-width: none;
  padding: 1.1rem 1.35rem 1.25rem;
  background: #fafbfc;
}

.export-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.export-tips-grid strong {
  display: block;
  color: #0f172a;
  margin-bottom: .25rem;
  font-size: .92rem;
}

.export-tips-grid p {
  margin: 0;
  color: #64748b;
  font-size: .88rem;
  line-height: 1.45;
}

.export-page:not(.has-book) .export-action-card {
  opacity: .92;
}

@media (max-width: 1100px) {
  .export-scope-grid {
    grid-template-columns: 1fr;
  }

  .export-page__grid {
    grid-template-columns: 1fr;
  }

  .export-tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .export-step {
    gap: .75rem;
  }

  .export-book-select {
    max-width: none;
  }

  .export-preview .btn {
    width: 100%;
    margin-left: 0 !important;
  }
}

.detail-content-body img {
  max-width: 100%;
  height: auto;
}

.detail-content-body lgt,
.detail-content-body lgt.is-glossary,
.detail-content-body lgt.is-quote {
  display: inline;
  cursor: pointer;
  border-radius: 3px;
  padding: 0 .12em;
  transition: background .15s ease;
}

.detail-content-body lgt.is-glossary,
.detail-content-body lgt:not([id]) {
  color: #1d4ed8;
  background: rgba(37, 99, 235, .1);
  border-bottom: 1px dashed #2563eb;
}

.detail-content-body lgt.is-quote,
.detail-content-body lgt[id] {
  color: #b45309;
  background: rgba(217, 119, 6, .12);
  border-bottom: 1px dashed #d97706;
}

.detail-content-body lgt:hover,
.detail-content-body lgt:focus {
  outline: none;
  background: rgba(37, 99, 235, .18);
}

.detail-content-body lgt[id]:hover,
.detail-content-body lgt[id]:focus,
.detail-content-body lgt.is-quote:hover,
.detail-content-body lgt.is-quote:focus {
  background: rgba(217, 119, 6, .22);
}

.detail-lgt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  font-size: .82rem;
}

.detail-lgt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-weight: 600;
}

.detail-lgt-legend-item.is-glossary {
  color: #1d4ed8;
  background: rgba(37, 99, 235, .1);
}

.detail-lgt-legend-item.is-quote {
  color: #b45309;
  background: rgba(217, 119, 6, .12);
}

.detail-lgt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: transparent;
}

.detail-lgt-tooltip {
  position: fixed;
  z-index: 1090;
  transform: translateX(-50%);
  max-height: min(50vh, 380px);
  overflow: auto;
  padding: .95rem 1.05rem;
  background: #0f172a;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .35);
  font-size: .94rem;
  line-height: 1.55;
}

.detail-lgt-tooltip.is-above {
  transform: translate(-50%, -100%);
}

.detail-lgt-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .65rem;
  flex-wrap: wrap;
}

.detail-lgt-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .75rem;
  font-weight: 700;
}

.detail-lgt-badge.is-glossary {
  background: rgba(96, 165, 250, .25);
  color: #bfdbfe;
}

.detail-lgt-badge.is-quote {
  background: rgba(251, 191, 36, .22);
  color: #fde68a;
}

.detail-lgt-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-lgt-meta,
.detail-lgt-visible,
.detail-lgt-loading {
  margin-top: .65rem;
  color: #94a3b8;
  font-size: .85rem;
}

.detail-lgt-tooltip .text-danger {
  color: #fca5a5 !important;
}

.detail-meta-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-meta-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quote-list,
.glossary-list {
  display: grid;
  gap: .85rem;
}

.quote-card,
.glossary-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.quote-card.is-inactive,
.glossary-card.is-inactive {
  opacity: .72;
}

.quote-card-body,
.glossary-card-body {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.quote-card-body:hover .quote-card-text,
.glossary-card-body:hover .glossary-card-text,
.glossary-card-body:hover .glossary-term {
  color: #1d4ed8;
}

.quote-card-meta,
.glossary-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin-bottom: .55rem;
  font-size: .85rem;
}

.quote-card-text,
.glossary-card-text {
  margin: 0;
  line-height: 1.55;
  font-size: 1.02rem;
  color: #0f172a;
}

.quote-card-source {
  margin-top: .55rem;
  color: #64748b;
  font-size: .9rem;
}

.quote-card-actions,
.glossary-card-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  justify-content: center;
}

.glossary-term {
  font-size: 1.05rem;
  color: #0f172a;
}

.status-pill.is-long {
  background: #fff7ed;
  color: #c2410c;
}

.quote-detail-card,
.glossary-detail-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.quote-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
}

.quote-detail-body,
.glossary-detail-definition {
  padding: 1.35rem 1.5rem 1.75rem;
  line-height: 1.8;
  font-size: 1.05rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(70vh, 820px);
  overflow: auto;
}

.glossary-detail-term {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #eef2f7;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.quote-form-card {
  max-width: 960px;
}

.quote-text-area {
  min-height: 280px;
  line-height: 1.65;
  resize: vertical;
  font-size: 1.02rem;
}

@media (max-width: 900px) {
  .detail-meta-grid--4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .quote-card,
  .glossary-card {
    grid-template-columns: 1fr;
  }

  .quote-card-actions,
  .glossary-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.aphorism-list {
  display: grid;
  gap: .85rem;
}

.aphorism-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.aphorism-card.is-inactive {
  opacity: .72;
}

.aphorism-card-body {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.aphorism-card-body:hover .aphorism-card-text {
  color: #1d4ed8;
}

.aphorism-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin-bottom: .55rem;
  font-size: .85rem;
}

.aphorism-card-text {
  margin: 0;
  line-height: 1.55;
  font-size: 1.02rem;
  color: #0f172a;
}

.aphorism-card-source {
  margin-top: .55rem;
  color: #64748b;
  font-size: .9rem;
}

.aphorism-card-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .75rem;
  font-weight: 600;
}

.status-pill.is-on {
  background: #ecfdf5;
  color: #047857;
}

.status-pill.is-off {
  background: #f8fafc;
  color: #64748b;
}

.empty-state {
  text-align: center;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  border: 1px dashed #dbe3ee;
  color: #64748b;
}

.empty-state i {
  font-size: 1.8rem;
  color: #94a3b8;
  display: block;
  margin-bottom: .75rem;
}

.aphorism-detail-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e8eef5;
  border-radius: 20px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.aphorism-detail-mark {
  position: absolute;
  top: .35rem;
  left: 1rem;
  font-size: 4rem;
  line-height: 1;
  color: #bfdbfe;
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
}

.aphorism-detail-text {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #0f172a;
  white-space: pre-wrap;
}

.aphorism-detail-source {
  margin-top: 1.25rem;
  color: #475569;
  font-size: .95rem;
}

@media (max-width: 760px) {
  .aphorism-card {
    grid-template-columns: 1fr;
  }

  .aphorism-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .detail-meta-grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .detail-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
}

.page-issue-card {
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 40%);
  border-radius: 14px;
  padding: 1.1rem 1.25rem 1.25rem;
}

.page-issue-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.page-issue-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.page-issue-meta > div {
  background: #fff;
  border: 1px solid #f3e8c8;
  border-radius: 10px;
  padding: .65rem .8rem;
}

.page-issue-meta span {
  display: block;
  font-size: .75rem;
  color: #92400e;
  margin-bottom: .2rem;
}

.page-issue-meta strong {
  color: #1f2937;
  font-size: .95rem;
}

.issue-list {
  display: grid;
  gap: .75rem;
}

.issue-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: .9rem 1rem;
}

.issue-card.is-closed {
  opacity: .78;
}

.issue-card-body {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.issue-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  align-items: center;
  margin-bottom: .45rem;
  font-size: .86rem;
}

.issue-card-text {
  margin: 0;
  color: #1f2937;
  line-height: 1.5;
}

.issue-card-quote {
  margin-top: .45rem;
  color: #6b7280;
  font-size: .9rem;
  font-style: italic;
}

.issue-card-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  justify-content: center;
}

.status-pill.is-error {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.is-suggestion {
  background: #dbeafe;
  color: #1e40af;
}

@media (max-width: 760px) {
  .page-issue-meta {
    grid-template-columns: 1fr 1fr;
  }

  .issue-card {
    grid-template-columns: 1fr;
  }

  .issue-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Okuma sayfası */
.reader-page {
  max-width: 920px;
  margin: 0 auto;
}

.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: .65rem .85rem;
  margin: -.25rem 0 1rem;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .04);
}

.reader-topbar-main {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.reader-topbar-title {
  min-width: 0;
}

.reader-topbar-title strong {
  display: block;
  font-size: .98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 360px);
}

.reader-topbar-title span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 360px);
}

.reader-topbar-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.reader-nav-group {
  display: inline-flex;
  gap: .25rem;
  margin-right: .25rem;
}

.reader-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: .72rem;
  font-weight: 700;
}

.reader-badge.is-warn {
  background: #fef3c7;
  color: #92400e;
}

.reader-legend {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: .75rem;
  font-size: .85rem;
}

.reader-content-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem 1.6rem 1.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.reader-content-body {
  font-size: 1.08rem;
  line-height: 1.85;
}

.reader-bottom-nav {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1rem;
}

.reader-selection-bubble {
  position: fixed;
  z-index: 1080;
  display: flex;
  gap: .35rem;
  padding: .35rem;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
}

.reader-modal .modal-header {
  align-items: flex-start;
}

.reader-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.reader-empty i {
  font-size: 1.75rem;
  display: block;
  margin-bottom: .5rem;
  opacity: .7;
}

.reader-issue-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.reader-issue-meta > div {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: .55rem .7rem;
}

.reader-issue-meta span {
  display: block;
  font-size: .72rem;
  color: #92400e;
}

.reader-issue-meta strong {
  font-size: .9rem;
}

.mark-color-row {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.mark-color-option {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  cursor: pointer;
}

.mark-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, .12);
  vertical-align: middle;
}

.mark-swatch.is-yellow { background: #fef08a; }
.mark-swatch.is-green { background: #bbf7d0; }
.mark-swatch.is-blue { background: #bfdbfe; }
.mark-swatch.is-pink { background: #fbcfe8; }

.detail-content-body user-mark {
  border-radius: 3px;
  padding: 0 .1em;
}

.detail-content-body user-mark.is-yellow { background: rgba(250, 204, 21, .45); }
.detail-content-body user-mark.is-green { background: rgba(74, 222, 128, .4); }
.detail-content-body user-mark.is-blue { background: rgba(96, 165, 250, .4); }
.detail-content-body user-mark.is-pink { background: rgba(244, 114, 182, .35); }

.reader-items {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.reader-item {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .75rem .9rem;
}

.reader-item blockquote {
  margin: .35rem 0;
  font-style: italic;
  color: #4b5563;
}

.reader-item-text {
  white-space: pre-wrap;
}

.user-activity-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.user-activity-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.user-activity-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: .65rem;
}

.user-activity-quote {
  margin: 0 0 .65rem;
  padding: .55rem .75rem;
  border-left: 3px solid #93c5fd;
  background: #f8fafc;
  color: #374151;
  font-style: italic;
}

.user-activity-quote.is-yellow { border-left-color: #eab308; background: #fefce8; }
.user-activity-quote.is-green { border-left-color: #22c55e; background: #f0fdf4; }
.user-activity-quote.is-blue { border-left-color: #3b82f6; background: #eff6ff; }
.user-activity-quote.is-pink { border-left-color: #ec4899; background: #fdf2f8; }

.user-activity-body {
  white-space: pre-wrap;
  color: #1f2937;
}

@media (max-width: 760px) {
  .reader-topbar-actions .btn span {
    display: none;
  }

  .reader-issue-meta {
    grid-template-columns: 1fr;
  }

  .reader-item {
    flex-direction: column;
  }

  .reader-content-card {
    padding: 1.1rem 1rem 1.25rem;
  }
}

/* Kullanıcılar */
.users-table .user-cell {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 180px;
}

.users-table .user-cell span {
  font-size: .85rem;
}

.users-tab-pills .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid #e5e7eb;
}

.users-tab-pills .nav-link:hover {
  color: var(--text);
  background: #f8fafc;
}

.users-tab-pills .nav-link.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.users-tab-pills .nav-link.active .badge {
  background: rgba(255, 255, 255, .2) !important;
  color: #fff !important;
}

.role-pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #374151;
  margin-right: .25rem;
}

.role-pill.is-admin { background: #dbeafe; color: #1e40af; }
.role-pill.is-superadmin { background: #ede9fe; color: #5b21b6; }
.role-pill.is-member { background: #f3f4f6; color: #4b5563; }

.status-pill.is-active { background: #dcfce7; color: #166534; }
.status-pill.is-passive { background: #e5e7eb; color: #374151; }
.status-pill.is-suspended { background: #fee2e2; color: #991b1b; }

.activity-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
  color: #1d4ed8;
  font-weight: 600;
  padding: .2rem .45rem;
  border-radius: 8px;
  background: #eff6ff;
}

.activity-link:hover { background: #dbeafe; color: #1e3a8a; }

.activity-link.is-mark {
  color: #92400e;
  background: #fffbeb;
}

.activity-link.is-mark:hover { background: #fef3c7; color: #78350f; }

.user-profile-dl dt {
  color: var(--muted);
  font-weight: 500;
}

.user-profile-dl dd {
  margin-bottom: .75rem;
}

.pagination-bar {
  display: flex;
  justify-content: center;
}

.validation-summary-valid {
  display: none;
}

/* Kullanıcı oluşturma */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .35rem;
}

.page-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.page-breadcrumb a:hover {
  color: var(--accent);
}

.user-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
  max-width: 1100px;
}

.user-create-main .form-card {
  max-width: none;
  margin-bottom: 1rem;
}

.user-create-aside .form-card {
  max-width: none;
}

.user-create-section__head {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.user-create-section__head h2 {
  font-size: 1.05rem;
  margin: 0 0 .15rem;
}

.user-create-section__head p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.user-create-section__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.req {
  color: #dc2626;
  font-weight: 600;
}

.role-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.role-choice,
.status-choice {
  position: relative;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.role-choice input,
.status-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-choice:hover,
.status-choice:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.role-choice.is-selected,
.status-choice.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  background: #f8fbff;
}

.role-choice__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: #4338ca;
  flex-shrink: 0;
}

.role-choice__icon.is-super {
  background: #fff7ed;
  color: #c2410c;
}

.role-choice__body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.role-choice__body strong {
  font-size: .95rem;
}

.role-choice__body small {
  color: var(--muted);
  line-height: 1.35;
}

.status-choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}

.status-choice {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .25rem;
  padding: .75rem .5rem;
}

.status-choice i {
  font-size: 1.15rem;
  color: var(--accent);
}

.status-choice span {
  font-weight: 600;
  font-size: .9rem;
}

.status-choice small {
  color: var(--muted);
  font-size: .75rem;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: #f3f4f6;
  color: var(--text);
}

.password-meter {
  margin-top: .45rem;
  height: .35rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.password-meter__bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #9ca3af;
  transition: width .2s ease, background .2s ease;
}

.password-meter__bar.is-weak { background: #ef4444; }
.password-meter__bar.is-fair { background: #f59e0b; }
.password-meter__bar.is-good { background: #3b82f6; }
.password-meter__bar.is-strong { background: #16a34a; }

.sticky-preview {
  position: sticky;
  top: 1rem;
  text-align: center;
}

.user-preview-avatar {
  width: 4rem;
  height: 4rem;
  margin: 0 auto .75rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

.user-preview-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.user-preview-meta {
  color: var(--muted);
  font-size: .88rem;
  word-break: break-all;
}

.user-preview-badges {
  display: flex;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.user-create-tips {
  margin: 0;
  padding-left: 1.1rem;
  text-align: left;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.user-create-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: .5rem;
  max-width: 1100px;
  padding: .75rem 0 .25rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), #f8fafc 35%);
}

.user-create-actions__inner {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .06);
}

@media (max-width: 960px) {
  .user-create-layout {
    grid-template-columns: 1fr;
  }

  .sticky-preview {
    position: static;
  }

  .role-choice-grid,
  .status-choice-row {
    grid-template-columns: 1fr;
  }
}

/* AI özet onay / düzenleme */
.ai-stat-card {
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ai-stat-card:hover {
  border-color: #bfdbfe;
}

.ai-stat-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.ai-stat-card.is-pending strong { color: #b45309; }
.ai-stat-card.is-done strong { color: #15803d; }

.ai-summary-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ai-summary-card {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 18px rgba(31, 41, 55, .04);
}

.ai-summary-card.is-pending {
  border-left: 4px solid #f59e0b;
}

.ai-summary-card.is-reviewed {
  border-left: 4px solid #22c55e;
}

.ai-summary-card__main {
  min-width: 0;
  flex: 1;
}

.ai-summary-card__head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.ai-summary-card__title {
  font-size: 1rem;
}

.ai-summary-card__badges {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
}

.ai-summary-card__preview {
  margin: 0;
  color: #374151;
  font-size: .92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-summary-card__actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  flex-shrink: 0;
  min-width: 9.5rem;
}

.ai-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
  width: 100%;
  max-width: none;
}

.ai-edit-form {
  width: 100%;
  max-width: none;
}

.ai-edit-main,
.ai-edit-aside {
  min-width: 0;
}

.ai-edit-main .form-card,
.ai-edit-aside .form-card {
  max-width: none;
  width: 100%;
}

.ai-summary-editor {
  min-height: min(55vh, 32rem);
  font-size: .98rem;
  line-height: 1.55;
  border-radius: 12px;
}

.ai-side-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .88rem;
}

.ai-side-status.is-ok {
  background: #dcfce7;
  color: #166534;
}

.ai-side-status.is-wait {
  background: #fef3c7;
  color: #92400e;
}

.ai-page-preview__body {
  max-height: min(45vh, 28rem);
  overflow: auto;
  font-size: .86rem;
  line-height: 1.5;
  color: #374151;
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .85rem;
}

.ai-edit-form .user-create-actions,
.ai-edit-actions {
  max-width: none;
  width: 100%;
}

@media (max-width: 1100px) {
  .ai-edit-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.85fr);
  }
}

@media (max-width: 960px) {
  .ai-edit-layout {
    grid-template-columns: 1fr;
  }

  .ai-summary-editor {
    min-height: 18rem;
  }

  .ai-page-preview__body {
    max-height: 16rem;
  }

  .ai-summary-card {
    flex-direction: column;
  }

  .ai-summary-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .ai-edit-actions {
    justify-content: stretch;
  }

  .ai-edit-actions .btn {
    flex: 1 1 auto;
  }
}

/* SQL Konsol */
.sql-console .form-card {
  max-width: none;
}

.sql-console__editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.45;
  min-height: 16rem;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  border-color: #1e293b;
  tab-size: 2;
}

.sql-console__editor:focus {
  background: #0f172a;
  color: #f8fafc;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.sql-console__result-host {
  min-height: 8rem;
}

.sql-result-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  max-height: 28rem;
  overflow: auto;
}

.sql-result-table {
  font-size: .82rem;
  white-space: nowrap;
}

.sql-result-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}

.sql-null {
  color: #94a3b8;
  font-style: italic;
}

.sql-batch-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin: .5rem 0 .35rem;
}

.glossary-kicker {
  margin: 0 0 .2rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

.glossary-filter .glossary-search {
  position: relative;
  margin-bottom: 1rem;
}

.glossary-search i {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.glossary-search .form-control {
  padding-left: 2.45rem;
  min-height: 2.7rem;
  border-radius: 12px;
}

.glossary-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .7fr) auto;
  gap: .85rem;
  align-items: end;
}

.glossary-filter-actions {
  display: flex;
  gap: .5rem;
}

.glossary-excel-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: .85rem;
}

.glossary-excel-bar {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: .9rem 1.1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.glossary-excel-bar-head {
  display: grid;
  gap: .15rem;
  margin-bottom: .75rem;
}

.glossary-excel-bar-head strong {
  font-size: .95rem;
  color: #0f172a;
}

.glossary-excel-bar-head span,
.glossary-excel-bar-head p {
  margin: 0;
  color: #64748b;
  font-size: .84rem;
}

a.glossary-excel-add-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .9rem;
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 55%);
}

a.glossary-excel-add-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 28px rgba(37, 99, 235, .1);
}

.glossary-add-warn {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
}

.glossary-add-steps {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
}

.glossary-add-steps li {
  display: flex;
  gap: .65rem;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  padding: .85rem .9rem;
}

.glossary-add-steps li span {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: .85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.glossary-add-steps strong {
  display: block;
  font-size: .9rem;
  margin-bottom: .2rem;
}

.glossary-add-steps p {
  margin: 0;
  color: #64748b;
  font-size: .82rem;
  line-height: 1.4;
}

.glossary-add-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1.1rem;
  align-items: start;
}

.glossary-add-checks {
  display: grid;
  gap: .65rem;
}

.glossary-add-checks label {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin: 0;
  padding: .75rem .85rem;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.glossary-add-rules {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.glossary-add-rules h2 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 .7rem;
}

.glossary-add-rules ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  font-size: .86rem;
  line-height: 1.55;
  display: grid;
  gap: .45rem;
}

.glossary-add-sample {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid #eef2f7;
}

.glossary-add-sample p {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 .45rem;
}

.glossary-add-sample table,
.glossary-add-table-card table {
  width: 100%;
  font-size: .86rem;
}

.glossary-add-sample th,
.glossary-add-sample td {
  padding: .35rem .4rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.glossary-add-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}

.glossary-add-stats div {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  padding: .8rem .9rem;
}

.glossary-add-stats strong {
  display: block;
  font-size: 1.3rem;
  color: #0f172a;
}

.glossary-add-stats span {
  color: #64748b;
  font-size: .8rem;
}

.glossary-add-table-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1rem 1.1rem 0;
  margin-bottom: .85rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.glossary-add-table-card h2 {
  font-size: .95rem;
  margin: 0 0 .65rem;
}

.glossary-add-term {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .glossary-excel-split,
  .glossary-add-layout,
  .glossary-add-steps,
  .glossary-add-stats {
    grid-template-columns: 1fr;
  }
}

.glossary-excel-import {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}

.glossary-excel-import .form-control {
  max-width: 18rem;
}

.glossary-excel-import .form-text {
  flex: 1 1 16rem;
}

.glossary-letters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .85rem;
}

.glossary-letters a {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  color: #334155;
  background: #fff;
  border: 1px solid #e5eaf2;
}

.glossary-letters a:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.glossary-board,
.quote-board,
.aphorism-board {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.glossary-letter-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .45rem 1.15rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #1d4ed8;
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  scroll-margin-top: .5rem;
}

.glossary-entry,
.quote-entry,
.aphorism-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  align-items: start;
}

.glossary-entry:last-child,
.quote-entry:last-child,
.aphorism-entry:last-child {
  border-bottom: 0;
}

.glossary-entry:hover,
.quote-entry:hover,
.aphorism-entry:hover {
  background: #f8fafc;
}

.glossary-entry.is-inactive,
.quote-entry.is-inactive,
.aphorism-entry.is-inactive {
  opacity: .72;
}

.glossary-entry-main,
.quote-entry-main,
.aphorism-entry-main {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.glossary-entry-term {
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .25rem;
  font-family: Georgia, "Times New Roman", serif;
}

.glossary-entry-main:hover .glossary-entry-term {
  color: #1d4ed8;
}

.glossary-entry-def {
  margin: 0;
  color: #475569;
  font-size: .92rem;
  line-height: 1.5;
}

.glossary-entry-side,
.quote-entry-side,
.aphorism-entry-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .55rem;
}

.glossary-entry-flags,
.glossary-entry-actions,
.quote-entry-flags,
.quote-entry-actions,
.aphorism-entry-flags,
.aphorism-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}

.glossary-delete {
  max-width: 820px;
  display: grid;
  gap: 1rem;
}

.glossary-delete-card {
  max-width: none;
}

.glossary-delete-term {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  margin-bottom: .4rem;
}

.glossary-delete-def {
  color: #475569;
  margin-bottom: 1rem;
}

.glossary-delete-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.glossary-delete-stats div {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: .75rem .85rem;
}

.glossary-delete-stats strong {
  display: block;
  font-size: 1.25rem;
  color: #0f172a;
}

.glossary-delete-stats span {
  color: #64748b;
  font-size: .8rem;
}

.glossary-transform {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-bottom: .65rem;
}

.glossary-transform code {
  color: #fde68a;
  font-size: .92rem;
}

.glossary-transform-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: .2rem;
}

.glossary-transform-arrow {
  color: #93c5fd;
  font-size: 1.1rem;
}

.glossary-form-layout,
.glossary-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1.1rem;
  align-items: start;
}

.glossary-form-card {
  max-width: none;
}

.glossary-form-section {
  padding-bottom: 1.15rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid #eef2f7;
}

.glossary-form-section__head {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  margin-bottom: .85rem;
}

.glossary-form-section__head h2 {
  font-size: 1.02rem;
  margin: 0 0 .15rem;
}

.glossary-form-section__head p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.glossary-term-input {
  font-size: 1.28rem;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  min-height: 3rem;
  border-radius: 12px;
}

.glossary-def-input {
  min-height: 200px;
  line-height: 1.7;
  resize: vertical;
  font-size: 1.02rem;
  border-radius: 12px;
}

.glossary-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.glossary-active-toggle {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 1.65rem 0 0;
  padding: .85rem 1rem;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.glossary-active-toggle input {
  margin-top: .2rem;
}

.glossary-active-toggle strong {
  display: block;
  font-size: .95rem;
}

.glossary-active-toggle small {
  color: #64748b;
}

.glossary-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.glossary-preview-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
  position: sticky;
  top: 1rem;
}

.glossary-preview-letter,
.glossary-view-letter {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  margin-bottom: .75rem;
}

.glossary-preview-term,
.glossary-view-term {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 .55rem;
  line-height: 1.25;
}

.glossary-preview-flags,
.glossary-view-flags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}

.glossary-preview-def,
.glossary-view-def {
  margin: 0;
  color: #334155;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.glossary-view-def {
  font-size: 1.05rem;
  max-height: min(62vh, 740px);
  overflow: auto;
}

.glossary-preview-tag,
.glossary-view-tag {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid #eef2f7;
  font-size: .82rem;
  color: #64748b;
}

.glossary-preview-tag span {
  display: block;
  margin-bottom: .25rem;
}

.glossary-preview-tag code,
.glossary-view-tag code {
  color: #1e3a8a;
  background: #eff6ff;
  padding: .12rem .4rem;
  border-radius: 6px;
}

.glossary-form-hint {
  margin: .75rem .15rem 0;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.5;
}

.glossary-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.glossary-pager-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .85rem;
  border-radius: 12px;
  text-decoration: none;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: .88rem;
}

.glossary-pager-link.is-next {
  justify-self: end;
}

.glossary-pager-link:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

.glossary-pager-link.is-disabled {
  opacity: .4;
  pointer-events: none;
  background: #f8fafc;
  border-color: #eef2f7;
  color: #64748b;
}

.glossary-pager-now {
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
}

.glossary-view-card {
  position: relative;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 18px;
  padding: 1.25rem 1.4rem 1.35rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.glossary-view-head {
  margin-bottom: .35rem;
}

.glossary-meta-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .04);
}

.glossary-meta-card h3 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 .75rem;
}

.glossary-meta-card dl {
  margin: 0;
  display: grid;
  gap: .65rem;
}

.glossary-meta-card div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: .4rem;
  font-size: .9rem;
}

.glossary-meta-card dt {
  color: #64748b;
  font-weight: 500;
}

.glossary-meta-card dd {
  margin: 0;
  color: #0f172a;
}

.glossary-usage {
  margin-top: 1.25rem;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 18px;
  padding: 1.15rem 1.25rem 1.3rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.glossary-usage-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.glossary-usage-loading {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #64748b;
  font-size: .9rem;
}

.glossary-usage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.glossary-usage-stats div {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: .75rem .85rem;
}

.glossary-usage-stats strong {
  display: block;
  font-size: 1.25rem;
  color: #0f172a;
}

.glossary-usage-stats span {
  color: #64748b;
  font-size: .8rem;
}

.glossary-usage-subtitle {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 .6rem;
}

.glossary-usage-books {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}

.glossary-usage-books li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .45rem .55rem;
  background: #f8fafc;
  border-radius: 10px;
  font-size: .88rem;
}

.glossary-usage-books em {
  color: #64748b;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .glossary-form-layout,
  .glossary-view {
    grid-template-columns: 1fr;
  }

  .glossary-form-grid {
    grid-template-columns: 1fr;
  }

  .glossary-active-toggle {
    margin-top: 0;
  }

  .glossary-preview-card {
    position: static;
  }

  .glossary-pager {
    grid-template-columns: 1fr 1fr;
  }

  .glossary-pager-now {
    grid-column: 1 / -1;
    order: -1;
  }

  .glossary-usage-stats {
    grid-template-columns: 1fr;
  }
}

html.lugat-busy,
body.lugat-busy {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.panel-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.panel-busy-overlay[hidden] {
  display: none !important;
}

.panel-busy-card {
  width: min(22rem, calc(100vw - 2rem));
  background: #fff;
  border-radius: 16px;
  padding: 1.4rem 1.35rem 1.25rem;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  text-align: center;
}

.panel-busy-card .spinner-border {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent);
}

.panel-busy-title {
  margin: .85rem 0 .35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.panel-busy-msg {
  margin: 0;
  color: #6b7280;
  font-size: .9rem;
}

@media (max-width: 900px) {
  .glossary-filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .glossary-filter-actions {
    grid-column: 1 / -1;
  }

  .glossary-entry,
  .quote-entry,
  .aphorism-entry {
    grid-template-columns: 1fr;
  }

  .glossary-entry-side,
  .glossary-entry-flags,
  .glossary-entry-actions,
  .quote-entry-side,
  .quote-entry-flags,
  .quote-entry-actions,
  .aphorism-entry-side,
  .aphorism-entry-flags,
  .aphorism-entry-actions {
    align-items: stretch;
    justify-content: flex-start;
  }

  .glossary-delete-stats {
    grid-template-columns: 1fr;
  }

  .quote-filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-filter-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.1fr) minmax(8rem, 1.2fr) 5.2rem minmax(6rem, .7fr) 5.2rem auto;
  gap: .85rem;
  align-items: end;
}

.quote-entry-text,
.aphorism-entry-text {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.55;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quote-entry-main:hover .quote-entry-text,
.aphorism-entry-main:hover .aphorism-entry-text {
  color: #1d4ed8;
}

.quote-entry-source,
.aphorism-entry-source {
  margin-top: .45rem;
  color: #64748b;
  font-size: .86rem;
}

.quote-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.quote-text-area,
.aphorism-text-area {
  min-height: 240px;
  line-height: 1.7;
  resize: vertical;
  font-size: 1.02rem;
}

.quote-preview-text,
.aphorism-preview-text {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.7;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}

.quote-preview-source,
.aphorism-preview-source {
  margin-top: .75rem;
  color: #64748b;
  font-size: .9rem;
}

.quote-view-text,
.aphorism-view-text {
  margin: 0;
  padding-top: 1.6rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.8;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(62vh, 740px);
  overflow: auto;
}

.quote-board .empty-state,
.aphorism-board .empty-state {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.quote-view-source,
.aphorism-view-source {
  margin-top: 1.15rem;
  color: #475569;
  font-size: .95rem;
}

@media (max-width: 960px) {
  .quote-form-grid {
    grid-template-columns: 1fr;
  }
}







