:root {
  --bg: #030608;
  --panel: #080d11;
  --panel-2: #0c1218;
  --line: rgba(255, 255, 255, .12);
  --soft-line: rgba(255, 255, 255, .07);
  --text: #f7f7f7;
  --muted: #a9adb4;
  --red: #ef1018;
  --red-2: #b5070d;
  --gold: #f5d386;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
  --radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(239,16,24,.74) rgba(7,11,15,.86);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
  background: rgba(7,11,15,.86);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff141f, #7c0b11);
  border: 2px solid rgba(7,11,15,.94);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ff3340, #b5070d); }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 18%, rgba(239,16,24,.10), transparent 28%),
    linear-gradient(135deg, #020406 0%, #060a0e 48%, #020406 100%);
  color: var(--text);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a, button, .feature-cards a, .panel, .dtc-row, .access-card, .premium-mini, .icon-only {
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, opacity .18s ease;
}
a:hover, button:hover { color: #fff; }
button:hover:not(:disabled), .feature-cards a:hover, .dtc-row:hover, .access-card:hover, .premium-mini:hover {
  transform: translateY(-2px);
  border-color: rgba(239,16,24,.65);
  box-shadow: 0 14px 34px rgba(239,16,24,.12);
}
button:disabled { opacity: .65; cursor: wait; }
.motordex-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 16px;
  background:
    radial-gradient(circle at center, rgba(239,16,24,.28), transparent 32%),
    linear-gradient(135deg, #020406 0%, #06090d 52%, #180204 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity .48s ease, visibility .48s ease;
}
.motordex-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.motordex-preloader img {
  width: min(150px, 34vw);
  filter: drop-shadow(0 0 18px rgba(239,16,24,.72)) drop-shadow(0 0 34px rgba(255,255,255,.18));
  animation: preloaderPulse 1.35s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.motordex-preloader span {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.preloader-glow {
  position: absolute;
  width: min(360px, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239,16,24,.26), rgba(239,16,24,.08) 38%, transparent 68%);
  box-shadow: 0 0 60px rgba(239,16,24,.24);
  animation: preloaderGlow 1.8s ease-in-out infinite;
}
@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: .86; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes preloaderGlow {
  0%, 100% { transform: scale(.88); opacity: .72; }
  50% { transform: scale(1.08); opacity: 1; }
}
.ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 36px;
}
.auth-shell {
  width: min(1780px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.auth-shell.register { grid-template-columns: .92fr 1.08fr; }
.auth-brand-card,
.auth-form-card,
.panel,
.search-panel,
.vehicle-result,
.torque-panel,
.diagram-layout,
.dtc-search,
.dtc-layout,
.ai-panel,
.ai-result,
.premium-page {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(12,18,24,.92), rgba(3,6,8,.94));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-brand-card {
  position: relative;
  overflow: hidden;
  padding: 62px 70px 0;
  min-height: 860px;
}
.auth-brand-card.slogan-panel {
  padding: 0;
  display: grid;
  place-items: stretch;
  min-height: 860px;
}
.auth-slogan {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  background: #03070a;
}
.auth-brand-card::after,
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(239,16,24,.18));
  pointer-events: none;
}
.auth-logo { width: 720px; height: 210px; object-fit: contain; object-position: center; margin-bottom: 34px; }
.auth-brand-card p { color: #d8d8d8; font-size: 23px; line-height: 1.55; max-width: 720px; }
.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px 22px;
  margin-top: 54px;
  text-align: center;
  text-transform: uppercase;
}
.auth-feature-grid span {
  border-right: 1px solid rgba(239,16,24,.45);
  color: #e9e9e9;
  font-size: 19px;
  line-height: 1.35;
}
.auth-feature-grid span:nth-child(3n) { border-right: 0; }
.auth-feature-grid b { display: block; color: #fff; }
.auth-car {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  width: 100%;
  height: 320px;
  object-fit: cover;
  opacity: .95;
}
.auth-form-card {
  padding: 72px 94px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-about-btn {
  align-self: flex-end;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: #f4f6f8;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 34px;
  padding: 10px 18px;
  text-transform: uppercase;
}
.auth-about-btn:hover {
  background: rgba(239,16,24,.15);
  border-color: rgba(239,16,24,.7);
}
.auth-mark { width: 210px; height: 150px; object-fit: contain; margin: 0 auto 22px; }
.auth-form-card h1 { margin: 0; text-align: center; font-size: 38px; }
.auth-form-card h1 span, .premium-hero span, .premium-includes span { color: var(--red); }
.auth-form-card > p { text-align: center; color: #cfd2d7; font-size: 18px; line-height: 1.45; margin: 14px auto 42px; max-width: 620px; }
.auth-icon-line { color: var(--red); font-size: 70px; text-align: center; line-height: 1; margin-bottom: 18px; }

.form-stack, .form-grid { display: grid; gap: 22px; }
.form-grid { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
label { display: grid; gap: 10px; color: #fff; font-size: 16px; }
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(6,9,13,.72);
  color: #fff;
  color-scheme: dark;
  padding: 17px 20px;
  outline: none;
}
select option { background: #0b1117; color: #fff; }
textarea { min-height: 145px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,16,24,.14); }
.native-select-hidden { display: none !important; }
.custom-select {
  position: relative;
  width: 100%;
}
.custom-select > button {
  position: relative;
  width: 100%;
  min-height: 59px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(6,9,13,.72);
  color: #fff;
  padding: 17px 48px 17px 20px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select > button:hover,
.custom-select-menu button:hover,
.quick-results button:hover {
  transform: none;
  box-shadow: none;
}
.custom-select > button::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #d9dde4;
  border-bottom: 2px solid #d9dde4;
  transform: translateY(-65%) rotate(45deg);
}
.custom-select.open > button {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,16,24,.14);
}
.custom-select.open > button::after {
  transform: translateY(-25%) rotate(225deg);
  border-color: var(--red);
}
.select-option-content {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.select-option-content span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-logo-option {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  opacity: .92;
  filter: invert(1) brightness(1.15) contrast(1.08);
}
.brand-select > button {
  padding-left: 18px;
}
.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 34;
  display: none;
  max-height: 310px;
  overflow: auto;
  border: 1px solid rgba(239,16,24,.35);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12,18,24,.99), rgba(5,8,12,.99));
  box-shadow: 0 24px 54px rgba(0,0,0,.56), 0 0 0 1px rgba(255,255,255,.04) inset;
  padding: 8px;
}
.custom-select.open .custom-select-menu {
  display: grid;
  gap: 4px;
}
.custom-select-menu button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #f8f8f8;
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
}
.brand-select .custom-select-menu button {
  min-height: 52px;
}
.custom-select-menu button:hover,
.custom-select-menu button.active {
  background: rgba(239,16,24,.16);
  color: #fff;
}
.custom-select-menu button:hover .brand-logo-option,
.custom-select-menu button.active .brand-logo-option,
.custom-select > button:hover .brand-logo-option {
  opacity: 1;
  filter: invert(1) brightness(1.35) contrast(1.15);
}
.form-row { display: flex; gap: 20px; align-items: center; }
.between { justify-content: space-between; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; color: #ddd; }
.check input { width: 22px; height: 22px; accent-color: var(--red); }
.primary-btn,
.ghost-btn,
.outline-btn {
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0;
  min-height: 52px;
}
.primary-btn {
  background: linear-gradient(180deg, #ff111b, #d60810);
  color: #fff;
  border-color: rgba(255,255,255,.05);
  padding: 0 28px;
}
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn.small { min-width: 190px; }
.primary-btn:disabled,
.ghost-btn:disabled,
.outline-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
}
.ghost-btn,
.outline-btn {
  background: rgba(8,12,16,.68);
  border-color: rgba(255,255,255,.18);
  color: #fff;
  padding: 0 26px;
}
.outline-btn { border-color: rgba(239,16,24,.65); color: var(--red); background: transparent; }
.link { display: inline-flex; align-items: center; justify-content: center; }
.block { width: 100%; }
.auth-separator { display: flex; align-items: center; gap: 22px; color: var(--muted); margin: 34px 0 24px; }
.auth-separator::before, .auth-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch { text-align: center; color: #c8c8c8; }
.auth-switch a, .form-row a { color: var(--red); }
.verify-card { width: min(660px, 100%); min-height: auto; }
.resend-form { margin-top: 14px; }
.resend-form .ghost-btn { width: 100%; }
.compact-auth { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 22px;
  border-right: 1px solid var(--line);
  background: rgba(3,7,10,.92);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: rgba(239,16,24,.65) rgba(255,255,255,.05);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(239,16,24,.65); border-radius: 999px; }
.side-logo { width: 150px; min-height: 104px; height: 104px; object-fit: contain; margin: 0 auto 18px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: #f2f2f2;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.sidebar nav a:hover {
  color: #fff;
  background: rgba(239,16,24,.10);
}
.sidebar nav a .ico { width: 25px; color: #fff; }
.sidebar nav a span { min-width: 0; }
.sidebar nav a.active {
  color: var(--red);
  background: linear-gradient(90deg, rgba(239,16,24,.58), rgba(239,16,24,.20));
  box-shadow: inset 0 0 0 1px rgba(239,16,24,.12);
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 0;
  bottom: 0;
  width: 7px;
  background: var(--red);
}
.sidebar nav a.active .ico { color: var(--red); }
.side-divider { height: 1px; background: var(--line); margin: 14px 0; }
.muted-nav a { color: #d7d7d7; }
.premium-mini {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(239,16,24,.7);
  border-radius: var(--radius);
  background: rgba(8,12,16,.75);
}
.premium-mini .ico { color: var(--red); width: 36px; height: 36px; }
.premium-mini small { color: #c8c8c8; line-height: 1.45; }
.premium-mini span {
  margin-top: 10px;
  justify-self: start;
  border-radius: 6px;
  background: linear-gradient(180deg, #ff111b, #d60810);
  padding: 10px 18px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.logout {
  color: var(--red);
  padding: 22px 4px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.app-main { margin-left: 260px; min-height: 100vh; padding: 86px 30px 36px; }
.topbar {
  position: fixed;
  left: 260px;
  right: 0;
  top: 0;
  height: 74px;
  border-bottom: 1px solid var(--line);
  background: rgba(3,6,8,.9);
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  z-index: 9;
  padding: 0 28px;
}
.topbar .top-logo { height: 60px; width: 300px; object-fit: contain; object-position: center; justify-self: center; }
.menu-btn { color: #fff; background: none; border: 0; font-size: 28px; cursor: pointer; }
.top-user { display: grid; grid-template-columns: auto auto; gap: 0 12px; align-items: center; color: #fff; }
.top-user .badge { grid-row: span 2; background: var(--red); border-radius: 999px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; }
.top-user small { color: var(--muted); }
.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}
.top-link { min-height: 42px; padding: 0 18px; }
.icon-only {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.icon-btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.notification-wrap,
.profile-wrap { position: relative; }
.notify-btn {
  border-right: 1px solid var(--line);
  border-radius: 0;
  width: 54px;
}
.notify-btn .badge {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.profile-button .avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  max-width: 46px;
  max-height: 46px;
}
.profile-button small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.avatar {
  width: 46px;
  height: 46px;
  max-width: 46px;
  max-height: 46px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(255,255,255,.22);
  background: #131920;
}
.avatar.initial {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(239,16,24,.95), rgba(80,6,10,.95));
}
.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  width: 290px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 11, 15, .98);
  box-shadow: var(--shadow);
  padding: 16px;
  display: none;
  z-index: 30;
}
.dropdown-panel.open { display: grid; gap: 12px; }
.dropdown-panel p,
.dropdown-panel a {
  margin: 0;
  color: #d8d8d8;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dropdown-panel p.unread {
  color: #fff;
  background: rgba(239,16,24,.08);
  border: 1px solid rgba(239,16,24,.28);
  border-radius: 8px;
  padding: 10px;
}
.dropdown-panel p span { display: grid; gap: 3px; }
.dropdown-panel p strong { font-size: 13px; }
.dropdown-panel p small { color: var(--muted); line-height: 1.35; }
.notification-empty { color: var(--muted); }
.profile-menu a { padding: 10px 0; border-bottom: 1px solid var(--soft-line); }
.profile-menu a:last-child { border-bottom: 0; color: var(--red); }

.alert { border: 1px solid var(--line); padding: 13px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.alert.danger { color: #ffd2d2; border-color: rgba(239,16,24,.65); background: rgba(239,16,24,.11); }
.alert.success { color: #d6ffe1; border-color: rgba(41,180,92,.55); background: rgba(41,180,92,.12); }
.alert.warning { color: #ffe7aa; border-color: rgba(245,211,134,.55); background: rgba(245,211,134,.1); }
.alert.floating { margin: 0 0 18px; }
.toast {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8,12,16,.96);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast.success { border-color: rgba(41,180,92,.55); color: #d6ffe1; }
.toast.warning { border-color: rgba(245,211,134,.55); color: #ffe7aa; }
.toast.danger { border-color: rgba(239,16,24,.65); color: #ffd2d2; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 54px 70px;
  background-image: linear-gradient(90deg, rgba(3,6,8,.78) 0%, rgba(3,6,8,.50) 45%, rgba(3,6,8,.14) 100%), url("../../images/slider.png");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.hero-logo { width: 620px; height: 140px; object-fit: contain; object-position: left center; margin-bottom: 18px; }
.hero h1 { margin: 0; font-size: 39px; line-height: 1.2; text-transform: uppercase; }
.hero h1 span { color: var(--red); }
.hero p { max-width: 520px; color: #d8d8d8; font-size: 18px; line-height: 1.45; }
.hero .ghost-btn { margin-left: 18px; }
.feature-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 20px; }
.feature-cards a {
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(8,12,16,.83));
  padding: 26px;
  display: grid;
  align-content: center;
  gap: 9px;
}
.feature-cards a::after {
  content: "";
  width: 48px;
  height: 2px;
  background: var(--red);
}
.feature-cards a .ico { color: var(--red); width: 44px; height: 44px; margin-bottom: 8px; }
.feature-cards b { text-transform: uppercase; font-size: 20px; }
.feature-cards span { color: #c7c7c7; line-height: 1.35; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr 1.45fr 1.25fr .95fr; gap: 16px; margin: 0 20px; align-items: stretch; }
.panel { padding: 20px; overflow: hidden; }
.panel h3 { margin: 0 0 16px; text-transform: uppercase; }
.dashboard-grid .panel h3 { font-size: 18px; line-height: 1.25; }
.panel .vehicle-result { display: block; border: 0; box-shadow: none; padding: 0; background: transparent; }
.panel .vehicle-photo, .panel .torque-panel, .panel .vehicle-specs .result-title-row button, .panel .vehicle-specs .spec-grid, .panel .obs { display: none; }
.panel .vehicle-specs h2 { font-size: 21px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-title-row h3 { margin: 0; }
.panel-title-row a { color: var(--red); font-size: 13px; font-weight: 800; }
.home-summary, .diagram-feature { position: relative; }
.summary-head { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; margin-bottom: 18px; }
.summary-head img { width: 92px; height: 58px; object-fit: cover; border-radius: 6px; background: rgba(255,255,255,.05); }
.summary-head h4, .diagram-feature h4 { margin: 0 0 6px; font-size: 20px; }
.summary-head p, .diagram-feature p { margin: 0; color: var(--muted); }
.mini-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin: 0 0 18px; }
.mini-specs dt, .mini-specs dd { border-top: 1px solid var(--soft-line); padding: 9px 0; margin: 0; }
.mini-specs dt { color: #d7d7d7; }
.mini-specs dd { text-align: right; color: #f5f5f5; }
.diagram-preview-img { width: 100%; height: 190px; object-fit: contain; background: #f4f4f4; border-radius: 6px; margin: 14px 0 16px; }
.locked-preview .preview-content { filter: blur(5px); opacity: .62; pointer-events: none; user-select: none; }
.preview-overlay {
  position: absolute;
  inset: 54px 16px 16px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #fff;
  background: rgba(3,6,8,.38);
  border-radius: var(--radius);
  font-weight: 800;
}
.preview-overlay .ico { color: var(--red); width: 34px; height: 34px; margin: 0 auto; }
.new-badge {
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}
.public-lock-panel {
  margin: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.public-lock-panel div { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: center; }
.public-lock-panel .ico { color: var(--red); width: 46px; height: 46px; grid-row: span 2; }
.public-lock-panel h2 { margin: 0; }
.public-lock-panel p { margin: 8px 0 0; color: #cfcfcf; }
.dtc-row { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 16px; border: 1px solid var(--soft-line); border-radius: var(--radius); margin-bottom: 10px; background: rgba(255,255,255,.03); }
.dtc-row b, .dtc-card h2 { color: var(--red); }

.page-head { margin: 20px 18px 20px; }
.page-head span { color: var(--muted); }
.page-head h1 { margin: 16px 0 8px; font-size: 34px; }
.page-head p { margin: 0; color: #d3d3d3; font-size: 18px; }
.search-panel, .dtc-search {
  margin: 0 18px 18px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 190px;
  gap: 28px;
  align-items: end;
}
.vehicle-quick-search {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  gap: 10px;
  color: #fff;
  font-size: 16px;
}
.vehicle-quick-search input {
  padding-left: 44px;
  background-image: linear-gradient(transparent, transparent);
}
.vehicle-quick-search::before {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 17px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--red);
  border-radius: 50%;
  pointer-events: none;
}
.vehicle-quick-search::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: 14px;
  width: 9px;
  height: 2px;
  background: var(--red);
  transform: rotate(45deg);
  pointer-events: none;
}
.quick-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 28;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 11, 15, .99);
  box-shadow: var(--shadow);
  padding: 8px;
  max-height: 360px;
  overflow: auto;
}
.quick-results button,
.quick-results .quick-empty {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #fff;
  text-align: left;
}
.quick-results button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  cursor: pointer;
}
.quick-results button:hover,
.quick-results button.active {
  background: rgba(239,16,24,.13);
}
.quick-results strong { color: #fff; }
.quick-results span { color: var(--muted); font-size: 13px; }
.quick-results em {
  color: var(--red);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.quick-results .quick-empty { color: var(--muted); }
.dtc-search { grid-template-columns: minmax(260px, 1fr) 160px auto; align-items: center; }
.dtc-search-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.dtc-advanced-box {
  margin: -4px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 20px 24px;
}
.dtc-advanced-box h2 { margin: 0; color: var(--red); }
.dtc-advanced-box p { margin: 6px 0 0; color: var(--muted); }
.dtc-list-head { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 18px; align-items: end; margin-bottom: 16px; }
.dtc-list-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255,255,255,.018);
}
.dtc-list-filter .ico { flex: 0 0 auto; color: var(--red); }
.dtc-list-filter input { border: 0; box-shadow: none; padding-left: 0; }
.dtc-list-filter input:focus { box-shadow: none; }
.dtc-list-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-height: 430px; overflow: auto; padding-right: 8px; }
.dtc-list-grid a {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 6px;
  background: rgba(255,255,255,.02);
}
.dtc-list-grid a:hover { border-color: rgba(239,16,24,.55); transform: translateY(-1px); }
.dtc-list-grid a[hidden] { display: none; }
.dtc-advanced-box b { color: var(--red); }
.dtc-advanced-box span { color: #d6d6d6; }

.vehicle-result {
  margin: 0 18px 18px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr);
  align-items: stretch;
  overflow: hidden;
}
.vehicle-media-column { min-height: 100%; border-right: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.vehicle-photo { height: 430px; background: radial-gradient(circle at center, rgba(255,255,255,.08), rgba(0,0,0,.18)); border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; align-self: start; }
.vehicle-photo img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.vehicle-timing-card { padding: 0 18px 22px; display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.vehicle-timing-card h3 { margin: 0 0 14px; text-align: center; font-size: 20px; }
.vehicle-timing-card .large-viewer { max-width: 100%; margin: 0; height: 100%; display: grid; grid-template-rows: auto 1fr; }
.vehicle-timing-card .viewer-toolbar { padding: 8px; }
.vehicle-timing-card .viewer-canvas,
.vehicle-timing-card .large-viewer .viewer-canvas { min-height: 420px; height: 100%; }
.vehicle-timing-card .large-viewer .viewer-canvas img { max-height: 400px; }
.vehicle-specs { padding: 24px 28px; }
.result-title-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.result-title-row h2 { margin: 0; font-size: 32px; }
.spec-sections { display: grid; gap: 16px; margin-top: 18px; }
.spec-section { border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 15px 18px 10px; background: rgba(255,255,255,.025); }
.spec-section h3 { margin: 0 0 10px; color: #ff2633; font-size: 21px; font-weight: 850; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 6px; }
.spec-grid div { display: grid; grid-template-columns: minmax(150px, .9fr) 1fr; gap: 12px; border-bottom: 1px solid var(--soft-line); padding: 11px 0; }
.spec-grid span { color: #fff; font-weight: 800; }
.spec-grid strong { color: #d9d9d9; font-weight: 500; }
.obs { border-top: 1px solid var(--line); padding-top: 16px; color: #d5d5d5; }
.torque-panel {
  margin: 0 18px 18px;
  padding: 26px 34px;
  display: grid;
  grid-template-columns: 1.3fr .8fr;
  gap: 30px;
}
.torque-steps { display: flex; gap: 18px; margin-top: 34px; align-items: stretch; flex-wrap: wrap; }
.torque-steps article { flex: 1 1 150px; min-width: 145px; min-height: 150px; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 8px; align-content: center; position: relative; background: rgba(255,255,255,.018); }
.torque-steps span { background: var(--red); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; font-weight: 800; }
.torque-steps strong { font-size: 25px; }
.torque-steps small { color: var(--muted); font-size: 15px; }
.torque-steps .step-arrow { flex: 0 0 auto; align-self: center; width: auto; height: auto; background: transparent; color: #fff; border-radius: 0; font-size: 42px; font-weight: 300; line-height: 1; margin: 0 -10px; }
.head-order-box { border-left: 1px solid var(--line); padding-left: 30px; text-align: center; }
.timing-panel { margin: 0 18px 18px; padding: 26px 34px; }
.timing-box { text-align: center; }
.technical-viewer { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.018); overflow: hidden; }
.viewer-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--soft-line); background: rgba(0,0,0,.22); }
.viewer-toolbar button { min-height: 34px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.035); color: #fff; font-weight: 800; cursor: pointer; }
.viewer-toolbar button:hover { border-color: var(--red); color: var(--red); }
.viewer-canvas { min-height: 280px; display: grid; place-items: center; overflow: auto; background: rgba(0,0,0,.22); }
.viewer-canvas img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; transition: transform .15s ease; }
.compact-viewer .viewer-canvas { min-height: 230px; }
.compact-viewer .viewer-canvas img { max-height: 245px; }
.large-viewer { max-width: 980px; margin: 0 auto; }
.large-viewer .viewer-canvas { min-height: 560px; }
.large-viewer .viewer-canvas img { max-height: 540px; }
.technical-viewer:fullscreen { width: 100vw; height: 100vh; border-radius: 0; background: #05080c; display: grid; grid-template-rows: auto 1fr; }
.technical-viewer:fullscreen .viewer-canvas { min-height: 0; height: 100%; }
.technical-viewer:fullscreen .viewer-canvas img { max-width: none; max-height: none; }
.technical-viewer.fullscreen-fallback { outline: 2px solid var(--red); }
.empty-state { min-height: 150px; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; }
.empty-state.tall { min-height: 560px; }

.diagram-layout { margin: 0 18px; padding: 0; display: grid; grid-template-columns: 370px 1fr; gap: 14px; background: transparent; border: 0; box-shadow: none; }
.vehicle-side-card, .diagram-viewer { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96)); padding: 22px; }
.vehicle-side-card h2 { margin: 0 0 8px; }
.vehicle-side-card p { color: var(--muted); }
.vehicle-side-card img { height: 190px; width: 100%; object-fit: cover; border-radius: var(--radius); }
.components { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.components div { padding: 12px 0; border-bottom: 1px solid var(--soft-line); display: grid; }
.components span { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tabs { display: flex; gap: 30px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs b, .diagram-tabs > button.active { color: var(--red); border-bottom: 4px solid var(--red); padding: 0 0 16px; }
.tabs span { padding-bottom: 16px; }
.diagram-tabs button { appearance: none; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 800; cursor: pointer; padding: 0 0 16px; }
.diagram-tabs button:hover { color: var(--red); }
.system-menu { position: relative; padding-bottom: 16px; }
.system-menu > button { padding-bottom: 0; }
.system-menu-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7,11,15,.98);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 20;
}
.system-menu:hover .system-menu-options,
.system-menu:focus-within .system-menu-options { display: grid; gap: 6px; }
.system-menu-options button { text-align: left; padding: 10px 12px; border-radius: 6px; }
.system-menu-options button:hover { background: rgba(239,16,24,.12); }
.diagram-viewer-box .viewer-canvas { min-height: 620px; background: #fff; }
.main-diagram { width: 100%; height: auto; max-height: 600px; object-fit: contain; background: #fff; }
.thumb-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 18px; overflow-x: auto; padding-top: 24px; }
.thumb-strip button { border: 2px solid transparent; background: #fff; border-radius: var(--radius); padding: 0; cursor: pointer; }
.thumb-strip button:hover, .thumb-strip button.active { border-color: var(--red); }
.thumb-strip img { height: 90px; width: 100%; object-fit: cover; }

.dtc-layout { margin: 0 18px; display: grid; grid-template-columns: 420px 1fr; gap: 22px; border: 0; background: transparent; box-shadow: none; }
.dtc-card, .dtc-detail { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96)); padding: 30px; }
.dtc-card h2 { font-size: 48px; margin: 0 0 20px; }
.dtc-card p { font-size: 25px; line-height: 1.25; }
.dtc-card dl { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; gap: 14px; }
.dtc-card dt { color: var(--muted); }
.dtc-card dd { margin: 0; }
.dtc-card > img { opacity: .45; margin: 40px auto 0; width: 260px; }
.dtc-image {
  margin: 28px 0 0;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.025);
}
.dtc-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  padding: 18px;
  margin: 0;
}
.dtc-image figcaption {
  border-top: 1px solid var(--soft-line);
  padding: 11px 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.dtc-tabs { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.dtc-tabs button { appearance: none; border: 0; border-bottom: 4px solid transparent; background: transparent; color: #fff; padding: 8px 10px 16px; font: inherit; font-weight: 800; cursor: pointer; border-radius: 6px 6px 0 0; transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; }
.dtc-tabs button:hover { color: var(--red); border-color: rgba(239,16,24,.45); background: rgba(239,16,24,.1); transform: translateY(-1px); }
.dtc-tabs button.active,
.dtc-tabs button[aria-selected="true"] { color: var(--red); border-color: var(--red); background: rgba(239,16,24,.08); }
.dtc-tab-panel { min-height: 240px; }
.dtc-detail p { color: #d7d7d7; line-height: 1.6; }
.dtc-detail h3 { color: #fff; margin-top: 0; font-size: 25px; }
.dtc-detail h3 .ico,
.ai-result h2 .ico { color: var(--red); margin-right: 10px; vertical-align: -5px; }
.dtc-detail li { margin: 9px 0; color: #d6d6d6; }
.dtc-detail li::marker { color: var(--red); }
.missing-dtc-card h2 { font-size: 42px; }
.missing-dtc-form { display: grid; gap: 18px; max-width: 760px; }
.missing-dtc-form label { display: grid; gap: 9px; color: #fff; font-weight: 800; }
.missing-dtc-form input,
.missing-dtc-form textarea { background: rgba(255,255,255,.025); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.missing-dtc-form input:hover,
.missing-dtc-form textarea:hover { border-color: rgba(239,16,24,.55); background: rgba(255,255,255,.04); }
.missing-dtc-form button { width: fit-content; }
.missing-dtc-form button:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(239,16,24,.22); }
.report-page { margin: 0 18px; display: grid; grid-template-columns: minmax(360px, .85fr) 1.15fr; gap: 22px; }
.report-form,
.report-list { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96)); padding: 28px; }
.report-form { display: grid; gap: 18px; align-content: start; }
.report-form label { display: grid; gap: 9px; color: #fff; font-weight: 800; }
.report-form textarea { min-height: 210px; }
.report-form select:hover,
.report-form textarea:hover { border-color: rgba(239,16,24,.55); background: rgba(255,255,255,.04); }
.report-form button { width: fit-content; }
.report-list h2 { margin-top: 0; color: var(--red); }
.report-item { display: grid; grid-template-columns: 1fr auto; gap: 18px; border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 18px; margin-top: 14px; background: rgba(255,255,255,.02); }
.report-item h3 { margin: 10px 0 8px; }
.report-item p { color: #d8d8d8; margin: 0; line-height: 1.5; }
.report-item time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.report-status { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; text-transform: uppercase; border: 1px solid var(--line); }
.report-status.pendiente { color: #ffe7aa; border-color: rgba(245,211,134,.55); background: rgba(245,211,134,.1); }
.report-status.revisado { color: #d5e8ff; border-color: rgba(90,158,255,.55); background: rgba(90,158,255,.1); }
.report-status.resuelto { color: #d6ffe1; border-color: rgba(41,180,92,.55); background: rgba(41,180,92,.12); }
.report-response {
  margin-top: 14px;
  border: 1px solid rgba(41,180,92,.38);
  border-radius: 8px;
  background: rgba(41,180,92,.08);
  padding: 13px 14px;
}
.report-response b { color: #d6ffe1; display: block; margin-bottom: 6px; }
.report-response small { color: #a9cbb2; display: block; margin-top: 8px; }

.admin-page {
  margin: 0 18px;
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(520px, 1.05fr);
  gap: 20px;
  align-items: start;
}
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 24px;
}
.admin-card h2 { margin: 0; color: var(--red); }
.admin-notification-card { grid-column: 1 / -1; }
.admin-list { display: grid; gap: 12px; margin-top: 14px; }
.admin-user-row,
.admin-report-row {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  padding: 14px;
}
.admin-user-row { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(300px, auto); gap: 14px; align-items: start; }
.admin-user-row.is-banned { border-color: rgba(239,16,24,.5); background: rgba(239,16,24,.07); }
.admin-user-row div,
.admin-report-head { display: grid; gap: 5px; }
.admin-user-row small,
.admin-report-head small { color: var(--muted); }
.admin-user-row em { color: #ffc4c4; font-style: normal; font-size: 13px; }
.admin-user-flags,
.admin-user-ban,
.admin-user-delete { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-user-flags { grid-column: 2; grid-row: 1; }
.admin-user-ban { grid-column: 1 / -1; justify-content: flex-start; }
.admin-user-delete { grid-column: 1 / -1; justify-content: flex-start; }
.admin-user-ban input { max-width: 360px; min-height: 42px; padding: 10px 12px; }
.admin-user-row label,
.admin-response-form label {
  display: grid;
  gap: 8px;
  color: #fff;
  font-weight: 800;
}
.admin-user-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-report-row p { color: #d8d8d8; line-height: 1.5; }
.admin-response-form { display: grid; gap: 14px; margin-top: 14px; }
.admin-response-form textarea { min-height: 120px; }
.admin-response-form button { width: fit-content; }
.danger-outline { border-color: rgba(239,16,24,.85); color: #ff6b72; }
.admin-updates-card { grid-column: 1 / -1; }
.admin-updates-list { display: grid; gap: 10px; margin-top: 18px; }
.admin-updates-list article { border: 1px solid var(--soft-line); border-radius: 8px; padding: 14px; background: rgba(255,255,255,.02); }
.admin-update-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.admin-update-head b { min-width: 0; }
.admin-update-head form { flex: 0 0 auto; }
.admin-update-head button { min-height: 38px; padding: 0 16px; }
.admin-updates-list p { color: #d8d8d8; line-height: 1.5; }
.admin-updates-list small { color: var(--muted); }

.ai-panel { margin: 0 18px 0; padding: 28px; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.ai-panel textarea { padding-right: 104px; }
.ai-before-query {
  grid-column: 1 / -1;
  border: 1px solid rgba(239,16,24,.28);
  border-radius: var(--radius);
  background: rgba(239,16,24,.05);
  padding: 16px 18px;
}
.ai-before-query h3 {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 15px;
}
.ai-before-query ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: #dfe2e7;
  line-height: 1.45;
}
.send-square {
  position: absolute;
  right: 42px;
  bottom: 30px;
  width: 64px;
  min-width: 0;
  height: 52px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ff111b, #d60810);
  border-color: rgba(255,255,255,.05);
  color: #fff;
}
.ai-result { margin: 18px; padding: 28px; border-top: 0; }
.ai-result h2 { margin-top: 0; }
.ai-answer-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: rgba(0,0,0,.18); display: grid; gap: 18px; }
.ai-diagnostic-card {
  gap: 0;
  background:
    linear-gradient(145deg, rgba(12,18,24,.88), rgba(3,6,8,.96)),
    rgba(0,0,0,.18);
}
.ai-answer-card h3 { color: var(--red); }
.ai-chat-head { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.ai-chat-head > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 900; }
.ai-chat-head h3 { margin: 0 0 8px; font-size: 22px; }
.ai-answer-card p { line-height: 1.62; margin: 0; max-width: 1100px; }
.ai-copy {
  display: grid;
  gap: 10px;
  max-width: 1120px;
}
.ai-answer-card ul, .ai-answer-card ol { margin: 0; padding-left: 22px; }
.ai-answer-card li { margin: 8px 0; line-height: 1.45; }
.ai-diagnostic-card .ai-chat-head,
.ai-vehicle,
.ai-primary,
.ai-solution,
.ai-safety,
.ai-videos,
.ai-sources {
  padding: 18px 0;
  border-bottom: 1px solid rgba(239,16,24,.28);
}
.ai-diagnostic-card .ai-chat-head { padding-top: 0; }
.ai-vehicle {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ai-vehicle b {
  color: var(--red);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .04em;
}
.ai-vehicle span {
  color: #fff;
  font-weight: 800;
}
.ai-primary h3,
.ai-columns h3,
.ai-solution h3,
.ai-safety h3,
.ai-videos h3,
.ai-sources h3 {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: .02em;
}
.ai-primary h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}
.ai-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-bottom: 1px solid rgba(239,16,24,.28); padding: 18px 0; margin: 0; }
.ai-columns > div + div {
  border-left: 1px solid rgba(239,16,24,.28);
  padding-left: 24px;
}
.ai-solution ol { display: grid; gap: 8px; }
.ai-videos div {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}
.ai-video-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.035);
}
.ai-video-card iframe,
.ai-video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  background: #05080c;
}
.ai-video-card a {
  color: #fff;
  text-decoration: none;
}
.ai-video-card:hover { border-color: rgba(239,16,24,.65); }
.ai-video-card b { color: var(--red); display: block; margin-bottom: 4px; }
.ai-video-card small {
  color: #dfe2e7;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-sources { margin-top: 0; }
.ai-sources div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.ai-sources a { color: #f5f5f5; text-decoration: none; font-weight: 800; }
.ai-sources a:hover { color: var(--red); }
.ai-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.2;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-source-chip small {
  color: var(--red);
  font-size: 11px;
  text-transform: uppercase;
}
.ai-signature {
  justify-self: end;
  margin-top: 18px !important;
  color: #fff;
  font-weight: 900;
  letter-spacing: .03em;
}
.dtc-count-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: #dfe3e8;
  font-size: 12px;
  font-weight: 800;
  padding: 0 12px;
  white-space: nowrap;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.dtc-count-pill.is-hidden {
  opacity: 0;
  transform: translateY(-3px);
  visibility: hidden;
  pointer-events: none;
}

.banned-panel { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 24px; }
.banned-panel > div { width: min(680px, 100%); border: 1px solid rgba(239,16,24,.65); border-radius: var(--radius); background: rgba(239,16,24,.08); padding: 34px; text-align: center; display: grid; gap: 16px; }
.banned-panel .ico { width: 56px; height: 56px; color: var(--red); margin: 0 auto; }
.banned-panel h1 { margin: 0; }
.banned-panel p { color: #f0dada; margin: 0; }
.banned-panel strong { color: #fff; }

.favorite-btn .ico { color: var(--red); }
.favorite-btn.active {
  border-color: rgba(239,16,24,.75);
  color: #fff;
  background: rgba(239,16,24,.14);
}
.favorite-btn.active .ico { fill: rgba(239,16,24,.85); }

.list-page {
  margin: 0 18px;
  display: grid;
  gap: 14px;
}
.access-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 18px;
  display: grid;
  grid-template-columns: 122px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
}
.access-card img {
  width: 122px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255,255,255,.05);
}
.access-card small { color: var(--red); font-weight: 800; text-transform: uppercase; }
.access-card h3 { margin: 4px 0; }
.access-card p { margin: 0; color: var(--muted); }

.app-footer {
  margin: 20px 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}
.app-footer a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.app-footer a:hover { color: #fff; transform: translateY(-2px); }
.app-footer .ico { width: 36px; height: 36px; color: #fff; }
.app-footer b { display: block; text-transform: uppercase; }
.app-footer small, .app-footer p { color: var(--muted); }
.app-footer p { grid-column: 1 / -1; justify-self: end; margin: 0; white-space: normal; }
.app-footer p a { display: inline; color: #fff; font-weight: 800; }

.public-info-page {
  min-height: 100vh;
  padding: 34px;
  background: radial-gradient(circle at 80% 10%, rgba(239,16,24,.14), transparent 34%), var(--bg);
}
.public-info-page > .outline-btn { margin-bottom: 18px; width: fit-content; }
.public-info-page section {
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 38px;
}
.public-info-page img { width: 250px; height: 80px; object-fit: contain; object-position: left center; }
.public-info-page h1 { font-size: 38px; margin: 20px 0 14px; }
.public-info-page h2 {
  color: var(--red);
  font-size: 21px;
  margin: 30px 0 8px;
}
.public-info-page p { color: #ddd; line-height: 1.7; font-size: 17px; }
.updates-list-page { display: grid; gap: 14px; margin-top: 24px; }
.updates-list-page article {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  padding: 18px;
}
.updates-list-page h2 { margin: 8px 0; color: var(--red); }
.updates-list-page time,
.updates-list-page small { color: var(--muted); }

.premium-page { margin: 0 18px; padding: 0; display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; border: 0; box-shadow: none; background: transparent; }
.premium-hero, .premium-includes {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(8,12,16,.95), rgba(8,12,16,.72)), url("../../images/slider1.png");
  background-size: cover;
  background-position: center;
  padding: 48px;
}
.premium-hero h2 { font-size: 34px; max-width: 470px; }
.premium-hero p { max-width: 520px; color: #ddd; font-size: 18px; line-height: 1.55; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 34px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,10,14,.8); padding: 28px; display: grid; gap: 18px; }
.plan-card.featured { border-color: var(--red); }
.plan-card.disabled {
  opacity: .72;
  border-color: rgba(255,255,255,.12);
  filter: grayscale(.25);
}
.plan-card.disabled .primary-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}
.plan-card h3 { font-size: 28px; margin: 0; }
.plan-card strong { color: #fff2d7; font-size: 43px; }
.plan-card li { margin: 12px 0; color: #ddd; }
.plan-card li::marker { color: var(--red); }
.maintenance-notice {
  margin-top: 22px;
  max-width: 650px;
  border: 1px solid rgba(239,16,24,.42);
  border-radius: var(--radius);
  background: rgba(239,16,24,.08);
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.maintenance-notice .ico { color: var(--red); width: 28px; height: 28px; }
.maintenance-notice b { display: block; color: #fff; margin-bottom: 4px; }
.maintenance-notice span { color: #e1d8d8; line-height: 1.45; }
.premium-active-card {
  margin-top: 30px;
  border: 1px solid rgba(239,16,24,.65);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(239,16,24,.12), rgba(7,10,14,.82));
  padding: 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  max-width: 660px;
}
.premium-active-card .ico { color: var(--red); width: 42px; height: 42px; }
.premium-active-card b { display: block; color: #fff; font-size: 24px; margin-bottom: 8px; }
.premium-active-card strong { display: block; color: #fff2d7; font-size: 21px; margin-bottom: 8px; }
.premium-active-card small { color: #d6d6d6; line-height: 1.45; }
.premium-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.premium-includes { background-image: linear-gradient(145deg, rgba(12,18,24,.96), rgba(5,8,12,.96)); }
.premium-includes div { padding: 24px 0; border-bottom: 1px solid var(--line); }
.premium-includes b { font-size: 20px; }
.premium-includes p { color: #c7c7c7; line-height: 1.5; margin-bottom: 0; }
.profile-page {
  margin: 0 18px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}
.profile-card,
.profile-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,18,24,.95), rgba(5,8,12,.96));
  padding: 30px;
}
.profile-card {
  text-align: center;
  align-self: start;
}
.profile-card .avatar {
  width: 150px;
  height: 150px;
  max-width: 150px;
  max-height: 150px;
  margin: 0 auto 18px;
  font-size: 54px;
}
.profile-card h2 { margin: 0 0 8px; }
.profile-card p { color: var(--muted); margin: 0 0 16px; }
.premium-status {
  display: inline-block;
  border: 1px solid rgba(239,16,24,.6);
  color: var(--red);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}
.premium-expiry {
  display: block;
  margin-top: 10px;
  color: #cfd2d7;
  line-height: 1.4;
}
.profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile-form button,
.profile-form label:first-child { grid-column: span 2; }
.file-input {
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.file-input .ico { color: var(--red); }
.file-input input { border: 0; padding: 0; background: transparent; }

@media (max-width: 1180px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding-left: 16px; padding-right: 16px; }
  .topbar { left: 0; }
  .auth-shell, .auth-shell.register, .premium-page, .vehicle-result, .torque-panel, .diagram-layout, .dtc-layout, .dashboard-grid, .profile-page, .report-page, .admin-page { grid-template-columns: 1fr; }
  .vehicle-media-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .app-footer { grid-template-columns: 1fr 1fr; }
  .app-footer p { grid-column: 1 / -1; white-space: normal; }
  .access-card { grid-template-columns: 110px 1fr auto; }
  .feature-cards, .plans, .search-panel { grid-template-columns: 1fr 1fr; }
  .topbar { grid-template-columns: 56px 1fr auto; }
  .auth-body { align-items: start; }
  .auth-brand-card.slogan-panel { min-height: 520px; }
  .auth-form-card { padding: 48px 44px; }
}

@media (max-width: 720px) {
  .auth-body { padding: 12px; display: block; }
  .auth-shell, .auth-shell.register { gap: 12px; width: 100%; }
  .auth-brand-card { display: none; }
  .auth-brand-card.slogan-panel {
    display: block;
    min-height: 310px;
    height: 310px;
    border-radius: var(--radius);
  }
  .auth-slogan { object-fit: cover; object-position: top center; }
  .auth-form-card { padding: 28px 18px; border-radius: var(--radius); }
  .auth-mark { width: 112px; height: 92px; margin-bottom: 12px; }
  .auth-form-card h1 { font-size: 29px; line-height: 1.15; }
  .auth-form-card > p { font-size: 15px; margin: 10px auto 24px; }
  input, select, textarea { padding: 15px 16px; }
  .form-row.between { display: grid; gap: 12px; }
  .primary-btn, .ghost-btn, .outline-btn { width: 100%; min-height: 50px; }
  .dtc-search-actions { display: grid; grid-template-columns: 1fr; }
  .dtc-count-pill { justify-self: end; min-height: 32px; }
  .auth-separator { margin: 22px 0 16px; }
  .form-grid, .feature-cards, .plans, .search-panel, .dtc-search, .ai-panel, .spec-grid, .torque-steps, .ai-columns, .profile-form { grid-template-columns: 1fr; }
  .diagram-layout, .dtc-layout { grid-template-columns: minmax(0, 1fr); }
  .diagram-layout > *, .dtc-layout > *, .vehicle-side-card, .diagram-viewer, .dtc-card, .dtc-detail { min-width: 0; max-width: 100%; }
  .span-2 { grid-column: auto; }
  .app-main { padding: 78px 10px 24px; }
  .topbar { height: 66px; padding: 0 12px; grid-template-columns: 46px 1fr auto; }
  .topbar .top-logo { width: 170px; height: 48px; }
  .top-actions { gap: 8px; }
  .notify-btn { width: 42px; border-right: 0; }
  .avatar, .profile-button .avatar { width: 40px; height: 40px; max-width: 40px; max-height: 40px; flex-basis: 40px; }
  .dropdown-panel { position: fixed; right: 10px; top: 68px; width: min(320px, calc(100vw - 20px)); }
  .sidebar { width: min(300px, 86vw); padding: 18px 16px; }
  .side-logo { width: 118px; min-height: 82px; height: 82px; }
  .hero { padding: 28px 18px; min-height: 460px; margin: 0; background-position: 62% center; }
  .hero-logo { width: 100%; height: 96px; object-position: left center; }
  .hero h1 { font-size: 29px; }
  .hero p { font-size: 16px; }
  .hero .ghost-btn { margin: 12px 0 0; }
  .feature-cards, .dashboard-grid, .public-lock-panel, .page-head, .search-panel, .vehicle-result, .torque-panel, .timing-panel, .diagram-layout, .dtc-search, .dtc-advanced-box, .dtc-layout, .ai-panel, .ai-result, .premium-page, .profile-page, .report-page, .admin-page, .app-footer, .list-page {
    margin-left: 0;
    margin-right: 0;
  }
  .feature-cards a { min-height: 126px; padding: 22px; }
  .page-head h1 { font-size: 29px; }
  .page-head p { font-size: 16px; }
  .top-actions .ghost-btn, .top-actions .primary-btn { display: none; }
  .profile-button span, .profile-button > .ico { display: none; }
  .vehicle-photo { height: auto; min-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .vehicle-specs, .dtc-card, .dtc-detail, .premium-hero, .premium-includes, .profile-card, .profile-form, .report-form, .report-list, .admin-card { padding: 20px; }
  .report-item { grid-template-columns: 1fr; }
  .admin-user-row { grid-template-columns: 1fr; }
  .admin-user-flags,
  .admin-user-ban,
  .admin-user-delete { grid-column: auto; grid-row: auto; justify-content: flex-start; }
  .result-title-row { display: grid; }
  .result-title-row h2 { font-size: 26px; }
  .spec-section { padding: 14px; }
  .spec-section h3 { font-size: 19px; }
  .spec-grid div { grid-template-columns: 1fr; gap: 5px; }
  .torque-panel, .timing-panel { padding: 20px; }
  .head-order-box { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .viewer-toolbar { justify-content: center; flex-wrap: wrap; }
  .large-viewer .viewer-canvas { min-height: 360px; }
  .large-viewer .viewer-canvas img { max-height: 340px; }
  .diagram-viewer-box .viewer-canvas { min-height: 360px; }
  .diagram-layout { gap: 12px; }
  .main-diagram { max-height: 360px; }
  .tabs { gap: 16px; overflow-x: auto; white-space: nowrap; }
  .tabs button { margin-left: 0; }
  .thumb-strip { grid-auto-columns: 118px; }
  .dtc-card h2 { font-size: 40px; }
  .dtc-card p { font-size: 21px; }
  .dtc-card dl { grid-template-columns: 1fr; }
  .dtc-list-head,
  .dtc-list-grid { grid-template-columns: 1fr; }
  .ai-panel { padding: 20px; }
  .ai-panel textarea { padding-right: 16px; min-height: 170px; }
  .send-square { position: static; width: 100%; margin-top: 12px; }
  .ai-columns > div + div {
    border-left: 0;
    border-top: 1px solid rgba(239,16,24,.28);
    padding-left: 0;
    padding-top: 18px;
  }
  .ai-chat-head { grid-template-columns: 1fr; }
  .ai-chat-head > span { display: none; }
  .ai-signature { justify-self: start; }
  .plans { gap: 16px; }
  .premium-active-card { grid-template-columns: 1fr; padding: 20px; }
  .premium-actions { display: grid; }
  .plan-card strong { font-size: 34px; }
  .public-lock-panel { display: grid; }
  .public-lock-panel div { grid-template-columns: 1fr; }
  .profile-form button,
  .profile-form label:first-child { grid-column: auto; }
  .profile-card .avatar { width: 118px; height: 118px; max-width: 118px; max-height: 118px; }
  .summary-head, .mini-specs, .access-card, .app-footer { grid-template-columns: 1fr; }
  .mini-specs dd { text-align: left; }
  .access-card img { width: 100%; height: 170px; }
  .app-footer { padding: 18px; }
  .app-footer p { white-space: normal; }
}

@media (max-width: 420px) {
  .topbar .top-logo { width: 138px; }
  .hero { min-height: 500px; }
  .hero h1 { font-size: 26px; }
  .auth-brand-card.slogan-panel { height: 280px; min-height: 280px; }
  .auth-form-card { padding: 24px 14px; }
}
