/* ════════════════════════════════════════════════════════════════
   ZIKANI ADD-ITEM — modal styles
   ════════════════════════════════════════════════════════════════ */

body.addit-open { overflow: hidden; }

.addit-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(15, 18, 22, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: additFade 0.18s ease;
}
@keyframes additFade { from { opacity: 0; } to { opacity: 1; } }

.addit-modal {
  background: #fff;
  border-radius: 14px;
  width: min(960px, 100%);
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  overflow: hidden;
  animation: additPop 0.22s cubic-bezier(.2,.9,.3,1.2);
}
.addit-modal-narrow { width: min(680px, 100%); }
@keyframes additPop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.addit-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(180deg, #fafbfc, #fff);
}
.addit-head h3 {
  margin: 0; font-size: 16px; font-weight: 800; color: #1a2026;
  display: flex; align-items: center; gap: 8px;
}
.addit-head ion-icon { color: #8DC63F; font-size: 20px; }
.addit-count {
  background: #FF9800; color: #fff; font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; margin-left: 4px;
}
.addit-close {
  background: transparent; border: 0; cursor: pointer;
  padding: 6px; border-radius: 8px; color: #555;
  display: flex; align-items: center;
}
.addit-close:hover { background: #f1f3f5; color: #000; }
.addit-close ion-icon { font-size: 22px; }

.addit-subtitle {
  margin: 0; padding: 10px 20px;
  font-size: 12px; color: #666;
  background: #fcfcfd; border-bottom: 1px solid #f0f0f0;
}

.addit-form {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
}

.addit-section {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 14px 0;
  background: #fcfcfd;
}
.addit-section legend {
  font-size: 12px; font-weight: 800; color: #1a2026;
  padding: 0 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.addit-section legend ion-icon { color: #8DC63F; font-size: 14px; }
.addit-section legend small { font-weight: 500; color: #888; margin-left: 4px; }

.addit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 12px;
}

.addit-field {
  display: flex; flex-direction: column; gap: 4px;
}
.addit-field.full { grid-column: 1 / -1; }
.addit-field span {
  font-size: 11px; font-weight: 700; color: #555;
}
.addit-field input,
.addit-field select,
.addit-field textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  background: #fff;
  color: #1a2026;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.addit-field input:focus,
.addit-field select:focus,
.addit-field textarea:focus {
  border-color: #8DC63F;
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.18);
}
.addit-field textarea { resize: vertical; min-height: 60px; }

/* Photos */
.addit-img-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.addit-img-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px dashed #ccc;
  border-radius: 10px;
  background: #fafbfc;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s ease;
}
.addit-img-slot:hover { border-color: #8DC63F; background: #f3faea; }
.addit-img-slot.filled {
  border-style: solid;
  border-color: #d0d0d0;
  background: #fff;
}
.addit-img-slot img { width: 100%; height: 100%; object-fit: cover; }
.addit-img-add {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #888;
}
.addit-img-add ion-icon { font-size: 28px; }
.addit-img-add span { font-size: 11px; font-weight: 700; }
.addit-img-x {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.6); color: #fff; border: 0;
  border-radius: 50%; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.addit-img-x ion-icon { font-size: 14px; }
.addit-img-main {
  position: absolute; top: 6px; left: 6px;
  background: #8DC63F; color: #fff;
  font-size: 9px; font-weight: 800; padding: 2px 6px;
  border-radius: 4px; letter-spacing: 0.5px;
}

/* Footer */
.addit-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #eee;
  background: #fafbfc;
}
.addit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.addit-btn-secondary { background: #fff; color: #555; border: 1px solid #ddd; }
.addit-btn-secondary:hover { background: #f1f3f5; }
.addit-btn-primary {
  background: linear-gradient(135deg, #8DC63F, #6fa030);
  color: #fff;
  box-shadow: 0 2px 8px rgba(141, 198, 63, 0.4);
}
.addit-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(141, 198, 63, 0.55); }
.addit-btn-danger {
  background: #fff; color: #c62828; border: 1px solid #ffcdd2;
}
.addit-btn-danger:hover { background: #ffebee; }
.addit-btn ion-icon { font-size: 16px; }

/* Inbox */
.addit-inbox {
  padding: 16px 20px;
  max-height: 70vh;
  overflow-y: auto;
}
.addit-inbox-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
}
.addit-inbox-row:hover { background: #fcfcfd; border-color: #b9d97a; }
.addit-thumb {
  width: 60px; height: 60px;
  border-radius: 8px;
  background: #f1f3f5;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.addit-thumb img { width: 100%; height: 100%; object-fit: cover; }
.addit-thumb ion-icon { font-size: 28px; color: #aaa; }
.addit-inbox-name { font-weight: 800; font-size: 14px; color: #1a2026; }
.addit-inbox-sub  { font-size: 12px; color: #555; margin-top: 2px; }
.addit-inbox-by   { font-size: 11px; color: #888; margin-top: 2px; }

.addit-empty {
  padding: 40px 20px;
  text-align: center;
  color: #888;
}
.addit-empty ion-icon { font-size: 48px; color: #4CAF50; }
.addit-empty p { margin: 10px 0 0 0; font-size: 14px; }

/* Floating action buttons */
.zikani-fabs {
  position: fixed; bottom: 18px; right: 18px;
  z-index: 80;
  display: flex; flex-direction: column-reverse; gap: 10px;
  align-items: flex-end;
}
.zikani-fab {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px;
  padding: 12px 20px;
  font: inherit; font-weight: 800; font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.zikani-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.3); }
.zikani-fab ion-icon { font-size: 18px; }
.zikani-fab-primary {
  background: linear-gradient(135deg, #8DC63F, #6fa030);
  color: #fff;
}
.zikani-fab-admin {
  background: linear-gradient(135deg, #FF9800, #E65100);
  color: #fff;
}
.zikani-fab-badge {
  background: #fff;
  color: #E65100;
  font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  margin-left: 2px;
  min-width: 18px; text-align: center;
}

/* Mobile */
@media (max-width: 760px) {
  .addit-grid     { grid-template-columns: repeat(2, 1fr); }
  .addit-img-row  { grid-template-columns: repeat(2, 1fr); }
  .addit-form     { padding: 12px; }
  .addit-section  { padding: 10px 12px; }
  .zikani-fab-label { display: none; }
  .zikani-fab { padding: 14px; }
}
@media (max-width: 480px) {
  .addit-grid { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════════
   CATALOG MANAGER — tabs, audit, action buttons
   ════════════════════════════════════════════════════════════════ */
.addit-tabs {
  display: flex; gap: 4px; padding: 8px 16px 0;
  border-bottom: 1px solid #eee; background: #fafbfc;
  overflow-x: auto;
}
.addit-tab {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; border-bottom: 3px solid transparent;
  padding: 10px 14px; font-size: 13px; font-weight: 700;
  color: #555; cursor: pointer; white-space: nowrap;
  border-radius: 6px 6px 0 0;
}
.addit-tab:hover { background: #eef1f4; color: #1a2026; }
.addit-tab.on   { color: #1a2026; border-bottom-color: #8DC63F; background: #fff; }
.addit-tab ion-icon { font-size: 16px; }
.addit-tab .addit-count { background: #e9ecef; color: #455; }
.addit-tab.on .addit-count { background: #8DC63F; color: #fff; }

.addit-tab-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.addit-tab-search ion-icon { color: #888; font-size: 18px; }
.addit-tab-search input {
  flex: 1; border: 1px solid #e0e3e7; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; outline: none;
}
.addit-tab-search input:focus { border-color: #8DC63F; box-shadow: 0 0 0 3px rgba(141,198,63,0.18); }

.addit-inbox-actions {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}

/* Audit log table */
.addit-audit { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.addit-audit thead th {
  position: sticky; top: 0; background: #fafbfc; z-index: 1;
  text-align: left; padding: 8px 10px; font-weight: 800; color: #455;
  border-bottom: 2px solid #e9ecef;
}
.addit-audit tbody td { padding: 8px 10px; border-bottom: 1px solid #f1f3f5; vertical-align: top; }
.addit-audit tbody tr:hover { background: #fcfdfe; }
.audit-action {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px;
  background: #e9ecef; color: #455;
}
.audit-action.a-accept   { background: #e6f4ea; color: #1d7c3a; }
.audit-action.a-admin    { background: #e3f2fd; color: #1565c0; }
.audit-action.a-submit   { background: #fff7e0; color: #b87e00; }
.audit-action.a-reject   { background: #fde2e1; color: #b3261e; }
.audit-action.a-soft     { background: #fde2e1; color: #b3261e; }
.audit-action.a-cancel   { background: #efeae6; color: #6b5b50; }
.audit-action.a-restore  { background: #e6f4ea; color: #1d7c3a; }

.addit-audit-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 10px 16px; border-top: 1px solid #f0f0f0; background: #fafbfc;
}

/* ════════════════════════════════════════════════════════════════
   CARD admin/owner action cluster (top-right of card image)
   ════════════════════════════════════════════════════════════════ */
.card-admin-actions {
  position: absolute; top: 8px; right: 44px;
  display: flex; gap: 4px; z-index: 4;
  opacity: 0; transition: opacity 0.18s ease;
}
.card:hover .card-admin-actions,
.card:focus-within .card-admin-actions { opacity: 1; }
.card-admin-btn {
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: #1a2026;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.12s ease, background 0.12s ease;
}
.card-admin-btn:hover { transform: scale(1.08); background: #fff; }
.card-admin-btn ion-icon { font-size: 16px; }
.card-edit:hover { color: #1565c0; }
.card-del:hover  { color: #b3261e; }

@media (hover: none) {
  /* On touch devices, always show admin actions (no hover) */
  .card-admin-actions { opacity: 1; }
}

/* -- Bulk Upload tab -- */
.addit-bulk { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
.addit-bulk-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: #f5f8fb; border: 1px solid #e3e9ee; border-radius: 8px; font-size: 13px; }
.addit-bulk-status ion-icon { font-size: 18px; color: #2c3e50; }
.addit-bulk-status code { background: #e9eef3; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.addit-bulk-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 32px 20px; border: 2px dashed #c9d3dc; border-radius: 12px; background: #fbfcfd; cursor: pointer; transition: all .15s; text-align: center; }
.addit-bulk-drop:hover, .addit-bulk-drop.on { border-color: #8DC63F; background: #f4faea; }
.addit-bulk-drop ion-icon { font-size: 36px; color: #8DC63F; }
.addit-bulk-drop h4 { margin: 4px 0; font-size: 15px; color: #1a2026; }
.addit-bulk-drop p { margin: 0; font-size: 13px; color: #556; }
.addit-bulk-drop small { display: block; max-width: 480px; color: #889; font-size: 11.5px; line-height: 1.4; margin-top: 4px; }
.addit-bulk-drop .addit-link { color: #8DC63F; font-weight: 600; }
.addit-bulk-result { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.addit-bulk-loading { display: flex; align-items: center; gap: 8px; color: #555; }
.addit-bulk-loading ion-icon { animation: addit-spin 1s linear infinite; }
@keyframes addit-spin { to { transform: rotate(360deg); } }
.addit-bulk-ok { background: #e8f6e0; border: 1px solid #c5e4a3; color: #2d5016; padding: 10px 12px; border-radius: 8px; }
.addit-bulk-err { background: #fdecec; border: 1px solid #f3b3b3; color: #7a1f1f; padding: 10px 12px; border-radius: 8px; }
.addit-bulk-errcount { display: inline-block; margin-left: 10px; background: #ffd9d9; color: #8b1a1a; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.addit-bulk-help { font-size: 12.5px; color: #556; }
.addit-bulk-help summary { cursor: pointer; padding: 6px 0; }
.addit-bulk-help pre { background: #1f2730; color: #eef2f6; padding: 12px; border-radius: 6px; overflow-x: auto; font-size: 11.5px; line-height: 1.5; }


/* ════════════════════════════════════════════════════════════════
   SEARCHABLE COMBO-BOX  (.addit-combo)
   ════════════════════════════════════════════════════════════════ */
.addit-combo { position: relative; display: block; }

/* Outer border wrapper — replaces the default input border */
.addit-combo-inner {
  display: flex; align-items: stretch;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.addit-combo-inner:focus-within {
  border-color: #8DC63F;
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.18);
}

/* Text input — no border/shadow of its own (parent handles it) */
.addit-combo-input {
  flex: 1; min-width: 0;
  border: 0 !important; outline: none !important;
  box-shadow: none !important;
  background: transparent;
  padding: 8px 10px;
  font: inherit; font-size: 13px;
  color: #1a2026;
}

/* Caret toggle button */
.addit-combo-caret {
  background: none; border: 0;
  border-left: 1px solid #e8eaed;
  padding: 0 9px;
  cursor: pointer; color: #888;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.addit-combo-caret:hover { background: #f5f6f8; color: #444; }
.addit-combo-caret ion-icon { font-size: 15px; pointer-events: none; }

/* Dropdown list */
.addit-combo-list {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  z-index: 99999;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  max-height: 230px;
  overflow-y: auto;
  list-style: none;
  margin: 0; padding: 4px 0;
  scroll-behavior: smooth;
}

/* Each option row */
.addit-combo-opt {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px; color: #1a2026;
  display: flex; align-items: center; gap: 7px;
  transition: background 0.1s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.addit-combo-opt:hover,
.addit-combo-opt.addit-combo-hi {
  background: #f3faea; color: #4a7c1a;
}
.addit-combo-opt.addit-combo-selected {
  background: #eaf6d4; font-weight: 700; color: #4a7c1a;
}

/* "Add new…" row */
.addit-combo-opt.addit-combo-create {
  color: #5a9a1c; font-weight: 700;
  border-top: 1px solid #edf0e8;
  margin-top: 2px;
}
.addit-combo-opt.addit-combo-create strong { font-weight: 800; }
.addit-combo-opt.addit-combo-create ion-icon { font-size: 15px; flex-shrink: 0; }

/* Empty / no-matches row */
.addit-combo-empty {
  padding: 10px 14px;
  font-size: 12px; color: #999;
  text-align: center;
  list-style: none;
}
