/* ========================================================
   SJDCA - Daily Cleaning Activity (UI/UX Pro Max - Light Glass)
   Crisp Frosted White Glass, Pastel Ambient Glow, Ergonomic Mobile UX
   (Font Geist + Geist Mono loaded via <link> in includes/header.php)
   ======================================================== */

:root {
  /* Ambient Light Background Mesh */
  --bg-base: #f1f5f9;
  --bg-mesh-1: rgba(186, 230, 253, 0.72);
  /* Soft Sky Blue */
  --bg-mesh-2: rgba(167, 243, 208, 0.62);
  /* Soft Mint Emerald */
  --bg-mesh-3: rgba(224, 231, 255, 0.58);
  /* Soft Lavender */
  --bg-mesh-4: rgba(254, 240, 138, 0.35);
  /* Soft Warm Glow */

  /* Light Frosted Glass Surfaces */
  --glass-bg: rgba(255, 255, 255, 0.76);
  --glass-bg-elevated: rgba(255, 255, 255, 0.90);
  --glass-bg-card: rgba(255, 255, 255, 0.80);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-hairline: rgba(15, 23, 42, 0.08);
  --glass-inner-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.98);
  --glass-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  --glass-shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --glass-blur: blur(20px) saturate(180%);

  /* Brand & Status Accents */
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --primary-glow: rgba(13, 148, 136, 0.28);
  --secondary: #0284c7;
  --emerald: #059669;
  --emerald-light: #d1fae5;
  --rose: #e11d48;
  --rose-light: #ffe4e6;
  --amber: #d97706;
  --amber-light: #fef3c7;

  /* Typography */
  --text-main: #0f172a;
  --text-body: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

code, kbd, samp, pre, .mono-code {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Tabular figures for operational numbers, timestamps, percentages, & codes */
.stat-val,
.stat-card .stat-val,
.kpi-val,
.badge,
.table-glass td,
.matrix-cell,
.time-pill,
.progress-counter,
.doc-no,
.timer-chip {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(at 0% 0%, var(--bg-mesh-1) 0px, transparent 52%),
    radial-gradient(at 100% 0%, var(--bg-mesh-2) 0px, transparent 52%),
    radial-gradient(at 50% 100%, var(--bg-mesh-3) 0px, transparent 58%),
    radial-gradient(at 100% 100%, var(--bg-mesh-4) 0px, transparent 42%);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 84px;
  /* Space for floating bottom dock */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Refined Typography Weight Balance (crisper small labels, pills & buttons on Windows/Android) */
.btn,
.chip-btn,
.badge,
.status-pill,
.task-code,
.admin-stat-pill,
.admin-tab-link,
.sidebar-link,
label {
  font-weight: 600;
}
h1, h2, h3, .card-title, .admin-hero-title {
  font-weight: 700;
  letter-spacing: -0.015em;
}

.svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Network Banners */
.network-banner {
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.network-banner.offline {
  background: rgba(254, 243, 199, 0.92);
  color: #92400e;
  border-bottom: 1px solid #f59e0b;
}

.network-banner.online {
  background: rgba(209, 250, 229, 0.92);
  color: #065f46;
  border-bottom: 1px solid #10b981;
}

/* Top Floating Glass Navbar */
.app-header {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-hairline);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.32);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.brand-text h1 {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(90deg, #0f766e, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.header-nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-link-pill:hover {
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary-dark);
}

.nav-link-pill.active {
  background: rgba(13, 148, 136, 0.14);
  color: var(--primary-dark);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 30px;
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  border: 1px solid rgba(13, 148, 136, 0.22);
  font-weight: 700;
}

.offline-sync-pill {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 30px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  cursor: pointer;
}

.offline-sync-pill.visible {
  display: inline-flex;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e11d48;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(244, 63, 94, 0.22);
  background: rgba(255, 255, 255, 0.85);
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #ffe4e6;
  color: #be123c;
}

/* Main Container */
.container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 20px 16px;
  flex: 1;
}

/* Crisp Frosted White Glass Cards */
.card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hairline);
  box-shadow: var(--glass-shadow), var(--glass-inner-shadow);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Radiant Location Hero Banner */
.location-hero {
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.26);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.location-hero::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.location-hero h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 6px 0 2px;
}

.location-hero .sub {
  font-size: 0.9rem;
  color: #e0f2fe;
  margin-bottom: 16px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: #f0fdfa;
}

.meta-item strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

/* Segmented Control (1-Tap Shift Pill) */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(241, 245, 249, 0.95);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--glass-hairline);
}

.segment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9px 6px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-align: center;
  min-height: 44px;
}

.segment-btn input[type="radio"] {
  display: none;
}

.segment-btn small {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.8;
}

.segment-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.25);
}

/* Scope Status Badges */
.category-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.22);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-num {
  background: #0d9488;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.78rem;
}

.scope-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  white-space: nowrap;
}

.scope-badge.has-issue {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* Task Rows & Ergonomic 3-State Toggle Group (44px+ Touch Target) */
.task-row {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.task-row:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(13, 148, 136, 0.45);
}

.task-row.is-issue {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(255, 241, 242, 0.75);
}

.task-desc {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.task-code {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
  border: 1px solid rgba(13, 148, 136, 0.24);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

.toggle-group {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.toggle-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 8px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  transition: all 0.18s ease;
}

.toggle-btn input[type="radio"] {
  display: none;
}

.toggle-btn:active {
  transform: scale(0.97);
}

.toggle-btn.btn-done.active {
  background: #dcfce7;
  color: #15803d;
  border-color: #22c55e;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.22);
}

.toggle-btn.btn-notdone.active {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #ef4444;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.22);
}

.toggle-btn.btn-na.active {
  background: #e2e8f0;
  color: #334155;
  border-color: #94a3b8;
}

/* Sticky Progress & Submit Bar (Checklist) */
.sticky-submit-bar {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 988px;
  background: var(--glass-bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hairline);
  box-shadow: var(--glass-shadow-lg), var(--glass-inner-shadow);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 90;
}

.progress-meta {
  flex: 1;
  min-width: 140px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 5px;
}

.progress-track {
  width: 100%;
  height: 7px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #0d9488, #10b981);
  border-radius: 10px;
  transition: width 0.25s ease;
}

/* Floating Bottom Navigation Dock */
.bottom-dock {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 540px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hairline);
  box-shadow: var(--glass-shadow-lg), var(--glass-inner-shadow);
  border-radius: 20px;
  padding: 6px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 150;
}

.dock-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s;
  min-height: 46px;
}

.dock-item:hover {
  color: var(--primary-dark);
}

.dock-item.active {
  background: rgba(13, 148, 136, 0.14);
  color: var(--primary-dark);
}

/* Quick Filter Chips */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-body);
  border: 1px solid var(--glass-hairline);
  transition: all 0.2s;
}

.chip-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
}

.chip-btn.active {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Shift Coverage Matrix */
.matrix-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 78px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.matrix-badge.done {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.matrix-badge.issue {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.matrix-badge.pending {
  background: rgba(241, 245, 249, 0.9);
  color: var(--text-dim);
  border: 1px dashed #cbd5e1;
}

/* Camera Scanner */
.scanner-card {
  text-align: center;
  padding: 28px 18px;
}

.scanner-viewport {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 310px;
  margin: 0 auto 18px;
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 14px 36px rgba(13, 148, 136, 0.24);
}

.scanner-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-guide {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border: 3px solid #10b981;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.55);
  pointer-events: none;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #34d399, transparent);
  box-shadow: 0 0 14px #34d399;
  animation: scanAnim 2.2s infinite ease-in-out;
}

@keyframes scanAnim {
  0% {
    top: 0%;
    opacity: 0.4;
  }

  50% {
    top: 98%;
    opacity: 1;
  }

  100% {
    top: 0%;
    opacity: 0.4;
  }
}

/* Light Glass Form Inputs */
input[type="text"],
input[type="password"],
input[type="time"],
input[type="date"],
input[type="number"],
select,
textarea {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--text-main) !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 42px;
  transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18) !important;
  background: #ffffff !important;
}

/* Cause Code Alert Box */
.cause-code-box {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 0.8rem;
  display: none;
}

.cause-code-box.visible {
  display: block;
  animation: fadeIn 0.2s ease-in;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-body);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.btn-secondary:hover {
  background: #ffffff;
  color: var(--text-main);
  border-color: rgba(15, 23, 42, 0.22);
}

.btn-block {
  width: 100%;
}

/* Summary Box */
.summary-box {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow), var(--glass-inner-shadow);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.summary-metric {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  text-align: center;
}

.summary-metric .val {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f766e;
}

.summary-metric .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Signature Canvas */
.signature-wrapper {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  position: relative;
  margin-bottom: 12px;
  overflow: hidden;
}

.signature-canvas {
  width: 100%;
  height: 170px;
  display: block;
  touch-action: none;
}

.signature-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Data Tables & Mobile Cards */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  color: var(--text-body);
}

.data-table th,
.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  text-align: left;
}

.data-table th {
  background: rgba(241, 245, 249, 0.85);
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.data-table tr:hover td {
  background: rgba(248, 250, 252, 0.7);
}

.mobile-card-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.mobile-sub-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--glass-hairline);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.status-pill.completed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-pill.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-pill.verified,
.status-pill.verified_dvo1,
.status-pill.verified_dvo2 {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.status-pill.flagged {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* Glass Toast Notifications */
.toast-container {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  width: calc(100% - 32px);
  pointer-events: none;
}

.glass-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hairline);
  box-shadow: var(--glass-shadow-lg);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  animation: toastIn 0.25s ease-out;
}

.glass-toast.success {
  border-left: 4px solid #10b981;
}

.glass-toast.warning {
  border-left: 4px solid #f59e0b;
}

.glass-toast.danger {
  border-left: 4px solid #e11d48;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }

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

/* Responsive Breakpoints */
@media (min-width: 769px) {
  .bottom-dock {
    display: none;
  }

  body {
    padding-bottom: 24px;
  }

  .sticky-submit-bar {
    bottom: 16px;
  }
}

@media (max-width: 768px) {
  .header-nav-desktop {
    display: none;
  }

  .user-badge .role-label {
    display: none;
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 10px 14px;
  }

  .container {
    padding: 12px 10px;
  }

  .card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .location-hero {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .location-hero h2 {
    font-size: 1.18rem;
  }

  .toggle-btn {
    padding: 8px 4px;
    font-size: 0.78rem;
  }

  .desktop-table-wrap {
    display: none;
  }

  .mobile-card-list {
    display: flex;
  }
}

/* A4 Print Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  .app-header,
  .app-sidebar,
  .sidebar-backdrop,
  footer,
  .bottom-dock,
  .sticky-submit-bar,
  .no-print,
  .btn,
  .toast-container {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card,
  .location-hero,
  .summary-box {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    backdrop-filter: none !important;
    page-break-inside: avoid;
  }

  .location-hero h2,
  .location-hero .sub,
  .meta-item,
  .meta-item strong {
    color: #000000 !important;
  }

  .meta-item {
    border: 1px solid #cbd5e1 !important;
  }
}

/* ========================================================
   Responsive Frosted Glass Sidebar & Mobile Drawer
   ======================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 256px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-hairline);
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.06), var(--glass-inner-shadow);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: width 0.22s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-hairline);
  gap: 10px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-dim);
  padding: 10px 10px 4px;
  white-space: nowrap;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-body);
  transition: all 0.18s ease;
  white-space: nowrap;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary-dark);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.16), rgba(2, 132, 199, 0.10));
  color: var(--primary-dark);
  border: 1px solid rgba(13, 148, 136, 0.22);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.10);
}

.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--glass-hairline);
  background: rgba(248, 250, 252, 0.65);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-main {
  flex: 1;
  margin-left: 256px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.22s ease;
}

.app-main .container {
  max-width: 1220px;
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--glass-hairline);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  z-index: 250;
}

.sidebar-backdrop.visible {
  display: block;
}

/* Desktop Collapsed Rail */
@media (min-width: 960px) {
  body.sidebar-collapsed .app-sidebar {
    width: 76px;
  }

  body.sidebar-collapsed .app-main {
    margin-left: 76px;
  }

  body.sidebar-collapsed .sidebar-text,
  body.sidebar-collapsed .sidebar-section-label,
  body.sidebar-collapsed .sidebar-user-meta {
    display: none;
  }

  body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 14px 8px;
  }

  body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 11px;
  }

  body.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    padding: 4px;
  }

  body.sidebar-collapsed .sticky-submit-bar {
    left: calc(50% + 38px);
    max-width: calc(100% - 108px);
  }

  body:not(.sidebar-collapsed) .sticky-submit-bar {
    left: calc(50% + 128px);
    max-width: calc(100% - 290px);
  }
}

/* Mobile Drawer Mode (< 960px) */
@media (max-width: 959px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

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

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

/* ========================================================
   Photo Evidence Uploader, Gallery & Lightbox Modal
   ======================================================== */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.photo-thumb-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.photo-thumb-img-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  background: #e2e8f0;
}

.photo-thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-size-pill {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
}

.photo-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(225, 29, 72, 0.9);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.photo-thumb-meta {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-thumb-meta select,
.photo-thumb-meta input {
  width: 100%;
  font-size: 0.76rem;
  padding: 5px 8px;
  min-height: 30px;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.photo-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-hairline);
  background: rgba(255, 255, 255, 0.85);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.photo-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

.photo-gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.photo-gallery-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
}

.photo-gallery-caption {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-body);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--glass-hairline);
}

/* Lightbox Modal */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-lightbox.open {
  display: flex;
}

.photo-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  background: #0f172a;
}

.photo-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: #e11d48;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-caption {
  margin-top: 10px;
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

/* Photo Gallery Card Wrapper (for Admin edit controls) */
.photo-gallery-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-hairline);
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
}

.photo-gallery-card .photo-gallery-item {
  border: none;
  border-radius: 0;
}

/* Live In-App Camera Capture Modal */
.live-cam-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.live-cam-modal.open {
  display: flex;
}

.live-cam-box {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.live-cam-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-hairline);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-main);
}

.live-cam-header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-cam-viewport {
  background: #0f172a;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 62vh;
  overflow: hidden;
}

.live-cam-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-cam-footer {
  padding: 14px 16px;
  display: flex;
  justify-content: center;
  background: rgba(248, 250, 252, 0.95);
  border-top: 1px solid var(--glass-hairline);
}

.live-cam-shutter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
}

.live-cam-shutter:active {
  transform: scale(0.96);
}

/* Per-Scope Photo Evidence Box inside Checklist */
.scope-photo-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.78);
  border: 1.5px dashed rgba(13, 148, 136, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.scope-photo-box.scope-photo-error {
  border-color: #e11d48;
  background: rgba(255, 228, 230, 0.45);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.16);
}

.scope-photo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================================
   UI/UX Pro Max Polish (Topbar, KPIs, Sticky Matrix, Collapsible Scopes)
   ======================================================== */
.topbar-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.22);
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .topbar-shift-pill {
    display: none;
  }
}

.kpi-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

.kpi-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-mini-bar {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-top: 6px;
}

.kpi-mini-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.matrix-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.04);
}

.checklist-category.scope-collapsed .task-row,
.checklist-category.scope-collapsed .scope-photo-box,
.checklist-category.scope-collapsed > p {
  display: none;
}

.checklist-category .category-title::after {
  content: '\25BE';
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 8px;
  transition: transform 0.18s ease;
}

.checklist-category.scope-collapsed .category-title::after {
  transform: rotate(-90deg);
}

.cleaner-loc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow) !important;
}

.btn:active {
  transform: scale(0.98);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
}

/* ========================================================
   Animated Submit Success Logo Overlay
   ======================================================== */
.submit-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay 0.25s ease forwards;
}

.submit-success-overlay.closing {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submit-success-card {
  width: 100%;
  max-width: 390px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  border-radius: 26px;
  padding: 34px 26px 28px;
  text-align: center;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.28);
  animation: cardPopUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.success-logo-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 26px;
  border-radius: 20px;
  background: rgba(240, 253, 250, 0.9);
  border: 1px solid rgba(13, 148, 136, 0.18);
}

.success-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  border: 2px solid rgba(16, 185, 129, 0.45);
  animation: pulseRingOut 1.4s ease-out infinite;
  pointer-events: none;
}

.success-anim-logo {
  max-width: 185px;
  width: 100%;
  height: auto;
  display: block;
  animation: logoBounceIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-check-badge {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.35);
  animation: badgeScaleIn 0.4s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-check-path {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  animation: checkStrokeDraw 0.45s 0.45s ease forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cardPopUp {
  from { opacity: 0; transform: translateY(22px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoBounceIn {
  0% { opacity: 0; transform: scale(0.75); }
  70% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes badgeScaleIn {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes checkStrokeDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes pulseRingOut {
  0% { transform: scale(0.98); opacity: 0.75; }
  100% { transform: scale(1.1); opacity: 0; }
}





/* ========================================================
   Photo Evidence Uploader, Gallery & Lightbox Modal
   ======================================================== */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.photo-thumb-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.photo-thumb-img-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  background: #e2e8f0;
}

.photo-thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-size-pill {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
}

.photo-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(225, 29, 72, 0.9);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.photo-thumb-meta {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-thumb-meta select,
.photo-thumb-meta input {
  width: 100%;
  font-size: 0.76rem;
  padding: 5px 8px;
  min-height: 30px;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.photo-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-hairline);
  background: rgba(255, 255, 255, 0.85);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.photo-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

.photo-gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.photo-gallery-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
}

.photo-gallery-caption {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-body);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--glass-hairline);
}

/* Lightbox Modal */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-lightbox.open {
  display: flex;
}

.photo-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  background: #0f172a;
}

.photo-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: #e11d48;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-caption {
  margin-top: 10px;
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

/* Photo Gallery Card Wrapper (for Admin edit controls) */
.photo-gallery-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-hairline);
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
}

.photo-gallery-card .photo-gallery-item {
  border: none;
  border-radius: 0;
}

/* Live In-App Camera Capture Modal */
.live-cam-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.live-cam-modal.open {
  display: flex;
}

.live-cam-box {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.live-cam-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-hairline);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-main);
}

.live-cam-header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-cam-viewport {
  background: #0f172a;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 62vh;
  overflow: hidden;
}

.live-cam-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-cam-footer {
  padding: 14px 16px;
  display: flex;
  justify-content: center;
  background: rgba(248, 250, 252, 0.95);
  border-top: 1px solid var(--glass-hairline);
}

.live-cam-shutter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
}

.live-cam-shutter:active {
  transform: scale(0.96);
}

/* Per-Scope Photo Evidence Box inside Checklist */
.scope-photo-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.78);
  border: 1.5px dashed rgba(13, 148, 136, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.scope-photo-box.scope-photo-error {
  border-color: #e11d48;
  background: rgba(255, 228, 230, 0.45);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.16);
}

.scope-photo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================================
   UI/UX Pro Max Polish (Topbar, KPIs, Sticky Matrix, Collapsible Scopes)
   ======================================================== */
.topbar-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.22);
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .topbar-shift-pill {
    display: none;
  }
}

.kpi-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

.kpi-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-mini-bar {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-top: 6px;
}

.kpi-mini-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.matrix-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.04);
}

.checklist-category.scope-collapsed .task-row,
.checklist-category.scope-collapsed .scope-photo-box,
.checklist-category.scope-collapsed > p {
  display: none;
}

.checklist-category .category-title::after {
  content: '\25BE';
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 8px;
  transition: transform 0.18s ease;
}

.checklist-category.scope-collapsed .category-title::after {
  transform: rotate(-90deg);
}

.cleaner-loc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow) !important;
}

.btn:active {
  transform: scale(0.98);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
}

/* ========================================================
   Animated Submit Success Logo Overlay
   ======================================================== */
.submit-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay 0.25s ease forwards;
}

.submit-success-overlay.closing {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submit-success-card {
  width: 100%;
  max-width: 390px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  border-radius: 26px;
  padding: 34px 26px 28px;
  text-align: center;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.28);
  animation: cardPopUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.success-logo-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 26px;
  border-radius: 20px;
  background: rgba(240, 253, 250, 0.9);
  border: 1px solid rgba(13, 148, 136, 0.18);
}

.success-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  border: 2px solid rgba(16, 185, 129, 0.45);
  animation: pulseRingOut 1.4s ease-out infinite;
  pointer-events: none;
}

.success-anim-logo {
  max-width: 185px;
  width: 100%;
  height: auto;
  display: block;
  animation: logoBounceIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-check-badge {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.35);
  animation: badgeScaleIn 0.4s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-check-path {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  animation: checkStrokeDraw 0.45s 0.45s ease forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cardPopUp {
  from { opacity: 0; transform: translateY(22px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoBounceIn {
  0% { opacity: 0; transform: scale(0.75); }
  70% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes badgeScaleIn {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes checkStrokeDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes pulseRingOut {
  0% { transform: scale(0.98); opacity: 0.75; }
  100% { transform: scale(1.1); opacity: 0; }
}






/* ========================================================
   SJDCA Global Upgraded UI Design System (All Modules)
   1. Unified Institution Brand Theme (--primary / --primary-dark)
   2. Action Button Hierarchy (Primary / Secondary / Tertiary)
   3. Snappy Timings & Micro-Interactions
   4. Flattened Surfaces & Crisp Status Pills
   5. Global 2-Stage Upload Progress Bar & Photo Lightbox
   ======================================================== */
:root {
  --ease-snappy: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 170ms;
  --dur-med: 220ms;
  --accent-soft: color-mix(in srgb, var(--primary, #0d9488) 11%, transparent);
  --accent-soft-hover: color-mix(in srgb, var(--primary, #0d9488) 17%, transparent);
  --accent-border: color-mix(in srgb, var(--primary, #0d9488) 28%, transparent);
  --accent-glow: color-mix(in srgb, var(--primary, #0d9488) 26%, transparent);
}

/* 1. Unified Brand Accents (No Indigo vs Teal Clash) */
.brand-logo {
  box-shadow: 0 4px 14px var(--accent-glow);
}
.location-hero {
  box-shadow: 0 14px 32px var(--accent-glow);
}
.task-code,
.scope-badge {
  background: var(--accent-soft);
  color: var(--primary-dark, #0f766e);
  border: 1px solid var(--accent-border);
}
.category-title {
  border-color: var(--accent-border);
  background: color-mix(in srgb, var(--primary, #0d9488) 7%, rgba(255, 255, 255, 0.88));
}
.category-title-left {
  color: var(--primary-dark, #0f766e);
}
.chip-btn {
  transition: all var(--dur-fast) var(--ease-snappy);
}
.chip-btn.active {
  background: linear-gradient(135deg, var(--primary, #0d9488), var(--primary-dark, #0f766e));
  border-color: var(--primary, #0d9488);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.progress-fill {
  background: linear-gradient(90deg, var(--primary, #0d9488), #10b981);
  transition: width var(--dur-med) var(--ease-snappy);
}
.dock-item.active {
  color: var(--primary-dark, #0f766e);
  background: var(--accent-soft);
}
.sidebar-link:hover {
  background: var(--accent-soft);
}
.sidebar-link.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #0d9488) 12%, transparent);
}
.live-cam-shutter {
  background: linear-gradient(135deg, var(--primary, #0d9488), var(--primary-dark, #0f766e));
  box-shadow: 0 8px 20px var(--accent-glow);
}
.scope-photo-box {
  border: 1.5px dashed var(--accent-border);
  background: color-mix(in srgb, var(--primary, #0d9488) 4%, #f8fafc);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary, #0d9488) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

/* 2. Clear Action Button Hierarchy */
.btn {
  transition: transform var(--dur-fast) var(--ease-snappy),
              box-shadow var(--dur-fast) var(--ease-snappy),
              background var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}
.btn:active,
.chip-btn:active,
.toggle-btn:active,
.dock-item:active {
  transform: scale(0.97);
}
.btn-primary {
  box-shadow: 0 6px 16px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 9px 22px color-mix(in srgb, var(--primary, #0d9488) 36%, transparent);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark, #0f766e);
  border: 1.5px solid var(--accent-border);
}
.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--primary, #0d9488);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-snappy);
}
.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-main);
}

/* 3. Snappy Card & Photo Micro-Interactions */
.card {
  transition: box-shadow var(--dur-fast) var(--ease-snappy), border-color var(--dur-fast) ease;
}
.task-row:hover {
  border-color: var(--accent-border);
}
.photo-thumb-img-wrap img {
  cursor: zoom-in;
  transition: transform var(--dur-fast) var(--ease-snappy);
}
.photo-thumb-img-wrap img:hover {
  transform: scale(1.03);
}
.photo-thumb-card {
  animation: sjdcaPopIn var(--dur-med) var(--ease-snappy);
}
@keyframes sjdcaPopIn {
  0% { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

/* 4. Global Stage-A Per-Photo Compression Shimmer Card */
.sjdca-photo-uploading {
  border-radius: 10px;
  border: 1px solid var(--accent-border);
  background: linear-gradient(110deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: sjdcaShimmer 1.05s linear infinite;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 7px;
}
.sjdca-photo-uploading-label {
  font-size: 0.69rem;
  font-weight: 800;
  color: var(--primary-dark, #0f766e);
}
.sjdca-photo-uploading-track {
  width: 82%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}
.sjdca-photo-uploading-fill {
  height: 100%;
  width: 15%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary, #0d9488), #10b981);
  transition: width 140ms var(--ease-snappy);
}
@keyframes sjdcaShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 5. Global Stage-B Real-Time Upload Progress Modal */
.sjdca-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sjdca-upload-modal.open {
  display: flex;
  animation: sjdcaPopIn var(--dur-fast) var(--ease-snappy);
}
.sjdca-upload-box {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  text-align: center;
}
.sjdca-upload-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--primary, #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-med) var(--ease-snappy);
}
.sjdca-upload-icon.done {
  background: #dcfce7;
  color: #16a34a;
  transform: scale(1.08);
}
.sjdca-upload-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.sjdca-upload-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}
.sjdca-upload-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}
.sjdca-upload-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background-color: var(--primary, #0d9488);
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.24) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.24) 75%,
    transparent 75%,
    transparent
  );
  background-size: 28px 28px;
  animation: sjdcaStripes 0.75s linear infinite;
  transition: width 180ms var(--ease-snappy), background-color 220ms ease;
}
.sjdca-upload-bar.done {
  background-color: #16a34a;
  animation: none;
}
@keyframes sjdcaStripes {
  0% { background-position: 0 0; }
  100% { background-position: 28px 0; }
}
.sjdca-upload-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-body);
}

/* Global Tap-to-Zoom Photo Lightbox */
.sjdca-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(6px);
  z-index: 330;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sjdca-lightbox.open {
  display: flex;
  animation: sjdcaPopIn var(--dur-fast) var(--ease-snappy);
}
.sjdca-lightbox img {
  max-width: 94vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  object-fit: contain;
}
.sjdca-lightbox-caption {
  color: #f8fafc;
  font-size: 0.86rem;
  font-weight: 700;
  margin-top: 12px;
  text-align: center;
}
.sjdca-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}


/* ========================================================
   Global 5-Second Pop-Up Flash Notification Toast
   ======================================================== */
.sjdca-flash-pop {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  width: min(520px, calc(100% - 28px));
  border-radius: 14px;
  padding: 13px 16px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.87rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: sjdcaFlashPopIn 280ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sjdca-flash-pop.is-closing {
  animation: sjdcaFlashPopOut 240ms cubic-bezier(0.4, 0, 1, 1) forwards;
}
.sjdca-flash-pop.flash-success {
  background: rgba(240, 253, 244, 0.96);
  color: #15803d;
  border: 1.5px solid #86efac;
}
.sjdca-flash-pop.flash-danger {
  background: rgba(254, 242, 242, 0.96);
  color: #b91c1c;
  border: 1.5px solid #fca5a5;
}
.sjdca-flash-pop.flash-warning {
  background: rgba(255, 251, 235, 0.96);
  color: #92400e;
  border: 1.5px solid #fcd34d;
}
.sjdca-flash-pop.flash-info {
  background: rgba(238, 242, 255, 0.96);
  color: var(--primary-dark, #1d4ed8);
  border: 1.5px solid var(--accent-border, #93c5fd);
}
.sjdca-flash-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.65;
  font-size: 1.15rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.sjdca-flash-close:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.06);
}
.sjdca-flash-timer {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3.5px;
  width: 100%;
  background: currentColor;
  opacity: 0.45;
  transform-origin: left center;
  animation: sjdcaFlashCountdown 5s linear forwards;
}
.sjdca-flash-pop:hover .sjdca-flash-timer {
  animation-play-state: paused;
}
@keyframes sjdcaFlashPopIn {
  0% { opacity: 0; transform: translate(-50%, -22px) scale(0.92); }
  70% { opacity: 1; transform: translate(-50%, 3px) scale(1.01); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes sjdcaFlashPopOut {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -16px) scale(0.94); }
}
@keyframes sjdcaFlashCountdown {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* ========================================================
   Upgraded Menu Bar: Collapsible Admin Group, Badges & Mobile QR Dock
   ======================================================== */
.sidebar-admin-group {
  margin-top: 6px;
}
.sidebar-admin-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  padding: 6px 10px;
  transition: background 160ms ease;
}
.sidebar-admin-summary::-webkit-details-marker {
  display: none;
}
.sidebar-admin-summary:hover {
  background: rgba(15, 23, 42, 0.05);
}
.sidebar-admin-chev {
  font-size: 0.72rem;
  transition: transform 200ms ease;
  opacity: 0.7;
}
.sidebar-admin-group[open] .sidebar-admin-chev {
  transform: rotate(180deg);
}

/* Sticky Table Headers & Subtle Row Hover Polish */
.table-responsive {
  max-height: 74vh;
  overflow: auto;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5f9;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}
.data-table tbody tr {
  transition: background 140ms ease;
}
.data-table tbody tr:hover td {
  background: rgba(13, 148, 136, 0.045);
}

/* Live Offline Network Banner */
.sjdca-net-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 18500;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  padding: 8px 14px;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  transform: translateY(-110%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.sjdca-net-banner.visible {
  transform: translateY(0);
  pointer-events: auto;
}

/* ========================================================
   Global 60fps Motion Design System (Tasteful & Native-Feel)
   1. Top Slim Progress Bar  2. Staggered Fade-Up  3. Pop-In
   4. Tactile Spring Press   5. Smooth Modals      6. Live Pulse
   ======================================================== */
.sjdca-top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 99999;
  background: linear-gradient(90deg, var(--primary, #0d9488), #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.sjdca-top-progress.active {
  opacity: 1;
}

@keyframes sjdcaFadeUp {
  from { opacity: 0; transform: translateY(11px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sjdcaPopIn {
  0%   { opacity: 0; transform: scale(0.76); }
  68%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes sjdcaBellPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes sjdcaLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sjdca-reveal {
  animation: sjdcaFadeUp 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--sjdca-stagger, 0ms);
}
.sjdca-pop-in {
  animation: sjdcaPopIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Tactile Spring Press on Buttons, Chips & Bottom Dock */
.btn,
.chip-btn,
.dock-item,
.dock-qr-fab,
.admin-tab-link {
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}
.btn:active,
.chip-btn:active,
.dock-item:active,
.admin-tab-link:active {
  transform: scale(0.96);
}
.dock-qr-fab:active {
  transform: scale(0.91);
}

/* Smooth Spring Entrance for Modals & Notification Dropdown */
.admin-modal-backdrop.open .admin-modal,
.live-cam-modal.open .live-cam-box {
  animation: sjdcaFadeUp 230ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mgr-bell-menu.is-open {
  animation: sjdcaFadeUp 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Live Breathing Pulse on Active Bell & Live Status Pills */
.bell-count-badge {
  animation: sjdcaBellPulse 2.1s infinite;
}
.admin-stat-pill.is-ok::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: sjdcaLivePulse 2.2s infinite;
}

/* Respect User Accessibility Preference */
@media (prefers-reduced-motion: reduce) {
  .sjdca-reveal,
  .sjdca-pop-in,
  .bell-count-badge,
  .admin-stat-pill.is-ok::before,
  .admin-modal-backdrop.open .admin-modal,
  .live-cam-modal.open .live-cam-box,
  .mgr-bell-menu.is-open {
    animation: none !important;
  }
  .sjdca-top-progress {
    transition: none !important;
  }
}
.sidebar-admin-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.sidebar-dot-alert {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
  margin-left: auto;
}
.sidebar-badge-pill {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-admin-summary {
  justify-content: center;
  padding: 6px 4px;
}
body.sidebar-collapsed .sidebar-badge-pill {
  display: none;
}

/* Elevated Center QR Button in Mobile Bottom Dock */
.dock-qr-wrap {
  position: relative;
  margin-top: -18px;
}
.dock-qr-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.96);
  margin-bottom: 2px;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dock-qr-wrap:active .dock-qr-fab {
  transform: scale(0.93);
}

/* ========================================================
   60fps Menu Bar Micro-Animations (Sidebar, Bell, Bottom Dock)
   ======================================================== */
.app-sidebar {
  transition: width 260ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 260ms ease !important;
}
.sidebar-backdrop {
  transition: opacity 240ms ease, visibility 240ms ease !important;
}
.sidebar-text {
  transition: opacity 180ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body.sidebar-collapsed .sidebar-text {
  opacity: 0;
  transform: translateX(-6px);
}

/* Hover Glide + Icon Pop + Tactile Press */
.sidebar-link {
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
              background-color 180ms ease,
              color 180ms ease,
              box-shadow 200ms ease,
              border-color 180ms ease !important;
}
.sidebar-link svg {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.sidebar-link:hover {
  transform: translateX(3px);
}
.sidebar-link:hover svg {
  transform: scale(1.1);
}
.sidebar-link:active {
  transform: translateX(1px) scale(0.97);
}
body.sidebar-collapsed .sidebar-link:hover {
  transform: scale(1.06);
}

/* Mobile Drawer Staggered Link Cascade */
@media (max-width: 959px) {
  .app-sidebar.open .sidebar-nav > .sidebar-link,
  .app-sidebar.open .sidebar-admin-group {
    animation: sidebarLinkSlideIn 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .app-sidebar.open .sidebar-nav > *:nth-child(2) { animation-delay: 25ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(3) { animation-delay: 50ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(4) { animation-delay: 75ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(5) { animation-delay: 100ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(6) { animation-delay: 125ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(7) { animation-delay: 150ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(8) { animation-delay: 175ms; }
  .app-sidebar.open .sidebar-nav > *:nth-child(9) { animation-delay: 200ms; }
}
@keyframes sidebarLinkSlideIn {
  0%   { opacity: 0; transform: translateX(-14px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Collapsible Tetapan Admin Smooth Reveal */
.sidebar-admin-group[open] .sidebar-admin-links {
  animation: adminAccordionOpen 220ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top center;
}
@keyframes adminAccordionOpen {
  0%   { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Topbar Toggle Button Press + Notification Bell Wiggle & Pop-In Dropdown */
.sidebar-toggle-btn {
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}
.sidebar-toggle-btn:active {
  transform: scale(0.92);
}
.bell-has-alerts .bell-svg-icon {
  transform-origin: top center;
  animation: mgrBellWiggle 2.8s ease-in-out 0.6s 2;
}
@keyframes mgrBellWiggle {
  0%, 100% { transform: rotate(0deg); }
  8%  { transform: rotate(14deg); }
  16% { transform: rotate(-12deg); }
  24% { transform: rotate(9deg); }
  32% { transform: rotate(-6deg); }
  40% { transform: rotate(0deg); }
}
.mgr-bell-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 310px;
  max-width: 88vw;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  z-index: 90;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: top right;
  transform: translateY(-6px) scale(0.95);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), visibility 180ms ease;
}
.mgr-bell-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.mgr-bell-item {
  display: block;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: var(--text-main);
  transition: background-color 150ms ease, padding-left 160ms ease;
}
.mgr-bell-item:hover {
  background: rgba(15, 23, 42, 0.04);
  padding-left: 15px;
}

/* Mobile Bottom Dock Active Lift + Center QR Breathing Glow */
.dock-item {
  position: relative;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), color 180ms ease;
}
.dock-item svg {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dock-item.active:not(.dock-qr-wrap) svg {
  transform: translateY(-2px) scale(1.08);
}
.dock-item.active:not(.dock-qr-wrap)::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary, #0d9488);
  animation: dockPillPop 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dock-item:active {
  transform: scale(0.93);
}
@keyframes dockPillPop {
  0%   { width: 4px; opacity: 0; }
  100% { width: 22px; opacity: 1; }
}
.dock-qr-fab {
  animation: dockQrBreath 3.2s ease-in-out infinite;
}
@keyframes dockQrBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-2px) scale(1.03); }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .app-sidebar, .sidebar-backdrop, .sidebar-link, .sidebar-link svg,
  .mgr-bell-menu, .dock-item, .dock-qr-fab, .bell-has-alerts .bell-svg-icon {
    animation: none !important;
    transition: none !important;
  }
}

/* ========================================================
   Global Zoomable Photo Lightbox (Always Above All Modals)
   ======================================================== */
.sjdca-lightbox {
  z-index: 20000 !important;
}
.sjdca-lb-toolbar {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20010 !important;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sjdca-lb-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background 150ms ease, transform 140ms ease;
}
.sjdca-lb-btn:hover {
  background: rgba(30, 41, 59, 0.98);
}
.sjdca-lb-btn:active {
  transform: scale(0.94);
}

/* High-Visibility Highlighted "Tutup" Buttons Across All Modals & Lightboxes */
.sjdca-lb-close-btn,
.live-cam-header .btn-danger,
.photo-lightbox-close {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.92) !important;
  border-radius: 999px !important;
  padding: 6px 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55) !important;
  cursor: pointer;
}
.sjdca-lb-close-btn:hover,
.live-cam-header .btn-danger:hover,
.photo-lightbox-close:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.7) !important;
}
.sjdca-lb-stage {
  width: 100%;
  height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.sjdca-lb-stage img {
  max-width: 94vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  object-fit: contain;
  transition: transform 140ms ease-out;
  user-select: none;
  -webkit-user-drag: none;
}
#dash-tc-photos img,
#tc-pg-grid img,
.photo-gallery-item img {
  cursor: zoom-in;
}

/* ========================================================
   Modern Admin UI/UX System (Hero, Tabs, Toggle Switches,
   Setting Rows, User Avatars & Reset Password Modal)
   ======================================================== */
.admin-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.88));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 28px -14px rgba(15, 23, 42, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.admin-hero-title {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  letter-spacing: -0.01em;
}
.admin-hero-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.admin-hero-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.admin-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.05);
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.admin-stat-pill.is-ok {
  background: rgba(16, 185, 129, 0.11);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.24);
}
.admin-stat-pill.is-warn {
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.28);
}
.admin-stat-pill.is-info {
  background: rgba(2, 132, 199, 0.11);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.24);
}

/* Segmented Pill Tab Bar */
.admin-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  margin-bottom: 18px;
  box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.12);
}
.admin-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}
.admin-tab-link:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}
.admin-tab-link.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px -6px rgba(13, 148, 136, 0.55);
}
.admin-tab-count {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}
.admin-tab-link.active .admin-tab-count {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/* Animated Toggle Switch */
.admin-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.admin-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 200ms ease, box-shadow 200ms ease;
}
.admin-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.22);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-switch input:checked + .admin-switch-track {
  background: var(--primary);
}
.admin-switch input:checked + .admin-switch-track::after {
  transform: translateX(20px);
}
.admin-switch input:focus-visible + .admin-switch-track {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.28);
}

/* Scannable Setting Rows */
.admin-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.07);
  transition: border-color 160ms ease, background 160ms ease;
}
.admin-setting-row:hover {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
}
.admin-setting-info {
  flex: 1;
  min-width: 0;
}
.admin-setting-title {
  font-size: 0.83rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.admin-setting-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.38;
}

/* User Avatar & Clean Identity Cell */
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 8px -3px rgba(15, 23, 42, 0.28);
}
.admin-user-name {
  font-weight: 800;
  font-size: 0.84rem;
  color: #0f172a;
  line-height: 1.25;
}
.admin-user-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Admin Modal (Password Reset) */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15000;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.admin-modal-backdrop.open {
  display: flex;
}
.admin-modal {
  width: 100%;
  max-width: 410px;
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.08);
  animation: cardPopUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (max-width: 640px) {
  .admin-hero {
    padding: 14px 15px;
  }
  .admin-tab-link {
    padding: 7px 11px;
    font-size: 0.75rem;
  }
  .admin-setting-row {
    padding: 10px 12px;
  }
}

/* High-Visibility "Tetapan Admin" Sidebar Section Button */
.sidebar-admin-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}
.sidebar-admin-summary {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px !important;
  margin: 0 0 6px !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.14), rgba(2, 132, 199, 0.12)) !important;
  border: 1.5px solid rgba(13, 148, 136, 0.34) !important;
  color: #0f766e !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 4px 12px -6px rgba(13, 148, 136, 0.35);
  transition: background 160ms ease, border-color 160ms ease, transform 140ms ease;
}
.sidebar-admin-summary::-webkit-details-marker {
  display: none;
}
.sidebar-admin-summary:hover {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.22), rgba(2, 132, 199, 0.18)) !important;
  border-color: rgba(13, 148, 136, 0.55) !important;
}
.sidebar-admin-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(13, 148, 136, 0.16);
  color: #0f766e;
  font-size: 0.75rem;
  transition: transform 180ms ease;
}
.sidebar-admin-group[open] .sidebar-admin-chev {
  transform: rotate(180deg);
}

/* Sticky Table Headers & Subtle Row Hover Polish */
.table-responsive {
  max-height: 74vh;
  overflow: auto;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5f9;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}
.data-table tbody tr {
  transition: background 140ms ease;
}
.data-table tbody tr:hover td {
  background: rgba(13, 148, 136, 0.045);
}

/* Live Offline Network Banner */
.sjdca-net-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 18500;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  padding: 8px 14px;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  transform: translateY(-110%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.sjdca-net-banner.visible {
  transform: translateY(0);
  pointer-events: auto;
}

/* ========================================================
   Global 60fps Motion Design System (Tasteful & Native-Feel)
   1. Top Slim Progress Bar  2. Staggered Fade-Up  3. Pop-In
   4. Tactile Spring Press   5. Smooth Modals      6. Live Pulse
   ======================================================== */
.sjdca-top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 99999;
  background: linear-gradient(90deg, var(--primary, #0d9488), #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.sjdca-top-progress.active {
  opacity: 1;
}

@keyframes sjdcaFadeUp {
  from { opacity: 0; transform: translateY(11px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sjdcaPopIn {
  0%   { opacity: 0; transform: scale(0.76); }
  68%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes sjdcaBellPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes sjdcaLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sjdca-reveal {
  animation: sjdcaFadeUp 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--sjdca-stagger, 0ms);
}
.sjdca-pop-in {
  animation: sjdcaPopIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Tactile Spring Press on Buttons, Chips & Bottom Dock */
.btn,
.chip-btn,
.dock-item,
.dock-qr-fab,
.admin-tab-link {
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}
.btn:active,
.chip-btn:active,
.dock-item:active,
.admin-tab-link:active {
  transform: scale(0.96);
}
.dock-qr-fab:active {
  transform: scale(0.91);
}

/* Smooth Spring Entrance for Modals & Notification Dropdown */
.admin-modal-backdrop.open .admin-modal,
.live-cam-modal.open .live-cam-box {
  animation: sjdcaFadeUp 230ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mgr-bell-menu.is-open {
  animation: sjdcaFadeUp 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Live Breathing Pulse on Active Bell & Live Status Pills */
.bell-count-badge {
  animation: sjdcaBellPulse 2.1s infinite;
}
.admin-stat-pill.is-ok::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: sjdcaLivePulse 2.2s infinite;
}

/* Respect User Accessibility Preference */
@media (prefers-reduced-motion: reduce) {
  .sjdca-reveal,
  .sjdca-pop-in,
  .bell-count-badge,
  .admin-stat-pill.is-ok::before,
  .admin-modal-backdrop.open .admin-modal,
  .live-cam-modal.open .live-cam-box,
  .mgr-bell-menu.is-open {
    animation: none !important;
  }
  .sjdca-top-progress {
    transition: none !important;
  }
}
