/**
 * card-suggest.css — Suggest Kegiatan (Header Biru Timbul & Garis Tegas)
 */

#suggestOverlay.qm-overlay {
  z-index: 1300;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#suggestModal.card-suggest {
  max-width: 520px;
  width: 94vw;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  color: #1e293b;
  position: relative;
  overflow: hidden;
  border: none;
}

/* Wavy Gradient Glow dekorasi */
.suggest-bg-wave {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
}

/* ==========================================================
   HEADER BIRU TIMBUL (Embossed & Glossy Blue Header)
   ========================================================== */
.custom-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  /* Gradasi biru dengan highlight putih di atas untuk efek timbul/3D */
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 45%, #0369a1 100%);
  border-radius: 20px 20px 0 0;
  border-top: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 4px 14px rgba(2, 132, 199, 0.35);
}

.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-icon-bulb {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.15);
}

#suggestModalTitle {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.3);
}

.cm-close-modern {
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cm-close-modern:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  transform: scale(1.06);
}

/* ==========================================================
   BODY & INPUT FORM
   ========================================================== */
.suggest-body-layout {
  position: relative;
  z-index: 1;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.suggest-desc {
  margin: 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

.suggest-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.suggest-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.suggest-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.suggest-input-wrapper.flex-1 {
  flex: 1;
}

.suggest-input-wrapper.kode-wrapper {
  width: 95px;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.suggest-input-wrapper input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 40px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.kode-wrapper input {
  padding-left: 38px;
  padding-right: 10px;
  text-align: center;
}

.suggest-input-wrapper input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.btn-suggest-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 60%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-suggest-primary:hover {
  opacity: 0.93;
}

.btn-suggest-primary:active {
  transform: scale(0.97);
}

.suggest-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.btn-suggest-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #0f172a;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-suggest-ghost:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* ==========================================================
   DAFTAR TERSIMPAN (Garis Dipertebal & Lebih Tegas)
   ========================================================== */
.suggest-modern-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 210px;
  overflow-y: auto;
  border: 2px solid #cbd5e1;       /* Garis bingkai luar dipertebal ke 2px */
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.suggest-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 2px solid #e2e8f0; /* Garis pemisah antar item dipertebal ke 2px */
  font-size: 14px;
  color: #334155;
  transition: background 0.2s;
  cursor: pointer;
}

.suggest-list-item:hover {
  background: #f1f5f9;
}

.suggest-list-item:last-child {
  border-bottom: none;              /* Baris terakhir tanpa garis bawah */
}

/* Tombol silang (X) di dalam baris */
.suggest-list-item .suggest-del {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.suggest-list-item .suggest-del:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.suggest-kode-badge {
  background: #e0f2fe;
  color: #0284c7;
  border: 1.5px solid #bae6fd;
  padding: 3px 9px;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.suggest-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Responsif Layar Kecil */
@media (max-width: 480px) {
  .suggest-input-row {
    flex-wrap: wrap;
  }
  .suggest-input-wrapper.flex-1 {
    width: 100%;
    flex: none;
  }
  .suggest-input-wrapper.kode-wrapper {
    flex: 1;
  }
  .btn-suggest-primary {
    flex: 1;
    justify-content: center;
  }
}

/* ===== Import massal (Excel / Spreadsheet / CSV) ===== */
.suggest-import-bar { display: flex; justify-content: flex-end; margin: -2px 0 8px; }
.suggest-import {
  margin: 0 0 12px; padding: 12px;
  border: 1px dashed #93c5fd; border-radius: 12px; background: rgba(59, 130, 246, .06);
}
.suggest-import[hidden] { display: none; }
.suggest-import-help { margin: 0 0 8px; font-size: 12.5px; color: #475569; line-height: 1.5; }
.suggest-import-help code { background: rgba(15, 23, 42, .08); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.suggest-import-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.suggest-import-actions label.btn-suggest-ghost { cursor: pointer; }
.suggest-import textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 72px;
  padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font: 12.5px ui-monospace, 'JetBrains Mono', monospace; background: #fff; color: #0f172a;
}
.suggest-import-preview { margin: 8px 0; font-size: 13px; color: #0f172a; max-height: 200px; overflow-y: auto; }
.suggest-import-preview .si-note { margin-top: 4px; font-size: 12px; color: #64748b; }
.suggest-import-preview .si-new { color: #15803d; font-weight: 600; }
.suggest-import-preview .si-upd { color: #b45309; font-weight: 600; }
.suggest-import-preview .si-same { color: #64748b; }
.suggest-import-preview .si-bad { color: #b91c1c; font-weight: 600; }
.suggest-import-preview ul { margin: 6px 0 0; padding-left: 18px; }
.suggest-import-preview .si-probs { color: #b91c1c; font-size: 12px; }
.suggest-import-preview small { color: #64748b; }
.suggest-import .btn-suggest-primary:disabled { opacity: .5; cursor: not-allowed; }
[data-theme="dark"] .suggest-import-help,
[data-theme="dark"] .suggest-import-preview { color: #e2e8f0; }
[data-theme="dark"] .suggest-import textarea { background: #0f172a; color: #e2e8f0; border-color: #334155; }


/* ===== Kolom Line (sugesti per line) ===== */
.suggest-input-wrapper.line-wrapper { width: 120px; }
.line-wrapper select {
  width: 100%; height: 48px; padding: 0 10px;
  border: 2px solid #cbd5e1; border-radius: 12px;
  font-size: 14px; color: #0f172a; background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.line-wrapper select:focus {
  outline: none; border-color: #0284c7; box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}
.suggest-line-badge {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: #e0f2fe; color: #0369a1;
}
.suggest-line-badge[data-line=""] { background: #f1f5f9; color: #64748b; }
@media (max-width: 480px) {
  .suggest-input-wrapper.line-wrapper { flex: 1; width: auto; }
}
