
:root {
  --gold: #c9a227;
  --gold-light: #e8c766;
  --gold-dark: #8a6d1f;

  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #f9f8f4;
  --text: #1c1c22;
  --text-muted: #6b6b76;
  --border: #e4e2d8;
  --sidebar-bg: #24262b;
  --sidebar-text: #b7b8bc;
  --sidebar-active: #32343a;
  --sidebar-heading: #ffffff;
  --sidebar-sub: #85868c;
  --sidebar-border: rgba(255,255,255,.08);
  --sidebar-hover: rgba(255,255,255,.05);
  --shadow: 0 2px 10px rgba(0,0,0,.06);
}

[data-theme="dark"] {
  --bg: #121216;
  --surface: #1a1a22;
  --surface-2: #202029;
  --text: #ecebf0;
  --text-muted: #9c9ba8;
  --border: #2e2e3a;
  --sidebar-bg: #1e2024;
  --sidebar-text: #adaeb3;
  --sidebar-active: #2b2d32;
  --sidebar-heading: #ffffff;
  --sidebar-sub: #83848a;
  --sidebar-border: rgba(255,255,255,.08);
  --sidebar-hover: rgba(255,255,255,.05);
  --shadow: 0 2px 14px rgba(0,0,0,.4);
}

[data-theme="light"] {
  --sidebar-bg: #f6f0dd;
  --sidebar-text: #6b5c3a;
  --sidebar-active: #ecdfb8;
  --sidebar-heading: #4a3b1f;
  --sidebar-sub: #9c8a5e;
  --sidebar-border: rgba(138,109,31,.15);
  --sidebar-hover: rgba(138,109,31,.08);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0; font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg); color: var(--text);
  transition: background .2s, color .2s;
}
a {
  color: inherit;
}
.icon {
  display: inline-block;
  vertical-align: middle;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px; background: var(--sidebar-bg); color: var(--sidebar-text);
  flex-shrink: 0; display: flex; flex-direction: column; height: 100vh;
  position: sticky; top: 0; overflow-y: auto; transition: background .2s ease;
}
.sidebar-logo {
  padding: 20px 18px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-logo .brand-text {
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  color: var(--sidebar-heading);
  letter-spacing: .7px;
}
.sidebar-logo .brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--sidebar-sub);
  margin-top: 1px;
}

.sidebar-profile {
  padding: 16px 18px; display: flex; gap: 10px; align-items: center;
  border-bottom: 1px solid var(--sidebar-border); cursor: default;
}
.sidebar-profile .avatar {
  width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center; color: #16160f; font-weight: 700; font-size: 15px;
  flex-shrink: 0; overflow: hidden;
}
.sidebar-profile .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-profile .info {
  min-width: 0;
}
.sidebar-profile .info .nama {
  font-size: 13px;
  font-weight: 600;
  color: var(--sidebar-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile .info .nrp {
  font-size: 11px;
  color: var(--sidebar-sub);
}
.sidebar-profile .info .jabatan {
  font-size: 11px;
  color: var(--gold-dark);
  margin-top: 1px;
}
[data-theme="dark"] .sidebar-profile .info .jabatan {
  color: var(--gold-light);
}

.sidebar nav {
  padding: 10px 0;
  flex: 1;
}
.nav-group {
  margin-bottom: 6px;
}
.nav-group-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--sidebar-sub);
  padding: 12px 18px 6px; font-weight: 700;
}
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 18px;
  color: var(--sidebar-text); text-decoration: none; font-size: 13.5px;
  border-left: 3px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.sidebar nav a .icon {
  opacity: .8;
  flex-shrink: 0;
}
.sidebar nav a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-heading);
}
.sidebar nav a.active {
  background: var(--sidebar-active);
  border-left-color: var(--gold);
  color: var(--sidebar-heading);
}
.sidebar nav a.active .icon {
  opacity: 1;
  color: var(--gold-dark);
}
[data-theme="dark"] .sidebar nav a.active .icon {
  color: var(--gold-light);
}
.sidebar nav a .badge-count {
  margin-left: auto; background: var(--gold-dark); color: #fff; border-radius: 10px; font-size: 10.5px;
  padding: 1px 7px;
}
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b0433f;
  text-decoration: none;
  font-size: 13.5px;
}
.sidebar-footer a:hover {
  color: #d15650;
}

.sidebar-footer a.link-netral {
  color: var(--sidebar-text);
}
.sidebar-footer a.link-netral:hover {
  color: var(--sidebar-heading);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 2000;
}
.topbar .page-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.sidebar-toggle-btn {
  display: none;
  margin-right: 4px;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.icon-btn .dot {
  position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: #c0392b; border: 2px solid var(--surface);
}
.topbar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 20px;
  cursor: default;
}
.topbar-profile:hover {
  background: var(--surface-2);
}
.topbar-profile .avatar-sm {
  width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center; color: #16160f; font-weight: 700; font-size: 12px;
}
.topbar-profile .tp-name {
  font-size: 13px;
  font-weight: 600;
}
.topbar-profile .tp-role {
  font-size: 10.5px;
  color: var(--text-muted);
}

.content {
  padding: 24px;
}

.page-title {
  background: linear-gradient(120deg, var(--gold-dark), var(--gold));
  color: #fff; padding: 14px 20px; border-radius: 8px;
  font-weight: 700; margin-bottom: 18px; font-size: 15px; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.banner-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .banner-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .banner-grid-4 {
    grid-template-columns: 1fr;
  }
}
.banner-card {
  border-radius: 14px; padding: 22px 24px; display: flex; align-items: center; gap: 18px;
  color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; cursor: pointer; transition: transform .12s ease;
}
.banner-card:hover {
  transform: translateY(-2px);
}
.banner-card::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.banner-card.banner-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
}
.banner-card.banner-dark {
  background: linear-gradient(135deg, #1c1c26, #34303f);
}
.banner-icon {
  width: 52px; height: 52px; border-radius: 12px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 1;
}
.banner-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  z-index: 1;
  position: relative;
}
.banner-lbl {
  font-size: 12.5px;
  opacity: .9;
  margin-top: 5px;
  z-index: 1;
  position: relative;
}
.selected-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  padding: 8px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: #f7f7f9;
  margin-bottom: 10px;
}
.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border, #ddd);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  font-size: 12.5px;
  line-height: 1.3;
}
.selected-chip button {
  border: none;
  background: #eee;
  color: #555;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.selected-chip button:hover {
  background: #e23;
  color: #fff;
}

.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  display: flex; align-items: center; gap: 7px; padding: 11px 18px; border: none; background: transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  color: var(--gold-dark);
  border-bottom-color: var(--gold);
}
[data-theme="dark"] .tab-btn.active {
  color: var(--gold-light);
}
.tab-btn .badge-count {
  background: var(--gold-dark);
  color: #fff;
  border-radius: 10px;
  font-size: 10.5px;
  padding: 1px 7px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
}
.stat-card .stat-icon {
  width: 42px; height: 42px; border-radius: 10px; background: rgba(201,162,39,.12); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
[data-theme="dark"] .stat-card .stat-icon {
  color: var(--gold-light);
}
.stat-card .num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-card .lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card.warn {
  border-left-color: #c0392b;
}
.stat-card.warn .stat-icon {
  background: rgba(192,57,43,.12);
  color: #c0392b;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}
table th, table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
table tr:hover td {
  background: var(--surface-2);
}

.badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  display: inline-block;
}
.badge-baik {
  background: #2e7d32;
}
.badge-rr {
  background: var(--gold-dark);
}
.badge-rb {
  background: #b03a2e;
}

.badge-aksi {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-block;
  text-transform: capitalize;
}
.aksi-login {
  background: rgba(46,125,50,.15);
  color: #2e7d32;
}
.aksi-logout {
  background: rgba(176,58,46,.13);
  color: #b03a2e;
}
.aksi-tambah {
  background: rgba(46,125,50,.15);
  color: #2e7d32;
}
.aksi-edit {
  background: rgba(138,109,31,.15);
  color: var(--gold-dark);
}
.aksi-hapus {
  background: rgba(176,58,46,.15);
  color: #b03a2e;
}
.aksi-default {
  background: var(--surface-2);
  color: var(--text-muted);
}
[data-theme="dark"] .aksi-edit {
  color: var(--gold-light);
}

.badge-role {
  padding: 4px 11px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.role-admin {
  background: rgba(176,58,46,.15);
  color: #b03a2e;
}
.role-editor {
  background: rgba(138,109,31,.15);
  color: var(--gold-dark);
}
.role-viewer {
  background: rgba(107,107,118,.18);
  color: var(--text-muted);
}
[data-theme="dark"] .role-editor {
  color: var(--gold-light);
}

.badge-yes {
  background: rgba(46,125,50,.15);
  color: #2e7d32;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-no {
  background: rgba(58,110,165,.15);
  color: #3a6ea5;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
[data-theme="dark"] .badge-no {
  color: #6ea3d8;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: none;
  background: linear-gradient(120deg, var(--gold-dark), var(--gold)); color: #fff; text-decoration: none; font-size: 13px; cursor: pointer;
  font-weight: 600;
}
.btn:hover {
  filter: brightness(1.1);
}
.btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.success {
  background: #2e7d32;
}
.btn.danger {
  background: #b03a2e;
}
.btn.small {
  padding: 6px 11px;
  font-size: 12px;
}

form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin: 12px 0 4px;
  color: var(--text-muted);
}
form input, form select, form textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
  background: var(--surface); color: var(--text);
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
form .field-hint {
  display: block;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
  margin: 6px 0 14px;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.form-row > div {
  flex: 1;
  min-width: 180px;
}

.alert {
  padding: 11px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-success {
  background: rgba(46,125,50,.12);
  color: #2e7d32;
  border: 1px solid rgba(46,125,50,.3);
}
.alert-error {
  background: rgba(176,58,46,.12);
  color: #b03a2e;
  border: 1px solid rgba(176,58,46,.3);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: end;
}
.filter-bar > div {
  flex: 1;
  min-width: 140px;
}
.filter-bar label {
  font-size: 11px;
  margin-bottom: 3px;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-muted);
}
#map {
  height: 400px;
  border-radius: 8px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 12px;
  margin-top: 10px;
}
.photo-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}
.photo-box img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.photo-box a {
  display: block;
  cursor: zoom-in;
}
.lightbox-trigger {
  cursor: zoom-in;
}
#lightboxModal {
  cursor: zoom-out;
}
.photo-box .cap {
  padding: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.photo-box .cap .btn.small {
  padding: 3px 7px;
}

.calc-box {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 10px;
  font-size: 13px;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dotted var(--border);
}
.calc-row:last-child {
  border-bottom: none;
  font-weight: 700;
  padding-top: 8px;
}
.calc-row .lbl {
  color: var(--text-muted);
}

.auth-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(201,162,39,.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(201,162,39,.12), transparent 45%),
    linear-gradient(160deg, #0a0a0e 0%, #17171f 45%, #1f1a10 100%);
  padding: 20px;
}
.auth-bg.network-bg {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #050507 0%, #0c0c11 50%, #120f0a 100%);
}
.auth-bg.network-bg #networkCanvas {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.auth-bg.network-bg .welcome-wrap, .auth-bg.network-bg .glass-card {
  position: relative;
  z-index: 1;
}
.glass-card {
  width: 100%; max-width: 400px; background: rgba(255,255,255,.06);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  padding: 34px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
  color: #f2f1e9;
}
.glass-card .logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.glass-card h2 {
  text-align: center;
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: .5px;
}
.glass-card p.sub {
  text-align: center;
  color: #c8c6d0;
  font-size: 12.5px;
  margin-bottom: 22px;
}
.glass-card label {
  color: #d8d6e0;
  font-size: 12px;
  margin: 14px 0 5px;
  display: block;
}
.glass-card input {
  width: 100%; padding: 11px 13px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07); color: #fff; font-size: 13.5px;
}
.glass-card input::placeholder {
  color: #a6a4b3;
}
.glass-card input:focus {
  outline: none;
  border-color: var(--gold-light);
}
.glass-card .btn-login {
  width: 100%; margin-top: 22px; padding: 12px; border: none; border-radius: 9px;
  background: linear-gradient(120deg, var(--gold-dark), var(--gold-light)); color: #16160f; font-weight: 700; font-size: 14px; cursor: pointer;
}
.glass-card .btn-login:hover {
  filter: brightness(1.08);
}
.glass-card .demo-hint {
  text-align: center;
  font-size: 11px;
  color: #9c9aab;
  margin-top: 18px;
}

.welcome-wrap {
  text-align: center;
  color: #f2f1e9;
  max-width: 560px;
}
.welcome-wrap .logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.welcome-wrap h1 {
  font-size: 28px;
  margin: 0 0 6px;
  letter-spacing: .5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.welcome-wrap h1 span {
  color: #ffd700;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(255, 215, 0, .95), 0 0 20px rgba(255, 199, 0, .6), 0 2px 10px rgba(0, 0, 0, .8);
}
.welcome-wrap p {
  color: #b9b7c4;
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 30px;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.welcome-wrap .btn {
  padding: 13px 34px;
  font-size: 14px;
  border-radius: 10px;
}
.notif-wrap {
  position: relative;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 12px); right: -6px; width: 360px; max-width: 90vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,.28); z-index: 3000;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  overflow: hidden;
}
.notif-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.notif-dropdown::before {
  content: ""; position: absolute; top: -6px; right: 18px; width: 12px; height: 12px;
  background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.notif-header {
  background: linear-gradient(120deg, var(--gold-dark), var(--gold));
  color: #fff; padding: 14px 18px; font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; justify-content: space-between;
}
.notif-count-pill {
  background: rgba(255,255,255,.22);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
}
.notif-list {
  max-height: 340px;
  overflow-y: auto;
}
.notif-item {
  display: flex; gap: 12px; padding: 13px 18px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border); position: relative; transition: background .12s;
}
.notif-item:hover {
  background: var(--surface-2);
}
.notif-item.unread {
  background: rgba(201,162,39,.06);
}
.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-icon.warn {
  background: rgba(138,109,31,.15);
  color: var(--gold-dark);
}
.notif-icon.danger {
  background: rgba(176,58,46,.15);
  color: #b03a2e;
}
[data-theme="dark"] .notif-icon.warn {
  color: var(--gold-light);
}
.notif-body {
  min-width: 0;
  flex: 1;
}
.notif-title {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-msg {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-time {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: .75;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.notif-empty svg {
  opacity: .3;
  margin-bottom: 10px;
}
.notif-empty p {
  margin: 0;
  font-size: 12.5px;
}
.notif-footer {
  display: block; text-align: center; padding: 12px; font-size: 12.5px; font-weight: 600;
  color: var(--gold-dark); text-decoration: none; border-top: 1px solid var(--border); background: var(--surface-2);
}
[data-theme="dark"] .notif-footer {
  color: var(--gold-light);
}
.notif-footer:hover {
  background: var(--surface);
}
.modal-overlay {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 5000;
  background: rgba(5,5,8,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  align-items: center; justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal-overlay .glass-card {
  max-width: 340px;
  text-align: center;
}
.modal-overlay .glass-card p.sub {
  margin-bottom: 24px;
}
.modal-overlay .modal-actions {
  display: flex;
  gap: 10px;
}
.modal-overlay .modal-actions .btn {
  flex: 1;
  justify-content: center;
}
.modal-overlay .modal-actions .btn-login-outline,
.modal-overlay .modal-actions .btn-login {
  flex: 1;
  width: auto;
  margin-top: 0;
  padding: 11px;
  text-align: center;
}
.modal-overlay .modal-actions .btn-login-outline {
  border-radius: 9px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06); color: #f2f1e9; font-weight: 600; font-size: 13.5px; cursor: pointer;
}
.modal-overlay .modal-actions .btn-login-outline:hover {
  background: rgba(255,255,255,.12);
}

.modal-overlay .glass-card.notice-danger {
  border-color: rgba(176,58,46,.45);
}
.modal-overlay .glass-card.notice-danger h2 {
  color: #e57368;
}
.modal-overlay .glass-card.notice-danger .btn-login {
  background: linear-gradient(120deg, #8a3226, #b03a2e);
  color: #fff;
}

@media print {
.sidebar, .topbar, .no-print {
  display: none !important;
}
.content {
  padding: 0;
}
}

@media (max-width: 900px) {
.sidebar {
  position: fixed;
  left: -260px;
  z-index: 50;
  transition: left .2s;
}
.sidebar.open {
  left: 0;
}
.sidebar-toggle-btn {
  display: inline-flex;
}
.form-row {
  grid-template-columns: 1fr;
}
}

.table-wrap {
  overflow-x:auto;
}
.th-sort {
  display:inline-flex;
  align-items:center;
  gap:2px;
  color:inherit;
  text-decoration:none;
  padding:2px 4px;
  border-radius:4px;
  vertical-align:middle;
}
.th-sort:hover {
  background:var(--surface-2);
}
.th-sort.active {
  color:var(--gold);
}
.action-cell {
  min-width:220px;
  white-space:normal;
}
.conditional-fields {
  display:none;
  margin-top:14px;
  padding:12px;
  border:1px dashed var(--border);
  border-radius:8px;
  background:var(--surface-2);
}
.detail-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
}
.detail-grid p {
  margin:7px 0;
}
.text-danger {
  color:#b03a2e!important;
}

.field-invalid,
.field-invalid:focus {
  border-color: #b03a2e !important;
  box-shadow: 0 0 0 2px rgba(176,58,46,.18) !important;
}
.document-list {
  display:grid;
  gap:7px;
}
.document-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid var(--border);
  border-radius:7px;
  padding:7px 9px;
}
@media(max-width:1000px){.stat-grid {
  grid-template-columns:repeat(2,1fr);
}}
@media(max-width:700px){.detail-grid {
  grid-template-columns:1fr;
}.stat-grid {
  grid-template-columns:1fr;
}}

.report-editor {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 18px;
  border-radius: 10px;
}
.report-editor h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.report-editor .editor-help {
  color: var(--text-muted);
  font-size: 11.5px;
  margin: 8px 0 0;
}
.report-editor .editor-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  background: var(--surface);
}
.report-editor .editor-label {
  display:block;
  font-size:12px;
  font-weight:700;
  margin-bottom:6px;
}
.report-toolbar {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.report-toolbar button {
  min-width:32px;
  height:30px;
  border:1px solid var(--border);
  border-radius:6px;
  background:var(--surface-2);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.report-toolbar button:hover {
  border-color: var(--gold-dark);
}
.report-toolbar button.active {
  background: var(--gold-dark);
  color:#fff;
}
.report-editor [contenteditable="true"] {
  min-height:44px;
  border:1px solid var(--border);
  border-radius:6px;
  padding:9px 10px;
  background:var(--surface);
  color:var(--text);
  outline:none;
  line-height:1.35;
}
.report-editor [contenteditable="true"]:focus {
  border-color: var(--gold-dark);
  box-shadow:0 0 0 2px rgba(138,109,31,.12);
}
.report-editor .editor-row {
  display:grid;
  grid-template-columns: 1fr 180px;
  gap:10px;
  align-items:end;
}
.report-editor input[type="range"] {
  width:100%;
}
.report-editor .range-value {
  font-size:12px;
  color:var(--text-muted);
  text-align:right;
}
@media (max-width: 700px) {.report-editor .editor-row {
  grid-template-columns:1fr;
} }

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 40px;
}
.password-field .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  box-shadow: none;
  outline: none;
  padding: 0;
  margin: 0;
  width: 20px;
  height: 20px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #b9b7c4;
}
.password-field .toggle-password:hover {
  color: #fff;
}
.password-field .toggle-password .icon-eye-off {
  display: none;
}
.password-field .toggle-password.is-visible .icon-eye-lash {
  display: none;
}
.password-field .toggle-password.is-visible .icon-eye-off {
  display: inline-flex;
}
.modal-overlay .glass-card.modal-wide {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  max-height: 88vh;
  overflow-y: auto;
}
.subkategori-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  align-items: start;
}
.mutation-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.mutation-breakdown .breakdown-item {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.mutation-breakdown .breakdown-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}
.mutation-breakdown .breakdown-value {
  display: block;
  margin-top: 2px;
  font-weight: 700;
}
@media (max-width: 700px) {
  .mutation-breakdown {
    grid-template-columns: 1fr;
  }
}
