/* ERATOOLS V5.7 FINAL PRODUCTION POLISH
   Finalna warstwa: język/UX/flat premium/square buttons/spójność admin + klient + front.
*/

:root {
  --v57-radius: 12px;
  --v57-radius-lg: 16px;
  --v57-line: var(--line, rgba(255,255,255,.10));
  --v57-accent: var(--accent, #ffc400);
  --v57-text: var(--text, #f7f9fb);
  --v57-muted: var(--text-soft, #aeb7c4);
}

/* Mniej gradientów, bardziej premium-flat */
button,
.btn,
.admin-btn,
.customer-btn,
.checkout-btn,
.cart-btn,
.product-action,
.product-button,
.v56-form button,
.v57-form button,
a.btn,
a.admin-btn,
a.customer-btn {
  border-radius: var(--v57-radius) !important;
  box-shadow: none !important;
  background-image: none !important;
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease !important;
}

button:hover,
.btn:hover,
.admin-btn:hover,
.customer-btn:hover,
.checkout-btn:hover,
.cart-btn:hover,
.product-action:hover,
.product-button:hover {
  transform: translateY(-1px);
}

.admin-btn-primary,
.btn.primary,
.customer-btn:not(.is-secondary),
.checkout-btn-primary,
button[type="submit"],
.v56-form button,
.v57-form button {
  background: var(--v57-accent) !important;
  color: #111 !important;
  border: 1px solid color-mix(in srgb, var(--v57-accent) 85%, #111) !important;
  font-weight: 900 !important;
}

.btn.ghost,
.admin-btn:not(.admin-btn-primary),
.customer-btn.is-secondary,
button.is-muted,
a.is-muted {
  background: rgba(255,255,255,.055) !important;
  color: var(--v57-text) !important;
  border: 1px solid var(--v57-line) !important;
}

[data-theme="light"] .btn.ghost,
[data-theme="light"] .admin-btn:not(.admin-btn-primary),
[data-theme="light"] .customer-btn.is-secondary,
[data-theme="light"] button.is-muted,
[data-theme="light"] a.is-muted {
  background: #f4f6f1 !important;
  color: #172116 !important;
  border-color: #dce5d3 !important;
}

/* Header final */
.site-header,
.header-main,
.navbar-mega {
  --header-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.header-account-dropdown {
  border-radius: 14px !important;
  background: var(--card, #11171b) !important;
  background-image: none !important;
}

.header-account-dropdown a {
  border-radius: 10px !important;
}

.promo-strip__box,
.top-benefits__item {
  border-radius: 12px !important;
}

/* Karty frontu */
.product-card,
.home-product-card,
.category-product-card,
.product-tile,
.product-list-card,
.customer-card,
.admin-card,
.v56-card,
.v57-card,
.checkout-card,
.cart-card {
  border-radius: var(--v57-radius-lg) !important;
  background-image: none !important;
}

.product-card:hover,
.home-product-card:hover,
.category-product-card:hover,
.product-tile:hover,
.product-list-card:hover,
.customer-card:hover {
  transform: translateY(-2px);
}

/* Formularze */
input,
select,
textarea,
.search__form,
.customer-form input,
.customer-form select,
.customer-form textarea,
.v56-form input,
.v56-form select,
.v56-form textarea,
.v57-form input,
.v57-form select,
.v57-form textarea {
  border-radius: var(--v57-radius) !important;
}

label {
  letter-spacing: 0 !important;
}

/* Panel klienta final */
.customer-card h1,
.customer-page-head h1 {
  font-size: clamp(1.45rem, 2vw, 2rem) !important;
  line-height: 1.08 !important;
}

.customer-card h2,
.customer-content h2 {
  font-size: clamp(1.08rem, 1.35vw, 1.34rem) !important;
}

.customer-sidebar,
.customer-nav-link,
.customer-product-card,
.customer-v52-card,
.customer-order-row,
.customer-list-row,
.customer-ticket-card {
  border-radius: 14px !important;
}

/* Admin final */
.v57-admin-page,
.v56-admin-page,
.admin-page {
  font-family: var(--font-main, "Inter", "Segoe UI", Roboto, Arial, sans-serif);
}

.v57-admin-head {
  gap: 16px;
}

.v57-admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

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

.v57-stat-grid article {
  border: 1px solid #dfe7d5;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.v57-stat-grid article.is-warning {
  background: #fff9e8;
  border-color: #e8c95d;
}

.v57-stat-grid article.is-ok {
  background: #f1faf2;
  border-color: #bde8c4;
}

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

.v57-stat-grid strong {
  display: block;
  margin-top: 8px;
  color: #172116;
  font-size: 1.7rem;
  line-height: 1;
}

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

.v57-data-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #e3eadc;
  border-radius: 12px;
  background: #f8faf5;
  padding: 12px;
}

.v57-data-list.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v57-data-list article.is-warning {
  background: #fff9e8;
  border-color: #e8c95d;
}

.v57-data-list article.is-ok {
  background: #f1faf2;
  border-color: #bde8c4;
}

.v57-data-list strong {
  color: #172116;
}

.v57-data-list span,
.v57-data-list a,
.v57-list li {
  color: #64705f;
  word-break: break-word;
}

.v57-ok {
  color: #217a35;
  font-weight: 800;
}

.v57-list {
  margin: 0;
  padding-left: 18px;
}

/* CMS edytor final */
.v56-editor,
.v57-editor {
  border-radius: 14px !important;
  overflow: hidden;
}

.v56-editor-toolbar,
.v57-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #dce5d3;
  background: #f5f7f1;
  padding: 10px;
}

.v56-editor-toolbar button,
.v57-editor-toolbar button {
  min-height: 34px;
  border: 1px solid #d8e1cf !important;
  background: #fff !important;
  color: #172116 !important;
  padding: 0 10px;
  font-weight: 800 !important;
}

.v56-editor-area,
.v57-editor-area {
  min-height: 280px !important;
  background: #fff !important;
  color: #172116 !important;
  padding: 18px !important;
  line-height: 1.68;
}

.v56-editor-area h2,
.v57-editor-area h2 {
  font-size: 1.35rem;
}

.v57-edit-cms {
  width: fit-content;
  margin-top: 8px;
}

/* Import XML final progress */
.v56-progress,
.v57-progress,
[data-progress] {
  height: 10px !important;
  border-radius: 999px !important;
  overflow: hidden;
  background: #e7ecdf !important;
}

.v56-progress > span,
.v57-progress > span,
[data-progress-bar] {
  display: block;
  height: 100%;
  min-width: 2%;
  background: var(--v57-accent) !important;
  background-image: none !important;
  transition: width .22s ease;
}

/* Koszyk AJAX */
[data-cart-loading="1"] {
  opacity: .62;
  pointer-events: none;
}

.v57-cart-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  max-width: 360px;
  border: 1px solid #dce5d3;
  border-radius: 14px;
  background: #172116;
  color: #fff;
  padding: 13px 15px;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
}

/* Puste stany */
.customer-empty,
.v56-muted,
.v57-empty,
.empty-state {
  border-radius: 14px !important;
}

/* Mobile */
@media (max-width: 1100px) {
  .v57-grid,
  .v57-stat-grid,
  .v57-data-list.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .v57-grid,
  .v57-stat-grid,
  .v57-data-list.is-compact {
    grid-template-columns: 1fr;
  }

  .v57-admin-actions {
    justify-content: flex-start;
  }

  .customer-card h1,
  .customer-page-head h1 {
    font-size: 1.42rem !important;
  }

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

  .v57-cart-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
