:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --navy: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-500: #64748b;
  --border: #e2e8f0;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --emerald: #059669;
  --emerald-bg: #ecfdf5;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info-bg: #e0f2fe;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--navy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--slate-800); }
.btn-outline:hover:not(:disabled) { background: var(--surface-alt); border-color: #cbd5e1; }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover:not(:disabled) { background: #e2e8f0; color: var(--navy); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 0.8rem; }
.btn-block { width: 100%; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:hover { background: var(--surface-alt); color: var(--navy); }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--danger);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--slate-800); }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--navy);
  transition: all 0.2s ease;
}
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
.select-compact { width: auto; padding: 6px 10px; font-size: 0.82rem; font-weight: 600; }

/* Login Page + Split Hero */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.24), transparent 36%),
              radial-gradient(circle at 86% 80%, rgba(16, 185, 129, 0.16), transparent 40%),
              linear-gradient(135deg, #0b132b 0%, #1e293b 55%, #0c4a6e 100%);
}
.login-layout {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.login-hero-panel {
  color: #ffffff;
  padding: 8px 6px;
}
.login-hero-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #bae6fd;
}
.login-hero-title {
  margin: 14px 0 10px;
  font-size: 2.05rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.login-hero-desc {
  margin: 0 0 18px;
  font-size: 0.94rem;
  color: #cbd5e1;
  max-width: 540px;
}
.login-hero-showcase {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 44px rgba(2, 6, 23, 0.42);
  background: rgba(15, 23, 42, 0.45);
  margin-bottom: 14px;
}
.login-hero-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.login-hero-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  padding: 10px 14px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.login-hero-overlay span { font-size: 0.74rem; font-weight: 700; color: #7dd3fc; text-transform: uppercase; letter-spacing: 0.04em; }
.login-hero-overlay strong { font-size: 0.82rem; color: #ffffff; }
.login-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.login-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
}
.login-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.login-hero-ghost {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}
.login-hero-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.45);
}
.login-card {
  width: 100%;
  max-width: 470px;
  justify-self: center;
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.login-brand h1 { margin: 0; font-size: 1.35rem; color: var(--navy); }
.login-brand p { margin: 2px 0 0; font-size: 0.85rem; color: var(--slate-500); }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--slate-500);
  font-size: 0.78rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-box {
  margin-top: 18px;
  padding: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.demo-box-head { font-size: 0.76rem; font-weight: 600; color: var(--slate-600); margin-bottom: 8px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-chip {
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-800);
  cursor: pointer;
  transition: all 0.2s ease;
}
.demo-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--info-bg); }

/* App Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--navy);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand .brand-mark { background: var(--primary); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 1rem; color: #fff; }
.brand-text small { font-size: 0.75rem; color: #94a3b8; }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #334155;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-mini-info { display: flex; flex-direction: column; min-width: 0; }
.user-mini-info strong { font-size: 0.82rem; color: #fff; word-break: break-word; }
.user-mini-info small { font-size: 0.72rem; color: #94a3b8; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.view-container { padding: 20px 22px 48px; max-width: 1380px; width: 100%; margin: 0 auto; }

/* Cards, Grids & Pills */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.card-header h3 { margin: 0; font-size: 1rem; }

/* KPI Grid 2-3 kolom, anti tumpuk 1 kolom */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-label { font-size: 0.78rem; font-weight: 600; color: var(--slate-500); display: flex; align-items: center; justify-content: space-between; }
.kpi-val { font-size: 1.45rem; font-weight: 800; margin-top: 6px; color: var(--navy); }
.kpi-sub { font-size: 0.76rem; color: var(--slate-500); margin-top: 3px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.grid-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.app-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--info-bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-card h4 { margin: 10px 0 4px; font-size: 0.98rem; color: var(--navy); }
.app-card p { margin: 0; font-size: 0.83rem; color: var(--slate-600); }
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill-slate { background: #e2e8f0; color: var(--slate-800); }
.pill-blue { background: var(--info-bg); color: #0369a1; }
.pill-green { background: var(--emerald-bg); color: var(--emerald); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-red { background: var(--danger-bg); color: var(--danger); }

/* Toolbar & Pagination */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.toolbar-filters input { max-width: 280px; }
.toolbar-filters select { max-width: 210px; }
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--slate-600);
}

/* Tabel Responsif & Baris Gendut (Anti Ellipsis) */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td {
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}
th { background: var(--surface-alt); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--slate-600); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* Chart SVG */
.chart-wrap { width: 100%; overflow-x: auto; }
.chart-legend { display: flex; gap: 14px; font-size: 0.78rem; color: var(--slate-600); margin-top: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal-card {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-header h3 { margin: 0; font-size: 1.05rem; }
.toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
  max-width: 340px;
}
.toast {
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}
.toast.success { background: var(--emerald); }
.toast.error { background: var(--danger); }

/* Mobile Bottom Nav + Overflow Drawer */
.mobile-bottom-nav { display: none; }
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 70;
  display: flex;
  align-items: flex-end;
}
.mobile-drawer-panel {
  width: 100%;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 18px;
  max-height: 75vh;
  overflow-y: auto;
}
.drawer-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.perm-matrix th, .perm-matrix td { text-align: center; font-size: 0.8rem; padding: 8px; }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; min-width: 210px; }

/* Hero Banner & Menu Visual Cards */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.22), transparent 42%),
              linear-gradient(135deg, #0b132b 0%, #172554 50%, #0369a1 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1.45fr 320px;
  gap: 22px;
  align-items: center;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}
.hero-banner-copy { position: relative; z-index: 1; }
.hero-pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-pill-role {
  background: rgba(56, 189, 248, 0.20);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #e0f2fe;
}
.hero-date-chip {
  font-size: 0.74rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.10);
  padding: 4px 10px;
  border-radius: 999px;
}
.hero-banner h3 { margin: 10px 0 6px; font-size: 1.45rem; line-height: 1.25; color: #ffffff; }
.hero-banner p { margin: 0; font-size: 0.9rem; color: #dbeafe; max-width: 620px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.hero-btn-primary {
  background: #38bdf8;
  color: #082f49;
  font-weight: 700;
}
.hero-btn-primary:hover:not(:disabled) {
  background: #7dd3fc;
  transform: translateY(-1px);
}
.hero-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}
.hero-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}
.hero-meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-meta-strip small {
  display: block;
  font-size: 0.71rem;
  color: #93c5fd;
}
.hero-meta-strip strong {
  font-size: 0.85rem;
  color: #ffffff;
}
.hero-banner-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.35);
}
.hero-banner-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-img-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.hero-img-caption span { font-size: 0.68rem; font-weight: 700; color: #7dd3fc; text-transform: uppercase; }
.hero-img-caption strong { font-size: 0.76rem; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-visual-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.page-visual-copy h3 { margin: 6px 0 4px; font-size: 1.05rem; color: var(--navy); }
.page-visual-copy p { margin: 0; font-size: 0.84rem; color: var(--slate-600); }
.page-visual-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.page-visual-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.menu-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.menu-visual-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--navy);
  font-family: inherit;
}
.menu-visual-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.menu-visual-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
}
.menu-img-edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.18s ease, transform 0.18s ease;
}
.menu-img-edit-btn:hover {
  background: var(--primary, #0284c7);
  transform: scale(1.03);
}
.menu-visual-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.menu-visual-card:hover .menu-visual-media img { transform: scale(1.03); }
.menu-visual-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.menu-visual-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}
.menu-visual-desc { font-size: 0.76rem; color: var(--slate-600); line-height: 1.4; }

/* Mobile Attendance QR, Face Selfie & GPS */
.qr-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.qr-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.qr-box {
  display: inline-flex;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 8px 0;
}
.camera-preview-box {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 0.82rem;
  margin: 8px 0;
}
.camera-preview-box video, .camera-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ID Card Print System */
.idcard-print-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.idcard-item-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.idcard-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  box-shadow: var(--shadow-md);
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.idcard-landscape { width: 8.56cm; height: 5.4cm; }
.idcard-portrait { width: 5.4cm; height: 8.56cm; }

.idcard-head {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 65%, #0284c7 100%);
  color: #ffffff;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.idcard-school-logo, .idcard-school-fallback {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.68rem;
  color: #ffffff;
  flex-shrink: 0;
}
.idcard-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.idcard-head-text strong {
  font-size: 0.61rem;
  line-height: 1.15;
  color: #ffffff;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.idcard-head-text small { font-size: 0.5rem; letter-spacing: 0.04em; color: #bae6fd; margin-top: 1px; }
.idcard-code-tag {
  font-size: 0.5rem;
  font-weight: 700;
  padding: 1.5px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.idcard-body {
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 52px 1fr 64px;
  gap: 7px;
  align-items: center;
  flex: 1;
  min-height: 0;
}
.idcard-portrait .idcard-body {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 6px;
}
.idcard-portrait-top {
  padding: 6px 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3px;
  flex: 1;
  min-height: 0;
}
.idcard-portrait-identity {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 7px;
  text-align: left;
  margin-top: 2px;
}
.idcard-portrait-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}
.idcard-portrait-photo .idcard-avatar {
  width: 56px;
  height: 68px;
  font-size: 1.05rem;
}
.idcard-portrait-bottom {
  padding: 5px 8px;
  border-top: 1px dashed #cbd5e1;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.idcard-barcode-col {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.idcard-barcode-landscape {
  max-width: 100% !important;
  width: 100%;
  padding: 2px 4px;
}
.idcard-barcode-portrait {
  max-width: 100% !important;
  width: 100%;
  margin-top: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: flex;
  justify-content: center;
}
.idcard-portrait-subcode {
  font-size: 0.56rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-top: 2px;
}
.idcard-avatar.idcard-has-photo {
  padding: 0;
  overflow: hidden;
  background: #f1f5f9;
}
.idcard-avatar.idcard-has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.idcard-avatar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.idcard-avatar {
  width: 48px;
  height: 54px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1.5px solid #bae6fd;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idcard-role-pill {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  text-align: center;
  max-width: 100%;
}
.idcard-info-col { min-width: 0; }
.idcard-name { font-size: 0.78rem; font-weight: 800; color: #0f172a; line-height: 1.18; }
.idcard-sub { font-size: 0.6rem; color: #475569; margin-bottom: 2px; line-height: 1.15; }
.idcard-meta-row { font-size: 0.61rem; color: #334155; line-height: 1.25; margin-bottom: 1.5px; }
.idcard-meta-row:last-child { margin-bottom: 0; }
.idcard-meta-row span { color: #64748b; display: inline-block; margin-right: 4px; }
.idcard-meta-row strong { color: #0f172a; word-break: break-word; }
.idcard-qr-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.idcard-qr-box {
  padding: 3px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: inline-flex;
  flex-shrink: 0;
}
.idcard-qr-col small { font-size: 0.54rem; color: #64748b; font-weight: 600; }

.idcard-foot {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 3px 6px;
  font-size: 0.52rem;
  line-height: 1.15;
  color: #475569;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  flex-shrink: 0;
}

@media print {
  .idcard-landscape { width: 8.56cm; height: 5.4cm; }
  .idcard-portrait { width: 5.4cm; height: 8.56cm; }
  .idcard-sheet { box-shadow: none; border: 1px solid #94a3b8; }
}

.idcard-barcode-wrap {
  margin-top: 4px;
  padding: 2px 3px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  max-width: 160px;
}

/* OSIS Candidates, Real Count & Printable Berita Acara */
.osis-cand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.osis-cand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.osis-cand-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-alt);
  overflow: hidden;
}
.osis-cand-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.osis-no-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
}
.osis-cand-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.osis-cand-body h4 { margin: 0 0 3px; font-size: 1rem; color: var(--navy); }
.osis-bar-wrap { margin-top: 12px; }
.osis-bar-head { display: flex; justify-content: space-between; font-size: 0.78rem; margin-bottom: 4px; }
.osis-bar-track { height: 9px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.osis-bar-fill { height: 100%; background: var(--primary); transition: width 0.3s ease; }

.osis-print-kop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
}
.osis-sign-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
  text-align: center;
  font-size: 0.84rem;
}

@media (max-width: 1120px) {
  .menu-visual-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

@media (max-width: 960px) {
  .login-layout { grid-template-columns: 1fr; gap: 20px; max-width: 540px; }
  .login-hero-title { font-size: 1.55rem; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .view-container { padding: 14px 14px 86px; }
  .topbar { padding: 10px 14px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-2, .grid-apps, .form-grid-2, .hero-banner, .page-visual-banner { grid-template-columns: 1fr; }
  .hero-meta-strip { grid-template-columns: 1fr; gap: 6px; }
  .menu-visual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  th, td { padding: 8px 9px; font-size: 0.76rem; }
  .kpi-val { font-size: 1.2rem; }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 4px;
    z-index: 40;
  }
  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--slate-600);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 5px 2px;
    cursor: pointer;
  }
  .mobile-nav-btn.active { color: var(--primary); }
}

/* Dynamic Custom Backgrounds & Branding Manager */
.login-shell.has-custom-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.app-shell.has-desktop-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.branding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.branding-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.branding-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.branding-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.branding-empty { font-size: 0.78rem; color: var(--slate-600); font-weight: 600; padding: 12px; text-align: center; }
.branding-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--emerald);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}
.branding-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.branding-body h4 { margin: 0; font-size: 0.9rem; color: var(--navy); }
.branding-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

/* Fullscreen OSIS Voting Stage */
.osis-fullscreen-stage {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: linear-gradient(160deg, #f8fafc 0%, #e0f2fe 100%);
  overflow-y: auto;
  overflow-x: hidden;
}
.osis-fs-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.osis-fs-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.osis-fs-brand h2 { margin: 0; font-size: 1.05rem; color: #ffffff; }
.osis-fs-brand p { margin: 2px 0 0; font-size: 0.76rem; color: #cbd5e1; }
.osis-fs-logo { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1px solid rgba(255,255,255,0.25); flex-shrink: 0; }
.osis-fs-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.osis-fs-header .btn-outline { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: #ffffff; }
.osis-fs-header .btn-outline:hover { background: rgba(255,255,255,0.2); }
.osis-fs-body { max-width: 1280px; margin: 0 auto; padding: 18px 20px 36px; }
.osis-cand-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Attendance Summary Strip & Modals */
.att-summary-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.att-stat-chip {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--slate-800);
  transition: all 0.15s ease;
}
.att-stat-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .osis-fs-header { padding: 10px 14px; }
  .osis-fs-brand h2 { font-size: 0.94rem; }
  .osis-fs-body { padding: 12px 12px 28px; }
  .osis-cand-grid { grid-template-columns: 1fr; gap: 14px; }
  .osis-cand-photo { aspect-ratio: 4 / 3; }
  .osis-vote-btn { width: 100%; min-height: 46px; font-size: 0.96rem; }
  .donut-grid, .teaching-map-grid, .guide-steps-grid { grid-template-columns: 1fr; }
  .exam-lock-header { padding: 10px 14px; }
  .exam-embed-frame { height: calc(100vh - 200px); }
}

/* Login & Pre-Dashboard Role Guide */
.login-guide-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}
.login-guide-body {
  font-size: 0.8rem;
  color: var(--slate-800);
  line-height: 1.45;
}
.demo-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.guide-welcome-card {
  border-left: 4px solid var(--primary);
}
.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.guide-step-card {
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.guide-step-card h4 { margin: 0 0 6px; font-size: 0.92rem; color: var(--navy); }
.guide-step-card p { margin: 0; font-size: 0.82rem; color: var(--slate-600); line-height: 1.45; }

/* Donut Attendance Charts (Siswa, Guru, Tendik) */
.donut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.donut-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.donut-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.donut-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--slate-800);
}

/* Teaching Map Grid */
.teaching-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.teaching-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.teaching-card-active {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.teaching-card-idle {
  background: var(--surface-alt);
  border-color: var(--border);
}

/* Exam Lockdown Stage */
.exam-lockdown-stage {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: #f8fafc;
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
}
.exam-lock-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.exam-lock-header .btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.exam-timer-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #0284c7;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.exam-timer-pill.danger {
  background: var(--danger);
}
.exam-lock-body {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 18px 42px;
}
.exam-q-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.btn-success-soft {
  background: var(--emerald-bg);
  color: var(--emerald);
  border-color: #6ee7b7;
}
.exam-opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exam-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  text-align: left;
  font-size: 0.94rem;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}
.exam-opt-btn:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}
.exam-opt-btn.selected {
  border-color: var(--primary);
  background: #e0f2fe;
  font-weight: 700;
}
.exam-opt-key {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--navy);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.exam-opt-btn.selected .exam-opt-key {
  background: var(--primary);
  color: #ffffff;
}
.exam-embed-frame {
  width: 100%;
  height: calc(100vh - 190px);
  min-height: 460px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}
.exam-focus-warn {
  position: fixed;
  inset: 0;
  z-index: 58;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.exam-tf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.exam-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exam-match-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.exam-match-left { font-size: 0.9rem; color: var(--navy); }
@media (max-width: 768px) {
  .exam-tf-grid, .exam-match-row { grid-template-columns: 1fr; }
}

/* Embedded E-Absensi Mobile UI inside EduGate SSO Presensi Menu */
.ea-role-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ea-embed-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}
.ea-embed-layout.with-side {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  align-items: start;
}
.ea-embed-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.ea-embed-phone {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: #f2f5fa;
  border-radius: 22px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
  display: flex;
  flex-direction: column;
}
.ea-embed-scroll {
  min-height: 460px;
  max-height: 760px;
  overflow-y: auto;
  padding-bottom: 14px;
}
.ea-embed-bottom-bar {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px 8px;
}
.mob-blue-header {
  background: linear-gradient(135deg, #0f4bc9, #1d63ed);
  color: #ffffff;
  padding: 16px 16px 20px;
  border-radius: 0 0 22px 22px;
}
.mob-header-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mob-emblem-circle {
  width: 36px; height: 36px; border-radius: 999px; background: #ffffff; color: #0b3a9e;
  font-size: 0.74rem; font-weight: 800; display: grid; place-items: center; flex-shrink: 0;
}
.mob-header-center { text-align: center; flex: 1; min-width: 0; }
.mob-header-center small { display: block; font-size: 0.76rem; opacity: 0.88; }
.mob-header-center strong { display: block; font-size: 0.96rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mob-logo-box {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.16);
  display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
.mob-logo-box img { width: 100%; height: 100%; object-fit: cover; }
.mob-greeting h2 { font-size: 1.28rem; font-weight: 800; margin: 0; }
.mob-greeting p { font-size: 0.82rem; opacity: 0.9; margin: 2px 0 0; }
.mob-stack-body { padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 12px; }
.mob-card {
  background: #ffffff; border-radius: 16px; padding: 13px;
  border: 1px solid #e8eef7; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.mob-card.border-danger { border: 1.5px solid #fca5a5; }
.mob-card.border-success { border: 1.5px solid #86efac; }
.mob-gps-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mob-gps-left { display: flex; gap: 10px; align-items: center; }
.mob-status-circle {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  flex-shrink: 0; font-weight: 800;
}
.mob-status-circle.danger { background: #ef4444; color: #ffffff; }
.mob-status-circle.success { background: #16a34a; color: #ffffff; }
.mob-status-circle.neutral { background: #cbd5e1; color: #334155; }
.mob-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.mob-pill.danger { background: #fee2e2; color: #dc2626; }
.mob-pill.success { background: #dcfce7; color: #15803d; }
.mob-pill.amber { background: #fef3c7; color: #b45309; }
.mob-pill.slate { background: #f1f5f9; color: #475569; }
.mob-pill.blue { background: #e6f0ff; color: #0f4bc9; }
.mob-alert-strip {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #fef2f2;
  color: #dc2626; font-size: 0.78rem; font-weight: 600; display: flex; gap: 8px;
}
.mob-alert-strip.ok { background: #f0fdf4; color: #15803d; }
.mob-gps-meta { margin-top: 8px; display: flex; justify-content: space-between; font-size: 0.74rem; color: #64748b; }
.mob-today-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mob-today-head h3 { font-size: 0.96rem; font-weight: 800; margin: 0; }
.mob-time-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mob-time-box { background: #f4f6fa; border-radius: 12px; padding: 10px 12px; }
.mob-time-box small { display: block; font-size: 0.74rem; color: #64748b; margin-bottom: 2px; }
.mob-time-box strong { font-size: 1.24rem; font-weight: 800; color: #0f172a; }
.mob-today-foot { margin-top: 8px; font-size: 0.74rem; color: #64748b; }
.mob-piket-card { background: #eaf2ff; border: 1px solid #c7dbfe; border-radius: 16px; padding: 12px 14px; }
.mob-piket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mob-piket-title { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 800; color: #1e3a8a; }
.mob-piket-list { font-size: 0.86rem; font-weight: 700; color: #1e40af; display: flex; flex-wrap: wrap; gap: 10px; }
.mob-section-title { font-size: 0.94rem; font-weight: 800; margin-top: 2px; }
.mob-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mob-quick-tile {
  background: #ffffff; border: 1px solid #e8eef7; border-radius: 16px; padding: 13px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
}
.mob-quick-tile:hover { border-color: #1d63ed; }
.mob-quick-ic { width: 42px; height: 42px; border-radius: 999px; background: #eaf2ff; color: #0f4bc9; display: grid; place-items: center; }
.mob-quick-tile span { font-size: 0.84rem; font-weight: 700; color: #0f172a; }
.mob-main-absen-btn {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: none;
  background: linear-gradient(135deg, #0f4bc9, #1d63ed); color: #ffffff; font-size: 1rem;
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.mob-main-absen-btn.muted { background: #cbd5e1; color: #475569; }
.mob-month-pill {
  background: #ffffff; color: #0f172a; border-radius: 14px; padding: 8px 12px;
  display: flex; align-items: center; justify-content: space-between; margin: 10px 0 12px; font-weight: 800;
}
.mob-month-btn { background: transparent; border: none; font-size: 1.1rem; font-weight: 800; cursor: pointer; padding: 4px 10px; }
.mob-summary-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mob-sum-box { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 14px; padding: 9px 6px; text-align: center; }
.mob-sum-box strong { display: block; font-size: 1.2rem; font-weight: 800; }
.mob-sum-box span { font-size: 0.72rem; }
.mob-empty-state { padding: 46px 20px; text-align: center; color: #64748b; }
.mob-hist-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 12px;
}
.mob-idcard-wrap { background: #ffffff; border-radius: 18px; border: 1.5px solid #93c5fd; overflow: hidden; }
.mob-idcard-head { background: #0f4bc9; color: #ffffff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mob-idcard-profile { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid #eef2f7; }
.mob-id-avatar { width: 64px; height: 74px; border-radius: 12px; background: #dce8fc; color: #1e3a8a; font-size: 1.6rem; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.mob-idcard-qrbox { padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #ffffff; }
.mob-idcard-qrbox svg { width: min(270px, 90%); height: auto; display: block; }
.mob-idcard-barcode-num { font-size: 0.84rem; font-weight: 800; letter-spacing: 0.14em; color: #0f172a; }
.mob-idcard-foot { background: #ebf2fe; color: #1e3a8a; text-align: center; padding: 8px 12px; font-size: 0.76rem; font-weight: 600; }
.mob-btn-primary {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: none; background: #1d63ed; color: #ffffff;
  font-size: 0.94rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.mob-btn-outline {
  width: 100%; padding: 11px 14px; border-radius: 14px; border: 1.5px solid #e2e8f0; background: #ffffff;
  color: #0f4bc9; font-size: 0.92rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.mob-menu-item {
  width: 100%; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; text-align: left;
}
.mob-menu-left { display: flex; align-items: center; gap: 10px; }
.mob-menu-ic { width: 36px; height: 36px; border-radius: 10px; background: #ebf2fe; color: #0f4bc9; display: grid; place-items: center; flex-shrink: 0; }
.mob-seg-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: #e2e8f0; padding: 4px; border-radius: 12px; }
.mob-seg-btn { border: none; background: transparent; padding: 7px 6px; border-radius: 9px; font-size: 0.76rem; font-weight: 700; color: #475569; cursor: pointer; }
.mob-seg-btn.active { background: #ffffff; color: #0f4bc9; }
.mob-nav-tab {
  border: none; background: transparent; color: #64748b; display: flex; flex-direction: column;
  align-items: center; gap: 3px; font-size: 0.72rem; font-weight: 700; padding: 4px; cursor: pointer;
}
.mob-nav-tab.active { color: #0f4bc9; }
.mob-form-stack { display: flex; flex-direction: column; gap: 12px; }
.mob-field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 5px; }
.mob-field input, .mob-field select, .mob-field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #e2e8f0; background: #f8fafc;
}
.ea-verify-tabs {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  background: #e2e8f0; padding: 4px; border-radius: 12px;
}
.ea-cam-box {
  width: 100%; min-height: 210px; max-height: 260px; border-radius: 14px;
  background: #0f172a; color: #cbd5e1; display: grid; place-items: center;
  overflow: hidden; border: 1.5px solid #cbd5e1; font-size: 0.82rem;
}
.ea-cam-box video, .ea-cam-box img {
  width: 100%; max-height: 260px; object-fit: cover; display: block;
}
.pass-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-field-wrap input {
  width: 100%;
  padding-right: 44px;
}
.pass-field-wrap input::-ms-reveal,
.pass-field-wrap input::-ms-clear {
  display: none;
}
.pass-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.pass-toggle-btn:hover {
  color: #0f4bc9;
  background: rgba(15, 75, 201, 0.08);
}
.rep-print-sheet {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.rep-letterhead-banner {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
  border-bottom: 3px double #0f172a;
  padding-bottom: 8px;
}
.rep-letterhead-box {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px double #0f172a;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.rep-letterhead-logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  flex-shrink: 0;
}
.rep-letterhead-text {
  flex: 1;
  text-align: center;
}
.rep-letterhead-text small {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.03em;
}
.rep-letterhead-text h2 {
  margin: 2px 0;
  font-size: 1.24rem;
  font-weight: 800;
  color: #0f172a;
}
.rep-letterhead-text p {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
}
.rep-sign-row {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
}
.rep-sign-box {
  width: 240px;
  text-align: center;
  font-size: 0.84rem;
  color: #0f172a;
}

.portal-link-banner {
  border-left: 4px solid var(--brand, #0284c7);
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.portal-link-banner-meta {
  min-width: 220px;
  flex: 1;
}
.portal-link-url-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 600;
  word-break: break-all;
}
.teaching-grade-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.teaching-grade-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.teaching-grade-section:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}
.teaching-grade-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.teaching-special-card {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.teaching-special-card.teaching-card-active {
  border-color: #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 760px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}
@media print {
  .rep-print-sheet {
    border: none;
    padding: 0;
  }
}
@media (max-width: 960px) {
  .ea-embed-layout.with-side { grid-template-columns: 1fr; }
  .ea-embed-scroll { max-height: none; }
}

@media print {
  .sidebar, .topbar, .mobile-bottom-nav, .no-print { display: none !important; }
  .osis-fullscreen-stage { position: static; overflow: visible; background: #ffffff; }
  .view-container { padding: 0; }
  .card { border: none; box-shadow: none; }
}
