/* ============================================================
   PROJECT MANHATTAN — product.css
   Font: DM Sans | Primary: #1a6fdb | Consistent with Species pages
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #f4f6fb;
  color: #1a1a2e;
  min-height: 100vh;
  font-size: 14px;
}

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── LEFT PANEL ──────────────────────────────────────────── */
.left-panel {
  width: 220px;
  min-width: 220px;
  background: #fff;
  border-right: 1px solid #e8eaf0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Photo block */
.product-photo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.photo-placeholder {
  width: 140px;
  height: 120px;
  border: 1.5px solid #d0d4e0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9aa0b4;
  background: #f9fafc;
  font-size: 12px;
  text-align: center;
  overflow: hidden;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-upload-photo {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #d0d4e0;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #4a4e69;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-upload-photo:hover { border-color: #1a6fdb; color: #1a6fdb; }

/* Summary fields */
.summary-fields { display: flex; flex-direction: column; gap: 12px; }

.summary-field { display: flex; flex-direction: column; gap: 2px; }

.summary-label {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
}

.summary-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.summary-value {
  font-size: 12px;
  color: #9aa0b4;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pencil-btn {
  background: none;
  border: none;
  color: #b0b4c8;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.pencil-btn:hover { color: #1a6fdb; background: #eef0fc; }

/* Bulk upload block */
.bulk-upload-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-bulk-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1a6fdb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-bulk-upload:hover { background: #3451d1; }

.bulk-hint {
  font-size: 11px;
  color: #9aa0b4;
  text-align: center;
  line-height: 1.5;
}

/* Left panel footer */
.left-panel-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f2f8;
  position: relative;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a6fdb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
}

.user-email {
  font-size: 11px;
  color: #9aa0b4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #9aa0b4;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}
.profile-menu-btn:hover { color: #1a6fdb; }

.profile-dropdown {
  position: absolute;
  bottom: 40px;
  right: 0;
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  min-width: 120px;
  z-index: 100;
  overflow: hidden;
}
.profile-dropdown button {
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #e63946;
  cursor: pointer;
  font-weight: 500;
}
.profile-dropdown button:hover { background: #fff5f5; }

/* ── RIGHT PANEL ──────────────────────────────────────────── */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top actions */
.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.btn-save {
  padding: 6px 18px;
  border-radius: 7px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #1a6fdb;
  color: #fff;
  transition: background 0.22s, transform 0.15s;
  position: relative;
}
.btn-save:hover { background: #22c55e; transform: translateY(-1px); }

.btn-cancel {
  padding: 6px 18px;
  border-radius: 7px;
  border: 1.5px solid #d0d4e0;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #4a4e69;
  transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.15s;
}
.btn-cancel:hover { background: #e63946; color: #fff; border-color: #e63946; transform: translateY(-1px); }

/* ── TAB NAV ─────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 8px;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  overflow-x: auto;
  align-items: center;
}

.tab-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1.5px solid #e0e3ed;
  background: #fff;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.tab-pill:hover { border-color: #1a6fdb; color: #1a6fdb; }
.tab-pill.active {
  color: #fff;
  background: #1a6fdb;
  border-color: #1a6fdb;
  border-radius: 7px;
  font-weight: 600;
}
.tab-pill.completed {
  border-color: #1a6fdb;
  color: #1a6fdb;
  background: #eef4fd;
}
.tab-pill.completed .tab-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #1a6fdb;
  border-radius: 50%;
  flex-shrink: 0;
}
.tab-pill:not(.completed) .tab-check { display: none; }

.tab-pill.invalid {
  border-color: #e63946;
  color: #e63946;
  background: #fff5f5;
}

.tab-pill.invalid .tab-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #e63946;
  border-radius: 50%;
  flex-shrink: 0;
}

.tab-pill.invalid .tab-check svg polyline {
  stroke: #fff;
  stroke-dasharray: 20;
  stroke-dashoffset: 0;
}

.btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #1a6fdb;
}

.btn-save:disabled:hover {
  background: #1a6fdb;
  transform: none;
}


.tab-pill.invalid .tab-check::after {
  content: '✕';
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.tab-pill.invalid .tab-check svg {
  display: none;
}

/* ── TAB PANELS ──────────────────────────────────────────── */
.tab-panels { flex: 1; padding: 28px; overflow-y: auto; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── FORM SECTIONS ───────────────────────────────────────── */
.form-section {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f2f8;
}
.section-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.section-header p {
  font-size: 12px;
  color: #9aa0b4;
}

/* ── GRIDS ───────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px 20px; margin-bottom: 16px; }
.form-grid:last-child { margin-bottom: 0; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── FORM FIELDS ─────────────────────────────────────────── */
.form-field { display: flex; flex-direction: column; gap: 4px; }

.form-grid .form-field {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 4px;
}

.form-grid .form-field input,
.form-grid .form-field select,
.form-grid .form-field textarea {
  align-self: end;
}

.field-hint {
  font-size: 11px;
  color: #9aa0b4;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.form-field.full-width { grid-column: 1 / -1; }

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
}

.field-hint {
  font-size: 11px;
  color: #9aa0b4;
  line-height: 1.4;
  margin-bottom: 2px;
}

.required { color: #e63946; }

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e0e3ed;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #1a1a2e;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #1a6fdb;
  box-shadow: 0 0 0 3px rgba(67,97,238,0.10);
}

input[readonly] {
  background: #f9fafc;
  color: #9aa0b4;
}

input.field-invalid,
select.field-invalid,
textarea.field-invalid {
  border-color: #e63946 !important;
  background: #fff8f8;
}

input.field-invalid:focus,
select.field-invalid:focus,
textarea.field-invalid:focus {
  border-color: #e63946 !important;
  box-shadow: 0 0 0 3px rgba(230,57,70,0.10);
}

select {
 background-image: none;
  appearance: auto;
  -webkit-appearance: auto;
  padding-right: 8px;
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

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

select:disabled, input:disabled {
  background: #f4f6fb;
  color: #b0b4c8;
  border-color: #e8eaf0;
  cursor: not-allowed;
}

/* Field error */
.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #e63946;
  font-weight: 500;
  margin-top: 2px;
}

/* ── DUAL MODE TOGGLE ─────────────────────────────────────── */
.dual-mode-toggle {
  display: flex;
  border: 1.5px solid #e0e3ed;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}

.mode-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.mode-btn.active {
  background: #1a6fdb;
  color: #fff;
  font-weight: 600;
}

.dual-mode-content { display: flex; flex-direction: column; }

/* ── SHELF LIFE COMBO ────────────────────────────────────── */
.shelf-life-combo {
  display: flex;
  gap: 8px;
  align-items: center;
}
.shelf-life-combo input { flex: 1; }
.shelf-life-combo select {
  width: 100px;
  flex-shrink: 0;
  background: #1a6fdb !important;
  color: #fff;
  font-weight: 600;
  border-color: #1a6fdb;
  background-image: none !important;
  -webkit-appearance: menulist !important;
  appearance: menulist !important;
  padding-right: 8px;
}

/* ── CHECKBOX LABEL ──────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4a4e69;
  cursor: pointer;
  margin-top: 6px;
  font-weight: 500;
}
.checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #1a6fdb;
  cursor: pointer;
}

/* ── TWO COL CARDS ───────────────────────────────────────── */
.two-col-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .two-col-cards { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header { padding-bottom: 14px; border-bottom: 1px solid #f0f2f8; }
.card-header h2 { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.card-header p { font-size: 12px; color: #9aa0b4; }

/* ── ALLERGEN ROWS ───────────────────────────────────────── */
.allergen-row {
  background: #f9fafc;
  border: 1px solid #e8eaf0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.allergen-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.allergen-row-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-remove-row {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #e63946;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.btn-remove-row:hover { background: #fff0f1; }

/* Containment level color-coded options */
.containment-select option[value="contain"] { color: #22c55e; font-weight: 600; }
.containment-select option[value="free_from"] { color: #1a6fdb; font-weight: 600; }
.containment-select option[value="may_contain"] { color: #f59e0b; font-weight: 600; }

.containment-contain { border-color: #22c55e !important; color: #22c55e !important; }
.containment-free_from { border-color: #1a6fdb !important; color: #1a6fdb !important; }
.containment-may_contain { border-color: #f59e0b !important; color: #f59e0b !important; }

/* ── ADD ROW BUTTON ──────────────────────────────────────── */
.btn-add-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px dashed #1a6fdb;
  border-radius: 8px;
  padding: 9px 16px;
  color: #1a6fdb;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  transition: background 0.18s;
}
.btn-add-row:hover { background: #eef0fc; }

/* ── NUTRITION ROWS ──────────────────────────────────────── */
.nutrition-cards .card { gap: 0; }

.nutrition-row {
  display: grid;
  grid-template-columns: 1fr 100px 70px 32px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f8;
}
.nutrition-row:last-child { border-bottom: none; }

.nutrition-row .nutrient-name {
  font-size: 13px;
  color: #1a1a2e;
  font-weight: 500;
}

.nutrition-row input[type="text"],
.nutrition-row input[type="number"] {
  padding: 6px 8px;
  font-size: 12px;
}

.btn-delete-nutrient {
  background: none;
  border: none;
  color: #d0d4e0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-delete-nutrient:hover { color: #e63946; background: #fff0f1; }

.nutrition-rows { margin-bottom: 8px; }

/* ── MULTISELECT ─────────────────────────────────────────── */
.custom-multiselect { position: relative; }

.multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1.5px solid #e0e3ed;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s;
  user-select: none;
}
.multiselect-trigger:hover { border-color: #1a6fdb; }

.multiselect-placeholder { font-size: 13px; color: #9aa0b4; }

.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #e0e3ed;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
}

.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #1a1a2e;
  cursor: pointer;
  transition: background 0.15s;
}
.multi-option:hover { background: #f4f6fb; }
.multi-option input[type="checkbox"] { accent-color: #1a6fdb; }

.multiselect-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #eef0fc;
  color: #1a6fdb;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.tag-chip button {
  background: none;
  border: none;
  color: #1a6fdb;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

/* ── DROPZONE ────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed #d0d4e0;
  border-radius: 10px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #9aa0b4;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.dropzone:hover { border-color: #1a6fdb; background: #f4f6fb; }

.dropzone-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn-browse {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #d0d4e0;
  border-radius: 8px;
  padding: 8px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #4a4e69;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  width: 100%;
  justify-content: center;
}
.btn-browse:hover { border-color: #1a6fdb; color: #1a6fdb; }

.btn-upload-file {
  width: 100%;
  padding: 9px;
  background: #1a6fdb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-upload-file:hover { background: #3451d1; }

.upload-hint-center {
  text-align: center;
  font-size: 12px;
  color: #9aa0b4;
  margin-bottom: 12px;
}

/* ── FILE LIST ───────────────────────────────────────────── */
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f4f6fb;
  border: 1px solid #e0e3ed;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #4a4e69;
}
.file-chip button {
  background: none;
  border: none;
  color: #e63946;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.file-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e0e3ed;
}

/* ── ART WORK TAB ────────────────────────────────────────── */
/* ── ART WORK TAB ────────────────────────────────────────── */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .artwork-grid { grid-template-columns: 1fr; }
}

.artwork-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9fafc;
  border: 1.5px solid #e8eaf0;
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.artwork-card:hover { border-color: #1a6fdb; }

.artwork-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.artwork-card-info > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.artwork-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
}

.artwork-card-hint {
  font-size: 11px;
  color: #9aa0b4;
}

.btn-artwork-browse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  background: #fff;
  border: 1.5px solid #d0d4e0;
  border-radius: 6px;
  padding: 5px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #4a4e69;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-artwork-browse:hover { border-color: #1a6fdb; color: #1a6fdb; }


.shelf-life-combo select option {
  background: #fff;
  color: #1a1a2e;
  font-weight: 500;
}


/* ── SAVE TOOLTIP ────────────────────────────────────────── */
.btn-save::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a2e;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
}
.btn-save::before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  right: 16px;
  border: 5px solid transparent;
  border-bottom-color: #1a1a2e;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 999;
}
.btn-save:disabled:hover::after,
.btn-save:disabled:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* ── UTILITIES ───────────────────────────────────────────── */
.hidden { display: none !important; }

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── BULK UPLOAD MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 40, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  max-width: 400px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
  text-align: center;
  animation: modalPop 0.25s ease;
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  width: 56px;
  height: 56px;
  background: #eef4fd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}

.modal-body {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

.modal-body strong {
  color: #1a1a2e;
  font-weight: 600;
}

.modal-ok-btn {
  margin-top: 6px;
  padding: 9px 32px;
  background: #1a6fdb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.modal-ok-btn:hover { background: #1560c4; transform: translateY(-1px); }

.modal-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.modal-cancel-btn {
  flex: 1;
  padding: 9px;
  background: #fff;
  border: 1.5px solid #e0e3ed;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #4a4e69;
  cursor: pointer;
  transition: border-color 0.2s;
}
.modal-cancel-btn:hover { border-color: #1a6fdb; color: #1a6fdb; }

.modal-discard-btn {
  flex: 1;
  padding: 9px;
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-discard-btn:hover { background: #c1121f; }