/* ==========================================================================
   AutoTask Native Mobile App Stylesheet (v2.0)
   Designed exclusively for mobile viewport touch ergonomics & native feel
   Day Mode (Light theme) by default, with Day/Night toggle capability
   ========================================================================== */

:root {
  /* ==================== DAY MODE (DEFAULT) ==================== */
  --m-bg-app: #f4f6f9;
  --m-bg-surface: #ffffff;
  --m-bg-elevated: #f8fafc;
  --m-bg-card: #ffffff;
  --m-border: #e2e8f0;
  --m-border-subtle: #edf2f7;
  --m-border-focus: #4f46e5;
  
  --m-primary: #4f46e5;
  --m-primary-hover: #4338ca;
  --m-primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --m-primary-surface: #eef2ff;
  
  --m-success: #059669;
  --m-success-surface: #ecfdf5;
  --m-success-border: #a7f3d0;
  
  --m-warning: #d97706;
  --m-warning-surface: #fffbeb;
  --m-warning-border: #fde68a;
  
  --m-danger: #dc2626;
  --m-danger-surface: #fef2f2;
  --m-danger-border: #fecaca;
  
  --m-text-primary: #0f172a;
  --m-text-secondary: #475569;
  --m-text-muted: #94a3b8;

  --m-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --m-shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --m-shadow-card-hover: 0 8px 20px rgba(15, 23, 42, 0.08);
  --m-shadow-sheet: 0 -10px 40px rgba(15, 23, 42, 0.12);
  --m-shadow-fab: 0 8px 24px rgba(79, 70, 229, 0.35);

  --m-radius-sm: 8px;
  --m-radius-md: 14px;
  --m-radius-lg: 20px;
  --m-radius-full: 9999px;

  --m-safe-top: env(safe-area-inset-top, 0px);
  --m-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==================== NIGHT MODE OVERRIDES ==================== */
html.theme-dark {
  --m-bg-app: #0b0f19;
  --m-bg-surface: #131b2e;
  --m-bg-elevated: #1a243d;
  --m-bg-card: #141d33;
  --m-border: rgba(255, 255, 255, 0.08);
  --m-border-subtle: rgba(255, 255, 255, 0.05);
  --m-border-focus: #6366f1;

  --m-primary-surface: rgba(79, 70, 229, 0.15);
  --m-success: #10b981;
  --m-success-surface: rgba(16, 185, 129, 0.12);
  --m-success-border: rgba(16, 185, 129, 0.3);

  --m-warning: #f59e0b;
  --m-warning-surface: rgba(245, 158, 11, 0.12);
  --m-warning-border: rgba(245, 158, 11, 0.3);

  --m-danger: #ef4444;
  --m-danger-surface: rgba(239, 68, 68, 0.12);
  --m-danger-border: rgba(239, 68, 68, 0.3);

  --m-text-primary: #f8fafc;
  --m-text-secondary: #94a3b8;
  --m-text-muted: #64748b;

  --m-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --m-shadow-card: 0 4px 16px rgba(0, 0, 0, 0.25);
  --m-shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
  --m-shadow-sheet: 0 -12px 36px rgba(0, 0, 0, 0.6);
  --m-shadow-fab: 0 8px 24px rgba(79, 70, 229, 0.6);
}

/* Base Mobile Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html.mobile-app-root, body.mobile-body {
  width: 100%;
  height: 100%;
  background-color: var(--m-bg-app);
  color: var(--m-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  position: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* App Shell Layout */
.mobile-app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: var(--m-bg-app);
  position: relative;
}

/* --------------------------------------------------------------------------
   Top App Bar
   -------------------------------------------------------------------------- */
.mobile-app-bar {
  position: relative;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--m-border);
  padding-top: max(var(--m-safe-top), 10px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

html.theme-dark .mobile-app-bar {
  background: rgba(11, 15, 25, 0.88);
  box-shadow: none;
}

.mobile-app-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 12px 16px;
  height: 60px;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.mobile-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--m-radius-full);
  background: var(--m-primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}

.mobile-user-text {
  display: flex;
  flex-direction: column;
}

.mobile-greeting {
  font-size: 14px;
  font-weight: 700;
  color: var(--m-text-primary);
  white-space: nowrap;
}

.mobile-shift-badge {
  font-size: 11px;
  color: var(--m-success);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  font-weight: 600;
  white-space: nowrap;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--m-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--m-success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.mobile-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-score-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--m-warning-surface);
  border: 1px solid var(--m-warning-border);
  border-radius: var(--m-radius-full);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--m-warning);
}

.mobile-icon-btn {
  background: var(--m-bg-surface);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-full);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--m-text-secondary);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--m-shadow-sm);
}

.mobile-icon-btn:active {
  transform: scale(0.92);
}

.mobile-notif-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--m-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 10px;
  min-width: 14px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.mobile-main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(76px + var(--m-safe-bottom)) 16px;
}

.mobile-tab-view {
  display: none;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  animation: fadeIn 0.2s ease forwards;
}

.mobile-tab-view.active {
  display: block;
}

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

.mobile-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-tab-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--m-text-primary);
}

.mobile-tab-subtitle {
  font-size: 12px;
  color: var(--m-text-muted);
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   KPI Banner (Vibrant Day & Night Design)
   -------------------------------------------------------------------------- */
.mobile-kpi-banner {
  background: var(--m-primary-gradient);
  border: none;
  border-radius: var(--m-radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.35);
  color: #fff;
}

html.theme-dark .mobile-kpi-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(124, 58, 237, 0.15) 100%);
  border: 1px solid rgba(79, 70, 229, 0.35);
  box-shadow: 0 8px 24px -6px rgba(79, 70, 229, 0.2);
}

.mobile-kpi-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #e0e7ff;
  font-weight: 700;
}

html.theme-dark .mobile-kpi-label {
  color: #a5b4fc;
}

.mobile-kpi-score {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 3px 0;
}

.mobile-kpi-sub {
  font-size: 12px;
  color: #c7d2fe;
}

html.theme-dark .mobile-kpi-sub {
  color: var(--m-text-secondary);
}

.mobile-kpi-circle-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
}

html.theme-dark .mobile-kpi-circle-wrap {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.15);
}

.mobile-circle-pct {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Segmented Controls & Filter Pills
   -------------------------------------------------------------------------- */
.mobile-segmented-control {
  display: flex;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: var(--m-radius-full);
  padding: 4px;
  margin-bottom: 14px;
  gap: 2px;
}

html.theme-dark .mobile-segmented-control {
  background: var(--m-bg-surface);
  border-color: var(--m-border);
}

.mobile-segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--m-text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: var(--m-radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-segment-btn.active {
  background: #ffffff;
  color: var(--m-text-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  font-weight: 700;
}

html.theme-dark .mobile-segment-btn.active {
  background: var(--m-primary-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.mobile-segment-btn .badge-count {
  font-size: 10px;
  background: #f1f5f9;
  color: #64748b;
  padding: 1px 6px;
  border-radius: 8px;
}

.mobile-segment-btn.active .badge-count {
  background: #eef2ff;
  color: var(--m-primary);
}

html.theme-dark .mobile-segment-btn .badge-count {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.mobile-filter-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.mobile-filter-pills::-webkit-scrollbar {
  display: none;
}

.mobile-pill-btn {
  background: var(--m-bg-surface);
  border: 1px solid var(--m-border);
  color: var(--m-text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--m-radius-full);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--m-shadow-sm);
  transition: all 0.2s ease;
}

.mobile-pill-btn.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
  font-weight: 700;
}

html.theme-dark .mobile-pill-btn.active {
  background: rgba(79, 70, 229, 0.2);
  border-color: var(--m-primary);
  color: #a5b4fc;
}

/* --------------------------------------------------------------------------
   Cards Feed & Task Cards
   -------------------------------------------------------------------------- */
.mobile-cards-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#tabProfile.active,
#tabReport.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: var(--m-shadow-card);
  margin-bottom: 16px;
}

.mobile-card:last-child {
  margin-bottom: 0;
}

.mobile-cards-feed > .mobile-card,
#tabProfile > .mobile-card,
#tabReport > .mobile-card {
  margin-bottom: 0;
}

.mobile-card.card-completed {
  border-color: var(--m-success-border);
  background: var(--m-success-surface);
}

.mobile-card.card-overdue {
  border-color: var(--m-danger-border);
  background: var(--m-danger-surface);
}

.mobile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mobile-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--m-text-primary);
  line-height: 1.35;
}

.mobile-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--m-text-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mobile-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Progress & Metrics Strip */
.mobile-metrics-strip {
  background: #f8fafc;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

html.theme-dark .mobile-metrics-strip {
  background: rgba(0, 0, 0, 0.25);
  border: none;
}

.mobile-strip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--m-text-secondary);
}

.mobile-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--m-radius-full);
  overflow: hidden;
}

html.theme-dark .mobile-progress-bar-bg {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-progress-bar-fill {
  height: 100%;
  background: var(--m-primary-gradient);
  border-radius: var(--m-radius-full);
  transition: width 0.3s ease;
}

/* Minimal Task Card Row (Task Name, Target, Priority, Right-Side Complete Button) */
.mobile-task-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  box-shadow: var(--m-shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mobile-task-card-row:active {
  transform: scale(0.985);
  background: var(--m-bg-elevated);
}

.mobile-task-card-row.card-completed {
  border-color: var(--m-success-border);
  background: var(--m-success-surface);
}

.mobile-task-card-row.card-overdue {
  border-color: var(--m-danger-border);
}

.mobile-task-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mobile-task-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--m-text-primary);
  line-height: 1.35;
  word-break: break-word;
}

/* Modern UI/UX Serial Number Badge */
.mobile-task-serial-badge {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  color: #4338ca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-task-serial-badge.is-done {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
  color: #059669;
}

html.theme-dark .mobile-task-serial-badge {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  box-shadow: none;
}

html.theme-dark .mobile-task-serial-badge.is-done {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.mobile-task-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  margin-top: 4px;
}

.mobile-tag-due {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
}

html.theme-dark .mobile-tag-due {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.mobile-target-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 1.5px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
}

html.theme-dark .mobile-target-tag {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
  color: #a5b4fc;
}

.mobile-priority-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
}

.priority-high, .priority-critical {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.priority-medium {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.priority-low {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

html.theme-dark .priority-high, html.theme-dark .priority-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

html.theme-dark .priority-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

html.theme-dark .priority-low {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.12);
}

.mobile-task-action-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.mobile-complete-side-btn {
  background: var(--m-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.mobile-complete-side-btn:active {
  transform: scale(0.94);
}

.mobile-complete-side-btn.is-completed {
  background: var(--m-success-surface);
  color: var(--m-success);
  border: 1px solid var(--m-success-border);
  box-shadow: none;
  font-weight: 600;
  padding: 5px 10px;
  font-size: 11.5px;
}

.mobile-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--m-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

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

.mobile-btn-primary {
  background: var(--m-primary-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.mobile-btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.mobile-btn-outline {
  background: var(--m-bg-surface);
  border-color: var(--m-border);
  color: var(--m-text-secondary);
  box-shadow: var(--m-shadow-sm);
}

.mobile-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--m-radius-sm);
}

.mobile-btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Modern Clean To-Do Card Row & Serial Badge
   -------------------------------------------------------------------------- */
.mobile-todo-card-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  position: relative;
}

.mobile-todo-card-row:active {
  transform: scale(0.99);
}

.mobile-todo-card-row.is-completed {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.theme-dark .mobile-todo-card-row {
  background: var(--m-bg-card);
  border-color: var(--m-border);
}

html.theme-dark .mobile-todo-card-row.is-completed {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

/* Modern Serial Number Badge for To-Dos */
.mobile-todo-serial-badge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  color: #4338ca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.06);
  transition: all 0.2s ease;
}

.mobile-todo-serial-badge.is-done {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
  color: #059669;
}

html.theme-dark .mobile-todo-serial-badge {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  box-shadow: none;
}

html.theme-dark .mobile-todo-serial-badge.is-done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* Modern Square Checkmark */
.mobile-check-square,
.mobile-check-circle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 5px;
  border: 2px solid #94a3b8;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: 0;
}

html.theme-dark .mobile-check-square,
html.theme-dark .mobile-check-circle {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-check-square:active,
.mobile-check-circle:active {
  transform: scale(0.92);
}

.mobile-check-square.checked,
.mobile-check-circle.checked {
  background: var(--m-success);
  border-color: var(--m-success);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.mobile-check-square.checked::after,
.mobile-check-circle.checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* To-Do Content Info */
.mobile-todo-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-todo-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--m-text-primary);
  line-height: 1.35;
  word-break: break-word;
  transition: color 0.15s ease;
}

.mobile-todo-title.done {
  text-decoration: line-through;
  color: var(--m-text-muted);
}

.mobile-todo-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mobile-todo-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 6.5px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.25;
}

.mobile-todo-tag.tag-task {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.mobile-todo-tag.tag-target {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

html.theme-dark .mobile-todo-tag.tag-task {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.3);
}

html.theme-dark .mobile-todo-tag.tag-target {
  background: rgba(245, 158, 11, 0.15);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.3);
}

.mobile-badge-role {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

html.theme-dark .mobile-badge-role {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Subtle SVG Delete Button */
.mobile-todo-delete-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--m-text-muted);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-todo-delete-btn:active {
  background: #fee2e2;
  color: var(--m-danger);
  transform: scale(0.92);
}

html.theme-dark .mobile-todo-delete-btn:active {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Empty State Card */
.mobile-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--m-text-muted);
  background: var(--m-bg-card);
  border: 1px dashed var(--m-border);
  border-radius: var(--m-radius-lg);
}

.mobile-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.mobile-empty-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--m-text-primary);
}

.mobile-empty-sub {
  font-size: 12px;
  margin-top: 4px;
  color: var(--m-text-secondary);
}

/* --------------------------------------------------------------------------
   Floating Action Button (FAB)
   -------------------------------------------------------------------------- */
.mobile-fab {
  position: fixed;
  bottom: calc(72px + var(--m-safe-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--m-primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: var(--m-shadow-fab);
  cursor: pointer;
  z-index: 30;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-fab:active {
  transform: scale(0.9);
}

/* --------------------------------------------------------------------------
   Bottom Navigation Bar
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + var(--m-safe-bottom));
  padding-bottom: var(--m-safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--m-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

html.theme-dark .mobile-bottom-nav {
  background: rgba(11, 15, 25, 0.92);
  box-shadow: none;
}

.mobile-nav-item {
  flex: 1;
  background: transparent;
  border: none;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  height: 52px;
  position: relative;
  transition: color 0.15s ease;
}

html.theme-dark .mobile-nav-item {
  color: var(--m-text-muted);
}

.mobile-nav-item .nav-icon-wrap {
  position: relative;
}

.mobile-nav-item .nav-label {
  font-size: 10.5px;
  font-weight: 600;
}

.mobile-nav-item.active {
  color: var(--m-primary);
  font-weight: 700;
}

.mobile-nav-item.active .nav-icon-wrap svg {
  stroke: var(--m-primary);
}

html.theme-dark .mobile-nav-item.active {
  color: #a5b4fc;
}

html.theme-dark .mobile-nav-item.active .nav-icon-wrap svg {
  stroke: #818cf8;
}

.nav-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--m-danger);
}

/* --------------------------------------------------------------------------
   Native Bottom-Sheet Drawers
   -------------------------------------------------------------------------- */
.mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

html.theme-dark .mobile-sheet-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.mobile-sheet-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  max-height: 80vh;
  background: #ffffff;
  border-top: 1px solid var(--m-border);
  border-radius: 20px 20px 0 0;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
  padding-bottom: max(var(--m-safe-bottom), 12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.16);
  pointer-events: auto;
}

.mobile-bottom-sheet.active {
  transform: translateY(0) !important;
}

html.theme-dark .mobile-bottom-sheet {
  background: var(--m-bg-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.6);
}

.mobile-sheet-handle {
  width: 36px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 8px auto 2px auto;
  flex-shrink: 0;
}

html.theme-dark .mobile-sheet-handle {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 8px 16px;
  border-bottom: 1px solid var(--m-border);
  flex-shrink: 0;
}

.mobile-sheet-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--m-text-primary);
}

.mobile-sheet-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--m-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.mobile-sheet-body {
  padding: 8px 16px 14px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Modern Responsive Achieved Counter Card & Stepper
   -------------------------------------------------------------------------- */
.mobile-counter-card {
  background: #ffffff;
  border: 1px solid var(--m-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  width: 100%;
  box-sizing: border-box;
}

html.theme-dark .mobile-counter-card {
  background: var(--m-bg-elevated);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.mobile-counter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-counter-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.mobile-counter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--m-text-primary);
  line-height: 1.25;
  margin: 0;
}

.mobile-counter-label .required-star {
  color: var(--m-danger);
  margin-left: 2px;
}

.mobile-quota-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--m-text-secondary);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

html.theme-dark .mobile-quota-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.mobile-target-fill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--m-primary);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-target-fill-chip:active {
  background: rgba(79, 70, 229, 0.2);
  transform: scale(0.96);
}

html.theme-dark .mobile-target-fill-chip {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

/* Mathematically bounded 5-column grid for stepper (Never overflows on any phone) */
.mobile-stepper-control {
  display: grid;
  grid-template-columns: 38px 42px minmax(0, 1fr) 42px 38px;
  gap: 5px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 360px) {
  .mobile-stepper-control {
    grid-template-columns: 34px 38px minmax(0, 1fr) 38px 34px;
    gap: 4px;
  }
}

.mobile-step-btn {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--m-text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.12s ease;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mobile-step-btn.main-step {
  font-size: 18px;
  font-weight: 800;
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.mobile-step-btn:active {
  background: #e2e8f0;
  transform: scale(0.95);
  box-shadow: none;
}

html.theme-dark .mobile-step-btn {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
  box-shadow: none;
}

html.theme-dark .mobile-step-btn.main-step {
  background: #1e293b;
  border-color: #64748b;
  color: #ffffff;
}

html.theme-dark .mobile-step-btn:active {
  background: #475569;
}

.mobile-stepper-input-box {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
}

.mobile-stepper-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  background: #ffffff;
  border: 2px solid var(--m-primary);
  border-radius: 8px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  padding: 0 34px 0 6px;
  box-sizing: border-box;
  outline: none;
  -moz-appearance: textfield;
}

.mobile-stepper-input::-webkit-outer-spin-button,
.mobile-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mobile-stepper-input:focus {
  border-color: #4338ca;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

html.theme-dark .mobile-stepper-input {
  background: #0f172a;
  border-color: #6366f1;
  color: #ffffff;
}

.mobile-stepper-unit {
  position: absolute;
  right: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--m-text-muted);
  pointer-events: none;
  user-select: none;
}

/* Collapsible Score Earned Box */
.mobile-collapsible-score-box {
  background: var(--m-success-surface);
  border: 1px solid var(--m-success-border);
  border-radius: var(--m-radius-sm);
  margin: 8px 0;
  overflow: hidden;
  transition: all 0.25s ease;
}

.mobile-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-score-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-score-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.12);
  color: var(--m-success);
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.mobile-score-collapse-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.mobile-collapsible-score-box.is-collapsed .mobile-score-collapse-arrow {
  transform: rotate(-90deg);
}

.mobile-score-collapse-body {
  max-height: 200px;
  opacity: 1;
  padding: 0 12px 10px 12px;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, padding 0.25s ease;
}

.mobile-collapsible-score-box.is-collapsed .mobile-score-collapse-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.mobile-score-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(5, 150, 105, 0.2);
}

.mobile-sheet-notice {
  font-size: 11px;
  color: var(--m-text-secondary);
  line-height: 1.4;
  margin-top: 4px;
  border-top: 1px dashed rgba(5, 150, 105, 0.2);
  padding-top: 4px;
}

/* Mobile Form Controls */
.mobile-form-group {
  margin-bottom: 12px;
}

.mobile-form-group.compact {
  margin-bottom: 8px;
}

.mobile-form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--m-text-secondary);
  margin-bottom: 4px;
}

.mobile-textarea.compact {
  padding: 8px 10px;
  font-size: 12.5px;
  min-height: 38px;
  border-radius: var(--m-radius-sm);
}

.mobile-input, .mobile-select, .mobile-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--m-radius-md);
  padding: 12px 14px;
  color: var(--m-text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html.theme-dark .mobile-input, 
html.theme-dark .mobile-select, 
html.theme-dark .mobile-textarea {
  background: var(--m-bg-elevated);
  border-color: var(--m-border);
}

.mobile-input:focus, .mobile-select:focus, .mobile-textarea:focus {
  border-color: var(--m-border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.mobile-priority-picker {
  display: flex;
  gap: 6px;
}

.mobile-priority-option {
  flex: 1;
  cursor: pointer;
}

.mobile-priority-option input {
  display: none;
}

.mobile-priority-option span {
  display: block;
  text-align: center;
  padding: 8px 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--m-radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--m-text-secondary);
  transition: all 0.2s ease;
}

html.theme-dark .mobile-priority-option span {
  background: var(--m-bg-elevated);
  border-color: var(--m-border);
}

.mobile-priority-option input:checked + span {
  background: #eef2ff;
  border-color: var(--m-primary);
  color: #4338ca;
  font-weight: 700;
}

html.theme-dark .mobile-priority-option input:checked + span {
  background: rgba(79, 70, 229, 0.2);
  color: #a5b4fc;
}

.mobile-target-meta-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--m-text-secondary);
  background: #f8fafc;
  border: 1px solid var(--m-border);
  padding: 5px 10px;
  border-radius: var(--m-radius-sm);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

html.theme-dark .mobile-target-meta-row {
  background: rgba(255, 255, 255, 0.03);
  border: none;
}

/* --------------------------------------------------------------------------
   Mobile Login Screen
   -------------------------------------------------------------------------- */
.mobile-login-wrapper {
  min-height: 100vh;
  padding: max(var(--m-safe-top), 24px) 20px max(var(--m-safe-bottom), 24px) 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--m-bg-app);
}

.mobile-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.mobile-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--m-radius-lg);
  background: var(--m-primary-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
  margin-bottom: 12px;
}

.mobile-login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--m-text-primary);
}

.mobile-login-subtitle {
  font-size: 13px;
  color: var(--m-text-muted);
  margin-top: 4px;
}

.mobile-login-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  padding: 24px 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

html.theme-dark .mobile-login-card {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.mobile-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
}

.mobile-input-wrapper .mobile-input {
  padding-left: 42px;
}

.mobile-input-action-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.mobile-login-footer {
  text-align: center;
  margin-top: 24px;
}

.mobile-switch-link {
  font-size: 13px;
  color: var(--m-text-secondary);
  text-decoration: none;
  display: inline-block;
  padding: 8px 12px;
  font-weight: 600;
  border-radius: var(--m-radius-sm);
  transition: all 0.2s ease;
}

.mobile-switch-link:hover {
  color: var(--m-primary);
  background: rgba(79, 70, 229, 0.08);
}

.mobile-version-tag {
  font-size: 11px;
  color: var(--m-text-muted);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Profile & Action Rows
   -------------------------------------------------------------------------- */
.mobile-profile-card {
  text-align: center;
  padding: 24px 16px;
}

.mobile-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--m-primary-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}

.mobile-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--m-text-primary);
}

.mobile-profile-handle {
  font-size: 12px;
  color: var(--m-primary);
  font-weight: 600;
  margin-top: 2px;
}

html.theme-dark .mobile-profile-handle {
  color: #a5b4fc;
}

.mobile-profile-meta {
  font-size: 12px;
  color: var(--m-text-muted);
  margin-top: 6px;
}

.mobile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--m-border);
  font-size: 13px;
  color: var(--m-text-secondary);
}

.mobile-info-row strong {
  color: var(--m-text-primary);
}

.mobile-info-row:last-child {
  border-bottom: none;
}

.mobile-action-row {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--m-border);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--m-text-primary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-action-row:active {
  opacity: 0.7;
}

.mobile-action-row:last-child {
  border-bottom: none;
}

.mobile-footer-text {
  text-align: center;
  font-size: 11px;
  color: var(--m-text-muted);
  margin-top: 24px;
}

/* Day/Night Theme Switcher Pill */
.mobile-theme-toggle-wrap {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: var(--m-radius-full);
  padding: 3px;
  gap: 2px;
}

html.theme-dark .mobile-theme-toggle-wrap {
  background: var(--m-bg-elevated);
}

.mobile-theme-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--m-radius-full);
  color: var(--m-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-theme-btn.active {
  background: #ffffff;
  color: var(--m-text-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  font-weight: 700;
}

html.theme-dark .mobile-theme-btn.active {
  background: var(--m-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Mobile Toasts
   -------------------------------------------------------------------------- */
.mobile-toast-container {
  position: fixed;
  top: max(var(--m-safe-top), 12px);
  left: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.mobile-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastDrop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-toast.success {
  border-color: rgba(16, 185, 129, 0.6);
}

.mobile-toast.error {
  border-color: rgba(239, 68, 68, 0.6);
}

@keyframes toastDrop {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-skeleton-card {
  height: 120px;
  background: #e2e8f0;
  border-radius: var(--m-radius-lg);
  animation: pulseSkeleton 1.5s infinite;
}

html.theme-dark .mobile-skeleton-card {
  background: rgba(255, 255, 255, 0.04);
}

@keyframes pulseSkeleton {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

/* Alert Boxes */
.mobile-alert {
  padding: 10px 14px;
  border-radius: var(--m-radius-md);
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 500;
}

.mobile-alert-danger {
  background: var(--m-danger-surface);
  border: 1px solid var(--m-danger-border);
  color: var(--m-danger);
}

/* --------------------------------------------------------------------------
   Dashboard & Leaderboard Page Styles
   -------------------------------------------------------------------------- */
.mobile-standing-card {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border-radius: var(--m-radius-lg);
  padding: 16px;
  color: #ffffff;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
  position: relative;
  overflow: hidden;
}

.mobile-standing-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

html.theme-dark .mobile-standing-card {
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.mobile-standing-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-standing-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-standing-info {
  flex: 1;
  min-width: 0;
}

.mobile-standing-sub {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.75);
}

.mobile-standing-name {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-standing-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.mobile-standing-rank {
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
}

.mobile-standing-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.mobile-standing-score-box {
  text-align: right;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-standing-score-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-standing-score-val {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.mobile-standing-unit {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-standing-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   Top 3 Podium Showcase
   -------------------------------------------------------------------------- */
.mobile-podium-section {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 20px 0;
  padding: 0 4px;
}

.mobile-podium-card {
  flex: 1;
  max-width: 115px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.mobile-podium-crown {
  font-size: 20px;
  margin-bottom: -6px;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.4));
  animation: gentleBob 2s ease-in-out infinite;
}

@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.mobile-podium-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #334155;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.mobile-podium-card.rank-1 .mobile-podium-avatar {
  width: 56px;
  height: 56px;
  border: 2.5px solid #f59e0b;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}

.mobile-podium-card.rank-2 .mobile-podium-avatar {
  border-color: #94a3b8;
}

.mobile-podium-card.rank-3 .mobile-podium-avatar {
  border-color: #d97706;
}

html.theme-dark .mobile-podium-avatar {
  background: #1e293b;
  color: #f1f5f9;
}

.mobile-podium-medal {
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 16px;
}

.mobile-podium-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--m-text-primary);
  margin-top: 8px;
  line-height: 1.2;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-podium-score {
  font-size: 11px;
  font-weight: 800;
  color: var(--m-primary);
  margin-top: 2px;
}

.mobile-podium-pillar {
  width: 100%;
  border-radius: 10px 10px 0 0;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.mobile-podium-pillar.pillar-1 {
  height: 64px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.mobile-podium-pillar.pillar-2 {
  height: 48px;
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.mobile-podium-pillar.pillar-3 {
  height: 38px;
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
}

/* --------------------------------------------------------------------------
   Top 10 Leaderboard List Rows
   -------------------------------------------------------------------------- */
.mobile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--m-text-primary);
}

.mobile-participants-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--m-text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

html.theme-dark .mobile-participants-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.mobile-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.mobile-leaderboard-row:active {
  transform: scale(0.99);
}

.mobile-leaderboard-row.is-current-user {
  background: #eef2ff;
  border: 1.5px solid var(--m-primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

html.theme-dark .mobile-leaderboard-row.is-current-user {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(99, 102, 241, 0.5);
}

/* Avatar with Rank Badge Overlaid */
.mobile-board-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  flex-shrink: 0;
}

.mobile-board-avatar.top-1 {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
  color: #b45309;
}

.mobile-board-avatar.top-2 {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #94a3b8;
  color: #334155;
}

.mobile-board-avatar.top-3 {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
  color: #c2410c;
}

html.theme-dark .mobile-board-avatar {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

html.theme-dark .mobile-board-avatar.top-1 {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fde68a;
}

html.theme-dark .mobile-board-avatar.top-2 {
  background: rgba(148, 163, 184, 0.18);
  border-color: #94a3b8;
  color: #e2e8f0;
}

html.theme-dark .mobile-board-avatar.top-3 {
  background: rgba(217, 119, 6, 0.18);
  border-color: #d97706;
  color: #fed7aa;
}

/* Rank Badge directly on Profile Icon */
.mobile-avatar-rank-badge {
  position: absolute;
  bottom: -4px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 999px;
  background: #475569;
  color: #ffffff;
  border: 2px solid var(--m-bg-card);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.mobile-avatar-rank-badge.top-1,
.mobile-avatar-rank-badge.top-2,
.mobile-avatar-rank-badge.top-3 {
  font-size: 13px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border-radius: 50%;
  bottom: -5px;
  right: -6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.mobile-avatar-rank-badge.top-1 {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
}

.mobile-avatar-rank-badge.top-2 {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}

.mobile-avatar-rank-badge.top-3 {
  background: #fff7ed;
  border: 1.5px solid #fdba74;
}

.mobile-avatar-rank-badge.is-me {
  background: var(--m-primary);
  color: #ffffff;
  border-color: var(--m-bg-card);
}

html.theme-dark .mobile-avatar-rank-badge {
  background: #334155;
  color: #f8fafc;
  border-color: var(--m-bg-card);
}

html.theme-dark .mobile-avatar-rank-badge.top-1 {
  background: #291f07;
  border-color: #b45309;
}

html.theme-dark .mobile-avatar-rank-badge.top-2 {
  background: #1e293b;
  border-color: #475569;
}

html.theme-dark .mobile-avatar-rank-badge.top-3 {
  background: #2a1b0c;
  border-color: #9a3412;
}

html.theme-dark .mobile-avatar-rank-badge.is-me {
  background: var(--m-primary);
  color: #ffffff;
  border-color: #1e293b;
}

.mobile-board-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-board-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--m-text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-you-badge {
  font-size: 9.5px;
  font-weight: 800;
  background: var(--m-primary);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.mobile-board-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--m-text-secondary);
}

.mobile-role-tag {
  font-size: 10.5px;
  font-weight: 600;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: capitalize;
}

html.theme-dark .mobile-role-tag {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.mobile-board-tasks {
  font-size: 11px;
  color: var(--m-text-muted);
}

.mobile-board-score {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.mobile-board-score strong {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--m-success);
  line-height: 1.2;
}

.mobile-board-score span {
  font-size: 10px;
  color: var(--m-text-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Logout Confirmation Dialog Sheet
   -------------------------------------------------------------------------- */
.mobile-confirm-sheet {
  max-width: 440px;
  border-radius: 24px 24px 0 0;
}

.mobile-confirm-sheet .mobile-sheet-body {
  text-align: center;
  padding: 24px 20px 28px 20px;
}

.mobile-confirm-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fee2e2;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

html.theme-dark .mobile-confirm-icon-wrap {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.mobile-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--m-text-primary);
  margin: 0 0 8px 0;
}

.mobile-confirm-sub {
  font-size: 13.5px;
  color: var(--m-text-secondary);
  margin: 0 0 22px 0;
  line-height: 1.45;
}

.mobile-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-confirm-btn-logout {
  background: #ef4444;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.mobile-confirm-btn-logout:active {
  transform: scale(0.98);
  background: #dc2626;
}

.mobile-confirm-btn-cancel {
  background: var(--m-bg-card);
  color: var(--m-text-primary);
  border: 1.5px solid var(--m-border);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.mobile-confirm-btn-cancel:active {
  transform: scale(0.98);
  background: var(--m-border);
}

/* ==========================================================================
   POINTS BREAKDOWN (TODAY, MONTH, YEAR, TILL-DATE)
   ========================================================================== */
.mobile-kpi-info-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 7px;
  border-radius: 9999px;
  margin-left: 6px;
  vertical-align: middle;
}

.mobile-points-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.mobile-points-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--m-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-points-card:active {
  transform: scale(0.98);
}

.points-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.points-card-icon {
  font-size: 16px;
}

.points-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--m-text-secondary);
}

.points-card-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--m-text-primary);
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.points-card-meta {
  font-size: 11px;
  color: var(--m-text-muted);
  margin-top: 4px;
}

.points-card-today {
  border-left: 3.5px solid #3b82f6;
}
.points-card-today .points-card-value {
  color: #3b82f6;
}

.points-card-month {
  border-left: 3.5px solid #10b981;
}
.points-card-month .points-card-value {
  color: #10b981;
}

.points-card-year {
  border-left: 3.5px solid #8b5cf6;
}
.points-card-year .points-card-value {
  color: #8b5cf6;
}

.points-card-till-date {
  border-left: 3.5px solid #f59e0b;
}
.points-card-till-date .points-card-value {
  color: #f59e0b;
}

.mobile-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-points-sheet-trigger {
  background: var(--m-primary-surface);
  color: var(--m-primary);
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mobile-points-sheet-trigger:active {
  opacity: 0.8;
}

.mobile-points-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mobile-prof-point-box {
  background: var(--m-bg-elevated);
  border: 1px solid var(--m-border-subtle);
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-prof-point-box.highlight-month {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
.mobile-prof-point-box.highlight-month .prof-point-val {
  color: #10b981;
}

.mobile-prof-point-box.highlight-all {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}
.mobile-prof-point-box.highlight-all .prof-point-val {
  color: #f59e0b;
}

.prof-point-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--m-text-secondary);
  white-space: nowrap;
}

.prof-point-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--m-text-primary);
  margin: 3px 0 1px 0;
  font-feature-settings: "tnum";
}

.prof-point-unit {
  font-size: 10px;
  color: var(--m-text-muted);
}

/* ==========================================================================
   MONTH POINTS STRIP & VIEW REPORT BUTTON (ON TASKS PAGE)
   ========================================================================== */
.mobile-month-points-strip {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--m-shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.mobile-month-points-strip:active {
  transform: scale(0.99);
}

.month-strip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.month-strip-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--m-text-secondary);
  text-transform: uppercase;
}

.month-strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.month-strip-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.month-strip-val {
  font-size: 20px;
  font-weight: 800;
  color: #10b981;
  font-feature-settings: "tnum";
}

.month-strip-unit {
  font-size: 11.5px;
  color: var(--m-text-muted);
  font-weight: 500;
}

.mobile-btn-view-report {
  background: var(--m-primary-surface);
  color: var(--m-primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.12);
  transition: transform 0.15s ease, background 0.15s ease;
}

.mobile-btn-view-report:active {
  transform: scale(0.96);
  background: var(--m-primary);
  color: #ffffff;
}

/* ==========================================================================
   MONTHLY WORK & POINTS CALENDAR REPORT VIEW
   ========================================================================== */
.mobile-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.mobile-report-back-btn {
  background: var(--m-bg-card);
  color: var(--m-text-primary);
  border: 1px solid var(--m-border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.mobile-report-back-btn:active {
  transform: scale(0.96);
  background: var(--m-border);
}

.mobile-report-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--m-text-primary);
  margin: 0;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-report-refresh-btn {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  color: var(--m-text-secondary);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Month Navigation Strip */
.mobile-month-nav-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--m-shadow-sm);
}

.month-nav-arrow {
  background: var(--m-bg-elevated);
  border: 1px solid var(--m-border-subtle);
  color: var(--m-text-primary);
  border-radius: 9px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.month-nav-arrow:active {
  transform: scale(0.92);
}

.month-nav-current {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.month-nav-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--m-text-primary);
}

.month-nav-hint {
  font-size: 11px;
  color: var(--m-text-muted);
}

/* Report Summary Grid */
.mobile-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.report-kpi-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-shadow: var(--m-shadow-sm);
}

.report-kpi-card.highlight-month {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}
.report-kpi-card.highlight-month .report-kpi-value {
  color: #10b981;
}

.report-kpi-card.highlight-all {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}
.report-kpi-card.highlight-all .report-kpi-value {
  color: #f59e0b;
}

.report-kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--m-text-secondary);
}

.report-kpi-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--m-text-primary);
  margin: 2px 0 1px 0;
  font-feature-settings: "tnum";
}

.report-kpi-unit {
  font-size: 10px;
  color: var(--m-text-muted);
}

/* Calendar Card & Grid */
.mobile-calendar-card {
  padding: 12px;
  margin-bottom: 14px;
}

.mobile-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--m-text-muted);
  margin-bottom: 8px;
}

.mobile-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day-cell {
  aspect-ratio: 1 / 1.08;
  border-radius: 8px;
  border: 1px solid var(--m-border-subtle);
  background: var(--m-bg-elevated);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 3px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  user-select: none;
}

.calendar-day-cell:active {
  transform: scale(0.94);
}

.calendar-day-cell.is-empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

/* Day Types */
.calendar-day-cell.type-work {
  background: var(--m-bg-card);
  border-color: var(--m-border);
}

.calendar-day-cell.type-off {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.15);
  opacity: 0.75;
}
.calendar-day-cell.type-off .day-number {
  color: var(--m-text-muted);
}

.calendar-day-cell.type-holiday {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}
.calendar-day-cell.type-holiday .day-number {
  color: #d97706;
  font-weight: 800;
}

.calendar-day-cell.type-leave {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
}
.calendar-day-cell.type-leave .day-number {
  color: #8b5cf6;
}

.calendar-day-cell.is-today {
  border: 2px solid var(--m-primary);
  box-shadow: 0 0 0 1px var(--m-primary);
}

.calendar-day-cell.is-selected {
  outline: 2px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
  background: var(--m-primary-surface);
}

.day-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.day-number {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--m-text-primary);
  line-height: 1;
}

.day-mini-tag {
  font-size: 9px;
  line-height: 1;
}

.day-cell-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.day-points-badge {
  font-size: 8.5px;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1.1;
  white-space: nowrap;
}

.day-tasks-badge {
  font-size: 8px;
  font-weight: 700;
  color: var(--m-text-secondary);
}

/* Legend */
.mobile-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--m-border-subtle);
  font-size: 10.5px;
  color: var(--m-text-secondary);
  justify-content: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.legend-dot.dot-work {
  background: #3b82f6;
}
.legend-dot.dot-holiday {
  background: #f59e0b;
}
.legend-dot.dot-off {
  background: #94a3b8;
}
.legend-dot.dot-leave {
  background: #8b5cf6;
}
.legend-dot.dot-points {
  background: #10b981;
}

/* Selected Day Details Card */
.mobile-day-details-card {
  padding: 14px;
  margin-bottom: 24px;
}

.day-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--m-border-subtle);
}

.day-details-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--m-text-primary);
  margin-bottom: 4px;
}

.day-details-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.day-details-badge.badge-working_day {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.day-details-badge.badge-holiday {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.day-details-badge.badge-off_day {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}
.day-details-badge.badge-leave {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.day-details-score-box {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.day-score-label {
  font-size: 10px;
  color: var(--m-text-muted);
}

.day-score-val {
  font-size: 20px;
  font-weight: 800;
  color: #10b981;
  font-feature-settings: "tnum";
}

.day-score-unit {
  font-size: 10px;
  color: var(--m-text-muted);
}

.day-details-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-day-task-item {
  background: var(--m-bg-elevated);
  border: 1px solid var(--m-border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.day-task-main {
  flex: 1;
}

.day-task-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.day-task-sn {
  font-size: 11px;
  font-weight: 800;
  color: var(--m-primary);
}

.day-task-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--m-text-primary);
}

.day-task-meta {
  font-size: 11px;
  color: var(--m-text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.day-task-notes {
  font-size: 11px;
  color: var(--m-text-muted);
  margin-top: 3px;
  font-style: italic;
}

.day-task-score-pill {
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.mobile-empty-day-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 10px;
  gap: 6px;
}

.empty-day-icon {
  font-size: 24px;
}

.empty-day-msg {
  font-size: 12.5px;
  color: var(--m-text-secondary);
}

/* ==========================================================================
   Today's Performance Report Dialog Card & WhatsApp Sharing
   ========================================================================== */
.today-perf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.today-perf-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.today-perf-dialog-card {
  background: #ffffff;
  border-radius: 22px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.today-perf-modal-backdrop.show .today-perf-dialog-card {
  transform: scale(1) translateY(0);
}

html.theme-dark .today-perf-dialog-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.today-perf-dialog-content {
  padding: 22px 22px 14px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.today-perf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
}

.today-perf-emp-name {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

html.theme-dark .today-perf-emp-name {
  color: #f8fafc;
}

.today-perf-date {
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

html.theme-dark .today-perf-date {
  color: #94a3b8;
}

.today-perf-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecfdf5;
  color: #059669;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

html.theme-dark .today-perf-shift-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.today-perf-score-wrap {
  text-align: right;
  flex-shrink: 0;
}

.today-perf-score-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 2px;
  text-transform: capitalize;
}

.today-perf-score-val {
  font-size: 28px;
  font-weight: 800;
  color: #10b981;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.today-perf-score-unit {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 2px;
}

.today-perf-items-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 16px;
}

.today-perf-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html.theme-dark .today-perf-item-card {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
}

.today-perf-item-info {
  flex: 1;
  min-width: 0;
}

.today-perf-item-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.today-perf-item-idx {
  font-size: 13.5px;
  font-weight: 800;
  color: #4f46e5;
  flex-shrink: 0;
}

html.theme-dark .today-perf-item-idx {
  color: #818cf8;
}

.today-perf-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.theme-dark .today-perf-item-title {
  color: #f1f5f9;
}

.today-perf-item-meta {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

html.theme-dark .today-perf-item-meta {
  color: #94a3b8;
}

.today-perf-item-meta strong {
  color: #1e293b;
}

html.theme-dark .today-perf-item-meta strong {
  color: #e2e8f0;
}

.today-perf-item-pill {
  background: #d1fae5;
  color: #047857;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

html.theme-dark .today-perf-item-pill {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
}

.today-perf-footer {
  padding: 14px 22px 18px 22px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html.theme-dark .today-perf-footer {
  background: #1e293b;
  border-top-color: rgba(255, 255, 255, 0.06);
}

.today-perf-whatsapp-btn {
  background: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: all 0.15s ease;
}

.today-perf-whatsapp-btn:hover {
  background: #20bd5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.today-perf-whatsapp-btn:active {
  transform: scale(0.98);
}

.today-perf-secondary-actions {
  display: flex;
  gap: 8px;
}

.today-perf-copy-btn, .today-perf-close-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.today-perf-copy-btn {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

html.theme-dark .today-perf-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.1);
}

.today-perf-close-btn {
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

html.theme-dark .today-perf-close-btn {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ==================== MOBILE TEAM DELEGATION TABULAR GRID ==================== */
#tabDelegation {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#mobileDelegationContent {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mobile-delegation-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Compact Live Stat Ribbon */
.mobile-team-stat-ribbon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 8px 6px;
  box-shadow: var(--m-shadow-sm);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-team-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.mobile-team-stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--m-border-subtle);
}

.mobile-team-stat-val {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--m-text-primary);
}

.mobile-team-stat-val.stat-team { color: var(--m-primary); }
.mobile-team-stat-val.stat-active { color: var(--m-warning); }
.mobile-team-stat-val.stat-done { color: var(--m-success); }

.mobile-team-stat-lbl {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--m-text-muted);
  margin-top: 2px;
}

/* Tab Navigation Segments */
.mobile-delegation-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--m-bg-elevated);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--m-border-subtle);
  gap: 4px;
}

.mobile-delegation-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--m-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.mobile-delegation-tab-btn.active {
  background: var(--m-bg-card);
  color: var(--m-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Sheet Table Container */
.mobile-sheet-table-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: var(--m-shadow-sm);
}

.mobile-sheet-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}

.mobile-sheet-table thead tr {
  background: var(--m-bg-elevated);
  border-bottom: 1px solid var(--m-border);
}

.mobile-sheet-table th {
  padding: 7px 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--m-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  box-sizing: border-box;
}

.mobile-sheet-table tbody tr {
  border-bottom: 1px solid var(--m-border-subtle);
  transition: background 0.1s ease;
}

.mobile-sheet-table tbody tr:last-child {
  border-bottom: none;
}

.mobile-sheet-table tbody tr:active {
  background: var(--m-primary-surface);
}

.mobile-sheet-table td {
  padding: 7px 4px;
  vertical-align: middle;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.sheet-col-idx {
  width: 22px;
  text-align: center;
  font-weight: 700;
  color: var(--m-text-muted);
  font-size: 10px;
  padding: 7px 2px !important;
}

.sheet-emp-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.sheet-emp-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--m-primary-surface);
  color: var(--m-primary);
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sheet-emp-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.sheet-emp-name {
  font-weight: 700;
  font-size: 11.5px;
  color: var(--m-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sheet-emp-desig {
  font-size: 9.5px;
  color: var(--m-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.2;
}

.sheet-prog-cell {
  text-align: center;
  width: 50px;
  padding: 7px 2px !important;
}

.sheet-prog-val {
  font-size: 10px;
  font-weight: 700;
  color: var(--m-text-secondary);
  font-variant-numeric: tabular-nums;
  display: block;
  white-space: nowrap;
}

.sheet-prog-track {
  width: 100%;
  height: 3px;
  background: var(--m-border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}

.sheet-prog-bar {
  height: 100%;
  background: var(--m-success);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.sheet-action-cell {
  width: 50px;
  text-align: right;
  padding: 7px 4px 7px 0 !important;
}

.sheet-assign-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px 5px;
  font-size: 9.5px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--m-primary);
  background: var(--m-primary-surface);
  color: var(--m-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sheet-assign-btn:active {
  background: var(--m-primary);
  color: #fff;
  transform: scale(0.96);
}

/* ==================== COMPLAINTS MOBILE SHEET & GRID ==================== */
.mobile-complaints-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-complaint-kpi-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 10px 8px;
  text-align: center;
  box-shadow: var(--m-shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-complaint-kpi-card:active {
  transform: scale(0.96);
}

.mobile-complaint-kpi-card.active {
  border-color: var(--m-primary);
  background: var(--m-bg-elevated);
}

.mobile-complaint-kpi-card .kpi-num {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.mobile-complaint-kpi-card .kpi-lbl {
  font-size: 10px;
  color: var(--m-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== NATIVE MOBILE SEARCH BAR & FILTER CHIPS ==================== */
.mobile-native-search-wrap {
  margin-bottom: 10px;
}

.mobile-native-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: 12px;
  padding: 0 12px;
  height: 42px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-native-search-box:focus-within {
  border-color: var(--m-primary);
  background: var(--m-bg-surface, var(--m-bg-card));
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mobile-native-search-icon {
  color: var(--m-text-muted);
  flex-shrink: 0;
  margin-right: 9px;
  transition: color 0.15s ease;
}

.mobile-native-search-box:focus-within .mobile-native-search-icon {
  color: var(--m-primary);
}

.mobile-native-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--m-text-primary);
  outline: none;
  width: 100%;
  padding: 0;
  -webkit-appearance: none;
}

.mobile-native-search-input::placeholder {
  color: var(--m-text-muted);
  font-size: 13px;
  font-weight: 400;
}

.mobile-native-search-clear {
  border: none;
  background: var(--m-border);
  color: var(--m-text-secondary);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: 6px;
  transition: all 0.15s ease;
  line-height: 1;
}

.mobile-native-search-clear:active {
  transform: scale(0.9);
  background: var(--m-text-muted);
  color: #ffffff;
}

/* Quick Filter Chips (iOS/Android native horizontal pill filter row) */
.mobile-native-filter-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.mobile-native-filter-chips::-webkit-scrollbar {
  display: none;
}

.mobile-filter-chip {
  border: 1px solid var(--m-border);
  background: var(--m-bg-card);
  color: var(--m-text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-filter-chip:active {
  transform: scale(0.96);
}

.mobile-filter-chip.active {
  background: var(--m-primary);
  border-color: var(--m-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

html.theme-dark .mobile-native-search-box {
  background: var(--m-bg-elevated);
  border-color: var(--m-border);
}

html.theme-dark .mobile-native-search-box:focus-within {
  background: var(--m-bg-card);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

html.theme-dark .mobile-filter-chip {
  background: var(--m-bg-elevated);
  border-color: var(--m-border);
  color: var(--m-text-secondary);
}

html.theme-dark .mobile-filter-chip.active {
  background: var(--m-primary);
  border-color: var(--m-primary);
  color: #ffffff;
}

/* Mobile Complaint Card Row (Unified Touch-Friendly UX matching mobile-task-card-row) */
.mobile-complaint-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  box-shadow: var(--m-shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 10px;
}

.mobile-complaint-card-row:active {
  transform: scale(0.985);
  background: var(--m-bg-elevated);
}

.mobile-complaint-card-row.card-resolved {
  border-color: var(--m-success-border);
  background: var(--m-success-surface);
}

.mobile-complaint-card-row.card-escalated {
  border-color: var(--m-danger-border);
  background: rgba(220, 38, 38, 0.04);
}

.mobile-complaint-serial-badge {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08);
}

.mobile-complaint-serial-badge.is-resolved {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
  color: #059669;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.08);
}

.mobile-complaint-serial-badge.is-inbox {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.mobile-complaint-serial-badge.is-outbox {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #ddd6fe;
  color: #7c3aed;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.08);
}

.mobile-complaint-serial-badge.is-escalated {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #f87171;
  color: #b91c1c;
  animation: pulse 2s infinite;
}

.mobile-complaint-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-complaint-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  margin-bottom: 2px;
}

.mobile-ticket-code {
  font-family: monospace;
  font-weight: 700;
  color: var(--m-primary);
  font-size: 12px;
  letter-spacing: -0.2px;
}

.mobile-time-text {
  font-size: 11px;
  color: var(--m-text-muted);
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

html.theme-dark .mobile-time-text {
  color: #94a3b8;
}

.mobile-party-pill {
  color: var(--m-text-secondary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.mobile-complaint-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--m-text-primary);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}

.mobile-name-prefix {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--m-text-muted);
  margin-right: 3px;
  letter-spacing: 0.2px;
}

html.theme-dark .mobile-name-prefix {
  color: #94a3b8;
}

.mobile-complaint-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mobile-complaint-action-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--m-text-muted);
  padding-left: 4px;
}

.mobile-action-side-btn {
  border: none;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.mobile-action-side-btn.btn-resolve {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.mobile-action-side-btn.btn-start {
  background: var(--m-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.mobile-action-side-btn.btn-reopen {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.mobile-action-side-btn.btn-view {
  background: var(--m-bg-elevated);
  color: var(--m-text-secondary);
  border: 1px solid var(--m-border);
}

.mobile-action-side-btn:active {
  transform: scale(0.96);
}

/* Dark Theme Overrides for Complaint Cards */
html.theme-dark .mobile-complaint-card-row.card-resolved {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

html.theme-dark .mobile-complaint-card-row.card-escalated {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.3);
}

html.theme-dark .mobile-complaint-serial-badge.is-inbox {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

html.theme-dark .mobile-complaint-serial-badge.is-outbox {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
}

html.theme-dark .mobile-complaint-serial-badge.is-resolved {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

html.theme-dark .mobile-complaint-serial-badge.is-escalated {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

/* Legacy Card Class Support */
.mobile-complaint-card {
  background: var(--m-bg-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--m-shadow-sm);
}

.mobile-complaint-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mobile-complaint-parties {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--m-text-muted);
  margin-bottom: 6px;
}

.mobile-complaint-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--m-text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.mobile-complaint-grid-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--m-bg-elevated);
  border: 1px solid var(--m-border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 11px;
}

.mobile-complaint-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Desktop Smartphone Viewport Simulation & Component Containment
   When accessed on desktop screens (> 480px), render as a centered,
   authentic smartphone frame with docked navigation, contained sheets & modals,
   and clean bezel (no intrusive fake notch cutting into header elements).
   ========================================================================== */
@media (min-width: 481px) {
  body.mobile-body {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #0b0f19 !important;
    background-image: radial-gradient(circle at 50% 45%, rgba(79, 70, 229, 0.16) 0%, rgba(15, 23, 42, 0.96) 100%) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  html.theme-dark body.mobile-body {
    background-color: #030712 !important;
    background-image: radial-gradient(circle at 50% 45%, rgba(99, 102, 241, 0.12) 0%, rgba(2, 6, 23, 0.98) 100%) !important;
  }

  /* Centered Authentic Mobile Smartphone Frame */
  .mobile-app-shell {
    width: 100% !important;
    max-width: 430px !important;
    height: min(92vh, 880px) !important;
    max-height: 880px !important;
    margin: auto !important;
    border-radius: 42px !important;
    border: 10px solid #1e293b !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: var(--m-bg-app) !important;
  }

  html.theme-dark .mobile-app-shell {
    border-color: #0f172a !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  }

  /* Remove any fake notch that collides with header text */
  .mobile-app-shell::before {
    display: none !important;
    content: none !important;
  }

  /* Sleek Outer Speaker Slit on Top Chassis Bezel (Doesn't touch screen content) */
  .mobile-app-shell::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: #334155;
    border-radius: 2px;
    z-index: 100;
    pointer-events: none;
  }

  /* Clean top app bar without extra padding */
  .mobile-app-bar {
    padding-top: 10px !important;
    flex-shrink: 0 !important;
  }

  /* Scrollable Content inside Phone Shell */
  .mobile-main-content {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: calc(76px + var(--m-safe-bottom)) !important;
  }

  /* Dock Bottom Navigation inside Phone Frame (NEVER span entire desktop screen) */
  .mobile-bottom-nav {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 0 !important;
    border-bottom-left-radius: 32px !important;
    border-bottom-right-radius: 32px !important;
    z-index: 50 !important;
  }

  /* Keep FAB inside Phone Frame */
  .mobile-fab {
    position: absolute !important;
    bottom: calc(72px + var(--m-safe-bottom)) !important;
    right: 20px !important;
    z-index: 45 !important;
  }

  /* Keep Bottom Sheets inside Phone Frame */
  .mobile-sheet-backdrop {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 32px !important;
    z-index: 55 !important;
  }

  .mobile-bottom-sheet {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-left-radius: 32px !important;
    border-bottom-right-radius: 32px !important;
    z-index: 60 !important;
  }

  /* Keep Performance Modal dialog inside Phone Frame */
  .today-perf-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 32px !important;
    z-index: 70 !important;
  }

  /* Toast Notification Container inside/aligned to phone frame */
  .mobile-toast-container {
    position: fixed !important;
    top: calc((100vh - min(92vh, 880px)) / 2 + 16px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 32px) !important;
    max-width: 390px !important;
    z-index: 9999 !important;
  }
}



