:root {
  --bg: #edf3fb;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(255,255,255,0.90);
  --text: #0f172a;
  --muted: #64748b;
  --border: #d8e3f0;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-3: #60a5fa;
  --dark: #06152f;
  --success: #15803d;
  --danger: #b91c1c;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(96,165,250,.18), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(37,99,235,.14), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #edf3fb 50%, #e9f0f8 100%);
}

body.modal-open { overflow: hidden; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  margin-top: 0;
  letter-spacing: -0.02em;
  color: #0b1530;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 28px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(135deg, rgba(6,21,47,0.98) 0%, rgba(10,30,77,0.96) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(6,21,47,0.22);
}

.topbar::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
  opacity: .85;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand img {
  height: 56px !important;
  width: auto !important;
  background: rgba(255,255,255,0.98) !important;
  border-radius: 16px !important;
  padding: 6px 10px !important;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  color: #eef4ff;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 999px;
  transition: all .18s ease;
}

.nav a:hover {
  text-decoration: none;
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(216, 227, 240, 0.95);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0));
}

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

.product-list-grid { align-items: stretch; }

.product-card {
  min-height: 350px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,250,255,.96) 100%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 5px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
  border-color: #bfd3ea;
}

.product-card-vertical {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-text {
  position: relative;
  z-index: 1;
}

.product-text h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.25;
}

.product-text h3 a {
  color: #1d4ed8;
}

.meta {
  color: var(--muted);
  margin-bottom: 2px;
  font-size: 14px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.price {
  font-size: 18px;
  font-weight: 800;
  color: #06152f;
  margin: 12px 0 0;
}

.product-thumb-wrap {
  margin-top: 18px;
  padding-top: 10px;
}

.product-thumb {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 150px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 800;
  font-size: 26px;
}

.full {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: #15213c;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #cfd9e6;
  border-radius: 16px;
  font-size: 15px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #84a9ff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.11);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  padding: 12px 19px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

button:hover,
.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
  filter: brightness(1.03);
}

.button.secondary { background: linear-gradient(135deg, #64748b 0%, #475569 100%); }
.button.success { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); }

.table-wrap { overflow: auto; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}

th, td {
  padding: 14px 12px;
  border-bottom: 1px solid #e7eef8;
  text-align: left;
  vertical-align: middle;
}

th {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
  color: #102041;
  font-weight: 800;
}

tbody tr:hover td {
  background: #f9fbff;
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.notice.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.notice.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.inline-actions a { margin-right: 10px; font-weight: 700; }

.sort-link { color: inherit; font-weight: 800; }
.sort-link:hover { color: #1d4ed8; text-decoration: none; }

.upload-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd6df;
  border-radius: 16px;
  background: #fff;
  font-size: 15px;
}

.upload-field input[type="file"]::file-selector-button,
.upload-field input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.image-modal.is-open { display: flex; }

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 30, 0.72);
  backdrop-filter: blur(5px);
}

.image-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(90vw, 980px);
  height: min(82vh, 700px);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0,0,0,.30);
}

.image-modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  padding: 0;
  font-size: 30px;
  line-height: 1;
  background: rgba(10, 30, 77, 0.95);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 28px rgba(7,22,51,.28);
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 30, 77, 0.95);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
  cursor: pointer;
}

.image-modal-prev { left: -76px; }
.image-modal-next { right: -76px; }

.image-modal-nav:hover,
.image-modal-close:hover {
  background: rgba(37, 99, 235, 0.98);
}

@media (max-width: 1100px) {
  .image-modal-prev { left: 8px; }
  .image-modal-next { right: 8px; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .form-grid,
  .filters,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav {
    gap: 8px;
    flex-wrap: wrap;
  }

  .brand {
    flex-wrap: wrap;
  }

  .product-thumb {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 150px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
}

.price-box {
  margin-top: 12px;
}

.price-box.sale {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid #fda4af;
  box-shadow: 0 12px 28px rgba(190, 24, 93, 0.12);
}

.sale-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444 0%, #db2777 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.price-sale {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: #be123c;
  letter-spacing: -0.02em;
}

.price-old {
  font-size: 18px;
  color: #64748b;
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: #ef4444;
  font-weight: 700;
  opacity: 0.95;
}

.sale-save {
  font-size: 13px;
  font-weight: 800;
  color: #be123c;
  background: rgba(255,255,255,0.7);
  padding: 4px 8px;
  border-radius: 999px;
}

.product-sale-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: 8px;
}

.action-links{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    min-width:150px;
}
.action-links .delete-link{
    color:#d14343;
    font-weight:700;
}
.action-links .delete-link:hover{
    color:#b91c1c;
}


.action-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    min-width:150px;
}
.trash-head{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    line-height:1;
    min-width:24px;
}


.admin-product-actions{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
}
.admin-product-actions .delete-link{
    color:#d14343;
    font-weight:700;
}
.admin-product-actions .delete-link:hover{
    color:#b91c1c;
}

.delete-link{
    color:#d14343 !important;
    font-weight:700 !important;
}
.delete-link:hover,
.delete-link:focus,
.delete-link:visited{
    color:#b91c1c !important;
}


.inline-actions .delete-link{
    color:#d14343 !important;
    font-weight:700 !important;
}
.inline-actions .delete-link:hover,
.inline-actions .delete-link:focus,
.inline-actions .delete-link:visited{
    color:#b91c1c !important;
}


.inline-actions{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:nowrap;
}
.inline-actions .delete-link{
    margin-left:auto;
}


.products-action-head{
    display:flex;
    align-items:center;
}
.products-trash-head{
    margin-left:auto;
    width:72px;
    text-align:center;
}
.inline-actions{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:nowrap;
}
.inline-actions .products-delete-link{
    margin-left:auto;
    width:72px;
    text-align:center;
    display:inline-block;
}


.products-action-head{
    display:grid !important;
    grid-template-columns: 1fr 72px !important;
    align-items:center !important;
}
.products-trash-head{
    width:72px !important;
    margin-left:0 !important;
    text-align:center !important;
    justify-self:center !important;
}
.inline-actions .products-delete-link{
    margin-left:auto !important;
    width:72px !important;
    text-align:center !important;
    display:inline-block !important;
}


.products-trash-head{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}
.products-trash-head svg{
    width:18px;
    height:18px;
    display:block;
    margin:0 auto;
    fill:#8b95a7;
}

.products-trash-head svg{
    transform: translateX(-6px);
}

.products-trash-head svg{
    transform: translateX(-10px) !important;
}

.trash-head{
    display:flex;
    align-items:center;
    justify-content:center;
}
.trash-head svg{
    width:18px;
    height:18px;
    display:block;
    margin:0 auto;
    fill:#8b95a7;
    transform: translateX(-10px) !important;
}


html, body{
    min-height:100%;
}

body{
    background:
        radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(16,185,129,0.10), transparent 28%),
        linear-gradient(180deg, #eef4fb 0%, #e8eff8 46%, #eef3f8 100%) !important;
    background-attachment: fixed !important;
    position: relative;
}

body::before,
body::after{
    content:"";
    position: fixed;
    inset: auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(20px);
    opacity: 0.45;
}

body::before{
    top: 110px;
    left: -120px;
    background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, rgba(37,99,235,0.05) 45%, transparent 72%);
}

body::after{
    right: -120px;
    bottom: 40px;
    background: radial-gradient(circle, rgba(14,165,233,0.16) 0%, rgba(16,185,129,0.05) 45%, transparent 72%);
}

.page,
.container,
main,
.wrapper{
    position: relative;
    z-index: 1;
}


.site-brand{
    display:flex;
    align-items:center;
    gap:18px;
    text-decoration:none;
}

.site-logo-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:230px;
    min-height:72px;
    padding:10px 18px;
    background:rgba(255,255,255,0.98);
    border:1px solid rgba(255,255,255,0.75);
    border-radius:18px;
    box-shadow:0 10px 26px rgba(3,18,45,0.20);
}

.site-logo{
    display:block;
    height:48px;
    width:auto;
    max-width:100%;
}

.site-title{
    color:#ffffff;
    font-size:20px;
    font-weight:800;
    letter-spacing:-0.02em;
    text-shadow:0 2px 10px rgba(0,0,0,0.18);
}

@media (max-width: 900px){
    .site-brand{
        gap:12px;
    }
    .site-logo-wrap{
        min-width:180px;
        min-height:60px;
        padding:8px 14px;
        border-radius:14px;
    }
    .site-logo{
        height:38px;
    }
    .site-title{
        font-size:18px;
    }
}


/* Moderniji header/logo */
.site-brand{
    gap:14px !important;
}

.site-logo-wrap{
    min-width:auto !important;
    min-height:56px !important;
    padding:8px 14px !important;
    background:rgba(255,255,255,0.10) !important;
    border:1px solid rgba(255,255,255,0.16) !important;
    border-radius:16px !important;
    box-shadow:0 10px 24px rgba(2, 12, 32, 0.22) !important;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}

.site-logo{
    height:34px !important;
    width:auto !important;
}

.site-title{
    font-size:18px !important;
    font-weight:800 !important;
    letter-spacing:-0.02em !important;
    color:#f8fbff !important;
    text-shadow:none !important;
}

header .container,
.topbar .container,
.navbar .container{
    align-items:center;
}

@media (max-width: 900px){
    .site-logo-wrap{
        min-height:48px !important;
        padding:7px 12px !important;
        border-radius:14px !important;
    }
    .site-logo{
        height:28px !important;
    }
    .site-title{
        font-size:16px !important;
    }
}


.muted{
    color:#6b7280;
}
.card-header-row{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}
.table-wrap{
    overflow:auto;
}


.import-card{
    max-width: 900px;
    margin: 0 auto;
}

.import-form-modern{
    margin-top: 8px;
}

.import-upload-box{
    padding: 22px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.import-upload-label{
    display:block;
    margin-bottom: 14px;
    font-size: 18px;
    font-weight: 800;
    color: #23324d;
}

.file-picker-modern{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
}

.file-picker-modern input[type="file"]{
    position:absolute;
    left:-9999px;
    width:1px;
    height:1px;
    opacity:0;
}

.file-picker-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:50px;
    padding: 0 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2962ff 0%, #4f7cff 100%);
    color:#fff;
    font-weight:800;
    text-decoration:none;
    box-shadow: 0 12px 26px rgba(41, 98, 255, 0.24);
    cursor:pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.file-picker-button:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(41, 98, 255, 0.28);
}

.file-picker-name{
    min-height:50px;
    display:flex;
    align-items:center;
    padding: 0 16px;
    border-radius: 14px;
    background:#f3f6fb;
    border:1px solid #dbe4f0;
    color:#5b657a;
    font-weight:600;
    min-width:320px;
}

.checkbox-modern{
    margin-top: 18px;
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
    color:#334155;
}

.import-actions{
    margin-top: 22px;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

@media (max-width: 700px){
    .file-picker-name{
        min-width: 100%;
    }
}


.table-wrap{
    overflow:auto;
}

.bulk-actions-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
    flex-wrap:wrap;
}

.bulk-select-all{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
    color:#334155;
}

.checkbox-col{
    width:56px;
    text-align:center;
}

.checkbox-col input[type="checkbox"]{
    width:18px;
    height:18px;
    cursor:pointer;
}

.trash-head-cell,
.single-delete-cell{
    text-align:center;
    white-space:nowrap;
}

.trash-head-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    border-radius:10px;
    background:#f3f4f6;
    border:1px solid #e5e7eb;
}

.trash-head-icon svg{
    width:17px;
    height:17px;
    fill:#ef4444;
}

.button.danger{
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color:#fff;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.button.danger:disabled{
    opacity:.55;
    cursor:not-allowed;
    box-shadow:none;
}

.force-red,
a.force-red,
.inline-actions a.force-red,
.single-delete-cell a.force-red{
    color:#ef4444 !important;
    font-weight:800;
}

.force-red:hover,
a.force-red:hover{
    color:#dc2626 !important;
}

@media (max-width: 900px){
    .bulk-actions-bar{
        align-items:flex-start;
    }
}


.table-wrap table th,
.table-wrap table td{
    vertical-align: middle;
}

.table-wrap table td{
    line-height: 1.25;
}

.checkbox-col{
    vertical-align: middle !important;
}

.checkbox-col input[type="checkbox"]{
    display:block;
    margin:0 auto;
}

.inline-actions a,
.single-delete-cell a{
    display:inline-block;
    vertical-align: middle;
}


.table-wrap table tbody tr.selected-row td{
    background: linear-gradient(180deg, rgba(41, 98, 255, 0.12) 0%, rgba(41, 98, 255, 0.18) 100%);
}

.table-wrap table tbody tr.selected-row{
    box-shadow: inset 4px 0 0 #2962ff;
}

.table-wrap table tbody tr.selected-row a{
    position: relative;
    z-index: 1;
}


.table-wrap table th:nth-child(8),
.table-wrap table td:nth-child(8){
    white-space: nowrap;
    text-align: right;
    min-width: 120px;
}

.table-wrap table th:nth-child(9),
.table-wrap table td:nth-child(9){
    white-space: nowrap;
    text-align: center;
    min-width: 70px;
}


.table-wrap table th:nth-child(4),
.table-wrap table td:nth-child(4){
    min-width: 320px;
}

.table-wrap table td:nth-child(4){
    line-height: 1.35;
}

.table-wrap table th:nth-child(10),
.table-wrap table td:nth-child(10),
.table-wrap table th:nth-child(11),
.table-wrap table td:nth-child(11){
    white-space: nowrap;
}


.table-wrap table th:nth-child(3),
.table-wrap table td:nth-child(3){
    white-space: nowrap;
    min-width: 110px;
}


/* Artikli tabela - balans širina da sve akcije stanu */
.table-wrap table th:nth-child(3),
.table-wrap table td:nth-child(3){
    min-width: 90px;
}

.table-wrap table th:nth-child(4),
.table-wrap table td:nth-child(4){
    min-width: 220px;
}

.table-wrap table th:nth-child(5),
.table-wrap table td:nth-child(5){
    min-width: 90px;
}

.table-wrap table th:nth-child(6),
.table-wrap table td:nth-child(6){
    min-width: 80px;
}

.table-wrap table th:nth-child(7),
.table-wrap table td:nth-child(7){
    min-width: 90px;
}

.table-wrap table th:nth-child(8),
.table-wrap table td:nth-child(8){
    min-width: 95px;
}

.table-wrap table th:nth-child(9),
.table-wrap table td:nth-child(9){
    min-width: 60px;
}

.table-wrap table th:nth-child(10),
.table-wrap table td:nth-child(10){
    min-width: 185px;
    white-space: nowrap;
}

.table-wrap table th:nth-child(11),
.table-wrap table td:nth-child(11){
    min-width: 78px;
    white-space: nowrap;
}

.inline-actions{
    white-space: nowrap;
}

.inline-actions a{
    margin-right: 12px;
}

.inline-actions a:last-child{
    margin-right: 0;
}


/* Artikli bez stupca Tip */
.table-wrap table th:nth-child(3),
.table-wrap table td:nth-child(3){
    min-width: 90px;
    white-space: nowrap;
}

.table-wrap table th:nth-child(4),
.table-wrap table td:nth-child(4){
    min-width: 240px;
}

.table-wrap table th:nth-child(5),
.table-wrap table td:nth-child(5){
    min-width: 90px;
}

.table-wrap table th:nth-child(6),
.table-wrap table td:nth-child(6){
    min-width: 100px;
}

.table-wrap table th:nth-child(7),
.table-wrap table td:nth-child(7){
    min-width: 95px;
    white-space: nowrap;
    text-align: right;
}

.table-wrap table th:nth-child(8),
.table-wrap table td:nth-child(8){
    min-width: 60px;
    white-space: nowrap;
    text-align: center;
}

.table-wrap table th:nth-child(9),
.table-wrap table td:nth-child(9){
    min-width: 185px;
    white-space: nowrap;
}

.table-wrap table th:nth-child(10),
.table-wrap table td:nth-child(10){
    min-width: 78px;
    white-space: nowrap;
}


.inline-actions .force-red{
    color:#ef4444 !important;
    font-weight:800;
}


.users-actions-head{
    text-align: left !important;
}


/* Artikli bez posebne stavke Varijante u listi */
.table-wrap table th:nth-child(9),
.table-wrap table td:nth-child(9){
    min-width: 110px;
    white-space: nowrap;
}

.table-wrap table th:nth-child(10),
.table-wrap table td:nth-child(10){
    min-width: 78px;
    white-space: nowrap;
}

.inline-actions a{
    margin-right: 14px;
}


/* Artikli - poravnanje redova kod višerednih naziva */
.table-wrap table tbody td{
    vertical-align: top;
}

.table-wrap table tbody td.checkbox-col{
    vertical-align: middle;
}

.table-wrap table tbody td:nth-child(7),
.table-wrap table tbody td:nth-child(8),
.table-wrap table tbody td:nth-child(9),
.table-wrap table tbody td:nth-child(10){
    padding-top: 18px;
}


/* Precizno poravnanje samo za listu artikala */
.products-table tbody td{
    vertical-align: top !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

.products-table tbody td.checkbox-col{
    vertical-align: middle !important;
}

.products-table tbody td:nth-child(7),
.products-table tbody td:nth-child(8),
.products-table tbody td:nth-child(9),
.products-table tbody td:nth-child(10){
    line-height: 1.2 !important;
}

.products-table tbody td:nth-child(9){
    white-space: nowrap;
}

.products-table tbody td:nth-child(10){
    text-align: left;
}


.products-table{
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}


.products-table tbody td:nth-child(9),
.products-table tbody td:nth-child(10){
    border-bottom: none !important;
}


.products-table tbody tr.selected-row td:nth-child(9),
.products-table tbody tr.selected-row td:nth-child(10){
    background: linear-gradient(180deg, rgba(41, 98, 255, 0.12) 0%, rgba(41, 98, 255, 0.18) 100%) !important;
    border-bottom: 1px solid rgba(41, 98, 255, 0.18) !important;
}


/* Jače i čišće označavanje cijelog reda bez crta */
.products-table tbody tr.selected-row td{
    background: #eaf1ff !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

.products-table tbody tr.selected-row td:nth-child(9),
.products-table tbody tr.selected-row td:nth-child(10){
    background: #eaf1ff !important;
    border-bottom: none !important;
}


/* Ukloni bijeli razmak u stupcima Akcije i Obriši */
.products-table td.inline-actions,
.products-table td.single-delete-cell{
    border-bottom: none !important;
    box-shadow: none !important;
    background: #f7f9fc !important;
}

.products-table tbody tr.selected-row td.inline-actions,
.products-table tbody tr.selected-row td.single-delete-cell{
    background: #eaf1ff !important;
}


/* Lista artikala bez bijelih crta između redova */
.products-table tbody td{
    border-bottom: none !important;
}


/* Akcije/Obriši transparentno, a kod označenog reda plavo do kraja */
.products-table tbody td.inline-actions,
.products-table tbody td.single-delete-cell{
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.products-table tbody tr.selected-row td.inline-actions,
.products-table tbody tr.selected-row td.single-delete-cell{
    background: #eaf1ff !important;
}


/* Obojaj stvarno svaku ćeliju označenog reda */
.products-table tbody td.selected-row-cell{
    background: #eaf1ff !important;
    border-bottom-color: transparent !important;
}


/* Artikli - spoji Akcije i Obriši u jedan stupac */
.products-table .actions-merged-cell{
    white-space: nowrap;
}

.products-table .actions-merged-cell a{
    display: inline-block;
    margin-right: 22px;
    vertical-align: top;
}

.products-table .actions-merged-cell a:last-child{
    margin-right: 0;
}


/* U listi artikala Akcije mora ostati prava tablična ćelija */
.products-table td.inline-actions{
    display: table-cell !important;
    align-items: initial !important;
    justify-content: initial !important;
    gap: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    vertical-align: top !important;
}



/* POST akcije kao linkovi */
.inline-post-form{
  display:inline;
  margin:0;
  padding:0;
}
.button-link{
  appearance:none;
  -webkit-appearance:none;
  background:none;
  border:none;
  padding:0;
  margin:0;
  color:#2563eb;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
}
.button-link:hover{
  text-decoration:underline;
}
.button-link.danger-link{
  color:#ef4444;
}
.inline-actions .inline-post-form + a,
.inline-actions a + .inline-post-form,
.inline-actions .inline-post-form + .inline-post-form{
  margin-left:10px;
}
.action-links .inline-post-form{
  display:inline-flex;
}











/* Prvi red artikala neka bude bliže zaglavlju, ali ne zbijen */
.products-table thead th{
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}
.products-table tbody tr:first-child td{
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    padding-top: 6px !important;
}



/* U akcijama poravnaj i POST formu s linkovima */
.products-table .actions-merged-cell .inline-post-form{
    display: inline-block !important;
    vertical-align: top !important;
    margin-left: 22px;
}
.products-table .actions-merged-cell .button-link{
    display: inline-block !important;
    vertical-align: top !important;
    line-height: 1.2;
}
.products-table .actions-merged-cell a,
.products-table .actions-merged-cell .button-link{
    line-height: 1.2;
}



/* Akcije u artiklima neka budu u jednoj ravnini */
.products-table .actions-merged-cell .actions-row{
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 24px;
}
.products-table .actions-merged-cell .inline-post-form{
    margin: 0 !important;
}
.products-table .actions-merged-cell .button-link{
    margin: 0 !important;
    padding: 0 !important;
}



/* Makni browser focus trag ispod Obriši */
.button-link:focus,
.button-link:focus-visible,
.button-link:active,
.products-table .actions-merged-cell .button-link:focus,
.products-table .actions-merged-cell .button-link:focus-visible,
.products-table .actions-merged-cell .button-link:active{
    outline: none !important;
    box-shadow: none !important;
}



/* Potpuno očisti izgled Obriši gumba u tablici artikala */
.products-table .actions-merged-cell .inline-post-form{
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}
.products-table .actions-merged-cell .button-link,
.products-table .actions-merged-cell .button-link.danger-link{
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
    -webkit-tap-highlight-color: transparent !important;
}
.products-table .actions-merged-cell .button-link:hover,
.products-table .actions-merged-cell .button-link:focus,
.products-table .actions-merged-cell .button-link:active,
.products-table .actions-merged-cell .button-link:focus-visible{
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}
.products-table .actions-merged-cell .button-link::before,
.products-table .actions-merged-cell .button-link::after{
    content: none !important;
    display: none !important;
}



/* Globalno makni trag/sjenu s Obriši i sličnih button-link gumba */
.inline-post-form{
    display: inline-block;
    vertical-align: top;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}
.button-link,
.button-link.danger-link{
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-block !important;
    vertical-align: top !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
    -webkit-tap-highlight-color: transparent !important;
}
.button-link:hover,
.button-link:focus,
.button-link:focus-visible,
.button-link:active{
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}
.button-link::before,
.button-link::after{
    content: none !important;
    display: none !important;
}



/* Makni sjene s glavnih gumba */
button,
.button,
input[type="submit"],
input[type="button"],
.file-picker-button{
    box-shadow: none !important;
}
button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.file-picker-button:hover{
    box-shadow: none !important;
}



/* === Poravnanje ikone koša točno iznad "Obriši" === */
.products-table .products-action-head{
    white-space: nowrap;
}
.products-table .products-actions-head-layout{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-width: 210px;
}
.products-table .products-actions-title{
    font-weight: 800;
    color: #596780;
}
.products-table .actions-merged-cell{
    white-space: nowrap;
}
.products-table .actions-merged-cell .actions-row{
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 28px !important;
    min-height: 24px;
    white-space: nowrap;
}
.products-table .actions-merged-cell .actions-row > a,
.products-table .actions-merged-cell .actions-row > form{
    flex: 0 0 auto;
    margin: 0 !important;
}
.products-table .actions-merged-cell .actions-row .button-link,
.products-table .actions-merged-cell .actions-row a{
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.products-table .actions-merged-cell .actions-row .danger-link{
    color: #ff5a54 !important;
    font-weight: 800;
}

/* korisnici */
.users-actions-head{
    white-space: nowrap;
}
.users-actions-head-layout{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 175px;
}
.users-actions-title{
    font-weight: 800;
    color: #596780;
}
.inline-actions{
    white-space: nowrap;
}
.inline-actions,
.single-delete-cell{
    vertical-align: middle;
}
.single-delete-cell{
    text-align: right !important;
    padding-left: 0 !important;
}
.single-delete-cell form{
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 !important;
}
.single-delete-cell .button-link{
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* lookup tablice */
.action-head{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    min-width: 155px !important;
}
.action-links{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    min-width: 155px !important;
    white-space: nowrap;
}
.action-links form{
    margin: 0 !important;
}
.action-links .button-link{
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    background: transparent !important;
}
.action-links .danger-link{
    color: #ff5a54 !important;
    font-weight: 800 !important;
}

/* univerzalni izgled koša */
.trash-head-icon{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(148,163,184,0.18) !important;
    box-shadow: none !important;
}
.trash-head-icon svg{
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}



/* === Precizno poravnanje Akcije / Obriši === */
.products-table .products-action-head{
    width: 1%;
    white-space: nowrap;
}
.products-table .products-actions-head-layout{
    display: grid !important;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: start !important;
    column-gap: 22px;
    row-gap: 0;
    min-width: 0 !important;
    width: max-content;
}
.products-table .products-actions-title{
    grid-column: 1 / 3;
    justify-self: start;
}
.products-table .products-actions-head-layout .trash-head-icon{
    grid-column: 3;
    justify-self: center;
}
.products-table .actions-merged-cell{
    width: 1%;
    white-space: nowrap;
}
.products-table .actions-merged-cell .actions-row{
    display: grid !important;
    grid-template-columns: auto auto auto;
    align-items: center !important;
    justify-content: start !important;
    justify-items: start;
    column-gap: 22px !important;
    row-gap: 0 !important;
    width: max-content;
    min-height: 24px;
}
.products-table .actions-merged-cell .actions-row > form{
    display: block;
}
.products-table .actions-merged-cell .actions-row > form .button-link{
    display: inline-block;
}
.products-table .actions-merged-cell .actions-row::before,
.products-table .actions-merged-cell .actions-row::after{
    content: none !important;
}
.products-table .actions-merged-cell::before,
.products-table .actions-merged-cell::after,
.products-table .products-action-head::before,
.products-table .products-action-head::after{
    content: none !important;
    display: none !important;
}

/* lookup tablice */
.action-head{
    display: grid !important;
    grid-template-columns: auto auto;
    align-items: center !important;
    justify-content: start !important;
    column-gap: 18px !important;
    width: max-content;
    min-width: 0 !important;
}
.action-links{
    display: grid !important;
    grid-template-columns: auto auto;
    align-items: center !important;
    justify-content: start !important;
    column-gap: 18px !important;
    width: max-content;
    min-width: 0 !important;
}
.action-head .trash-head-icon{
    justify-self: center;
}



/* === Akcije header bez teksta, samo poravnanje prema Uredi/Slike/Obriši === */
.products-table .products-actions-head-icons-only{
    display: grid !important;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: start !important;
    column-gap: 22px !important;
    width: max-content;
}
.products-table .products-actions-head-icons-only .head-placeholder{
    visibility: hidden;
    display: inline-block;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    user-select: none;
}
.products-table .products-actions-head-icons-only .trash-head-icon{
    justify-self: center;
}



/* === Artikli: header Akcije samo s košem, bez praznih placeholdera === */
.products-table .products-action-head{
    position: relative;
    width: 1%;
    white-space: nowrap;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}
.products-table .products-actions-head-icon-only{
    position: relative;
    display: block !important;
    width: 150px;
    min-height: 34px;
}
.products-table .products-actions-head-icon-only .trash-head-icon{
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
.products-table .products-actions-head-icon-only .head-placeholder,
.products-table .products-actions-title{
    display: none !important;
}
.products-table .actions-merged-cell{
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.products-table .actions-merged-cell .actions-row{
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    width: auto !important;
}
.products-table .actions-merged-cell .actions-row::before,
.products-table .actions-merged-cell .actions-row::after{
    content: none !important;
    display: none !important;
}



/* === Precizno poravnanje header koša iznad Obriši === */
.products-table .products-actions-head-icon-only{
    display: grid !important;
    grid-template-columns: 58px 58px 66px;
    column-gap: 10px !important;
    align-items: center !important;
    justify-content: start !important;
    width: max-content !important;
    min-height: 34px !important;
}
.products-table .products-actions-head-icon-only .action-col-space{
    display: block;
    width: 58px;
    height: 1px;
    visibility: hidden;
}
.products-table .products-actions-head-icon-only .trash-head-icon{
    position: static !important;
    transform: none !important;
    justify-self: center !important;
    right: auto !important;
    top: auto !important;
}
.products-table .actions-merged-cell .actions-row{
    display: grid !important;
    grid-template-columns: 58px 58px 66px;
    column-gap: 10px !important;
    align-items: center !important;
    justify-content: start !important;
    width: max-content !important;
}
.products-table .actions-merged-cell .actions-row > a,
.products-table .actions-merged-cell .actions-row > form{
    width: 100%;
    text-align: center;
}
.products-table .actions-merged-cell .actions-row > form{
    margin: 0;
}



/* === Jedna ravna crta ispod headera artikala === */
.products-table thead tr{
    position: relative;
}
.products-table thead tr::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #d7deeb;
    pointer-events: none;
}
.products-table thead th{
    border-bottom: 0 !important;
}



/* === Kritično: header Akcije mora ostati prava table-cell, ne flex === */
.products-table th.products-action-head{
    display: table-cell !important;
    vertical-align: middle !important;
    position: relative !important;
}
.products-table thead th{
    vertical-align: middle !important;
}
.products-table .products-actions-head-icon-only{
    display: grid !important;
    grid-template-columns: 58px 58px 66px;
    column-gap: 10px !important;
    align-items: center !important;
    justify-content: start !important;
    width: max-content !important;
    margin: 0 !important;
}


.lookup-filter-form{
    margin:0;
}
.lookup-filter-row{
    display:flex;
    gap:16px;
    align-items:flex-end;
    flex-wrap:wrap;
}
.lookup-filter-field{
    flex:1 1 340px;
}
.lookup-filter-field label{
    display:block;
    margin-bottom:8px;
    font-weight:700;
    color:#49566f;
}
.lookup-filter-actions{
    display:flex;
    gap:12px;
    align-items:flex-end;
}


.sortable-th a{
    color:inherit;
    text-decoration:none;
    font-weight:700;
    display:inline-block;
}
.sortable-th a:hover{
    color:#3366ee;
}


/* === Inline unos varijanti na formi artikla === */
.inline-variants-card{
    grid-column: 1 / -1;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(150, 165, 190, 0.25);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,248,253,0.92));
}
.inline-variants-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:14px;
}
.inline-variants-header h2{
    margin:0;
    font-size:20px;
    color:#334155;
}
.inline-variants-header p{
    margin:6px 0 0;
    color:#64748b;
    font-size:14px;
}
.inline-add-variant{
    white-space:nowrap;
}
.inline-variants-table-wrap{
    overflow-x:auto;
}
.inline-variants-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
}
.inline-variants-table th{
    text-align:left;
    color:#526078;
    font-size:14px;
    font-weight:800;
    padding:10px 8px;
    border-bottom:1px solid #dbe3ef;
}
.inline-variants-table td{
    padding:8px;
    vertical-align:middle;
}
.inline-variants-table input[type="text"],
.inline-variants-table select{
    width:100%;
    min-width:120px;
    height:40px;
    border:1px solid #cfd9e8;
    border-radius:12px;
    padding:0 10px;
    background:#fff;
}
.inline-variants-table .center-cell{
    text-align:center;
}
.variant-remove-row{
    width:34px;
    height:34px;
    border:0;
    border-radius:12px;
    background:#fee2e2;
    color:#dc2626;
    font-size:20px;
    font-weight:800;
    line-height:1;
    cursor:pointer;
    box-shadow:none !important;
}
.variant-remove-row:hover{
    background:#fecaca;
}
@media (max-width: 900px){
    .inline-variants-header{
        flex-direction:column;
    }
}
