:root {
  --g1: #0a5c3e;
  --g2: #0e7c54;
  --g3: #1aab74;
  --b1: #0c4a7a;
  --b2: #1565c0;
  --b3: #1e88e5;
  --grad: linear-gradient(135deg, #0a5c3e 0%, #0e7c54 45%, #1565c0 100%);
  --grad2: linear-gradient(135deg, #1aab74, #1e88e5);
  --light: #f0f7f4;
  --light2: #e8f4fd;
  --border: #d1e8dc;
  --border2: #c5daf0;
  --text: #0f1f17;
  --muted: #5a7a6a;
  --muted2: #4a6a8a;
  --shadow: 0 1px 8px rgba(10, 92, 62, 0.08), 0 4px 16px rgba(10, 92, 62, 0.06);
  --shadow2: 0 4px 24px rgba(10, 92, 62, 0.15);
  --font: "Inter", sans-serif;
  --font2: "Plus Jakarta Sans", sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font);
  background: #ecf5f0;
  color: var(--text);
  min-height: 100vh;
}
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: #e0ede7;
}
::-webkit-scrollbar-thumb {
  background: var(--g2);
  border-radius: 2px;
}

/* SVG icon helper */
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ico svg {
  display: block;
}

/* ===== LOGIN ===== */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--grad);
  position: relative;
  overflow: hidden;
}
#login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 20% 40%,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 80% at 80% 60%,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 70%
    );
}
#login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='40' cy='40' r='1' fill='rgba(255,255,255,0.06)'/%3E%3C/g%3E%3C/svg%3E");
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 1;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fadeUp {
  from {
    transform: translateY(28px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.login-title {
  font-family: var(--font2);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.login-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.6;
}
.login-sub strong {
  color: var(--g2);
}
.lform-group {
  margin-bottom: 15px;
}
.lform-label {
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
}

.lform-select {
  width: 100%;
  background: #f7fbf9;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.lform-input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ccc;
}
.lform-select:focus {
  border-color: var(--g3);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 171, 116, 0.1);
}
.lform-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235a7a6a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.pw-wrap {
  position: relative;
}
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.pw-toggle:hover {
  background: #f0f4f2;
}
.btn-login {
  width: 100%;
  background: var(--grad2);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font2);
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(26, 171, 116, 0.3);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 171, 116, 0.4);
}
.login-err {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
}
.login-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
  background: #f7fbf9;
  border-radius: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
}
.login-hint code {
  color: var(--g2);
  font-weight: 700;
  font-size: 11px;
}

/* ===== APP ===== */
#app-page {
  display: none;
}

/* HEADER */
.header {
  background: var(--grad);
  padding: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-box {
  background: rgb(255, 255, 255);
  border-radius: 20px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.brand-text {
  color: #fff;
}
.brand-title {
  font-family: var(--font2);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.2px;
}
.brand-sub {
  font-size: 10px;
  opacity: 0.75;
  font-weight: 500;
  margin-top: 1px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 1px;
}
.hnav {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 2px solid transparent;
  height: 44px;
}
.hnav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.hnav.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.8);
}
.hnav .ico svg {
  opacity: 0.8;
}
.hnav.active .ico svg {
  opacity: 1;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
   pointer-events: auto;
}
.user-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  z-index: 1000;
  cursor: pointer;
}
.btn-logout {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
}
.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* LAYOUT */
.layout {
  display: flex;
  height: calc(100vh - 58px);
  overflow: hidden;
}
.sidebar {
  width: 232px;
  background: #fff;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sb-section {
  padding: 14px 0 8px;
}
.sb-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 16px 6px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
  border-left: 3px solid transparent;
}
.sb-item:hover {
  background: var(--light);
  color: var(--text);
}
.sb-item.active {
  background: linear-gradient(
    90deg,
    rgba(14, 124, 84, 0.1),
    rgba(21, 101, 192, 0.05)
  );
  color: var(--g2);
  border-left-color: var(--g2);
}
.sb-item .ico svg {
  color: currentColor;
}
.sb-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 14px;
}
.sb-kitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
  border-left: 3px solid transparent;
}
.sb-kitem:hover {
  background: var(--light);
  color: var(--text);
}
.sb-kitem.active {
  color: var(--g2);
  border-left-color: var(--g3);
}
.kbadge {
  background: var(--g2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
.kbadge.b {
  background: var(--b2);
}
.sb-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sf-card {
  background: var(--grad2);
  border-radius: 10px;
  padding: 13px;
  color: #fff;
}
.sf-role {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.sf-name {
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.4;
}
.sf-klaster {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 4px;
  font-weight: 500;
}

/* CONTENT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
.page {
  display: none;
}
.page.active {
  display: block;
}

/* PAGE HEAD */
.page-head {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.ph-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ph-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ph-title {
  font-family: var(--font2);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.ph-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* STATS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
}
.sb1::before {
  background: var(--grad2);
}
.sb2::before {
  background: linear-gradient(90deg, var(--b2), var(--b3));
}
.sb3::before {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}
.sb4::before {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}
.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.stat-val {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font2);
  letter-spacing: -1px;
}
.sv1 {
  color: var(--g2);
}
.sv2 {
  color: var(--b2);
}
.sv3 {
  color: #d97706;
}
.sv4 {
  color: #7c3aed;
}
.stat-ico-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 90%;
}
.sb1 .stat-ico-box {
  background: var(--g2);
}
.sb2 .stat-ico-box {
  background: var(--b2);
}
.sb3 .stat-ico-box {
  background: #d97706;
}
.sb4 .stat-ico-box {
  background: #7c3aed;
}
.stat-lbl {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

/* KLASTER CARDS */
.kgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kcard {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s;
  box-shadow: var(--shadow);
}
.kcard:hover {
  border-color: var(--g3);
  transform: translateY(-3px);
  box-shadow: var(--shadow2);
}
.kcard.active {
  border-color: var(--g2);
  background: linear-gradient(
    160deg,
    rgba(14, 124, 84, 0.07),
    rgba(21, 101, 192, 0.04)
  );
}
.kcard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad2);
  margin: 0 auto 10px;
  box-shadow: 0 3px 10px rgba(26, 171, 116, 0.25);
}
.kcard-num {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font2);
}
.kcard-name {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 600;
}
.kcard-cnt {
  font-size: 10px;
  color: var(--b2);
  margin-top: 6px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.3px;
}
.kcard.active .kcard-cnt {
  color: var(--g2);
}

/* SUB KLASTER */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.sub-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sub-card:hover {
  border-color: var(--b3);
  background: var(--light2);
  transform: translateY(-1px);
}
.sub-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(14, 124, 84, 0.15),
    rgba(21, 101, 192, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sub-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.sub-cnt {
  font-size: 10px;
  color: var(--muted2);
  margin-top: 2px;
  font-family: monospace;
}
.sec-title {
  font-family: var(--font2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sec-title::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--grad2);
  border-radius: 2px;
  flex-shrink: 0;
}

/* TABLE */
.table-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tc-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    90deg,
    rgba(14, 124, 84, 0.04),
    rgba(21, 101, 192, 0.03)
  );
}
.tc-title {
  font-family: var(--font2);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.tc-count {
  background: var(--g2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: monospace;
  letter-spacing: 0.3px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead tr {
  background: linear-gradient(90deg, #e6f5ee, #ddeef8);
}
th {
  padding: 9px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--g1);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--border);
}
td {
  padding: 11px 14px;
  font-size: 12.5px;
  border-bottom: 1px solid #eef7f2;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: rgba(14, 124, 84, 0.025);
}

/* TAGS */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.tag-green {
  background: #dcfce7;
  color: #166534;
}
.tag-blue {
  background: #dbeafe;
  color: #1e40af;
}
.tag-teal {
  background: #ccfbf1;
  color: #0f766e;
}
.tag-orange {
  background: #ffedd5;
  color: #9a3412;
}
.tag-red {
  background: #fee2e2;
  color: #991b1b;
}
.tag-purple {
  background: #ede9fe;
  color: #5b21b6;
}
.tag-yellow {
  background: #fef9c3;
  color: #854d0e;
}
.month-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--grad2);
  color: #fff;
  letter-spacing: 0.2px;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g3);
}

/* FORMS */
.form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.fs-title {
  font-family: var(--font2);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ft-icon {
  background: var(--grad2);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.fgroup {
  margin-bottom: 13px;
}
.fgroup:last-child {
  margin-bottom: 0;
}
.flabel {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.fcontrol {
  width: 100%;
  background: #f7fbf9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.fcontrol:focus {
  border-color: var(--g3);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 171, 116, 0.1);
}
select.fcontrol {
  cursor: pointer;
}
textarea.fcontrol {
  resize: vertical;
  min-height: 76px;
}
.readonly-field {
  background: #eef7f4;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 13px;
  color: var(--g1);
  font-weight: 600;
}

/* FILTER */
.filter-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.filter-title {
  font-family: var(--font2);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.flt-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 130px;
}
.flt-group label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.f-input {
  background: #f7fbf9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.f-input:focus {
  border-color: var(--g3);
}
.sw {
  position: relative;
  flex: 2.5;
  min-width: 220px;
}
.sw label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 5px;
}
.si-abs {
  position: absolute;
  left: 11px;
  bottom: 10px;
  pointer-events: none;
}
.f-search {
  padding-left: 34px !important;
}

/* BUTTONS */
.btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  letter-spacing: 0.1px;
}
.btn-primary {
  background: var(--grad2);
  color: #fff;
  box-shadow: 0 2px 10px rgba(26, 171, 116, 0.28);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 171, 116, 0.38);
}
.btn-outline {
  background: #fff;
  color: var(--g2);
  border: 1.5px solid var(--g2);
}
.btn-outline:hover {
  background: var(--light);
}
.btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
}
.btn-danger:hover {
  background: #fef2f2;
}
.btn-gray {
  background: #f4f6f8;
  color: var(--muted);
  border: 1px solid #e2e8f0;
}
.btn-gray:hover {
  background: #e9edf2;
}
.btn-sm {
  padding: 5px 10px !important;
  font-size: 11px !important;
  gap: 4px !important;
}

/* UPLOAD TABLE */
.upload-table {
  width: 100%;
  border-collapse: collapse;
}
.upload-table thead tr {
  background: linear-gradient(90deg, #e6f5ee, #ddeef8);
}
.upload-table th {
  padding: 9px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--g1);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--border);
}
.upload-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eef7f2;
  vertical-align: middle;
  font-size: 13px;
}
.upload-table tr:last-child td {
  border-bottom: none;
}
.upload-table tr:hover td {
  background: rgba(14, 124, 84, 0.02);
}
.up-doc-name {
  font-weight: 600;
  color: var(--text);
}
.up-file-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7fbf9;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 11px;
  min-width: 200px;
  height: 36px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.up-file-box.has-file {
  color: var(--g2);
  font-weight: 600;
  border-color: var(--g3);
  background: #edfaf4;
}
.up-row-btns {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}
.btn-pilih {
  background: var(--g2);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn-pilih:hover {
  background: var(--g1);
}
.btn-upl {
  background: #b45309;
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn-upl:hover {
  background: #92400e;
}
.btn-upl.done {
  background: var(--b2);
}
.btn-upl.done:hover {
  background: var(--b1);
}
.up-num {
  font-family: monospace;
  font-weight: 700;
  color: var(--g2);
  font-size: 12px;
}
.file-hidden {
  display: none;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  background: #fff;
  border-left: 3px solid var(--g2);
  border-radius: 10px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 280px;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.toast-msg {
  font-size: 13px;
  font-weight: 600;
}
.toast.t-err {
  border-left-color: #dc2626;
}
.toast.t-info {
  border-left-color: var(--b2);
}

/* MODAL */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 20, 0.4);
  backdrop-filter: blur(3px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.overlay.open {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  max-width: 520px;
  width: 90%;
  animation: su 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes su {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}
.modal-ttl {
  font-family: var(--font2);
  font-size: 14px;
  font-weight: 700;
}
.modal-x {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
}
.modal-x:hover {
  background: #f0f4f2;
  color: var(--text);
}
.dr {
  display: flex;
  gap: 10px;
  margin-bottom: 11px;
  font-size: 13px;
}
.drl {
  min-width: 135px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.drv {
  color: var(--text);
  font-weight: 500;
}

/* PAGINATION */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.pp {
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: all 0.15s;
}
.pp:hover,
.pp.active {
  background: var(--g2);
  color: #fff;
  border-color: var(--g2);
}
.empty-state {
  text-align: center;
  padding: 56px 20px;
  display: none;
}
.empty-ico-wrap {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e6f5ee, #ddeef8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.footer {
  background-color: #ecf5f0;
  padding: 10px;
  text-align: center;
  border-top: 1px solid #d1e7dd;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

.footer p {
  margin: 0;
  font-size: 13px;
  color: #2d3748;
}

html, body {
  height: 100%;
  margin: 0;
}

.content {
  flex: 1;
  padding: 20px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.form-card { background: #fff; border-radius: 12px; border: 1px solid #dde8e2; padding: 1.75rem; }
.section-title { font-size: 13px; font-weight: 600; color: #1a5c38; margin-bottom: 1rem; padding-bottom: 6px; border-bottom: 1px solid #eef4f0; }

.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 1.25rem; }
.field { margin-bottom: 1.25rem; }

label { font-size: 13px; font-weight: 500; color: #333; display: block; margin-bottom: 5px; }
label .req { color: #e24b4a; }
label .opt { font-weight: 400; color: #aaa; }

select, input[type="number"], textarea {
  width: 100%; padding: 9px 12px; font-size: 13px;
  border: 1px solid #ccc; border-radius: 8px;
  background: #fff; color: #222; font-family: sans-serif;
  appearance: none; outline: none; transition: border-color 0.2s;
}
select:focus, input:focus, textarea:focus { border-color: #1a7a6e; }

.select-wrap { position: relative; }
.select-wrap::after { content: '▼'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; color: #888; pointer-events: none; }

#program-display {
  width: 100%; padding: 9px 12px; font-size: 13px;
  border: 1px solid #ccc; border-radius: 8px;
  background: #fff; color: #aaa; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none; transition: border-color 0.2s;
}
#program-display:hover { border-color: #aaa; }
#program-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  border: 1px solid #ccc; border-radius: 8px; background: #fff;
  z-index: 99; max-height: 220px; overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.prog-item { padding: 9px 12px; font-size: 13px; cursor: pointer; color: #222; border-bottom: 1px solid #f0f0f0; }
.prog-item:hover { background: #eef4f0; color: #1a5c38; }
.prog-item:last-child { border-bottom: none; }

.file-drop {
  border: 2px dashed #b0cfc4; border-radius: 8px;
  padding: 2rem 1rem; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s; position: relative;
}
.file-drop:hover { border-color: #1a7a6e; background: #f5faf7; }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-drop .icon { font-size: 32px; margin-bottom: 8px; }
.file-drop .link { color: #1a7a6e; font-weight: 500; font-size: 13px; }
.file-drop .sub { font-size: 12px; color: #888; margin-top: 4px; }
.file-drop .types { font-size: 11px; color: #aaa; margin-top: 2px; }
#file-list { margin-top: 8px; }
.file-item { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; background: #eef4f0; border-radius: 6px; font-size: 13px; color: #1a3a2a; margin-top: 6px; }
.file-item .remove { cursor: pointer; color: #e24b4a; font-size: 18px; line-height: 1; }

textarea { resize: vertical; min-height: 70px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #eee; }
.btn-batal { padding: 9px 24px; font-size: 13px; border: 1px solid #ccc; border-radius: 8px; background: #fff; color: #444; cursor: pointer; font-weight: 500; }
.btn-batal:hover { background: #f5f5f5; }
.btn-upload { padding: 9px 24px; font-size: 13px; border: none; border-radius: 8px; background: #1a7a6e; color: #fff; cursor: pointer; font-weight: 500; }
.btn-upload:hover { background: #1a5c38; }

.user-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  z-index: 2000;
}

.user-dropdown {
  position: relative;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #2c6e91;
  border-radius: 20px;
  color: white;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  right: 0;
  width: 230px;
  background: #f5f5f5;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 0.3s;
  z-index: 999;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 15px;
  border-bottom: 1px solid #ddd;
}

.dropdown-item {
  padding: 12px 15px;
  cursor: pointer;
}

.header-right {
  overflow: visible !important;
}

.dropdown-item:hover {
  background: #eaeaea;
}

.logout {
  color: red;
}
/* ============================================================
   USER DROPDOWN (nav.js + header partial)
   ============================================================ */
.user-menu {
  position: relative;
}

#userPillBtn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
#userPillBtn:hover {
  background: rgba(255,255,255,0.22);
}
.caret-icon {
  transition: transform 0.25s;
}
#userPillBtn[aria-expanded="true"] .caret-icon {
  transform: rotate(180deg);
}

.user-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.16);
  border: 1px solid #e5e7eb;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
  z-index: 9999;
  overflow: hidden;
}
.user-dropdown-panel.udp-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.udp-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f9fc;
}
.udp-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
}
.udp-role {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}
.udp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.udp-item:hover {
  background: #f3f4f6;
}
.udp-logout {
  color: #dc2626;
  border-top: 1px solid #f0f0f0;
}
.udp-logout:hover {
  background: #fff5f5;
}
.udp-ico {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* ============================================================
   SIDEBAR KLASTER DROPDOWN
   ============================================================ */
.sb-dropdown-toggle {
  cursor: pointer;
  user-select: none;
}
.sb-caret {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
}
.sb-dropdown-panel {
  padding-left: 10px;
  overflow: hidden;
}
.sb-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-hapus {
  padding: 9px 24px;
  font-size: 13px;
  border: none;
  border-radius: 8px;
  background: #e24b4a;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
}

.btn-hapus:hover {
  background: #c0392b;
}
/* ===== TOMBOL AKSI TABEL (Download, Edit, Hapus) ===== */
.btn-aksi {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
  line-height: 1;
}
.btn-aksi:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.10); }
.btn-aksi:active { transform: translateY(0); box-shadow: none; }
.btn-aksi svg { flex-shrink: 0; }

.btn-download {
  background: #e6f4f1;
  color: #13695f;
  border: 1.5px solid #a8d5cc;
}
.btn-download:hover { background: #c8eae5; }

.btn-edit {
  background: #fffbea;
  color: #92620a;
  border: 1.5px solid #f0d078;
}
.btn-edit:hover { background: #fff0b0; }

.btn-hapus {
  background: #fef0f0;
  color: #b91c1c;
  border: 1.5px solid #f5c0c0;
  padding: 6px 12px !important;
  font-size: 11.5px !important;
  border-radius: 7px !important;
  font-weight: 600 !important;
}
.btn-hapus:hover { background: #fddada; }

/* ===== TABLE WRAPPER: prevent horizontal scroll ===== */
.table-card {
  overflow: hidden;
}
.table-scroll-wrap {
  overflow-x: auto;
  width: 100%;
}
.table-scroll-wrap table {
  min-width: 700px;
}
/* Kolom File: truncate panjang nama file */
td.col-file {
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Kolom Aksi: compact wrap */
td.col-aksi {
  white-space: nowrap;
}
td.col-aksi .aksi-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
}