* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: #222;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: #111827;
  color: #fff;
  padding: 14px 0;
  margin-bottom: 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a,
.user-badge {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.hero,
.card,
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.hero {
  margin-bottom: 24px;
  text-align: center;
}

.hero h1 {
  margin-top: 0;
  font-size: 38px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.grid-2,
.card-grid,
.ecu-layout {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ecu-layout {
  grid-template-columns: 1.1fr .9fr;
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease;
}

.card-link:hover {
  transform: translateY(-3px);
}

.logo-box,
.photo-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eef1f5;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.logo-box img,
.photo-box img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.page-head {
  margin-bottom: 18px;
}

.page-head h1 {
  margin-bottom: 6px;
}

.login-wrap {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.login-card {
  width: min(420px, 100%);
}

.form {
  display: grid;
  gap: 10px;
}

.form input {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.alert {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.muted {
  color: #666;
  font-size: 14px;
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.option-item {
  display: block;
  padding: 14px;
  border-radius: 10px;
  background: #eef2ff;
  font-weight: 600;
  text-decoration: none;
  color: #222;
}

.option-item.locked {
  background: #f3f4f6;
  color: #777;
}

.pinout-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.schematico-container {
  max-width: 1100px;
}

.pinout-img {
  width: 100%;
  height: auto;
  display: block;
}

.pin-label {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 18px;
  padding: 1px 3px;
  text-align: center;
  font-size: clamp(13px, 1.8vw, 28px);
  font-weight: 700;
  line-height: 1;
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
}

.pinout-text {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 3px 6px;
  text-align: center;
  font-size: clamp(12px, 1.3vw, 20px);
  font-weight: 700;
  border-radius: 8px;
  z-index: 3;
  pointer-events: none;
  white-space: normal;
  line-height: 1.1;
  max-width: 22%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.watermark-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: space-around;
  justify-items: center;
  pointer-events: none;
  z-index: 2;
}

.watermark-grid span {
  transform: rotate(-24deg);
  opacity: 0.2;
  font-size: clamp(14px, 2vw, 28px);
  font-weight: 900;
  color: #000;
  white-space: nowrap;
  user-select: none;
}

.files-list {
  display: grid;
  gap: 14px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.file-item h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
}

.file-item p {
  margin: 0;
  color: #555;
}

.file-actions {
  flex-shrink: 0;
}

.back-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.back-links a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 600;
}

@media (max-width: 768px) {
  .ecu-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 30px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .pin-label {
    min-width: 14px;
    padding: 0 2px;
    font-size: clamp(10px, 2.8vw, 18px);
    border-radius: 3px;
  }

  .pinout-text {
    padding: 2px 4px;
    font-size: clamp(9px, 2.3vw, 14px);
    max-width: 18%;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1000px, 96%);
  }

  .card,
  .hero,
  .login-card {
    padding: 16px;
  }

  .pin-label {
    min-width: 12px;
    padding: 0 1px;
    font-size: clamp(9px, 2.6vw, 14px);
  }

  .pinout-text {
    padding: 1px 3px;
    font-size: clamp(8px, 1.9vw, 12px);
    max-width: 16%;
    line-height: 1.05;
  }

  .watermark-grid span {
    font-size: clamp(10px, 1.5vw, 16px);
  }
}



.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.brand-name {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  margin-bottom: 28px;
}

.landing-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-size: 14px;
}

.landing-copy h1 {
  margin: 0 0 12px 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.landing-lead {
  font-size: 18px;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 22px;
}

.landing-visual img,
.feature-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.landing-section {
  margin-bottom: 30px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 8px 0;
  font-size: 30px;
}

.section-head p {
  margin: 0;
  color: #555;
}

.feature-grid,
.pricing-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card,
.pricing-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.feature-card h3,
.pricing-card h3 {
  margin: 14px 0 8px 0;
}

.featured {
  border: 2px solid #2563eb;
}

.pricing-subtitle {
  color: #4b5563;
  margin: 0 0 12px 0;
}

.pricing-list {
  margin: 0;
  padding-left: 18px;
}

.pricing-list li {
  margin-bottom: 8px;
}

.cta-section {
  text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.auth-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.auth-links a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.success-box {
  background: #dcfce7;
  color: #166534;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.recovery-box {
  background: #eff6ff;
  color: #1e3a8a;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.form select {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }
}