/* KPI Aryaproperties: Material-based design language with a glassmorphism layer (navy #013a71 + peach #fcbe8b from the Arya Properties logo). */
:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --border: #dadce0;
  --border-strong: #dadce0;
  --text: #202124;
  --text-muted: #3c4043;
  --text-soft: #5f6368;
  --primary: #013a71;
  --primary-hover: #012d58;
  --primary-soft: #e6eef7;
  --primary-on-soft: #013a71;
  --emerald: #188038;
  --emerald-soft: #e6f4ea;
  --amber: #b06000;
  --amber-soft: #fdeede;
  --rose: #d93025;
  --rose-soft: #fce8e6;
  --indigo: #5e35b1;
  --indigo-soft: #ede7f6;
  --sidebar-bg: #f8f9fa;
  --accent: #fcbe8b;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-sm: none;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --shadow-lg: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  --font: "Google Sans", "Google Sans Text", Roboto, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: #dfe7f0; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 400; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Video latar layar penuh (diburamkan, di belakang semua panel) ---------- */
.bg-media {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: #0b2a3a url('https://i.ytimg.com/vi/8iFdMBcY3-U/maxresdefault.jpg') center / cover no-repeat;
}
/* YouTube player: fixed 1280x720 box centred and scaled to cover the screen (scale is set by bgvideo.js). */
.bg-media iframe {
  position: absolute; top: 50%; left: 50%; width: 1280px; height: 720px; border: 0;
  transform: translate(-50%, -50%) scale(1.5); transform-origin: center center;
  filter: blur(2px) saturate(1.1); opacity: 0; transition: opacity 1.2s ease;
}
.bg-media.is-playing iframe { opacity: 1; }
/* Selubung navy tipis agar video tidak mengganggu keterbacaan; kartu & panel tetap solid di atasnya. */
.bg-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 58, 113, 0.22), rgba(1, 58, 113, 0.08)); }
@media (prefers-reduced-motion: reduce) { .bg-media iframe { display: none; } }

/* Panel hak cipta */
.copyright-bar {
  margin: 20px auto 0; max-width: 1440px; width: 100%;
  padding: 10px 16px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-soft); text-align: center; line-height: 18px;
}
.copyright-bar a { font-weight: 500; }
.login-footer.copyright-bar { max-width: 450px; margin-top: 20px; }

/* ---------- Layar masuk (gaya halaman Sign in Google) ---------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card {
  width: 100%;
  max-width: 450px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px 40px 36px;
}
.login-brand { display: flex; justify-content: center; margin-bottom: 16px; }
.login-card h1 { margin: 0 0 8px; font-size: 24px; line-height: 32px; text-align: center; }
.login-card .subtitle { margin: 0 0 32px; text-align: center; font-size: 16px; line-height: 24px; color: var(--text); }
.login-google { display: flex; justify-content: center; min-height: 44px; }
.login-note {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-on-soft);
  font-size: 13px;
}
.login-note.warn { background: var(--amber-soft); color: var(--amber); }
.login-help { margin: 28px 0 0; font-size: 12px; color: var(--text-soft); text-align: center; line-height: 18px; }
.login-local { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.login-local summary { cursor: pointer; color: var(--primary); font-weight: 500; font-size: 13px; }
.login-local form { margin-top: 14px; }

/* ---------- App shell ---------- */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px;
  background: var(--sidebar-bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
}
.sidebar-brand { padding: 14px 20px; height: 64px; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; display: flex; }
.brand-mark { width: 36px; height: 36px; }
.brand-mark img { width: 36px; height: 36px; border-radius: 8px; display: block; }
.login-logo { width: 132px; height: auto; border-radius: 18px; display: block; }
.brand-name { color: var(--text); font-size: 20px; line-height: 24px; }
.brand-sub { color: var(--text-soft); font-size: 12px; }

.sidebar-nav { flex: 1; padding: 8px 12px 8px 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  padding: 0 12px 0 24px;
  border-radius: 0 20px 20px 0;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-weight: 500;
}
.nav-item:hover { background: #e8eaed; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-on-soft); }
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

.sidebar-footer { padding: 12px 16px 16px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 13px; flex-shrink: 0;
}
.user-chip-info { min-width: 0; flex: 1; }
.user-chip-name { color: var(--text); font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-role { color: var(--text-soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; background: transparent; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  margin: 0 24px; /* same side gap as .content-wrap padding, so the header lines up with the cards below it */
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 22px; line-height: 28px; font-weight: 400; margin: 0; }
.topbar-subtitle { font-size: 12px; color: var(--text-soft); }
.topbar-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mobile-menu-btn {
  display: none; background: transparent; border: none; border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer; align-items: center; justify-content: center; color: var(--text-soft);
}
.mobile-menu-btn:hover { background: #e8eaed; }
.mobile-menu-btn svg { width: 24px; height: 24px; fill: currentColor; }

/* Full width of the main area (no centred max-width), so cards and header share the same left and right edges. */
.content-wrap { padding: 24px; width: 100%; margin: 0; background: transparent; flex: 1; }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: -270px; z-index: 50; transition: left 0.2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; margin: 0 16px; }
  .content-wrap { padding: 16px; }
}

/* ---------- Kartu & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 16px; font-weight: 500; margin: 0; }
.card-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-soft); }
.stat-value { font-size: 28px; font-weight: 400; margin: 4px 0; line-height: 36px; }
.stat-meta { font-size: 12px; color: var(--text-soft); }

/* Banner ringkasan: kartu biru muda datar */
.kpi-hero {
  background: var(--primary-soft);
  color: var(--text);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.kpi-hero-title { font-size: 22px; line-height: 28px; margin: 8px 0 6px; }
.kpi-hero-sub { color: var(--text-muted); font-size: 14px; max-width: 640px; margin: 0; }
.kpi-hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hero-pill { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 4px 12px; font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ---------- Badge / chip ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap;
}
.badge-emerald { background: var(--emerald-soft); color: var(--emerald); }
.badge-blue { background: var(--primary-soft); color: var(--primary-on-soft); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-rose { background: var(--rose-soft); color: #c5221f; }
.badge-indigo { background: var(--indigo-soft); color: var(--indigo); }
.badge-neutral { background: #f1f3f4; color: var(--text-soft); }
.badge-dark { background: #3c4043; color: #fff; }

/* ---------- Progress ---------- */
.progress-track { width: 100%; height: 6px; background: #e8eaed; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }

/* ---------- Tombol & input ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--primary-soft); border-color: #c3d4e8; }
.btn-emerald { background: var(--surface); color: var(--emerald); border-color: var(--border); }
.btn-emerald:hover { background: var(--emerald-soft); }
.btn-danger { background: var(--surface); color: var(--rose); border-color: var(--border); }
.btn-danger:hover { background: var(--rose-soft); }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: #e8eaed; color: var(--text); }
.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #80868b; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); outline: none;
}
.textarea { height: auto; padding: 10px 12px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.input::placeholder { color: #80868b; }
.select-inline { width: auto; min-width: 150px; height: 36px; padding: 0 10px; font-size: 13px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-soft); margin-bottom: 6px; }
.form-hint { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--surface); color: var(--text-soft); font-weight: 500; font-size: 12px;
  text-align: left; padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid #e8eaed; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ---------- Sub-tab ---------- */
.tabs { display: flex; gap: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 4px 8px 0; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 0 16px; height: 48px; border: none; background: transparent; color: var(--text-soft);
  font-weight: 500; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); background: var(--bg); }
.tab-btn.active { color: var(--primary-on-soft); border-bottom-color: var(--primary); }

/* ---------- Hierarki organisasi ---------- */
.org-tree-manager { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 16px; margin-bottom: 16px; }
.org-node-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.org-divisions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px;
  margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--border);
}
.org-division-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.org-member-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg); margin-top: 8px; border: 1px solid #e8eaed;
}

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(32, 33, 36, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { background: var(--surface); border-radius: 8px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 20px 24px 8px; display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; font-size: 22px; line-height: 28px; }
.modal-body { padding: 16px 24px 24px; }
.modal-footer { padding: 14px 0 0; display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Snackbar ---------- */
#toast-root { position: fixed; bottom: 24px; left: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: #323232; color: #fff; padding: 12px 16px; border-radius: 4px; font-size: 14px; min-width: 240px; max-width: 480px;
  box-shadow: 0 3px 5px -1px rgba(0,0,0,.2), 0 6px 10px rgba(0,0,0,.14), 0 1px 18px rgba(0,0,0,.12);
  animation: fadeSlide 0.2s ease;
}
.toast.error { background: #b3261e; }
.toast.success { background: #323232; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.check-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px; height: 28px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-soft);
}
.check-toggle:hover { background: var(--bg); }
.check-toggle.checked { background: var(--emerald-soft); border-color: #ceead6; color: var(--emerald); }
.empty-state { text-align: center; padding: 36px 20px; color: var(--text-soft); }
code { background: #f1f3f4; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
/* ---------- Administrator: audit tampilan ---------- */
.audit-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 24px; background: #fef7e0; border-bottom: 1px solid #f9d77e; color: #5f4200; font-size: 13px; }
.audit-intro { padding: 12px 16px; background: #e6eef7; border: 1px solid #c3d4e8; border-radius: 8px; color: #013a71; font-size: 13px; margin-bottom: 8px; }
.audit-group { margin: 20px 0 8px; font-size: 15px; color: var(--text); }
.audit-count { margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #f1f3f4; color: var(--text-soft); font-size: 12px; font-weight: 500; }
.audit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.audit-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #dadce0; border-radius: 10px; background: #fff; }
.audit-card-info { flex: 1; min-width: 0; }
.audit-card-name { font-size: 14px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-card-role { font-size: 12px; color: var(--text-soft); }

/* ================= Glassmorphism layer =================
   Every card, panel and surface is frosted glass over the blurred video background. */
:root {
  --glass: rgba(255, 255, 255, 0.34);
  --glass-strong: rgba(255, 255, 255, 0.52);
  --glass-soft: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.50);
  --glass-shadow: 0 8px 32px rgba(1, 30, 60, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --glass-blur: blur(22px) saturate(1.6);
}
.card, .stat-card, .login-card, .copyright-bar, .topbar, .sidebar, .tabs, .table-wrap,
.org-tree-manager, .org-node-card, .org-division-box, .audit-card, .audit-intro, .kpi-hero, .modal {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.card, .stat-card, .tabs, .table-wrap, .org-tree-manager, .kpi-hero { border-radius: 16px; }
.org-node-card, .org-division-box, .audit-card { border-radius: 14px; }
.login-card { border-radius: 28px; background: var(--glass-strong); }
.modal { border-radius: 20px; background: var(--glass-strong); }
.modal-backdrop { background: rgba(1, 30, 60, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sidebar { background: var(--glass); border-right: 1px solid var(--glass-border); border-radius: 0 20px 20px 0; }
.topbar { border-radius: 0 0 16px 16px; border-top: none; }
.copyright-bar { border-radius: 14px; background: var(--glass-strong); }
.kpi-hero { background: linear-gradient(135deg, rgba(1, 58, 113, 0.16), rgba(252, 190, 139, 0.30)), var(--glass); }
.hero-pill, .login-note, .audit-count, .badge-neutral, .check-toggle {
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
}
.login-note.warn { background: rgba(253, 238, 222, 0.7); }
.audit-banner { background: rgba(254, 247, 224, 0.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.org-member-row { background: var(--glass-soft); border: 1px solid var(--glass-border); }
.nav-item:hover { background: rgba(255, 255, 255, 0.55); }
.nav-item.active { background: rgba(1, 58, 113, 0.14); }
.tab-btn:hover { background: rgba(255, 255, 255, 0.45); }
th { background: rgba(255, 255, 255, 0.2); }
td { border-bottom-color: rgba(1, 58, 113, 0.10); }
tr:hover td { background: rgba(255, 255, 255, 0.45); }
.input, .select, .textarea { background: rgba(255, 255, 255, 0.40); border-color: rgba(1, 58, 113, 0.35); }
.input:focus, .select:focus, .textarea:focus { background: rgba(255, 255, 255, 0.9); }
.btn-secondary, .btn-emerald, .btn-danger { background: rgba(255, 255, 255, 0.38); border-color: var(--glass-border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.9); }
.btn-primary { box-shadow: 0 4px 14px rgba(1, 58, 113, 0.30); }
.progress-track { background: rgba(1, 58, 113, 0.12); }
.mobile-menu-btn:hover, .btn-ghost:hover { background: rgba(255, 255, 255, 0.5); }
.toast { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 12px; }
.toast.success { background: rgba(32, 33, 36, 0.88); }
.toast.error { background: rgba(179, 38, 30, 0.92); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .stat-card, .login-card, .copyright-bar, .topbar, .sidebar, .tabs, .table-wrap,
  .org-tree-manager, .org-node-card, .org-division-box, .audit-card, .audit-intro, .kpi-hero, .modal { background: rgba(255, 255, 255, 0.95); }
}/* Readability on glass: darker secondary text */
.stat-label, .card-desc, .stat-meta, .topbar-subtitle, .brand-sub, .form-label, .form-hint, th, .user-chip-role { color: #3c4043; }
.empty-state { color: #3c4043; }

/* ---------- Audio-only radio (the YouTube player itself is invisible) ---------- */
.radio-player { position: fixed; left: -400px; bottom: 0; width: 200px; height: 200px; opacity: 0; pointer-events: none; overflow: hidden; }
.radio-widget { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 60; width: 46px; height: 46px; }
.radio-orb {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--glass-border); padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; text-shadow: none;
  background: var(--primary); box-shadow: 0 6px 18px rgba(1, 30, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s, background 0.15s;
}
.radio-orb:hover { background: var(--primary-hover); transform: scale(1.06); }
.radio-orb:active { transform: scale(0.95); }
.radio-orb svg { width: 24px; height: 24px; fill: currentColor; }
.radio-widget.is-playing .radio-orb { animation: radioGlow 2s ease-in-out infinite; }
@keyframes radioGlow { 0%, 100% { box-shadow: 0 6px 18px rgba(1, 30, 60, 0.35), 0 0 0 0 rgba(252, 190, 139, 0.55); } 50% { box-shadow: 0 6px 18px rgba(1, 30, 60, 0.35), 0 0 0 9px rgba(252, 190, 139, 0); } }
/* The card opens on hover / keyboard focus; the wrapper bridges the gap so hover is not lost. */
.radio-panel-wrap { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding-top: 8px; display: none; }
.radio-widget:hover .radio-panel-wrap, .radio-widget:focus-within .radio-panel-wrap { display: block; }
.radio-panel {
  width: min(220px, calc(100vw - 24px)); padding: 10px 12px 6px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.78); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.radio-now { padding: 2px 6px 8px; }
.radio-now-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.radio-now-title { font-size: 13px; font-weight: 500; color: #111418; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-controls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 4px 8px; }
.radio-btn-main { width: 40px; height: 40px; background: var(--primary); color: #fff; }
.radio-btn-main:hover { background: var(--primary-hover); }
.radio-btn {
  width: 34px; height: 34px; flex-shrink: 0; border: none; border-radius: 50%; cursor: pointer; padding: 0;
  background: rgba(1, 58, 113, 0.10); color: var(--primary); display: inline-flex; align-items: center; justify-content: center;
}
.radio-btn:hover { background: rgba(1, 58, 113, 0.2); }
.radio-btn svg { width: 20px; height: 20px; fill: currentColor; }
.radio-volume { flex: 1; min-width: 0; accent-color: var(--primary); cursor: pointer; margin-left: 6px; }
.radio-menu { display: none !important; max-height: min(50vh, 300px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.radio-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; border-radius: 14px;
  background: transparent; cursor: pointer; text-align: left; color: #111418; font-size: 13px;
}
.radio-menu-item:hover { background: rgba(255, 255, 255, 0.85); }
.radio-menu-item.active { background: rgba(1, 58, 113, 0.14); }
.radio-menu-check { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); }
.radio-menu-check svg { width: 18px; height: 18px; fill: currentColor; }
.radio-menu-text { min-width: 0; display: flex; flex-direction: column; }
.radio-menu-text small { color: #2b3036; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1181px) {
  .topbar-left > div { max-width: calc(50vw - 335px); }
  .topbar-title, .topbar-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 1180px) {
  .radio-widget { top: auto; bottom: 14px; }
  .radio-panel-wrap { top: auto; bottom: 100%; padding-top: 0; padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .radio-widget.is-playing .radio-orb { animation: none; } }

/* ---------- Readability over the video: darker text, soft light halo, extra glass backing ---------- */
:root { --text: #0f1215; --text-muted: #21262b; --text-soft: #2c3238; --glass: rgba(255, 255, 255, 0.48); --glass-strong: rgba(255, 255, 255, 0.64); --glass-soft: rgba(255, 255, 255, 0.26); }
body { color: var(--text); }
.card, .stat-card, .login-card, .copyright-bar, .topbar, .sidebar, .tabs, .table-wrap, .org-tree-manager, .org-node-card,
.org-division-box, .audit-card, .audit-intro, .audit-banner, .kpi-hero, .modal, .org-member-row {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 1px 1px rgba(255, 255, 255, 0.55);
}
.stat-label, .card-desc, .stat-meta, .topbar-subtitle, .brand-sub, .form-label, .form-hint, th, .user-chip-role,
.audit-card-role, .empty-state, .nav-item, .tab-btn, td { color: #1d2227; }
.stat-label, .form-label, th { font-weight: 600; }
.audit-intro { color: #08294f; background: var(--glass-strong); }
/* Headings that sit directly on the video get their own frosted chip */
.audit-group {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; color: #0f1215;
  background: var(--glass-strong); border: 1px solid var(--glass-border); text-shadow: none;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow);
}
.audit-count { color: #08294f; }
.btn-primary, .toast, .radio-orb, .avatar, .badge { text-shadow: none; }
.input, .select, .textarea { color: #0f1215; text-shadow: none; }
.input::placeholder, .textarea::placeholder { color: #48515a; }

/* ---------- Project picker (checklist of registered projects) ---------- */
.project-picker { border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px; background: var(--glass-soft); }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.pp-opt { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pp-opt:hover { background: rgba(255, 255, 255, 0.55); }
.pp-opt input { width: 16px; height: 16px; accent-color: var(--primary); }
.pp-toggle { margin-top: 6px; }
.pp-new { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.pp-new[hidden] { display: none; }
@media (max-width: 560px) { .pp-new { grid-template-columns: 1fr; } }

/* ---------- WhatsApp side panel ---------- */
.wa-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40;
  width: 44px; height: 54px; border: 0; border-radius: 14px 0 0 14px; cursor: pointer;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: -2px 4px 14px rgba(0, 0, 0, 0.25);
}
.wa-tab svg { width: 26px; height: 26px; fill: currentColor; }
.wa-tab.hidden { display: none; }
.wa-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 40; display: none; flex-direction: column;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-left: 1px solid var(--glass-border); box-shadow: -6px 0 24px rgba(1, 30, 60, 0.18);
}
.wa-panel.open { display: flex; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--glass-border); }
.wa-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.wa-head small { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-logo { width: 34px; height: 34px; border-radius: 10px; background: #25d366; color: #fff; display: grid; place-items: center; }
.wa-logo svg { width: 22px; height: 22px; fill: currentColor; }
.wa-close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--text); padding: 0 6px; }
.wa-body { padding: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.wa-body-frame { padding: 0; overflow: hidden; display: flex; }
.wa-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.wa-icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--text); display: grid; place-items: center; }
.wa-icon-btn:hover { background: rgba(255, 255, 255, 0.6); }
.wa-icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.wa-setup-lead { font-weight: 700; margin: 0 0 4px; }
.wa-steps { margin: 14px 0; padding-left: 20px; font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.wa-copy { border: 0; background: rgba(255, 255, 255, 0.65); border-radius: 6px; padding: 1px 7px; cursor: pointer; font: inherit; font-weight: 700; color: var(--primary); }
.wa-copy:hover { background: rgba(255, 255, 255, 0.95); }
.wa-open2 { width: 100%; }
a.wa-open { display: block; text-align: center; text-decoration: none; }
.wa-open { width: 100%; background: #128c7e; border-color: #128c7e; }
.wa-hint { font-size: 12px; color: var(--text-muted); margin: 8px 0 14px; line-height: 1.45; }
.wa-chat-row { display: flex; gap: 8px; }
.wa-chat-row .input { min-width: 0; flex: 1; }
.wa-recent-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wa-chip { border: 1px solid var(--glass-border); background: var(--glass-soft); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-weight: 600; }
.wa-chip:hover { background: rgba(255, 255, 255, 0.7); }
.wa-status { margin-top: 14px; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.wa-status.bad { color: #b3261e; font-weight: 600; }
@media (min-width: 1500px) { body.wa-docked #app { margin-right: 520px; } }
@media (max-width: 1499px) { .wa-panel { width: min(520px, 96vw); } }
