/* =========================================================
   ВсеПроВсе.pro / Расшифровщик кодов ошибок — v1.6
   Визуально синхронизировано с основным DLE-шаблоном сайта.
   ========================================================= */

:root {
  --vse-bg: #f3f6f8;
  --vse-blue: #16728a;
  --vse-blue-dark: #0f5f73;
  --vse-text: #1d2530;
  --vse-muted: #6d7b86;
  --vse-border: #e3ebf0;
  --vse-card: #ffffff;
  --vse-shadow: 0 12px 34px rgba(15, 38, 52, .08);
  --vse-radius: 18px;
  --vse-danger: #b42318;
  --vse-success: #18794e;

  /* Совместимость с административными стилями старых версий */
  --blue: var(--vse-blue);
  --blue2: var(--vse-blue-dark);
  --bg: var(--vse-bg);
  --text: var(--vse-text);
  --muted: var(--vse-muted);
  --line: var(--vse-border);
  --red: var(--vse-danger);
  --green: var(--vse-success);
  --radius: var(--vse-radius);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--vse-bg);
  color: var(--vse-text);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vse-blue); text-decoration: none; }
a:hover { color: var(--vse-blue-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font-family: inherit; }
.metrics-pixel { position: absolute; left: -9999px; }

.page, .page > .wrp, .wrp { width: 100%; margin: 0; padding: 0; }
.site-shell,
.service-container,
.vse-footer-menu,
.footer {
  width: 1180px;
  max-width: calc(100% - 40px);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Header: как у основного сайта ---------- */
#header {
  width: 100%;
  margin: 0 0 34px;
  background: var(--vse-blue);
  box-shadow: 0 4px 18px rgba(15, 38, 52, .14);
}
#header .header { width: 100%; }
#header_menu {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logotype {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 240px;
  color: #fff !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.logo_icon_img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
}
.logo_title {
  color: #fff;
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.02em;
}
#top_menu { flex: 1 1 auto; min-width: 0; }
.vse-top-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vse-top-menu li { margin: 0; padding: 0; list-style: none; }
.vse-top-menu a {
  display: block;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  line-height: 78px;
  white-space: nowrap;
  opacity: .96;
  text-decoration: none !important;
}
.vse-top-menu a:hover { opacity: 1; text-decoration: underline !important; }
.vse-service-nav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 10px;
  color: #fff !important;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none !important;
  background: rgba(255,255,255,.12);
}
.vse-service-nav:hover,
.vse-service-nav.is-active { background: #fff; color: var(--vse-blue) !important; }

/* ---------- Main ---------- */
.service-page { width: 100%; }
.service-container { padding: 0 0 42px; }
.service-container > .breadcrumbs,
.service-container > article,
.service-container > .hero,
.service-container > .catalog-head,
.service-container > .notice,
.service-container > .result-list {
  width: 860px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3 { color: #111; letter-spacing: -.03em; }
h1 { margin: 0 0 18px; font-size: 38px; line-height: 1.15; font-weight: 900; }
h2 { margin: 34px 0 16px; font-size: 28px; line-height: 1.25; font-weight: 900; }
h3 { margin: 26px 0 12px; font-size: 22px; line-height: 1.3; font-weight: 900; }
p { margin-top: 0; }

.breadcrumbs {
  margin-bottom: 22px !important;
  font-size: 14px;
  line-height: 1.45;
  color: var(--vse-muted);
}
.breadcrumbs a { color: var(--vse-blue); }

/* ---------- Hero / catalog headers ---------- */
.hero,
.catalog-head {
  margin-bottom: 28px !important;
  padding: 34px 38px;
  background: var(--vse-card);
  border: 1px solid var(--vse-border);
  border-radius: var(--vse-radius);
  box-shadow: var(--vse-shadow);
}
.hero h1,
.catalog-head h1 { margin-top: 0; }
.hero p:not(.eyebrow),
.catalog-head > p:not(.eyebrow) {
  margin-bottom: 0;
  color: #41505a;
  font-size: 18px;
  line-height: 1.65;
}
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  font-weight: 800;
  color: var(--vse-blue);
}

/* ---------- Search ---------- */
.search-box {
  width: 1180px;
  max-width: 100%;
  margin: 0 auto 34px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr auto;
  gap: 14px;
  align-items: end;
  background: linear-gradient(135deg, var(--vse-blue), var(--vse-blue-dark));
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 38, 52, .12);
}
.search-box label { color: #fff; font-size: 14px; font-weight: 800; }
.search-box input,
.search-box select {
  width: 100%;
  height: 48px;
  margin-top: 7px;
  padding: 0 14px;
  background: #fff;
  border: 0;
  border-radius: 10px;
  color: #111;
  font-size: 15px;
  outline: none;
}
.search-box input:focus,
.search-box select:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.24); }
.search-box button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--vse-blue);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.search-box button:hover { background: #eef7fa; }

/* ---------- Common cards / sections ---------- */
.content-card,
article section,
.article-head,
.card,
.notice,
.result-card,
.mini-card,
.catalog-card,
.error-code-card,
.related-codes a {
  background: #fff;
  border: 1px solid var(--vse-border);
  border-radius: var(--vse-radius);
  box-shadow: var(--vse-shadow);
}

.service-container > section:not(.hero):not(.catalog-head):not(.content-card),
.service-container > .content-card {
  width: 1180px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.service-container > section > h2,
.service-container > .content-card > h2 { margin-top: 0; }
.service-container > section:not(.hero):not(.catalog-head),
.content-card { padding: 30px 34px; margin-bottom: 28px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  color: var(--vse-text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mini-card strong { color: #111; font-size: 18px; }
.mini-card span { margin-top: 5px; color: var(--vse-muted); font-size: 14px; }
.mini-card:hover { transform: translateY(-2px); border-color: rgba(22,114,138,.35); text-decoration: none; }

.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.catalog-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  color: var(--vse-text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
.catalog-card strong { color: #111; font-size: 20px; }
.catalog-card span { margin-top: 5px; color: var(--vse-muted); font-size: 14px; }
.catalog-card:hover { transform: translateY(-2px); border-color: rgba(22,114,138,.35); text-decoration: none; }

.error-code-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.error-code-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  padding: 19px 20px;
  color: var(--vse-text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
  overflow: hidden;
}
.error-code-card strong,
.related-codes strong {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 5px 9px;
  border-radius: 9px;
  background: #eef7fa;
  color: var(--vse-blue-dark);
  font-size: 19px;
  line-height: 1.2;
}
.error-code-card span {
  display: -webkit-box;
  margin-top: 11px;
  color: #52616b;
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.error-code-card:hover { transform: translateY(-2px); border-color: rgba(22,114,138,.35); text-decoration: none; }
.catalog-note { margin-top: 0; }

/* ---------- Error article ---------- */
article { max-width: 860px; }
.article-head {
  padding: 38px 42px;
  margin-bottom: 16px;
}
.article-head h1 { margin: 0 0 20px; font-size: 38px; line-height: 1.15; }
.quick-answer {
  margin-top: 18px;
  padding: 18px 20px;
  background: #f3f8fa;
  border: 1px solid #d9eaee;
  border-left: 4px solid var(--vse-blue);
  border-radius: 0 12px 12px 0;
  color: #27313a;
}
.urgency { margin-top: 16px; color: var(--vse-muted); }
article section { margin-top: 16px; padding: 30px 34px; }
article section h2 { margin: 0 0 14px; font-size: 25px; }
article section p { margin: 0; color: #27313a; font-size: 17px; line-height: 1.75; }
article section ul,
article section ol {
  margin: 0 0 0 22px;
  padding: 0;
}
article section ul { list-style: disc; }
article section ol { list-style: decimal; }
article section li { margin: 0 0 8px; padding-left: 2px; }
.source { color: var(--vse-muted); font-size: 14px; }
.source p { color: var(--vse-muted); font-size: 14px; }
.related-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.related-codes a {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  padding: 16px 17px;
  color: var(--vse-text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
  overflow: hidden;
}
.related-codes span {
  display: -webkit-box;
  margin-top: 9px;
  color: #536176;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-codes a:hover { transform: translateY(-2px); border-color: rgba(22,114,138,.35); text-decoration: none; }
.catalog-more { margin: 18px 0 0 !important; font-weight: 800; }

/* ---------- Search results / notices ---------- */
.result-list { display: grid; gap: 12px; margin-top: 22px !important; }
.result-card { display: block; padding: 20px 22px; color: var(--vse-text); text-decoration: none; }
.result-card strong { color: #111; }
.result-card span { display: block; margin-top: 3px; color: var(--vse-muted); }
.result-card p { margin: 6px 0 0; }
.result-card:hover { border-color: rgba(22,114,138,.35); text-decoration: none; }
.notice { padding: 20px 22px; margin-bottom: 22px !important; }
.notice h2 { margin: 0 0 10px; font-size: 22px; }
.notice.error { border-color: #f1b5b1; background: #fff5f4; color: var(--vse-danger); }
.notice.success { border-color: #9ed7bd; background: #f1fcf6; color: var(--vse-success); }
.muted { color: var(--vse-muted); font-size: 14px; }

/* ---------- Forms / admin shared ---------- */
input, select, textarea, button { font: inherit; }
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="date"], input:not([type]), textarea, select {
  width: 100%;
  border: 1px solid var(--vse-border);
  background: #fff;
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--vse-text);
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--vse-blue); box-shadow: 0 0 0 3px rgba(22,114,138,.12); }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--vse-blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--vse-blue-dark); }
button.secondary { background: #fff; color: var(--vse-blue); border: 1px solid var(--vse-border); }
label { display: block; font-weight: 700; }

.card { padding: 22px; }
.form-grid { display: grid; gap: 16px; }
.form-grid h2 { font-size: 22px; margin: 12px 0 0; }
.install { max-width: 760px; }
.admin main.wrap { padding-top: 24px; }
.admin .wrap { width: min(1180px, calc(100% - 32px)); margin: auto; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-top h1 { font-size: 36px; margin-bottom: 5px; }
.admin-top p { margin-top: 0; color: var(--vse-muted); }
.admin-actions { display: flex; align-items: center; gap: 12px; }
.admin-actions form { margin: 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-grid .card { padding: 22px; }
.admin-grid h2 { margin: 0 0 15px; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.stats span { color: var(--vse-muted); font-size: 13px; }
.stats strong { display: block; color: var(--vse-text); font-size: 26px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 600; }
.check input { width: auto !important; margin-top: 5px; }
.cols-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.editor { gap: 18px; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--vse-border); border-radius: var(--vse-radius); box-shadow: var(--vse-shadow); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--vse-border); vertical-align: top; }
th { background: #f0f4fa; font-size: 13px; color: var(--vse-muted); }
.row-actions { white-space: nowrap; }
.row-actions a { margin-right: 10px; }
.admin-login { width: min(480px,100%); margin: 8vh auto; }
.admin-login h1 { font-size: 34px; }
details.card { padding: 18px 22px; }
details summary { cursor: pointer; }
details form { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
details input { width: auto; }
.diagnostic-list { margin: 0; padding: 0; list-style: none; }
.diagnostic-list li { margin: 9px 0; }
.diagnostic-ok { color: var(--vse-success); font-weight: 800; }
.diagnostic-warn { color: #9a6700; font-weight: 800; }
.diagnostic-bad { color: var(--vse-danger); font-weight: 800; }

/* ---------- Footer: как у основного сайта ---------- */
.vse-footer-menu {
  margin-top: 18px;
  padding: 36px 48px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 60px;
  background: #fff;
  border: 1px solid var(--vse-border);
  border-radius: var(--vse-radius);
  box-shadow: var(--vse-shadow);
}
.vse-footer-col h4 { margin: 0 0 16px; color: #111; font-size: 19px; line-height: 1.25; font-weight: 900; }
.vse-footer-col a { display: block; margin: 0 0 10px; color: #51636d; font-size: 15px; text-decoration: none; }
.vse-footer-col a:hover { color: var(--vse-blue); text-decoration: none; }
.footer { margin-top: 24px; margin-bottom: 50px; color: #71818a; font-size: 14px; }
.footer_text { color: #71818a; }
.service-disclaimer { margin-top: 7px; color: #8a989f; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .vse-top-menu { gap: 17px; }
  .vse-top-menu a { font-size: 14px; }
  .logotype { min-width: 210px; }
  .vse-service-nav { display: none; }
}

@media (max-width: 900px) {
  .site-shell, .service-container, .vse-footer-menu, .footer {
    width: auto;
    max-width: none;
    margin-left: 12px;
    margin-right: 12px;
  }
  #header { margin-bottom: 28px; }
  #header_menu { min-height: 68px; gap: 16px; }
  .logotype { min-width: auto; }
  .logo_title { font-size: 18px; }
  .logo_icon_img { width: 36px; height: 36px; }
  .vse-top-menu { display: none; }
  .vse-service-nav { display: inline-flex; margin-left: auto; }

  .search-box { grid-template-columns: 1fr 1fr; padding: 22px; }
  .search-box .code-field, .search-box button { grid-column: 1 / -1; }
  .catalog-grid { grid-template-columns: repeat(3,1fr); }
  .error-code-grid { grid-template-columns: repeat(2,1fr); }
  .cards { grid-template-columns: repeat(2,1fr); }
  .admin-grid, .cols-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .vse-footer-menu { grid-template-columns: 1fr; gap: 24px; padding: 26px 24px; }
  .footer_text, .service-disclaimer { text-align: center; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .site-shell, .service-container, .vse-footer-menu, .footer { margin-left: 10px; margin-right: 10px; }
  .vse-service-nav { min-height: 34px; padding: 0 11px; font-size: 13px; }
  .hero, .catalog-head, .article-head { padding: 26px 22px; }
  h1, .article-head h1 { font-size: 29px; }
  h2 { font-size: 23px; }
  .search-box { grid-template-columns: 1fr; padding: 20px; }
  .search-box .code-field, .search-box button { grid-column: auto; }
  .search-box button { width: 100%; }
  .catalog-grid, .error-code-grid, .cards, .related-codes { grid-template-columns: 1fr; }
  .catalog-card, .error-code-card { min-height: auto; }
  article section, .content-card, .service-container > section:not(.hero):not(.catalog-head) { padding: 24px 22px; }
  .quick-answer { padding: 16px 17px; }
  .admin-grid, .cols-3 { grid-template-columns: 1fr; }
  .admin-top { align-items: flex-start; flex-direction: column; }
  .admin-actions { width: 100%; }
  details form { align-items: stretch; flex-direction: column; }
  details input, details button { width: 100%; }
}
