/* ERATOOLS V6.1 - Legacy Translation / Final Language Cleanup */

/* Kolejne zmniejszenie i ujednolicenie nagłówków legacy */
h1,
.admin-page h1,
.customer-card h1,
.page-title,
.section-title {
  font-size: clamp(1.38rem, 2vw, 2rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.018em !important;
}

h2,
.admin-page h2,
.customer-card h2,
.section__head h2 {
  font-size: clamp(1.08rem, 1.45vw, 1.42rem) !important;
  line-height: 1.16 !important;
}

h3,
.admin-page h3,
.customer-card h3 {
  font-size: clamp(1rem, 1.18vw, 1.16rem) !important;
  line-height: 1.2 !important;
}

h4 { font-size: 1rem !important; }
h5 { font-size: .94rem !important; }
h6 { font-size: .88rem !important; }

.lang-switcher,
.language-switcher,
.v61-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switcher a,
.language-switcher a,
.v61-language-switcher a {
  min-width: 36px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 0;
  color: var(--text, #f7f9fb);
  text-decoration: none;
  font-weight: 850;
  font-size: .78rem;
  background: transparent;
}

.lang-switcher a.is-active,
.language-switcher a.is-active,
.v61-language-switcher a.is-active {
  background: var(--accent, #ffc400);
  color: #111;
  border-color: var(--accent, #ffc400);
}

.v61-admin-page {
  font-family: var(--font-main, "Inter", "Segoe UI", Roboto, Arial, sans-serif);
}

.v61-admin-head,
.v61-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.v61-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.v61-stat-grid article {
  border: 1px solid #dfe7d5;
  border-radius: 12px;
  background: #f7f9f3;
  padding: 14px;
}

.v61-stat-grid article.is-warning {
  background: #fff8e2;
  border-color: #e7c85e;
}

.v61-stat-grid article.is-ok {
  background: #f0faf2;
  border-color: #bce8c2;
}

.v61-stat-grid span {
  display: block;
  color: #64705f;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.v61-stat-grid strong {
  display: block;
  margin-top: 7px;
  color: #172116;
  font-size: 1.55rem;
  line-height: 1;
}

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

.v61-card {
  border-radius: 14px !important;
}

.v61-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.v61-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #dfe7d5;
  border-radius: 10px;
  background: #fff;
  padding: 11px;
}

.v61-list article.is-warning {
  background: #fff8e2;
  border-color: #e7c85e;
}

.v61-list article.is-ok {
  background: #f0faf2;
  border-color: #bce8c2;
}

.v61-list strong {
  color: #172116;
}

.v61-list span,
.v61-list em {
  color: #64705f;
  font-size: .86rem;
  word-break: break-word;
}

.v61-ok {
  color: #217a35;
  font-weight: 850;
}

@media (max-width: 980px) {
  .v61-admin-head,
  .v61-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

@media (max-width: 640px) {
  h1,
  .admin-page h1,
  .customer-card h1,
  .page-title {
    font-size: 1.34rem !important;
  }

  h2,
  .admin-page h2,
  .customer-card h2,
  .section__head h2 {
    font-size: 1.08rem !important;
  }

  .v61-stat-grid {
    grid-template-columns: 1fr;
  }
}
