/* ============================================================
   Cloudfy / Family Guard — Modern SaaS Light Theme (AirDroid Style)
   ============================================================ */

:root {
  /* Color Palette — Clean SaaS Light Theme */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-hover: #e2e8f0;

  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #176B5F;

  --text-heading: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --primary: #176B5F;          /* Tentra Signature Teal */
  --primary-hover: #12564C;    /* Tentra Dark Teal */
  --primary-subtle: #F0FDF9;   /* Tentra Soft Teal 50 */
  --primary-border: #BCE3DE;   /* Tentra Teal Border 200 */

  --success: #059669;          /* Emerald 600 */
  --success-subtle: #ecfdf5;
  --success-border: #a7f3d0;

  --warning: #d97706;          /* Amber 600 */
  --warning-subtle: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;           /* Red 600 */
  --danger-subtle: #fef2f2;
  --danger-border: #fecaca;

  --indigo: #4f46e5;
  --indigo-subtle: #eef2ff;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-dropdown: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 270px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Master SaaS Layout */
.saas-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ============================================================
   1. Left Sidebar Navigation (AirDroid Style)
   ============================================================ */
.saas-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.02);
}

.sidebar-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: none;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading);
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Connected Device Selector Card */
.sidebar-device-box {
  padding: 16px 18px;
  margin: 14px 16px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.device-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.device-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.device-meta .device-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}

.device-meta .device-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.device-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-light);
}

.device-status-badge.connected {
  background: var(--success-subtle);
  border-color: var(--success-border);
  color: var(--success);
}

.device-status-badge.standby {
  background: var(--warning-subtle);
  border-color: var(--warning-border);
  color: var(--warning);
}

.device-status-badge.disconnected {
  background: var(--bg-surface-subtle);
  border-color: var(--border-light);
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-light);
  flex-shrink: 0;
}

.status-dot.connected {
  background-color: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
  animation: pulse-green 2s infinite;
}

.status-dot.standby {
  background-color: var(--warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.status-dot.disconnected {
  background-color: #cbd5e1;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.device-mini-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

/* Navigation Links */
.sidebar-nav {
  padding: 6px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 10px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.nav-item i {
  font-size: 1rem;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--bg-surface-subtle);
  color: var(--primary);
}

.nav-item:hover i {
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.nav-item.active i {
  color: var(--primary);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-apk-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.sidebar-apk-btn:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-border);
  color: var(--primary);
}

.sidebar-meta-text {
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
}

/* ============================================================
   2. Main Content Canvas & Tabbed Views
   ============================================================ */
.saas-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top App Header / Navbar with Global Device Selector (Matches Image 2) */
.saas-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  min-height: 65px;
}

/* Navbar Device Selector & Dropdown (Matches Image 2) */
.nav-device-selector {
  position: relative;
}

.nav-device-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.nav-device-trigger:hover {
  background: var(--bg-surface-subtle);
}

.nav-device-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-device-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-device-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-device-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

.nav-device-chevron {
  font-size: 0.68rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.nav-device-selector.open .nav-device-chevron {
  transform: rotate(180deg);
}

.nav-device-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.device-pill.battery {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #d1fae5;
}

.device-pill.wifi {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Dropdown Menu (Matches Image 2) */
.nav-device-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 250px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 30px -5px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border-light);
  z-index: 1100;
  overflow: hidden;
  animation: dropdown-fade 0.2s ease-out;
}

.nav-device-dropdown.active {
  display: block !important;
}

@keyframes dropdown-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-device-item:hover {
  background: var(--bg-surface-subtle);
}

.dropdown-device-item.active {
  background: #f0f7ff;
}

.dd-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dd-avatar {
  flex-shrink: 0;
}

.dd-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dd-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
}

.dd-pills {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dd-check {
  color: #176B5F;
  font-size: 1rem;
  font-weight: 800;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

.dropdown-add-device {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-add-device:hover {
  background: var(--bg-surface-subtle);
  color: var(--primary);
}

.dropdown-add-device i {
  color: var(--text-muted);
}

.nav-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.nav-status-pill.online {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.nav-status-pill.standby {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}

.nav-status-pill.offline {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Primary and Secondary Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn i {
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(23, 107, 95, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 8px rgba(23, 107, 95, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-body);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-subtle);
  border-color: #cbd5e1;
  color: var(--text-heading);
}

.btn-outline-primary {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-wake {
  background: linear-gradient(135deg, #d97706, #ea580c);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.btn-wake:hover:not(:disabled) {
  background: linear-gradient(135deg, #b45309, #c2410c);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-heading);
}

/* High Priority Geofence Alert Banner */
.geofence-alert-banner {
  margin: 20px 32px 0;
  background: #ffffff;
  border: 1px solid var(--danger-border);
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alert-icon-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--danger-subtle);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.alert-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-title-row h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--danger);
}

.alert-badge-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #ffffff;
}

.alert-badge-status.enter {
  background: var(--success);
}

.alert-text-body p {
  font-size: 0.8rem;
  color: var(--text-body);
  margin-top: 2px;
}

.btn-alarm-dismiss {
  background: var(--danger-subtle);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* Page Body Container & Tab Switching */
.saas-content {
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.saas-view {
  display: none;
  animation: view-fade-in 0.25s ease-out;
}

.saas-view.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   3. Quick KPI / Metrics Ribbon (AirDroid Style)
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kpi-icon-box.sky { background: var(--primary-subtle); color: var(--primary); }
.kpi-icon-box.emerald { background: var(--success-subtle); color: var(--success); }
.kpi-icon-box.amber { background: var(--warning-subtle); color: var(--warning); }
.kpi-icon-box.indigo { background: var(--indigo-subtle); color: var(--indigo); }

.kpi-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kpi-value-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kpi-bolt-icon {
  color: #f59e0b;
  font-size: 0.95rem;
  animation: pulse-bolt 1.5s ease-in-out infinite;
}

@keyframes pulse-bolt {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ============================================================
   4. Card Generic Shell
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.card:hover {
  border-color: #cbd5e1;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  font-size: 1.05rem;
}

.card-title h2 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

/* ============================================================
   5. Battery Usage History Interactive Chart
   ============================================================ */
.chart-card {
  width: 100%;
}

.chart-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.filter-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.filter-btn i { font-size: 0.8rem; }
.filter-btn:hover { color: var(--text-heading); }

.filter-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.custom-range-bar {
  padding: 12px 20px;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
  animation: slide-down 0.2s ease-out;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.range-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
}

.input-field-sm {
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.78rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-heading);
  outline: none;
}

.input-field-sm:focus {
  border-color: var(--primary);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 310px;
  padding: 16px 20px;
}

.chart-footer-meta {
  padding: 10px 20px;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.bg-emerald { background-color: var(--success); }
.bg-amber { background-color: var(--warning); }

/* ============================================================
   6. Overview 3 Widgets Grid
   ============================================================ */
.overview-widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.widget-card {
  display: flex;
  flex-direction: column;
}

.widget-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.health-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
}

.health-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.health-icon.sky { background: var(--primary-subtle); color: var(--primary); }
.health-icon.amber { background: var(--warning-subtle); color: var(--warning); }
.health-icon.emerald { background: var(--success-subtle); color: var(--success); }
.health-icon.indigo { background: var(--indigo-subtle); color: var(--indigo); }

.health-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.health-label {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
}

.health-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-heading);
}

.badge-status-online {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.widget-link-btn {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.widget-link-btn:hover {
  text-decoration: underline;
}

.location-snapshot-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
}

.loc-pin-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.loc-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.loc-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-heading);
}

.loc-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.loc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  margin-top: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
}

.loc-tag:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.loc-tag.safe {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.loc-tag.outside {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.loc-tag.neutral {
  color: #64748b;
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.2);
}

.quick-distance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.quick-dist-label {
  color: var(--text-muted);
}

.quick-dist-val {
  font-weight: 800;
  color: var(--primary);
}

.top-apps-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-app-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.top-app-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-app-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

.top-app-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading);
}

.top-app-time {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Security Alerts Feed Widget & Badges */
.overview-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.overview-alert-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-alert-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.overview-alert-pill.exit {
  background: #fee2e2;
  color: #dc2626;
}

.overview-alert-pill.enter {
  background: #ecfdf5;
  color: #059669;
}

.overview-alert-name {
  font-weight: 700;
  color: var(--text-heading);
}

.overview-alert-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge-status-security {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ============================================================
   7. Remote Camera Stream Card (WebRTC Tight Output Fit)
   ============================================================ */
.camera-card {
  width: 100%;
}

.camera-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.camera-mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.mode-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.mode-btn i { font-size: 0.75rem; }
.mode-btn:hover { color: var(--text-heading); }
.mode-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--danger-subtle);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Camera Stage & Viewport (Tightly Wrapped around True Output Video - Zero Black Pillars) */
.camera-stage {
  width: 100%;
  background: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  padding: 36px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  min-height: 520px;
  position: relative;
  border: 1px solid var(--border-light);
}

/* ============================================================
   Camera Monitoring Studio (2-Column Grid Layout)
   ============================================================ */
.camera-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1.15fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .camera-studio-grid {
    grid-template-columns: 1fr;
  }
}

.camera-studio-main {
  display: flex;
  flex-direction: column;
}

.camera-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: #0B0F19;
  width: 100%;
  height: 100%;
  min-height: auto;
  max-width: 100%;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

#remoteVideo {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
}

#remoteVideo.fit-cover {
  object-fit: cover;
}

#remoteVideo.mirrored {
  transform: scaleX(-1);
}

/* In-Feed Floating HUD Badges */
.cam-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 15;
  pointer-events: none;
}

.hud-group-left,
.hud-group-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-group-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 22;
}

.hud-pill {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hud-pill.hud-live {
  background: rgba(220, 38, 38, 0.85);
  border-color: rgba(254, 202, 202, 0.3);
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse-dot 1.2s infinite;
}

.hud-pill.hud-timer {
  font-family: monospace;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.hud-pill.hud-facing {
  background: rgba(15, 23, 42, 0.85);
}

.hud-pill.hud-mirror {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Camera Shutter Flash Animation */
.camera-shutter-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition: opacity 0.25s ease-out;
}

.camera-shutter-flash.flashing {
  opacity: 0.9;
  transition: none;
}

.cam-badge {
  display: none !important;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 30px;
  gap: 14px;
  color: #94a3b8;
  min-width: 320px;
}

.placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 1.5rem;
}

.placeholder-text {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 280px;
}

/* Floating Controls inside Stream Dock */
.stream-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms ease;
  will-change: transform, opacity;
}

/* All top overlay badges smooth transition */
.box-overlay-label,
.box-orientation-badge,
.cam-hud-top {
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
  will-change: transform, opacity;
}

/* Sembunyi dengan animasi smooth in: badge atas meluncur ke atas, kontrol bawah meluncur ke bawah */
.stage-monitor-box.ui-hidden .box-overlay-label,
.stage-monitor-box.ui-hidden .box-orientation-badge,
.stage-monitor-box.ui-hidden .cam-hud-top {
  transform: translateY(-55px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.stage-monitor-box.ui-hidden .stream-controls,
.stream-controls.hidden-down {
  transform: translateX(-50%) translateY(calc(100% + 40px)) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Tombol Munculkan Kembali (Panah Ke Atas) */
.stream-restore-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 21;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms ease, background-color 150ms ease;
  animation: restore-btn-slide-up 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stream-restore-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.stream-restore-btn:active {
  transform: translateX(-50%) scale(0.95);
}

.stream-restore-btn svg,
.stream-restore-btn i {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

@keyframes restore-btn-slide-up {
  from {
    transform: translateX(-50%) translateY(calc(100% + 20px));
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Fullscreen Monitor Mode (Browser-wide 100vw x 100vh) */
body.monitor-fullscreen-active {
  overflow: hidden !important;
}

.stage-monitor-box.is-browser-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
  background: #020617 !important;
  box-shadow: none !important;
  border: none !important;
}

.stage-monitor-box.is-browser-fullscreen video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: #000000 !important;
}

/* Ensure controls, restore button, and top badges remain clearly visible and clickable */
.stage-monitor-box.is-browser-fullscreen .box-overlay-label,
.stage-monitor-box.is-browser-fullscreen .box-orientation-badge,
.stage-monitor-box.is-browser-fullscreen .cam-hud-top {
  z-index: 1000001 !important;
  top: 18px !important;
}

.stage-monitor-box.is-browser-fullscreen .box-overlay-label {
  left: 18px !important;
}

.stage-monitor-box.is-browser-fullscreen .box-orientation-badge {
  right: 18px !important;
}

.stage-monitor-box.is-browser-fullscreen .stream-controls,
.stage-monitor-box.is-browser-fullscreen .stream-restore-btn {
  z-index: 1000002 !important;
  bottom: 24px !important;
}

@media (max-width: 1023px) {
  .stage-monitor-box.is-browser-fullscreen .stream-controls,
  .stage-monitor-box.is-browser-fullscreen .stream-restore-btn {
    bottom: 20px !important;
  }
  .stage-monitor-box.is-browser-fullscreen .box-overlay-label,
  .stage-monitor-box.is-browser-fullscreen .box-orientation-badge,
  .stage-monitor-box.is-browser-fullscreen .cam-hud-top {
    top: 12px !important;
  }
}

.stream-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.stream-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.stream-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.stream-btn.mic-active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.65);
}

.stream-btn.flash-on {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.65);
}

.stream-btn.danger {
  background: var(--danger);
  color: #ffffff;
}

.stream-btn.danger:hover {
  background: #b91c1c;
}

.camera-footer {
  padding: 12px 20px;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.info-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.latency-tag {
  font-weight: 700;
  color: var(--primary);
}

/* ============================================================
   Studio Sidebar Cards: Diagnostics & Snapshots
   ============================================================ */
.camera-studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.studio-panel-card {
  padding: 0;
  overflow: hidden;
}

.studio-panel-card .card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.studio-metrics-list {
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
}

.studio-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.studio-metric-row:last-child {
  border-bottom: none;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-label i {
  width: 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

.metric-val {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.82rem;
}

.status-chip {
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-chip.off {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.status-chip.on {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-chip.amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* Snapshots Gallery */
.studio-snapshots-panel {
  padding: 16px 20px 20px;
  min-height: 180px;
}

.snapshots-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.snapshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.snapshot-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #0f172a;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.snapshot-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.snapshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.snapshot-item .snap-time {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.65rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.snapshot-item .snap-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}

.snapshot-item .snap-btn-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  text-decoration: none;
  transition: background 0.2s;
}

.snapshot-item .snap-btn-icon:hover {
  background: var(--primary);
}

/* ============================================================
   8. GPS Location Full-Bleed Map View (Matches User Images)
   ============================================================ */
.saas-view.view-map-fullscreen {
  padding: 0 !important;
  margin: 0 !important;
  height: calc(100vh - 65px) !important;
  position: relative !important;
  overflow: hidden !important;
  flex: 1;
}

.view-map-fullscreen .map-viewport-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.view-map-fullscreen #map {
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* 1. Buffering / Compass Loading Animation (Matches Image 1) */
.map-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f8fafc;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.map-loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.world-map-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: radial-gradient(#94a3b8 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
}

.compass-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 10;
}

.compass-rose {
  border-radius: 50%;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.8);
  background: #ffffff;
}

.compass-needle-group {
  transform-origin: 70px 70px;
  animation: compass-spin 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes compass-spin {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(180deg); }
  55%  { transform: rotate(330deg); }
  75%  { transform: rotate(260deg); }
  100% { transform: rotate(360deg); }
}

.compass-loading-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.01em;
}

/* 2. Floating "All Devices" Window Card (Matches Image 3) */
.map-floating-panel {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 350px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
  z-index: 1000;
  overflow: hidden;
  animation: panel-drop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panel-drop {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
}

.panel-refresh-btn {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.panel-refresh-btn:hover {
  color: var(--primary);
  background: var(--bg-surface-subtle);
  transform: rotate(180deg);
}

.panel-device-card {
  padding: 6px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-device-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.panel-device-avatar {
  flex-shrink: 0;
  margin-top: 2px;
}

.panel-device-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.panel-device-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-device-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-heading);
}

.panel-device-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.panel-device-address {
  font-size: 0.75rem;
  color: var(--text-body);
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Multi-Device Floating List in Map Panel */
.map-devices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 4px;
}

.map-devices-list::-webkit-scrollbar {
  width: 4px;
}

.map-devices-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.floating-device-item {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.floating-device-item:hover {
  border-color: var(--dev-theme-color, var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.floating-device-item.active {
  border-color: var(--dev-theme-color, var(--primary));
  background: var(--dev-theme-bg, #f8fafc);
  box-shadow: 0 4px 14px var(--dev-theme-shadow, rgba(99, 102, 241, 0.15));
}

.floating-device-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--dev-theme-color, var(--primary));
}

.fdev-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.fdev-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--dev-theme-bg, #e0e7ff);
  border: 2px solid var(--dev-theme-color, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--dev-theme-color, #6366f1);
  font-size: 0.95rem;
  box-shadow: 0 2px 8px var(--dev-theme-shadow, rgba(99, 102, 241, 0.2));
}

.fdev-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fdev-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.fdev-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fdev-badge-group {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
}

.fdev-battery {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #10b981;
}

.fdev-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.fdev-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.fdev-status-dot.standby {
  background: #f59e0b;
}

.fdev-status-dot.offline {
  background: #94a3b8;
}

.fdev-address {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.fdev-focus-btn {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.floating-device-item:hover .fdev-focus-btn,
.fdev-focus-btn:hover {
  background: var(--dev-theme-color, var(--primary));
  border-color: var(--dev-theme-color, var(--primary));
  color: #ffffff;
}

/* Multi-Device Custom Leaflet Map Pin Markers */
.custom-device-map-marker {
  background: transparent !important;
  border: none !important;
}

.pin-device-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.device-pin-tag {
  background: #ffffff;
  border: 1.5px solid var(--theme-color, #6366f1);
  color: var(--theme-color, #6366f1);
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 99px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.device-pin-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--theme-bg, #ffffff);
  border: 2.5px solid var(--theme-color, #6366f1);
  box-shadow: 0 4px 14px var(--theme-shadow, rgba(99, 102, 241, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.device-pin-pulse {
  position: absolute;
  top: 19px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--theme-pulse, rgba(99, 102, 241, 0.25));
  animation: pulse-avatar-pin 2.2s infinite ease-out;
  z-index: 1;
  pointer-events: none;
}

.custom-device-map-marker:hover .device-pin-circle,
.custom-device-map-marker.active-device .device-pin-circle {
  transform: scale(1.18);
  border-width: 3.5px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 8px 20px var(--theme-shadow, rgba(99, 102, 241, 0.45));
}

.custom-device-map-marker.active-device .device-pin-tag {
  background: var(--theme-color, #6366f1);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--theme-shadow, rgba(99, 102, 241, 0.4));
}

.custom-device-map-marker.is-offline {
  opacity: 0.82;
  filter: grayscale(25%);
}

.custom-device-map-marker.is-offline .device-pin-pulse {
  display: none !important;
}

.pin-offline-tag {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
  margin-left: 2px;
}

.panel-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.panel-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  transition: var(--transition);
}

.panel-action-btn:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-border);
  color: var(--primary);
}

.panel-action-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.panel-action-btn.active i {
  color: #ffffff !important;
}

.badge-pro {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.panel-layer-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
  margin-top: 4px;
}

.layer-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.layer-tab:hover {
  color: var(--text-heading);
}

.layer-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}


/* Custom Leaflet Child Pin with Berry Avatar (Matches Image 3) */
.child-avatar-map-pin {
  background: transparent;
  border: none;
}

.pin-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
  border: 3px solid #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  position: relative;
}

.pin-avatar-pulse {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.25);
  animation: pulse-avatar-pin 2s infinite ease-out;
  z-index: 1;
}

@keyframes pulse-avatar-pin {
  0% { transform: scale(0.8); opacity: 0.8; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.map-overlay-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  z-index: 500;
}

/* ============================================================
   9. App Activity & Screen Time Today Card (Modern AirDroid SaaS Layout)
   ============================================================ */
.activity-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.activity-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.activity-page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0;
  letter-spacing: -0.02em;
}

.activity-period-toggle {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}

.pill-toggle {
  padding: 6px 16px;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-toggle.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.activity-date-nav {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 2px 4px;
  box-shadow: var(--shadow-sm);
}

.date-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.date-nav-btn:hover {
  background: #f1f5f9;
  color: var(--text-heading);
}

.date-nav-display {
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading);
}

.activity-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-update-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-icon-refresh {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-icon-refresh:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: rotate(45deg);
}

/* Real-Time Live App Banner */
.current-app-live-banner {
  margin-bottom: 20px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.live-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-badge-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #d1fae5;
  font-size: 0.85rem;
  font-weight: 800;
  color: #064e3b;
}

.live-banner-time {
  font-size: 0.78rem;
  color: #059669;
  font-weight: 600;
}

/* Screen Time Card */
.screen-time-card {
  margin-bottom: 24px;
  padding: 24px;
}

.screen-time-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.screen-time-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.total-screen-time-val {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.comparison-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.screen-time-chart-container {
  width: 100%;
  height: 240px;
  position: relative;
  margin-bottom: 24px;
}

/* Interactive Loading State for Chart */
.screen-time-chart-container.is-loading canvas {
  opacity: 0.22;
  filter: blur(1.5px);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.chart-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.chart-loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.chart-skeleton-bars {
  position: absolute;
  bottom: 25px;
  left: 20px;
  right: 20px;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  opacity: 0.75;
  pointer-events: none;
}

.skeleton-chart-bar {
  flex: 1;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(23, 107, 95, 0.3) 0%, rgba(245, 158, 11, 0.2) 50%, rgba(16, 185, 129, 0.3) 100%);
  animation: skeletonBarWave 1.3s ease-in-out infinite alternate;
}

.skeleton-chart-bar:nth-child(1) { animation-delay: 0s; }
.skeleton-chart-bar:nth-child(2) { animation-delay: 0.15s; }
.skeleton-chart-bar:nth-child(3) { animation-delay: 0.3s; }
.skeleton-chart-bar:nth-child(4) { animation-delay: 0.45s; }
.skeleton-chart-bar:nth-child(5) { animation-delay: 0.6s; }
.skeleton-chart-bar:nth-child(6) { animation-delay: 0.75s; }
.skeleton-chart-bar:nth-child(7) { animation-delay: 0.9s; }
.skeleton-chart-bar:nth-child(8) { animation-delay: 1.05s; }

@keyframes skeletonBarWave {
  0% { transform: scaleY(0.4); opacity: 0.35; }
  50% { transform: scaleY(1.0); opacity: 0.85; filter: drop-shadow(0 0 6px rgba(23, 107, 95, 0.4)); }
  100% { transform: scaleY(0.5); opacity: 0.45; }
}

.chart-loading-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
  animation: floatBadge 2s ease-in-out infinite;
  z-index: 2;
}

.chart-loading-badge i {
  color: var(--primary);
  font-size: 1.05rem;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Category Breakdown Cards (3 Cards Matching Screenshot) */
.category-breakdown-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.category-section-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .category-cards-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-card.cat-game {
  background: #F0FDF9;
  border: 1px solid #BCE3DE;
}

.category-card.cat-comm {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.category-card.cat-other {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.cat-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.cat-dot-game { background: #1E7D70; }
.cat-dot-comm { background: #f59e0b; }
.cat-dot-other { background: #10b981; }

.cat-name {
  font-size: 0.82rem;
  font-weight: 700;
}

.cat-game .cat-name { color: #0E4A42; }
.cat-comm .cat-name { color: #b45309; }
.cat-other .cat-name { color: #047857; }

.cat-duration {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cat-game .cat-duration { color: #1e3a8a; }
.cat-comm .cat-duration { color: #78350f; }
.cat-other .cat-duration { color: #064e3b; }

/* Most Used Apps Card & Android-Style Progress Bars */
.most-used-apps-card {
  padding: 0;
  overflow: hidden;
}

.apps-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.most-used-apps-list {
  display: flex;
  flex-direction: column;
}

.most-used-app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.most-used-app-row:last-child {
  border-bottom: none;
}

.most-used-app-row:hover {
  background: #f8fafc;
}

.app-logo-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-light);
}

.app-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-logo-box svg {
  width: 28px;
  height: 28px;
}

.app-details-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-name-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-cat-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-cat-badge.cat-game {
  background: #E6F7F4;
  color: #0E4A42;
}

.app-cat-badge.cat-communication {
  background: #fef3c7;
  color: #b45309;
}

.app-cat-badge.cat-other {
  background: #d1fae5;
  color: #047857;
}

.app-bar-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.app-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-bar-fill.cat-game {
  background: linear-gradient(90deg, #2DD4BF, #1E7D70);
}

.app-bar-fill.cat-communication {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.app-bar-fill.cat-other {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.app-duration-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 90px;
  flex-shrink: 0;
}

.app-dur-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
}

.app-pct-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Interactive Skeleton Rows for Most Used Apps List */
.app-skeleton-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.app-skeleton-row:last-child {
  border-bottom: none;
}

.app-skeleton-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.app-skeleton-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-skeleton-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skeleton-line-title {
  width: 140px;
  height: 14px;
  border-radius: 4px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.skeleton-line-badge {
  width: 52px;
  height: 14px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.skeleton-bar-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.app-skeleton-dur {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  min-width: 90px;
  flex-shrink: 0;
}

.skeleton-dur-val {
  width: 60px;
  height: 15px;
  border-radius: 4px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.skeleton-dur-pct {
  width: 36px;
  height: 12px;
  border-radius: 4px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

/* Shimmer Sweep Animation on all skeleton elements */
.app-skeleton-icon::after,
.skeleton-line-title::after,
.skeleton-line-badge::after,
.skeleton-bar-track::after,
.skeleton-dur-val::after,
.skeleton-dur-pct::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
  animation: shimmerSweep 1.4s infinite;
}

@keyframes shimmerSweep {
  100% {
    transform: translateX(100%);
  }
}

/* Refresh Status on Chart Header */
.chart-refresh-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(23, 107, 95, 0.08);
  border: 1px solid rgba(23, 107, 95, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.chart-refresh-status.spinning i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================================
   10. Clean SaaS Modals (Pairing & Geofencing)
   ============================================================ */
.modal,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal.active,
.modal-backdrop.active,
#pairingModal.active {
  display: flex !important;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dropdown);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.modal-lg {
  max-width: 720px;
}

.modal-card.modal-xl,
.snapshot-modal-card {
  max-width: 980px;
  width: 96vw;
}

.snapshot-modal-body {
  padding: 24px !important;
  display: grid !important;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  max-height: 84vh;
  overflow-y: auto;
}

@media (max-width: 820px) {
  .snapshot-modal-body {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 16px !important;
  }
}

.snapshot-preview-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.snapshot-img-frame {
  position: relative;
  width: 100%;
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  min-height: 380px;
  max-height: 520px;
}

.snapshot-img-frame img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.snapshot-res-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.snapshot-details-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.snapshot-details-header h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.snapshot-details-header .meta-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.snapshot-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.meta-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.meta-row-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.meta-row-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.meta-row-icon.icon-blue {
  background: rgba(23, 107, 95, 0.1);
  color: #176B5F;
}

.meta-row-icon.icon-indigo {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.meta-row-icon.icon-emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.meta-row-icon.icon-rose {
  background: rgba(244, 63, 94, 0.1);
  color: #e11d48;
}

.meta-row-icon.icon-sky {
  background: rgba(23, 107, 95, 0.1);
  color: #176B5F;
}

.meta-row-icon.icon-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.meta-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.meta-row-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-row-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-row-value.mono {
  font-family: monospace;
  font-size: 0.82rem;
  color: #12564C;
}

.snapshot-details-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.modal-icon.geofence-icon-accent {
  background: var(--indigo-subtle);
  color: var(--indigo);
}

.modal-header-text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
}

.modal-header-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-heading);
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-surface-subtle);
}

/* Pairing Modal Content */
.code-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.code-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.code-digits {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--primary);
  font-family: monospace;
}

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

#qrcode {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#qrcode canvas[style*="none"],
#qrcode img[style*="none"] {
  display: none !important;
}

.qr-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.connection-links-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connection-links-box h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-heading);
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
}

.link-tag {
  color: var(--text-muted);
}

.link-value {
  font-family: monospace;
  font-weight: 600;
  color: var(--primary);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Geofence Modal Elements */
.geofence-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

.gf-tab-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.gf-tab-btn i { font-size: 0.9rem; }
.gf-tab-btn:hover { background: var(--bg-surface-subtle); color: var(--text-heading); }
.gf-tab-btn.active { background: var(--indigo-subtle); color: var(--indigo); }

.geofence-create-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geofence-create-box h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-field {
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-heading);
  outline: none;
  transition: var(--transition);
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.15);
}

.slider-field {
  accent-color: var(--primary);
  cursor: pointer;
}

.radius-indicator {
  font-weight: 700;
  color: var(--primary);
}

.form-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-row label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.color-options {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-option input { display: none; }

.color-dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--border-light);
  transition: var(--transition);
}

.color-option input:checked + .color-dot {
  box-shadow: 0 0 0 2px var(--primary);
  transform: scale(1.1);
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.geofence-list-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.geofence-list-box h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-heading);
}

.geofence-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.geofence-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.geofence-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.geofence-card-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-heading);
}

.geofence-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.geofence-card-badge.inside {
  background: var(--success-subtle);
  color: var(--success);
}

.geofence-card-badge.outside {
  background: var(--danger-subtle);
  color: var(--danger);
}

.geofence-card-details {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.geofence-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.geofence-card-dist {
  font-size: 0.72rem;
  color: var(--text-body);
}

.btn-card-delete {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-card-delete:hover {
  text-decoration: underline;
}

.geofence-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.geofence-events-header h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
}

.geofence-events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.geofence-event-row {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.event-type-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.event-type-pill.enter {
  background: var(--success-subtle);
  color: var(--success);
}

.event-type-pill.exit {
  background: var(--danger-subtle);
  color: var(--danger);
}

.event-desc {
  color: var(--text-body);
  flex: 1;
  margin: 0 14px;
}

.event-time {
  color: var(--text-light);
  font-size: 0.72rem;
}

.empty-state-mini {
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.82rem;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-widgets-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .saas-layout { flex-direction: column; }
  .saas-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .kpi-grid { grid-template-columns: 1fr; }
  .saas-header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .saas-content {
    padding: 16px 20px 32px;
  }
}

/* ============================================================
   CUSTOM PARENT MAP PIN (GREEN TEARDROP LOCATION ICON - SESUAI PERMINTAAN USER)
   ============================================================ */
.parent-location-map-pin {
  background: transparent !important;
  border: none !important;
}

.parent-pin-wrapper {
  position: relative;
  width: 44px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.parent-pin-tag {
  position: absolute;
  top: -24px;
  background: #065f46;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.35);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.parent-pin-pulse {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.45);
  animation: pulse-parent-ring 2.2s infinite ease-out;
  pointer-events: none;
}

.parent-pin-svg-box {
  position: relative;
  width: 42px;
  height: 50px;
  filter: drop-shadow(0 6px 12px rgba(16, 185, 129, 0.5));
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.parent-pin-svg-box:hover {
  transform: translateY(-4px) scale(1.08);
}

@keyframes pulse-parent-ring {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0.85; }
  70% { transform: translateX(-50%) scale(2.4); opacity: 0; }
  100% { transform: translateX(-50%) scale(2.6); opacity: 0; }
}

.parent-popup-content {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text-heading);
  line-height: 1.45;
  min-width: 220px;
}

.parent-popup-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #059669;
  margin-bottom: 6px;
}

.geo-notice-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.74rem;
  color: #166534;
  margin: 8px 0;
  line-height: 1.35;
}

.btn-sync-position {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  background: #059669;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
}

.btn-sync-position:hover {
  background: #047857;
}

/* ============================================================
   PROGRESSIVE WEB APP (PWA) & MOBILE RESPONSIVE STYLES
   ============================================================ */

/* Desktop Default (Hidden on Large Screens) */
.mobile-bottom-nav,
.mobile-action-sheet,
.mobile-action-sheet-backdrop,
.mobile-header-btn,
.ios-install-modal,
.mnav-center-item,
.mnav-lock-sheet,
.mnav-sheet-scrim,
.mnav-settings-view,
.mnav-inner-header,
.mnav-confirm-modal-backdrop,
.range-text-mobile {
  display: none;
}

.range-text-desktop {
  display: inline;
}

/* Strict Desktop Guard (> 768px): Hide mobile responsive components on desktop */
@media (min-width: 769px) {
  .mnav-center-item,
  .mnav-lock-sheet,
  .mnav-sheet-scrim,
  .mnav-settings-view,
  .mnav-inner-header,
  .mnav-confirm-modal-backdrop,
  .range-text-mobile {
    display: none !important;
  }
}

/* PWA Install Notification Banner */
.pwa-install-banner {
  margin: 12px 24px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #F0FDF9 0%, #E6F7F4 100%);
  border: 1px solid #BCE3DE;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(23, 107, 95, 0.08);
  animation: slideDownFade 0.3s ease-out;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #176B5F, #176B5F);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(23, 107, 95, 0.25);
  flex-shrink: 0;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
}

.pwa-banner-text strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #12564C;
}

.pwa-banner-text span {
  font-size: 0.74rem;
  color: #176B5F;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-dismiss-btn {
  background: transparent;
  border: none;
  color: #176B5F;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.pwa-dismiss-btn:hover {
  background: rgba(23, 107, 95, 0.1);
}

/* ============================================================
   VIEW 5: INFO & APLIKASI (SCOPED MODERN SAAS LAYOUT)
   ============================================================ */
#view-info {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

#view-info .info-layout-wrapper {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 32px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

#view-info .info-col-main,
#view-info .info-col-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#view-info #infoCardSystem {
  position: sticky;
  top: 24px;
  z-index: 5;
}

/* Uniform Card Base (12px Radius, 24px Padding, #E2E8F0 Border) */
#view-info .info-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#view-info .info-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Uniform Card Header */
#view-info .info-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

#view-info .info-card-header.flex-between {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#view-info .info-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 36x36px Soft Background Box for Card Header Icons */
#view-info .info-header-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-info .info-header-icon.amber { background: #fef3c7; color: #d97706; }
#view-info .info-header-icon.blue { background: #F0FDF9; color: #176B5F; }
#view-info .info-header-icon.sky { background: #E6F7F4; color: #176B5F; }
#view-info .info-header-icon.indigo { background: #e0e7ff; color: #4f46e5; }
#view-info .info-header-icon.emerald { background: #f0fdf4; color: #16a34a; }

#view-info .info-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#view-info .info-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
  line-height: 1.35;
  letter-spacing: normal;
}

#view-info .info-card-desc {
  font-size: 14px;
  color: #64748B;
  margin: 0;
  line-height: 1.45;
  letter-spacing: normal;
}

#view-info .info-card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Action List in Card 1 (Aksi Cepat) */
#view-info .info-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-info .info-action-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.2s ease;
  min-height: 44px;
  box-sizing: border-box;
}

#view-info .info-action-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

#view-info .info-action-item:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

#view-info .info-action-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-info .info-action-icon.sky { background: #E6F7F4; color: #176B5F; }
#view-info .info-action-icon.indigo { background: #e0e7ff; color: #4f46e5; }
#view-info .info-action-icon.purple { background: #f3e8ff; color: #9333ea; }
#view-info .info-action-icon.emerald { background: #f0fdf4; color: #16a34a; }

#view-info .info-action-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#view-info .info-action-info strong {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
}

#view-info .info-action-info span {
  font-size: 13px;
  color: #64748B;
  line-height: 1.4;
}

#view-info .info-action-arrow {
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

#view-info .info-action-item:hover .info-action-arrow {
  transform: translateX(3px);
  color: #176B5F;
}

/* Card 2: PWA Features Grid (1 Row on Desktop) */
#view-info .info-pwa-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

#view-info .pwa-feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  box-sizing: border-box;
}

#view-info .info-pwa-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#view-info .info-pwa-actions .btn {
  height: 40px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#view-info .info-pwa-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.45;
}

/* Card 3: Telegram Form Grid & Chips */
#view-info .tg-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#view-info .tg-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#view-info .tg-label {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

#view-info .tg-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

#view-info .tg-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #ffffff;
  color: #0F172A;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#view-info .tg-input-wrapper .tg-input {
  padding-right: 38px;
}

#view-info .tg-input:focus {
  border-color: #176B5F;
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.15);
}

#view-info .tg-toggle-pw-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

#view-info .tg-toggle-pw-btn:hover {
  color: #0F172A;
}

/* Telegram 3 Clickable Chips */
#view-info .tg-event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
}

#view-info .tg-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  user-select: none;
  transition: all 0.2s ease;
  min-height: 36px;
  box-sizing: border-box;
}

#view-info .tg-event-chip:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

#view-info .tg-event-chip input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #176B5F;
}

#view-info .chip-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
#view-info .chip-indicator.online { background: #16A34A; }
#view-info .chip-indicator.offline { background: #DC2626; }
#view-info .chip-indicator.geofence { background: #d97706; }

/* Telegram Action Row */
#view-info .tg-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

#view-info .tg-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  user-select: none;
  min-height: 40px;
}

#view-info .tg-switch-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #176B5F;
}

#view-info .tg-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-info .tg-btn-group .btn {
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Accordion Reusable Item */
#view-info .info-accordion-item {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

#view-info .info-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #12564C;
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 44px;
  text-align: left;
}

#view-info .info-accordion-trigger:hover {
  background: #F0FDF9;
}

#view-info .info-accordion-trigger:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: -2px;
}

#view-info .accordion-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-info .accordion-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #12564C;
}

#view-info .info-accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}

#view-info .info-accordion-content {
  padding: 12px 16px 14px;
  background: #ffffff;
  border-top: 1px solid #E2E8F0;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

#view-info .tg-guide-list,
#view-info .changelog-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#view-info .changelog-list code {
  font-family: inherit;
  font-size: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  color: #0f172a;
}

/* Card 4: Akun Dasbor (Clean Redesign) */
#view-info .account-profile-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

#view-info .account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0FDF9;
  flex-shrink: 0;
}

#view-info .account-profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

#view-info .account-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-info .account-username {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
}

#view-info .account-role-badge {
  font-size: 11px;
  font-weight: 700;
  color: #176B5F;
  background: #F0FDF9;
  border: 1px solid #E6F7F4;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#view-info .account-session-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #16A34A;
  font-weight: 500;
}

#view-info .btn-danger-outline {
  height: 40px;
  min-height: 40px;
  color: #DC2626 !important;
  border: 1.5px solid #fecaca !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

#view-info .btn-danger-outline:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

#view-info .btn-danger-outline:focus-visible {
  outline: 2px solid #DC2626;
  outline-offset: 2px;
}

/* Card 5: Status Sistem Grid */
#view-info .system-status-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-info .system-status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-sizing: border-box;
}

#view-info .system-item-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-info .system-item-icon.sky { background: #E6F7F4; color: #176B5F; }
#view-info .system-item-icon.emerald { background: #f0fdf4; color: #16a34a; }
#view-info .system-item-icon.amber { background: #fef3c7; color: #d97706; }
#view-info .system-item-icon.indigo { background: #e0e7ff; color: #4f46e5; }

#view-info .system-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#view-info .system-item-label {
  font-size: 12px;
  color: #64748B;
}

#view-info .system-item-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #0F172A;
}

/* Card 6: Aplikasi Klien Anak Actions */
#view-info .child-apk-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-info .child-apk-actions .btn {
  height: 42px;
  min-height: 42px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  text-decoration: none !important;
}

/* Confirmation Modal Dialog */
.info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.info-modal-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  animation: infoModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes infoModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.info-modal-icon.danger {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fee2e2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-modal-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.info-modal-card p {
  font-size: 14px;
  color: #64748B;
  margin: 0;
  line-height: 1.5;
}

.info-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.info-modal-actions .btn {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
}

.info-modal-actions .btn-danger {
  background: #DC2626 !important;
  color: #ffffff !important;
  border: none !important;
}

.info-modal-actions .btn-danger:hover {
  background: #b91c1c !important;
}

/* ============================================================
   TABLET RESPONSIVENESS (768px - 1023px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  #view-info .info-layout-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px;
    gap: 24px;
  }

  #view-info .info-col-main,
  #view-info .info-col-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  #view-info #infoCardSystem {
    position: static;
  }

  #view-info .info-pwa-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #view-info .system-status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ============================================================
   MOBILE RESPONSIVENESS (< 768px)
   Strict User Specification for Mobile Order, Touch Targets & Zero Overflow
   ============================================================ */
@media (max-width: 767px) {
  #view-info {
    padding: 0;
  }

  #view-info .info-layout-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Flatten column hierarchy via display: contents to allow global card ordering */
  #view-info .info-col-main,
  #view-info .info-col-side {
    display: contents !important;
  }

  /* Specific mobile card order as mandated */
  #view-info #infoCardQuick { order: 1 !important; }
  #view-info #infoCardTelegram { order: 2 !important; }
  #view-info #infoCardPwa { order: 3 !important; }
  #view-info #infoCardChild { order: 4 !important; }
  #view-info #infoCardSystem { order: 5 !important; position: static !important; }
  #view-info #infoCardAccount { order: 6 !important; }

  /* Mobile Card Uniform Spacing */
  #view-info .info-card {
    padding: 18px 16px !important;
  }

  /* Aksi Cepat: 2-line clamp on mobile */
  #view-info .info-action-info span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 4 PWA Features: Grid 2x2, Icon on Top of Text */
  #view-info .info-pwa-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  #view-info .pwa-feat-item {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 12px 8px !important;
  }

  /* PWA Buttons: Stacked & Full Width */
  #view-info .info-pwa-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  #view-info .info-pwa-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
  }

  /* Telegram: Stacked Inputs & Full Width Buttons */
  #view-info .tg-config-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #view-info .tg-event-chips {
    flex-direction: column !important;
    gap: 8px !important;
  }

  #view-info .tg-event-chip {
    width: 100% !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  #view-info .tg-action-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #view-info .tg-btn-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #view-info .tg-btn-group .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
  }

  /* System Status: Grid 2x2 on Mobile */
  #view-info .system-status-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  #view-info .system-status-item {
    padding: 10px !important;
    gap: 8px !important;
  }

  #view-info .system-item-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  #view-info .system-item-label {
    font-size: 11px !important;
  }

  #view-info .system-item-value {
    font-size: 12px !important;
  }
}

/* 2-Column Grid for System Health / Security (Global & Desktop) */
.widget-body.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  padding: 18px 20px;
}

.widget-body.grid-2col .health-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.widget-body.grid-2col .health-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.widget-body.grid-2col .health-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.widget-body.grid-2col .health-icon.sky { background: #E6F7F4; color: #176B5F; }
.widget-body.grid-2col .health-icon.emerald { background: #dcfce7; color: #059669; }
.widget-body.grid-2col .health-icon.amber { background: #fef3c7; color: #d97706; }
.widget-body.grid-2col .health-icon.purple { background: #f3e8ff; color: #9333ea; }

.widget-body.grid-2col .health-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.widget-body.grid-2col .health-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.widget-body.grid-2col .health-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
}

/* ============================================================
   TABLET RESPONSIVENESS (<= 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  .saas-content {
    padding: 20px 20px 32px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .overview-secondary-grid,
  .activity-grid,
  .camera-workspace-grid,
  .location-workspace-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================================
   MOBILE RESPONSIVENESS (<= 768px - AirDroid / Native Phone UX)
   ============================================================ */
@media (max-width: 768px) {
  /* 1. Hide Desktop Sidebar Completely */
  .saas-sidebar {
    display: none !important;
  }

  .saas-layout {
    display: block;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: clip; /* clip overflow without breaking position: sticky */
  }

  .saas-main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: clip; /* clip overflow without breaking position: sticky */
    /* Extra padding at bottom for the Mobile Bottom Navigation Bar */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* 2. Mobile App Header (Sticky on all views, vibrant blue theme with curved bottom corners) */
  .saas-header {
    height: auto !important;
    min-height: 54px !important;
    padding: 8px 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    background: #176B5F !important;
    background: linear-gradient(135deg, #176B5F 0%, #12564C 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    box-shadow: 0 4px 16px rgba(23, 107, 95, 0.25) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }

  /* Left: Device Selector (Align Left) */
  .nav-device-selector {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    position: relative !important;
  }

  .nav-device-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 4px !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    width: auto !important;
    justify-content: flex-start !important;
    background: transparent !important;
    transition: background 0.15s ease, opacity 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer !important;
  }

  /* Prevent solid white box on hover/focus/tap on mobile header */
  .nav-device-trigger:hover,
  .nav-device-trigger:focus {
    background: transparent !important;
  }

  .nav-device-trigger:active {
    background: rgba(255, 255, 255, 0.15) !important;
  }

  .nav-device-dropdown {
    top: calc(100% + 12px) !important;
    left: 0 !important;
    width: 260px !important;
    max-width: calc(100vw - 28px) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25) !important;
    z-index: 2000 !important;
  }

  .nav-device-avatar svg {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
  }

  .nav-device-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 4px 6px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    justify-content: flex-start !important;
  }

  .nav-device-title-row {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }

  .nav-device-name {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .nav-device-chevron {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .nav-device-pills {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
  }

  .nav-device-pills .device-pill {
    padding: 2px 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
  }

  .nav-device-pills .device-pill i {
    color: #ffffff !important;
  }

  /* Right: Header Actions / Status Pill (Align Right) */
  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
  }

  .header-actions #btnWakeChild,
  .header-actions #btnOpenUrlSync,
  .header-actions #btnOpenPairing,
  .mobile-header-btn {
    display: none !important;
  }

  /* Active Status Pill on Header (Align Right) */
  #deviceStatusPill,
  .nav-status-pill,
  .device-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 9px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    height: 26px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  #deviceStatusPill.connected,
  .nav-status-pill.online,
  .device-status-badge.connected {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #059669 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  }

  #deviceStatusPill .status-dot,
  .nav-status-pill .status-dot-sm,
  .nav-status-pill .status-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #10b981 !important;
    box-shadow: 0 0 6px #10b981 !important;
    flex-shrink: 0 !important;
  }

  #deviceStatusPill .status-label,
  .nav-status-pill .status-text-sm,
  .nav-status-pill .status-label {
    color: #059669 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
  }

  .mobile-header-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: var(--bg-surface-subtle) !important;
    border: 1px solid var(--border-light) !important;
    color: #0f172a !important;
    font-size: 1.15rem !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-header-btn:active {
    background: var(--bg-surface-hover) !important;
    transform: scale(0.95) !important;
  }

  /* 3. Mobile Content Layout */
  .saas-content {
    padding: 10px 12px 24px !important;
  }

  .pwa-install-banner {
    margin: 8px 12px 4px !important;
    padding: 10px 12px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    box-sizing: border-box !important;
  }

  body.saas-view-location-active .pwa-install-banner,
  .saas-main:has(#view-location.active) .pwa-install-banner {
    display: none !important;
  }

  /* KPI Grid & Cards (Point 1 - Contrast & 11-12px Font) */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .kpi-card {
    padding: 10px 10px !important;
    gap: 8px !important;
    border-radius: var(--radius-md) !important;
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .kpi-icon-box {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
  }

  .kpi-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important; /* WCAG AA contrast */
  }

  .kpi-value {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
  }

  .kpi-sub {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #475569 !important; /* WCAG AA contrast */
    line-height: 1.3 !important;
  }

  /* Secondary Grid & Cards (Point 2 - Reduce outer card padding) */
  .overview-widgets-grid,
  .overview-secondary-grid,
  .activity-grid,
  .camera-workspace-grid,
  .location-workspace-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .saas-card,
  .widget-card,
  .chart-card {
    border-radius: var(--radius-md) !important;
    margin-bottom: 0 !important;
  }

  .card-header {
    padding: 10px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .card-header .card-title h2 {
    font-size: 0.92rem !important;
    font-weight: 800 !important;
  }

  .card-body,
  .widget-body {
    padding: 10px 14px 14px !important;
  }

  /* Tab Grafik (Point 4 - Min-height 40px, Horizontal Scroll) */
  .chart-card .card-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .chart-card .card-header > div:first-child {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .chart-card .card-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .chart-refresh-status {
    font-size: 11.5px !important;
    color: #475569 !important;
    font-weight: 600 !important;
  }

  .chart-filter-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 2px 0 4px !important;
    margin: 0 !important;
  }

  .chart-filter-group::-webkit-scrollbar {
    display: none !important;
  }

  .chart-filter-group .filter-btn {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  /* Grafik Baterai Area (Point 5 - Increase height +25-30% & Legend) */
  .chart-canvas-wrapper {
    height: 330px !important; /* +25-30% height on mobile */
    padding: 10px 10px 4px !important;
  }

  .chart-footer-meta {
    padding: 12px 14px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 16px !important;
    background: var(--bg-surface-subtle) !important;
    border-top: 1px solid var(--border-subtle) !important;
  }

  .meta-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
  }

  .meta-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  /* 2-Column Grid (Point 2 & Point 3 - Health and Connectivity) */
  .widget-body.grid-2col {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 10px !important;
  }

  .widget-body.grid-2col .health-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    background: #fbfcfd !important;
    border: 1px solid #edf2f6 !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .widget-body.grid-2col .health-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
    margin-top: 1px !important;
    flex-shrink: 0 !important;
  }

  .widget-body.grid-2col .health-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .widget-body.grid-2col .health-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    line-height: 1.25 !important;
    margin-bottom: 2px !important;
  }

  .widget-body.grid-2col .health-val {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Posisi Terakhir Anak (Point 2 & Point 9) */
  .location-snapshot-card {
    background: transparent !important;
    border: none !important;
    padding: 2px 0 8px !important;
    display: flex !important;
    gap: 10px !important;
  }

  .loc-pin-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    background: var(--primary-subtle) !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .loc-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .loc-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
  }

  .loc-sub {
    font-size: 11.5px !important;
    color: #475569 !important;
  }

  .loc-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-top: 4px !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    width: fit-content !important;
  }

  /* Distance Row & Button (Point 9 - 44x44px touch target) */
  .quick-distance-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 0 0 !important;
    margin-top: 8px !important;
    border-top: 1px solid var(--border-subtle) !important;
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
  }

  .quick-dist-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important;
  }

  .quick-dist-val {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    background: rgba(23, 107, 95, 0.08) !important;
    border: 1px solid rgba(23, 107, 95, 0.2) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
  }

  .quick-dist-val:active {
    background: rgba(23, 107, 95, 0.22) !important;
    transform: scale(0.96) !important;
  }

  /* Consistency of Badges and Links (Point 7 - Standardized 28px height, 11.5px font, 44px touch) */
  .badge-status-online,
  .badge-status-security,
  .widget-link-btn {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  .widget-link-btn {
    color: var(--primary) !important;
    background: var(--primary-subtle) !important;
    border: 1px solid var(--primary-border) !important;
    text-decoration: none !important;
    gap: 4px !important;
  }

  .widget-link-btn::after {
    content: '';
    position: absolute;
    inset: -8px -8px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Empty state Log Keamanan (Point 8 - Tight & Proportional) */
  .overview-alerts-list .empty-state-mini {
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    text-align: left !important;
    background: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
    border-radius: var(--radius-sm) !important;
    min-height: auto !important;
  }

  .overview-alerts-list .empty-state-mini i {
    font-size: 1.35rem !important;
    color: #10b981 !important;
    flex-shrink: 0 !important;
  }

  .overview-alerts-list .empty-state-mini p {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
  }

  /* Top 3 Apps preview */
  .top-app-item {
    padding: 8px 10px !important;
    background: transparent !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
  }

  .top-app-name {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
  }

  .top-app-time {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
  }

  /* ============================================================
     3.5. App Activity Mobile View (Points 1 - 11)
     ============================================================ */
  /* Point 7: Date Header & Controls */
  .activity-top-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px 8px !important;
    margin-bottom: 14px !important;
  }

  .activity-top-left {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px 8px !important;
    width: 100% !important;
  }

  .activity-page-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    letter-spacing: -0.02em !important;
  }

  .activity-period-toggle {
    display: inline-flex !important;
    background: #f1f5f9 !important;
    padding: 3px !important;
    border-radius: var(--radius-full) !important;
    border: 1px solid var(--border-light) !important;
  }

  .pill-toggle {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: var(--radius-full) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
  }

  .activity-date-nav {
    display: inline-flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-full) !important;
    padding: 2px 4px !important;
    box-shadow: var(--shadow-sm) !important;
    min-height: 40px !important;
  }

  .date-nav-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    font-size: 0.85rem !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
  }

  .date-nav-btn:active {
    background: #f1f5f9 !important;
    transform: scale(0.95) !important;
  }

  .date-nav-display {
    padding: 0 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
  }

  .activity-top-right {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
    padding-top: 2px !important;
  }

  .activity-update-time {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #475569 !important; /* WCAG AA */
  }

  .btn-icon-refresh {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    color: #475569 !important;
    cursor: pointer !important;
  }

  .btn-icon-refresh:active {
    background: #f1f5f9 !important;
    transform: scale(0.95) !important;
  }

  /* Point 5 & 9: Screen Time Card & Trend Badge */
  .screen-time-card {
    padding: 14px 14px 16px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px !important;
  }

  .screen-time-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .screen-time-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .meta-date {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important; /* WCAG AA */
  }

  .total-screen-time-val {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    line-height: 1.15 !important;
  }

  /* Point 9: Standardize comparison trend badge (28px height, 6px radius, 11.5px font) */
  .comparison-trend-badge {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  /* Point 6: Screen Time Chart Container +30% height */
  .screen-time-chart-container {
    height: 315px !important; /* +30% from 240px */
    margin-bottom: 16px !important;
  }

  /* Point 5: Category Section Title */
  .category-breakdown-section {
    border-top: 1px solid var(--border-subtle) !important;
    padding-top: 14px !important;
  }

  .category-section-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important; /* WCAG AA */
    margin-bottom: 10px !important;
    display: block !important;
  }

  /* Point 8: Category Cards */
  .category-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .category-card {
    padding: 12px 14px !important;
    border-radius: 10px !important;
    gap: 4px !important;
  }

  .cat-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .cat-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .cat-name {
    font-size: 12.5px !important;
    font-weight: 700 !important;
  }

  .cat-duration {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
  }

  /* Point 10: Most Used Apps Card & Sticky Header */
  .most-used-apps-card {
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px !important;
    overflow: visible !important;
  }

  .most-used-apps-card .card-header {
    position: sticky !important;
    top: 56px !important;
    z-index: 20 !important;
    background: #ffffff !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  }

  /* Point 9: Standardize apps-count-badge */
  .apps-count-badge {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  /* Point 1: App Rows Height 56-64px & Subtle Divider */
  .most-used-app-row {
    min-height: 60px !important;
    padding: 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background 0.15s ease !important;
  }

  .most-used-app-row:nth-child(even) {
    background: #fafbfc !important;
  }

  .most-used-app-row:last-child {
    border-bottom: none !important;
  }

  .app-logo-box {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .app-details-col {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  .app-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .app-name-text {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
  }

  /* Point 2: Category Badges */
  .app-cat-badge {
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 7px !important;
    border-radius: 4px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    flex-shrink: 0 !important;
  }

  .app-cat-badge.cat-game {
    background: #E6F7F4 !important;
    color: #0B3B34 !important; /* Contrast 6.5:1 */
  }

  .app-cat-badge.cat-communication {
    background: #fef3c7 !important;
    color: #92400e !important; /* Contrast 6.2:1 */
  }

  .app-cat-badge.cat-other {
    background: #d1fae5 !important;
    color: #065f46 !important; /* Contrast 6.3:1 */
  }

  /* Point 3: Progress Bar 6px, Rounded, Minimum Width */
  .app-bar-track {
    width: 100% !important;
    height: 6px !important;
    background: #e2e8f0 !important;
    border-radius: 99px !important;
    overflow: hidden !important;
  }

  .app-bar-fill {
    height: 100% !important;
    border-radius: 99px !important;
    min-width: 4px !important;
  }

  /* Point 4: Duration & Percentage Right Column (Tabular-nums) */
  .app-duration-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: 82px !important;
    min-width: 82px !important;
    flex-shrink: 0 !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" !important;
  }

  .app-dur-val {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .app-pct-val {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #475569 !important; /* WCAG AA */
    text-align: right !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }

  /* Skeleton loading row adjustments */
  .app-skeleton-row {
    min-height: 60px !important;
    padding: 10px 14px !important;
    gap: 12px !important;
  }

  .app-skeleton-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
  }

  .skeleton-bar-track {
    height: 6px !important;
  }

  /* 4. Remote Camera Mobile View (Clean Full-Bleed Output & Compact Controls) */
  .camera-studio-main {
    padding: 12px 14px 16px !important;
    gap: 12px !important;
  }

  .camera-studio-main .card-header {
    padding: 2px 2px 8px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .camera-studio-main .card-title {
    gap: 8px !important;
  }

  .camera-studio-main .card-title h2 {
    font-size: 1.12rem !important;
    font-weight: 800 !important;
  }

  .camera-header-right {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .camera-mode-toggle {
    display: inline-flex !important;
    gap: 4px !important;
  }

  .mode-btn {
    padding: 5px 9px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }

  /* Seamless Camera Stage without bulky borders or dotted margins */
  .camera-stage {
    padding: 0 !important;
    min-height: auto !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Viewport: Fills width cleanly with native phone aspect ratio */
  .camera-viewport {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    min-height: 380px !important;
    max-height: 62vh !important;
    border-radius: 18px !important;
    border: 2px solid #1e293b !important;
    background: #090d16 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .camera-viewport.mode-landscape {
    aspect-ratio: 16 / 9 !important;
    min-height: 200px !important;
    max-height: 45vh !important;
  }

  .camera-viewport.mode-portrait {
    aspect-ratio: 9 / 16 !important;
    min-height: 420px !important;
    max-height: 65vh !important;
  }

  /* Video Stream Output: Full bleed zero black pillarboxes */
  #remoteVideo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 16px !important;
  }

  #remoteVideo.fit-contain {
    object-fit: contain !important;
  }

  /* Clean Placeholder State */
  .camera-placeholder {
    width: 100% !important;
    min-width: 0 !important;
    padding: 28px 16px !important;
    gap: 12px !important;
  }

  .placeholder-icon {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.35rem !important;
  }

  .placeholder-text {
    font-size: 0.84rem !important;
    max-width: 250px !important;
    line-height: 1.4 !important;
  }

  /* Compact In-Stream Floating Controls Overlay */
  .stream-controls {
    position: absolute !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 3.5px !important;
    padding: 3.5px 6px !important;
    border-radius: 9999px !important;
    background: rgba(15, 23, 42, 0.90) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
    z-index: 20 !important;
    max-width: calc(100% - 16px) !important;
  }

  .stream-controls.hidden-down {
    transform: translateX(-50%) translateY(calc(100% + 40px)) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .stream-restore-btn {
    bottom: 10px !important;
    width: 30px !important;
    height: 30px !important;
  }

  .stream-restore-btn svg,
  .stream-restore-btn i {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2 !important;
  }

  .stream-controls[style*="display: none"],
  .cam-hud-top[style*="display: none"] {
    display: none !important;
  }

  .stream-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    border-radius: 50% !important;
    font-size: 0.72rem !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    color: #ffffff !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
  }

  .stream-btn svg,
  .stream-btn i {
    width: 13px !important;
    height: 13px !important;
    stroke-width: 1.8 !important;
  }

  .stream-btn:active {
    transform: scale(0.9) !important;
  }

  .stream-btn.danger {
    background: #ef4444 !important;
  }

  .stream-btn.active {
    background: #176B5F !important;
  }

  .stream-btn.mic-active {
    background: #10b981 !important;
  }

  .stream-btn.flash-on {
    background: #f59e0b !important;
  }

  /* In-Feed HUD Badges (Single Row) */
  .cam-hud-top {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    display: flex;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    z-index: 15 !important;
    pointer-events: none !important;
  }

  .hud-group-left,
  .hud-group-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .hud-pill {
    font-size: 9px !important;
    padding: 2px 5.5px !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
  }

  .camera-footer {
    padding: 8px 4px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .camera-footer .info-tag {
    font-size: 0.74rem !important;
  }

  /* Hardware Diagnostics Table Mobile Spacing & No Overlap */
  .studio-panel-card {
    padding: 12px 14px !important;
  }

  .studio-metrics-list {
    padding: 6px 4px 10px !important;
  }

  .studio-metric-row {
    gap: 10px !important;
    padding: 9px 0 !important;
    flex-wrap: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .metric-label {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.8rem !important;
  }

  .metric-val {
    text-align: right !important;
    word-break: break-word !important;
    font-size: 0.8rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 55% !important;
  }

  /* 5. Location & Map Mobile View (Full Screen Bleed Map & Compact Bottom Controls) */
  body.saas-view-location-active,
  body:has(#view-location.active) {
    overflow: hidden !important;
    height: 100dvh !important;
  }

  body.saas-view-location-active .saas-main,
  .saas-main:has(#view-location.active) {
    height: 100dvh !important;
    overflow: hidden !important;
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .saas-view.view-map-fullscreen {
    position: relative !important;
    width: 100% !important;
    height: calc(100dvh - 56px - 62px - env(safe-area-inset-bottom, 0px)) !important;
    height: calc(100vh - 56px - 62px) !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .saas-view.view-map-fullscreen.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .view-map-fullscreen .map-viewport-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .view-map-fullscreen #map {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    z-index: 10 !important;
  }

  /* Compact Floating Controls Docked at Bottom Above Mobile Nav */
  .map-floating-panel {
    position: absolute !important;
    top: auto !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100% - 20px) !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  }

  .panel-header {
    padding: 7px 12px 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .panel-title {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--text-heading) !important;
    letter-spacing: -0.01em !important;
  }

  .panel-refresh-btn {
    font-size: 0.75rem !important;
    padding: 4px 6px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted) !important;
    border-radius: 6px !important;
  }

  .panel-device-card {
    padding: 3px 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .panel-device-top {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .panel-device-avatar {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
  }

  .panel-device-avatar svg {
    width: 24px !important;
    height: 24px !important;
  }

  .panel-device-info {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    overflow: hidden !important;
  }

  .panel-device-name-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .panel-device-name {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: var(--text-heading) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel-device-time {
    font-size: 0.68rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .panel-device-address {
    font-size: 0.68rem !important;
    color: #475569 !important;
    line-height: 1.25 !important;
    margin-top: 1px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .panel-actions-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
    margin-top: 2px !important;
  }

  .panel-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 5px 6px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    min-height: 32px !important;
  }

  .panel-action-btn i {
    font-size: 0.72rem !important;
  }

  .badge-pro {
    font-size: 0.55rem !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
  }

  .panel-layer-tabs {
    display: flex !important;
    padding: 2px !important;
    border-radius: 6px !important;
    gap: 3px !important;
    margin-top: 2px !important;
  }

  .layer-tab {
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
    height: 26px !important;
    gap: 4px !important;
    border-radius: 5px !important;
  }

  .layer-tab i {
    font-size: 0.68rem !important;
  }

  /* Collapsed state for floating panel on mobile */
  .map-floating-panel.collapsed .panel-device-card {
    display: none !important;
  }

  .map-floating-panel.collapsed {
    padding-bottom: 4px !important;
  }

  /* Leaflet Controls on Mobile */
  .view-map-fullscreen .leaflet-bottom.leaflet-right {
    bottom: 200px !important;
    right: 12px !important;
  }

  .view-map-fullscreen .leaflet-control-attribution {
    font-size: 9px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
  }

  /* Zoom Controls: Top Left, directly below sticky header */
  .view-map-fullscreen .leaflet-top.leaflet-left {
    top: 14px !important;
    bottom: auto !important;
    left: 14px !important;
    margin: 0 !important;
    z-index: 900 !important;
  }

  .view-map-fullscreen .leaflet-control-zoom {
    border-radius: 10px !important;
    border: 1px solid var(--border-light) !important;
    overflow: hidden !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    margin: 0 !important;
  }

  .view-map-fullscreen .leaflet-control-zoom a {
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    transition: background 0.15s ease !important;
  }

  .view-map-fullscreen .leaflet-control-zoom a:active {
    background: #f1f5f9 !important;
  }

  /* When floating panel is collapsed, adjust bottom controls */
  .view-map-fullscreen:has(.map-floating-panel.collapsed) .leaflet-bottom.leaflet-right {
    bottom: 60px !important;
  }

  /* Mobile Chart Filter Group (Scrollable, Snap, Shortened Range Text - Prompt B) */
  .range-text-desktop {
    display: none !important;
  }
  .range-text-mobile {
    display: inline !important;
  }
  .chart-filter-group {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    padding: 3px !important;
    gap: 6px !important;
  }
  .chart-filter-group::-webkit-scrollbar {
    display: none !important;
  }
  .chart-filter-group .filter-btn {
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* 6. Mobile Bottom Navigation Bar (5 Positions - Prompt B) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    height: 64px !important;
    background: #ffffff !important;
    border-top: 1px solid var(--border-light, #e2e8f0) !important;
    box-shadow: 0 -3px 14px rgba(15, 23, 42, 0.08) !important;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    align-items: center;
    justify-content: space-around;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    min-width: 44px;
    text-decoration: none;
    padding: 6px 2px;
    transition: var(--transition, all 0.2s ease);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Inactive icon: gray, 22px */
  .bottom-nav-item i,
  .bottom-nav-item svg {
    width: 22px !important;
    height: 22px !important;
    font-size: 20px !important;
    color: #64748b !important;
    stroke: #64748b !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Inactive label: gray, 11-12px */
  .bottom-nav-item span {
    font-size: 11px !important;
    font-weight: 500;
    color: #64748b !important;
    transition: color 0.2s ease, font-weight 0.2s ease;
    line-height: 1.2;
  }

  /* Active icon: primary teal */
  .bottom-nav-item.active i,
  .bottom-nav-item.active svg {
    color: #176B5F !important;
    stroke: #176B5F !important;
    transform: scale(1.08);
  }

  /* Active label: primary teal bold */
  .bottom-nav-item.active span {
    color: #176B5F !important;
    font-weight: 700 !important;
  }

  .bottom-nav-item:focus-visible {
    outline: 2px solid #176B5F;
    outline-offset: -2px;
    border-radius: 8px;
  }

  /* Center Prominent Lock Button (Prompt B) */
  .mnav-center-item {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 100%;
    padding-bottom: 5px;
    user-select: none;
    cursor: pointer;
  }

  .mnav-center-lock-btn {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin-top: -20px;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(23, 107, 95, 0.35);
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
  }

  .mnav-center-lock-btn * {
    pointer-events: none;
  }

  .mnav-center-lock-btn:active {
    transform: scale(0.92);
  }

  .mnav-center-lock-btn:focus-visible {
    outline: 2px solid #176B5F;
    outline-offset: 2px;
  }

  /* Unlocked state: primary teal */
  .mnav-center-lock-btn.unlocked {
    background: #176B5F;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(23, 107, 95, 0.35);
  }

  .mnav-center-lock-btn.unlocked i,
  .mnav-center-lock-btn.unlocked svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    width: 24px;
    height: 24px;
  }

  /* Locked state: danger red */
  .mnav-center-lock-btn.locked {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
  }

  .mnav-center-lock-btn.locked i,
  .mnav-center-lock-btn.locked svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    width: 24px;
    height: 24px;
  }

  /* Badge Dot on corner when locked */
  .mnav-lock-badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fbbf24;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .mnav-center-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.2;
  }

  /* Body lock scroll when sheet is open */
  body.mnav-sheet-open {
    overflow: hidden !important;
  }

  /* Scrim */
  .mnav-sheet-scrim {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mnav-sheet-scrim.visible {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Sheet Card */
  .mnav-lock-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.2);
    z-index: 10001;
    padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  .mnav-lock-sheet.visible {
    display: block !important;
    transform: translateY(0) !important;
  }

  /* Drag Handle Area */
  .mnav-sheet-handle-area {
    width: 100%;
    padding: 6px 0 14px;
    display: flex;
    justify-content: center;
    cursor: grab;
    touch-action: none;
  }

  .mnav-sheet-handle-bar {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
  }

  /* Sheet Header */
  .mnav-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
  }

  .mnav-sheet-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mnav-sheet-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .mnav-sheet-status-dot.unlocked {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  }

  .mnav-sheet-status-dot.locked {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  }

  .mnav-sheet-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
  }

  .mnav-sheet-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin: 3px 0 0;
    font-weight: 500;
  }

  /* Sheet Remaining Time Badge (Replaces Close Button) */
  .mnav-sheet-remaining-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
  }

  .mnav-sheet-remaining-badge.warning {
    background: #fefce8;
    border-color: #fef08a;
    color: #854d0e;
  }

  .mnav-sheet-remaining-badge.danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
  }

  /* Sheet Inline Error */
  .mnav-sheet-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 14px;
  }

  /* Sheet Actions */
  .mnav-sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mnav-sheet-action-btn {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mnav-sheet-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .mnav-sheet-action-btn i,
  .mnav-sheet-action-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Danger outline style */
  .mnav-btn-danger-outline {
    background: transparent !important;
    border: 1.5px solid #ef4444 !important;
    color: #ef4444 !important;
  }

  .mnav-btn-danger-outline:hover,
  .mnav-btn-danger-outline:focus-visible {
    background: rgba(239, 68, 68, 0.08) !important;
    outline: none;
  }

  .mnav-btn-danger-outline:active {
    background: rgba(239, 68, 68, 0.15) !important;
  }

  /* Primary filled style */
  .mnav-btn-primary {
    background: #176B5F !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(23, 107, 95, 0.3) !important;
  }

  .mnav-btn-primary:hover,
  .mnav-btn-primary:focus-visible {
    background: #12564C !important;
    outline: none;
  }

  .mnav-btn-primary:active {
    background: #075985 !important;
  }

  /* Quick Action Row (Tambah 15 menit & Kunci 1 jam) */
  .mnav-sheet-quick-row {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .mnav-sheet-quick-row .mnav-sheet-quick-btn {
    flex: 1;
    min-width: 0;
    padding: 0 8px;
    white-space: nowrap;
  }

  /* Quick action buttons */
  .mnav-sheet-quick-btn {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mnav-sheet-quick-btn:hover,
  .mnav-sheet-quick-btn:focus-visible {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
    outline: none;
  }

  .mnav-sheet-quick-btn:active {
    background: #e2e8f0;
  }

  .mnav-sheet-quick-btn i,
  .mnav-sheet-quick-btn svg {
    width: 16px;
    height: 16px;
    color: #64748b;
  }

  /* Link to full screentime page */
  .mnav-sheet-link-btn {
    width: 100%;
    min-height: 44px;
    background: transparent;
    border: none;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #176B5F;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    margin-top: 4px;
  }

  .mnav-link-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mnav-sheet-link-btn i,
  .mnav-sheet-link-btn svg {
    width: 16px;
    height: 16px;
  }

  .mnav-link-chevron {
    color: #94a3b8;
    width: 16px;
    height: 16px;
  }

  .mnav-sheet-link-btn:hover,
  .mnav-sheet-link-btn:focus-visible {
    color: #12564C;
    outline: none;
  }

  /* Confirmation Modal Backdrop (Prompt B) */
  .mnav-confirm-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: mnavFadeIn 0.18s ease-out;
  }

  .mnav-confirm-modal-backdrop.visible {
    display: flex !important;
  }

  @keyframes mnavFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .mnav-confirm-modal-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 20px 20px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
    animation: mnavScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes mnavScaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  .mnav-confirm-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
  }

  .mnav-confirm-modal-icon i,
  .mnav-confirm-modal-icon svg {
    width: 24px;
    height: 24px;
  }

  .mnav-confirm-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
  }

  .mnav-confirm-modal-desc {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
    margin: 0 0 20px;
  }

  .mnav-confirm-modal-actions {
    display: flex;
    gap: 10px;
  }

  .mnav-confirm-btn {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mnav-confirm-cancel {
    background: #f1f5f9;
    color: #475569;
  }

  .mnav-confirm-cancel:hover,
  .mnav-confirm-cancel:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
    outline: none;
  }

  .mnav-confirm-lock {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  }

  .mnav-confirm-lock:hover,
  .mnav-confirm-lock:focus-visible {
    background: #dc2626;
    outline: none;
  }

  /* Mobile Settings Page (Full Page - Prompt B) */
  .mnav-settings-view {
    display: none;
    padding: 16px 16px calc(84px + env(safe-area-inset-bottom, 0px)) 16px !important;
  }

  .mnav-settings-view.active {
    display: block !important;
  }

  .mnav-settings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
  }

  .mnav-profile-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-light, #e2e8f0);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .mnav-profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #176B5F 0%, #12564C 100%);
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(23, 107, 95, 0.25);
    flex-shrink: 0;
  }

  .mnav-profile-info {
    flex: 1;
    min-width: 0;
  }

  .mnav-profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }

  .mnav-profile-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mnav-badge-admin {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #176B5F;
    background: #E6F7F4;
    border: 1px solid #BCE3DE;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.02em;
  }

  .mnav-profile-secure {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
  }

  .mnav-profile-secure i,
  .mnav-profile-secure svg {
    width: 14px;
    height: 14px;
  }

  .mnav-menu-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-light, #e2e8f0);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
  }

  .mnav-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 54px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mnav-menu-item:last-child {
    border-bottom: none;
  }

  .mnav-menu-item:hover,
  .mnav-menu-item:focus-visible {
    background: #f8fafc;
    outline: none;
  }

  .mnav-menu-item:active {
    background: #f1f5f9;
    transform: scale(0.99);
  }

  .mnav-menu-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mnav-menu-icon i,
  .mnav-menu-icon svg {
    width: 18px;
    height: 18px;
  }

  .icon-blue {
    background: rgba(23, 107, 95, 0.1);
    color: #176B5F;
  }

  .icon-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
  }

  .icon-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
  }

  .icon-purple {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
  }

  .icon-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
  }

  .mnav-menu-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .mnav-menu-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
  }

  .mnav-menu-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mnav-menu-chevron {
    width: 18px;
    height: 18px;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: auto;
  }

  .text-red {
    color: #ef4444 !important;
  }

  .mnav-logout-card {
    border-color: #fee2e2;
  }

  /* Mobile Inner Page Headers (Prompt B) */
  .mnav-inner-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    margin: -16px -16px 16px -16px;
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .mnav-btn-back {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #0f172a;
    cursor: pointer;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
  }

  .mnav-btn-back:hover,
  .mnav-btn-back:focus-visible {
    background: #f1f5f9;
    outline: none;
  }

  .mnav-btn-back:active {
    background: #e2e8f0;
    transform: scale(0.95);
  }

  .mnav-btn-back i,
  .mnav-btn-back svg {
    width: 22px;
    height: 22px;
  }

  .mnav-inner-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
  }

  /* Narrow Screen Optimization (<= 360px - Prompt B) */
  @media (max-width: 360px) {
    .bottom-nav-item:not(.active) span,
    .mnav-center-label {
      display: none !important;
    }
    .bottom-nav-item.active span {
      display: block !important;
    }
    .mnav-center-lock-btn {
      width: 48px !important;
      height: 48px !important;
      margin-top: -18px !important;
    }
  }

  /* Accessibility: Prefers Reduced Motion (Prompt B) */
  @media (prefers-reduced-motion: reduce) {
    .mnav-lock-sheet,
    .mnav-sheet-scrim,
    .mnav-center-lock-btn,
    .mnav-confirm-modal-backdrop,
    .mnav-confirm-modal-card {
      transition: none !important;
      animation: none !important;
    }
  }

  /* 7. View Info & Quick Actions Page Styles */
  .info-pwa-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .info-pwa-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #F0FDF9 0%, #E6F7F4 100%);
    border: 1px solid #BCE3DE;
    border-radius: var(--radius-md);
    padding: 12px 14px;
  }

  .info-pwa-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #176B5F;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(23, 107, 95, 0.25);
  }

  .info-pwa-text h3 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
  }

  .info-pwa-text p {
    font-size: 0.76rem;
    color: #475569;
    line-height: 1.35;
    margin: 0;
  }

  .info-pwa-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .pwa-feat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-body);
  }

  /* Info Page Header Subtitle font reduction (Request 1) */
  .info-pwa-card .card-title .card-sub {
    font-size: 0.72rem !important; /* ~11.5px */
    color: #64748b !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    display: block !important;
    margin-top: 1px !important;
  }

  /* 7. Mobile Action Sheet (Slide-up Drawer) */
  .mobile-action-sheet-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .mobile-action-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-action-sheet {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-radius: 20px 20px 0 0;
    z-index: 1100;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.2);
    transform: translateY(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
    padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-action-sheet.open {
    transform: translateY(0);
  }

  .sheet-drag-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 99px;
    margin: 10px auto 14px;
  }

  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 12px;
  }

  .sheet-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .sheet-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface-subtle);
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .sheet-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 4px 6px;
  }

  .sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-surface-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-heading);
    margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
  }

  .sheet-item:active {
    background: var(--bg-surface-hover);
    transform: scale(0.98);
  }

  /* PWA Elements in Hamburger Action Sheet */
  .pwa-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    background: #E6F7F4;
    color: #176B5F;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1px solid #BCE3DE;
    line-height: 1;
  }

  .pwa-header-pill.active {
    background: #dcfce7;
    color: #059669;
    border-color: #a7f3d0;
  }

  .sheet-pwa-card {
    background: linear-gradient(135deg, #F0FDF9 0%, #E6F7F4 100%);
    border: 1px solid #BCE3DE;
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(23, 107, 95, 0.08);
    margin-bottom: 12px;
  }

  .sheet-pwa-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }

  .sheet-pwa-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #176B5F;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(23, 107, 95, 0.25);
  }

  .sheet-pwa-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .sheet-pwa-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
  }

  .sheet-pwa-title-row strong {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
  }

  .pwa-status-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #ffffff;
    color: #176B5F;
    border: 1px solid #BCE3DE;
    white-space: nowrap;
  }

  .pwa-status-badge.installed {
    background: #dcfce7;
    color: #059669;
    border-color: #a7f3d0;
  }

  .sheet-pwa-text p {
    font-size: 0.76rem;
    color: #334155;
    margin: 0;
    line-height: 1.35;
  }

  .sheet-pwa-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(186, 230, 253, 0.6);
  }

  .pwa-feat-item {
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .pwa-feat-item i {
    font-size: 0.75rem;
    color: #176B5F;
  }

  .sheet-pwa-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
  }

  .sheet-pwa-install-btn {
    flex: 1.2;
    min-height: 38px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
  }

  .sheet-pwa-guide-btn {
    flex: 1;
    min-height: 38px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    transition: var(--transition);
  }

  .sheet-pwa-guide-btn:hover {
    background: #f8fafc;
    color: #0f172a;
  }

  .sheet-pwa-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.7rem;
    color: #475569;
    line-height: 1.35;
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 8px;
    border-radius: 6px;
  }

  .sheet-pwa-hint i {
    color: #176B5F;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .sheet-item.pwa-sheet-item {
    background: linear-gradient(135deg, #F0FDF9, #E6F7F4);
    border-color: #BCE3DE;
  }

  .sheet-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .sheet-item-icon.install-icon {
    background: #176B5F;
    color: #fff;
  }

  .sheet-item-icon.sky {
    background: #E6F7F4;
    color: #176B5F;
  }

  .sheet-item-icon.indigo {
    background: #e0e7ff;
    color: #4f46e5;
  }

  .sheet-item-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
  }

  .sheet-item-icon.emerald {
    background: #dcfce7;
    color: #059669;
  }

  .sheet-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .sheet-item-info strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-heading);
  }

  .sheet-item-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .sheet-chevron {
    color: var(--text-light);
    font-size: 0.85rem;
  }

  /* 8. Mobile Responsive Modals (Clean margins, compact contents, smooth scroll) */
  .modal,
  .modal-backdrop {
    padding: 24px 16px !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1200 !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 340px !important;
    max-height: calc(100dvh - 120px) !important;
    margin: auto !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.35) !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  .modal-card.modal-lg,
  .modal-card.modal-xl,
  .snapshot-modal-card {
    max-width: 340px !important;
  }

  .modal-header {
    padding: 10px 14px !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .modal-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
  }

  .modal-header-text h3 {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
  }

  .modal-header-text p {
    font-size: 0.68rem !important;
    margin: 0 !important;
    line-height: 1.25 !important;
  }

  .modal-close-btn {
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 1.1rem !important;
  }

  .modal-body {
    padding: 10px 12px !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-footer {
    padding: 8px 12px !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .modal-footer .btn {
    padding: 6px 12px !important;
    font-size: 0.74rem !important;
    border-radius: 8px !important;
  }

  /* Specific elements inside Pairing / URL Sync / Add Device Modals */
  .code-box {
    padding: 8px 10px !important;
    border-radius: 8px !important;
    gap: 2px !important;
  }

  .code-label {
    font-size: 0.62rem !important;
    letter-spacing: 0.05em !important;
  }

  .code-digits {
    font-size: 1.35rem !important;
    letter-spacing: 0.12em !important;
  }

  #btnCopyCode {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
    gap: 4px !important;
  }

  .qr-section {
    padding: 2px 0 !important;
    gap: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #qrcode {
    padding: 8px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  }

  #qrcode canvas[style*="none"],
  #qrcode img[style*="none"] {
    display: none !important;
  }

  #qrcode img,
  #qrcode canvas {
    max-width: 124px !important;
    max-height: 124px !important;
    width: 124px !important;
    height: 124px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }

  .qr-hint {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    max-width: 250px !important;
  }

  .connection-links-box {
    padding: 6px 10px !important;
    gap: 4px !important;
    border-radius: 8px !important;
  }

  .connection-links-box h4 {
    font-size: 0.68rem !important;
    margin-bottom: 2px !important;
  }

  .link-item {
    font-size: 0.66rem !important;
  }

  .link-value {
    max-width: 150px !important;
    font-size: 0.65rem !important;
  }

  /* URL Sync Section in Modal */
  .url-sync-card {
    padding: 8px 10px !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
  }

  .url-sync-card span {
    font-size: 0.74rem !important;
  }

  .url-sync-card p {
    font-size: 0.68rem !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
  }

  .url-sync-card input {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
  }

  .url-sync-card .btn {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
  }
}

/* ============================================================
   EXTRA SMALL MOBILE (<= 480px)
   ============================================================ */
@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .kpi-card {
    padding: 10px 8px;
  }

  .kpi-value {
    font-size: 1rem;
  }

  .nav-device-info .nav-device-pills {
    display: none;
  }
}

/* iOS Safari PWA Install Modal */
.ios-install-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.ios-modal-content {
  background: var(--bg-surface);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.ios-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ios-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-step {
  font-size: 0.84rem;
  color: var(--text-body);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.ios-step .step-num {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ============================================================
   Dual Stream Stage (Camera & Screen Mirror - Modern UI/UX)
   ============================================================ */
.card-title-dual-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary, #176B5F);
  margin-right: 4px;
}
.card-title-dual-icons svg,
.card-title-dual-icons i {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

/* Centered Monitor Tab Wrapper */
.monitor-tab-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 8px 0 20px 0;
}

/* Segmented Monitor Tab Bar */
.monitor-tab-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.monitor-tab-bar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 640px) {
  .monitor-tab-wrapper {
    margin: 4px 0 16px 0;
    width: 100%;
  }
  .monitor-tab-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 3px;
    padding: 3px;
    overflow-x: hidden;
  }
}

.monitor-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  min-height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #64748B;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

/* Compact Icon-Only Mode (When text overflows / small screens) */
.monitor-tab-bar.icon-only .tab-label {
  display: none !important;
}

.monitor-tab-bar.icon-only .monitor-tab-btn {
  justify-content: center !important;
  padding: 8px 14px !important;
  gap: 6px !important;
}

.monitor-tab-bar.icon-only .monitor-tab-btn i,
.monitor-tab-bar.icon-only .monitor-tab-btn svg {
  margin: 0 !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}

@media (max-width: 640px) {
  .monitor-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 6px;
    font-size: 11.5px;
    gap: 5px;
    justify-content: center;
    min-height: 36px;
  }
  .monitor-tab-btn .tab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .monitor-tab-btn i,
  .monitor-tab-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .monitor-tab-bar .tab-label {
    display: none !important;
  }
  .monitor-tab-btn {
    justify-content: center !important;
    padding: 7px 10px !important;
    gap: 5px !important;
  }
  .monitor-tab-btn i,
  .monitor-tab-btn svg {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
  }
}
.monitor-tab-btn i,
.monitor-tab-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
  transition: stroke 220ms ease;
}
.monitor-tab-btn:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.65);
}
.monitor-tab-btn:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

/* Active Tab: Vibrant Tentra Teal #176B5F with White text & icon */
.monitor-tab-btn.active {
  background: #176B5F;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(23, 107, 95, 0.32);
}
.monitor-tab-btn.active i,
.monitor-tab-btn.active svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* Tab Live Pulsing Dot Indicator */
.tab-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
  animation: tabDotPulse 1.8s infinite;
  margin-left: 2px;
}
.monitor-tab-btn.active .tab-live-dot {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}
@keyframes tabDotPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Smooth Tab Content Fade Animation */
@keyframes tabContentSmoothFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Centered Orientation Pills Underneath the Monitor Window */
.monitor-orientation-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 4px 0 16px 0;
}

.camera-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 3px;
}

.camera-mode-toggle .mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  min-height: 36px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: all 180ms ease;
  user-select: none;
}
.camera-mode-toggle .mode-btn i,
.camera-mode-toggle .mode-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
}
.camera-mode-toggle .mode-btn:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.7);
}
.camera-mode-toggle .mode-btn.active {
  background: #176B5F;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(23, 107, 95, 0.28);
}
.camera-mode-toggle .mode-btn.active i,
.camera-mode-toggle .mode-btn.active svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* Dynamic Orientation Classes (Applied in Auto / Portrait / Landscape) */
.stage-monitor-box.viewport-portrait {
  aspect-ratio: 9 / 20;
  max-width: 360px;
  min-height: auto;
  max-height: 72vh;
  margin: 0 auto;
}

#cameraViewport.viewport-portrait {
  aspect-ratio: 3 / 4;
  max-width: 420px;
  min-height: auto;
  max-height: 68vh;
  margin: 0 auto;
}

.stage-monitor-box.viewport-landscape,
.stage-monitor-box.screen-landscape {
  aspect-ratio: 16 / 9;
  max-width: 740px;
  min-height: auto;
  max-height: 56vh;
  margin: 0 auto;
}

/* Dual Monitoring Stage: Dotted Canvas Background with Spacing ("Ada jaraknya") */
.dual-stream-stage {
  width: 100%;
  background: #F8FAFC;
  background-image: radial-gradient(#CBD5E1 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 36px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  margin: 16px 0;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stage Monitor Box: Sleek Phone Silhouette Centered on Dotted Canvas */
.stage-monitor-box {
  position: relative;
  background: #0B0F19;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1E293B;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.32), 0 4px 12px rgba(0, 0, 0, 0.12);
  animation: tabContentSmoothFade 280ms cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 280ms cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Stage Modes: mode-camera | mode-screen | mode-split */
.dual-stream-stage.mode-camera {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dual-stream-stage.mode-camera #cameraViewport {
  display: flex !important;
  width: auto;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  min-height: auto !important;
  max-height: 68vh;
  margin: 0 auto;
}
.dual-stream-stage.mode-camera #cameraViewport.mode-landscape {
  max-width: 720px;
  aspect-ratio: 16 / 9;
}
.dual-stream-stage.mode-camera #screenViewport {
  display: none !important;
}

.dual-stream-stage.mode-screen {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dual-stream-stage.mode-screen #cameraViewport {
  display: none !important;
}
.dual-stream-stage.mode-screen #screenViewport {
  display: flex !important;
  width: auto;
  max-width: 380px;
  max-height: 72vh;
  min-height: auto !important;
  margin: 0 auto;
}
.dual-stream-stage.mode-screen #screenViewport.screen-landscape {
  max-width: 740px;
  max-height: 60vh;
}

/* Mode Berdampingan (Split Mode) */
.dual-stream-stage.mode-split {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.dual-stream-stage.mode-split #cameraViewport,
.dual-stream-stage.mode-split #screenViewport {
  display: flex !important;
  flex: 0 0 auto !important;
  width: auto;
  height: auto;
  min-height: auto !important;
  margin: 0 auto;
}
.dual-stream-stage.mode-split #cameraViewport {
  max-width: 400px;
  max-height: 65vh;
}
.dual-stream-stage.mode-split #screenViewport {
  max-width: 340px;
  max-height: 68vh;
}

@media (max-width: 1023px) {
  .dual-stream-stage {
    padding: 20px 12px;
    min-height: auto !important;
  }
  .dual-stream-stage.mode-split {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: auto !important;
  }
  .dual-stream-stage.mode-split #cameraViewport {
    max-width: min(340px, 92vw);
    max-height: 40vh;
    min-width: 190px;
  }
  .dual-stream-stage.mode-split #screenViewport {
    max-width: min(300px, 86vw);
    max-height: 48vh;
    min-width: 170px;
  }

  .stage-monitor-box .box-overlay-label {
    top: 8px !important;
    left: 8px !important;
    padding: 2px 6px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    gap: 3px !important;
    border-radius: 4px !important;
  }
  .stage-monitor-box .box-overlay-label svg,
  .stage-monitor-box .box-overlay-label i {
    width: 10px !important;
    height: 10px !important;
    stroke-width: 1.75 !important;
  }

  .stage-monitor-box .box-orientation-badge {
    top: 8px !important;
    right: 8px !important;
    padding: 2px 6px !important;
    font-size: 9px !important;
    font-weight: 500 !important;
    gap: 3px !important;
    border-radius: 4px !important;
  }
  .stage-monitor-box .box-orientation-badge svg,
  .stage-monitor-box .box-orientation-badge i {
    width: 10px !important;
    height: 10px !important;
    stroke-width: 1.75 !important;
  }

  .stage-monitor-box .cam-hud-top {
    top: 8px !important;
    left: 6px !important;
    right: 6px !important;
  }
  .stage-monitor-box .hud-pill {
    padding: 2px 5.5px !important;
    font-size: 9px !important;
    gap: 3px !important;
    border-radius: 9999px !important;
  }
  .stage-monitor-box .hud-pill.hud-timer {
    padding: 2px 6px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
  }
  .stage-monitor-box .hud-pill.hud-facing {
    padding: 2px 5.5px !important;
    font-size: 9px !important;
    gap: 3px !important;
  }
  .stage-monitor-box .hud-pill.hud-facing i {
    font-size: 8.5px !important;
  }

  .stage-monitor-box .stream-controls {
    bottom: 10px;
    padding: 3.5px 6px;
    gap: 3.5px;
  }
  .stage-monitor-box .stream-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
  }
  .stage-monitor-box .stream-btn svg,
  .stage-monitor-box .stream-btn i {
    width: 13px !important;
    height: 13px !important;
    stroke-width: 1.8 !important;
  }
}

@media (max-width: 768px) {
  .stage-monitor-box {
    min-height: auto !important;
  }
}

/* Overlay Label in Top-Left Corner (12px, semi-transparent) */
.box-overlay-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F8FAFC;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.box-overlay-label svg,
.box-overlay-label i {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
}

/* Detected Orientation Badge in Top-Right */
.box-orientation-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #94A3B8;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.box-orientation-badge svg,
.box-orientation-badge i {
  width: 12px;
  height: 12px;
  stroke-width: 1.75;
}

/* Video Elements: Centered, Object-Fit Contain (Smooth Transitions) */
#remoteVideo,
#screenVideo {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
  transition: opacity 250ms ease, transform 250ms ease;
}

/* Empty / Connecting / Error State Container */
.monitor-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  width: 100%;
  max-width: 340px;
  z-index: 10;
  gap: 12px;
}

.monitor-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  margin-bottom: 2px;
}
.monitor-state-icon svg,
.monitor-state-icon i {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.monitor-state-icon.error {
  background: rgba(220, 38, 38, 0.15);
  color: #EF4444;
}

.monitor-state-text {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.45;
  word-wrap: break-word;
  margin: 0;
}

.monitor-action-btn {
  min-height: 40px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 150ms ease;
  outline: none;
}
.monitor-action-btn svg,
.monitor-action-btn i {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

.monitor-action-btn:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

.monitor-action-btn.danger {
  background: #DC2626 !important;
  border-color: #DC2626 !important;
  color: #FFFFFF !important;
}
.monitor-action-btn.danger:hover {
  background: #B91C1C !important;
  border-color: #B91C1C !important;
}

/* ============================================================
   Parental Controls & Screen Time Layout (Cloudfy Redesign)
   Scoped strictly to #view-screentime to avoid leaking styles
   ============================================================ */
/* ============================================================
   Parental Controls & Screen Time Layout (Cloudfy Redesign v2.0)
   Scoped strictly to #view-screentime to avoid leaking styles
   ============================================================ */

/* B1. Kartu Hero Status Terpadu (Pusat Kendali Hidup) */
#view-screentime .screentime-hero-card {
  margin-bottom: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #E6F7F4 0%, #FFFFFF 100%);
  border: 1px solid #BCE3DE;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(23, 107, 95, 0.05);
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 180px;
  max-height: 215px;
  transition: all 300ms ease;
  box-sizing: border-box;
}

#view-screentime .screentime-hero-card.locked {
  background: linear-gradient(135deg, #FEE2E2 0%, #FFFFFF 100%);
  border-color: #FECACA;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.06);
}

/* Kolom 1: Lingkaran Progres SVG */
#view-screentime .hero-ring-area {
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-screentime .hero-progress-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#view-screentime .hero-progress-svg {
  transform: rotate(-90deg);
  width: 130px;
  height: 130px;
}

#view-screentime .hero-progress-bg {
  stroke: #E2E8F0;
}

#view-screentime .hero-progress-bar {
  stroke: #176B5F;
  transition: stroke-dashoffset 400ms ease, stroke 300ms ease;
}

#view-screentime .hero-progress-bar.warning {
  stroke: #EAB308;
}

#view-screentime .hero-progress-bar.danger {
  stroke: #DC2626;
}

#view-screentime .hero-progress-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 8px;
}

#view-screentime .hero-ring-value {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

#view-screentime .hero-ring-label {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
  margin-top: 2px;
}

/* Kolom 2: Status Besar HP, Keterangan, & Aksi Cepat */
#view-screentime .hero-status-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

#view-screentime .hero-status-badge-wrap {
  display: flex;
  align-items: center;
}

#view-screentime .hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  transition: all 150ms ease;
}

#view-screentime .hero-status-pill svg,
#view-screentime .hero-status-pill i {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
}

#view-screentime .hero-status-pill.unlocked {
  background: #DCFCE7;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

#view-screentime .hero-status-pill.locked {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

#view-screentime .hero-status-title {
  font-size: 32px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.15;
}

#view-screentime .hero-status-subtitle {
  font-size: 14px;
  color: #64748B;
  margin: 0;
  line-height: 1.35;
}

/* Aksi Cepat Terpadu di Bawah Keterangan */
#view-screentime .hero-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

#view-screentime .btn-quick-chip {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 150ms ease;
  font-family: inherit;
  outline: none;
}

#view-screentime .btn-quick-chip svg,
#view-screentime .btn-quick-chip i {
  width: 14px;
  height: 14px;
  color: #176B5F;
  stroke-width: 2;
}

#view-screentime .btn-quick-chip:hover:not(:disabled) {
  background: #F0FDF9;
  border-color: #80CDC3;
  color: #176B5F;
  box-shadow: 0 1px 3px rgba(23, 107, 95, 0.08);
}

#view-screentime .btn-quick-chip:active:not(:disabled) {
  transform: scale(0.98);
}

#view-screentime .btn-quick-chip:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

#view-screentime .btn-quick-chip:disabled,
#view-screentime .btn-quick-chip.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #94A3B8;
}

#view-screentime .btn-quick-chip:disabled svg,
#view-screentime .btn-quick-chip:disabled i {
  color: #94A3B8;
}

/* Kolom 3: Dua Stat Mini Sejajar */
#view-screentime .hero-stats-area {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

#view-screentime .hero-stat-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

#view-screentime .hero-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

#view-screentime .hero-stat-label {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}

#view-screentime .hero-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 4px;
  line-height: 1.2;
}

#view-screentime .hero-stat-hint {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

#view-screentime .badge-dummy-data {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 4px;
  border: 1px solid #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* 2-Column Responsive Grid with Equal Height */
#view-screentime .parental-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}

#view-screentime .parental-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

/* Card Identity Accents */
#view-screentime .parental-card.card-lock-manual {
  border-top: 3px solid #DC2626;
}

#view-screentime .parental-card.card-rules-schedule {
  border-top: 3px solid #176B5F;
}

#view-screentime .parental-card .card-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#view-screentime .parental-card .card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

#view-screentime .card-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-screentime .card-icon-wrap.lock-icon-wrap {
  background: #FEE2E2;
  color: #DC2626;
}

#view-screentime .card-icon-wrap.schedule-icon-wrap {
  background: #F0FDF9;
  color: #176B5F;
}

#view-screentime .parental-card .card-title h2 {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
}

#view-screentime .parental-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 18px;
}

#view-screentime .parental-desc {
  font-size: 14px;
  color: #64748B;
  line-height: 1.5;
  margin: 0;
}

/* Forms & Inputs in Screentime */
#view-screentime .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#view-screentime .form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#view-screentime .form-label {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

#view-screentime .form-label svg,
#view-screentime .form-label i {
  width: 16px;
  height: 16px;
  color: #64748B;
  stroke-width: 1.75;
}

#view-screentime .char-counter {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}

#view-screentime .input-field {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #0F172A;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
}

#view-screentime .input-field:hover {
  border-color: #CBD5E1;
}

#view-screentime .input-field:focus {
  outline: none;
  border-color: #176B5F;
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.15);
}

#view-screentime .input-field:disabled {
  background: #F8FAFC;
  color: #94A3B8;
  cursor: not-allowed;
}

#view-screentime .form-helper-text {
  font-size: 13px;
  color: #64748B;
  line-height: 1.4;
}

#view-screentime .input-error-msg {
  font-size: 13px;
  color: #DC2626;
  font-weight: 500;
  margin-top: 2px;
}

/* Dynamic Lock Toggle Button */
#view-screentime .lock-action-wrap {
  margin-top: 4px;
}

#view-screentime .btn-lock-dynamic {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 150ms ease;
  outline: none;
  font-family: inherit;
}

#view-screentime .btn-lock-dynamic svg,
#view-screentime .btn-lock-dynamic i {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
}

#view-screentime .btn-lock-dynamic.btn-danger-outline {
  background: #FFFFFF;
  color: #DC2626;
  border: 1.5px solid #DC2626;
}

#view-screentime .btn-lock-dynamic.btn-danger-outline:hover:not(:disabled) {
  background: #FEF2F2;
  border-color: #B91C1C;
  color: #B91C1C;
}

#view-screentime .btn-lock-dynamic.btn-danger-outline:focus-visible {
  outline: 2px solid #DC2626;
  outline-offset: 2px;
}

#view-screentime .btn-lock-dynamic.btn-primary {
  background: #176B5F;
  color: #FFFFFF;
  border: 1px solid #176B5F;
}

#view-screentime .btn-lock-dynamic.btn-primary:hover:not(:disabled) {
  background: #0E4A42;
  border-color: #0E4A42;
}

#view-screentime .btn-lock-dynamic.btn-primary:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

#view-screentime .btn-lock-dynamic:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Enhanced Summary Cards inside Lock Card */
#view-screentime .lock-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

#view-screentime .summary-card-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 150ms ease;
}

#view-screentime .summary-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-screentime .summary-icon-box.status {
  background: #F1F5F9;
  color: #475569;
}

#view-screentime .summary-icon-box.hourglass {
  background: #F0FDF9;
  color: #176B5F;
}

#view-screentime .summary-icon-box svg,
#view-screentime .summary-icon-box i {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
}

#view-screentime .summary-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

#view-screentime .summary-content .summary-label {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#view-screentime .summary-val-highlight {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Riwayat Singkat 3 Kejadian Terakhir (Item 3) */
#view-screentime .lock-history-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #E2E8F0;
}

#view-screentime .history-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

#view-screentime .history-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
}

#view-screentime .history-icon-title {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
  color: #64748B;
}

#view-screentime .history-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#view-screentime .history-timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 8px;
}

#view-screentime .history-bullet {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-screentime .history-bullet svg,
#view-screentime .history-bullet i {
  width: 13px;
  height: 13px;
  stroke-width: 1.75;
}

#view-screentime .history-bullet.red {
  background: #FEE2E2;
  color: #DC2626;
}

#view-screentime .history-bullet.green {
  background: #DCFCE7;
  color: #16A34A;
}

#view-screentime .history-bullet.purple {
  background: #EDE9FE;
  color: #7C3AED;
}

#view-screentime .history-bullet.amber {
  background: #FEF3C7;
  color: #D97706;
}

#view-screentime .history-item-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

#view-screentime .history-event-text {
  font-weight: 500;
  color: #1E293B;
  font-size: 12px;
  line-height: 1.3;
}

#view-screentime .history-event-time {
  font-size: 11px;
  color: #64748B;
}

#view-screentime .history-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: #F8FAFC;
  border: 1px dashed #E2E8F0;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 12px;
  text-align: center;
}

#view-screentime .history-empty-state svg,
#view-screentime .history-empty-state i {
  width: 16px;
  height: 16px;
  color: #64748B;
}

#view-screentime .history-status-indicator {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  background: #ECFDF5;
  color: #059669;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#view-screentime .history-status-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
}

/* Section Rules (Screen Time & Bedtime) */
#view-screentime .rule-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #F1F5F9;
}

#view-screentime .rule-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#view-screentime .rule-label {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

#view-screentime .rule-label svg,
#view-screentime .rule-label i {
  width: 16px;
  height: 16px;
  color: #64748B;
  stroke-width: 1.75;
}

#view-screentime .slider-badge {
  font-size: 13px;
  font-weight: 600;
  color: #176B5F;
  background: #F0FDF9;
  border: 1px solid #E6F7F4;
  border-radius: 6px;
  padding: 3px 10px;
}

/* Preset Chips */
#view-screentime .preset-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

#view-screentime .preset-chip {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 150ms ease;
  font-family: inherit;
  outline: none;
}

#view-screentime .preset-chip:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #94A3B8;
}

#view-screentime .preset-chip.active {
  background: #176B5F;
  color: #FFFFFF;
  border-color: #176B5F;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(23, 107, 95, 0.25);
}

#view-screentime .preset-chip:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

#view-screentime .chip-check-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
  display: none;
}

#view-screentime .preset-chip.active .chip-check-icon {
  display: inline-block;
}

/* Custom Range Slider & Exact Positioning Ticks (Item 4) */
#view-screentime .range-slider-wrapper {
  position: relative;
  padding: 14px 0 6px 0;
}

#view-screentime .range-slider-tooltip {
  position: absolute;
  top: -14px;
  transform: translateX(-50%);
  background: #0F172A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  z-index: 10;
}

#view-screentime .range-slider-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0 4px;
  border-style: solid;
  border-color: #0F172A transparent transparent transparent;
}

#view-screentime .range-slider-wrapper:hover .range-slider-tooltip,
#view-screentime .range-slider-wrapper.active .range-slider-tooltip {
  opacity: 1;
}

#view-screentime .custom-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #E2E8F0;
  outline: none;
  cursor: pointer;
  margin: 0;
  box-sizing: border-box;
}

#view-screentime .custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #176B5F;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

#view-screentime .custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 8px rgba(23, 107, 95, 0.25);
}

#view-screentime .custom-range-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(23, 107, 95, 0.3);
}

#view-screentime .custom-range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #176B5F;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

#view-screentime .custom-range-slider::-moz-range-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 8px rgba(23, 107, 95, 0.25);
}

#view-screentime .custom-range-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(23, 107, 95, 0.3);
}

#view-screentime .slider-ticks-row {
  position: relative;
  width: 100%;
  height: 18px;
  margin-top: 10px;
}

#view-screentime .tick-label {
  position: absolute;
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
}

/* Switch Component for Bedtime */
#view-screentime .switch-control-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#view-screentime .custom-switch-btn {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #CBD5E1;
  border: none;
  padding: 2px;
  cursor: pointer;
  transition: background-color 200ms ease;
  outline: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

#view-screentime .custom-switch-btn:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

#view-screentime .custom-switch-btn.active {
  background: #176B5F;
}

#view-screentime .switch-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 200ms ease;
  transform: translateX(0);
}

#view-screentime .custom-switch-btn.active .switch-knob {
  transform: translateX(20px);
}

#view-screentime .switch-label-text {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  min-width: 52px;
}

/* Bedtime Inputs Grid & 24h Time Selects (Item 6) */
#view-screentime .bedtime-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  transition: opacity 200ms ease;
}

#view-screentime .bedtime-inputs-grid.disabled {
  opacity: 0.45;
  pointer-events: none;
}

#view-screentime .time-field-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#view-screentime .time-field-label {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
}

#view-screentime .time-select-container {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0 10px;
  height: 42px;
  transition: all 150ms ease;
  box-sizing: border-box;
}

#view-screentime .time-select-container:focus-within {
  border-color: #176B5F;
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.15);
}

#view-screentime .time-inline-icon {
  width: 16px;
  height: 16px;
  color: #64748B;
  pointer-events: none;
  stroke-width: 1.75;
  flex-shrink: 0;
}

#view-screentime .time-select-pair {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  width: 100%;
}

#view-screentime .time-select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #0F172A;
  padding: 4px 6px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  border-radius: 4px;
  flex: 1;
}

#view-screentime .time-select:hover {
  background: #F1F5F9;
}

#view-screentime .time-select:focus {
  background: #F0FDF9;
  color: #176B5F;
}

#view-screentime .time-separator {
  font-size: 16px;
  font-weight: 700;
  color: #64748B;
  user-select: none;
  padding: 0 2px;
}

#view-screentime .bedtime-duration-badge {
  background: #F1F5F9;
  color: #334155;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#view-screentime .bedtime-duration-badge svg,
#view-screentime .bedtime-duration-badge i {
  width: 16px;
  height: 16px;
  color: #64748B;
  stroke-width: 1.75;
}

/* Sleep Timeline 24h Component (Item 5) */
#view-screentime .sleep-timeline-container {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 200ms ease;
}

#view-screentime .sleep-timeline-container.disabled {
  opacity: 0.45;
  filter: grayscale(0.5);
  pointer-events: none;
}

#view-screentime .sleep-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
}

#view-screentime .sleep-timeline-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

#view-screentime .sleep-timeline-title svg,
#view-screentime .sleep-timeline-title i {
  width: 15px;
  height: 15px;
  color: #176B5F;
  stroke-width: 1.75;
}

#view-screentime .sleep-timeline-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
}

#view-screentime .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#view-screentime .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

#view-screentime .legend-dot.sleep {
  background: #1E3A8A;
}

#view-screentime .legend-dot.free {
  background: #E2E8F0;
}

#view-screentime .sleep-timeline-bar-wrapper {
  position: relative;
  width: 100%;
  margin-top: 26px; /* Memberi ruang untuk badge di atas bar */
  padding-bottom: 20px;
}

#view-screentime .sleep-timeline-bar {
  position: relative;
  width: 100%;
  height: 24px;
  border-radius: 6px;
  background: #E2E8F0;
  overflow: visible;
}

#view-screentime .sleep-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1E3A8A 0%, #0B3B34 100%);
  border-radius: 4px;
  transition: all 200ms ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

#view-screentime .sleep-now-marker {
  position: absolute;
  top: -4px;
  bottom: 0;
  width: 2px;
  background: #EF4444;
  z-index: 10;
  pointer-events: none;
  transition: left 300ms ease;
}

#view-screentime .sleep-now-badge {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  line-height: 1.2;
}

#view-screentime .sleep-now-badge::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #0F172A transparent transparent transparent;
}

#view-screentime .sleep-timeline-ticks {
  position: relative;
  width: 100%;
  height: 16px;
  margin-top: 6px;
}

#view-screentime .timeline-tick {
  position: absolute;
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 150ms ease;
}

/* Rules Action Footer (Item 9: Sejajar Dasar Kartu Kiri) */
#view-screentime .rules-actions-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

#view-screentime .btn-save-rules {
  height: 40px;
  padding: 8px 18px;
  background: #176B5F;
  color: #FFFFFF;
  border: 1px solid #176B5F;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 150ms ease;
  outline: none;
  font-family: inherit;
}

#view-screentime .btn-save-rules svg,
#view-screentime .btn-save-rules i {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

#view-screentime .btn-save-rules:hover:not(:disabled) {
  background: #0E4A42;
  border-color: #0E4A42;
}

#view-screentime .btn-save-rules:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

#view-screentime .btn-save-rules:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#view-screentime .btn-cancel-changes {
  height: 40px;
  padding: 8px 16px;
  background: #FFFFFF;
  color: #64748B;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 150ms ease;
  outline: none;
  font-family: inherit;
}

#view-screentime .btn-cancel-changes svg,
#view-screentime .btn-cancel-changes i {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

#view-screentime .btn-cancel-changes:hover {
  background: #F8FAFC;
  color: #0F172A;
  border-color: #CBD5E1;
}

#view-screentime .btn-cancel-changes:focus-visible {
  outline: 2px solid #176B5F;
  outline-offset: 2px;
}

/* Responsive Media Queries (360px, 768px, 1024px, 1440px, 1920px) */
@media (max-width: 1023px) {
  #view-screentime .screentime-hero-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 20px;
    max-height: none;
    min-height: auto;
  }

  #view-screentime .hero-ring-area {
    width: 100%;
    justify-content: center;
  }

  #view-screentime .hero-status-area {
    align-items: center;
    text-align: center;
  }

  #view-screentime .hero-quick-actions {
    justify-content: center;
  }

  #view-screentime .hero-stats-area {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  #view-screentime .hero-stat-item {
    flex: 1;
    min-width: 140px;
  }

  #view-screentime .parental-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  #view-screentime .hero-stats-area {
    flex-direction: column;
  }

  #view-screentime .hero-stat-item {
    width: 100%;
  }

  #view-screentime .lock-summary-grid {
    grid-template-columns: 1fr;
  }

  #view-screentime .bedtime-inputs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  #view-screentime .screentime-hero-card {
    padding: 20px 16px;
  }

  #view-screentime .hero-status-title {
    font-size: 26px;
  }

  #view-screentime .btn-quick-chip {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* ============================================================
   Accessible Modal Confirmation for Remote Lockdown
   Strictly scoped to #modalLockConfirm (Never overrides global modals)
   ============================================================ */
#modalLockConfirm {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

#modalLockConfirm.active,
#modalLockConfirm[style*="display: flex"] {
  display: flex !important;
  animation: modalFadeIn 200ms ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#modalLockConfirm .modal-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  text-align: center;
  animation: modalScaleUp 200ms cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#modalLockConfirm .modal-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalLockConfirm .modal-icon-badge.danger {
  background: #FEE2E2;
  color: #DC2626;
}

#modalLockConfirm .modal-icon-badge svg,
#modalLockConfirm .modal-icon-badge i {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

#modalLockConfirm .modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 8px 0;
}

#modalLockConfirm .modal-desc {
  font-size: 14px;
  color: #64748B;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

#modalLockConfirm .modal-actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

#modalLockConfirm .modal-actions-row button {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 150ms ease;
  outline: none;
  border: 1px solid transparent;
}

#modalLockConfirm .modal-actions-row button.btn-secondary {
  background: #FFFFFF;
  color: #64748B;
  border-color: #E2E8F0;
}

#modalLockConfirm .modal-actions-row button.btn-secondary:hover {
  background: #F8FAFC;
  color: #0F172A;
}

#modalLockConfirm .modal-actions-row button.btn-danger {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

#modalLockConfirm .modal-actions-row button.btn-danger:hover {
  background: #B91C1C;
}

/* ============================================================
   Protected & Responsive Styles for Snapshot Preview Modal (#snapshotModal)
   Prevents accidental exposure on page load & eliminates horizontal scrollbar
   ============================================================ */
#snapshotModal {
  display: none;
}

#snapshotModal.active {
  display: flex !important;
}

#snapshotModal .snapshot-modal-card {
  max-width: 980px !important;
  width: 95vw !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-align: left !important;
}

#snapshotModal .snapshot-modal-body {
  padding: 24px !important;
  display: grid !important;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  max-height: 84vh;
  overflow-y: auto;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

#snapshotModal .snapshot-preview-col,
#snapshotModal .snapshot-details-col {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 820px) {
  #snapshotModal .snapshot-modal-body {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 16px !important;
  }
  #snapshotModal .snapshot-modal-card {
    max-width: 95vw !important;
    width: 95vw !important;
  }
}

/* Toast Notifications */
#toastHub.toast-hub {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

#toastHub .toast-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 280px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes toastSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#toastHub .toast-item.success {
  border-left: 4px solid #16A34A;
}

#toastHub .toast-item.info {
  border-left: 4px solid #176B5F;
}

#toastHub .toast-item.error {
  border-left: 4px solid #DC2626;
}

#toastHub .toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#toastHub .toast-item.success .toast-icon {
  color: #16A34A;
}

#toastHub .toast-item.info .toast-icon {
  color: #176B5F;
}

#toastHub .toast-item.error .toast-icon {
  color: #DC2626;
}

#toastHub .toast-icon svg,
#toastHub .toast-icon i {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
}

#toastHub .toast-text {
  font-size: 13px;
  font-weight: 500;
  color: #0F172A;
  flex: 1;
  line-height: 1.4;
}

#toastHub .toast-close {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease;
}

#toastHub .toast-close:hover {
  color: #0F172A;
}

#toastHub .toast-close svg,
#toastHub .toast-close i {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
}

#toastHub .toast-retry-btn {
  font-size: 12px;
  font-weight: 600;
  color: #176B5F;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-left: 4px;
}

.spin,
.spin-icon,
.lucide-spin {
  animation: spin 1s linear infinite;
}

/* ============================================================
   AUTHENTICATION & LOGIN PANEL
   ============================================================ */
/* Auth Visibility Controller */
html:not(.user-authenticated) .saas-layout,
html:not(.user-authenticated) #mobileBottomNav,
html:not(.user-authenticated) .pwa-install-banner,
html:not(.user-authenticated) .geofence-alert-banner {
  display: none !important;
}

html.user-authenticated #cloudfyLoginContainer {
  display: none !important;
}

.cloudfy-auth-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  background: linear-gradient(135deg, #F0FDF9 0%, #E6F7F4 45%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Background Soft Glow Blobs */
.auth-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}
.auth-bg-blob.blob-1 {
  width: 380px;
  height: 380px;
  background: rgba(23, 107, 95, 0.25);
  top: 10%;
  left: 15%;
}
.auth-bg-blob.blob-2 {
  width: 320px;
  height: 320px;
  background: rgba(99, 102, 241, 0.2);
  bottom: 12%;
  right: 15%;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  animation: authCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

@keyframes authCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  box-shadow: none;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
}

.auth-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.auth-brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #176B5F;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-intro {
  margin-bottom: 22px;
}

.auth-intro h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.auth-intro p {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: authAlertShake 0.35s ease;
}

.auth-alert.info {
  background: #F0FDF9;
  border-color: #BCE3DE;
  color: #12564C;
}

@keyframes authAlertShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 40px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  background: #ffffff;
  border-color: #176B5F;
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.15);
}

.auth-input:focus ~ .auth-input-icon {
  color: #176B5F;
}

.auth-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-toggle-pwd:hover {
  color: #334155;
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: #176B5F;
  cursor: pointer;
}

.auth-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #176B5F 0%, #12564C 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(23, 107, 95, 0.35);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #12564C 0%, #075985 100%);
  box-shadow: 0 6px 18px rgba(23, 107, 95, 0.45);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-caps-warning {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #b45309;
  animation: fadeIn 0.15s ease;
}

.auth-caps-warning svg {
  color: #d97706;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.auth-security-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #64748b;
}

.auth-security-tag i {
  color: #059669;
}

/* Header & Sidebar Logout Buttons */
.btn-header-logout {
  color: #ef4444 !important;
  border-color: #fee2e2 !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
}

.btn-header-logout:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

.nav-item-logout:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

@media (max-width: 640px) {
  .header-logout-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .cloudfy-auth-wrapper {
    padding: 12px;
  }
  .auth-card {
    padding: 24px 18px;
    border-radius: 18px;
  }
  .auth-intro h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 360px) {
  .cloudfy-auth-wrapper {
    padding: 8px;
  }
  .auth-card {
    padding: 20px 14px;
    border-radius: 16px;
  }
  .auth-intro h2 {
    font-size: 1.15rem;
  }
  .auth-brand-title {
    font-size: 1.15rem;
  }
}

/* ============================================================
   VIEW ACCOUNT & SECURITY (Scoped Styles)
   ============================================================ */
.sidebar-nav .nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

#view-account {
  width: 100%;
}

.acc-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.acc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

@media (min-width: 1024px) {
  .acc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.acc-col-left,
.acc-col-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Card Styling */
.acc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.acc-card-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.acc-card-header.flex-between {
  justify-content: space-between;
}

.acc-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acc-header-icon.primary {
  background: #F0FDF9;
  color: #176B5F;
}

.acc-header-icon.indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.acc-header-icon.emerald {
  background: #ecfdf5;
  color: #10b981;
}

.acc-header-text {
  flex: 1;
  min-width: 0;
}

.acc-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.acc-card-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

.acc-card-body {
  padding: 22px;
}

/* Current Username Banner */
.acc-current-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-current-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acc-current-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.acc-current-val-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-current-username {
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
}

.acc-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #F0FDF9;
  color: #176B5F;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid #BCE3DE;
}

/* Forms & Inputs */
.acc-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.acc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-form-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.acc-input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.acc-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.acc-input:focus {
  outline: none;
  border-color: #176B5F;
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.15);
}

.acc-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.acc-toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.acc-toggle-pw:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.acc-toggle-pw svg {
  width: 16px;
  height: 16px;
}

.acc-form-hint {
  font-size: 0.76rem;
  color: #64748b;
  margin: 2px 0 0 0;
  line-height: 1.35;
}

/* Password Strength Meter */
.acc-pw-meter-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.acc-pw-meter-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.acc-pw-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.acc-pw-meter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
}

.acc-pw-meter-title {
  color: #64748b;
}

.acc-pw-meter-text {
  font-weight: 600;
  color: #64748b;
}

/* Live Password Checklist */
.acc-pw-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 10px 12px;
}

@media (min-width: 480px) {
  .acc-pw-checklist {
    grid-template-columns: 1fr 1fr;
  }
}

.acc-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #64748b;
  transition: color 0.15s ease;
}

.acc-check-item.valid {
  color: #16a34a;
  font-weight: 600;
}

.acc-check-item.invalid {
  color: #64748b;
}

.acc-check-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 2;
}

.acc-check-item.valid .acc-check-icon {
  color: #16a34a;
}

/* Alerts */
.acc-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.acc-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.acc-alert.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.acc-alert.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.acc-alert-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Form Actions */
.acc-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.acc-btn-submit {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-btn-text,
.acc-btn-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.acc-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Refresh button */
.acc-btn-refresh {
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-btn-refresh:hover {
  color: #176B5F;
  border-color: #BCE3DE;
  background: #F0FDF9;
}

.acc-btn-refresh svg {
  width: 16px;
  height: 16px;
}

/* Sessions Card */
.acc-sessions-notice {
  background: #F0FDF9;
  border: 1px solid #BCE3DE;
  color: #12564C;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.acc-notice-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.acc-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.acc-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.acc-session-item.current {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.acc-session-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.acc-session-device-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acc-session-item.current .acc-session-device-icon {
  background: #dcfce7;
  color: #16a34a;
}

.acc-session-device-icon svg {
  width: 18px;
  height: 18px;
}

.acc-session-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.acc-session-device-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-session-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #64748b;
  flex-wrap: wrap;
}

.acc-session-ip {
  font-family: monospace;
  font-size: 0.74rem;
  background: rgba(100, 116, 139, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.acc-session-right {
  flex-shrink: 0;
}

.acc-badge-current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid #86efac;
}

.acc-badge-current svg {
  width: 13px;
  height: 13px;
}

.acc-btn-revoke {
  font-size: 0.76rem;
  padding: 6px 12px;
  color: #dc2626;
  border-color: #fecaca;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.acc-btn-revoke:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.acc-btn-revoke:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.acc-session-loading,
.acc-session-empty {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.acc-sessions-footer {
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

.acc-btn-logout-all {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

@media (min-width: 480px) {
  .acc-btn-logout-all {
    width: auto;
  }
}

/* Mobile & Small Screen Adaptations (360px - 768px) */
@media (max-width: 768px) {
  .acc-card-header {
    padding: 14px 18px;
    gap: 12px;
  }
  .acc-card-body {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .acc-card-header {
    padding: 14px 16px;
    gap: 10px;
  }
  .acc-header-icon {
    width: 34px;
    height: 34px;
  }
  .acc-card-body {
    padding: 16px;
  }
  .acc-session-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .acc-session-right {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .acc-btn-submit {
    width: 100%;
  }
  .acc-current-val-row {
    flex-wrap: wrap;
  }
}

/* Activity Log Card & Items */
.acc-activity-toggle-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.acc-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.acc-toggle-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.acc-toggle-desc {
  font-size: 0.76rem;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

.acc-switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.acc-switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.acc-switch-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  border-radius: 24px;
  transition: 0.25s ease;
}

.acc-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.acc-switch-label input:checked + .acc-switch-slider {
  background-color: #176B5F;
}

.acc-switch-label input:checked + .acc-switch-slider:before {
  transform: translateX(20px);
}

.acc-activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.acc-act-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.acc-act-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.acc-act-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.acc-act-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.acc-act-icon-wrap.login-new {
  background: #fef3c7;
  color: #d97706;
}

.acc-act-icon-wrap.login-success {
  background: #ecfdf5;
  color: #10b981;
}

.acc-act-icon-wrap.login-locked {
  background: #fee2e2;
  color: #dc2626;
}

.acc-act-icon-wrap.password-changed {
  background: #eef2ff;
  color: #4f46e5;
}

.acc-act-icon-wrap.username-changed {
  background: #F0FDF9;
  color: #176B5F;
}

.acc-act-icon-wrap.logout-all {
  background: #ffe4e6;
  color: #e11d48;
}

.acc-act-icon-wrap.telegram-config {
  background: #E6F7F4;
  color: #176B5F;
}

.acc-act-icon-wrap.generic {
  background: #f1f5f9;
  color: #64748b;
}

.acc-act-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-act-summary {
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.acc-act-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #64748b;
  flex-wrap: wrap;
}

.acc-act-ip {
  font-family: monospace;
  font-size: 0.72rem;
  background: rgba(100, 116, 139, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ============================================================
   Forgot Password Flow (Scoped)
   ============================================================ */
.auth-forgot-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #176B5F;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: #0E4A42;
  text-decoration: underline;
}

.auth-forgot-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  animation: fadeIn 0.2s ease;
}

.forgot-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forgot-step-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.forgot-step-header p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.forgot-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.forgot-info-box.warning {
  background: #fffbeb;
  border-color: #fef3c7;
}

.forgot-info-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.forgot-info-text strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 4px;
}

.forgot-info-text p {
  font-size: 0.8rem;
  color: #78350f;
  margin: 0 0 6px 0;
}

.forgot-info-text code {
  font-family: monospace;
  font-size: 0.82rem;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  color: #92400e;
  font-weight: 600;
  border: 1px solid #fde68a;
}

.forgot-code-input {
  font-family: monospace;
  letter-spacing: 6px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.forgot-pw-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.forgot-rule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #64748b;
  transition: color 0.15s ease;
}

.forgot-rule-item.valid {
  color: #16a34a;
  font-weight: 600;
}

.forgot-rule-item.valid svg {
  color: #16a34a;
}

.forgot-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.forgot-footer-nav.flex-between {
  justify-content: space-between;
}

.auth-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-text-link:hover {
  color: #176B5F;
}

.auth-submit-btn.secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.auth-submit-btn.secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ============================================================
   PROMPT C-3: Time Extension Requests Module (Scoped CSS tr-)
   ============================================================ */

/* Sidebar numeric badge for pending requests */
.tr-sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9999px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.4);
}

/* Card Container */
.tr-card {
  margin-bottom: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.tr-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.tr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.tr-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tr-card-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.tr-card-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.tr-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #F0FDF9;
  color: #176B5F;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tr-icon-wrap i {
  width: 18px;
  height: 18px;
}

.tr-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tr-btn-toggle-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-btn-toggle-settings:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.tr-btn-toggle-settings i {
  width: 14px;
  height: 14px;
}

.tr-card-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Action Error Banner */
.tr-action-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

/* Active Pending Request Card */
.tr-pending-container {
  display: flex;
  flex-direction: column;
}

.tr-pending-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #cbd5e1;
  border-left: 4px solid #1E7D70;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.tr-pending-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tr-pending-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tr-pending-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4338ca;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tr-pending-avatar i {
  width: 20px;
  height: 20px;
}

.tr-pending-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-pending-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tr-pending-child-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.tr-badge-reason {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: capitalize;
}

.tr-badge-reason.school {
  background: #E6F7F4;
  color: #0B3B34;
}

.tr-badge-reason.study {
  background: #fef3c7;
  color: #92400e;
}

.tr-badge-reason.other {
  background: #f1f5f9;
  color: #475569;
}

.tr-pending-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.tr-pending-countdown-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 6px 12px;
  border-radius: 8px;
  color: #b45309;
  font-size: 0.8rem;
}

.tr-countdown-icon {
  width: 14px;
  height: 14px;
}

.tr-countdown-label {
  font-weight: 500;
}

.tr-countdown-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 700;
}

.tr-pending-body {
  padding: 4px 0;
}

.tr-pending-desc {
  font-size: 0.86rem;
  color: #334155;
  margin: 0;
  line-height: 1.45;
}

.tr-pending-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.tr-approve-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tr-btn-approve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #176B5F;
  background: #176B5F;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.tr-btn-approve:hover:not(:disabled) {
  background: #0E4A42;
  border-color: #0E4A42;
  box-shadow: 0 2px 6px rgba(23, 107, 95, 0.25);
}

.tr-btn-approve:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tr-btn-approve i {
  width: 14px;
  height: 14px;
}

.tr-btn-deny {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #dc2626;
  background: #ffffff;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.tr-btn-deny:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #b91c1c;
  color: #b91c1c;
}

.tr-btn-deny:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tr-btn-deny i {
  width: 14px;
  height: 14px;
}

/* Empty State */
.tr-empty-state-container {
  display: flex;
  flex-direction: column;
}

.tr-empty-state {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.tr-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tr-empty-icon i {
  width: 20px;
  height: 20px;
}

.tr-empty-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tr-empty-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  margin: 0;
}

.tr-empty-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* History / Riwayat */
.tr-history-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.tr-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tr-history-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.tr-history-title i {
  width: 15px;
  height: 15px;
}

.tr-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tr-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 12px;
  transition: background-color 0.15s ease;
}

.tr-history-item:hover {
  background: #f1f5f9;
}

.tr-history-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tr-history-reason {
  font-weight: 600;
  font-size: 0.82rem;
  color: #1e293b;
}

.tr-history-date {
  font-size: 0.76rem;
  color: #64748b;
}

.tr-history-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tr-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.tr-status-pill i {
  width: 12px;
  height: 12px;
}

.tr-status-pill.approved {
  background: #dcfce7;
  color: #166534;
}

.tr-status-pill.denied {
  background: #fee2e2;
  color: #991b1b;
}

.tr-status-pill.expired {
  background: #f1f5f9;
  color: #64748b;
}

/* Settings Panel */
.tr-settings-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tr-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.tr-settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.tr-settings-title-wrap h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
}

.tr-settings-title-wrap i {
  width: 16px;
  height: 16px;
  color: #176B5F;
}

.tr-btn-close-settings {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tr-btn-close-settings:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tr-btn-close-settings i {
  width: 16px;
  height: 16px;
}

.tr-settings-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tr-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.tr-setting-info strong {
  display: block;
  font-size: 0.86rem;
  color: #0f172a;
  margin-bottom: 2px;
}

.tr-setting-info p {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
}

/* Accessible Toggle Switch */
.tr-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.tr-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tr-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s ease;
  border-radius: 24px;
}

.tr-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tr-switch input:checked + .tr-slider {
  background-color: #176B5F;
}

.tr-switch input:checked + .tr-slider:before {
  transform: translateX(20px);
}

.tr-setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tr-setting-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tr-setting-col label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.tr-input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #0f172a;
  background: #ffffff;
}

.tr-input:focus {
  outline: none;
  border-color: #176B5F;
  box-shadow: 0 0 0 3px rgba(23, 107, 95, 0.12);
}

.tr-hint {
  font-size: 0.74rem;
  color: #64748b;
}

.tr-settings-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 10px;
}

.tr-settings-feedback {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
}

.tr-settings-feedback.success {
  background: #dcfce7;
  color: #166534;
}

.tr-settings-feedback.error {
  background: #fee2e2;
  color: #991b1b;
}

.tr-btn-save-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #176B5F;
  background: #176B5F;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-btn-save-settings:hover:not(:disabled) {
  background: #0E4A42;
}

.tr-btn-save-settings i {
  width: 14px;
  height: 14px;
}

/* Mobile Lock Bottom Sheet Notice Banner */
.mnav-sheet-time-req-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F0FDF9;
  border: 1px solid #BCE3DE;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  gap: 10px;
}

.mnav-time-req-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0B3B34;
  font-size: 0.84rem;
  font-weight: 600;
}

.mnav-time-req-left i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.mnav-sheet-time-req-btn {
  background: #176B5F;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.mnav-sheet-time-req-btn:hover {
  background: #0E4A42;
}

/* Responsive Rules for Small Screens */
@media (max-width: 640px) {
  .tr-card-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .tr-card-body {
    padding: 16px;
  }

  .tr-pending-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tr-approve-btn-group {
    flex-direction: column;
    width: 100%;
  }

  .tr-btn-approve,
  .tr-btn-deny {
    width: 100%;
    justify-content: center;
    min-height: 44px; /* Touch target accessibility */
  }

  .tr-history-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .tr-history-right {
    width: 100%;
    justify-content: flex-end;
  }
}








