:root {
  color-scheme: light;
  --admin-bg: #f4f7fc;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f8fbff;
  --admin-sidebar: #061a3b;
  --admin-sidebar-deep: #031129;
  --admin-blue: #155dfc;
  --admin-blue-2: #2f63ff;
  --admin-ink: #071226;
  --admin-text: #334260;
  --admin-muted: #71809b;
  --admin-line: #dfe7f2;
  --admin-green: #15ad62;
  --admin-red: #ef4444;
  --admin-amber: #f5a400;
  --admin-shadow: 0 16px 42px rgba(19, 38, 71, 0.08);
  --admin-font: "Rajdhani", Arial, sans-serif;
  --admin-font-small: 13px;
  --admin-font-body: 16px;
  --admin-font-label: 14px;
  --admin-font-title: 34px;
  --admin-control-height: 40px;
}

body.admin-body,
body.installer-body {
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: var(--admin-font);
  font-size: var(--admin-font-body);
  font-weight: 500;
}

body.admin-body button,
body.admin-body input,
body.admin-body select,
body.admin-body textarea,
body.installer-body button,
body.installer-body input,
body.installer-body select,
body.installer-body textarea {
  font-family: var(--admin-font);
}

.admin-body h1,
.admin-body h2,
.admin-body h3,
.installer-body h1,
.installer-body h2,
.installer-body h3 {
  color: var(--admin-ink);
  letter-spacing: 0;
}

.admin-body h1,
.installer-body h1 {
  font-size: var(--admin-font-title);
  line-height: 1.05;
  margin-bottom: 8px;
  max-width: none;
}

.admin-body h1 {
  font-size: 34px;
  line-height: 1.12;
  margin-bottom: 6px;
}

.installer-body h1 {
  font-size: 36px;
}

.admin-body h2 {
  font-size: 20px;
  line-height: 1.25;
}

.admin-body h3 {
  font-size: 17px;
  line-height: 1.3;
}

.admin-body .lead,
.installer-body .lead {
  color: var(--admin-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 760px;
}

.admin-body .lead {
  font-size: 15px;
  line-height: 1.55;
}

.admin-body .eyebrow,
.installer-body .eyebrow {
  color: var(--admin-blue);
  font-size: 14px;
  font-weight: 700;
}

.admin-shell {
  background: var(--admin-bg);
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 99, 255, 0.42), transparent 32%),
    linear-gradient(180deg, var(--admin-sidebar), var(--admin-sidebar-deep));
  border-right: 0;
  color: #dbe8ff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  position: sticky;
  top: 0;
}

.admin-brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  gap: 12px;
  gap: 9px;
  justify-content: flex-start;
  min-height: 86px;
  padding: 10px 18px;
  text-decoration: none;
}

.admin-brand img {
  display: block;
  height: 43px;
  object-fit: contain;
  width: 54px;
}

.admin-brand strong {
  color: #ffffff;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
}

.admin-brand strong span {
  color: #3973ff;
}

.installer-brand strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 14px;
}

.admin-menu-link,
.admin-menu a,
.admin-logout button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #c9d8f2;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  gap: 10px;
  min-height: 39px;
  padding: 0 12px;
  text-align: left;
  text-decoration: none;
  transition: 0.18s ease;
  width: 100%;
}

.admin-menu-link i,
.admin-menu a i,
.admin-logout button i {
  color: rgba(219, 232, 255, 0.76);
  font-size: 17px;
  width: 18px;
}

.admin-menu-primary {
  flex: 0 0 auto;
  min-height: 43px;
}

.admin-menu-group {
  border: 0;
  margin: 0;
}

.admin-menu-group summary {
  align-items: center;
  border-radius: 9px;
  color: #c9d8f2;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 600;
  justify-content: space-between;
  list-style: none;
  min-height: 43px;
  padding: 0 13px;
  transition: 0.18s ease;
}

.admin-menu-group summary::-webkit-details-marker {
  display: none;
}

.admin-menu-group summary span {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.admin-menu-group summary span i {
  color: rgba(219, 232, 255, 0.76);
  font-size: 17px;
  text-align: center;
  width: 18px;
}

.admin-menu-group summary > i {
  color: rgba(219, 232, 255, 0.54);
  font-size: 13px;
  transition: transform 0.18s ease;
}

.admin-menu-group summary:hover,
.admin-menu-group[open] > summary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-menu-group[open] > summary > i {
  transform: rotate(180deg);
}

.admin-menu-children {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 5px;
  margin: 7px 0 10px 21px;
  padding-left: 10px;
}

.admin-menu-children .admin-menu-link {
  font-size: 15px;
  min-height: 37px;
}

.admin-menu-link:hover,
.admin-menu a:hover,
.admin-logout button:hover,
.admin-menu-link.is-active {
  background: linear-gradient(135deg, var(--admin-blue), #2f63ff);
  box-shadow: 0 14px 26px rgba(21, 93, 252, 0.32);
  color: #ffffff;
  transform: translateX(2px);
}

.admin-menu-link.muted {
  color: rgba(219, 232, 255, 0.45);
  cursor: default;
}

.admin-menu-link.muted:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.admin-logout {
  margin: 0;
}

.admin-menu-system {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 16px;
}

.admin-sidebar-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  margin: 0 14px 18px;
  padding: 11px 12px;
}

.admin-sidebar-card span {
  align-items: center;
  background: rgba(47, 99, 255, 0.32);
  border-radius: 10px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.admin-sidebar-card strong {
  color: #ffffff;
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.admin-sidebar-card small {
  color: rgba(219, 232, 255, 0.72);
  display: block;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 3px;
}

.admin-main {
  background: var(--admin-bg);
  min-width: 0;
}

.admin-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  gap: 14px;
  min-height: 68px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-topbar-account {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.admin-topbar-profile {
  align-items: center;
  border-radius: 9px;
  color: var(--admin-ink);
  display: flex;
  gap: 9px;
  min-width: 128px;
  padding: 4px 7px;
  text-decoration: none;
  transition: background 0.16s ease;
}

.admin-topbar-profile:hover {
  background: #f0f4fb;
}

.admin-topbar-identity,
.admin-topbar-identity strong,
.admin-topbar-identity small {
  display: block;
  text-align: left;
}

.admin-topbar-identity strong {
  color: var(--admin-ink);
  font-size: 15px;
  line-height: 1.1;
}

.admin-topbar-identity small {
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.admin-topbar-actions {
  align-items: center;
  display: flex;
  gap: 7px;
}

.admin-topbar-actions form {
  display: flex;
  margin: 0;
}

.admin-topbar-actions a,
.admin-topbar-actions button,
.admin-topbar-public-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  color: var(--admin-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  justify-content: center;
  min-height: 36px;
  padding: 6px 11px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.admin-topbar-actions a:hover,
.admin-topbar-public-link:hover {
  background: #eef3ff;
  border-color: #b9cafa;
  color: var(--admin-blue);
  transform: translateY(-1px);
}

.admin-topbar-actions button:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #dc2626;
  transform: translateY(-1px);
}

.admin-icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #304160;
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  position: relative;
  width: 42px;
}

.admin-icon-button:hover {
  border-color: var(--admin-line);
  box-shadow: var(--admin-shadow);
  color: var(--admin-blue);
}

.admin-icon-button.has-badge span {
  align-items: center;
  background: var(--admin-blue);
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  position: absolute;
  right: 4px;
  top: 2px;
  width: 18px;
}

.admin-search {
  align-items: center;
  background: #f4f7fc;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--admin-muted);
  display: flex;
  gap: 11px;
  min-height: 40px;
  padding: 0 14px;
  position: relative;
  width: min(420px, 42vw);
}

.admin-search:focus-within {
  background: #ffffff;
  border-color: rgba(21, 93, 252, 0.24);
  box-shadow: 0 0 0 4px rgba(21, 93, 252, 0.08);
}

.admin-search input {
  background: transparent;
  border: 0;
  color: var(--admin-ink);
  min-height: 0;
  padding: 0;
}

.admin-search input:focus {
  border: 0;
  box-shadow: none;
}

.admin-search-results {
  background: #ffffff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  display: grid;
  left: 0;
  min-width: 100%;
  overflow: hidden;
  padding: 6px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 30;
}

.admin-search-results[hidden] {
  display: none;
}

.admin-search-results a,
.admin-search-results span {
  border-radius: 8px;
  color: var(--admin-text);
  display: block;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-search-results a:hover {
  background: #eef3ff;
  color: var(--admin-blue);
}

.admin-search-results span {
  color: var(--admin-muted);
}

.admin-avatar {
  align-items: center;
  background: linear-gradient(135deg, #111827, #38465d);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex !important;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  object-fit: cover;
  text-align: center !important;
  width: 38px;
}

img.admin-avatar {
  background: #eef3ff;
  display: block !important;
}

.admin-content {
  padding: 24px;
}

.admin-content > .eyebrow:first-child {
  margin-top: 2px;
}

.admin-page-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
}

.dashboard-stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 18px;
}

.dashboard-stat-card {
  --stat-color: var(--admin-blue);
  --stat-soft: #eef3ff;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  color: inherit;
  min-height: 126px;
  padding: 16px;
  text-decoration: none;
  transition: 0.18s ease;
}

.dashboard-stat-card:hover {
  border-color: rgba(21, 93, 252, 0.28);
  transform: translateY(-2px);
}

.dashboard-stat-card.tone-purple {
  --stat-color: #7c3aed;
  --stat-soft: #f3edff;
}

.dashboard-stat-card.tone-green {
  --stat-color: #12a65b;
  --stat-soft: #eaf8f0;
}

.dashboard-stat-card.tone-red {
  --stat-color: #ef4444;
  --stat-soft: #fff0f0;
}

.dashboard-stat-main {
  align-items: center;
  display: flex;
  gap: 12px;
}

.dashboard-stat-icon {
  align-items: center;
  background: var(--stat-soft);
  border-radius: 11px;
  color: var(--stat-color);
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dashboard-stat-main small,
.dashboard-stat-foot small {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.dashboard-stat-main strong {
  color: var(--admin-ink);
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-top: 5px;
}

.dashboard-stat-foot {
  align-items: flex-end;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 14px;
}

.dashboard-stat-foot small {
  font-size: 13px;
  text-transform: none;
}

.dashboard-stat-foot small i {
  color: var(--stat-color);
  margin-right: 3px;
}

.dashboard-sparkline {
  height: 32px;
  overflow: visible;
  width: 96px;
}

.dashboard-sparkline polyline {
  fill: none;
  stroke: var(--stat-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.dashboard-main-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  margin: 18px 0;
}

.dashboard-priority-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.dashboard-activity-grid {
  margin-top: 0;
}

.dashboard-column {
  align-content: start;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.dashboard-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  min-width: 0;
  padding: 18px;
}

.dashboard-panel-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dashboard-panel-heading .eyebrow {
  font-size: 13px;
  margin-bottom: 4px;
}

.dashboard-panel-heading h2 {
  font-size: 18px;
  margin: 0;
}

.dashboard-panel-heading > strong {
  color: var(--admin-blue);
  font-size: 14px;
}

.dashboard-activity-list {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  overflow: hidden;
}

.dashboard-activity-item {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  gap: 11px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 9px 11px;
  text-decoration: none;
  transition: background 0.16s ease;
}

.dashboard-activity-item:last-child {
  border-bottom: 0;
}

.dashboard-activity-item:hover {
  background: var(--admin-surface-soft);
}

.dashboard-activity-item > span {
  align-items: center;
  background: #eef3ff;
  border-radius: 8px;
  color: var(--admin-blue);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.dashboard-activity-item strong,
.dashboard-activity-item small {
  display: block;
}

.dashboard-activity-item strong {
  color: var(--admin-ink);
  font-size: 14px;
  line-height: 1.3;
}

.dashboard-activity-item small,
.dashboard-activity-item time {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-activity-item time {
  white-space: nowrap;
}

.dashboard-operations {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.dashboard-operations-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.dashboard-operation-card {
  --operation-color: var(--admin-blue);
  --operation-soft: #eef3ff;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 16px;
}

.dashboard-operation-card.tone-green {
  --operation-color: #12a65b;
  --operation-soft: #eaf8f0;
}

.dashboard-operation-card.tone-amber {
  --operation-color: #e99a00;
  --operation-soft: #fff6df;
}

.dashboard-operation-card.tone-red {
  --operation-color: #ef4444;
  --operation-soft: #fff0f0;
}

.dashboard-operation-card > h2 {
  font-size: 15px;
  margin: 0 0 14px;
}

.dashboard-operation-content {
  align-items: center;
  display: grid;
  flex: 1;
  gap: 14px;
  grid-template-columns: 126px minmax(0, 1fr);
}

.dashboard-ring {
  align-items: center;
  background: conic-gradient(var(--operation-color) calc(var(--ring-progress) * 1%), #e7ecf4 0);
  border-radius: 50%;
  display: flex;
  height: 116px;
  justify-content: center;
  position: relative;
  width: 116px;
}

.dashboard-ring::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  inset: 10px;
  position: absolute;
}

.dashboard-ring > div {
  position: relative;
  text-align: center;
  z-index: 1;
}

.dashboard-ring strong,
.dashboard-ring small {
  display: block;
}

.dashboard-ring strong {
  color: var(--admin-ink);
  font-size: 24px;
  line-height: 1;
}

.dashboard-ring small {
  color: var(--admin-muted);
  font-size: 14px;
  margin-top: 4px;
  text-transform: uppercase;
}

.dashboard-operation-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.dashboard-operation-list > div {
  align-items: center;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
}

.dashboard-operation-list > div > span::before {
  background: #a3afc2;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 6px;
  margin-right: 6px;
  width: 6px;
}

.dashboard-operation-list .state-good::before {
  background: var(--admin-green);
}

.dashboard-operation-list .state-warning::before {
  background: var(--admin-amber);
}

.dashboard-operation-list .state-danger::before {
  background: var(--admin-red);
}

.dashboard-operation-list strong {
  color: var(--admin-ink);
  font-size: 13px;
}

.dashboard-operation-card > a {
  border-top: 1px solid var(--admin-line);
  color: var(--admin-blue);
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: auto;
  padding-top: 12px;
  text-decoration: none;
}

.dashboard-operation-card > a i {
  margin-left: 5px;
}

.dashboard-staff-notes {
  display: grid;
  gap: 14px;
  max-width: 100%;
  overflow: hidden;
}

.staff-note-feedback {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  padding: 9px 11px;
}

.staff-note-feedback.success {
  background: #eaf8f0;
  color: #087842;
}

.staff-note-feedback.danger {
  background: #fff0f0;
  color: #c42d2d;
}

.staff-note-composer {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.staff-note-composer label,
.staff-note-composer textarea {
  display: block;
  width: 100%;
}

.staff-note-composer label > span {
  display: block;
  margin-bottom: 6px;
}

.staff-note-composer textarea {
  height: 76px;
  min-height: 76px;
  resize: vertical;
}

.staff-note-composer-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.staff-note-priorities {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.staff-note-priority-label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
  margin-right: 2px;
}

.staff-note-priorities label {
  align-items: center;
  background: #f8faff;
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  gap: 4px;
  line-height: 1;
  min-height: 24px;
  padding: 0 8px;
  position: relative;
  width: auto;
}

.staff-note-priorities input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.staff-note-priorities label > span {
  background: var(--note-color);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--note-color);
  height: 8px;
  transform: translateY(1px);
  width: 8px;
}

.staff-note-priorities label:has(input:checked) {
  background: var(--note-soft);
  border-color: var(--note-color);
  color: var(--admin-ink);
}

.staff-note-priorities label:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.12);
}

.staff-note-priorities .priority-normal {
  --note-color: #20a75a;
  --note-soft: #ebf9f1;
}

.staff-note-priorities .priority-important {
  --note-color: #e99a00;
  --note-soft: #fff7e2;
}

.staff-note-priorities .priority-urgent {
  --note-color: #e54848;
  --note-soft: #fff0f0;
}

.staff-note-composer-footer > .button {
  flex: 0 0 auto;
  font-size: 12px;
  min-height: 32px;
  min-width: max-content;
  padding: 0 12px;
  width: auto;
}

.staff-note-list {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  max-height: 266px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.staff-note-list::-webkit-scrollbar {
  width: 7px;
}

.staff-note-list::-webkit-scrollbar-thumb {
  background: #c9d5e8;
  border-radius: 999px;
}

.staff-note-item {
  --note-color: #20a75a;
  --note-soft: #ebf9f1;
  align-items: center;
  border-left: 3px solid var(--note-color);
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  height: 66px;
  padding: 10px 11px;
}

.staff-note-item.priority-important {
  --note-color: #e99a00;
  --note-soft: #fff7e2;
}

.staff-note-item.priority-urgent {
  --note-color: #e54848;
  --note-soft: #fff0f0;
}

.staff-note-item:not(.is-completed) {
  background: linear-gradient(90deg, var(--note-soft), #ffffff 24%);
}

.staff-note-item:last-child {
  border-bottom: 0;
}

.staff-note-item.is-completed {
  background: #f8fbf9;
}

.staff-note-state {
  align-items: center;
  background: var(--note-soft);
  border-radius: 8px;
  color: var(--note-color);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.staff-note-item.is-completed .staff-note-state {
  background: #eaf8f0;
  color: var(--admin-green);
}

.staff-note-copy {
  min-width: 0;
}

.staff-note-copy p {
  color: var(--admin-ink);
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-note-copy small {
  color: var(--admin-muted);
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-note-completed-by {
  color: var(--admin-green);
  font-weight: 600;
}

.staff-note-priority {
  color: var(--note-color);
  font-weight: 700;
}

.staff-note-item.is-completed .staff-note-copy p {
  color: var(--admin-muted);
  text-decoration: line-through;
}

.staff-note-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.staff-note-actions form {
  margin: 0;
}

.staff-note-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  width: 32px;
}

.staff-note-toggle:hover {
  transform: translateY(-1px);
}

.staff-note-toggle.is-complete {
  border-color: rgba(21, 173, 98, 0.28);
  color: var(--admin-green);
}

.staff-note-toggle.is-complete:hover {
  background: #eaf8f0;
  border-color: rgba(21, 173, 98, 0.48);
}

.staff-note-toggle.is-reopen {
  border-color: rgba(21, 93, 252, 0.24);
  color: var(--admin-blue);
}

.staff-note-toggle.is-reopen:hover {
  background: #eef3ff;
  border-color: rgba(21, 93, 252, 0.42);
}

.staff-note-delete {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 8px;
  color: var(--admin-red);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.staff-note-delete:hover {
  background: #fff0f0;
}

.staff-note-empty {
  margin: 0;
}

.dashboard-empty {
  align-items: center;
  background: var(--admin-surface);
  border: 1px dashed #cbd7ea;
  border-radius: 16px;
  box-shadow: var(--admin-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 30px;
  min-height: 420px;
  padding: 40px;
  text-align: center;
}

.dashboard-empty span {
  align-items: center;
  background: #eef3ff;
  border-radius: 18px;
  color: var(--admin-blue);
  display: inline-flex;
  font-size: 36px;
  height: 72px;
  justify-content: center;
  margin-bottom: 20px;
  width: 72px;
}

.dashboard-empty h2 {
  margin-bottom: 8px;
}

.dashboard-empty p {
  color: var(--admin-muted);
  margin: 0;
  max-width: 560px;
}

.admin-content > .actions,
.admin-content > form + .actions,
.install-form + .actions {
  margin: 22px 0;
}

.admin-content > .actions:first-of-type {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  padding: 14px;
}

.activity-list {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  overflow: hidden;
}

.activity-item {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  gap: 14px;
  min-height: 68px;
  padding: 14px;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item span {
  align-items: center;
  background: #eff4ff;
  border-radius: 10px;
  color: var(--admin-blue);
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.activity-item strong {
  color: var(--admin-ink);
  display: block;
  font-size: 16px;
}

.activity-item small {
  color: var(--admin-muted);
}

.control-grid,
.grid {
  gap: 18px;
}

.control-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.form-section,
.notice,
.table-panel,
.theme-editor-sidebar,
.theme-editor-main {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
}

.card,
.form-section,
.notice {
  padding: 18px;
}

.control-card {
  min-height: 170px;
}

.control-card .button {
  align-self: end;
  justify-self: start;
  margin-top: auto;
}

.card h2,
.card h3,
.form-section h2,
.notice h2 {
  color: var(--admin-ink);
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.card p,
.notice p,
.notice li,
.clean-list,
td span {
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.55;
}

.form-hint {
  margin: -6px 0 18px;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.6;
}

.admin-notification-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.general-settings-form {
  margin-top: 20px;
}

.general-settings-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.general-settings-card {
  margin: 0;
  min-width: 0;
}

.general-settings-card-wide {
  grid-column: 1 / -1;
}

.general-settings-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.general-settings-heading > span {
  align-items: center;
  background: #edf3ff;
  border-radius: 9px;
  color: var(--admin-blue);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
}

.general-settings-heading h2 {
  margin: 0 0 2px;
}

.general-settings-heading p {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.general-settings-card .admin-toggle-line {
  background: var(--admin-surface-soft);
  padding: 11px 12px;
}

.general-settings-actions {
  margin-top: 16px;
}

.admin-toggle-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.admin-toggle-line input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.admin-toggle-line strong,
.admin-toggle-line small {
  display: block;
}

.admin-toggle-line strong {
  color: var(--admin-ink);
}

.admin-toggle-line small {
  margin-top: 4px;
  color: var(--admin-muted);
  line-height: 1.5;
}

.clean-list li {
  border-left-color: rgba(21, 93, 252, 0.32);
}

.status-pill {
  background: #f4f7fc;
  border-color: var(--admin-line);
  color: var(--admin-muted);
}

.status-pill.partial,
.status-pill.active,
.status-pill.enabled,
.status-pill.published {
  background: rgba(21, 173, 98, 0.1);
  border-color: rgba(21, 173, 98, 0.22);
  color: var(--admin-green);
}

.status-pill.planned,
.status-pill.disabled,
.status-pill.inactive {
  background: rgba(245, 164, 0, 0.1);
  border-color: rgba(245, 164, 0, 0.22);
  color: #a96500;
}

.status-pill.pending {
  background: rgba(245, 164, 0, 0.1);
  border-color: rgba(245, 164, 0, 0.22);
  color: #a96500;
}

.status-pill.reviewed {
  background: rgba(21, 173, 98, 0.1);
  border-color: rgba(21, 173, 98, 0.22);
  color: var(--admin-green);
}

.status-pill.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.24);
  color: var(--admin-red);
}

.button,
button.button,
.module-tabs a {
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
}

.button {
  background: #ffffff;
  border-color: var(--admin-line);
  color: var(--admin-ink);
  min-height: var(--admin-control-height);
  padding: 0 13px;
}

.button:hover,
.module-tabs a:hover {
  border-color: rgba(21, 93, 252, 0.24);
  box-shadow: 0 12px 24px rgba(21, 93, 252, 0.1);
  color: var(--admin-blue);
}

.button.primary {
  background: linear-gradient(135deg, var(--admin-blue), var(--admin-blue-2));
  border-color: transparent;
  box-shadow: 0 14px 26px rgba(21, 93, 252, 0.25);
  color: #ffffff;
}

.button.danger {
  border-color: rgba(239, 68, 68, 0.28);
  color: var(--admin-red);
}

.link-button {
  color: var(--admin-blue);
  font-weight: 600;
  text-decoration: none;
}

.link-button:hover {
  color: #0b49d8;
}

.danger-link {
  color: var(--admin-red);
}

input,
textarea,
select {
  background: #f9fbff;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  color: var(--admin-ink);
  font-size: 15px;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.admin-body select {
  box-sizing: border-box;
  height: var(--admin-control-height);
  min-height: var(--admin-control-height);
  padding: 0 12px;
}

.admin-body textarea {
  line-height: 1.3;
  padding: 10px 12px;
}

input[type="file"] {
  align-items: center;
  background: #f9fbff;
  cursor: pointer;
  display: flex;
  min-height: 40px;
  padding: 8px 10px;
}

input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--admin-blue), var(--admin-blue-2));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 18px rgba(21, 93, 252, 0.18);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin-right: 12px;
  min-height: 30px;
  padding: 0 14px;
}

input[type="file"]::file-selector-button:hover {
  filter: brightness(0.96);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(21, 93, 252, 0.45);
  box-shadow: 0 0 0 4px rgba(21, 93, 252, 0.08);
}

label {
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 600;
}

.table-panel {
  overflow: hidden;
}

.admin-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.admin-tabs a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  color: var(--admin-ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 9px;
  min-height: var(--admin-control-height);
  padding: 0 13px;
  text-decoration: none;
}

.admin-tabs a.active,
.admin-tabs a:hover {
  background: var(--admin-blue);
  border-color: var(--admin-blue);
  box-shadow: 0 12px 28px rgba(21, 93, 252, 0.18);
  color: #fff;
}

.admin-topic-icon-grid {
  display: grid;
  gap: 12px;
}

.admin-topic-icon-grid.compact {
  gap: 8px;
}

.admin-topic-icon-row {
  align-items: end;
  background: #f8fbff;
  border: 1px solid rgba(219, 228, 238, 0.95);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(160px, 0.8fr) minmax(240px, 1fr) minmax(140px, 0.5fr);
  padding: 14px;
}

.admin-topic-icon-row.compact {
  border-radius: 12px;
  gap: 10px;
  grid-template-columns: auto minmax(120px, 0.65fr) minmax(220px, 1fr) minmax(120px, 0.45fr);
  padding: 9px 10px;
}

.admin-topic-icon-row.compact input,
.admin-topic-icon-row.compact select {
  min-height: 40px;
}

.admin-topic-icon-row label {
  display: grid;
  gap: 7px;
}

.admin-topic-icon-row label span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-topic-icon-row.is-empty {
  opacity: 0.82;
}

.forum-board-topic-icon {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-size: 22px;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.forum-board-topic-icon.is-blue {
  background: rgba(7, 93, 242, 0.1);
  color: #075df2;
}

.forum-board-topic-icon.is-purple {
  background: rgba(124, 58, 237, 0.1);
  color: #6d5dfc;
}

.forum-board-topic-icon.is-green {
  background: rgba(34, 197, 94, 0.1);
  color: #22a34a;
}

.forum-board-topic-icon.is-orange {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.forum-board-topic-icon.is-red {
  background: rgba(239, 68, 68, 0.11);
  color: #dc2626;
}

.forum-board-topic-icon.is-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

.forum-board-topic-icon.is-pink {
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
}

.forum-board-topic-icon.is-slate {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.admin-topic-icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-topic-icon-picker label {
  cursor: pointer;
  display: inline-flex;
}

.admin-topic-icon-picker input {
  height: 1px;
  margin: 0;
  min-height: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.admin-topic-icon-picker input:checked + .forum-board-topic-icon {
  background: var(--admin-blue);
  color: #fff;
}

.admin-pagination {
  align-items: center;
  border-top: 1px solid var(--admin-line);
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.admin-pagination > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

table {
  background: #ffffff;
  font-size: 14px;
  min-width: 780px;
}

th {
  background: #f8fbff;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

th,
td {
  border-bottom-color: var(--admin-line);
  padding: 11px 12px;
}

td > strong,
td > a:first-child {
  color: var(--admin-ink);
  font-weight: 600;
  text-decoration: none;
}

td > a:first-child:hover {
  color: var(--admin-blue);
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: #f9fbff;
}

.row-actions {
  align-items: center;
  gap: 8px;
}

.row-actions form,
.inline-form {
  margin: 0;
}

.row-actions .button {
  min-height: 34px;
  padding: 0 10px;
}

.report-penalty-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.report-penalty-form select,
.report-penalty-form input[type="datetime-local"],
.report-penalty-form input[list],
.report-penalty-form input[type="text"] {
  min-height: 38px;
  min-width: 150px;
  padding: 0 34px 0 10px;
}

.report-penalty-form input[type="datetime-local"],
.report-penalty-form input[list],
.report-penalty-form input[type="text"] {
  padding-right: 10px;
}

.report-review-note {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 600;
  min-width: 180px;
}

.audit-meta-list {
  color: var(--admin-muted);
  display: grid;
  font-size: 13px;
  gap: 4px;
  line-height: 1.45;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.audit-meta-list li {
  background: #f6f9ff;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 6px 8px;
}

.audit-pagination {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
}

.admin-pagination-ellipsis {
  align-items: center;
  color: var(--admin-muted);
  display: inline-flex;
  justify-content: center;
  min-width: 28px;
}

.admin-inline-checks {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.module-tabs {
  align-items: center;
  border-bottom-color: var(--admin-line);
  gap: 8px;
  margin: 18px 0;
}

.module-tabs a {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #667792;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  min-height: var(--admin-control-height);
  padding: 9px 13px;
}

.module-tabs a.active {
  background: #ffffff;
  border-color: var(--admin-line);
  box-shadow: 0 8px 20px rgba(19, 38, 71, 0.06);
  color: var(--admin-blue);
}

.filter-bar {
  align-items: end;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  gap: 14px;
  padding: 16px;
}

.filter-actions {
  align-items: end;
}

.filter-actions .button {
  height: var(--admin-control-height);
}

.users-filter-bar {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.integration-tabs {
  margin-bottom: 20px;
}

.integration-info {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #f5f8ff);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  display: grid;
  gap: 16px;
  grid-template-columns: 52px minmax(0, 1fr);
  margin-bottom: 18px;
  padding: 18px;
}

.integration-info > span {
  align-items: center;
  background: #eef3ff;
  border-radius: 11px;
  color: var(--admin-blue);
  display: inline-flex;
  font-size: 21px;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.integration-info .eyebrow {
  margin-bottom: 3px;
}

.integration-info h2 {
  font-size: 19px;
  margin: 0 0 4px;
}

.integration-info p:last-child {
  color: var(--admin-muted);
  margin: 0;
}

.integration-test-form {
  margin-top: 22px;
}

.integration-guide {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(190px, 0.35fr) minmax(0, 1fr);
  margin-top: 26px;
  padding: 20px;
}

.integration-guide h2 {
  font-size: 20px;
  margin: 0;
}

.integration-guide ol {
  counter-reset: integration-step;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.integration-guide li {
  align-items: start;
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  counter-increment: integration-step;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 11px;
}

.integration-guide li::before {
  align-items: center;
  background: #e9f0ff;
  border-radius: 8px;
  color: var(--admin-blue);
  content: counter(integration-step);
  display: inline-flex;
  font-weight: 700;
  grid-row: 1 / span 2;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.integration-guide li strong {
  color: var(--admin-ink);
}

.integration-guide li span {
  color: var(--admin-muted);
  line-height: 1.4;
}

.integration-guide code {
  background: #eef3ff;
  border-radius: 5px;
  color: var(--admin-blue);
  padding: 2px 5px;
}

.forum-structure-list {
  display: grid;
  gap: 18px;
}

.forum-structure-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.forum-structure-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 18px 12px;
}

.forum-structure-head h2 {
  margin: 0 0 5px;
}

.forum-structure-head p {
  color: var(--admin-muted);
  margin: 0;
}

.forum-structure-actions {
  padding: 0 18px 16px;
}

.forum-structure-card .nested-panel {
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  box-shadow: none;
}

.form-actions {
  margin-top: 18px;
}

.notice.success {
  background: rgba(21, 173, 98, 0.08);
  border-color: rgba(21, 173, 98, 0.24);
}

.notice.danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.24);
}

.installer-shell {
  background:
    radial-gradient(circle at 12% 0%, rgba(21, 93, 252, 0.16), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  min-height: 100vh;
  padding: 34px;
  place-items: center;
}

.installer-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(19, 38, 71, 0.14);
  display: grid;
  grid-template-columns: minmax(300px, 0.32fr) minmax(0, 0.68fr);
  max-width: 1320px;
  min-height: 720px;
  overflow: hidden;
  width: min(100%, 1320px);
}

.installer-visual {
  background:
    radial-gradient(circle at 25% 10%, rgba(70, 128, 255, 0.45), transparent 34%),
    linear-gradient(180deg, var(--admin-sidebar), var(--admin-sidebar-deep));
  color: #dbe8ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
}

.installer-brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.installer-visual h2 {
  color: #ffffff;
  font-size: 42px;
  line-height: 1.02;
}

.installer-visual p {
  color: rgba(219, 232, 255, 0.78);
  line-height: 1.7;
}

.installer-steps {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}

.installer-steps li {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #e9f1ff;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.installer-steps span {
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  color: var(--admin-blue);
  display: inline-flex;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.installer-steps.completed li {
  background: rgba(21, 173, 98, 0.12);
  border-color: rgba(134, 239, 172, 0.24);
}

.installer-steps.completed span {
  background: rgba(21, 173, 98, 0.95);
  color: #ffffff;
  font-size: 14px;
}

.installer-content {
  max-height: 88vh;
  overflow: auto;
  padding: 38px;
}

.installer-body .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.requirement-card {
  box-shadow: none;
  min-height: 126px;
}

.requirement-card.passed {
  border-color: rgba(21, 173, 98, 0.28);
}

.requirement-card.failed {
  border-color: rgba(239, 68, 68, 0.34);
}

.requirement-list {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  box-shadow: var(--admin-shadow);
  display: grid;
  margin: 26px 0;
  overflow: hidden;
}

.requirement-row {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 15px 18px;
}

.requirement-row:last-child {
  border-bottom: 0;
}

.requirement-icon {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.requirement-row.passed .requirement-icon {
  background: rgba(21, 173, 98, 0.1);
  color: var(--admin-green);
}

.requirement-row.failed .requirement-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--admin-red);
}

.requirement-row strong {
  color: var(--admin-ink);
  display: block;
  font-size: 17px;
}

.requirement-row small {
  color: var(--admin-muted);
  display: block;
  line-height: 1.5;
  margin-top: 3px;
}

.requirement-row em {
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.requirement-row.passed em {
  background: rgba(21, 173, 98, 0.1);
  color: var(--admin-green);
}

.requirement-row.failed em {
  background: rgba(239, 68, 68, 0.1);
  color: var(--admin-red);
}

.current-media {
  align-items: start;
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
}

.current-media img {
  border-radius: 10px;
  max-height: 180px;
  max-width: 280px;
  object-fit: cover;
  width: 100%;
}

.checkbox-line {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.checkbox-line input {
  min-height: auto;
  width: auto;
}

.thread {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.message {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  padding: 18px;
}

.message.staff {
  border-left: 4px solid var(--admin-blue);
}

.message-meta {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.message-meta strong {
  color: var(--admin-ink);
}

.message-meta span {
  color: var(--admin-muted);
  font-size: 15px;
}

.message p {
  color: var(--admin-text);
  line-height: 1.65;
  margin: 0;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.attachments a {
  background: #eef3ff;
  border-radius: 999px;
  color: var(--admin-blue);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 10px;
  text-decoration: none;
}

.admin-request-thread {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.admin-request-message {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  box-shadow: var(--admin-shadow);
  color: var(--admin-text);
  padding: 18px;
}

.admin-request-message.is-staff {
  background:
    linear-gradient(90deg, rgba(21, 93, 252, 0.08), rgba(255, 255, 255, 0) 46%),
    var(--admin-surface);
  border-color: rgba(21, 93, 252, 0.24);
  box-shadow:
    inset 4px 0 0 var(--admin-blue),
    var(--admin-shadow);
}

.admin-request-message-meta {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.admin-request-message-meta strong {
  color: var(--admin-ink);
  font-weight: 700;
}

.admin-request-message-meta span {
  color: var(--admin-muted);
  font-size: 15px;
  font-weight: 600;
}

.admin-request-message p {
  color: var(--admin-text);
  line-height: 1.7;
  margin: 0;
}

.admin-request-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-request-attachments a {
  background: #eef3ff;
  border-radius: 999px;
  color: var(--admin-blue);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 10px;
  text-decoration: none;
}

.theme-editor-shell {
  align-items: stretch;
}

.theme-editor-sidebar,
.theme-editor-main {
  padding: 18px;
}

.theme-editor-sidebar {
  max-height: calc(100vh - 170px);
  overflow: auto;
  position: sticky;
  top: 98px;
}

.theme-editor-sidebar details {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.theme-editor-sidebar summary {
  background: #f8fbff;
  color: var(--admin-ink);
  cursor: pointer;
  font-weight: 700;
  padding: 12px 14px;
}

.theme-editor-sidebar nav {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.theme-editor-sidebar nav a {
  border-radius: 8px;
  color: var(--admin-text);
  display: grid;
  gap: 4px;
  padding: 10px;
  text-decoration: none;
}

.theme-editor-sidebar nav a:hover,
.theme-editor-sidebar nav a.active {
  background: #eef3ff;
  color: var(--admin-blue);
}

.theme-editor-sidebar nav small {
  color: var(--admin-muted);
  font-size: 13px;
}

.theme-editor-guide {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.theme-editor-guide p {
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  color: var(--admin-muted);
  line-height: 1.6;
  margin: 0;
  padding: 16px;
}

.theme-editor-guide strong {
  color: var(--admin-ink);
}

.widget-reference-grid {
  column-count: 2;
  column-gap: 16px;
  margin-top: 20px;
}

.theme-api-guide {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  margin-top: 20px;
  padding: 18px;
}

.theme-api-guide > header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.theme-api-guide h2,
.theme-api-guide p {
  margin: 0;
}

.theme-api-guide > header > code,
.theme-api-guide article code {
  background: #eff4ff;
  border-radius: 6px;
  color: #2457d6;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  padding: 4px 7px;
}

.theme-api-guide-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theme-api-guide-grid article {
  align-items: flex-start;
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  display: flex;
  gap: 10px;
  min-height: 100px;
  padding: 13px;
}

.theme-api-guide-grid article > i {
  color: var(--admin-primary);
  margin-top: 3px;
}

.theme-api-guide-grid article p,
.widget-reference-item small {
  color: var(--admin-muted);
  display: block;
  line-height: 1.45;
  margin-top: 4px;
}

.widget-reference-group {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  break-inside: avoid;
  display: inline-block;
  margin: 0 0 16px;
  overflow: hidden;
  width: 100%;
}

.widget-reference-group > header {
  align-items: center;
  background: #f8fbff;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.widget-reference-group h2 {
  font-size: 18px;
  margin: 0;
}

.widget-reference-group > header span {
  color: var(--admin-muted);
  font-size: 13px;
}

.widget-reference-list {
  display: grid;
}

.widget-reference-item {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(170px, 0.75fr) minmax(250px, 1.25fr);
  padding: 12px 16px;
}

.widget-reference-item:last-child {
  border-bottom: 0;
}

.widget-reference-item strong {
  color: var(--admin-ink);
  display: block;
  font-size: 16px;
}

.widget-reference-item p {
  color: var(--admin-muted);
  line-height: 1.4;
  margin: 3px 0 0;
}

.widget-reference-item code {
  background: #0f172a;
  border-radius: 8px;
  color: #dbeafe;
  display: block;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13px;
  overflow-x: auto;
  padding: 10px;
  white-space: nowrap;
}

.recent-backup {
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px;
}

.recent-backup strong {
  color: var(--admin-ink);
}

.recent-backup p {
  color: var(--admin-muted);
  margin: 4px 0 0;
}

[data-theme-editor-textarea] {
  background: #0f172a;
  border-color: #1e293b;
  color: #e5edff;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 16px;
  line-height: 1.65;
}

[data-theme-editor-textarea]:focus {
  border-color: rgba(21, 93, 252, 0.65);
}

.empty-state {
  background: #f8fbff;
  border: 1px dashed #cbd7ea;
  border-radius: 12px;
  color: var(--admin-muted);
  padding: 18px;
}

.tox.tox-tinymce {
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
  background: #f8fbff !important;
}

.tox .tox-edit-area__iframe {
  background: #ffffff !important;
}

.role-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.role-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  padding: 22px;
}

.role-card p {
  color: var(--admin-muted);
}

.permission-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.permission-grid label,
.check-row label {
  align-items: center;
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  color: var(--admin-text);
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.permission-grid input,
.check-row input {
  accent-color: var(--admin-blue);
  min-height: auto;
  width: auto;
}

.check-row {
  gap: 10px;
}

.field-row {
  background: #f8fbff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  padding: 16px;
}

.field-options[hidden],
.field-row[hidden] {
  display: none;
}

@media (max-width: 1300px) {
  .theme-editor-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .widget-reference-grid {
    column-count: 1;
  }
}

@media (max-width: 1180px) {
  .theme-api-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stats,
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-operations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .theme-api-guide > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-api-guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
    position: static;
  }

  .integration-guide {
    grid-template-columns: 1fr;
  }

  .integration-guide ol {
    grid-template-columns: 1fr;
  }

  .general-settings-grid {
    grid-template-columns: 1fr;
  }

  .general-settings-card-wide {
    grid-column: auto;
  }

  .admin-notification-options {
    grid-template-columns: 1fr;
  }

  .admin-sidebar-card {
    margin-bottom: 18px;
  }

  .installer-panel {
    grid-template-columns: 1fr;
  }

  .installer-content {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .admin-topbar {
    flex-wrap: wrap;
    padding: 16px;
  }

  .admin-topbar-account {
    justify-content: space-between;
    margin-left: 0;
    width: 100%;
  }

  .admin-topbar-actions span {
    display: none;
  }

  .admin-topbar-actions a,
  .admin-topbar-actions button {
    min-width: 38px;
    padding-inline: 10px;
  }

  .admin-search {
    order: 5;
    width: 100%;
  }

  .admin-content,
  .installer-content,
  .installer-visual {
    padding: 22px;
  }

  .dashboard-stats,
  .dashboard-operations,
  .control-grid,
  .installer-body .grid,
  .form-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .staff-note-state {
    display: none;
  }

  .staff-note-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .staff-note-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .staff-note-priorities {
    flex-wrap: wrap;
    white-space: normal;
  }

  .staff-note-composer-footer .button {
    width: 100%;
  }
  .staff-note-actions {
    justify-content: flex-start;
  }
}
