@font-face {
  font-family: 'Inter';
  src: url('../font/inter/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #1a56db;
  --primary-dark: #1341a8;
  --primary-light: #e8f0fe;
  --danger: #e53e3e;
  --warning: #d69e2e;
  --success: #38a169;
  --muted: #718096;
  --border: #e2e8f0;
  --bg-light: #f7f9fc;
  --text: #2d3748;
  --text-light: #718096;
  --sidebar-w: 260px;
  --topbar-h: 60px;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .07);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, .10);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background: var(--bg-light);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Semua input minimal 16px agar tidak ada auto-zoom di iPhone */
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: 16px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* ============================================================
   AUTH PAGE (login / daftar)
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(320px, 480px);
  align-items: center;
  justify-content: center;
  gap: 34px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .22), transparent 30%),
    linear-gradient(135deg, #0f766e 0%, #1a56db 52%, #172554 100%);
  padding: 42px 18px;
}

.auth-showcase {
  color: #fff;
  max-width: 560px;
}

.auth-showcase-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-showcase-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: rgba(255, 255, 255, .9);
  border-radius: 18px;
  padding: 9px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

.auth-showcase-brand span {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1;
}

.auth-kicker,
.section-kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-kicker {
  color: #bff7ee;
}

.auth-showcase h2 {
  margin: 12px 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  font-weight: 850;
}

.auth-showcase p {
  max-width: 500px;
  color: #dbeafe;
  font-size: 1rem;
  line-height: 1.7;
}

.auth-points {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.auth-points span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
  overflow: hidden;
}

.auth-header {
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
  padding: 30px 34px 22px;
  text-align: center;
  color: var(--text);
}

.auth-header img.auth-logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  margin-bottom: 12px;
}

.auth-header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.3px;
}

.auth-header p {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.auth-body {
  padding: 28px 32px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}

.auth-tab.active {
  color: var(--primary);
  border-color: var(--primary);
}

@media (min-width: 992px) {
  .auth-wrapper {
    align-items: start;
  }

  .auth-showcase {
    position: sticky;
    top: 42px;
    min-height: calc(100vh - 84px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-card {
    align-self: start;
  }
}

/* OTP Input */
.otp-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.otp-input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color .2s;
}

.otp-input:focus {
  border-color: var(--primary);
}

/* ============================================================
   LAYOUT DASHBOARD
   ============================================================ */
/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100dvh;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transition: transform .25s ease;
}

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

.sidebar-brand img {
  height: 36px;
}

.sidebar-brand strong {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  display: block;
}

.sidebar-brand span {
  font-size: 0.7rem;
  color: var(--muted);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-radius: 0;
  transition: background .15s, color .15s;
  position: relative;
}

.sidebar-item:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-item i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-section-label {
  padding: 16px 20px 6px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sidebar-item.verification-hidden,
.sidebar.open .sidebar-item.verification-hidden {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

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

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
}

.sidebar-name {
  font-weight: 700;
  color: var(--text);
  font-size: .82rem;
}

.sidebar-role {
  font-size: .73rem;
  color: var(--muted);
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 12px;
}

.topbar>div {
  min-width: 0;
}

/* Main content area */
.main-content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

.dashboard-shell {
  display: flex;
  min-height: 100vh;
}

.dashboard-view {
  display: none;
  padding: 24px;
}

.dashboard-view.active {
  display: block;
}

.dashboard-view.verification-locked {
  position: relative;
  opacity: .28;
  filter: grayscale(.35);
  user-select: none;
}

.dashboard-view.verification-locked::before {
  content: 'Fitur ini aktif setelah akun diverifikasi admin';
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  z-index: 5;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #fef08a;
  border-radius: 8px;
  background: #fffbeb;
  color: #854d0e;
  font-size: .82rem;
  font-weight: 700;
}

.topbar h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.welcome-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.hero-dashboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .62)),
    url('../logo/background.jpg') center / cover no-repeat;
  border: 1px solid #dbeafe;
}

.hero-dashboard img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

.section-kicker {
  color: #0f766e;
}

.welcome-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.welcome-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.hero-shortcut {
  margin-top: 6px;
}

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

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

.chart-bars {
  min-height: 180px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 20px;
  overflow-x: auto;
}

.chart-item {
  min-width: 54px;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .72rem;
}

.chart-item div {
  width: 24px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #14b8a6, var(--primary));
}

.chart-item strong {
  color: var(--text);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 4px;
}

.stat-card strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.blue {
  background: #e8f0fe;
  color: var(--primary);
}

.stat-icon.yellow {
  background: #fef9c3;
  color: #b7791f;
}

.stat-icon.green {
  background: #f0fff4;
  color: #276749;
}

.stat-icon.red {
  background: #fff5f5;
  color: var(--danger);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}

/* Card umum */
.card-siparu {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-siparu-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.card-siparu-header h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.card-siparu-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.table-tools {
  align-items: flex-start;
  flex-wrap: wrap;
}

.filter-grid {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 8px;
}

.card-siparu-body {
  padding: 20px;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge-status {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-menunggu {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

.badge-diproses {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fef08a;
}

.badge-selesai {
  background: #f0fff4;
  color: #276749;
  border: 1px solid #9ae6b4;
}

.badge-ditolak {
  background: #fafafa;
  color: #718096;
  border: 1px solid #e2e8f0;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-siparu {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.table-siparu th {
  background: var(--bg-light);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table-siparu td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  overflow-wrap: anywhere;
}

.table-siparu tbody tr:hover {
  background: var(--bg-light);
}

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

.attendance-date-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #c7d8f5;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  background: linear-gradient(90deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: var(--shadow);
}

.attendance-date-main {
  display: grid;
  gap: 2px;
}

.attendance-date-label {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.attendance-date-main strong {
  color: #0f172a;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.12;
}

.attendance-date-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: #334155;
  font-size: .82rem;
  font-weight: 700;
}

.attendance-date-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #d8e4f5;
  border-radius: 8px;
  background: #fff;
}

.attendance-select {
  --attendance-bg: #f8fafc;
  --attendance-border: #cbd5e1;
  --attendance-text: #334155;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 148px;
  border: 1px solid var(--attendance-border);
  border-radius: 8px;
  background: var(--attendance-bg);
  color: var(--attendance-text);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.attendance-select i {
  width: 36px;
  text-align: center;
  color: var(--attendance-text);
  pointer-events: none;
}

.attendance-select .status-select {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-left: 1px solid var(--attendance-border);
  border-radius: 0;
  background-color: transparent;
  color: var(--attendance-text);
  font-weight: 800;
  box-shadow: none;
}

.attendance-select:focus-within {
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.attendance-select.status-hadir {
  --attendance-bg: #ecfdf5;
  --attendance-border: #86efac;
  --attendance-text: #166534;
}

.attendance-select.status-sakit {
  --attendance-bg: #fff7ed;
  --attendance-border: #fdba74;
  --attendance-text: #9a3412;
}

.attendance-select.status-izin {
  --attendance-bg: #eff6ff;
  --attendance-border: #93c5fd;
  --attendance-text: #1d4ed8;
}

.attendance-select.status-alfa {
  --attendance-bg: #fef2f2;
  --attendance-border: #fca5a5;
  --attendance-text: #b91c1c;
}

.decision-select {
  border-radius: 8px;
  font-weight: 650;
}

.download-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.download-fallback-link {
  font-weight: 700;
  color: #b91c1c;
}

.kas-warning-panel {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid #fbbf24;
  border-left: 5px solid #f59e0b;
  border-radius: var(--radius);
  background: #fffbeb;
  box-shadow: var(--shadow);
}

.kas-warning-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fef3c7;
  color: #b45309;
  font-size: 1.2rem;
}

.kas-warning-content h5 {
  color: #78350f;
  font-size: 1rem;
  font-weight: 800;
}

.kas-warning-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.kas-warning-item {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fff;
}

.kas-warning-title {
  display: grid;
  gap: 2px;
}

.kas-warning-title strong {
  color: #0f172a;
  font-size: .9rem;
}

.kas-warning-title span {
  color: #b45309;
  font-size: .76rem;
  font-weight: 750;
}

.kas-warning-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kas-warning-names span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff5f5;
  color: #991b1b;
  font-size: .75rem;
  font-weight: 750;
}

.kas-warning-names small {
  color: #7f1d1d;
  font-weight: 800;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

@media (min-width: 769px) {
  .modal .row>[class*="col-"]>.form-label {
    min-height: 2.4em;
    display: flex;
    align-items: flex-end;
    line-height: 1.2;
  }
}

.form-control-siparu {
  width: 100%;
  min-height: 50px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

select.form-control-siparu,
input[type="file"].form-control-siparu {
  min-height: 50px;
}

input[type="file"].form-control-siparu {
  padding: 8px 12px;
  line-height: 32px;
}

.form-control-siparu:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.form-control-siparu.is-invalid {
  border-color: var(--danger);
}

.form-control-siparu.is-valid {
  border-color: var(--success);
}

.date-helper {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: .75rem;
}

.input-group-siparu {
  position: relative;
}

.input-group-siparu .input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
}

.input-group-siparu .form-control-siparu {
  padding-left: 36px;
}

.input-group-siparu .input-eye {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-siparu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  outline: none;
  line-height: 1.4;
}

.btn-siparu:active {
  transform: scale(.97);
}

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

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

.btn-secondary {
  background: #475569;
  color: #fff;
}

.btn-secondary:hover {
  background: #334155;
}

.btn-muted {
  background: #e2e8f0;
  color: #64748b;
}

.btn-muted:hover {
  background: #e2e8f0;
}

.btn-siparu:disabled {
  cursor: not-allowed;
  opacity: .76;
  transform: none;
}

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

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

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

.btn-warning:hover {
  background: #b7791f;
}

.btn-sm {
  padding: 5px 10px;
  font-size: .78rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   NOTIFIKASI DISPLACEMENT (perangkat lain login)
   ============================================================ */
.displaced-alert,
#displaced-alert {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 340px;
  background: #1a202c;
  color: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  z-index: 9999;
  display: none;
  animation: slideUp .3s ease;
}

.displaced-alert .da-close,
#displaced-alert .da-close {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  color: #a0aec0;
  font-size: 1rem;
  line-height: 1;
}

.displaced-alert .da-close:hover,
#displaced-alert .da-close:hover {
  color: #fff;
}

.displaced-alert h6,
#displaced-alert h6 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fef08a;
}

.displaced-alert p,
#displaced-alert p {
  margin: 0;
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.5;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted {
  color: var(--muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fs-sm {
  font-size: 0.82rem;
}

.d-flex {
  display: flex;
}

.d-none {
  display: none !important;
}

.align-items-center {
  align-items: center;
}

.rounded {
  border-radius: var(--radius);
}

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

.form-wide {
  grid-column: 1 / -1;
}

.form-panel .card-siparu-body {
  display: grid;
  gap: 16px;
}

.face-check {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
  font-size: .9rem;
}

.face-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.face-check-head strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.face-check-head span:not(.verify-badge) {
  display: block;
  color: var(--muted);
  font-size: .8rem;
}

.verify-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: .75rem;
  font-weight: 700;
}

.verify-badge.verified {
  background: #dcfce7;
  color: #166534;
}

.verification-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, .85fr);
  gap: 14px;
  align-items: start;
}

.camera-box,
.media-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.camera-box {
  min-height: 260px;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.camera-box video,
.camera-box img,
.media-preview img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.camera-box video,
.camera-box img {
  display: none;
}

.camera-box video {
  filter: brightness(1.08) contrast(1.06) saturate(1.04);
}

.ios-camera .camera-box video {
  transform: scaleX(-1);
}

.camera-guide {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 46% / 38%;
  box-shadow:
    0 0 0 999px rgba(15, 23, 42, .18),
    0 0 28px rgba(56, 161, 105, .35);
  z-index: 2;
}

.camera-guide::before,
.camera-guide::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
}

.camera-guide::before {
  top: 30%;
}

.camera-guide::after {
  bottom: 26%;
}

.camera-box>span:not(.camera-guide) {
  position: relative;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
}

.camera-box video[style*="block"]~.camera-guide,
.camera-box img[style*="block"]~.camera-guide {
  display: block;
}

.verification-actions {
  display: grid;
  gap: 10px;
}

.verification-actions .btn-siparu {
  justify-content: center;
}

.verification-meta {
  margin: 4px 0 0;
  font-size: .82rem;
  line-height: 1.5;
}

.media-preview {
  margin-top: 8px;
  min-height: 180px;
}

.media-preview img {
  min-height: 180px;
}

.dashboard-notice {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #fef08a;
  color: #854d0e;
  background: #fffbeb;
}

.status-list {
  display: grid;
  gap: 10px;
  padding: 24px;
}

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

.history-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}

.history-summary strong {
  color: var(--text);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 750;
}

.badge-soft.success {
  background: #dcfce7;
  color: #166534;
}

.badge-soft.warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-soft.danger {
  background: #fee2e2;
  color: #991b1b;
}

.report-toolbar {
  margin-bottom: 16px;
}

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

.report-stats-grid {
  margin-bottom: 16px;
}

.report-analytics {
  margin-bottom: 16px;
}

.report-chart {
  display: grid;
  gap: 10px;
  min-height: 190px;
  align-content: start;
  padding: 18px 20px;
}

.report-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr 42px;
  gap: 12px;
  align-items: center;
  font-size: .82rem;
}

.report-bar-row span {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-bar-row div {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.report-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #1a56db);
}

.report-bar-row strong {
  text-align: right;
  color: var(--text);
}

.status-card {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.status-card strong,
.status-card span,
.status-card small {
  display: block;
}

.status-card span,
.status-card small {
  color: var(--muted);
}

.status-card small {
  margin-top: 4px;
  font-size: .76rem;
}

.profile-list {
  display: grid;
  gap: 8px;
}

.profile-list p {
  margin: 0;
}

.action-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.table-action-btn,
.action-cell .btn-siparu.table-action-btn,
.table-siparu .table-action-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

.table-action-btn i {
  font-size: .92rem;
}

.table-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.table-action-btn.action-primary {
  border-color: #bfdbfe;
  color: var(--primary);
}

.table-action-btn.action-warning {
  border-color: #fde68a;
  color: #b7791f;
}

.table-action-btn.action-danger {
  border-color: #fecaca;
  color: var(--danger);
}

.table-action-btn.action-muted {
  border-color: #d8e0ea;
  color: #8391a5;
  background: #f3f6fa;
}

.table-action-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.detail-popup {
  text-align: left;
}

.detail-popup p {
  margin: 0 0 8px;
}

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

.detail-wide {
  grid-column: 1 / -1;
}

.detail-thumb {
  display: block;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.detail-thumb img,
.swal-image-preview {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #f8fafc;
}

.account-verification-box {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
}

.account-update-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.account-password-accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.account-accordion-toggle {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  background: #f8fafc;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 750;
  cursor: pointer;
}

.account-accordion-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-accordion-toggle .fa-chevron-down {
  transition: transform .2s ease;
}

.account-accordion-toggle[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.account-accordion-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.account-accordion-body>div:first-child {
  grid-column: 1 / -1;
}

.account-selfie-preview {
  width: min(220px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.account-selfie-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 22px;
  align-items: start;
}

.profile-main-panel {
  min-width: 0;
}

.profile-photo-panel {
  order: 2;
}

.profile-photo-form {
  display: grid;
  gap: 12px;
}

.profile-photo-frame {
  --profile-pos-x: 50%;
  --profile-pos-y: 50%;
  --profile-shift-x: 0px;
  --profile-shift-y: 0px;
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  justify-self: center;
}

.profile-photo-frame img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118%;
  height: 118%;
  max-width: none;
  object-fit: cover;
  object-position: var(--profile-pos-x) var(--profile-pos-y);
  background: #f8fafc;
  transform: translate(calc(-50% + var(--profile-shift-x)), calc(-50% + var(--profile-shift-y)));
  transition: transform .08s linear, object-position .08s linear;
  user-select: none;
  pointer-events: none;
}

.profile-photo-frame span {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
}

.profile-photo-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-position-grid {
  display: grid;
  gap: 10px;
  font-size: .78rem;
  color: var(--muted);
}

.profile-position-grid input {
  width: 100%;
}

.app-config-panel h4,
.account-delete-request h4 {
  margin: 0;
  font-size: .95rem;
}

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

.theme-choice {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.theme-choice.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.editor-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.editor-toolbar button {
  width: 36px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.pedoman-editor {
  min-height: 280px;
  padding: 14px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  outline: none;
  overflow-wrap: anywhere;
}

.pedoman-editor img {
  max-width: 100%;
  height: auto;
}

.pedoman-video-preview {
  width: min(100%, 760px);
  max-height: 420px;
  border-radius: 8px;
  background: #0f172a;
}

.pedoman-view-body {
  display: grid;
  gap: 18px;
}

.pedoman-content {
  color: var(--text);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.pedoman-content> :first-child {
  margin-top: 0;
}

.pedoman-content> :last-child {
  margin-bottom: 0;
}

.pedoman-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.pedoman-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.pedoman-contact-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value";
  align-items: center;
  gap: 2px 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  text-decoration: none;
}

.pedoman-contact-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.pedoman-contact-card i {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--primary);
  font-size: 1.15rem;
}

.pedoman-contact-card span {
  grid-area: label;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.pedoman-contact-card strong {
  grid-area: value;
  min-width: 0;
  color: inherit;
  font-size: .95rem;
  overflow-wrap: anywhere;
}

body.theme-dark {
  --primary: #5b8cff;
  --primary-dark: #3f73e6;
  --primary-light: #182f61;
  --danger: #ff6b6b;
  --warning: #f8c15d;
  --success: #55d18a;
  --muted: #a8b7cc;
  --border: #334862;
  --bg-light: #0b1220;
  --text: #f4f7fb;
  --text-light: #c7d4e6;
  --shadow: 0 10px 30px rgba(0, 0, 0, .24);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .32);
}

body.theme-dark {
  background: #0b1220;
  color: var(--text);
}

body.theme-dark .main-content {
  background: linear-gradient(180deg, #0e1728 0%, #0b1220 100%);
}

body.theme-dark .sidebar {
  background: #121c2d;
  border-right-color: #2b3e57;
}

body.theme-dark .topbar {
  background: #172234;
  border-bottom-color: #2f435d;
}

body.theme-dark .card-siparu,
body.theme-dark .welcome-card,
body.theme-dark .stat-card,
body.theme-dark .account-password-accordion,
body.theme-dark .account-verification-box,
body.theme-dark .face-check {
  background: #182336;
  border: 1px solid #2f435d;
  color: var(--text);
}

body.theme-dark .card-siparu-header {
  background: #1c2a40;
  border-bottom-color: #334862;
}

body.theme-dark .profile-list p,
body.theme-dark .form-label,
body.theme-dark .account-update-form h4,
body.theme-dark .card-siparu-header h3,
body.theme-dark .card-siparu-header h5,
body.theme-dark .face-check-head strong,
body.theme-dark .stat-card strong,
body.theme-dark .chart-item strong,
body.theme-dark .report-bar-row strong,
body.theme-dark .report-bar-row span,
body.theme-dark .table-siparu td {
  color: #f7faff;
}

body.theme-dark .topbar p,
body.theme-dark .welcome-card p,
body.theme-dark .date-helper,
body.theme-dark .field-meta,
body.theme-dark .verification-meta,
body.theme-dark .profile-position-grid,
body.theme-dark .empty-state,
body.theme-dark .text-muted,
body.theme-dark .sidebar-role,
body.theme-dark .sidebar-brand span {
  color: #a8b7cc !important;
}

body.theme-dark .form-control-siparu,
body.theme-dark .pedoman-editor,
body.theme-dark .theme-choice,
body.theme-dark .icon-btn,
body.theme-dark .editor-toolbar button {
  background: #23344d;
  border-color: #3f5673;
  color: #f8fbff;
}

body.theme-dark .form-control-siparu::placeholder,
body.theme-dark textarea.form-control-siparu::placeholder,
body.theme-dark input.form-control-siparu::placeholder {
  color: #91a4bd;
  opacity: 1;
}

body.theme-dark .form-control-siparu:focus {
  background: #263b59;
  border-color: #7aa2ff;
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .2);
}

body.theme-dark .form-control-siparu[readonly],
body.theme-dark .form-control-siparu:disabled {
  background: #1a273a;
  color: #b7c5d8;
  border-color: #32465f;
}

body.theme-dark .pedoman-content {
  color: #f4f7fb;
}

body.theme-dark .pedoman-contact-grid {
  border-top-color: #334862;
}

body.theme-dark .pedoman-contact-card {
  background: #1a273a;
  border-color: #3f5673;
  color: #f8fbff;
}

body.theme-dark .pedoman-contact-card:hover {
  background: #263b59;
  border-color: #7aa2ff;
  color: #ffffff;
}

body.theme-dark .pedoman-contact-card i {
  background: #233f78;
  color: #b9ceff;
}

body.theme-dark .pedoman-contact-card span {
  color: #a8b7cc;
}

body.theme-dark .account-accordion-toggle,
body.theme-dark .editor-toolbar {
  background: #101929;
  color: #f7faff;
}

body.theme-dark .account-accordion-body,
body.theme-dark .account-update-form {
  border-color: #334862;
}

body.theme-dark .table-siparu th {
  background: #101929;
  border-bottom-color: #334862;
  color: #b6c7dd;
}

body.theme-dark .table-siparu td {
  border-bottom-color: #2b3e57;
}

body.theme-dark .table-siparu tbody tr:hover {
  background: #21324a;
}

body.theme-dark .attendance-date-card,
body.theme-dark .kas-warning-panel {
  background: #182336;
  border-color: #3f5673;
}

body.theme-dark .attendance-date-main strong,
body.theme-dark .kas-warning-title strong,
body.theme-dark .kas-warning-content h5 {
  color: #f8fbff;
}

body.theme-dark .attendance-date-meta span,
body.theme-dark .kas-warning-item {
  background: #101929;
  border-color: #334862;
  color: #dbe7f7;
}

body.theme-dark .kas-warning-icon {
  background: #3b2f12;
  color: #f8c15d;
}

body.theme-dark .attendance-select .status-select {
  color: var(--attendance-text);
}

body.theme-dark .sidebar-item {
  color: #edf4ff;
}

body.theme-dark .sidebar-item:hover {
  background: #1d2e47;
  color: #8fb1ff;
}

body.theme-dark .sidebar-item.active {
  background: #213a73;
  color: #9bb9ff;
}

body.theme-dark .sidebar-brand,
body.theme-dark .sidebar-footer {
  border-color: #2b3e57;
}

body.theme-dark .sidebar-name,
body.theme-dark .sidebar-brand strong {
  color: #f7faff;
}

body.theme-dark .sidebar-section-label {
  color: #8da1bb;
}

body.theme-dark .profile-photo-frame,
body.theme-dark .profile-photo-frame img,
body.theme-dark .account-selfie-preview,
body.theme-dark .detail-thumb {
  background: #eef3f8;
  border-color: #405773;
}

body.theme-dark .theme-choice.active {
  background: #264a8f;
  border-color: #86a9ff;
  color: #ffffff;
}

body.theme-dark .btn-secondary {
  background: #50637d;
  color: #fff;
}

body.theme-dark .btn-muted {
  background: #2b3b51;
  color: #c4d1e2;
}

body.theme-dark .dashboard-notice {
  background: #332b16;
  border-color: #9a7831;
  color: #ffe2a6;
}

body.theme-dark .report-bar-row div {
  background: #2b3b51;
}

body.theme-dark .report-bar-row i,
body.theme-dark .chart-item div {
  background: linear-gradient(180deg, #48d6c4, #5b8cff);
}

body.theme-dark ::-webkit-scrollbar-thumb {
  background: #4a5f7b;
}

body.theme-dark .table-action-btn,
body.theme-dark .action-cell .btn-siparu.table-action-btn,
body.theme-dark .table-siparu .table-action-btn {
  background: #23344d;
  border-color: #455d7c;
  color: #f4f7fb;
}

body.theme-dark .table-action-btn.action-primary {
  color: #9bb9ff;
  border-color: #5474b5;
}

body.theme-dark .table-action-btn.action-warning {
  color: #ffd166;
  border-color: #826536;
}

body.theme-dark .table-action-btn.action-danger {
  color: #ff8b8b;
  border-color: #854d56;
}

body.theme-dark .table-action-btn.action-muted {
  color: #98a8bc;
  background: #1a273a;
  border-color: #334862;
}

body.theme-mixed .sidebar {
  background: #0f172a;
  border-right-color: #1e293b;
}

body.theme-mixed .sidebar-brand,
body.theme-mixed .sidebar-footer {
  border-color: #1e293b;
}

body.theme-mixed .sidebar-item,
body.theme-mixed .sidebar-name,
body.theme-mixed .sidebar-brand strong {
  color: #e5e7eb;
}

body.theme-mixed .sidebar-role,
body.theme-mixed .sidebar-brand span,
body.theme-mixed .sidebar-section-label {
  color: #94a3b8;
}

body.theme-mixed .sidebar-item.active {
  background: #e8f0fe;
  color: #1a56db;
}

body.theme-mixed .sidebar-item.active i {
  color: #1a56db;
}

body.theme-mixed .sidebar-item.active::before {
  background: #1a56db;
}

body.theme-mixed .sidebar-item:hover {
  background: #17233a;
  color: #bfdbfe;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  border-radius: 0 !important;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 0 !important;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 0 !important;
}

::-webkit-scrollbar-corner,
::-webkit-scrollbar-button {
  border-radius: 0 !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 150;
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

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

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    left: 0;
    padding: 0 16px;
  }

  .topbar-title {
    font-size: 0.9rem;
  }

  .page-inner {
    padding: 16px;
  }

  .dashboard-view {
    padding: 16px;
  }

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

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

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

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

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

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-photo-panel {
    order: -1;
  }

  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-card {
    max-width: 560px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .attendance-date-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .attendance-date-meta {
    justify-content: flex-start;
  }

  .kas-warning-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 575px) {
  .auth-wrapper {
    padding: 18px 12px;
  }

  .auth-card {
    border-radius: 16px;
  }

  .auth-body {
    padding: 20px 18px;
  }

  .auth-header {
    padding: 20px 18px;
  }

  .topbar {
    height: auto;
    min-height: var(--topbar-h);
    padding: 8px 12px;
  }

  .topbar h1 {
    font-size: 1rem;
  }

  .topbar p {
    font-size: .74rem;
  }

  .dashboard-view {
    padding: 12px;
  }

  .dashboard-notice {
    margin: 12px 12px 0;
  }

  .card-siparu-header {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .filter-grid,
  .report-filter-grid,
  .pedoman-contact-grid,
  .status-card {
    grid-template-columns: 1fr;
  }

  .account-accordion-body {
    grid-template-columns: 1fr;
  }

  .hero-dashboard {
    align-items: flex-start;
  }

  .hero-dashboard img {
    display: none;
  }

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

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 1.3rem;
  }

  .table-responsive {
    overflow: visible;
  }

  .table-siparu.responsive-cards,
  .table-siparu.responsive-cards thead,
  .table-siparu.responsive-cards tbody,
  .table-siparu.responsive-cards tr,
  .table-siparu.responsive-cards td {
    display: block;
    width: 100%;
  }

  .table-siparu.responsive-cards {
    border-collapse: separate;
    border-spacing: 0;
    font-size: .84rem;
  }

  .table-siparu.responsive-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .table-siparu.responsive-cards tbody {
    display: grid;
    gap: 12px;
    padding: 0;
  }

  .table-siparu.responsive-cards tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .table-siparu.responsive-cards td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
  }

  .table-siparu.responsive-cards td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.25;
  }

  .table-siparu.responsive-cards td[colspan] {
    display: block;
    text-align: center;
  }

  .table-siparu.responsive-cards td>* {
    min-width: 0;
  }

  .table-siparu.responsive-cards .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    max-width: 100%;
    padding: .32rem .55rem;
    border-radius: 6px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }

  .table-siparu.responsive-cards .btn,
  .table-siparu.responsive-cards .btn-sm {
    min-height: 34px;
    line-height: 1.2;
  }

  .table-siparu.responsive-cards td[data-label="Aksi"],
  .table-siparu.responsive-cards td.action-cell {
    align-items: center;
  }

  .table-siparu.responsive-cards td[data-label="Aksi"]>.btn,
  .table-siparu.responsive-cards td[data-label="Aksi"]>span,
  .table-siparu.responsive-cards td.action-cell>.btn,
  .table-siparu.responsive-cards td.action-cell>span {
    justify-self: stretch;
  }

  .table-siparu.responsive-cards .table-actions,
  .table-siparu.responsive-cards .action-cell>.d-flex {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }

  .table-siparu.responsive-cards .table-actions .btn {
    flex: 1 1 96px;
  }

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

/* ============================================================
   SKELETON LOADER & SPA STYLE EFFECTS
   ============================================================ */
.skeleton-loader {
  animation: fadein 0.2s ease-out;
}

.skeleton-row {
  height: 12px;
  background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-pulsing 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 12px;
}

.skeleton-row.title {
  height: 24px;
  width: 35%;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #cbd5e1 25%, #94a3b8 50%, #cbd5e1 75%);
  background-size: 200% 100%;
}

.skeleton-row.short {
  width: 50%;
}

@keyframes skeleton-pulsing {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Absensi Drag & Drop Seat styling */
.seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  min-height: 350px;
}

.student-seat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  cursor: grab;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.student-seat:active {
  cursor: grabbing;
}

.student-seat.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.student-seat.status-hadir {
  border: 2px solid #22c55e !important;
  background-color: #f0fdf4 !important;
}

.student-seat.status-sakit,
.student-seat.status-izin,
.student-seat.status-alfa {
  border: 2px solid #ef4444 !important;
  background-color: #fef2f2 !important;
}

.student-seat .seat-number {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.student-seat .student-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-bubble-trigger {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 9px;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  pointer-events: none;
  font-weight: 750;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-bubble-trigger::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: #ef4444 transparent;
  display: block;
  width: 0;
}

.modal-backdrop.show {
  background-color: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: opacity 0.3s ease;
}

.modal-content {
  border: none;
  border-radius: 18px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  background: rgba(255, 255, 255, 0.98);
}

#modalQR .modal-content {
  background: #ffffff !important;
  border: 1px solid #d8e0ea !important;
  border-radius: 24px !important;
  color: #0f172a;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28) !important;
  overflow: hidden;
}

#modalQR .btn-close {
  filter: none;
  opacity: 0.72;
  box-shadow: none !important;
  outline: none !important;
}

#modalQR .btn-close:hover {
  opacity: 1;
}

#modalQR .btn-close:focus,
#modalQR .btn-close:active {
  box-shadow: none !important;
  outline: none !important;
}

#modalQR .qr-preview-frame {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 16px !important;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3), 0 8px 10px -6px rgba(59, 130, 246, 0.3) !important;
  border: 2px solid rgba(59, 130, 246, 0.2) !important;
  margin: 1.5rem auto !important;
  width: 240px;
  height: 240px;
}

#modalQR #qr-nama {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#modalQR #qr-code-text {
  font-family: monospace;
  letter-spacing: 0.05em;
  color: #94a3b8 !important;
  font-size: 0.875rem;
}

#modalVerifyStudent .modal-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

#modalVerifyStudent .nav-pills .nav-link {
  color: #64748b;
  border-radius: 6px;
  font-size: 0.85rem;
  padding: 8px 16px;
  transition: all 0.2s;
}

#modalVerifyStudent .nav-pills .nav-link.active {
  background: #3b82f6;
  color: #fff;
}

.verify-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.verify-qty-control button {
  border: none;
  background: #f1f5f9;
  color: #475569;
  width: 28px;
  height: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.1s;
}

.verify-qty-control button:hover {
  background: #e2e8f0;
}

.verify-qty-control input {
  border: none;
  width: 38px;
  height: 28px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
}