/* ---------------------------------- base ---------------------------------- */

:root {
  --green-950: #07281d;
  --green-900: #0b3a2b;
  --green-800: #0f4a36;
  --green-700: #12684a;
  --green-600: #14805a;
  --green-500: #1c9a6c;
  --green-100: #d9f3e6;
  --green-50: #eefaf4;
  --bg: #f3f7f4;
  --card: #ffffff;
  --text: #0f2a21;
  --muted: #5f746a;
  --faint: #8ba096;
  --border: #e1ebe5;
  --border-strong: #cdded3;
  --danger: #c0392b;
  --danger-soft: #b3261e;
  --danger-bg: #fdecea;
  --warn: #a66a00;
  --warn-bg: #fff5e0;
  --info: #1c5fb8;
  --info-bg: #e9f1fd;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(11, 58, 43, 0.06);
  --shadow-md: 0 14px 34px rgba(11, 58, 43, 0.13);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.hidden,
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(28, 154, 108, 0.55);
  outline-offset: 2px;
}

::selection {
  background: rgba(28, 154, 108, 0.22);
}

/* --------------------------------- spinner -------------------------------- */

.spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(28, 154, 108, 0.2);
  border-top-color: var(--green-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 15px;
  height: 15px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(900px 500px at 20% 0%, #125a41 0%, var(--green-950) 70%);
  color: #d9f3e6;
}

.boot-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #34d399, #0f6b4b);
  color: #06281d;
  box-shadow: 0 10px 30px rgba(52, 211, 153, 0.28);
}

.boot-mark svg {
  width: 28px;
  height: 28px;
  color: #06281d;
}

.boot p {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(217, 243, 230, 0.75);
}

/* ---------------------------------- login --------------------------------- */

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
  color: #eaf7ef;
  background:
    radial-gradient(1000px 620px at 85% -10%, rgba(52, 211, 153, 0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(16, 185, 129, 0.16), transparent 55%),
    linear-gradient(160deg, #0e4433 0%, #0a2f23 55%, #07251c 100%);
}

.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(148, 233, 196, 0.14);
  pointer-events: none;
}

.login-brand::before {
  width: 520px;
  height: 520px;
  right: -180px;
  bottom: -200px;
  box-shadow: 0 0 0 60px rgba(148, 233, 196, 0.04), 0 0 0 140px rgba(148, 233, 196, 0.025);
}

.login-brand::after {
  width: 240px;
  height: 240px;
  right: 60px;
  bottom: 90px;
  background: radial-gradient(circle at 30% 30%, rgba(52, 211, 153, 0.16), transparent 70%);
  border: none;
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #34d399, #0f6b4b);
  color: #06281d;
  box-shadow: 0 6px 18px rgba(52, 211, 153, 0.25);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-mark-lg {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.brand-mark-lg svg {
  width: 27px;
  height: 27px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-text span {
  font-size: 12px;
  color: rgba(207, 238, 222, 0.62);
  margin-top: 2px;
}

.login-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  max-width: 520px;
  padding: 48px 0;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(110, 231, 183, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
}

.login-copy h1 {
  margin-top: 20px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 750;
  color: #f4fcf7;
}

.login-copy > p {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(207, 238, 222, 0.72);
  max-width: 460px;
}

.feature-list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: rgba(226, 246, 235, 0.88);
}

.feature-check {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(110, 231, 183, 0.25);
  color: #6ee7b7;
}

.feature-check svg {
  width: 12px;
  height: 12px;
}

.login-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(207, 238, 222, 0.42);
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #f7faf8;
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 16px;
  color: var(--green-900);
}

.login-card {
  width: 100%;
  max-width: 404px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 34px 30px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card-head {
  margin-bottom: 6px;
}

.login-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid #d3ecdf;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.login-card-head h2 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.login-card-head p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
}

.pw-toggle:hover {
  background: #f0f6f2;
  color: var(--text);
}

.pw-toggle svg {
  width: 17px;
  height: 17px;
}

.login-error {
  font-size: 13px;
  font-weight: 500;
  color: var(--danger-soft);
  background: var(--danger-bg);
  border: 1px solid #f6d5d1;
  padding: 10px 13px;
  border-radius: 10px;
}

.login-hint {
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.7;
}

.login-hint code {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid #d7ede1;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

/* -------------------------------- app shell ------------------------------- */

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, #0d3a2c 0%, #08291f 100%);
  color: #dceee4;
  overflow-y: auto;
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 22px;
}

.sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.sidebar-brand .brand-mark svg {
  width: 21px;
  height: 21px;
}

.sidebar-brand .brand-text strong {
  font-size: 14.5px;
}

.sidebar-brand .brand-text span {
  font-size: 11px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(207, 238, 222, 0.38);
  margin: 18px 12px 7px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(226, 244, 235, 0.76);
  font-size: 13.8px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.04));
  color: #eafff4;
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.16);
}

.nav-item.active svg {
  color: #6ee7b7;
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.user-chip-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: #f0fbf5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-meta span {
  font-size: 11px;
  color: rgba(207, 238, 222, 0.5);
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #cfe6da;
  font-size: 13px;
  font-weight: 550;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-logout svg {
  width: 16px;
  height: 16px;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-heading h1 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.topbar-heading p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.topbar-user-meta strong {
  font-size: 13px;
  font-weight: 650;
}

.topbar-user-meta span {
  font-size: 11.5px;
  color: var(--faint);
}

.menu-btn {
  display: none;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.avatar-light {
  background: rgba(255, 255, 255, 0.14);
  color: #d9f3e6;
}

.avatar.tone-0 { background: #e3f4ea; color: #12734f; }
.avatar.tone-1 { background: #e5eefc; color: #235da8; }
.avatar.tone-2 { background: #fdf1dc; color: #9a6411; }
.avatar.tone-3 { background: #f2ebfd; color: #6a45b8; }
.avatar.tone-4 { background: #fde9ef; color: #a83a5c; }

.avatar-lg {
  width: 54px;
  height: 54px;
  font-size: 17px;
}

.avatar-photo {
  padding: 0;
  overflow: hidden;
  background: #eef2f0;
}

.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-xl {
  width: 68px;
  height: 68px;
  font-size: 22px;
}

.topbar-user,
.user-chip {
  cursor: pointer;
}

.topbar-user:focus-visible,
.user-chip:focus-visible {
  outline: 2px solid var(--green-500, #1a9c6b);
  outline-offset: 3px;
  border-radius: 12px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-head h3 {
  margin: 0;
}

.profile-head p {
  margin: 2px 0 0;
  color: var(--muted, #6b7c74);
  font-size: 13px;
}

.profile-unit {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-50, #f2faf6);
  border: 1px solid var(--green-100, #d5ecdf);
  margin-bottom: 16px;
}

.profile-unit span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted, #6b7c74);
}

.profile-unit span svg {
  width: 15px;
  height: 15px;
}

.profile-unit strong {
  font-size: 14.5px;
}

.profile-unit small {
  color: var(--muted, #6b7c74);
  font-size: 12px;
}

.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

/* -------------------------------- dashboard ------------------------------- */

.dash-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dash-greeting h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.dash-greeting p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.date-chip svg {
  width: 15px;
  height: 15px;
  color: var(--green-600);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.tone-green { background: var(--green-50); color: var(--green-600); }
.tone-amber { background: var(--warn-bg); color: var(--warn); }
.tone-blue  { background: var(--info-bg); color: var(--info); }
.tone-purple { background: #f1ecfd; color: #6b46c1; }

.stat-label {
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}

.stat-value {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.stat-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-head h3 {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.panel-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.list-item:hover {
  background: #f7faf8;
}

.list-ico {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.list-ico svg {
  width: 16px;
  height: 16px;
}

.list-ico.warn { background: var(--warn-bg); color: var(--warn); }
.list-ico.danger { background: var(--danger-bg); color: var(--danger-soft); }
.list-ico.ok { background: var(--green-50); color: var(--green-600); }

.list-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.list-main strong {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-sub {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  font-size: 13px;
  color: var(--muted);
}

.empty-mini svg {
  width: 17px;
  height: 17px;
  color: var(--green-600);
}

.bar-chart {
  padding: 8px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bar-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
}

.bar-label {
  font-size: 12.5px;
  font-weight: 550;
  color: #335247;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #eef3f0;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #0f8a5f);
  transition: width 0.45s ease;
}

.bar-value {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: var(--muted);
}

/* --------------------------------- module --------------------------------- */

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.search-box {
  position: relative;
  flex: 0 1 280px;
  min-width: 210px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: #f7faf8;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input::placeholder {
  color: #a3b4ab;
}

.search-box input:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(28, 154, 108, 0.12);
}

.filter-select {
  appearance: none;
  padding: 9px 32px 9px 12px;
  background-color: #f7faf8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374897e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  color: #335247;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(28, 154, 108, 0.12);
  background-color: #fff;
}

.toolbar-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: #f1f5f2;
  border-radius: 999px;
  padding: 6px 11px;
  white-space: nowrap;
}

.toolbar-spacer {
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  background: #f8fbf9;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid #eef4f0;
  vertical-align: middle;
  color: #274439;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #fafdfb;
}

.align-right {
  text-align: right !important;
}

.cell-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
}

.cell-main > div {
  min-width: 0;
}

.cell-main strong {
  display: block;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.cell-sub {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 450;
  margin-top: 1px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.money {
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.truncate {
  display: inline-block;
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.4;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success { background: #e5f7ee; color: #0c7a50; }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger-soft); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: #eef2f0; color: #5c7268; }
.badge-soft { background: var(--green-50); color: var(--green-700); }

.stock-cell {
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stock-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stock-top strong {
  font-size: 13.5px;
  font-weight: 650;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: #eef3f0;
  overflow: hidden;
  max-width: 160px;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #0f8a5f);
}

.progress span.low {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #6b8176;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  background: #eef4f0;
  color: var(--text);
}

.icon-btn.danger:hover {
  background: var(--danger-bg);
  color: var(--danger-soft);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

.page-info {
  font-size: 12.5px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.pager-btn svg {
  width: 15px;
  height: 15px;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--green-500);
  color: var(--green-600);
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pager-current {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  min-width: 44px;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--green-50);
  color: var(--green-600);
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty-state h3 {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
}

.empty-state p {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 380px;
}

.empty-state .btn {
  margin-top: 18px;
}

.view-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 0;
}

/* --------------------------------- buttons -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, filter 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #15855d, #0f6b4b);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 58, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  background: #fff;
  border-color: var(--border-strong);
  color: #315346;
}

.btn-ghost:hover {
  background: #f6faf8;
  border-color: var(--green-500);
  color: var(--green-700);
}

.btn-danger {
  background: #c0392b;
  color: #fff;
}

.btn-danger:hover {
  background: #a93226;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  color: var(--green-700);
  padding: 4px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.link-btn svg {
  width: 14px;
  height: 14px;
}

.link-btn:hover {
  background: var(--green-50);
}

/* --------------------------------- forms ---------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.field em {
  color: var(--danger);
  font-style: normal;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(28, 154, 108, 0.13);
}

.field textarea {
  resize: vertical;
  min-height: 64px;
}

.field-hint {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374897e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
  cursor: pointer;
}

.field-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--faint);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.span-2 {
  grid-column: span 2;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-error {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--danger-soft);
  background: var(--danger-bg);
  border: 1px solid #f6d5d1;
  padding: 10px 13px;
  border-radius: 10px;
}

/* --------------------------------- modal ---------------------------------- */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 26, 18, 0.52);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.15s ease;
}

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(7, 26, 18, 0.38);
  animation: popIn 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.modal-sm {
  max-width: 440px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 6px;
}

.modal-head h2 {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.modal-head p strong {
  color: var(--text);
}

.modal-close {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--faint);
}

.modal-close:hover {
  background: #f1f5f2;
  color: var(--text);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 16px 24px 20px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid var(--border);
  background: #fbfdfc;
  border-radius: 0 0 20px 20px;
}

.modal form {
  margin: 0;
}

.confirm-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.confirm-body p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  padding-top: 2px;
}

.danger-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger-soft);
}

.danger-icon svg {
  width: 20px;
  height: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --------------------------------- toasts --------------------------------- */

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0f2a21;
  color: #edf7f2;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  animation: toastIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.toast svg {
  width: 18px;
  height: 18px;
  color: #6ee7b7;
  flex: none;
}

.toast-error {
  background: #451510;
}

.toast-error svg {
  color: #fca5a5;
}

.toast.leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------- settings -------------------------------- */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card.span-2 {
  grid-column: 1 / -1;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.card-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-head p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.card-body {
  padding: 20px;
}

.card-body.flush {
  padding: 0;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-row strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
}

.profile-row .cell-sub {
  font-size: 12.5px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.section-title {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdfc;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.backup-item:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.backup-ico {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-700);
}

.backup-ico svg {
  width: 17px;
  height: 17px;
}

.backup-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.backup-text strong {
  font-size: 13.5px;
  font-weight: 650;
}

.backup-text span {
  font-size: 12px;
  color: var(--faint);
}

.backup-arrow {
  color: var(--faint);
}

.backup-arrow svg {
  width: 16px;
  height: 16px;
}

/* -------------------------------- responsive ------------------------------ */

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 272px;
    transform: translateX(-105%);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 60px rgba(7, 26, 18, 0.4);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(7, 26, 18, 0.45);
    backdrop-filter: blur(2px);
  }

  .menu-btn {
    display: inline-grid;
  }

  .topbar {
    padding: 12px 20px;
  }

  .content {
    padding: 22px 20px 48px;
  }

  .login-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-brand {
    display: none;
  }

  .login-mobile-brand {
    display: flex;
  }

  .login-panel {
    background: radial-gradient(700px 420px at 50% -10%, #e6f6ee, #f7faf8 60%);
    padding: 32px 20px;
  }
}

@media (max-width: 860px) {
  .panel-grid,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card.span-2 {
    grid-column: auto;
  }

  .topbar-user-meta {
    display: none;
  }

  .topbar-user .avatar {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 20px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar-heading h1 {
    font-size: 17px;
  }

  .topbar-heading p {
    font-size: 11.5px;
  }

  .content {
    padding: 18px 14px 40px;
  }

  .toolbar {
    padding: 14px;
    gap: 8px;
  }

  .search-box {
    flex-basis: 100%;
  }

  .toolbar-count {
    display: none;
  }

  .filter-select {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .toolbar-spacer {
    display: none;
  }

  #export-btn,
  #add-btn {
    flex: 1 1 calc(50% - 4px);
  }

  .col-created {
    display: none;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-2 {
    grid-column: auto;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal {
    max-height: 94vh;
    border-radius: 18px;
  }

  .modal-foot {
    border-radius: 0 0 18px 18px;
  }

  .login-card {
    padding: 28px 22px 24px;
    border-radius: 18px;
  }

  .login-mobile-brand {
    margin-bottom: 18px;
  }

  .toast-root {
    left: 14px;
    right: 14px;
    bottom: 14px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .modal-foot .btn {
    flex: 1;
  }
}

@media (max-width: 420px) {
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bar-row {
    grid-template-columns: 94px minmax(0, 1fr) 38px;
  }
}

/* ---------------------- dashboard & impor (modul baru) ---------------------- */

.stat-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-chip {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-50);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.tone-rose { background: #fdeef2; color: #be3455; }

.live-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.live-time {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--green-700);
  line-height: 1.1;
}

.live-date {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: capitalize;
}

.sppg-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f2faf6 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.sppg-banner.empty {
  background: #fbfdfc;
}

.dash-unit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: -6px 0 18px;
}

.dash-unit-bar .field {
  width: 100%;
  max-width: 360px;
}

.dash-unit-bar .badge {
  margin-bottom: 4px;
}

.dash-unit-note {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

.dash-unit-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.sppg-mark {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-50);
  color: var(--green-600);
  display: grid;
  place-items: center;
}

.sppg-mark svg {
  width: 26px;
  height: 26px;
}

.sppg-main {
  flex: 1;
  min-width: 0;
}

.sppg-main .eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
}

.sppg-main h3 {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.015em;
  margin-top: 2px;
}

.sppg-main p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.sppg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.recap-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.recap-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.recap-chip svg {
  width: 15px;
  height: 15px;
  color: var(--green-600);
}

.recap-chip strong {
  color: var(--text);
}

.recap-chip:hover {
  border-color: var(--green-500);
  color: var(--green-700);
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attendance-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafcfb;
}

.attendance-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}

.attendance-value {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tone-success { background: var(--green-50); border-color: #d7ede1; color: var(--green-700); }
.tone-success .attendance-label { color: #3c735c; }
.tone-soft { background: #eef4fb; border-color: #dbe7f6; color: #3d6db3; }
.tone-soft .attendance-label { color: #58779f; }
.tone-warn { background: var(--warn-bg); border-color: #f4e3c4; color: var(--warn); }
.tone-warn .attendance-label { color: #8a6a27; }
.tone-neutral { background: #f4f6f5; border-color: #e3e8e5; color: #5d6b63; }
.tone-neutral .attendance-label { color: #6d7a72; }
.tone-danger { background: var(--danger-bg); border-color: #f6d5d1; color: var(--danger-soft); }
.tone-danger .attendance-label { color: #9b4a41; }
.tone-outline { background: #fff; border-style: dashed; color: var(--muted); }
.tone-outline .attendance-label { color: var(--muted); }

.attendance-rate {
  margin-top: 14px;
}

.attendance-rate-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 6px;
}

.attendance-rate-head strong {
  color: var(--green-700);
}

.info-item {
  align-items: flex-start;
}

.info-item .list-ico.info {
  background: #eaf1fb;
  color: #3d6db3;
}

.info-excerpt {
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
  max-width: 46ch;
}

.import-note {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-50);
  border: 1px solid #d7ede1;
  margin-bottom: 14px;
}

.import-note-icon {
  color: var(--green-600);
}

.import-note-icon svg {
  width: 20px;
  height: 20px;
}

.import-note strong {
  display: block;
  font-size: 13px;
}

.import-note p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.import-summary div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7faf8;
  text-align: center;
}

.import-summary strong {
  display: block;
  font-size: 18px;
}

.import-summary span {
  font-size: 11px;
  color: var(--muted);
}

.import-errors {
  margin-top: 12px;
  font-size: 12px;
  color: var(--danger-soft);
}

.import-errors ul {
  margin: 6px 0 0;
  padding-left: 18px;
  max-height: 160px;
  overflow: auto;
}

@media (max-width: 1180px) {
  .stat-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .stat-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-clock {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  #import-btn,
  #export-pdf-btn,
  #export-btn,
  #add-btn {
    flex: 1 1 calc(50% - 4px);
  }

  .live-time {
    font-size: 22px;
  }

  .sppg-banner {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .sppg-banner .btn {
    width: 100%;
    justify-content: center;
  }

  .attendance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-excerpt {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .stat-grid-5 {
    grid-template-columns: minmax(0, 1fr);
  }

  .attendance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ----------------------- fitur lanjutan & integrasi ------------------------ */

.page-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-bar h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.page-bar p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  max-width: 74ch;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-ghost.danger {
  color: var(--danger-soft);
  border-color: #efd2ce;
}

.btn-ghost.danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger-soft);
  color: var(--danger-soft);
}

.modal-lg {
  max-width: 900px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--green-600);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.checkbox-grid .checkbox-row {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafcfb;
  color: var(--text);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: #eef3f0;
  border-radius: 12px;
}

.segmented button {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}

.segmented button.active {
  background: #fff;
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}

.table-compact {
  min-width: 0;
}

.table-compact thead th {
  padding: 9px 12px;
  font-size: 9.5px;
}

.table-compact tbody td {
  padding: 9px 12px;
  font-size: 12px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7faf8;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--faint);
}

.feature-chip svg {
  width: 11px;
  height: 11px;
}

.feature-chip.on {
  background: var(--green-50);
  border-color: #d7ede1;
  color: var(--green-700);
}

.field-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f7f4;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: #48655a;
}

.list-ico.info {
  background: #eaf1fb;
  color: #3d6db3;
}

.list-ico {
  background: var(--green-50);
  color: var(--green-600);
}

button.list-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

/* login google */

.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #eef3f0;
  border-radius: 12px;
}

.login-tab {
  flex: 1;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.login-tab.active {
  background: #fff;
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}

.login-tab.tab-muted {
  opacity: 0.55;
}

.login-google-note {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-50);
  border: 1px solid #d7ede1;
}

.login-google-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--border);
  color: #3d6db3;
}

.login-google-icon svg {
  width: 18px;
  height: 18px;
}

.login-google-note strong {
  display: block;
  font-size: 13px;
}

.login-google-note p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* whatsapp fab */

.wa-fab {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: #1fa855;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(11, 58, 43, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.wa-fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.wa-fab svg {
  width: 19px;
  height: 19px;
}

/* rekapan */

.rekap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.rekap-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.rekap-card:hover {
  transform: translateY(-2px);
  border-color: var(--green-500);
  box-shadow: var(--shadow-md);
}

.rekap-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-600);
}

.rekap-icon svg {
  width: 18px;
  height: 18px;
}

.rekap-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.rekap-value {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.rekap-meta {
  font-size: 11.5px;
  color: var(--faint);
}

.rekap-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: inherit;
  transition: background 0.15s ease;
}

.rekap-section:hover {
  background: #f7faf8;
}

.rekap-section-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #335247;
}

.rekap-section-name svg {
  width: 16px;
  height: 16px;
  color: var(--green-600);
}

.rekap-section strong {
  font-size: 14px;
  font-weight: 750;
  color: var(--green-700);
}

.rekap-custom {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  color: inherit;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 8px;
}

.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafcfb;
  font-size: 12px;
  font-weight: 650;
  color: #335247;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.shortcut:hover {
  border-color: var(--green-500);
  background: var(--green-50);
  color: var(--green-700);
  transform: translateY(-1px);
}

.shortcut svg {
  width: 20px;
  height: 20px;
  color: var(--green-600);
}

/* media */

.media-toolbar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  padding: 14px 16px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.media-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.media-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.media-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  padding: 0;
  background: #0e2a20;
  overflow: hidden;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9fe0c4;
  background: linear-gradient(140deg, #123f30, #0e2a20);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.media-placeholder svg {
  width: 30px;
  height: 30px;
}

.media-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 26, 18, 0.28);
  color: #fff;
}

.media-overlay svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.media-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 15px 14px;
}

.media-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.media-title-row strong {
  font-size: 13.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.media-body p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 34px;
}

.media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
}

.media-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.media-views svg {
  width: 13px;
  height: 13px;
}

.media-folder-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.folder-chip svg {
  width: 14px;
  height: 14px;
}

.folder-chip em {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
}

.folder-chip:hover {
  border-color: var(--green-600);
  color: var(--green-700);
}

.folder-chip.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

.folder-chip.active em {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.media-stat {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
}

.media-folder-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-700);
}

.media-folder-tag svg {
  width: 12px;
  height: 12px;
}

.media-limit-hint {
  max-width: 340px;
  text-align: right;
}

@media (max-width: 760px) {
  .media-limit-hint {
    display: none;
  }

  .media-stat {
    margin-left: 0;
    width: 100%;
  }
}

.media-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.media-actions .icon-btn {
  margin-left: auto;
}

.media-preview-body {
  padding-top: 8px;
}

.preview-frame {
  display: block;
  width: 100%;
  height: 68vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f6faf8;
}

.preview-image {
  display: block;
  max-width: 100%;
  max-height: 66vh;
  margin: 0 auto;
  border-radius: 12px;
}

.preview-video {
  display: block;
  width: 100%;
  max-height: 66vh;
  border-radius: 12px;
  background: #000;
}

.preview-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 46px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: #fafcfb;
}

.preview-fallback svg {
  width: 34px;
  height: 34px;
  color: var(--green-600);
}

.preview-fallback h3 {
  font-size: 15px;
  font-weight: 700;
}

.preview-fallback p {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 46ch;
}

.preview-note,
.preview-desc {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* laporan, surat, spreadsheet */

.report-layout,
.builder-layout,
.chat-layout,
.help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel-body.padded {
  padding: 18px;
  gap: 14px;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-actions .btn {
  flex: 1 1 auto;
}

.report-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-total {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7faf8;
}

.report-total span {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}

.report-total strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.report-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.report-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  background: #fafcfb;
}

.report-section summary::-webkit-details-marker {
  display: none;
}

.report-section[open] summary {
  border-bottom: 1px solid var(--border);
}

.report-section .table-wrap {
  border-radius: 0;
}

.report-more {
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--faint);
}

.report-note {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  margin-top: 14px;
  border-radius: 12px;
  background: var(--green-50);
  border: 1px solid #d7ede1;
}

.report-note > svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--green-600);
}

.report-note strong {
  display: block;
  font-size: 12.5px;
}

.report-note p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.danger-note {
  background: var(--danger-bg);
  border-color: #f6d5d1;
}

.danger-note > svg {
  color: var(--danger-soft);
}

.danger-note strong {
  color: #8c2c24;
}

.kop-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdfc;
}

.kop-preview-logo {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-600);
  overflow: hidden;
}

.kop-preview-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.kop-preview-logo svg {
  width: 28px;
  height: 28px;
}

.kop-preview-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kop-preview-text strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.kop-preview-text span {
  font-size: 11.5px;
  color: var(--muted);
}

.kop-divider {
  height: 3px;
  margin: 12px 0 0;
  border-top: 2px solid var(--green-800);
  border-bottom: 1px solid var(--green-800);
}

.sheet-columns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}

.sheet-columns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.sheet-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdfc;
}

.sheet-column-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #335247;
  min-width: 0;
}

.sheet-column-check input {
  width: 15px;
  height: 15px;
  flex: none;
  accent-color: var(--green-600);
}

.sheet-column-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-column-label {
  width: 100%;
  padding: 7px 9px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
}

.sheet-column-label:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(28, 154, 108, 0.12);
}

.builder-actions {
  display: flex;
  gap: 8px;
}

.builder-actions .btn {
  flex: 1;
}

/* chat massal */

.chat-counter {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--faint);
  white-space: nowrap;
}

.chat-message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: -4px;
}

.chat-source {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.chat-source h4 {
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
}

.chat-master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.chat-master {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafcfb;
  font-size: 12px;
  font-weight: 650;
  color: #335247;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-master:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.chat-master > svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--faint);
}

.chat-master-icon {
  display: grid;
  place-items: center;
  color: var(--green-600);
}

.chat-master-icon svg {
  width: 16px;
  height: 16px;
}

.chat-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.chat-progress .progress {
  flex: 1;
  margin: 0;
}

.chat-progress span {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
}

.chat-contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.chat-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdfc;
}

.chat-contact.is-sent {
  background: var(--green-50);
  border-color: #d7ede1;
}

.chat-contact > input {
  width: 15px;
  height: 15px;
  flex: none;
  accent-color: var(--green-600);
}

.chat-contact-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.chat-contact-main strong {
  font-size: 12.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-contact-main span {
  font-size: 11.5px;
  color: var(--muted);
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--green-700);
  white-space: nowrap;
}

.chat-status svg {
  width: 12px;
  height: 12px;
}

.chat-list-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
}

.chat-list-actions .btn {
  flex: 1;
}

/* backup */

.backup-grid {
  margin-bottom: 18px;
}

.backup-grid .rekap-card {
  cursor: default;
  transition: none;
}

.backup-grid .rekap-card:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.backup-table-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  max-height: 220px;
  overflow: auto;
}

.backup-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdfc;
  font-size: 12.5px;
  color: var(--muted);
}

.backup-table-row strong {
  color: var(--text);
}

/* menu kustom */

.custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.custom-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.custom-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.custom-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-600);
}

.custom-icon svg {
  width: 19px;
  height: 19px;
}

.custom-card-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.custom-card-title strong {
  font-size: 14px;
  font-weight: 700;
}

.custom-card-title span {
  font-size: 11.5px;
  color: var(--muted);
}

.custom-fields,
.custom-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

.custom-card-actions .btn:first-child {
  margin-right: auto;
}

.custom-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.custom-summary > div {
  padding: 13px 15px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.custom-summary span {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
}

.custom-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.builder-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.builder-head h3 {
  font-size: 14px;
  font-weight: 700;
}

.builder-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

#custom-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.builder-field {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdfc;
}

.builder-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
}

.builder-side {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.builder-options {
  margin-top: 8px;
}

/* bantuan */

.help-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-links .list-item {
  cursor: pointer;
}

.help-links .list-item > svg {
  width: 16px;
  height: 16px;
  color: var(--faint);
}

/* fase 3: peran, peta, tanya jawab, folder, audit, akun */

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--green-500);
  color: var(--green-700);
  background: var(--green-50);
}

.chip.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #ffffff;
}

.chip strong {
  font-weight: 700;
}

.chip svg {
  width: 13px;
  height: 13px;
}

.chip-add {
  border-style: dashed;
}

/* peta & koordinat */

.map-filter,
.folder-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.folder-bar {
  margin-bottom: 0;
  padding: 12px 16px;
  background: #f8fbfa;
  border-bottom: 1px solid var(--border);
}

.map-panel .panel-body {
  padding: 16px 18px 20px;
}

.map-host {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
}

.tile-map {
  position: relative;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #dfe8e3;
}

.tile-map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: #e8f0eb;
}

.tile-map.layer-satellite .tile-map-canvas {
  background: #0b1f16;
}

.tile-map-canvas.dragging {
  cursor: grabbing;
}

.tile-map-pane {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.tile-map-tiles img {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  pointer-events: none;
}

.tile-map-markers {
  position: absolute;
  inset: 0;
}

.tile-marker {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -100%);
  cursor: pointer;
  font-family: inherit;
}

.tile-marker-pin {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--marker, #0f6b4b);
  border: 2px solid #fff;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(6, 30, 20, 0.4);
  transition: transform 0.15s ease;
}

.tile-marker:hover .tile-marker-pin {
  transform: rotate(-45deg) scale(1.18);
}

.tile-marker-label {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(6, 30, 20, 0.22);
}

.tile-marker.compact .tile-marker-label {
  display: none;
}

.tile-map-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.tile-map-layers,
.tile-map-zoom {
  display: flex;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(6, 30, 20, 0.2);
  pointer-events: auto;
}

.tile-map-layers button,
.tile-map-zoom button {
  border: 0;
  background: transparent;
  padding: 7px 11px;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.tile-map-layers button.active {
  background: var(--green-600);
  color: #fff;
}

.tile-map-zoom button {
  display: grid;
  place-items: center;
  min-width: 36px;
  border-left: 1px solid var(--border);
  font-size: 16px;
  line-height: 1;
}

.tile-map-zoom button:first-child {
  border-left: 0;
}

.tile-map-zoom button svg {
  width: 14px;
  height: 14px;
}

.tile-map-scale {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  height: 26px;
  font-size: 11px;
  font-weight: 650;
  color: #0f172a;
  pointer-events: none;
}

.tile-map-scale i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  border: 1px solid rgba(15, 23, 42, 0.72);
  border-top: 0;
  background: rgba(255, 255, 255, 0.6);
}

.tile-map-scale span {
  position: absolute;
  left: 0;
  bottom: 8px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
}

.tile-map-credit {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 10px;
  pointer-events: none;
}

.tile-map-hint {
  position: absolute;
  left: 50%;
  bottom: 40px;
  z-index: 3;
  transform: translateX(-50%);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.tile-map-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: min(300px, 80%);
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-bg {
  fill: #f6fbf8;
  stroke: var(--border);
}

.map-grid-line {
  stroke: rgba(15, 74, 54, 0.08);
  stroke-width: 1;
}

.map-mark {
  cursor: pointer;
  outline: none;
  user-select: none;
}

.map-mark:hover circle {
  filter: brightness(0.94);
}

.map-mark:focus-visible circle {
  stroke: var(--green-700);
}

.map-label {
  font-size: 11px;
  fill: var(--muted);
  font-weight: 600;
  pointer-events: none;
}

.map-credit {
  font-size: 10px;
  fill: var(--faint);
}

.map-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: #f8fbfa;
  color: var(--muted);
  text-align: center;
}

.map-empty svg {
  width: 28px;
  height: 28px;
  color: var(--green-600);
}

.map-empty span {
  font-size: 12.5px;
  color: var(--faint);
  max-width: 360px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 2px 4px;
  font-size: 12px;
  color: var(--muted);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.map-point-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 12px;
  max-height: 280px;
  overflow: auto;
}

.map-point-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.map-point-row:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.map-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.map-point-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-point-main strong {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-point-main span {
  font-size: 11px;
  color: var(--faint);
}

.map-point-row .cell-sub {
  white-space: nowrap;
}

/* dasbor wilayah */

.region-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #eafaf2;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.region-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.region-hero-copy {
  position: relative;
  z-index: 1;
}

.region-hero-copy h3 {
  font-size: 26px;
  margin: 6px 0 8px;
}

.region-hero-copy p {
  max-width: 640px;
  font-size: 13.5px;
  color: rgba(234, 250, 242, 0.78);
}

.region-hero .eyebrow {
  color: #9fe7c7;
}

.region-hero-badge {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 16px 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  text-align: center;
}

.region-hero-badge svg {
  width: 26px;
  height: 26px;
}

.stat-button {
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-500);
}

/* tanya jawab */

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.qa-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.qa-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.qa-head h3 {
  font-size: 16px;
  margin: 8px 0 6px;
}

.qa-head p {
  font-size: 13.5px;
  color: var(--muted);
  white-space: pre-line;
}

.qa-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qa-answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.qa-answer {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbfa;
}

.qa-answer strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.qa-answer p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-line;
}

.qa-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.qa-form textarea {
  flex: 1;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
  resize: vertical;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

/* folder berkas */

.folder-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 18px;
  max-height: 260px;
  overflow: auto;
}

.folder-manager-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

/* audit */

.hash-code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--green-50);
  color: var(--green-800);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
}

/* detail titik */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbfa;
}

.detail-grid span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.detail-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* bidang terkunci */

.field-locked input,
.field-locked select,
.field-locked textarea {
  background: #f1f5f2;
  color: var(--muted);
  cursor: not-allowed;
}

.lock-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 10px;
  font-weight: 700;
}

/* akun & peran */

.admin-active-row {
  margin: 16px 0 4px;
}

.admin-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
}

.role-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.role-feature:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.role-feature:has(input:checked) {
  border-color: var(--green-500);
  background: var(--green-50);
}

.role-feature input {
  width: 16px;
  height: 16px;
  accent-color: var(--green-600);
}

.role-feature.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.role-feature.is-disabled:hover {
  border-color: var(--border);
  background: #ffffff;
}

/* sakelar */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdfc;
}

.switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-text strong {
  font-size: 13px;
  font-weight: 650;
}

.switch-text span {
  font-size: 11.5px;
  color: var(--faint);
}

.switch {
  position: relative;
  display: inline-flex;
  flex: none;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d7e3dc;
  transition: background 0.18s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-track {
  background: var(--green-600);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.55;
  cursor: not-allowed;
}

/* backup otomatis */

.scheduled-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.scheduled-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbfa;
}

.scheduled-stat strong {
  font-size: 16px;
}

.scheduled-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.scheduled-list {
  margin-top: 16px;
  max-height: 340px;
  overflow: auto;
}

@media (max-width: 720px) {
  .scheduled-grid,
  .detail-grid,
  .role-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .region-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .region-hero-badge {
    flex-direction: row;
  }

  .qa-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* responsive lanjutan */

@media (max-width: 1100px) {
  .report-layout,
  .builder-layout,
  .chat-layout,
  .help-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .page-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1 1 auto;
  }

  .field-row,
  .builder-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .builder-side {
    justify-content: space-between;
    padding-bottom: 0;
  }

  .sheet-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .preview-frame {
    height: 60vh;
  }

  .wa-fab span {
    display: none;
  }

  .wa-fab {
    padding: 13px;
    bottom: 80px;
  }
}

@media (max-width: 520px) {
  .custom-grid,
  .media-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .segmented {
    flex-wrap: wrap;
  }

  .chat-list-actions .btn {
    font-size: 12px;
  }

  .report-actions .btn {
    flex: 1 1 100%;
  }
}

/* ------------------------------ absensi apel ------------------------------ */

.apel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0b3a2b 0%, #0f5c43 55%, #127a58 100%);
  color: #eafff6;
  box-shadow: 0 18px 40px rgba(11, 58, 43, 0.22);
}

.apel-hero .eyebrow {
  color: #9fe9c8;
}

.apel-hero h2 {
  margin: 6px 0 8px;
  font-size: 24px;
  color: #ffffff;
}

.apel-hero p {
  margin: 0 0 16px;
  max-width: 60ch;
  color: rgba(234, 255, 246, 0.82);
  line-height: 1.55;
}

.apel-sessions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.apel-session {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  min-width: 160px;
}

.apel-session strong {
  color: #ffffff;
}

.apel-session span {
  font-size: 12px;
  color: rgba(234, 255, 246, 0.75);
}

.apel-session em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: rgba(234, 255, 246, 0.62);
}

.apel-session.active {
  background: rgba(56, 211, 159, 0.2);
  border-color: rgba(120, 240, 195, 0.7);
  box-shadow: 0 0 0 1px rgba(120, 240, 195, 0.25);
}

.apel-session.active em {
  color: #9dffd2;
}

.apel-recap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  align-content: center;
}

.apel-recap-total,
.apel-recap-chip {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.apel-recap-total strong,
.apel-recap-chip strong {
  font-size: 20px;
  color: #ffffff;
}

.apel-recap-total span,
.apel-recap-chip span {
  font-size: 11px;
  color: rgba(234, 255, 246, 0.72);
}

.apel-recap-code {
  font-weight: 700;
  color: #9dffd2 !important;
}

.toolbar-field {
  display: grid;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.toolbar-field input,
.toolbar-field select {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
}

.apel-form-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.apel-nik-row {
  display: flex;
  gap: 8px;
}

.apel-nik-row input {
  flex: 1;
}

.apel-verify-state {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.apel-form-grid {
  margin-bottom: 16px;
}

.spin-inline {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(15, 107, 75, 0.25);
  border-top-color: var(--green-600, #0f6b4b);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: spin 0.8s linear infinite;
  vertical-align: -1px;
}

@media (max-width: 900px) {
  .apel-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .apel-form-head {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* -------------------------- persediaan & fitur baru ------------------------ */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 8px;
}

.notif-btn {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger, #d64545);
  box-shadow: 0 0 0 2px #ffffff;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-strip .stat-chip {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.stat-strip .stat-chip strong {
  font-size: 18px;
  color: var(--green-800, #0b3a2b);
}

.stat-strip .stat-chip.warn {
  background: #fff8e8;
  border-color: #f2d9a0;
}

.stat-strip .stat-chip.danger {
  background: #fdecec;
  border-color: #f1b9b9;
}

.padded {
  padding: 16px;
}

.section-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid .span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.input-inline {
  width: 110px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  font: inherit;
}

.form-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecec;
  color: #9b2c2c;
  font-size: 13px;
}

.modal .form-error.hidden {
  display: none;
}

.verify-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--green-50);
  color: var(--green-700);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.06em;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft, #f7faf8);
}

.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}

.session-dot.current {
  background: var(--green-600, #0f6b4b);
}

.session-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  min-width: 0;
}

.session-meta strong {
  font-size: 13px;
}

.session-meta span {
  color: var(--muted);
  font-size: 12px;
}

.totp-secret {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-soft, #f7faf8);
  font-size: 12px;
}

.totp-secret code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--green-800, #0b3a2b);
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.notif-item:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.notif-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  background: var(--green-50);
  color: var(--green-700);
}

.notif-level.warning {
  background: #fff4d6;
  color: #8a6100;
}

.notif-level.danger {
  background: #fdecec;
  color: #9b2c2c;
}

.notif-level svg {
  width: 16px;
  height: 16px;
}

.notif-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.notif-text span {
  color: var(--muted);
  font-size: 12.5px;
}

.search-box-lg {
  margin-bottom: 12px;
}

.search-box-lg input {
  font-size: 15px;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 50vh;
  overflow: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.search-result:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.search-result-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green-50);
  color: var(--green-700);
  flex: none;
}

.search-result-icon svg {
  width: 15px;
  height: 15px;
}

.search-result-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.search-result-text span {
  color: var(--muted);
  font-size: 12.5px;
}

.duplicate-group {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
}

.duplicate-group ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-grid .span-2 {
    grid-column: span 1;
  }
}

@media print {
  .sidebar,
  .topbar,
  .toolbar,
  .modal-backdrop,
  .toast-root,
  .wa-fab {
    display: none !important;
  }

  .main {
    margin: 0;
  }

  .content {
    padding: 0;
  }

  body {
    background: #ffffff;
  }

  .module-card,
  .card,
  .panel {
    box-shadow: none;
    border: 1px solid #d0d0d0;
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  .table th {
    background: #f2f2f2 !important;
  }
}

/* absensi agenda, swafoto, dan pengaturan sesi */
.apel-camera {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.apel-camera video,
.apel-camera img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 12px;
  background: #0b1410;
}
.apel-camera-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.apel-agenda-info:empty {
  display: none;
}
.apel-info-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(28, 154, 108, 0.28);
  background: rgba(28, 154, 108, 0.08);
}
.apel-info-box svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent, #1c9a6c);
}
.apel-info-box p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.settings-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
}
.settings-panel h4 {
  margin: 0;
  font-size: 14px;
}
.apel-agenda-list {
  display: grid;
  gap: 8px;
}
.rekap-absensi-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--green-100, #d5ecdf);
  background: var(--green-50, #f2faf6);
  color: var(--green-800, #145c40);
}
.rekap-absensi-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}
.rekap-absensi-note strong {
  display: block;
  font-size: 13.5px;
}
.rekap-absensi-note span {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}
.empty-inline {
  padding: 14px 4px;
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------ tautan berbagi ------------------------------ */
.share-modal-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  color: var(--green-900);
  font-size: 12.8px;
  margin-bottom: 16px;
}
.share-modal-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}
.share-create-form {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.share-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.share-create-form .field {
  margin: 0;
}
.share-latest {
  border: 1px solid var(--green-100);
  background: linear-gradient(150deg, #f2fbf6, #ffffff);
  border-radius: 15px;
  padding: 14px 15px;
  margin-bottom: 16px;
}
.share-latest strong {
  font-size: 13.5px;
  color: var(--green-800);
}
.share-latest p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 3px 0 10px;
}
.share-url-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.share-url-row input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 12.5px;
  color: var(--text);
}
.share-url-row .btn {
  flex: none;
}
.share-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.share-list-head h4 {
  font-size: 14px;
  letter-spacing: -0.01em;
}
.share-list-head span {
  font-size: 12px;
  color: var(--muted);
}
.share-list {
  display: grid;
  gap: 10px;
}
.share-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 13px;
  background: #fff;
}
.share-item.is-off {
  opacity: 0.62;
  background: #fafbfa;
}
.share-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.share-item-head strong {
  font-size: 13.5px;
}
.share-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  color: var(--green-800);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.share-badge.off {
  background: #f3f4f3;
  border-color: var(--border);
  color: var(--muted);
}
.share-badge.mode {
  background: var(--info-bg);
  border-color: #cfe0fb;
  color: var(--info);
}
.share-item-meta {
  display: block;
  font-size: 11.8px;
  color: var(--muted);
  margin: 4px 0 9px;
}
@media (max-width: 620px) {
  .share-form-grid {
    grid-template-columns: 1fr;
  }
}

/* lembar kerja per tab */
.module-tabs {
  margin-bottom: 14px;
}
.module-tabs .chip {
  background: var(--surface);
}
.module-tabs .chip.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 600;
}
.module-tabs .chip.active .chip-count {
  background: rgba(255, 255, 255, 0.22);
}
.ws-toolbar-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ws-toolbar-title .section-title {
  margin: 0;
  font-size: 16px;
}
