/* === extras.css v7 (one-row color picker, 5-col legend, modal) === */
.product-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
@media (max-width: 1100px){ .product-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 860px){ .product-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px){ .product-grid{ grid-template-columns:1fr; } }

.two-card-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
@media (max-width: 960px){ .two-card-grid{ grid-template-columns:1fr; } }

.text-sm{ font-size:13px; line-height:1.3; }
.card-title{ display:flex; align-items:center; gap:8px; margin:0 0 10px 0; font-weight:700; }

.icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:10px; border:1px solid #e5e7eb; background:#fff; box-shadow:0 8px 20px rgba(0,0,0,.08); cursor:pointer; }
.icon-btn:hover{ background:#F7FBFF; border-color:#dbeafe; transform:translateY(-1px); }

.badge.kpi{ font-weight:700; }

.list-compact{ margin:0; padding:0; list-style:none; display:grid; gap:4px; }
.list-compact.tight{ gap:2px; }
.list-compact > li{ display:flex; align-items:center; justify-content:space-between; gap:8px; line-height:1.2; }

.product-card{ padding:10px; box-shadow:none; border-radius:12px; border:1px solid #e8eef7; transition: box-shadow .12s ease, transform .12s ease, background .12s ease, border-color .12s ease; background:#fff; }
.product-card:hover{ background:#F7FBFF; border-color:#dbeafe; box-shadow:0 12px 28px rgba(0,0,0,.10); transform:translateY(-1px); }
.product-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.product-title{ font-weight:700; margin:0 0 1px 0; }
.product-meta{ margin:0; font-size:12px; color:#666; display:flex; align-items:center; gap:8px; }

/* Pager */
.pager{ display:flex; align-items:center; justify-content:center; gap:10px; margin-top:12px; flex-wrap:wrap; }
.pager .btn{ padding:8px 12px; }
.pager .pages{ display:flex; gap:6px; align-items:center; }
.pager .pages a{ padding:6px 10px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }
.pager .pages a:hover{ background:#F7FBFF; border-color:#dbeafe; }
.pager .pages a.active{ background:linear-gradient(180deg, #0096D6 0%, #1A5BDB 100%); color:#fff; border-color:transparent; }
.pager .pages .sep{ color:#94a3b8; padding:0 2px; }
.pager .jump{ display:flex; align-items:center; gap:6px; }
.pager .jump .input{ width:72px; padding:6px 8px; height:auto; }

/* Categories */
.cat-badge{ display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; border:1px solid #e5e7eb; background:#fff; font-weight:700; font-size:12px; }
.cat-badge .swatch{ width:12px; height:12px; border-radius:3px; background:var(--cat, #ddd); border:1px solid rgba(0,0,0,.1); }
.cat-legend{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; } /* 5 per row */
@media (max-width:1100px){ .cat-legend{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:850px){ .cat-legend{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:650px){ .cat-legend{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:480px){ .cat-legend{ grid-template-columns:1fr; } }
.cat-legend .row{ display:flex; align-items:center; gap:8px; padding:6px 8px; border:1px dashed #e5e7eb; border-radius:10px; background:#fff; }

/* Color picker: one single row */
.color-grid{ display:grid; grid-template-columns:repeat(10,24px); gap:6px; } /* one row of 10 */
.color-sample{ width:24px; height:24px; border-radius:6px; border:1px solid rgba(0,0,0,.1); cursor:pointer; }

/* Modal (lightbox) */
.modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:1000; }
.modal.open{ display:flex; }
.modal .backdrop{ position:absolute; inset:0; background:rgba(15,23,42,.55); }
.modal .modal-card{ position:relative; background:#fff; border-radius:16px; padding:16px; width:min(720px, 92vw); box-shadow:0 24px 60px rgba(0,0,0,.35); border:1px solid #e5e7eb; }
.modal .modal-header{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.modal .close{ background:transparent; border:0; font-size:22px; cursor:pointer; line-height:1; }

/* tabellen companys */
.table{ width:100%; border-collapse:separate; border-spacing:0; background:#fff; border-radius:14px; overflow:hidden; }
.table th, .table td{ padding:10px 12px; border-bottom:1px solid #eef2f7; vertical-align:middle; }
.table th{ text-align:left; font-weight:700; font-size:13px; color:#334155; background:#f8fafc; }
.table tr:hover td{ background:#F7FBFF; }
.table td a.mail{ text-decoration:none; }
.table td a.mail:hover{ text-decoration:underline; }
.table .badge.kpi{ padding:4px 8px; font-size:12px; }
.td-actions{ text-align:right; white-space:nowrap; }