:root {
  --cms-max-width: 960px;
  --cms-radius-soft: 16px;
  --cms-pill-radius: 999px;
  --cms-border: #dce2eb;
  --cms-surface: #ffffff;
  --cms-background: #f5f7fb;
  --cms-muted: #64748b;
  --cms-heading: #0f172a;
  --cms-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html,
body {
  height: 100%;
}

body {
  background: var(--cms-background);
  color: var(--cms-heading);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

nav.navbar {
  background: var(--cms-surface) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.navbar .nav-link {
  color: var(--cms-muted);
  font-size: 0.925rem;
  transition: color 0.2s ease;
}

.navbar .nav-link:hover {
  color: var(--cms-heading);
}

.navbar .nav-link.active {
  color: var(--cms-heading) !important;
}

main.cms-body {
  max-width: var(--cms-max-width);
  width: 100%;
  margin: 2rem auto 0;
  padding: 0 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cms-surface {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.cms-surface + .cms-surface {
  margin-top: 1.75rem;
}

.cms-surface--flush {
  padding: 0;
  margin: 0;
}

.cms-section-title {
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--cms-heading);
}

.cms-muted {
  color: var(--cms-muted);
}

.rounded-all {
  border-radius: var(--cms-pill-radius) !important;
}

.cms-control {
  border-radius: 12px !important;
  border-color: var(--cms-border);
}

.cms-control:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.cms-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cms-form--narrow {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.cms-search-group {
  border-radius: var(--cms-pill-radius);
  border: 1px solid var(--cms-border);
  overflow: hidden;
  background: var(--cms-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.cms-search-group .form-control {
  border: none;
  box-shadow: none;
  padding-left: 1.25rem;
}

.cms-search-group .form-control:focus {
  box-shadow: none;
}

.cms-search-group .btn {
  border: none;
  border-left: 1px solid var(--cms-border);
  border-radius: 0;
  padding-inline: 1.25rem;
}

.cms-table {
  background: transparent;
}

.cms-table table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead tr th,
.table tbody tr td {
  border: none !important;
}

.cms-table thead {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.cms-table tbody tr {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.cms-table tbody tr:hover {
  background-color: rgba(226, 232, 255, 0.45);
}

.cms-table tbody td {
  border-top: none;
}

.cms-list {
  border-radius: var(--cms-radius-soft);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--cms-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.cms-list .list-group-item {
  border: none;
  padding: 1rem 1.25rem;
  background: transparent;
}

.cms-list .list-group-item + .list-group-item {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.cms-list .list-group-item-action:hover {
  background-color: rgba(226, 232, 255, 0.45);
}

pre.wrap {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--cms-radius-soft);
  padding: 1rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.45);
}

.alert {
  border-radius: var(--cms-radius-soft);
  border: 1px solid var(--cms-border);
}

.vh-center {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-pill input[type=file] {
  display: block;
}

@media (max-width: 768px) {
  main.cms-body {
    padding: 0 1rem 2.5rem;
  }

  .cms-surface {
    padding: 0;
  }

  .cms-table,
  .cms-list {
    box-shadow: none;
  }
}

.drag-handle {
  cursor: grab;
}

.dragging {
  opacity: 0.6;
}

.drag-over {
  background-color: rgba(226, 232, 255, 0.45);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
