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

:root {
  --primary: #0e7c5a;
  --primary-dark: #0a5c42;
  --primary-soft: #e3f3ec;
  --gold: #d9a441;
  --bg: #f2f6f3;
  --surface: #ffffff;
  --border: #e3eae5;
  --text: #182720;
  --muted: #68786f;
  --success: #159a52;
  --success-soft: #e2f6ea;
  --warning: #c97a09;
  --warning-soft: #fbf1dd;
  --danger: #d14343;
  --danger-soft: #fbe9e9;
  --info: #2f6fd0;
  --info-soft: #e7effb;
  --radius: 14px;
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(16, 38, 28, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(16, 38, 28, 0.22);
  --sidebar-w: 268px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: var(--primary);
  color: #fff;
}

h1,
h2,
.brand-text,
.stat-num,
.session-time,
.donut-center b {
  font-family: var(--font-display);
}

.sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  width: var(--sidebar-w);
  background: #0d4030;
  color: #e8f2ec;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  z-index: 100;
  transition: transform 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(217, 164, 65, 0.5);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.brand-text {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav::-webkit-scrollbar {
  width: 4px;
}

.nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(232, 242, 236, 0.45);
  font-weight: 700;
  margin: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  color: rgba(232, 242, 236, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
  position: relative;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
  flex-shrink: 0;
}

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

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

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  translate: 0 -50%;
  width: 4px;
  height: 22px;
  background: var(--gold);
  border-radius: 0 4px 4px 0;
}

.pill-count {
  margin-left: auto;
  font-style: normal;
  background: var(--gold);
  color: #3c2c07;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 99px;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 10px;
}

.session-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.session-chip b {
  color: #fff;
}

.session-chip small {
  color: rgba(232, 242, 236, 0.6);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39d98a;
  box-shadow: 0 0 0 0 rgba(57, 217, 138, 0.6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(57, 217, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(57, 217, 138, 0);
  }
}

.logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px;
  border-radius: 11px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(232, 242, 236, 0.85);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.logout:hover {
  background: rgba(209, 67, 67, 0.18);
  border-color: rgba(228, 116, 116, 0.4);
  color: #ffb4b4;
}

.logout svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px clamp(16px, 3vw, 32px);
  background: rgba(242, 246, 243, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
}

.hamburger svg {
  width: 20px;
  height: 20px;
}

.page-title h1 {
  font-size: 19px;
  font-weight: 800;
}

.page-title p {
  font-size: 12.5px;
  color: var(--muted);
}

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

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ebf1ed;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 14px;
  width: 230px;
  color: var(--muted);
  cursor: text;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.search:focus-within {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 90, 0.12);
}

.search svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  width: 100%;
  color: var(--text);
}

.search input::placeholder {
  color: #9aab9f;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--muted);
  position: relative;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.icon-btn .dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  outline: 2px solid #fff;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
}

.avatar,
.mini-avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), #1ba377);
  color: #fff;
  font-size: 12.5px;
}

.profile-text {
  line-height: 1.2;
}

.profile-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.profile-role {
  font-size: 11px;
  color: var(--muted);
}

.content {
  padding: clamp(16px, 3vw, 32px);
  display: grid;
  gap: 20px;
  flex: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}

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

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

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

.stat-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

.stat-icon.green {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.stat-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.stat-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.stat-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  display: block;
}

.stat-of {
  font-size: 15px;
  color: var(--muted);
  font-weight: 700;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.stat-bar {
  height: 6px;
  border-radius: 99px;
  background: #edf2ee;
  overflow: hidden;
}

.stat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.stat-bar.success i {
  background: var(--success);
}

.stat-bar.warning i {
  background: var(--warning);
}

.stat-bar.danger i {
  background: var(--danger);
}

.stat-foot {
  font-size: 11.5px;
  color: var(--muted);
}

.grid-charts {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
}

.grid-tables {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}

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

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.panel-head h2 {
  font-size: 15.5px;
  font-weight: 800;
}

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

.link-more {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.link-more:hover {
  text-decoration: underline;
}

.panel-body {
  padding: 16px 20px 20px;
  flex: 1;
}

.chart-bars {
  display: flex;
  gap: clamp(8px, 2vw, 20px);
  align-items: stretch;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bar-zone {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 200px;
  width: 100%;
}

.bar-val {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.bar {
  width: min(100%, 42px);
  height: calc(var(--v) * 1%);
  background: linear-gradient(180deg, #27ab7d, var(--primary));
  border-radius: 8px 8px 3px 3px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08);
  transform-origin: bottom;
  animation: grow 0.8s cubic-bezier(0.25, 1, 0.4, 1) both;
}

@keyframes grow {
  from {
    transform: scaleY(0);
  }
}

.bar-col:nth-child(2) .bar { animation-delay: 0.07s; }
.bar-col:nth-child(3) .bar { animation-delay: 0.14s; }
.bar-col:nth-child(4) .bar { animation-delay: 0.21s; }
.bar-col:nth-child(5) .bar { animation-delay: 0.28s; }
.bar-col:nth-child(6) .bar { animation-delay: 0.35s; }

.bar-name {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  justify-content: center;
}

.donut {
  width: 185px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    #0e7c5a 0 21%,
    #2aa876 0 41%,
    #e9b949 0 59%,
    #3b82f6 0 76%,
    #8b5cf6 0 90%,
    #e05252 0 100%
  );
  position: relative;
  filter: drop-shadow(var(--shadow-sm));
  animation: spin-in 0.9s ease both;
}

@keyframes spin-in {
  from {
    rotate: -80deg;
    opacity: 0;
  }
}

.donut::before {
  content: "";
  position: absolute;
  inset: 21%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 1;
}

.donut-center b {
  font-size: 24px;
  font-weight: 800;
}

.donut-center span {
  font-size: 11.5px;
  color: var(--muted);
}

.legend {
  list-style: none;
  display: grid;
  gap: 9px;
  min-width: 172px;
  flex: 1;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.legend i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend b {
  margin-left: auto;
  font-weight: 700;
}

.legend small {
  color: var(--muted);
  width: 36px;
  text-align: right;
}

.sessions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  background: #fbfdfc;
}

.session-time {
  display: block;
  font-weight: 800;
  font-size: 14px;
}

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

.session-meta {
  margin-left: auto;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.session-meta b {
  color: var(--text);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge .live-dot {
  width: 7px;
  height: 7px;
}

.badge.open {
  background: var(--success-soft);
  color: var(--success);
}

.badge.closed {
  background: #eef1ef;
  color: var(--muted);
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.info {
  background: var(--info-soft);
  color: var(--info);
}

.note-line {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}

.note-line svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke-width: 1.9;
}

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

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

.table-narrow {
  min-width: 430px;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  white-space: nowrap;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

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

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: #f6faf7;
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.td-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.footer {
  padding: 18px clamp(16px, 3vw, 32px) 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 19, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 95;
}

#sidebar-toggle:checked ~ .sidebar {
  transform: none;
}

#sidebar-toggle:checked ~ .overlay {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1180px) {
  .grid-charts,
  .grid-tables {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-105%);
    box-shadow: var(--shadow-md);
  }

  .main {
    margin-left: 0;
  }

  .hamburger {
    display: grid;
  }

  .search {
    display: none;
  }
}

@media (max-width: 640px) {
  .profile-text {
    display: none;
  }

  .page-title h1 {
    font-size: 17px;
  }

  .bar-zone {
    height: 150px;
  }

  .bar-name {
    font-size: 10.5px;
  }

  .donut {
    width: 160px;
  }

  .session-meta {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(209, 67, 67, 0.25);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 14.5px;
  border-radius: 13px;
}

.btn-block {
  width: 100%;
}

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

.btn-pulse {
  box-shadow: 0 0 0 0 rgba(14, 124, 90, 0.35);
  animation: btn-pulse 2.2s infinite;
}

@keyframes btn-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 124, 90, 0.35);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(14, 124, 90, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 124, 90, 0);
  }
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row.between {
  justify-content: space-between;
}

.stack {
  display: grid;
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  align-items: start;
}

.grid-even {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.filter-bar .search {
  width: 230px;
  flex: 1;
  min-width: 180px;
}

.filter-bar select,
.filter-bar .input {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 12px;
  outline: 0;
  cursor: pointer;
}

.filter-bar select:focus,
.filter-bar .input:focus {
  border-color: var(--primary);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
}

.field .req {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: #fbfdfc;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  width: 100%;
  outline: 0;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 90, 0.12);
  background: #fff;
}

.field input[readonly],
.field select[disabled] {
  background: #eef3ef;
  color: var(--muted);
  cursor: not-allowed;
}

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

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

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

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

.field-stack {
  display: grid;
  gap: 12px;
}

.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pills label {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pills input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pills label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tabs {
  display: inline-flex;
  gap: 4px;
  background: #e7ede9;
  border-radius: 12px;
  padding: 4px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}

.tabs label {
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.tabs label b {
  color: var(--primary);
}

#tab-master:checked ~ .tabs label[for="tab-master"],
#tab-riwayat:checked ~ .tabs label[for="tab-riwayat"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

#tab-master:not(:checked) ~ #panel-master,
#tab-riwayat:not(:checked) ~ #panel-riwayat {
  display: none;
}

.banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.6;
}

.banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke-width: 1.9;
}

.banner b {
  font-weight: 800;
}

.banner .badge {
  margin: 0 4px;
}

.banner.info {
  background: var(--info-soft);
  border: 1px solid #d3e2f7;
  color: #2b5490;
}

.banner.success {
  background: var(--success-soft);
  border: 1px solid #c6ebd7;
  color: #116a3b;
}

.banner.warning {
  background: var(--warning-soft);
  border: 1px solid #f2e0ba;
  color: #8a5406;
}

.banner.danger {
  background: var(--danger-soft);
  border: 1px solid #f4d1d1;
  color: #8f2b2b;
}

.check-list {
  display: grid;
  gap: 11px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.check-item .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.check-item .tick svg {
  width: 11px;
  height: 11px;
  stroke-width: 3.2;
}

.check-item.ok .tick {
  background: var(--success-soft);
  color: var(--success);
}

.check-item.no .tick {
  background: var(--danger-soft);
  color: var(--danger);
}

.check-item.no {
  color: var(--muted);
}

.gps-card {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px dashed #c8d6cc;
  background: #fbfdfc;
  border-radius: 13px;
  padding: 14px 16px;
}

.gps-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.mono {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
}

.center {
  text-align: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #d3ded7;
  transition: background 0.2s;
  pointer-events: none;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: translate 0.2s;
}

.switch input:checked + i {
  background: var(--success);
}

.switch input:checked + i::after {
  translate: 16px 0;
}

.table-actions {
  display: flex;
  gap: 6px;
}

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

.pager a {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
}

.pager {
  display: flex;
  gap: 6px;
}

.pager a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.badge.gold {
  background: #f8efd8;
  color: #96690e;
}

.badge.purple {
  background: #f0e9fd;
  color: #6d3fd4;
}

.stat-icon.gold {
  background: #f8efd8;
  color: #96690e;
}

.stat-icon.purple {
  background: #f0e9fd;
  color: #6d3fd4;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.chip b {
  color: var(--text);
  font-weight: 800;
}

.target-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.target-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
}

.target-list .lvl {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12.5px;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.target-list small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}

.target-list b {
  margin-left: auto;
  font-weight: 800;
  white-space: nowrap;
}

.pred-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.pred-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.pred-list .range {
  width: 64px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--primary-dark);
  flex-shrink: 0;
}

.pred-list .ar {
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}

.report-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.report-head .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
}

.report-head h3 {
  font-size: 14.5px;
  font-weight: 800;
  font-family: var(--font-display);
}

.report-head p {
  font-size: 12px;
  color: var(--muted);
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

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

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #092e22;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 22px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-top: 4px solid #d97706;
  border-left: 4px solid #d97706;
  position: relative;
  z-index: 10;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.brand-logo-img {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-multiply: true;
  filter: brightness(1.05) contrast(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.bismillah-text {
  font-family: 'Amiri', serif;
  font-size: 17px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: -2px;
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.login-sub-pill {
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #065f46;
}

.quick-demo-section {
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.quick-demo-title {
  font-size: 11px;
  font-weight: 700;
  color: #065f46;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.quick-demo-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-btn {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-btn.gold {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.3);
}

.demo-btn.emerald {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.demo-btn.sky {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.demo-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

.login-foot {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

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

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

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }
}
