/* ==========================================================================
   SWALAYAN NU — RK & RAPB TERPADU
   60% Putih & Hijau Sangat Muda | 25% Emerald | 10% Lime | 5% Emas
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg-canvas: #f2fbf4;
  --white:     #ffffff;
  --emerald-9: #064e3b;
  --emerald-8: #065f46;
  --emerald-7: #047857;
  --emerald-6: #059669;
  --emerald-5: #10b981;
  --lime-6:    #65a30d;
  --lime-5:    #84cc16;
  --lime-2:    #d9f99d;
  --gold-5:    #eab308;
  --gold-4:    #facc15;
  --gold-1:    #fef9c3;

  --txt:   #0f291e;
  --muted: #526b5e;
  --brd:   #d1ebd8;
  --gp:    #eaf8ee;
  --gd:    #065f46;
  --g:     #059669;
  --gl:    #a7f3d0;
  --red:   #dc2626;
  --redp:  #fef2f2;
  --blue:  #0284c7;
  --bluep: #f0f9ff;

  --shadow-xs: 0 2px 6px rgba(5, 150, 105, 0.06);
  --shadow-sm: 0 4px 16px rgba(5, 150, 105, 0.09);
  --shadow-md: 0 10px 28px rgba(5, 150, 105, 0.14);
  --shadow-lg: 0 18px 40px rgba(6, 78, 59, 0.18);
  --r: 16px;
}

html, body { margin: 0; padding: 0; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }

body, button, input, select, textarea, table {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--body-bg, linear-gradient(180deg, #e8f8ed 0%, #f5fcf7 45%, #ffffff 100%));
  background-attachment: fixed;
  color: var(--txt);
  min-height: 100vh;
}

.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ==========================================================================
   SHELL & EMERALD-LIME SIDEBAR (#065f46 -> #059669 -> #65a30d)
   ========================================================================== */

.nu-shell { display: flex; min-height: 100vh; }

.nu-sidebar {
  width: 252px;
  flex-shrink: 0;
  background: var(--sb-bg, linear-gradient(180deg, #022c22 0%, #064e3b 52%, #065f46 100%));
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 120;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(2, 44, 34, 0.22);
  transition: transform 0.25s ease;
}
.nu-sidebar::-webkit-scrollbar { width: 4px; }
.nu-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.24); border-radius: 99px; }

.sb-brand {
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.sb-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  color: var(--emerald-7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.sb-title { font-size: 16px; font-weight: 800; line-height: 1.15; }
.sb-sub   { font-size: 10.5px; color: var(--gold-1); opacity: 0.92; }

.sb-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
}

.sb-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.sb-toggle-btn:hover { background: rgba(255, 255, 255, 0.28); }

.nu-shell.sidebar-collapsed .nu-sidebar { transform: translateX(-100%); }
.nu-shell.sidebar-collapsed .nu-main { margin-left: 0; }

.sb-nav { flex: 1 0 auto; padding: 12px 10px; }

.sb-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  margin-bottom: 3px;
  transition: all 0.15s ease;
}

.sb-item:hover { background: rgba(255, 255, 255, 0.16); }

.sb-item.active {
  background: #ffffff;
  color: #064e3b;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.sb-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 26px;
  max-height: 750px;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}

.sb-subnav.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.sb-chev {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  transition: transform 0.2s ease, background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.sb-item:hover .sb-chev {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sb-chev.collapsed {
  transform: rotate(-90deg);
}

.sb-subitem {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.14s;
}
.sb-subico { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: 0.9; }
.sb-subico svg { width: 14px; height: 14px; display: block; }
.sb-subnav-l2 { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px 20px; }
.sb-subnav-l2.collapsed { display: none; }
.sb-subnav-l2 .sb-subitem { font-size: 11.5px; padding: 4px 9px; }

.sb-subitem:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.sb-subitem.active {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  font-weight: 700;
}

.sb-ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-ico svg, .strip-ico svg, .hero-ico-circle svg, .sb-logo svg { width: 100%; height: 100%; display: block; }
.sb-ico svg { width: 17px; height: 17px; }
.strip-ico svg { width: 16px; height: 16px; color: #065f46; }
.hero-ico-circle svg { width: 24px; height: 24px; }
.sb-logo svg { width: 22px; height: 22px; }

.sb-profile {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-4);
  color: var(--emerald-9);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-role-select {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.sb-role-select option { color: var(--txt); background: #fff; }
.sb-role-sub { font-size: 10.5px; color: rgba(255, 255, 255, 0.78); padding-left: 3px; }

/* ==========================================================================
   MAIN AREA & TOPBAR
   ========================================================================== */

.nu-main { flex: 1; margin-left: 252px; min-width: 0; display: flex; flex-direction: column; transition: margin-left 0.25s ease; }

.nu-topbar {
  background: var(--tb-bg, linear-gradient(90deg, #064e3b 0%, #065f46 58%, #047857 100%));
  color: #fff;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  box-shadow: 0 3px 16px rgba(2, 44, 34, 0.16);
  position: sticky;
  top: 0;
  z-index: 90;
}

.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.tb-left > div { min-width: 0; }
.tb-title { margin: 0; font-size: 18.5px; font-weight: 800; color: #fff; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub   { font-size: 11.5px; color: rgba(255, 255, 255, 0.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tb-right { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; flex-shrink: 0; }

.period-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
}

.period-pill select {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

.period-pill select option { color: var(--txt); background: #fff; }

.tbtn-mini {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: none;
  background: var(--gold-4);
  color: var(--emerald-9);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tbtn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #fff;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: background 0.15s;
}
.tbtn:hover { background: rgba(255, 255, 255, 0.28); }

.notif-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  color: #fff;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}

.notif-dot {
  background: var(--gold-4);
  color: var(--emerald-9);
  border-radius: 99px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 2px;
}

.status-pill { padding: 5px 11px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.status-draft { background: var(--gold-1); color: #854d0e; }
.status-approved { background: #fff; color: var(--emerald-8); }

.mainw { max-width: 1400px; width: 100%; margin: 0 auto; padding: 20px 24px 48px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.mainw > * { animation: fadeUp 0.2s ease both; }

/* ==========================================================================
   KONSEP 1: DASHBOARD UTAMA HERO CARDS
   ========================================================================== */

.hero-3grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 980px) { .hero-3grid { grid-template-columns: 1fr; } }

.hero-kpi-card {
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--brd);
  background: #fff;
  position: relative;
  overflow: hidden;
}

.hero-kpi-card.emerald-mint { background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 65%, #ffffff 100%); border-color: #a7f3d0; }
.hero-kpi-card.gold-mint    { background: linear-gradient(135deg, #fef9c3 0%, #fffbeb 65%, #ffffff 100%); border-color: #fde047; }

.hero-ico-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #065f46, #10b981);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(6, 95, 70, 0.25);
}

.hero-ico-circle.gold { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28); }

/* Segmented Control (Fixes Ringkasan/Compare & Period Tabs) */
.seg-control {
  display: inline-flex;
  align-items: center;
  background: #eaf6ef;
  border: 1px solid #cce7d6;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.seg-control-btn {
  border: none;
  background: transparent;
  color: #1b4332;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.seg-control-btn:hover {
  background: rgba(255, 255, 255, 0.7);
}

.seg-control-btn.active {
  background: linear-gradient(135deg, #065f46, #059669);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(6, 95, 70, 0.22);
}

.branch-filter-box {
  background: #f6fcf8;
  border: 1px solid #d7ede0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.branch-hero-summary {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 65%, #fefce8 100%);
  border: 1px solid #b7e4c7;
  border-radius: 16px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  align-items: center;
}

.branch-tab-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  background: #f3faf6;
  border: 1px solid #d5ebe0;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 14px;
}

@media (max-width: 1024px) {
  .branch-tab-strip { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); }
}

.branch-tab-item {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-family: inherit;
  transition: all 0.16s ease;
  text-align: left;
}

.branch-tab-item:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: #cbe7d7;
}

.branch-tab-item.active {
  background: #ffffff;
  border-color: #86efac;
  box-shadow: 0 3px 10px rgba(6, 95, 70, 0.10);
  position: relative;
}

.branch-tab-item.active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2.5px;
  border-radius: 99px;
  background: linear-gradient(90deg, #065f46, #10b981);
}

.bt-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.bt-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-9);
  white-space: nowrap;
}

.bt-pct {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--emerald-7);
}

@media (max-width: 768px) {
  .branch-hero-summary { grid-template-columns: 1fr; }
}

.hero-kpi-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.hero-kpi-val { font-size: clamp(16.5px, 1.45vw, 20px); font-weight: 700; color: var(--emerald-9); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.hero-kpi-sub { font-size: 11.5px; color: var(--emerald-7); font-weight: 700; margin-top: 2px; }

/* 5-Card Secondary KPI Strip */
.strip-5grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.strip-6grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.branch-kpi-card { position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important; }
.branch-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(6, 78, 59, 0.10); }
@media (max-width: 1100px) { .strip-5grid { grid-template-columns: repeat(3, 1fr); } .strip-6grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .strip-5grid { grid-template-columns: repeat(2, 1fr); } .strip-6grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.strip-card {
  background: #fff;
  border: 1px solid var(--brd);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.strip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--emerald-5); }
.strip-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; white-space: nowrap; }
.strip-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--gp); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.strip-val { font-size: 17px; font-weight: 800; color: var(--txt); font-variant-numeric: tabular-nums; }
.strip-delta { font-size: 11px; font-weight: 700; color: var(--emerald-6); margin-top: 3px; }

.concept-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.concept-pill {
  background: #fff;
  border: 1px solid var(--brd);
  color: var(--gd);
  padding: 7px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.concept-pill:hover { background: var(--gp); border-color: var(--emerald-6); }
.concept-pill.active { background: var(--emerald-6); color: #fff; border-color: var(--emerald-6); }

.motiv-banner {
  background: linear-gradient(135deg, #059669, #65a30d);
  color: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   COMMON CARDS, KPI, TABLES, FORMS, BUTTONS, CHARTS
   ========================================================================== */

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { background: #fff; border: 1px solid var(--brd); border-radius: 16px; padding: 16px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-xs); }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--emerald-6); }
.kpi-card.gold::before { background: var(--gold-5); }
.kpi-card.info::before { background: var(--blue); }
.kpi-card.danger::before { background: var(--red); }
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; }
.kpi-value { font-size: 20px; font-weight: 800; color: var(--txt); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.kpi-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.page-header-banner {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 65%, #fef9c3 100%);
  color: var(--emerald-9);
  border: 1px solid #a7f3d0;
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}

.banner-title { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--emerald-9); }
.banner-sub   { margin: 0; font-size: 13px; color: var(--muted); }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: #fff; border: 1px solid var(--brd); border-radius: 12px; box-shadow: var(--shadow-xs); margin-bottom: 18px; }
.card-header { padding: 15px 20px; border-bottom: 1px solid var(--gp); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--emerald-9); }
.card-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 18px 20px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.btn { border: 1px solid transparent; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-full { width: 100%; }
.btn-primary { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #065f46; }
.btn-gold { background: linear-gradient(135deg, #facc15, #eab308); color: #422006; font-weight: 800; }
.btn-gold:hover:not(:disabled) { background: #eab308; }
.btn-outline { background: #fff; color: var(--gd); border-color: var(--brd); }
.btn-outline:hover:not(:disabled) { background: var(--gp); border-color: var(--emerald-6); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--gp); }

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: var(--redp); color: #b91c1c; }
.badge-info    { background: var(--bluep); color: #0369a1; }
.badge-neutral { background: #f1f5f9; color: #475569; }

.table-wrap { overflow-x: auto; border: 1px solid var(--brd); border-radius: 8px; background: #fff; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data-table th { background: #eaf6ef; color: #064e3b; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 11px; border-bottom: 2px solid #b7e4c7; text-align: left; white-space: nowrap; }
table.data-table td { padding: 9px 11px; border-bottom: 1px solid #eef6f1; color: var(--txt); vertical-align: middle; }
table.data-table td.num, table.data-table th.num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
table.data-table tbody tr:nth-child(even) td { background: #fafdfb; }
table.data-table tbody tr:hover td { background: #eff9f3; }
table.data-table tfoot td, table.data-table tr.row-total td { background: #d8f3e3; font-weight: 800; color: #064e3b; border-top: 2px solid #86efac; white-space: nowrap; padding: 11px; }
table.data-table.compact { font-size: 11px; }
table.data-table.compact th { font-size: 10px; letter-spacing: 0.015em; padding: 8px 5px; }
table.data-table.compact td { padding: 6.5px 5px; }
table.data-table.compact th.num, table.data-table.compact td.num, table.data-table.compact tfoot td.num { text-align: center; }
table.data-table.compact tfoot td, table.data-table.compact tr.row-total td { padding: 8.5px 5px; font-size: 11px; }
table.data-table tfoot tr.row-avg td { background: #f0faf3; color: #065f46; font-weight: 700; border-top: 1px solid #bbf7d0; }
table.data-table tfoot tr.row-estimate td { background: #fefce8; color: #854d0e; font-weight: 800; border-top: 1px dashed #eab308; }
table.data-table tbody tr.row-clickable { cursor: pointer; transition: background 0.15s ease; }
table.data-table tbody tr.row-clickable:hover td { background: #e5f6ec; }
.shu-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 10.5px; white-space: nowrap; }
.shu-pill.pos { background: #ecfdf5; color: #047857; }
.shu-pill.neg { background: #fef2f2; color: #dc2626; }
.table-meta-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.table-meta-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 9px; background: #f0faf3; border: 1px solid #ccebd7; color: #065f46; font-size: 11.5px; font-weight: 700; }
.table-filter-btn { padding: 4px 11px; border-radius: 9px; border: 1px solid #ccebd7; background: #fff; color: #065f46; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: all 0.15s ease; }
.table-filter-btn.active { background: #059669; border-color: #059669; color: #fff; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--gd); }
.form-input, .form-select, .form-textarea { width: 100%; padding: 8px 10px; border: 1.5px solid var(--brd); border-radius: 10px; font-family: inherit; font-size: 13px; color: var(--txt); background: #fff; outline: none; transition: border-color 0.16s ease, box-shadow 0.16s ease; }
.form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  cursor: pointer;
  accent-color: #059669;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 8 10 12 14 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px 14px;
}
.form-select:hover { border-color: #86efac; }
.form-select option { background: #ffffff; color: #064e3b; font-weight: 600; padding: 6px 10px; }
.form-select option:checked { background: #ecfdf5; color: #047857; font-weight: 700; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--emerald-6); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14); }
.form-input.input-sm { padding: 5px 8px; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
select.form-input, select.form-input.input-sm, select.form-input option { text-align: left; font-variant-numeric: normal; }
#modalBody .form-input.input-sm[type="text"],
#modalBody .form-input.input-sm[type="date"] { text-align: left; font-variant-numeric: normal; }
.form-input:disabled, .form-select:disabled { background: #f2fbf4; color: var(--muted); cursor: not-allowed; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* Stylish unified Period Picker (Tahun | Bulan) */
.period-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
  border: 1px solid #cce7d6;
  box-shadow: 0 1px 2px rgba(6, 78, 59, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.period-pill-group:hover { border-color: #6ee7b7; }
.period-pill-group:focus-within { border-color: #059669; box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12); background: #ffffff; }
.period-pill-ico { width: 13px; height: 13px; color: #059669; margin: 0 2px 0 4px; flex-shrink: 0; }
.period-pill-sep { width: 1px; height: 14px; background: #d8ece0; margin: 0 1px; flex-shrink: 0; }
.period-pill-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 7px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23059669' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 8 10 12 14 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px 12px;
  padding: 3px 20px 3px 8px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gd);
  cursor: pointer;
  outline: none;
  accent-color: #059669;
  transition: background-color 0.15s ease;
}
.period-pill-select:hover { background-color: #ecfdf5; }
.period-pill-select option { background: #ffffff; color: #064e3b; font-weight: 600; }
.period-pill-select option:checked { background: #ecfdf5; color: #047857; font-weight: 700; }

/* Custom Stylish Floating Select Menu (replaces native OS dropdown box) */
.csel-native-hidden { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 0 !important; height: 0 !important; overflow: hidden !important; }
.csel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gd);
  padding: 3px 8px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.csel-btn:hover, .csel-btn.open { background-color: #ecfdf5; color: #047857; }
.csel-btn.is-form {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid var(--brd);
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}
.csel-btn.is-form:hover, .csel-btn.is-form.open { border-color: #059669; background: #ffffff; box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12); }
.csel-chev { width: 12px; height: 12px; color: #059669; flex-shrink: 0; transition: transform 0.16s ease; }
.csel-btn.open .csel-chev { transform: rotate(180deg); }
.csel-menu-portal {
  position: fixed;
  z-index: 9999;
  min-width: 140px;
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #cce7d6;
  box-shadow: 0 16px 36px -8px rgba(6, 78, 59, 0.2), 0 4px 12px rgba(15, 23, 42, 0.06);
  animation: cselFadeIn 0.12s ease-out;
}
@keyframes cselFadeIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.csel-menu-portal::-webkit-scrollbar { width: 5px; }
.csel-menu-portal::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.csel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.csel-item:hover { background: #f0fdf4; color: #065f46; }
.csel-item.active { background: #ecfdf5; color: #059669; font-weight: 700; }
.csel-check { width: 13px; height: 13px; color: #059669; flex-shrink: 0; }

.progress-track { width: 100%; height: 8px; background: var(--gp); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #84cc16); transition: width 0.35s ease; }
.progress-fill.gold { background: linear-gradient(90deg, #eab308, #facc15); }
.progress-fill.danger { background: var(--red); }

.alert { padding: 12px 16px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid transparent; }
.alert-info { background: var(--bluep); border-color: #bae6fd; color: #0369a1; }
.alert-warning { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.alert-success { background: var(--gp); border-color: #a7f3d0; color: var(--emerald-8); }

.chart-container { width: 100%; overflow-x: auto; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(6, 78, 59, 0.45); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 200; }
.modal-backdrop.open { display: flex; }
.modal-dialog { background: #fff; border-radius: 18px; width: 100%; max-width: 680px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--brd); }
.modal-header { padding: 15px 22px; background: linear-gradient(90deg, #065f46, #059669); color: #fff; display: flex; align-items: center; justify-content: space-between; }
.modal-title { margin: 0; font-size: 16px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 24px; line-height: 1; color: #fff; cursor: pointer; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer { padding: 12px 22px; border-top: 1px solid var(--brd); display: flex; justify-content: flex-end; gap: 10px; background: #f5fcf7; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 250; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--emerald-8); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); border-left: 4px solid var(--gold-4); }
.toast.toast-warning { background: #854d0e; }
.toast.toast-danger  { background: var(--red); }

.report-sheet { background: #fff; border: 1px solid var(--brd); border-radius: 16px; padding: 28px 32px; }
.report-letterhead { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px double var(--emerald-6); padding-bottom: 14px; margin-bottom: 20px; }
.report-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; text-align: center; font-size: 12px; }
.sig-space { height: 64px; }

@media (max-width: 920px) {
  .nu-sidebar { transform: translateX(-100%); }
  .nu-sidebar.open { transform: translateX(0); }
  .sb-close-btn, .sb-toggle-btn { display: inline-flex; }
  .nu-main { margin-left: 0; max-width: 100vw; overflow-x: hidden; }
  .nu-topbar { padding: 11px 14px; flex-wrap: wrap; gap: 8px; }
  .tb-title { font-size: 16.5px; }
  .tb-sub { font-size: 11px; }
  .tb-right { width: 100%; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .period-pill { padding: 4px 8px; font-size: 11px; }
  .tbtn { padding: 5px 10px; font-size: 11.5px; }
  .mainw { padding: 14px 12px 36px; }
}

@media (max-width: 640px) {
  .hero-3grid,
  .grid-2,
  .form-grid { grid-template-columns: 1fr !important; gap: 10px; }
  .hero-kpi-card { padding: 12px 14px; gap: 12px; border-radius: 14px; }
  .hero-ico-circle { width: 42px; height: 42px; border-radius: 12px; }
  .hero-ico-circle svg { width: 20px; height: 20px; }
  .hero-kpi-val { font-size: 20px; }
  .strip-5grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .strip-card { padding: 11px 12px; border-radius: 12px; }
  .strip-val { font-size: 17px; }
  .seg-control { flex-wrap: wrap !important; border-radius: 12px; max-width: 100%; }
  .seg-control-btn { padding: 4px 8px; font-size: 11px; }
  .card { border-radius: 14px; max-width: 100%; overflow: hidden; }
  .card-header { padding: 11px 14px !important; gap: 8px !important; flex-wrap: wrap !important; }
  .card-body { padding: 12px 14px !important; max-width: 100%; }
  .card-body [style*="flex-wrap:nowrap"],
  .card-header [style*="flex-wrap:nowrap"] { flex-wrap: wrap !important; }
  .mainw [style*="display:grid"]:not(.strip-5grid):not(.rk-cal-grid),
  .modal-body [style*="display:grid"] { grid-template-columns: minmax(0, 1fr) !important; }
  .table-wrap { width: 100%; max-width: 100%; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .mainw svg { max-width: 100%; height: auto; }
  .report-sheet { padding: 14px 12px !important; border-radius: 12px; }
  .report-letterhead { flex-direction: column; gap: 10px; }
  .report-signatures { grid-template-columns: 1fr !important; gap: 18px; margin-top: 20px; }
  footer { flex-direction: column; text-align: center; padding: 10px 14px !important; font-size: 10.5px !important; }
  .modal { width: calc(100vw - 18px) !important; max-height: 92vh !important; border-radius: 14px; }
  .modal-header { padding: 12px 16px; }
  .modal-body { padding: 14px 16px; }
  .modal-footer { padding: 10px 16px; flex-wrap: wrap; }
  .toast-container { left: 12px; right: 12px; bottom: 14px; }
}

/* ===== PENYESUAIAN OTOMATIS PERANGKAT HP (AUTO-DETECT) ===== */
body.is-mobile-device .nu-sidebar { transform: translateX(-100%); }
body.is-mobile-device .nu-sidebar.open { transform: translateX(0); }
body.is-mobile-device .sb-close-btn,
body.is-mobile-device .sb-toggle-btn { display: inline-flex; }
body.is-mobile-device .nu-main { margin-left: 0; max-width: 100vw; overflow-x: hidden; }
body.is-mobile-device .nu-topbar { padding: 11px 14px; flex-wrap: wrap; gap: 8px; }
body.is-mobile-device .tb-title { font-size: 16.5px; }
body.is-mobile-device .tb-sub { font-size: 11px; }
body.is-mobile-device .tb-right { width: 100%; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
body.is-mobile-device .period-pill { padding: 4px 8px; font-size: 11px; }
body.is-mobile-device .tbtn { padding: 5px 10px; font-size: 11.5px; }
body.is-mobile-device .mainw { padding: 14px 12px 36px; }
body.is-mobile-device .hero-3grid,
body.is-mobile-device .grid-2,
body.is-mobile-device .form-grid { grid-template-columns: 1fr !important; gap: 10px; }
body.is-mobile-device .hero-kpi-card { padding: 12px 14px; gap: 12px; border-radius: 14px; }
body.is-mobile-device .hero-ico-circle { width: 42px; height: 42px; border-radius: 12px; }
body.is-mobile-device .hero-ico-circle svg { width: 20px; height: 20px; }
body.is-mobile-device .hero-kpi-val { font-size: 20px; }
body.is-mobile-device .strip-5grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
body.is-mobile-device .strip-card { padding: 11px 12px; border-radius: 12px; }
body.is-mobile-device .strip-val { font-size: 17px; }
body.is-mobile-device .seg-control { flex-wrap: wrap !important; border-radius: 12px; max-width: 100%; }
body.is-mobile-device .seg-control-btn { padding: 4px 8px; font-size: 11px; }
body.is-mobile-device .card { border-radius: 14px; max-width: 100%; overflow: hidden; }
body.is-mobile-device .card-header { padding: 11px 14px !important; gap: 8px !important; flex-wrap: wrap !important; }
body.is-mobile-device .card-body { padding: 12px 14px !important; max-width: 100%; }
body.is-mobile-device .card-body [style*="flex-wrap:nowrap"],
body.is-mobile-device .card-header [style*="flex-wrap:nowrap"] { flex-wrap: wrap !important; }
body.is-mobile-device .mainw [style*="display:grid"]:not(.strip-5grid):not(.rk-cal-grid),
body.is-mobile-device .modal-body [style*="display:grid"] { grid-template-columns: minmax(0, 1fr) !important; }
body.is-mobile-device .table-wrap { width: 100%; max-width: 100%; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
body.is-mobile-device .mainw svg { max-width: 100%; height: auto; }
body.is-mobile-device .report-sheet { padding: 14px 12px !important; border-radius: 12px; }
body.is-mobile-device .report-letterhead { flex-direction: column; gap: 10px; }
body.is-mobile-device .report-signatures { grid-template-columns: 1fr !important; gap: 18px; margin-top: 20px; }
body.is-mobile-device footer { flex-direction: column; text-align: center; padding: 10px 14px !important; font-size: 10.5px !important; }
body.is-mobile-device .modal { width: calc(100vw - 18px) !important; max-height: 92vh !important; border-radius: 14px; }
body.is-mobile-device .modal-header { padding: 12px 16px; }
body.is-mobile-device .modal-body { padding: 14px 16px; }
body.is-mobile-device .modal-footer { padding: 10px 16px; flex-wrap: wrap; }

/* ===== FREEZE PANES ALA EXCEL UNTUK LAPORAN LABA RUGI ===== */
.lr-freeze-wrap {
  max-height: calc(100vh - 255px);
  min-height: 380px;
  overflow: auto !important;
  position: relative;
}
.lr-freeze-wrap table.data-table {
  border-collapse: separate;
  border-spacing: 0;
}
.lr-freeze-wrap table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #ecfdf5;
  box-shadow: inset 0 -1px 0 #cbd5e1;
}
.lr-freeze-wrap table.data-table thead th:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 85px;
  min-width: 85px;
  max-width: 85px;
}
.lr-freeze-wrap table.data-table thead th:nth-child(2) {
  position: sticky;
  left: 85px;
  z-index: 6;
  width: 235px;
  min-width: 235px;
  max-width: 235px;
  box-shadow: inset 0 -1px 0 #cbd5e1, 3px 0 6px -2px rgba(15, 23, 42, 0.1);
}
.lr-freeze-wrap table.data-table tbody td:nth-child(1):not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 85px;
  min-width: 85px;
  max-width: 85px;
  background: inherit;
}
.lr-freeze-wrap table.data-table tbody td:nth-child(2):not([colspan]) {
  position: sticky;
  left: 85px;
  z-index: 3;
  width: 235px;
  min-width: 235px;
  max-width: 235px;
  background: inherit;
  box-shadow: 3px 0 6px -2px rgba(15, 23, 42, 0.08);
}
.lr-freeze-wrap table.data-table tbody tr {
  background: #ffffff;
}
.lr-freeze-wrap table.data-table td[colspan="2"] {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  background: inherit;
  box-shadow: 3px 0 6px -2px rgba(15, 23, 42, 0.08);
}
.lr-freeze-wrap table.data-table tfoot tr.row-total td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #d1fae5;
  box-shadow: inset 0 1px 0 #10b981;
}
.lr-freeze-wrap table.data-table tfoot tr.row-total td[colspan="2"] {
  left: 0;
  z-index: 6;
  box-shadow: inset 0 1px 0 #10b981, 3px 0 6px -2px rgba(15, 23, 42, 0.1);
}

@media print {
  .lr-freeze-wrap { max-height: none !important; overflow: visible !important; }
  .lr-freeze-wrap th, .lr-freeze-wrap td { position: static !important; box-shadow: none !important; }
  body { background: #fff; font-size: 10.5pt; color: #000; }
  .nu-sidebar, .nu-topbar, .no-print, .toast-container, .modal-backdrop { display: none !important; }
  .nu-main { margin-left: 0 !important; }
  .mainw { padding: 0 !important; max-width: 100% !important; }
  .card, .report-sheet { box-shadow: none !important; border: none !important; padding: 0 !important; }
  table.data-table th { background: #065f46 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.data-table tr.row-total td { background: #d1fae5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Custom Month & Date Period Picker (Input Data Realisasi -> Diagram) */
.real-period-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.real-period-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  color: #064e3b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.08);
  transition: all 0.16s ease;
}
.real-period-trigger:hover,
.real-period-trigger.open {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.14);
}
.real-diag-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: 286px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d1fae5;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(5, 150, 105, 0.08);
}
.real-diag-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #f1f5f9;
}
.real-month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.real-month-pill {
  padding: 6px 4px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.14s ease;
}
.real-month-pill:hover {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}
.real-month-pill.in-range {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.real-month-pill.active {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #047857;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.28);
}
.real-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.real-preset-btn {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.real-preset-btn:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
.real-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.08);
}
.real-date-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #064e3b;
  outline: none;
  cursor: pointer;
  padding: 1px 2px;
}

/* Franchise & Kemitraan Executive UI */
.fr-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 65%, #ecfdf5 100%);
  border: 1px solid #d1fae5;
  border-left: 4px solid #059669;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.05);
}
.fr-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.fr-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #854d0e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.fr-hero-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #064e3b;
}
.fr-hero-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}
.fr-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  overflow-x: auto;
}
.fr-tab-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.fr-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fr-tab-btn:hover {
  background: #f0fdf4;
  color: #064e3b;
}
.fr-tab-btn.active {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.24);
}
.fr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.fr-kpi-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
}
.fr-kpi-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}
.fr-kpi-ico svg { width: 21px; height: 21px; }
.fr-score-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ffffff;
  box-shadow: inset 0 0 0 6px #d1fae5, 0 4px 14px rgba(5, 150, 105, 0.12);
}
.fr-swot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.fr-paper-sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 34px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

/* Elegant Cloud Save Status Pill (Topbar) */
.cloud-save-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  backdrop-filter: blur(6px);
}
.cloud-save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cloud-save-pill.is-saved {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(110, 231, 183, 0.45);
  color: #ecfdf5;
}
.cloud-save-pill.is-saved .cloud-save-dot {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
}
.cloud-save-pill.is-saving {
  background: rgba(250, 204, 21, 0.2);
  border: 1px solid rgba(253, 224, 71, 0.5);
  color: #fef9c3;
}
.cloud-save-pill.is-saving .cloud-save-dot {
  background: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.85);
}
.cloud-save-pill.is-unsaved {
  background: rgba(225, 29, 72, 0.25);
  border: 1px solid rgba(253, 164, 175, 0.65);
  color: #ffe4e6;
}
.cloud-save-pill.is-unsaved .cloud-save-dot {
  background: #fb7185;
  box-shadow: 0 0 8px rgba(251, 113, 133, 0.9);
}
