/* =========================================================
   MONDE STOCK - Main Stylesheet
   Tema: AdminDash (navy gelap + biru) — PT Monde Mahkota Biskuit
   ========================================================= */

:root {
  /* Beri tahu browser bahwa halaman ini mengelola sendiri warna gelapnya,
     supaya Chrome/Edge tidak menimpa warna teks bawaan pada widget native
     (terutama input[type=number]) dengan skema auto-dark miliknya sendiri —
     ini yang menyebabkan angka QTY tampak tidak terlihat / putih-di-atas-putih. */
  color-scheme: dark;
  --gold: #3b82f6;
  --gold-light: #7fb0ff;
  --gold-dark: #2563eb;
  --brown-900: #0a0f1d;
  --brown-800: #0d1424;
  --brown-700: #111a2e;
  --brown-600: #17223a;
  --brown-500: #1f2d4b;
  --cream: #e6ebf5;
  --text-muted: #8c98b0;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #38bdf8;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.30);
  --sidebar-w: 252px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Segoe UI', 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at 15% 15%, rgba(59,130,246,.10), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(59,130,246,.08), transparent 45%),
    linear-gradient(160deg, var(--brown-900) 0%, #070b15 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* =============== LAYOUT =============== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--brown-800), var(--brown-900) 85%);
  border-right: 1px solid rgba(59,130,246,.18);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(59,130,246,.15);
}
.sidebar-brand .crest {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 18px;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.sidebar-brand .txt small { display:block; font-size: 10.5px; letter-spacing: .12em; color: var(--text-muted); }
.sidebar-brand .txt strong { display:block; font-size: 15px; color: var(--gold-light); letter-spacing:.03em; }

.sidebar-nav { padding: 16px 12px; overflow-y: auto; flex: 1; }
.nav-section-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-muted); padding: 14px 12px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin: 2px 0;
  border-radius: 10px; color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  transition: all .15s ease;
  position: relative;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-link:hover { background: rgba(59,130,246,.10); color: var(--cream); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(59,130,246,.22), rgba(59,130,246,.05));
  color: var(--gold-light);
  box-shadow: inset 3px 0 0 var(--gold);
}
.sidebar-foot {
  padding: 16px 20px; border-top: 1px solid rgba(59,130,246,.15);
  font-size: 12.5px; color: var(--text-muted);
}
.sidebar-foot b { color: var(--gold-light); }

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(10,15,29,.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(59,130,246,.15);
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 20px; font-weight: 700; color: var(--gold-light); }
.topbar .page-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 13px; color: var(--gold-light); text-align: right; }
.topbar-date small { display:block; color: var(--text-muted); font-size: 11px; }
.menu-toggle { display: none; background: none; border: none; color: var(--gold-light); font-size: 22px; cursor: pointer; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 30px;
  background: rgba(59,130,246,.10); border: 1px solid rgba(59,130,246,.2);
  cursor: pointer; position: relative;
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.user-chip .name { font-size: 13px; font-weight: 600; }
.user-chip .role { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; }
.user-dropdown {
  position: absolute; top: 46px; right: 0; min-width: 170px;
  background: var(--brown-700); border: 1px solid rgba(59,130,246,.2);
  border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: none; z-index: 50;
}
.user-dropdown.show { display: block; }
.user-dropdown a { display: block; padding: 11px 16px; font-size: 13.5px; color: var(--cream); }
.user-dropdown a:hover { background: rgba(59,130,246,.12); }

.content { padding: 26px 28px 50px; flex: 1; }

/* =============== CARDS =============== */
.card {
  background: linear-gradient(160deg, var(--brown-700), var(--brown-800));
  border: 1px solid rgba(59,130,246,.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 22px; }
.card-header {
  padding: 18px 22px; border-bottom: 1px solid rgba(59,130,246,.12);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.card-header h3 { margin: 0; font-size: 16px; color: var(--gold-light); }
.card-header .sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* =============== STAT CARDS =============== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr;} }

.stat-card {
  background: linear-gradient(160deg, var(--brown-700), var(--brown-800));
  border: 1px solid rgba(59,130,246,.15);
  border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  background: radial-gradient(circle, rgba(59,130,246,.18), transparent 70%);
}
.stat-card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: rgba(59,130,246,.14); color: var(--gold-light);
}
.stat-card .icon svg { width: 22px; height: 22px; }
.stat-card .value { font-size: 26px; font-weight: 800; color: var(--cream); }
.stat-card .label { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.stat-card .trend { font-size: 11.5px; margin-top: 10px; display:inline-flex; align-items:center; gap:4px; padding: 3px 9px; border-radius: 20px; }
.trend.up { background: rgba(63,179,127,.15); color: var(--success); }
.trend.down { background: rgba(229,83,75,.15); color: var(--danger); }
.trend.flat { background: rgba(74,168,216,.15); color: var(--info); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 1050px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* =============== BUTTONS =============== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
  line-height: 1.2;
}
.btn svg { width: 15px; height: 15px; }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); color: #fff; }
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: rgba(59,130,246,.4); color: var(--gold-light); }
.btn-outline:hover { background: rgba(59,130,246,.1); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--cream); border-color: rgba(255,255,255,.08); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-danger { background: rgba(229,83,75,.15); color: #ff8a83; border-color: rgba(229,83,75,.3); }
.btn-danger:hover { background: rgba(229,83,75,.28); }
.btn-success { background: rgba(63,179,127,.15); color: #7ee0b1; border-color: rgba(63,179,127,.3); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-icon {
  width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 9px;
}

/* =============== FORMS =============== */
label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .masuk-row { grid-template-columns: 1fr !important; }
}

/* =============== GROUP HEADER (tabel maintenance / peminjaman) =============== */
.group-header td {
  background: rgba(59,130,246,.08);
  color: var(--gold-light);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 9px 14px;
}

input[type=text], input[type=number], input[type=date], input[type=datetime-local],
input[type=password], input[type=email], input[type=file], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: rgba(0,0,0,.22); border: 1px solid rgba(59,130,246,.22);
  color: var(--cream); font-size: 13.5px; font-family: inherit;
  outline: none; transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
/* Perbaikan khusus input[type=number] (mis. kolom QTY) agar angka selalu
   terlihat, termasuk saat OS/browser memaksakan tema gelap pada widget native. */
input[type=number] {
  color: var(--cream);
  caret-color: var(--cream);
  min-width: 0;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  opacity: 1;
}
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233b82f6' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
input[type=file] { padding: 8px; }
.checkbox-row { display: flex; align-items: center; gap: 20px; }
.checkbox-row label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--cream); margin: 0; }
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

/* =============== TABLES =============== */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
table.tbl thead th {
  text-align: left; padding: 12px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold-light); background: rgba(59,130,246,.08); white-space: nowrap;
  border-bottom: 1px solid rgba(59,130,246,.18); position: sticky; top: 0;
}
table.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; color: var(--cream); }
table.tbl tbody tr:hover { background: rgba(59,130,246,.05); }
table.tbl tbody tr:last-child td { border-bottom: none; }
.tbl-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,.06); cursor: zoom-in; transition: box-shadow .15s ease; }
.tbl-thumb:hover { box-shadow: 0 0 0 2px var(--gold); }

/* =============== IMAGE HOVER ZOOM PREVIEW =============== */
.img-zoom-preview {
  position: fixed;
  z-index: 200;
  display: none;
  padding: 6px;
  background: var(--brown-800);
  border: 1px solid rgba(59,130,246,.35);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  pointer-events: none;
}
.img-zoom-preview.show { display: block; }
.img-zoom-preview img {
  display: block;
  width: 240px;
  height: 240px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
@media (max-width: 700px) {
  .img-zoom-preview { display: none !important; }
}
.tbl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mono { font-family: 'Consolas', monospace; font-size: 12.5px; }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.table-toolbar .left { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-box { position: relative; }
.search-box input { padding-left: 36px; min-width: 230px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-muted); }

.badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.badge-gold { background: rgba(59,130,246,.18); color: var(--gold-light); }
.badge-info { background: rgba(74,168,216,.16); color: #7cc4ea; }
.badge-success { background: rgba(63,179,127,.16); color: #7ee0b1; }
.badge-warning { background: rgba(224,167,46,.18); color: #f0c369; }
.badge-danger { background: rgba(229,83,75,.16); color: #ff8a83; }

.pagination { display: flex; gap: 6px; padding: 16px 20px; justify-content: flex-end; flex-wrap: wrap; align-items:center; }
.pagination a, .pagination span {
  padding: 7px 12px; border-radius: 8px; font-size: 12.5px; background: rgba(255,255,255,.04); color: var(--cream);
  border: 1px solid rgba(59,130,246,.12);
}
.pagination a:hover { background: rgba(59,130,246,.15); }
.pagination .current { background: var(--gold); color: #fff; font-weight: 700; }
.pagination .page-nav { font-weight:600; }
.pagination .page-nav.disabled { opacity:.35; cursor:default; pointer-events:none; }
.pagination .page-gap { padding: 7px 4px; border: none; background: none; opacity:.5; }

/* =============== MODAL =============== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3,6,14,.72); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: linear-gradient(160deg, var(--brown-700), var(--brown-800));
  border: 1px solid rgba(59,130,246,.22); border-radius: 16px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
  animation: pop .18s ease;
}
.modal.modal-lg { max-width: 780px; }
@keyframes pop { from { transform: scale(.95); opacity:0;} to { transform: scale(1); opacity:1;} }
.modal-header { padding: 20px 24px; border-bottom: 1px solid rgba(59,130,246,.15); display:flex; align-items:center; justify-content:space-between; }
.modal-header h3 { margin: 0; font-size: 17px; color: var(--gold-light); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1;}
.modal-close:hover { color: var(--cream); }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid rgba(59,130,246,.12); display: flex; justify-content: flex-end; gap: 10px; }

/* =============== ALERT / FLASH =============== */
.alert { padding: 14px 18px; border-radius: 12px; font-size: 13.5px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; }
.alert-success { background: rgba(63,179,127,.13); border-color: rgba(63,179,127,.3); color: #9be7c4; }
.alert-danger { background: rgba(229,83,75,.13); border-color: rgba(229,83,75,.3); color: #ffa39d; }
.alert-info { background: rgba(74,168,216,.13); border-color: rgba(74,168,216,.3); color: #9cd4f0; }

/* =============== LOGIN PAGE =============== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(59,130,246,.15), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(59,130,246,.12), transparent 45%),
    linear-gradient(160deg, #070b15, var(--brown-900));
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: linear-gradient(160deg, var(--brown-700), var(--brown-800));
  border: 1px solid rgba(59,130,246,.2); border-radius: 20px; box-shadow: var(--shadow); padding: 40px 34px;
}
.login-crest {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; color: #fff;
  box-shadow: 0 0 0 6px rgba(59,130,246,.12);
}
.login-title { text-align: center; font-size: 20px; font-weight: 700; color: var(--gold-light); margin: 4px 0 2px; }
.login-sub { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-bottom: 26px; }

/* =============== DASHBOARD WIDGETS =============== */
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 34px; height: 34px; border-radius: 10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.activity-dot svg { width: 16px; height: 16px; }
.activity-item .txt { font-size: 13px; }
.activity-item .txt b { color: var(--cream); }
.activity-item .time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.progress-bar { width: 100%; height: 8px; border-radius: 20px; background: rgba(255,255,255,.06); overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }

/* =============== MISC =============== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 54px; height: 54px; margin-bottom: 14px; opacity: .5; }
.chip { display:inline-flex; align-items:center; gap:6px; padding: 5px 12px; border-radius: 20px; background: rgba(59,130,246,.1); border:1px solid rgba(59,130,246,.2); font-size: 12px; color: var(--gold-light); }
.divider { height: 1px; background: rgba(59,130,246,.12); margin: 18px 0; }
.qr-box { background: #fff; padding: 14px; border-radius: 10px; display: inline-block; }
.tag-filter { display:flex; gap:8px; flex-wrap:wrap; }
.tag-filter a { padding: 7px 14px; border-radius: 20px; font-size: 12.5px; border: 1px solid rgba(59,130,246,.2); color: var(--text-muted); }
.tag-filter a.active { background: var(--gold); color: #fff; font-weight: 700; border-color: var(--gold); }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* =============== PRINT =============== */
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* =========================================================
   DROPDOWN (<select>) - daftar pilihan harus terbaca jelas
   Background <select> transparan, jadi daftar pilihan bawaan browser
   tampil abu-abu. Beri warna eksplisit (latar navy, teks terang).
   ========================================================= */
select option {
  background-color: #111a2e;
  color: #e6ebf5;
  font-size: 14px;
  padding: 6px 10px;
}
select optgroup {
  background-color: #0a0f1d;
  color: #7fb0ff;
  font-weight: 700;
  font-style: normal;
}
select optgroup option {
  background-color: #111a2e;
  color: #e6ebf5;
  font-weight: 400;
}
select option:hover,
select option:focus,
select option:checked {
  background-color: #3b82f6;
  color: #fff;
}
select option:disabled { color: #5f6b84; }

/* =========================================================
   TEMA ADMINDASH - navy gelap + aksen biru
   (menimpa gaya dasar di atas; letakkan di paling bawah)
   ========================================================= */
body {
  background:
    radial-gradient(1100px 560px at 75% -12%, rgba(59,130,246,.08), transparent 62%),
    #0a0f1d;
}
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.55); }

/* ---------- Sidebar ---------- */
.sidebar {
  background: #0d1424;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand { padding: 20px 18px 16px; border-bottom: none; gap: 11px; }
.sidebar-brand .crest {
  width: 40px; height: 40px; border-radius: 11px; padding: 5px; object-fit: contain;
  background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.30); box-shadow: none;
}
.sidebar-brand .txt small { font-size: 10px; letter-spacing: .14em; color: #6f7c96; }
.sidebar-brand .txt strong { font-size: 16px; color: #fff; letter-spacing: .01em; }
.sidebar-nav { padding: 6px 12px 14px; }
.nav-section-title { color: #5f6b84; padding: 16px 12px 6px; letter-spacing: .14em; }
.nav-link { padding: 10px 12px; border-radius: 10px; color: #98a4bb; font-size: 13.5px; }
.nav-link svg { opacity: .9; }
.nav-link:hover { background: rgba(255,255,255,.045); color: #fff; }
.nav-link.active {
  background: rgba(59,130,246,.16); color: #fff; box-shadow: none;
}
.nav-link.active svg { color: #6aa6ff; opacity: 1; }
.sidebar-foot {
  margin: 0 12px 12px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 12px;
  background: rgba(255,255,255,.025); font-size: 11.5px; color: #8c98b0; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-foot b { color: #fff; }

/* ---------- Topbar ---------- */
.topbar {
  gap: 18px; padding: 14px 28px;
  background: rgba(10,15,29,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.menu-toggle { color: #cdd6e8; }
.topbar-search { position: relative; width: 100%; max-width: 380px; margin: 0; }
.topbar-search input {
  width: 100%; padding: 10px 14px 10px 40px; border-radius: 12px; font-size: 13px;
  background: #101a2f; border: 1px solid rgba(255,255,255,.07); color: #e6ebf5;
}
.topbar-search input::placeholder { color: #66738d; }
.topbar-search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #66738d; pointer-events: none;
}
.topbar-right { gap: 12px; }
.topbar-date { font-size: 12.5px; color: #cdd6e8; margin-right: 6px; }
.topbar-date small { color: #6f7c96; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #b4bfd4;
  background: #101a2f; border: 1px solid rgba(255,255,255,.07); transition: all .15s ease;
}
.icon-btn:hover { color: #fff; border-color: rgba(59,130,246,.5); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%;
  background: #ef4444; border: 2px solid #101a2f;
}
.notif-wrap { position: relative; }
.notif-dropdown {
  position: absolute; top: 48px; right: 0; width: 290px; display: none; z-index: 60;
  background: #111a2e; border: 1px solid rgba(255,255,255,.09); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.5); overflow: hidden;
}
.notif-dropdown.show { display: block; }
.notif-dropdown .nd-head { padding: 13px 16px; font-size: 13px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.notif-dropdown a { display: flex; align-items: center; gap: 11px; padding: 12px 16px; font-size: 13px; color: #cdd6e8; border-bottom: 1px solid rgba(255,255,255,.04); }
.notif-dropdown a:last-child { border-bottom: none; }
.notif-dropdown a:hover { background: rgba(59,130,246,.10); color: #fff; }
.notif-dropdown .nd-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.notif-dropdown .nd-empty { padding: 18px 16px; font-size: 13px; color: #8c98b0; text-align: center; }
.user-chip {
  gap: 10px; padding: 4px 10px 4px 4px; border-radius: 30px; background: transparent; border: 1px solid transparent;
}
.user-chip:hover { background: #101a2f; border-color: rgba(255,255,255,.07); }
.user-chip .avatar {
  width: 36px; height: 36px; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #4f8ef7, #2563eb); box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}
.user-chip .name { font-size: 13.5px; font-weight: 600; color: #fff; }
.user-chip .chev { width: 14px; height: 14px; color: #8c98b0; }
.user-dropdown { background: #111a2e; border-color: rgba(255,255,255,.09); border-radius: 14px; top: 50px; min-width: 190px; box-shadow: 0 18px 44px rgba(0,0,0,.5); }
.user-dropdown .ud-head { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.user-dropdown .ud-head b { display: block; color: #fff; font-size: 13.5px; }
.user-dropdown .ud-head span { font-size: 11px; color: #8c98b0; text-transform: uppercase; letter-spacing: .06em; }
.user-dropdown a:hover { background: rgba(59,130,246,.12); }

.content { padding: 26px 28px 56px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: #8c98b0; }

/* ---------- Kartu ---------- */
.card {
  background: linear-gradient(180deg, #111b31, #0f1829);
  border: 1px solid rgba(255,255,255,.06); box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.card-header { border-bottom: 1px solid rgba(255,255,255,.05); }
.card-header h3 { color: #fff; font-weight: 600; font-size: 15.5px; }
.modal { background: #111b31; border: 1px solid rgba(255,255,255,.09); }
.modal-header { border-bottom-color: rgba(255,255,255,.06); }
.modal-header h3 { color: #fff; }
.modal-footer { border-top-color: rgba(255,255,255,.06); }
.divider { background: rgba(255,255,255,.07); }

/* ---------- Tombol ---------- */
.btn-gold {
  background: linear-gradient(180deg, #4f8ef7, #2f6fe4); color: #fff;
  box-shadow: 0 6px 16px rgba(59,130,246,.30);
}
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline { border-color: rgba(59,130,246,.50); color: #8db8ff; }
.btn-outline:hover { background: rgba(59,130,246,.13); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); color: #dbe3f2; }
.btn-ghost:hover { background: rgba(255,255,255,.09); }

/* ---------- Form ---------- */
input[type=text], input[type=number], input[type=date], input[type=datetime-local],
input[type=password], input[type=email], input[type=file], select, textarea {
  background-color: #0c1426; border: 1px solid rgba(255,255,255,.09); color: #e6ebf5;
}
input:focus, select:focus, textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
input::placeholder, textarea::placeholder { color: #5f6b84; }

/* ---------- Tabel ---------- */
table.tbl thead th {
  background: rgba(255,255,255,.03); color: #8c98b0; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
table.tbl tbody td { border-bottom: 1px solid rgba(255,255,255,.045); }
table.tbl tbody tr:hover { background: rgba(59,130,246,.06); }
.group-header td { background: rgba(59,130,246,.09); color: #8db8ff; }
.badge { text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; padding: 4px 10px; }
.pagination a, .pagination span { border-color: rgba(255,255,255,.07); }
.pagination .current { background: #3b82f6; color: #fff; }
.tag-filter a { border-color: rgba(255,255,255,.1); }
.tag-filter a.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.chip { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: #cdd6e8; }

/* ---------- Login ---------- */
.login-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(59,130,246,.20), transparent 45%),
    radial-gradient(circle at 82% 82%, rgba(139,92,246,.14), transparent 45%),
    #0a0f1d;
}
.login-card { background: linear-gradient(180deg, #111b31, #0f1829); border: 1px solid rgba(255,255,255,.08); }
.login-crest {
  border-radius: 18px; color: #fff; background: linear-gradient(135deg, #4f8ef7, #2563eb);
  box-shadow: 0 10px 28px rgba(59,130,246,.40);
}
.login-title { color: #fff; }

/* ---------- Dashboard ---------- */
.stat-grid { gap: 18px; margin-bottom: 18px; }
.stat-card {
  background: linear-gradient(180deg, #111b31, #0f1829); border: 1px solid rgba(255,255,255,.06);
  padding: 18px 20px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.stat-card::after { display: none; }
.sc-blue   { --ic:#6aa6ff; --ic-bg:rgba(59,130,246,.16); --line:#3b82f6; }
.sc-purple { --ic:#b197fc; --ic-bg:rgba(139,92,246,.16); --line:#8b5cf6; }
.sc-green  { --ic:#4ade80; --ic-bg:rgba(34,197,94,.15);  --line:#22c55e; }
.sc-orange { --ic:#fbbf24; --ic-bg:rgba(245,158,11,.15); --line:#f59e0b; }
.sc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.stat-card .icon { width: 38px; height: 38px; margin: 0; border-radius: 10px; background: var(--ic-bg); color: var(--ic); flex-shrink: 0; }
.stat-card .icon svg { width: 19px; height: 19px; }
.stat-card .label { margin: 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: #8c98b0; line-height: 1.35; }
.sc-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: -.01em; }
.sc-cap { margin-top: 8px; font-size: 11.5px; color: #8c98b0; }
.sc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.spark { width: 92px; height: 34px; display: block; overflow: visible; }
.splitbar { width: 92px; height: 8px; border-radius: 20px; background: #8b5cf6; overflow: hidden; margin: 13px 0 12px; }
.splitbar span { display: block; height: 100%; background: #3b82f6; border-radius: 20px; }
.stat-card .trend { margin: 0; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.trend.flat { background: rgba(59,130,246,.15); color: #7fb0ff; }

.dash-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 290px; }
.legend-inline { display: flex; gap: 16px; font-size: 12px; color: #aab5ca; }
.legend-inline i, .legend-grid i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.donut-box { position: relative; width: 200px; height: 200px; margin: 6px auto 4px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-size: 28px; font-weight: 700; color: #fff; line-height: 1.1; }
.donut-center small { font-size: 11.5px; color: #8c98b0; letter-spacing: .08em; text-transform: uppercase; }
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 14px; font-size: 12.5px; color: #aab5ca; width: 100%; }
.id-cell { color: #7fb0ff; font-weight: 600; font-family: 'Consolas', monospace; font-size: 12.5px; }
.row-action {
  width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  color: #8c98b0; background: transparent; border: 1px solid transparent; font-size: 18px; line-height: 1; letter-spacing: 1px;
}
.row-action:hover { background: rgba(59,130,246,.14); color: #fff; }
.activity-item { border-bottom-color: rgba(255,255,255,.05); }

@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 50px; }
}
@media (max-width: 760px) {
  .topbar-search { display: none; }
  .topbar-date { display: none; }
  .user-chip .name, .user-chip .chev { display: none; }
}

/* Tombol aksi di tabel: rapikan agar tidak memanjang ke bawah / terpotong */
.tbl-actions { flex-wrap: wrap; max-width: 150px; }

/* Kotak cari + filter kategori (Stock Barang): sebaris, bukan bertumpuk */
.search-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box input[type=text] { width: auto; flex: 1 1 260px; min-width: 230px; }
.search-box select { width: auto; min-width: 180px; margin-left: 0 !important; }
.search-box > svg { top: 21px; }

/* =========================================================
   PURCHASE REQUEST - daftar item (combobox Item Description + UOM)
   ========================================================= */
.modal.modal-xl { max-width: 1060px; }
.item-head {
  display: grid; grid-template-columns: .9fr 2.4fr .75fr 1.1fr 1fr 1.2fr 1.05fr auto; gap: 8px; margin-bottom: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #8c98b0;
}
.item-head span:last-child { width: 34px; }
@media (max-width: 700px) { .item-head { display: none; } }
input.combo-input {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c98b0' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  text-overflow: ellipsis;
}
select.uom-select { padding-left: 10px; }
.combo-panel {
  position: fixed; z-index: 300; display: none; overflow-y: auto; padding: 6px;
  background: #111a2e; border: 1px solid rgba(59,130,246,.45); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,.6);
}
.combo-panel.show { display: block; }
.combo-group {
  position: sticky; top: -6px; z-index: 1; padding: 7px 10px 5px; margin-top: 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #7fb0ff;
  background: #111a2e; border-bottom: 1px solid rgba(255,255,255,.06);
}
.combo-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combo-item.active { background: rgba(59,130,246,.22); }
.combo-item .ci-main { display: flex; align-items: center; gap: 8px; }
.combo-item .ci-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: #e6ebf5; }
.combo-item .ci-tag { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8c98b0; }
.combo-item .ci-stock { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.combo-item .ci-stock.ok { background: rgba(34,197,94,.15); color: #4ade80; }
.combo-item .ci-stock.zero { background: rgba(239,68,68,.16); color: #ff8a83; }
.combo-item .ci-spec { margin-top: 3px; font-size: 11.5px; color: #8c98b0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.combo-empty { padding: 16px 14px; font-size: 12.5px; color: #aab5ca; line-height: 1.55; text-align: center; }
.combo-empty b { color: #7fb0ff; }
.combo-foot { padding: 9px 10px 4px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: #8c98b0; text-align: center; }
