* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f9ff;
  color: #1f2937;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* =====================================================
   LOGIN — nuansa coklat muda & putih, glassmorphism
===================================================== */

#loginPage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 16%, #f6e6d6 0%, rgba(246, 230, 214, 0) 56%),
    radial-gradient(circle at 86% 84%, #f1e0cd 0%, rgba(241, 224, 205, 0) 54%),
    linear-gradient(135deg, #fdfbf8 0%, #f8efe4 46%, #f2e4d5 100%);
}

/* Cahaya lembut yang bergerak perlahan di latar */
#loginPage::before,
#loginPage::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

#loginPage::before {
  width: 380px;
  height: 380px;
  top: -120px;
  left: -100px;
  background: rgba(199, 158, 118, .42);
  animation: loginBlob 17s ease-in-out infinite;
}

#loginPage::after {
  width: 420px;
  height: 420px;
  right: -130px;
  bottom: -150px;
  background: rgba(216, 185, 152, .44);
  animation: loginBlob 21s ease-in-out infinite reverse;
}

@keyframes loginBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(26px, -30px, 0) scale(1.1); }
}

/* Dekorasi bertema inventaris (kotak, arsip, catatan, label) */
.login-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.decor-item {
  position: absolute;
  font-size: 46px;
  opacity: .5;
  filter: drop-shadow(0 8px 14px rgba(140, 96, 58, .22));
  animation: decorFloat 9s ease-in-out infinite;
}

.decor-item.d1 { top: 7%;  left: 7%;  font-size: 54px; }
.decor-item.d2 { top: 15%; right: 9%; font-size: 42px; animation-duration: 11s; animation-delay: .8s; }
.decor-item.d3 { bottom: 13%; left: 10%; font-size: 46px; animation-duration: 10s; animation-delay: 1.6s; }
.decor-item.d4 { bottom: 9%; right: 13%; font-size: 38px; animation-duration: 12s; animation-delay: 2.4s; }

@keyframes decorFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(5deg); }
}

/* Kaca / glass panel */
.login-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  padding: 38px 34px 26px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, .56);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow:
    0 26px 60px rgba(122, 84, 52, .22),
    0 2px 6px rgba(122, 84, 52, .08),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  backdrop-filter: blur(18px) saturate(165%);
  animation: loginCardIn .8s cubic-bezier(.22, 1, .36, 1) both,
             loginCardFloat 8s ease-in-out 1.1s infinite;
}

/* Kilau kaca yang bergerak menyapu panel */
.login-box::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -70%;
  width: 45%;
  height: 220%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(20deg);
  pointer-events: none;
  animation: loginSheen 7.5s ease-in-out 1.3s infinite;
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(30px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes loginCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes loginSheen {
  0% { left: -70%; opacity: 0; }
  12% { opacity: .85; }
  42% { left: 135%; opacity: 0; }
  100% { left: 135%; opacity: 0; }
}

.login-logo {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 26px;
  background: linear-gradient(145deg, #ffffff 0%, #f7ebdd 100%);
  border: 1px solid rgba(255, 255, 255, .95);
  color: #8a5a34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 14px 28px rgba(150, 105, 65, .22), inset 0 1px 0 rgba(255, 255, 255, .95);
  animation: logoBob 5s ease-in-out infinite;
  overflow: hidden;
  padding: 10px;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Cincin berdenyut di sekeliling logo */
.login-logo::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 28px;
  border: 1.5px solid rgba(176, 132, 92, .5);
  animation: logoRing 3.6s ease-out infinite;
}

@keyframes logoBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-2.5deg); }
}

@keyframes logoRing {
  0% { transform: scale(.92); opacity: .8; }
  70%, 100% { transform: scale(1.14); opacity: 0; }
}

.login-title {
  margin: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #6b4327;
}

/* Judul dengan gradasi coklat bila browser mendukung */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .login-title {
    background: linear-gradient(120deg, #6b4327 0%, #a3714a 48%, #7d5636 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.login-subtitle {
  max-width: 330px;
  margin: 9px auto 26px;
  text-align: center;
  color: #8b6f57;
  font-size: 12.5px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #374151;
}

.form-control {
  width: 100%;
  border: 1px solid #d6e5f2;
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  background: white;
  transition: .2s;
}

.form-control:focus {
  border-color: #43a5e8;
  box-shadow: 0 0 0 3px rgba(67, 165, 232, .12);
}

.btn {
  border: none;
  border-radius: 9px;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: .2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #1685d4;
  color: white;
}

.btn-primary:hover {
  background: #0d72bb;
}

.btn-success {
  background: #28a56b;
  color: white;
}

.btn-danger {
  background: #dc5961;
  color: white;
}

.btn-warning {
  background: #e9a928;
  color: white;
}

.btn-secondary {
  background: #edf2f7;
  color: #374151;
}

.btn-block {
  width: 100%;
}

/* Kontrol form khusus halaman login */
.login-box .form-group {
  margin-bottom: 14px;
}

.login-box .form-group label {
  color: #7a5c42;
  font-size: 12px;
  letter-spacing: .3px;
}

.login-box .form-control {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(196, 168, 142, .6);
  background: rgba(255, 255, 255, .74);
  color: #4a3524;
}

.login-box .form-control::placeholder {
  color: #b8a08c;
}

.login-box .form-control:focus {
  border-color: #b07f4f;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(176, 127, 79, .15);
}

/* Kolom password + tombol show/hide */
.password-field {
  position: relative;
}

.password-field .form-control {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #7a5c42;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.password-toggle:hover {
  background: rgba(176, 127, 79, .14);
  border-color: rgba(176, 127, 79, .35);
}

.password-toggle:active {
  transform: translateY(-50%) scale(.94);
}

.password-toggle:focus-visible {
  outline: none;
  border-color: #b07f4f;
  box-shadow: 0 0 0 4px rgba(176, 127, 79, .18);
  background: rgba(176, 127, 79, .12);
}

/* Tombol masuk: gradasi coklat + kilau saat disentuh */
.login-box .btn-primary {
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  letter-spacing: .3px;
  background: linear-gradient(135deg, #ab784d 0%, #845631 55%, #6b4327 100%);
  box-shadow: 0 12px 24px rgba(124, 82, 49, .28);
}

.login-box .btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  transition: left .6s ease;
}

.login-box .btn-primary:hover {
  background: linear-gradient(135deg, #bd8659 0%, #92603a 55%, #774b2c 100%);
  box-shadow: 0 16px 30px rgba(124, 82, 49, .34);
}

.login-box .btn-primary:hover::after {
  left: 130%;
}

.login-error {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(197, 48, 48, .18);
  background: rgba(255, 241, 242, .88);
  color: #b23c3c;
  font-size: 12.5px;
  text-align: center;
}

.login-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(163, 113, 74, .18);
  text-align: center;
  color: #a68a72;
  font-size: 11px;
  letter-spacing: .2px;
}

/* Fallback bila browser tidak mendukung efek kaca */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-box {
    background: rgba(255, 252, 248, .97);
  }
}

/* Dekorasi disesuaikan pada layar kecil */
@media (max-width: 600px) {
  .decor-item {
    opacity: .36;
  }
  .decor-item.d1 { top: 4%; left: 4%; font-size: 42px; }
  .decor-item.d2 { top: 8%; right: 5%; font-size: 32px; }
  .decor-item.d3 { bottom: 6%; left: 5%; font-size: 34px; }
  .decor-item.d4 { display: none; }
}

/* Hormati preferensi pengguna yang membatasi animasi */
@media (prefers-reduced-motion: reduce) {
  #loginPage::before,
  #loginPage::after,
  .decor-item,
  .login-box,
  .login-box::after,
  .login-logo,
  .login-logo::after {
    animation: none !important;
  }
}


/* =====================================================
   APP LAYOUT
===================================================== */

#appPage {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 250px;
  min-height: 100vh;
  background: white;
  border-right: 1px solid #e1edf7;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.brand {
  height: 75px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf3f8;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #dff3ff;
  color: #1685d4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 11px;
}

.brand-text strong {
  display: block;
  font-size: 15px;
  color: #1268ad;
}

.brand-text span {
  display: block;
  font-size: 11px;
  color: #8a9aaa;
  margin-top: 2px;
}

.menu {
  padding: 18px 12px;
  flex: 1;
  overflow-y: auto;
}

.menu-title {
  font-size: 10px;
  font-weight: bold;
  color: #9aaabd;
  padding: 10px 12px 7px;
  text-transform: uppercase;
}

.menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #637589;
  text-align: left;
  padding: 11px 13px;
  border-radius: 9px;
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item:hover {
  background: #eff8ff;
  color: #1685d4;
}

.menu-item.active {
  background: #dff3ff;
  color: #1173bd;
  font-weight: 600;
}

.menu-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.sidebar-bottom {
  border-top: 1px solid #edf3f8;
  padding: 12px;
}

.main-wrapper {
  margin-left: 250px;
  width: calc(100% - 250px);
  min-height: 100vh;
}


/* =====================================================
   TOGGLE SIDEBAR (NAVBAR BISA DISEMBUNYIKAN)
   - Desktop : sidebar digeser ke luar layar, konten melebar penuh.
   - Smartphone : sidebar berubah menjadi drawer (off-canvas).
===================================================== */

.sidebar {
  transition: transform .28s ease, box-shadow .28s ease;
  overscroll-behavior: contain;
}

.main-wrapper {
  transition: margin-left .28s ease, width .28s ease;
}

/* Tombol hamburger di topbar */
.menu-toggle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid #dbe9f4;
  border-radius: 10px;
  background: #f7fbff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: .2s;
}

.menu-toggle:hover {
  background: #e9f5ff;
  border-color: #bfe0f7;
}

.menu-toggle:focus-visible {
  outline: 2px solid #43a5e8;
  outline-offset: 2px;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: #1685d4;
  transition: .2s;
}

/* Tombol silang di dalam sidebar */
.sidebar-close {
  margin-left: auto;
  padding: 4px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #93a5b6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: .2s;
}

.sidebar-close:hover {
  background: #eef6fd;
  color: #1677c8;
}

/* Backdrop drawer (hanya terlihat di layar kecil saat drawer terbuka) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 46, 66, .45);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

/* Kondisi sidebar disembunyikan */
html.nav-closed .sidebar {
  transform: translateX(-100%);
}

html.nav-closed .main-wrapper {
  margin-left: 0;
  width: 100%;
}

/* Bungkus tombol pada header halaman */
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar {
  height: 75px;
  background: white;
  border-bottom: 1px solid #e4edf5;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .page-title {
  flex: 1;
  min-width: 0;
  margin-left: 14px;
}

.page-title h2 {
  margin: 0;
  color: #164f78;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-title span {
  color: #91a1b1;
  font-size: 12px;
}

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

.user-avatar {
  width: 38px;
  height: 38px;
  background: #dff3ff;
  color: #1685d4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-text strong {
  display: block;
  font-size: 13px;
}

.user-text span {
  display: block;
  font-size: 11px;
  color: #8b9aaa;
  text-transform: capitalize;
}

.content {
  padding: 25px;
}


/* =====================================================
   PAGE
===================================================== */

.page {
  display: none;
}

.page.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-header h3 {
  margin: 0;
  color: #234e70;
  font-size: 18px;
}

.section-header p {
  margin: 5px 0 0;
  color: #8494a5;
  font-size: 12px;
}

.card {
  background: white;
  border-radius: 14px;
  border: 1px solid #e7f0f7;
  box-shadow: 0 5px 18px rgba(47, 108, 155, .06);
}


/* =====================================================
   DASHBOARD
===================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #e5f5ff;
  color: #1685d4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card:nth-child(2) .stat-icon {
  background: #eafbf3;
  color: #249b65;
}

.stat-card:nth-child(3) .stat-icon {
  background: #fff6df;
  color: #d4961d;
}

.stat-card:nth-child(4) .stat-icon {
  background: #f0eaff;
  color: #7451c5;
}

.stat-card span {
  font-size: 12px;
  color: #8292a2;
}

.stat-card strong {
  display: block;
  font-size: 24px;
  margin-top: 3px;
  color: #234e70;
}


/* =====================================================
   TABLE
===================================================== */

.table-card {
  overflow: hidden;
}

.table-toolbar {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid #edf3f7;
}

.search-box {
  width: 280px;
  max-width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th {
  background: #f5faff;
  color: #54728b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 12px 13px;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px 13px;
  border-top: 1px solid #edf3f7;
  font-size: 12px;
  color: #475569;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fafdff;
}

.empty-row {
  text-align: center;
  padding: 30px !important;
  color: #9aa8b6;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

.badge-success {
  background: #e7f8ef;
  color: #218755;
}

.badge-warning {
  background: #fff5db;
  color: #b57b12;
}

.badge-primary {
  background: #e2f3ff;
  color: #1674b6;
}

.badge-danger {
  background: #fff0f1;
  color: #c54049;
}

.badge-danger-soft {
  background: #fff0f1;
  color: #c54049;
}

.action-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 9px;
  font-size: 11px;
}


/* =====================================================
   FORM
===================================================== */

.form-card {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.form-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


/* =====================================================
   SEARCHABLE DROPDOWN (PEMINJAMAN → BARANG)
===================================================== */

.search-select {
  position: relative;
}

.search-select .form-control {
  padding-right: 36px;
}

/* Ikon pencarian di dalam input */
.search-select::after {
  content: "🔍";
  position: absolute;
  right: 12px;
  top: 11px;
  font-size: 13px;
  opacity: .5;
  pointer-events: none;
}

.search-select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  background: white;
  border: 1px solid #d6e5f2;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(28, 74, 110, .16);
}

.search-select-option {
  width: 100%;
  display: block;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.search-select-option:hover,
.search-select-option.active {
  background: #eff8ff;
}

.search-select-option .ss-code {
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 4px;
  border-radius: 20px;
  background: #e2f3ff;
  color: #1674b6;
  font-size: 10px;
  font-weight: 700;
}

.search-select-option .ss-name {
  display: block;
  color: #234e70;
  font-size: 13px;
  font-weight: 600;
}

.search-select-option .ss-meta {
  display: block;
  margin-top: 3px;
  color: #8a99a8;
  font-size: 11px;
}

.search-select-empty {
  padding: 12px;
  color: #9aa8b6;
  font-size: 12px;
  text-align: center;
}


/* =====================================================
   CHECKBOX ROOM
===================================================== */

.room-list {
  border: 1px solid #dce9f3;
  border-radius: 10px;
  padding: 12px;
  max-height: 180px;
  overflow-y: auto;
  background: #fbfdff;
}

.room-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  font-size: 12px;
  cursor: pointer;
}

.room-option:hover {
  background: #eef8ff;
  border-radius: 6px;
}

.room-help {
  font-size: 11px;
  color: #8a99a8;
  margin-top: 6px;
}


/* =====================================================
   MODAL
===================================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(24, 53, 74, .42);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid #e8f0f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: #234e70;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  color: #8493a1;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}


/* =====================================================
   REPORT
===================================================== */

.report-filter {
  padding: 18px;
  margin-bottom: 18px;
}

.report-filter-title {
  font-size: 14px;
  font-weight: 600;
  color: #234e70;
  margin-bottom: 15px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 18px;
}

.report-summary-card {
  padding: 15px 18px;
}

.report-summary-card span {
  display: block;
  color: #8999a8;
  font-size: 11px;
}

.report-summary-card strong {
  display: block;
  color: #234e70;
  font-size: 22px;
  margin-top: 4px;
}

.report-header-print {
  display: none;
}


/* =====================================================
   LOADING
===================================================== */

#loading {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#loading.show {
  display: flex;
}

.loading-box {
  background: white;
  border-radius: 12px;
  padding: 20px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  color: #2675a8;
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 2px solid #d9edf9;
  border-top-color: #1685d4;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* =====================================================
   TOAST
===================================================== */

#toastContainer {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 250px;
  max-width: 350px;
  background: white;
  border-left: 4px solid #1685d4;
  padding: 12px 15px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
  font-size: 12px;
  color: #475569;
}

.toast.error {
  border-left-color: #dc5961;
}

.toast.success {
  border-left-color: #28a56b;
}


/* =====================================================
   RESPONSIVE
   - >= 901px : sidebar tetap (bisa disembunyikan lewat tombol)
   - <= 900px : sidebar menjadi drawer (off-canvas) + backdrop
   - <= 600px : tata letak satu kolom untuk smartphone
   - <= 400px : penyesuaian untuk smartphone layar kecil
===================================================== */

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Tablet & smartphone: sidebar menjadi drawer ===== */
@media (max-width: 900px) {
  #appPage {
    display: block;
  }

  .sidebar {
    width: min(285px, 82vw);
    box-shadow: none;
  }

  .main-wrapper {
    margin-left: 0;
    width: 100%;
  }

  /* Backdrop hanya muncul ketika drawer terbuka */
  html:not(.nav-closed) .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  html:not(.nav-closed) .sidebar {
    box-shadow: 0 14px 40px rgba(20, 60, 90, .28);
  }

  /* Cegah konten ikut ter-scroll saat drawer terbuka */
  html:not(.nav-closed) body {
    overflow: hidden;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    padding: 17px;
  }

  .user-text {
    display: none;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  /* Toolbar tabel menumpuk agar tidak terpotong */
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box,
  .table-toolbar .form-control {
    width: 100%;
    max-width: 100% !important;
  }
}

/* ===== Smartphone ===== */
@media (max-width: 600px) {
  .topbar {
    height: 64px;
    padding: 0 12px;
    gap: 10px;
  }

  .topbar .page-title {
    margin-left: 10px;
  }

  .page-title h2 {
    font-size: 16px;
  }

  .page-title span {
    font-size: 11px;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .content {
    padding: 13px;
  }

  .section-header h3 {
    font-size: 16px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1 1 auto;
  }

  .card {
    border-radius: 12px;
  }

  .form-card,
  .report-filter {
    padding: 15px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }

  .dashboard-grid,
  .report-summary {
    grid-template-columns: 1fr;
  }

  .room-list {
    max-height: 150px;
  }

  .modal {
    padding: 12px;
  }

  .modal-content {
    border-radius: 14px;
    max-height: 92vh;
  }

  .modal-header,
  .modal-body {
    padding: 15px;
  }

  th,
  td {
    padding: 10px;
  }

  .login-box {
    padding: 25px 20px;
  }

  #toastContainer {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* ===== Smartphone layar kecil ===== */
@media (max-width: 400px) {
  .page-title span {
    display: none;
  }

  .sidebar {
    width: 88vw;
  }

  .header-actions .btn {
    flex: 1 1 100%;
  }
}


/* =====================================================
   PRINT
===================================================== */

@media print {
  body {
    background: white;
  }
  #loginPage,
  .sidebar,
  .sidebar-overlay,
  .menu-toggle,
  .topbar,
  .report-filter,
  .report-summary,
  .section-header,
  #toastContainer,
  #loading,
  .no-print {
    display: none !important;
  }
  #appPage {
    display: block !important;
  }
  .main-wrapper {
    margin: 0 !important;
    width: 100% !important;
  }
  .content {
    padding: 0 !important;
  }
  .page {
    display: none !important;
  }
  #pageReport {
    display: block !important;
  }
  .card {
    border: none;
    box-shadow: none;
  }
  .report-header-print {
    display: block;
    text-align: center;
    margin-bottom: 20px;
  }
  .report-header-print h1 {
    margin: 0 0 5px;
    font-size: 20px;
    color: #000;
  }
  .report-header-print h2 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #000;
  }
  .report-header-print p {
    margin: 3px 0;
    font-size: 11px;
    color: #333;
  }
  table {
    min-width: 0;
  }
  th,
  td {
    border: 1px solid #999;
    color: #000;
    padding: 7px 6px;
    font-size: 10px;
  }
  th {
    background: #eee !important;
  }
  .table-responsive {
    overflow: visible;
  }
  .action-col {
    display: none !important;
  }
}