/* ===== PALETA STOLOVA — sveže, centrirano, uži container ===== */

/* Ukloni tamni overlay na modalu (ako postoji) */
.modal-backdrop,
.modal-overlay,
.swal2-container,
.spm-overlay {
  background: rgba(255,255,255,0.35) !important;
  backdrop-filter: blur(2.5px);
}

/* Sam modal (SweetAlert2 ili custom) */
.sp-table-modal,
.table-palette,
.sp-palette-modal,
.swal2-popup {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  box-shadow: 0 30px 80px rgba(16,24,40,.16) !important;
}

/* ===== Osnovni kontejner i naslovi ===== */
.sp-palette {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0b1220;

  /* ⬇️ uže i centrirano */
  max-width: clamp(960px, 88vw, 1180px);
  margin: 0 auto;
  padding: 8px clamp(14px, 4vw, 24px) 16px;
}

.sp-palette h2 {
  margin: 4px 0 16px 0;
  font-size: 24px;
  font-weight: 800;
  text-align: center;              /* ⬅ centriran naslov */
}

.sp-section {
  margin: 18px 0 22px 0;
}

/* ⬅ centrirani podnaslovi + diskretna linija ispod */
.sp-section > h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  letter-spacing: .2px;
  text-transform: uppercase;
  text-align: center;
  position: relative;
}
.sp-section > h3::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: #e8ecf6;
  margin: 6px auto 0;
}

/* ===== Grid kartica (kvadratni/okrugli/ovalni) ===== */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;                        /* mrvu zbijenije */
  justify-items: stretch;
}

/* Kartica */
.sp-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(16,24,40,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform .08s ease, box-shadow .18s ease, border-color .18s ease;
}
.sp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(16,24,40,.10);
  border-color: #dbe0f0;
}

/* SVG preview u kartici */
.sp-card .sp-card-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Traka sa labelom i dugmetom */
.sp-card-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.sp-card-label {
  font-weight: 700;
  font-size: 12px;
  color: #0b1220;
}

/* ===== Dugmad ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #0b1220;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .18s ease, opacity .18s ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16,24,40,.08);
}
.button-primary {
  background: #2563eb;
  color: #fff;
  border-color: #1e40af;
}

/* ===== PRAVOUGAONI & SVEČANI — preview + kontrole ===== */
.sp-rect-stack {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.sp-rect-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(16,24,40,.06);
}
.sp-rect-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}

/* ===== Responsivnost ===== */
@media (max-width: 640px) {
  .sp-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .sp-rect-stack { grid-template-columns: 1fr; }
  .sp-rect-ctrl { justify-content: center; }
  .sp-palette { max-width: 100%; padding-inline: 12px; }
}
