/* ==========================================================================
   Skill Full — memakai kerangka Skill Stock/Import (css/laporan-stok.css,
   css/skill-import.css). Yang di sini: tiga kotak unggah A/B/C, lencana
   keyakinan pencocokan, dan penanda baris D yang punya stok perjalanan.
   ========================================================================== */
.full-unggah { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .full-unggah { grid-template-columns: 1fr; } }

.full-kotak {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--card);
  cursor: pointer;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .12s ease, background .12s ease;
}
.full-kotak:hover, .full-kotak.seret { border-color: var(--red); background: #FFF5F5; }
.full-kotak.terisi { border-style: solid; border-color: #86EFAC; background: #F0FDF4; }
.full-kotak-kepala { display: flex; align-items: flex-start; gap: 10px; }
.full-kotak-kepala strong { display: block; font-size: 0.86rem; color: var(--ink); }
.full-kotak-kepala small { display: block; font-size: 0.72rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.full-kotak-huruf {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 0.95rem;
}
.full-kotak.terisi .full-kotak-huruf { background: #16A34A; }
.full-kotak-isi { font-size: 0.78rem; line-height: 1.5; margin-top: auto; }
.full-kotak-kosong { color: var(--muted); font-weight: 600; }
.full-kotak-berkas { color: #166534; font-weight: 700; word-break: break-word; }
.full-reset { margin: 10px 0 0; font-size: 0.8rem; text-align: right; }

.full-judul { font-size: 0.95rem; font-weight: 800; margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.full-perlu { font-size: 0.72rem; font-weight: 700; color: #B45309; background: #FEF3C7; padding: 2px 9px; border-radius: 999px; }
.full-perlu--redup { color: var(--muted); background: var(--bg); font-weight: 600; }
.full-bungkus { max-height: 56vh; overscroll-behavior: auto; } /* mentok -> guliran lanjut ke halaman (lihat teruskanGulirKeHalaman) */

/* Lencana kesesuaian pencocokan Dokumen C: sesuai (hijau), perlu dicek
   (kuning), tdk sesuai / item baru (ungu - bukan kegagalan, barangnya memang
   belum ada di Dokumen A). */
.full-tingkat { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.full-tingkat-sesuai { background: #DCFCE7; color: #166534; }
.full-tingkat-cek    { background: #FEF3C7; color: #92400E; }
.full-tingkat-tidak  { background: #EDE9FE; color: #5B21B6; }
.full-tabel-c tbody tr.full-tk-cek { background: #FFFDF5; }
.full-tabel-c tbody tr.full-tk-tidak { background: #FBFAFF; }
/* Tanda hasil dari memori (pernah dicocokkan/dikoreksi sebelumnya). */
.full-c-memori { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; background: #ECFDF5; color: #047857 !important; font-size: 0.68rem; font-weight: 700; font-style: normal; }
/* Baris Dokumen D/E yang pasangan C-nya masih "perlu dicek". */
.stok-d-tabel tbody tr.full-cek td { background: #FFFBEB; }
.full-cek-tanda { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 0.66rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.full-cek-angka { color: #B45309; font-weight: 800; }
/* Baris Dokumen E yang ditambahkan tangan dari D, dengan tombol keluarkan. */
.full-manual-tanda { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 1px 4px 1px 7px; border-radius: 999px; background: #E0E7FF; color: #3730A3; font-size: 0.66rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.full-manual-hapus { width: 16px; height: 16px; border: 0; border-radius: 50%; background: rgba(55, 48, 163, .15); color: #3730A3; font-size: 0.85rem; line-height: 1; cursor: pointer; padding: 0; }
.full-manual-hapus:hover { background: var(--red); color: #fff; }
.full-tambah-e .full-tambah-e-item { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.full-tambah-e .full-tambah-e-item input { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--red); }
.full-tambah-e-teks { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.full-tambah-e-gbr { flex-shrink: 0; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--bg); border: 1px solid var(--border); }
.full-tambah-e-angka { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.full-tambah-e-angka em { font-style: normal; font-size: 0.7rem; color: var(--muted); }
.full-tambah-e-angka em b { color: var(--ink); font-weight: 700; margin-left: 3px; }
/* Dokumen F: tanpa gambar/SKU */
.full-tabel-f .skill-nama { white-space: normal; min-width: 260px; }
.full-f-spek, .full-f-sumber { white-space: normal; min-width: 140px; color: var(--muted); font-size: 0.74rem; }
.full-f-kosong { margin-bottom: 16px; }
.full-c-nama { white-space: normal; min-width: 240px; line-height: 1.35; }
.full-c-nama small { color: var(--muted); }
.full-c-sumber { font-style: italic; }
.full-c-pilih { min-width: 260px; }
.full-c-pilih select {
  width: 100%; max-width: 420px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; font-family: inherit; font-size: 0.76rem; color: var(--ink);
}
/* Dokumen D: baris yang sudah ada stok perjalanan diredupkan sedikit -
   yang paling atas (belum dipesan) itulah yang perlu dipesan. */
.stok-d-tabel tbody tr.full-ada-jalan td { color: var(--muted); }

/* Daftar berkas di dalam tiap kotak (satu slot boleh beberapa berkas). */
.full-kotak-daftar { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.full-kotak-daftar li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.76rem; color: #166534; font-weight: 700; }
.full-kotak-daftar li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-kotak-daftar em { font-style: normal; font-weight: 600; color: var(--muted); }
.full-kotak-hapus {
  flex-shrink: 0; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(22, 101, 52, .1); color: #166534; font-size: 1rem; line-height: 1; cursor: pointer;
}
.full-kotak-hapus:hover { background: var(--red); color: #fff; }
.full-kotak-tambah { font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.full-kotak-tersimpan { flex-shrink: 0; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(22, 101, 52, .1); color: #166534; font-size: 0.8rem; }
/* Kotak C: "Klik atau seret berkas ke sini  atau  [Ambil dari Laporan Impor]" */
.full-kotak-atau { font-size: 0.72rem; color: var(--muted); margin: 0 6px; }
.full-kotak-impor {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--red); border-radius: 999px;
  background: #fff; color: var(--red); font-family: inherit; font-size: 0.72rem; font-weight: 800; cursor: pointer; vertical-align: middle;
}
.full-kotak-impor:hover { background: var(--red); color: #fff; }
.full-kotak.terisi .full-kotak-impor { border-color: #16A34A; color: #166534; }
.full-kotak.terisi .full-kotak-impor:hover { background: #16A34A; color: #fff; }
/* Pop-up pilih lampiran order Laporan Impor */
.full-impor-order { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.full-impor-order:last-child { border-bottom: 0; }
.full-impor-kepala { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; margin-bottom: 4px; }
.full-impor-kepala b { color: var(--ink); }
.full-impor-kepala em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: #4F46E5; }
.full-impor-kepala span { font-size: 0.72rem; color: var(--muted); margin-left: auto; }
.full-impor-lampiran { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 0.76rem; }
.full-impor-lampiran:hover { background: var(--bg); }
.full-impor-lampiran.aktif { background: #FEF2F2; box-shadow: inset 3px 0 0 var(--red); }
.full-impor-lampiran input { flex-shrink: 0; width: 15px; height: 15px; accent-color: var(--red); }
.full-impor-jenis { flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: #E0E7FF; color: #3730A3; font-size: 0.66rem; font-weight: 800; }
.full-impor-nama { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.full-impor-kosong { margin: 0; font-size: 0.72rem; font-style: italic; color: var(--muted); }
.full-riwayat-info { margin-bottom: 10px; }
.full-riwayat-supplier { color: var(--red); font-weight: 800; }

/* Pop-up nama supplier saat menyimpan ke riwayat */
.full-supplier { max-width: 420px; width: 100%; }
.full-supplier .dok-dialog-judul { font-size: 0.98rem; font-weight: 800; margin: 0 0 4px; }
.full-supplier-ket { font-size: 0.78rem; color: var(--muted); margin: 0 0 10px; line-height: 1.45; }
.full-supplier-input {
  width: 100%; box-sizing: border-box; padding: 11px 12px; margin-bottom: 14px;
  border: 1.5px solid #CBD0D8; border-radius: var(--radius-sm); background: var(--bg);
  font-family: inherit; font-size: 0.95rem; font-weight: 700; color: var(--ink); outline: none;
}
.full-supplier-input:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(228, 33, 43, .12); }
/* Gambar di tabel D/E memakai ukuran Skill Stock (.stok-d-gambar 96px PC /
   42px HP, css/laporan-stok.css). Nama boleh melipat supaya baris tidak
   memanjang ke samping. */
.skill-hasil .stok-d-tabel .skill-nama { white-space: normal; min-width: 260px; }

/* ---- Preview Dokumen D/E ------------------------------------------------
   Halaman PDF (kanvas A4 yang sama dengan yang diunduh) ditumpuk di dialog
   yang bisa digulir; kaki dialog tetap terlihat: Tutup | Share | Download. */
.full-preview-overlay { padding: 12px; }
.full-preview {
  max-width: min(900px, 100%);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  padding: 14px 16px 12px;
  overflow: hidden;
  background: #EEF0F3;
}
.full-preview-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.full-preview-kepala .dok-dialog-judul { margin: 0; }
.full-preview-x {
  position: static;
  width: 32px; height: 32px;
  background: rgba(15, 23, 42, .08);
  color: var(--ink);
  font-size: 1.3rem;
}
.full-preview-x:hover { background: rgba(15, 23, 42, .16); }
.full-preview-isi {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px -4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.full-preview-halaman {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
  border-radius: 3px;
}
.full-preview-kaki { flex-shrink: 0; margin-top: 0; }
@media (max-width: 600px) {
  .full-preview { padding: 10px 10px 10px; }
  .full-preview-kaki .confirm-modal-btn { padding-left: 10px; padding-right: 10px; }
}

/* ---- Kepala Dokumen D/E: judul di kiri, tombolnya di ujung kanan sebaris.
   Tombol Simpan sendirian di tengah baris aksi. */
.full-aksi-simpan { justify-content: center; margin: 4px 0 6px; }
.full-dok-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.full-dok-kepala .full-judul { margin: 0; }
.full-dok-tombol { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.full-dok-tombol .stok-btn { padding: 7px 12px; font-size: 0.8rem; }
/* Hanya "Buat Restock" yang merah (sama seperti tombol utama lain) - Preview/
   Share/Download tetap putih, supaya Buat Restock tetap paling menonjol. */
.full-dok-tombol .stok-btn[data-dok="restock"] { background: var(--red); border-color: var(--red); color: #fff; }
.full-dok-tombol .stok-btn[data-dok="restock"]:hover { background: var(--red-dark); }
.full-dok-tombol .stok-btn[data-dok="restock"]:disabled { background: #94A3B8; border-color: #94A3B8; }
@media (max-width: 600px) {
  .full-dok-tombol { margin-left: 0; width: 100%; }
  .full-dok-tombol .stok-btn { flex: 1; padding: 7px 6px; font-size: 0.76rem; }
}

/* ---- Pencocokan C -> A: keyakinan bisa diubah, barang A dipilih lewat pencari ---- */
.full-tingkat-pilih {
  appearance: none; -webkit-appearance: none;
  border: 0; cursor: pointer; font-family: inherit;
  padding-right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 11px 11px;
}
.full-c-pilih-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; max-width: 420px; padding: 6px 8px 6px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; font-family: inherit; font-size: 0.76rem; font-weight: 600; color: var(--ink);
  text-align: left; cursor: pointer;
}
.full-c-pilih-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-c-pilih-btn svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--muted); }
.full-c-pilih-btn:hover { border-color: var(--red); }
.full-c-pilih-btn:hover svg { color: var(--red); }
.full-c-pilih-btn--kosong { color: var(--muted); font-style: italic; }

.full-pilih-a { max-width: min(640px, calc(100vw - 40px)); width: 100%; display: flex; flex-direction: column; max-height: min(80vh, 640px); }
.full-pilih-a .dok-dialog-judul { font-size: 0.98rem; font-weight: 800; margin: 0 0 4px; }
.full-pilih-a-untuk { font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.45; }
.full-pilih-a-untuk small { color: var(--muted); }
.full-pilih-a-cari {
  width: 100%; box-sizing: border-box; padding: 11px 12px; margin-bottom: 10px;
  border: 1.5px solid #CBD0D8; border-radius: var(--radius-sm); background: var(--bg);
  font-family: inherit; font-size: 0.9rem; font-weight: 600; color: var(--ink); outline: none;
}
.full-pilih-a-cari:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(228, 33, 43, .12); }
.full-pilih-a-daftar { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 12px; }
.full-pilih-a-item {
  display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 8px; background: transparent; font-family: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.full-pilih-a-item b { font-size: 0.8rem; color: #4F46E5; }
.full-pilih-a-item span { font-size: 0.76rem; color: var(--ink-soft); }
.full-pilih-a-item:hover { background: var(--bg); }
.full-pilih-a-item.aktif { background: #FEF2F2; box-shadow: inset 3px 0 0 var(--red); }
.full-pilih-a-item--kosong { font-size: 0.8rem; font-style: italic; color: var(--muted); }
.full-pilih-a .confirm-modal-actions { flex-shrink: 0; }
