:root {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-soft: #eef4f0;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #dce5df;
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-700: #0b6e4f;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --gold-500: #d97706;
  --gold-100: #fef3c7;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --blue-700: #1d4ed8;
  --blue-100: #dbeafe;
  --teal-700: #0f766e;
  --teal-100: #ccfbf1;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(6, 78, 59, 0.06);
  --shadow-md: 0 12px 30px rgba(6, 78, 59, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1180px, 100% - 2rem);
  margin-inline: auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding-block: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.24);
}

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

.brand-text strong {
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text small {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-btn:hover {
  background: var(--surface-soft);
  color: var(--emerald-900);
}

.nav-btn.is-active {
  background: var(--emerald-900);
  color: #fff;
}

.nav-admin-btn {
  border-color: var(--border);
  color: var(--emerald-900);
}

.badge-live {
  background: var(--emerald-600);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  display: flex;
  align-items: center;
  background: var(--emerald-950);
  color: #fff;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.01);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(2, 44, 34, 0.94) 0%,
      rgba(6, 78, 59, 0.84) 44%,
      rgba(6, 78, 59, 0.42) 78%,
      rgba(2, 44, 34, 0.52) 100%
    ),
    linear-gradient(
      180deg,
      rgba(2, 44, 34, 0.25) 0%,
      rgba(2, 44, 34, 0) 45%,
      rgba(2, 44, 34, 0.85) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 3.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.9fr);
  gap: 2rem;
  align-items: end;
}

.hero-pill {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #d1fae5;
  margin-bottom: 0.9rem;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0 0 1.4rem;
  max-width: 62ch;
  color: rgba(236, 253, 245, 0.9);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-label {
  font-size: 0.75rem;
  color: #ecfdf5;
  font-weight: 600;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}

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

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

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--emerald-900);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-900);
}

.btn-danger-outline {
  background: #fff;
  border-color: #fecaca;
  color: var(--red-600);
}

.btn-danger-outline:hover {
  background: var(--red-100);
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--emerald-700);
  cursor: pointer;
}

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

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 0.58rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  outline: none;
  border-color: var(--emerald-700);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
}

/* Sections & Cards */
.block-spacer {
  padding-block: 2rem;
}

.section-head,
.explorer-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}

.eyebrow {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-700);
  margin-bottom: 0.2rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.section-note {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Highlights */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.agenda-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agenda-card:hover {
  transform: translateY(-2px);
  border-color: var(--emerald-700);
  box-shadow: var(--shadow-md);
}

.agenda-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.agenda-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.agenda-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* Bidang & Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
}

.badge-KPP { background: var(--emerald-100); color: var(--emerald-900); }
.badge-PP { background: var(--teal-100); color: var(--teal-700); }
.badge-P3A { background: var(--gold-100); color: #92400e; }
.badge-PTKP { background: var(--blue-100); color: var(--blue-700); }

.status-Terjadwal { background: #e0f2fe; color: #075985; }
.status-Berlangsung { background: #dcfce7; color: #166534; }
.status-Selesai { background: #f1f5f9; color: #475569; }
.status-Ditunda { background: #fef3c7; color: #92400e; }

.badge-qr-open {
  background: #059669;
  color: #fff;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-KPP { background: #059669; }
.dot-PP { background: #0f766e; }
.dot-P3A { background: #d97706; }
.dot-PTKP { background: #1d4ed8; }

/* Mode Switch & Filters */
.mode-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem;
  gap: 0.2rem;
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.mode-btn.is-active {
  background: var(--emerald-900);
  color: #fff;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
}

.bidang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.pill.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #fff;
}

.filter-inputs {
  display: flex;
  gap: 0.6rem;
  flex: 1;
  justify-content: flex-end;
  min-width: 240px;
}

.filter-inputs .input {
  max-width: 220px;
}

/* Calendar Layout */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(290px, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.calendar-card,
.calendar-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cal-title-wrap {
  text-align: center;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.45rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.cal-cell {
  min-height: 92px;
  border: 1px solid #edf2ee;
  border-radius: 10px;
  padding: 0.38rem;
  background: #fcfdfc;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.cal-cell:hover {
  border-color: var(--emerald-700);
  background: #f5fbf7;
}

.cal-cell.is-outside {
  opacity: 0.42;
  background: #f8faf9;
}

.cal-cell.is-today {
  border-color: var(--emerald-700);
  background: #ecfdf5;
}

.cal-cell.is-selected {
  outline: 2px solid var(--emerald-900);
  background: #ecfdf5;
}

.cal-day-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.cal-event-chip {
  font-size: 0.69rem;
  font-weight: 600;
  padding: 0.14rem 0.34rem;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-more {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.agenda-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 540px;
  overflow-y: auto;
}

.compact-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  background: #fcfdfc;
  transition: border-color 0.14s ease;
}

.compact-item:hover {
  border-color: var(--emerald-700);
}

.compact-item-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.compact-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Per Bidang Mode */
.bidang-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.bidang-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-align: left;
  font: inherit;
}

.bidang-card:hover {
  border-color: var(--emerald-700);
  transform: translateY(-2px);
}

.bidang-card.is-selected {
  border: 2px solid var(--emerald-900);
  background: #f2fbf6;
}

.bidang-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.bidang-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.94rem;
}

.bidang-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bidang-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Absensi */
.absensi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.scanner-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scanner-video-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #022c22;
  aspect-ratio: 4 / 3;
}

.scanner-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-frame {
  position: absolute;
  inset: 16%;
  border: 2.5px solid rgba(52, 211, 153, 0.9);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(2, 44, 34, 0.42);
  pointer-events: none;
}

.scanner-controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.manual-token-box {
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
  font-size: 0.85rem;
}

.manual-token-box summary {
  cursor: pointer;
  color: var(--emerald-700);
  font-weight: 600;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.session-summary {
  margin-top: 0.85rem;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  border-radius: 12px;
  padding: 0.95rem 1rem;
}

.gps-status-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #f9fbfa;
  margin-bottom: 1rem;
}

.gps-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.gps-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
}

/* Forms & Admin */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-row.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.helper-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
}

.chip-neutral { background: var(--surface-soft); color: var(--text-muted); }
.chip-ok { background: #dcfce7; color: #166534; }
.chip-warn { background: #fef3c7; color: #92400e; }
.chip-err { background: #fee2e2; color: #991b1b; }

.alert {
  border-radius: 10px;
  padding: 0.78rem 0.95rem;
  font-size: 0.86rem;
  margin-top: 0.75rem;
}

.alert-error {
  background: var(--red-100);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #bbf7d0;
}

/* Admin Panel */
.admin-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.admin-topbar-actions {
  display: flex;
  gap: 0.55rem;
}

.admin-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.admin-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #fff;
}

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 540px;
  overflow-y: auto;
}

.admin-list-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  background: #fcfdfc;
}

.admin-item-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.gps-picker-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  background: #f9fbfa;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.gps-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.qr-preview-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  border-radius: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.qr-image-frame {
  background: #fff;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.qr-image-frame img {
  display: block;
  width: 175px;
  height: 175px;
}

.qr-meta {
  flex: 1;
  min-width: 180px;
}

.qr-meta h4 {
  margin: 0 0 0.25rem;
}

.qr-meta p {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
}

.qr-meta-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.records-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.inline-select {
  min-width: 280px;
  flex: 1;
}

.records-actions {
  display: flex;
  gap: 0.5rem;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th,
.data-table td {
  padding: 0.68rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: #f8faf9;
}

.hero-thumb-preview {
  position: relative;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
}

.hero-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(2, 44, 34, 0.85), rgba(6, 78, 59, 0.2));
}

.file-label {
  cursor: pointer;
}

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

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

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 44, 34, 0.55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.modal-card.modal-sm {
  width: min(420px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modal-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.icon-close {
  border: none;
  background: var(--surface-soft);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.modal-meta {
  display: grid;
  gap: 0.35rem;
  background: #f8faf9;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  margin: 0.85rem 0;
  font-size: 0.88rem;
}

.modal-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  white-space: pre-line;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  background: var(--emerald-950);
  color: #fff;
  padding: 0.75rem 1.05rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-block: 1.15rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-content,
  .calendar-layout,
  .absensi-grid,
  .admin-two-col {
    grid-template-columns: 1fr;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }

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

  .bidang-detail-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .form-row,
  .form-row.three-col,
  .bidang-settings-grid {
    grid-template-columns: 1fr;
  }

  .filter-inputs {
    width: 100%;
    justify-content: stretch;
  }

  .filter-inputs .input {
    max-width: none;
  }

  .cal-cell {
    min-height: 68px;
    padding: 0.25rem;
  }

  .bidang-overview-grid {
    grid-template-columns: 1fr;
  }
}
