:root {
  --ink: #172234;
  --muted: #5c6878;
  --line: #d9e2ec;
  --soft: #f4f7fb;
  --panel: #ffffff;
  --navy: #17324d;
  --red: #b3202a;
  --teal: #1f7a70;
  --gold: #b7832f;
  --shadow: 0 16px 40px rgba(23, 34, 52, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.nav a.active,
.nav a:hover {
  color: var(--navy);
  background: var(--soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions form {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
}

.button.primary {
  color: #fff;
  background: var(--red);
}

.button.secondary {
  color: #fff;
  background: var(--navy);
}

.button.ghost {
  color: var(--navy);
  background: #fff;
  border-color: var(--line);
}

.button.full {
  width: 100%;
}

.flash {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-weight: 700;
}

.flash.error {
  color: var(--red);
  border-color: rgba(179, 32, 42, 0.3);
  background: #fff5f5;
}

.flash.info {
  color: var(--navy);
  background: #f1f7ff;
}

.hero {
  color: #fff;
  background:
    linear-gradient(110deg, rgba(23, 50, 77, 0.96), rgba(23, 50, 77, 0.82)),
    radial-gradient(circle at 80% 10%, rgba(183, 131, 47, 0.35), transparent 28%),
    #17324d;
}

.hero-grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: center;
  padding: 56px 0;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 10px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-bar,
.filter-bar {
  display: flex;
  gap: 10px;
  margin: 28px 0 18px;
}

.search-bar input,
.filter-bar input,
.form-panel input,
.form-panel select,
.form-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
}

.search-bar input {
  min-height: 50px;
}

.search-bar button {
  min-width: 150px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
  cursor: pointer;
}

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

.trust-panel {
  display: grid;
  gap: 14px;
}

.trust-panel div {
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.trust-panel strong,
.trust-panel span {
  display: block;
}

.trust-panel span {
  color: rgba(255, 255, 255, 0.78);
}

.section {
  padding: 64px 0;
}

.page {
  min-height: 62vh;
  padding: 46px 0 72px;
}

.muted {
  background: var(--soft);
}

.split-title,
.page-head,
.profile-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-head {
  align-items: center;
  margin-bottom: 28px;
}

.page-head.compact {
  display: block;
}

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

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

h2 {
  margin-bottom: 14px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

p {
  color: var(--muted);
}

.text-link {
  color: var(--red);
  font-weight: 900;
}

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

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

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  display: block;
  min-width: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.category-card strong {
  color: var(--navy);
  font-size: 18px;
}

.locksmith-card {
  min-height: 220px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tag {
  color: var(--navy);
  background: #e8eef6;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.topic-list {
  display: grid;
  gap: 10px;
}

.with-space {
  margin-top: 24px;
}

.topic-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-row:hover,
.card:hover,
.article-line:hover {
  border-color: rgba(179, 32, 42, 0.35);
}

.topic-row h3 {
  margin-top: 8px;
}

.topic-row > span {
  min-width: max-content;
  color: var(--muted);
  font-weight: 800;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.stack {
  display: grid;
  gap: 12px;
}

.article-line,
.event-line {
  display: block;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-line strong,
.article-line span,
.event-line strong,
.event-line span {
  display: block;
}

.article-shell {
  max-width: 840px;
}

.article-shell h1 {
  margin-top: 12px;
}

.meta {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 22px;
}

.lead {
  color: var(--ink);
  font-size: 20px;
}

.prose {
  color: var(--ink);
  font-size: 18px;
}

.replies {
  max-width: 840px;
  margin-top: 32px;
}

.reply {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}

.reply span {
  display: block;
  color: var(--muted);
}

.form-panel {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-panel label {
  font-weight: 900;
}

.narrow,
.auth-panel {
  max-width: 720px;
}

.auth-panel {
  padding-top: 32px;
}

.profile-hero {
  padding: 56px 0;
  color: #fff;
  background: var(--navy);
}

.profile-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

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

.profile-facts span {
  display: block;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.profile-facts strong {
  display: block;
  color: var(--gold);
}

.contact-box {
  padding: 22px;
  color: var(--ink);
  background: #fff;
  border-radius: 8px;
}

.contact-box p {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-item > span {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
}

.safety-note,
.empty-page {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid rgba(179, 32, 42, 0.24);
  border-radius: 8px;
  background: #fff8f8;
}

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

.stat strong {
  display: block;
  font-size: 36px;
  color: var(--red);
}

.site-footer {
  padding: 42px 0;
  background: #101a29;
  color: #fff;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 32px;
}

.footer-grid a {
  display: block;
  margin: 6px 0;
}

.footer-brand {
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    margin-left: 0;
    padding-bottom: 4px;
  }

  .header-actions {
    width: 100%;
  }

  .hero-grid,
  .two-column,
  .profile-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid.three,
  .card-grid.four {
    grid-template-columns: 1fr;
  }

  .split-title,
  .page-head,
  .topic-row,
  .filter-bar,
  .search-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .search-bar button {
    min-height: 48px;
  }
}

.admin-actions,
.form-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--navy);
  background: var(--soft);
  font-size: 13px;
  text-transform: uppercase;
}

.admin-table td span {
  display: block;
  color: var(--muted);
}

.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.button.danger {
  color: #fff;
  background: var(--red);
}

.status-pill {
  display: inline-flex !important;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--navy) !important;
  background: #e8eef6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.published {
  color: #fff !important;
  background: var(--teal);
}

.status-pill.hidden {
  color: #fff !important;
  background: #6b7280;
}

.status-pill.draft {
  color: #fff !important;
  background: var(--gold);
}

.muted-card {
  opacity: 0.74;
}

.row-actions form {
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkbox-field label {
  margin: 0;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
}

.status-pill.verified {
  color: #fff !important;
  background: var(--teal);
}

.status-pill.pending {
  color: #fff !important;
  background: var(--gold);
}

.status-pill.rejected,
.status-pill.suspended {
  color: #fff !important;
  background: var(--red);
}

@media (max-width: 760px) {
  .form-grid.two {
    grid-template-columns: 1fr;
  }
}
