:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #edf7f3;
  --ink: #111827;
  --muted: #64748b;
  --line: #dfe7f1;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #2563eb;
  --warning: #d97706;
  --rose: #e11d48;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] {
  --bg: #111827;
  --panel: #172033;
  --panel-soft: #123c35;
  --ink: #eef2f7;
  --muted: #a8b3c7;
  --line: #2a374d;
  --brand: #2dd4bf;
  --brand-dark: #14b8a6;
  --accent: #60a5fa;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #eef6f7 0, #f6f7fb 360px, #f3f6fb 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] body {
  background: linear-gradient(180deg, #0f172a 0, #111827 360px, #0f172a 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.98)),
    #111827;
  color: #fff;
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark,
.tool-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: #fff;
  font-weight: 800;
  overflow: hidden;
}

.image-logo {
  background: #fff;
  border: 1px solid var(--line);
}

.tool-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand small,
.tool-card-head p,
.tool-desc,
.subtitle,
.section-heading span,
.table-row small {
  color: var(--muted);
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #a8b3c7;
  font-size: 12px;
}

.category-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d9e2f2;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.category-item:hover,
.category-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.category-item:hover {
  transform: translateX(2px);
}

.category-item small {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  text-align: center;
}

.admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 22px;
  border-radius: 8px;
  background: #fff;
  color: #10203d;
  font-weight: 700;
}

.theme-toggle {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 16px 8px 4px;
}

.sidebar-footer span {
  color: #9aa8bd;
  font-size: 12px;
  line-height: 1.6;
}

.admin-link.compact {
  width: 122px;
  margin: 0;
  box-shadow: var(--shadow);
}

.content {
  padding: 30px clamp(18px, 4vw, 56px) 58px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: stretch;
  min-height: 282px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 247, 243, 0.92)),
    #fff;
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .tool-card,
:root[data-theme="dark"] .latest-item,
:root[data-theme="dark"] .resource-card,
:root[data-theme="dark"] .detail-hero,
:root[data-theme="dark"] .detail-panel,
:root[data-theme="dark"] .table-panel,
:root[data-theme="dark"] .editor-panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .feedback-modal {
  background: var(--panel);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.primary-link {
  background: var(--brand);
  color: #fff;
}

.secondary-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.95), rgba(37, 99, 235, 0.92)),
    #0f766e;
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.22);
}

.hero-panel span {
  display: block;
  font-size: 58px;
  font-weight: 900;
}

.hero-panel small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-mini-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 22px 0 14px;
}

.search-module {
  display: grid;
  gap: 8px;
}

.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.search-tabs button.active {
  border-color: var(--brand);
  background: #e7f7f2;
  color: var(--brand-dark);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-icon {
  color: var(--brand);
  font-size: 24px;
}

.search-box input,
.panel-heading input,
form input,
form textarea,
form select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.quick-filters {
  display: flex;
  gap: 8px;
}

.chip,
.ghost-button,
.row-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.chip:hover,
.ghost-button:hover,
.row-actions button:hover,
.secondary-link:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #f8fffc;
}

.chip.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.category-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #334155;
  cursor: pointer;
  font-weight: 700;
}

.strip-item small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.strip-item.active {
  border-color: var(--brand);
  background: #e7f7f2;
  color: var(--brand-dark);
}

.section-heading,
.panel-heading,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading {
  margin: 30px 0 16px;
}

.section-heading h2,
.panel-heading h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading a {
  color: var(--brand);
  font-weight: 700;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.latest-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.latest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.latest-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.latest-item strong,
.latest-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-card {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff, #f8fbff),
    #fff;
  box-shadow: 0 10px 28px rgba(18, 32, 61, 0.05);
}

.resource-card strong {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent);
  font-size: 12px;
}

.resource-card h3 {
  margin: 14px 0 8px;
  font-size: 19px;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-card,
.editor-panel,
.table-panel,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(18, 32, 61, 0.05);
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 18px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.tool-card:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
  transform: translateY(-2px);
}

.compact-card {
  min-height: 220px;
  background: linear-gradient(180deg, #fff, #f5fbfa);
}

.tool-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.tool-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.tool-card-head p {
  margin: 0;
  font-size: 13px;
}

.tool-desc {
  flex: 1;
  margin: 16px 0;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: #27665d;
  font-size: 12px;
}

.tag-row .pricing-tag {
  background: #eef4ff;
  color: var(--accent);
  font-weight: 800;
}

.tool-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

.tool-actions a {
  color: var(--brand);
  font-weight: 800;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.save-tool {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.save-tool.saved,
.secondary-link.saved {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
}

:root[data-theme="dark"] .save-tool,
:root[data-theme="dark"] .secondary-link,
:root[data-theme="dark"] .chip,
:root[data-theme="dark"] .strip-item,
:root[data-theme="dark"] .search-tabs button {
  background: #172033;
  color: var(--ink);
}

.tool-badges {
  display: flex;
  gap: 6px;
  min-height: 26px;
}

.tool-badges strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7f7f2;
  color: var(--brand);
  font-size: 12px;
}

.tool-badges .hot-badge {
  background: #fff7ed;
  color: var(--warning);
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.detail-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 58px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand);
  font-weight: 800;
}

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dark-brand {
  width: fit-content;
  padding: 0;
  border: 0;
  color: var(--ink);
}

.dark-brand small {
  color: var(--muted);
}

.detail-hero {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 247, 243, 0.92)),
    #fff;
  box-shadow: var(--shadow);
}

.detail-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.detail-logo {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(15, 118, 110, 0.22);
  overflow: hidden;
}

.image-detail-logo {
  background: #fff;
  border: 1px solid var(--line);
}

.image-detail-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-tags {
  margin-top: 18px;
  margin-bottom: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.detail-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.85;
}

.article-panel {
  min-height: 360px;
}

.markdown-body {
  color: #475569;
  line-height: 1.85;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 26px 0 10px;
  color: var(--ink);
  line-height: 1.3;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: 26px;
}

.markdown-body h2 {
  font-size: 21px;
}

.markdown-body h3 {
  font-size: 18px;
}

.markdown-body p {
  margin: 0 0 14px;
}

.markdown-body ul {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding-left: 20px;
}

.markdown-body li::marker {
  color: var(--brand);
}

.markdown-body strong {
  color: var(--ink);
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2f7;
  color: #0f172a;
}

.markdown-body a {
  color: var(--brand);
  font-weight: 800;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list dt {
  color: var(--muted);
  font-weight: 700;
}

.info-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.info-list a {
  color: var(--brand);
  font-weight: 800;
}

.related-section {
  margin-top: 18px;
}

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

.detail-empty {
  margin-top: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
}

.feedback-modal {
  width: min(520px, 100%);
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.modal-desc {
  margin: 10px 0 14px;
  color: var(--muted);
}

.feedback-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.feedback-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.modal-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: #334155;
  font-weight: 700;
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
}

.icon-close {
  min-height: 34px;
}

.admin-body {
  background:
    linear-gradient(180deg, #eef6f7 0, #f6f7fb 320px, #f4f6fa 100%);
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.feedback-panel {
  margin-bottom: 18px;
}

.analytics-panel {
  margin-bottom: 18px;
}

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

.mini-stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.mini-stat strong {
  display: block;
  color: var(--brand);
  font-size: 24px;
}

.mini-stat span {
  color: var(--muted);
}

.analytics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.analytics-layout h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.rank-list,
.event-list {
  display: grid;
  gap: 8px;
}

.rank-item,
.event-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rank-item strong,
.event-item strong {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e7f7f2;
  color: var(--brand);
  font-size: 13px;
}

.rank-item span,
.event-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-item small,
.event-item small {
  grid-column: 2;
  color: var(--muted);
}

.feedback-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.feedback-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feedback-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-item span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7f7f2;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.feedback-item p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

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

.compact-empty {
  padding: 20px;
}

.admin-header {
  margin-bottom: 22px;
}

.admin-header h1 {
  margin: 0;
  font-size: 34px;
}

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

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  color: var(--brand);
  font-size: 30px;
}

.stat-card span {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.editor-panel,
.table-panel {
  padding: 18px;
}

.editor-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.editor-panel label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
}

form input,
form textarea,
form select,
.panel-heading input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

form textarea {
  min-height: 104px;
  padding-top: 10px;
  resize: vertical;
}

.check-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.check-row label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
}

.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.form-message[data-type="error"] {
  color: #dc2626;
}

.tool-table {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 100px 76px 116px;
  gap: 12px;
  align-items: center;
}

.table-head {
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-row {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-row small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.muted {
  background: #f1f5f9;
  color: #64748b;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  min-height: 32px;
  padding: 0 9px;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 180px;
  }

  .featured-grid,
  .tool-grid,
  .latest-list,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-footer {
    margin-top: 14px;
  }

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

  .topbar,
  .search-band,
  .stats-row,
  .analytics-grid,
  .analytics-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: 0;
    padding: 22px;
  }

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

  .hero-panel {
    min-height: 164px;
  }

  .hero-panel span {
    font-size: 44px;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .tool-grid,
  .latest-list,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .quick-filters,
  .search-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

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

  .tool-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .admin-header,
  .detail-nav,
  .section-heading,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-logo {
    width: 72px;
    height: 72px;
    font-size: 24px;
  }

  .table-head {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }
}
