/* =========================================================
   SIMASET - Stylesheet Utama
   ========================================================= */

:root {
  --brand-1: #3d7a74;
  --brand-2: #64748b;
  --brand-grad: none;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Halaman Publik (Scan) ---------- */
.scan-body {
  background: #f3f4f6;
  min-height: 100vh;
}

.glass-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.room-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.room-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 10px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  transition: transform .15s ease, box-shadow .15s ease;
}
.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}
.room-card-icon { font-size: 1.6rem; color: var(--brand-1); margin-bottom: 8px; }
.room-card-name { font-weight: 600; color: #1e293b; font-size: .92rem; line-height: 1.25; min-height: 2.4em; }
.room-card-count { color: #64748b; font-size: .8rem; margin-top: 4px; }

.stat-big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--brand-1);
  line-height: 1;
}

.dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:4px; }
.dot-success { background:#6fb28c; }
.dot-warning { background:#e0b45a; }
.dot-danger { background:#d97b72; }



.detail-label { font-size: .72rem; text-transform: uppercase; font-weight: 700; color: #94a3b8; letter-spacing: .03em; }
.detail-value { font-size: .95rem; color: #1e293b; font-weight: 500; }

/* Timeline riwayat perpindahan */
.timeline { list-style:none; padding-left: 0; margin:0; position:relative; }
.timeline li { position:relative; padding-left: 28px; padding-bottom: 20px; border-left: 2px solid #e2e8f0; margin-left: 6px; }
.timeline li:last-child { border-left: 2px solid transparent; padding-bottom:0; }
.timeline-dot { position:absolute; left:-7px; top:2px; width:12px; height:12px; border-radius:50%; background: var(--brand-1); border:2px solid #fff; box-shadow:0 0 0 2px var(--brand-1); }
.timeline-content { padding-left: 6px; }

/* ---------- Login ---------- */
.login-body { background: #f3f4f6; }
.login-card { border-radius: 18px; max-width: 400px; width: 100%; }

/* ---------- Admin Panel ---------- */
.admin-body { background: #f3f4f6; }
.admin-navbar { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.admin-navbar .nav-link { color:#475569; font-weight:500; font-size:.92rem; }
.admin-navbar .nav-link.active, .admin-navbar .nav-link:hover { color: var(--brand-1); }
.admin-navbar .navbar-brand { color: var(--brand-1); }

.kpi-card {
  background:#fff; border-radius:14px; padding:20px; box-shadow:0 4px 14px rgba(0,0,0,0.06);
  border-left:4px solid var(--brand-1);
}
.kpi-card .kpi-value { font-size:1.9rem; font-weight:800; color:#1e293b; }
.kpi-card .kpi-label { color:#64748b; font-size:.82rem; font-weight:600; text-transform:uppercase; }


.card { border-radius: 14px; border: 1px solid #e2e8f0; }

/* ---------- Cetak Berita Acara / Barcode ---------- */
@media print {
  .no-print { display:none !important; }
  body { background:#fff !important; }
}
.ba-doc { max-width: 750px; margin: 0 auto; background:#fff; padding: 40px; font-size:.95rem; line-height:1.6; }
.ba-doc h4 { text-align:center; margin-bottom:2px; }
.ba-signature-box { width:220px; text-align:center; }
.ba-signature-line { margin-top:70px; border-bottom:1px solid #333; }

.label-print { width: 240px; border:1px dashed #94a3b8; border-radius:8px; padding:12px; text-align:center; display:inline-block; margin:6px; page-break-inside: avoid; }
.label-print img { width:140px; height:140px; }

/* ---------- Palet kalem (override Bootstrap) ---------- */
:root {
  --bs-primary: #3d7a74; --bs-primary-rgb: 61,122,116;
  --bs-link-color: #3d7a74; --bs-link-color-rgb: 61,122,116;
  --bs-link-hover-color: #2f625d; --bs-link-hover-color-rgb: 47,98,93;
}
.btn-primary {
  --bs-btn-bg:#3d7a74; --bs-btn-border-color:#3d7a74;
  --bs-btn-hover-bg:#326660; --bs-btn-hover-border-color:#2f625d;
  --bs-btn-active-bg:#2f625d; --bs-btn-active-border-color:#2b5853;
  --bs-btn-disabled-bg:#3d7a74; --bs-btn-disabled-border-color:#3d7a74;
}
.btn-outline-primary {
  --bs-btn-color:#3d7a74; --bs-btn-border-color:#3d7a74;
  --bs-btn-hover-bg:#3d7a74; --bs-btn-hover-border-color:#3d7a74;
  --bs-btn-active-bg:#3d7a74; --bs-btn-active-border-color:#3d7a74;
}
.badge.bg-success { background-color:#5a9a78 !important; }
.badge.bg-warning { background-color:#d9a94a !important; color:#fff !important; }
.badge.bg-danger  { background-color:#c96b63 !important; }
.badge.bg-info    { background-color:#7da3b5 !important; color:#fff !important; }
.progress-bar.bg-success { background-color:#6fb28c !important; }
.chart-box { max-width: 220px; margin: 0 auto; }

/* ---------- Responsif PC & HP ---------- */
.page-wrap { max-width: 1400px; }
.room-hero { padding: 18px 20px; }
.room-hero h2 { font-size: 1.35rem; }
.hero-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: #e8efee; color: #3d7a74; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 768px) {
  .room-hero h2 { font-size: 1.6rem; }
  .room-hero { padding: 22px 26px; }
}
@media (min-width: 992px) {
  .stat-big { font-size: 3rem; }
}
@media (max-width: 575.98px) {
  .stat-big { font-size: 2rem; }
  .glass-card { border-radius: 14px; }
}

.chart-h { position: relative; height: 300px; }

/* ---------- Kartu aset (daftar di halaman ruangan) ---------- */
.asset-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.asset-mini-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.asset-mini-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 72px;              /* rasio 4:3 */
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  background: #eef1f4;
  border: 1px solid #e2e8f0;
}
.asset-mini-body { flex: 1 1 auto; min-width: 0; }
.asset-mini-title { font-weight: 600; font-size: .95rem; line-height: 1.25; color: #1e293b; }
.asset-mini-code {
  margin-top: 2px; font-size: .78rem; color: #64748b;
  font-variant-numeric: tabular-nums; letter-spacing: .2px; word-break: break-all;
}
.asset-mini-meta { font-size: .8rem; color: #64748b; }
.asset-mini-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.asset-mini-arrow { flex: 0 0 auto; color: #adb5bd; font-size: .8rem; }
@media (max-width: 575.98px) {
  .asset-mini-thumb { flex-basis: 84px; width: 84px; height: 64px; }
}

/* ---------- Foto detail aset (rasio tetap 4:3, tidak gepeng/melar) ---------- */
.asset-detail-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 460px;
  object-fit: cover;
  object-position: center;
  background: #e2e8f0;
}

/* ---------- Thumbnail tabel admin ---------- */
.table-thumb {
  width: 64px; height: 48px;   /* 4:3 */
  object-fit: cover; border-radius: 8px;
  background: #e2e8f0; border: 1px solid #e2e8f0;
}

/* ---------- Grid daftar aset: kolom menyesuaikan lebar, kartu sama tinggi ---------- */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.asset-grid > div > a { display: block; height: 100%; }
.asset-mini-card { min-height: 104px; }
.asset-mini-badges { flex-wrap: nowrap; }          /* badge selalu satu baris */
.asset-mini-badges .badge {
  font-size: .7rem; font-weight: 600; padding: .35em .6em; white-space: nowrap;
}
@media (max-width: 400px) {
  .asset-mini-badges { flex-wrap: wrap; }          /* HP sangat kecil: boleh turun baris */
}
