/* =========================================================
   Bimatex Dashboard - style.css
   Palet: Navy + Emas
   ========================================================= */

:root {
  /* Warna */
  --navy-950: #071328;
  --navy-900: #0b1c37;
  --navy-800: #10254a;
  --navy-700: #16305c;
  --navy-600: #1f3f73;
  --blue-700: #27548f;
  --blue-600: #2f62a8;
  --blue-500: #3b74c4;
  --blue-400: #5a8fd6;
  --blue-300: #8fb4e6;
  --blue-200: #a9c8ee;
  --blue-100: #dbe7f7;
  --gold-600: #9c7433;
  --gold-500: #b8893f;
  --gold-400: #c9a25a;
  --gold-300: #e0c07a;
  --gold-100: #f6eedd;

  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #16284a;
  --text-2: #3f4f6b;
  --muted: #7a889d;
  --border: #e3e8f0;
  --border-2: #edf1f6;

  --green: #1f9d55;
  --green-bg: #e4f6ea;
  --red: #d64545;
  --red-bg: #fdeaea;
  --orange: #d9822b;
  --orange-bg: #fdf0e1;
  --teal: #1a9a86;
  --teal-bg: #e1f5f1;

  /* Ukuran */
  --sidebar-w: 252px;
  --sidebar-w-collapsed: 92px;
  --topbar-h: 66px;
  --radius: 14px;
  --radius-sm: 10px;

  /* Bayangan */
  --shadow-card: 0 1px 2px rgba(22, 40, 74, .04), 0 6px 20px rgba(22, 40, 74, .06);
  --shadow-card-hover: 0 4px 10px rgba(22, 40, 74, .06), 0 16px 34px rgba(22, 40, 74, .10);

  /* Gerakan */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .42s;

  /* Font */
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
svg { display: block; }
.text-primary { color: var(--blue-600); }

/* Ikon sprite default (stroke) */
.nav__icon svg, .icon-btn svg, .search__icon, .user__chevron, .select__btn svg,
.link-more svg, .trend svg, .stat__icon svg, .activity__icon svg, .collapse-btn svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* =========================================================
   OVERLAY (mobile)
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(7, 19, 40, .55);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
}
body.sidebar-open .overlay {
  opacity: 1; visibility: visible;
  transition: opacity var(--dur) var(--ease), visibility 0s;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  color: #fff;
  background:
    radial-gradient(120% 60% at 0% 100%, rgba(59, 116, 196, .18) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-950) 100%);
  box-shadow: 4px 0 24px rgba(7, 19, 40, .18);
  transition: width var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: width, transform;
  overflow: hidden;
}
.sidebar::after { /* garis emas tipis di tepi kanan */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(201, 162, 90, .35) 30%, rgba(201, 162, 90, .35) 70%, transparent);
  pointer-events: none;
}

/* Header + brand */
.sidebar__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; height: 76px; padding: 0 18px 0 16px; flex-shrink: 0;
  transition: padding var(--dur) var(--ease);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__logo {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  filter: drop-shadow(0 2px 6px rgba(201, 162, 90, .35));
  transition: transform .6s var(--ease-out);
}
.brand__logo svg { width: 40px; height: 40px; }
.brand:hover .brand__logo { transform: rotate(90deg); }
.brand__name {
  font-family: var(--font-serif); font-weight: 600; font-size: 22px;
  letter-spacing: .2px; white-space: nowrap; color: #fff;
  opacity: 1; transform: translateX(0);
  transition: opacity .28s var(--ease), transform var(--dur) var(--ease), max-width var(--dur) var(--ease);
  max-width: 140px; overflow: hidden;
}

/* ---------- Hamburger (3 garis tidak sama panjang, seperti desain) ---------- */
.hamburger {
  position: relative; width: 30px; height: 30px; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 4px; border-radius: 8px;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.hamburger:hover { background: rgba(255, 255, 255, .08); }
.hamburger:active { transform: scale(.94); }
.hamburger__line {
  display: block; height: 2px; border-radius: 2px;
  background: #e9eef7;
  transform-origin: left center;
  transition:
    width var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    opacity .25s var(--ease),
    background .25s var(--ease);
}
.hamburger__line--1 { width: 10px; }
.hamburger__line--2 { width: 18px; }
.hamburger__line--3 { width: 14px; }
.hamburger:hover .hamburger__line { background: var(--gold-300); }

/* State aktif (sidebar diciutkan / menu mobile terbuka): berubah jadi X */
.hamburger.is-active .hamburger__line--1 { width: 20px; transform: translate(2px, -1px) rotate(45deg); }
.hamburger.is-active .hamburger__line--2 { width: 18px; opacity: 0; transform: scaleX(0); }
.hamburger.is-active .hamburger__line--3 { width: 20px; transform: translate(2px, 1px) rotate(-45deg); }

/* Hamburger versi topbar (hanya tampil di mobile) */
.hamburger--mobile { display: none; margin-right: 6px; }
.hamburger--mobile .hamburger__line { background: var(--navy-800); }
.hamburger--mobile:hover { background: var(--blue-100); }
.hamburger--mobile:hover .hamburger__line { background: var(--blue-600); }

/* ---------- Navigasi ---------- */
.sidebar__nav {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
  padding: 4px 14px 12px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar__nav::-webkit-scrollbar { width: 5px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav__divider { height: 1px; margin: 12px 6px; background: rgba(255,255,255,.12); }

.nav__link {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 46px; padding: 0 12px; border-radius: 10px;
  color: rgba(233, 238, 247, .82); font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease), box-shadow .35s var(--ease), padding var(--dur) var(--ease);
}
/* Latar hover / aktif yang menyapu dari kiri ke kanan */
.nav__link::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  transform: scaleX(0); transform-origin: left center;
  transition: transform .45s var(--ease), background .3s var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::before { transform: scaleX(1); }

/* Ikon */
.nav__icon {
  width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center;
  color: rgba(233, 238, 247, .8);
  transition: color .3s var(--ease), transform .35s var(--ease-out);
}
.nav__link:hover .nav__icon { color: var(--gold-300); transform: translateX(2px); }
.nav__text {
  opacity: 1; transform: translateX(0);
  transition: opacity .28s var(--ease), transform var(--dur) var(--ease);
}

/* Aktif */
.nav__link.is-active { color: #fff; box-shadow: 0 0 0 1px rgba(201, 162, 90, .45), 0 8px 20px rgba(3, 12, 30, .35); }
.nav__link.is-active::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--blue-600) 0%, var(--blue-500) 55%, #3569b3 100%);
}
.nav__link.is-active .nav__icon { color: #fff; }
.nav__link.is-active::after { /* aksen emas di tepi kanan, seperti desain */
  content: ""; position: absolute; top: 8px; bottom: 8px; right: 0; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 0 10px rgba(224, 192, 122, .6);
}

/* Dropdown submenu */
button.nav__link { width: 100%; border: 0; background: none; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.nav__caret { margin-left: auto; width: 16px; height: 16px; display: grid; place-items: center; transition: transform .3s var(--ease), opacity .28s var(--ease); }
.nav__caret svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav__item--grup.is-open .nav__caret { transform: rotate(180deg); }
.nav__sub {
  display: grid; gap: 2px; margin: 0; padding: 0 0 0 46px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .35s var(--ease), opacity .25s var(--ease), padding .3s var(--ease);
}
.nav__item--grup.is-open .nav__sub { max-height: 240px; opacity: 1; padding-top: 4px; padding-bottom: 2px; }
.nav__sublink {
  position: relative; display: flex; align-items: center; height: 38px; padding: 0 12px; border-radius: 8px;
  color: rgba(233, 238, 247, .72); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav__sublink::before {
  content: ""; position: absolute; left: -16px; top: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(233, 238, 247, .35); transform: translateY(-50%); transition: background .25s var(--ease), box-shadow .25s var(--ease);
}
.nav__sublink:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav__sublink.is-active { color: var(--gold-300); background: rgba(255,255,255,.08); }
.nav__sublink.is-active::before { background: var(--gold-300); box-shadow: 0 0 8px rgba(224, 192, 122, .6); }
.nav__sublink:focus-visible { outline: 2px solid var(--gold-300); outline-offset: -2px; }

/* ---------- Footer sidebar ---------- */
.sidebar__footer {
  position: relative; flex-shrink: 0; height: 150px; padding: 0 18px 18px;
  display: flex; align-items: flex-end; justify-content: space-between;
  transition: height var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.sidebar__ornament { position: absolute; inset: 0; pointer-events: none; }
.sidebar__ornament svg { width: 100%; height: 100%; }
.sidebar__tagline {
  position: relative; z-index: 1; white-space: nowrap;
  opacity: 1; transform: translateX(0);
  transition: opacity .28s var(--ease), transform var(--dur) var(--ease);
}
.sidebar__tagline h4 { font-family: var(--font-serif); font-size: 17px; line-height: 1.15; font-weight: 600; margin-bottom: 6px; }
.sidebar__tagline p { font-size: 12px; line-height: 1.45; color: rgba(233, 238, 247, .8); }
.collapse-btn {
  position: relative; z-index: 1; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #e9eef7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background .3s var(--ease), transform var(--dur) var(--ease), color .3s;
}
.collapse-btn svg { width: 16px; height: 16px; stroke-width: 2.2; transition: transform var(--dur) var(--ease); }
.collapse-btn:hover { background: rgba(201, 162, 90, .25); color: var(--gold-300); }

/* ---------- Sidebar collapsed (desktop) ---------- */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar__header { padding: 0 14px 0 12px; }
body.sidebar-collapsed .brand__name { opacity: 0; transform: translateX(-12px); max-width: 0; }
body.sidebar-collapsed .brand__logo { width: 34px; height: 34px; }
body.sidebar-collapsed .brand__logo svg { width: 34px; height: 34px; }
body.sidebar-collapsed .hamburger { width: 26px; height: 26px; }
body.sidebar-collapsed .nav__link { padding: 0 12px; justify-content: center; }
body.sidebar-collapsed .nav__text { position: absolute; left: 46px; opacity: 0; transform: translateX(-10px); pointer-events: none; }
body.sidebar-collapsed .nav__caret { position: absolute; right: 6px; opacity: 0; }
body.sidebar-collapsed .nav__item--grup .nav__sub { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
body.sidebar-collapsed .sidebar__tagline { position: absolute; left: 18px; bottom: 18px; opacity: 0; transform: translateX(-16px); pointer-events: none; }
body.sidebar-collapsed .sidebar__footer { height: 96px; padding: 0 0 18px; justify-content: center; }
body.sidebar-collapsed .collapse-btn svg { transform: rotate(180deg); }

/* Tooltip label saat collapsed */
.nav__link .nav__tip {
  position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%);
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: 12.5px; font-weight: 600;
  background: var(--navy-900); color: #fff; box-shadow: 0 8px 20px rgba(7,19,40,.3), 0 0 0 1px rgba(201,162,90,.35);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s var(--ease), transform .25s var(--ease-out), visibility 0s linear .2s;
}
.nav__link .nav__tip::before {
  content: ""; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent; border-right-color: var(--navy-900);
}
body.sidebar-collapsed .nav__link:hover .nav__tip {
  opacity: 1; visibility: visible; transform: translate(0, -50%); transition-delay: 0s;
}

/* =========================================================
   MAIN
   ========================================================= */
.main {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  transition: margin-left var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.search {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 300px; height: 40px; padding: 0 14px;
  border-radius: 11px; border: 1px solid var(--border);
  background: #fff; color: var(--muted);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), max-width var(--dur) var(--ease);
}
.search:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,116,196,.14); color: var(--blue-600); }
.search__icon { width: 18px; height: 18px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13.5px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; color: var(--navy-800);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.icon-btn:hover { background: var(--blue-100); color: var(--blue-600); }
.icon-btn__dot {
  position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 2px #fff;
}
.flag {
  width: 26px; height: 18px; border-radius: 3px; overflow: hidden; display: block;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
  background: linear-gradient(180deg, #d9272e 0 50%, #fff 50% 100%);
}
.user {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 12px;
  transition: background .25s var(--ease);
}
.user:hover { background: var(--blue-100); }
.user__avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border); }
.user__avatar svg { width: 100%; height: 100%; }
.user__meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user__name { font-weight: 800; font-size: 13.5px; color: var(--text); }
.user__role { font-size: 12px; color: var(--muted); }
.user__chevron { width: 16px; height: 16px; color: var(--muted); }

/* ---------- Konten ---------- */
.content { padding: 22px 24px 28px; display: flex; flex-direction: column; gap: 18px; }

/* Page header */
.page-header {
  position: relative; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; padding: 6px 0 2px; overflow: hidden;
}
.page-header h1 {
  font-family: var(--font-serif); font-weight: 700; font-size: 26px; line-height: 1.2;
  color: var(--navy-800); letter-spacing: -.2px;
}
.page-header p { margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.page-header__date { position: relative; z-index: 1; text-align: right; flex-shrink: 0; padding-right: 100px; margin-top: 4px; }
.page-header__date strong { font-weight: 800; color: var(--text); font-size: 14px; }
.page-header__date span { font-size: 14px; color: var(--text); }
.page-header__date small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.page-header__ornament { position: absolute; right: -10px; top: -14px; width: 120px; height: 120px; opacity: .85; pointer-events: none; }
.page-header__ornament svg { width: 100%; height: 100%; }

/* =========================================================
   KARTU STATISTIK
   ========================================================= */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat {
  position: relative; background: var(--card); border-radius: var(--radius);
  padding: 16px 16px 14px; box-shadow: var(--shadow-card);
  border: 1px solid var(--border-2);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease);
  overflow: hidden;
}
.stat::after { /* kilau halus saat hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .8s var(--ease); pointer-events: none;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.stat:hover::after { transform: translateX(120%); }
.stat__head { display: flex; align-items: center; gap: 12px; }
.stat__icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px rgba(22,40,74,.16);
}
.stat__icon svg { width: 22px; height: 22px; stroke-width: 1.7; }
.stat__icon--blue { background: linear-gradient(145deg, #3b74c4, #27548f); }
.stat__icon--gold { background: linear-gradient(145deg, #c9a25a, #9c7433); }
.stat__label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.stat__value { display: block; font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.25; letter-spacing: -.2px; white-space: nowrap; }
.stat__value--danger { color: #c5461f; }
.stat__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.stat__foot--column { flex-direction: column; align-items: flex-start; gap: 2px; }
.trend { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.trend svg { width: 13px; height: 13px; stroke-width: 2.4; }
.trend--up { background: var(--green-bg); color: var(--green); }
.trend--down { background: var(--red-bg); color: var(--red); }
.trend__value { font-weight: 800; font-size: 13px; }
.trend__value--up { color: var(--green); }
.trend__value--down { color: var(--red); }
.trend__note { width: 100%; font-size: 11.5px; color: var(--muted); }

/* =========================================================
   KARTU UMUM + CHART
   ========================================================= */
.grid-charts { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 14px; align-items: stretch; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card);
  border: 1px solid var(--border-2); padding: 18px 18px 16px;
  display: flex; flex-direction: column; min-width: 0;
  transition: box-shadow .35s var(--ease);
}
.card:hover { box-shadow: var(--shadow-card-hover); }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head h3 { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; }

/* Dropdown periode */
.select { position: relative; flex-shrink: 0; }
.select__btn {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 12px;
  border-radius: 8px; border: 1px solid var(--border); background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.select__btn svg { width: 15px; height: 15px; stroke-width: 2.2; transition: transform .3s var(--ease); }
.select__btn:hover { border-color: var(--blue-300); background: #f8fafd; }
.select.is-open .select__btn { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,116,196,.14); }
.select.is-open .select__btn svg { transform: rotate(180deg); }
.select__menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 160px;
  background: #fff; border-radius: 10px; border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(22,40,74,.14); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .2s var(--ease), transform .25s var(--ease-out), visibility 0s linear .2s;
}
.select.is-open .select__menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.select__menu li {
  position: relative; padding: 8px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); cursor: pointer; overflow: hidden; isolation: isolate;
}
.select__menu li::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue-100);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.select__menu li:hover::before, .select__menu li[aria-selected="true"]::before { transform: scaleX(1); }
.select__menu li[aria-selected="true"] { color: var(--blue-600); }

/* Bar chart */
.bar-chart { position: relative; flex: 1; min-height: 232px; }
.bar-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bar-chart .grid-line { stroke: var(--border); stroke-width: 1; }
.bar-chart .axis-label { font-size: 11px; fill: var(--muted); font-family: var(--font-sans); }
.bar-chart .bar { transform-origin: bottom; transition: opacity .25s var(--ease), filter .25s; }
.bar-chart .bar--target { fill: var(--blue-200); }
.bar-chart .bar--real { fill: var(--blue-700); }
.bar-chart .bar-group:hover .bar { filter: brightness(.92); }
.bar-chart .bar-group.is-animated .bar { animation: growBar .9s var(--ease-out) both; }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  padding: 8px 10px; border-radius: 8px; background: var(--navy-900); color: #fff;
  font-size: 12px; line-height: 1.45; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(7,19,40,.28);
  opacity: 0; transform: translate(-50%, -100%) translateY(-6px);
  transition: opacity .18s var(--ease), transform .22s var(--ease-out);
}
.chart-tip.is-visible { opacity: 1; transform: translate(-50%, -100%) translateY(-12px); }
.chart-tip strong { display: block; font-weight: 800; color: var(--gold-300); margin-bottom: 2px; }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.legend { display: flex; justify-content: center; gap: 34px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.legend__item { display: flex; align-items: center; gap: 8px; }
.legend__swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend__swatch--target { background: var(--blue-200); }
.legend__swatch--real { background: var(--blue-700); }

/* Donut */
.donut { flex: 1; display: flex; align-items: center; gap: 12px; }
.donut__chart { position: relative; width: clamp(118px, 44%, 150px); aspect-ratio: 1 / 1; flex-shrink: 0; }
.donut__chart svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__chart circle { fill: none; transition: stroke-dasharray 1.1s var(--ease-out), stroke-width .25s var(--ease); cursor: pointer; }
.donut__chart circle:hover { stroke-width: 24; }
.donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut__caption { font-size: 11.5px; color: var(--muted); }
.donut__total { font-size: 18px; font-weight: 800; color: var(--text); }
.donut__legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.donut__legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; transition: transform .25s var(--ease-out); }
.donut__legend li:hover, .donut__legend li.is-hover { transform: translateX(3px); color: var(--text); }
.donut__legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut__legend b { margin-left: auto; font-weight: 800; color: var(--text); }

/* Aktivitas */
.activity { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.activity__item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 8px; border-radius: 10px;
  overflow: hidden; isolation: isolate; cursor: default;
  transition: transform .25s var(--ease-out);
}
.activity__item::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #f4f7fb;
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.activity__item:hover::before { transform: scaleX(1); }
.activity__icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: #eef2f8; color: var(--navy-800);
}
.activity__icon svg { width: 18px; height: 18px; }
.activity__body { flex: 1; min-width: 0; line-height: 1.3; }
.activity__title { display: block; font-weight: 700; font-size: 12.5px; color: var(--text); line-height: 1.25; }
.activity__sub { display: block; font-size: 11.5px; color: var(--text-2); }
.activity__time { display: block; font-size: 11px; color: var(--muted); }
.badge { flex-shrink: 0; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--orange { background: var(--orange-bg); color: var(--orange); }
.badge--blue { background: var(--blue-100); color: var(--blue-600); }
.badge--teal { background: var(--teal-bg); color: var(--teal); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--blue-600); flex-shrink: 0; }
.link-more svg { width: 14px; height: 14px; stroke-width: 2.2; transition: transform .25s var(--ease-out); }
.link-more:hover svg { transform: translateX(3px); }

/* =========================================================
   BANNER
   ========================================================= */
.banner {
  position: relative; overflow: hidden; border-radius: var(--radius);
  min-height: 108px; padding: 24px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
  box-shadow: 0 14px 34px rgba(7,19,40,.28);
}
.banner__pattern {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c9a25a' stroke-width='1.1' stroke-linecap='round' opacity='.55'%3E%3Cpath d='M60 8c14 10 14 30 0 40-14-10-14-30 0-40z'/%3E%3Cpath d='M60 112c14-10 14-30 0-40-14 10-14 30 0 40z'/%3E%3Cpath d='M8 60c10-14 30-14 40 0-10 14-30 14-40 0z'/%3E%3Cpath d='M112 60c-10-14-30-14-40 0 10 14 30 14 40 0z'/%3E%3Cpath d='M60 18c5 8 5 22 0 30M60 102c5-8 5-22 0-30M18 60c8-5 22-5 30 0M102 60c-8-5-22-5-30 0'/%3E%3Ccircle cx='60' cy='60' r='3'/%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='100' cy='20' r='2'/%3E%3Ccircle cx='20' cy='100' r='2'/%3E%3Ccircle cx='100' cy='100' r='2'/%3E%3Cpath d='M20 32c6-6 12 0 6 6s-12 0-6-6zM100 32c-6-6-12 0-6 6s12 0 6-6zM20 88c6 6 12 0 6-6s-12 0-6 6zM100 88c-6 6-12 0-6-6s12 0 6 6z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.9) 30%, rgba(0,0,0,.9) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.9) 30%, rgba(0,0,0,.9) 70%, transparent 100%);
  animation: driftPattern 40s linear infinite;
}
@keyframes driftPattern { from { background-position: 0 0; } to { background-position: 240px 0; } }
.banner__text, .banner__quote { position: relative; z-index: 1; }
.banner__text h2 { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 25px; line-height: 1.3; }
.banner__quote { margin: 0; text-align: right; }
.banner__quote p { font-family: var(--font-serif); font-style: italic; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.92); }
.banner__quote cite { display: block; margin-top: 6px; font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--gold-300); }

/* =========================================================
   ANIMASI MASUK
   ========================================================= */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible { animation: reveal .7s var(--ease-out) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1440px) {
  .grid-charts { grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 1280px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-charts { grid-template-columns: 1fr 1fr; }
  .card--bar { grid-column: 1 / -1; }
}
@media (max-width: 992px) {
  /* Sidebar menjadi off-canvas */
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; box-shadow: none; }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 12px 0 40px rgba(7,19,40,.35); }
  .main { margin-left: 0 !important; }
  .hamburger--mobile { display: flex; }
  /* Abaikan state collapsed di mobile */
  body.sidebar-collapsed .brand__name,
  body.sidebar-collapsed .nav__text,
  body.sidebar-collapsed .sidebar__tagline { opacity: 1; transform: none; max-width: none; pointer-events: auto; }
  body.sidebar-collapsed .sidebar__header { padding: 0 18px 0 16px; }
  body.sidebar-collapsed .brand__logo, body.sidebar-collapsed .brand__logo svg { width: 40px; height: 40px; }
  body.sidebar-collapsed .hamburger { width: 30px; height: 30px; }
  body.sidebar-collapsed .nav__link { padding: 0 12px; }
  body.sidebar-collapsed .nav__caret { position: static; opacity: 1; }
  body.sidebar-collapsed .nav__item--grup.is-open .nav__sub { max-height: 240px; opacity: 1; padding-top: 4px; padding-bottom: 2px; }
  body.sidebar-collapsed .sidebar__footer { height: 150px; padding: 0 18px 18px; justify-content: space-between; }
  body.sidebar-collapsed .collapse-btn svg { transform: none; }
  .collapse-btn { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 24px; }
}
@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-charts { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 10px; }
  .page-header__date { text-align: left; padding-right: 0; }
  .page-header__ornament { opacity: .5; }
  .banner { flex-direction: column; align-items: flex-start; padding: 22px 22px; }
  .banner__quote { text-align: left; }
  .banner__text h2 { font-size: 21px; }
  .user__meta, .user__chevron { display: none; }
  .search { max-width: 100%; }
  .flag { display: none; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 22px; }
  .stat__value { font-size: 18px; }
  .donut { flex-direction: column; }
  .donut__legend { width: 100%; }
  .legend { gap: 18px; }
  .topbar { gap: 10px; }
  .search { height: 36px; padding: 0 10px; }
  .search input { font-size: 12.5px; }
  .content { padding: 14px 12px 20px; gap: 14px; }
}

/* Matikan transisi sesaat ketika ukuran jendela berubah (mencegah animasi ganda) */
body.no-transition .sidebar,
body.no-transition .sidebar *,
body.no-transition .main { transition: none !important; }

/* Kurangi gerakan bila pengguna memintanya */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
