/* ==========================================================================
   citiSENSE Citizen PWA Premium CSS System
   ========================================================================== */

/* Color & Design Tokens (Inherited & Adapted from Portal) */
:root {
  --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Color Palette (Theme Dark Slate & Emerald) */
  --bg-app: #0b0f19;
  --bg-card: #131926;
  --bg-card-hover: #1b2336;
  --bg-input: #1e2638;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;
  
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --secondary: #3b82f6;
  --secondary-hover: #2563eb;
  
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  
  --text-main: #f8fafc;
  --text-medium: #cbd5e1;
  --text-muted: #64748b;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;
}

/* Light Theme Variables */
body.light-theme {
  --bg-app: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #e2e8f0;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: #059669;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-glow: rgba(5, 150, 105, 0.2);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.2);
  --text-main: #0f172a;
  --text-medium: #334155;
  --text-muted: #64748b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* General Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background-color: #05070c;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container simulating a mobile phone viewport on desktop */
.phone-shell {
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: background-color var(--transition-normal);
}

@media (min-width: 577px) {
  .phone-shell {
    height: min(880px, calc(100dvh - 32px));
    max-height: min(880px, calc(100dvh - 32px));
    border-radius: 36px;
    border: 8px solid #222530;
    margin: auto;
  }
  
  body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, #111827 0%, #030712 100%);
    z-index: -1;
  }
}

/* Top Phone Notch / Status Bar Mock (Deprecated / Hidden) */
.phone-header-bar {
  display: none !important;
}
.phone-header-bar i {
  margin-left: 5px;
}

/* App Header styling */
.app-header {
  height: 56px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 20000;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.56rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.logo-text {
  color: var(--text-main);
}

.logo-text .highlight {
  color: var(--primary);
}

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

.header-btn {
  background: none;
  border: none;
  color: var(--text-medium);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.header-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--primary);
}

/* Profile Dropdown Menu styling */
.header-dropdown {
  position: relative;
}

#header-user-menu-btn {
  position: relative;
  z-index: 20002;
}

.dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20001;
  background: transparent;
  cursor: default;
}

.dropdown-backdrop.hidden {
  display: none !important;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 36px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  min-width: 140px;
  box-shadow: var(--shadow-lg);
  z-index: 20002;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  text-align: left;
  width: 100%;
  background: none;
  border: none;
}

.dropdown-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--primary);
}

/* Main Content Container */
.app-content {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Tab Panel Base */
.tab-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Pull-to-Refresh Indicator */
.pull-to-refresh-indicator {
  width: 100%;
  height: 0px;
  overflow: hidden;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: none;
  background: transparent;
  flex-shrink: 0;
  overflow-anchor: none;
  will-change: height, opacity;
}

.pull-to-refresh-indicator .ptr-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pull-to-refresh-indicator.ptr-ready .ptr-content {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.pull-to-refresh-indicator .ptr-icon {
  font-size: 0.95rem;
  display: inline-block !important;
  transform-origin: center center;
  will-change: transform;
}


/* Auth Screens */
.auth-container {
  display: flex;
  flex-direction: column;
  padding: 24px;
  justify-content: center;
  min-height: 100%;
  background: radial-gradient(circle at 50% 10%, var(--bg-card) 0%, var(--bg-app) 100%);
}

.auth-hero {
  text-align: center;
  margin-bottom: 32px;
}
.auth-hero i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px var(--primary-glow));
}
.auth-hero h2 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.auth-hero p {
  color: var(--text-muted);
}

.social-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid var(--border-color);
}

.btn-facebook {
  background-color: #1877f2;
  color: white;
  border: none;
}
.btn-facebook:hover {
  background-color: #166fe5;
}

.btn-google {
  background-color: #ea4335;
  color: white;
  border: none;
}
.btn-google:hover {
  background-color: #e03729;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-card-hover);
}

.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  margin: 16px 0;
  font-size: 0.8rem;
}
.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-separator:not(:empty)::before {
  margin-right: .5em;
}
.auth-separator:not(:empty)::after {
  margin-left: .5em;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none !important;
}

.btn-primary.btn-loading,
.btn-loading {
  opacity: 0.85 !important;
  cursor: wait !important;
  pointer-events: none !important;
}

.btn-block {
  width: 100%;
}

.text-center-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.text-center-link a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

/* Welcome Permissions Screen */
.perm-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.perm-item:last-child {
  border-bottom: none;
}

.perm-details {
  display: flex;
  align-items: center;
  gap: 12px;
}
.perm-details i {
  font-size: 1.25rem;
  color: var(--primary);
  width: 24px;
}
.perm-title {
  font-weight: 600;
  font-size: 0.9rem;
}
.perm-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-medium);
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* Bottom Tab Bar */
.bottom-tab-bar {
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  min-height: calc(60px + env(safe-area-inset-bottom, 0px));
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  z-index: 10000;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  width: 100%;
}

.tab-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  padding: 4px 2px;
}

.tab-btn i {
  font-size: 1.15rem;
  line-height: 1;
}

.tab-btn.active {
  color: var(--primary);
}

/* Profile Panel (Home Page Top) */
.user-profile-summary {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-app) 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.profile-avatar-fallback {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.profile-info {
  flex-grow: 1;
}

.profile-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.profile-details {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-rank-badge {
  background-color: var(--success-bg);
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.user-stats-bar {
  display: flex;
  justify-content: space-around;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  font-size: 0.8rem;
}

.stat-item {
  text-align: center;
}
.stat-item span {
  display: block;
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}
.stat-item label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Staff Profile Summary Stats Container (Issues vs Announcements Groups) */
.staff-summary-stats-container {
  display: flex;
  align-items: stretch;
  gap: 10px;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.staff-stats-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-sizing: border-box;
}

.staff-stats-group-issues {
  flex: 3;
}

.light-theme .staff-stats-group-issues {
  background: transparent !important;
  border: none !important;
}

.staff-stats-group-announcements {
  flex: 2;
}

.light-theme .staff-stats-group-announcements {
  background: transparent !important;
  border: none !important;
}

/* Vertical Separator between Issues and Announcements */
.staff-stats-divider {
  width: 1px;
  background-color: var(--border-color);
  align-self: stretch;
  margin: 2px 0;
  flex-shrink: 0;
  opacity: 0.8;
}

body.light-theme .staff-stats-divider {
  background-color: rgba(0, 0, 0, 0.12);
}

.staff-stats-group-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  padding-left: 2px;
}

.staff-stats-group-badge i {
  font-size: 0.60rem;
}

.staff-stats-group-issues .staff-stats-group-badge {
  color: var(--primary);
}

.staff-stats-group-announcements .staff-stats-group-badge {
  color: #f59e0b;
}

.light-theme .staff-stats-group-announcements .staff-stats-group-badge {
  color: #d97706;
}

.staff-stats-items-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.staff-stats-group .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.staff-stats-group-issues .stat-item span {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
}

.staff-stats-group-announcements .stat-item span {
  color: #f59e0b;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
}

.light-theme .staff-stats-group-announcements .stat-item span {
  color: #d97706;
}

.staff-stats-group .stat-item label {
  color: var(--text-muted);
  font-size: 0.64rem;
  display: block;
  margin-top: 1px;
  line-height: 1;
}

/* Feed Cards */
.feed-content {
  padding: 16px 16px 36px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.issue-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.issue-card:hover {
  border-color: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.card-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.card-title-sec h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.card-title-sec p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-reporter-comment {
  padding: 0 16px 10px 16px;
  margin-top: -2px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
  box-sizing: border-box;
}

.card-reporter-comment-text {
  font-size: 0.8rem;
  color: var(--text-medium);
  font-style: italic;
  line-height: 1.35;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-height: calc(1.35em * 2);
  text-overflow: ellipsis;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.light-theme .card-reporter-comment {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.severity-pill {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--warning-bg);
  color: var(--warning);
}

.severity-pill.high {
  background-color: var(--danger-bg);
  color: var(--danger);
}

.severity-pill.low {
  background-color: var(--success-bg);
  color: var(--primary);
}

.card-headline-msg {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.card-headline-msg.headline-new {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.08) 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.card-headline-msg.headline-new i {
  color: #3b82f6;
  font-size: 0.85rem;
}

.card-headline-msg.headline-completed {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.08) 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.card-headline-msg.headline-completed i {
  color: #10b981;
  font-size: 0.85rem;
}

.card-headline-msg.headline-volunteer {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.18) 0%, rgba(5, 150, 105, 0.06) 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.card-headline-msg.headline-volunteer i {
  color: #10b981;
  font-size: 0.85rem;
}

body.light-theme .card-headline-msg.headline-new {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.6) 100%);
  border-bottom: 1px solid rgba(147, 197, 253, 0.7);
  color: #1d4ed8;
}

body.light-theme .card-headline-msg.headline-new i {
  color: #2563eb;
}

body.light-theme .card-headline-msg.headline-completed {
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.6) 100%);
  border-bottom: 1px solid rgba(110, 231, 183, 0.7);
  color: #047857;
}

body.light-theme .card-headline-msg.headline-completed i {
  color: #059669;
}

body.light-theme .card-headline-msg.headline-volunteer {
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.6) 100%);
  border-bottom: 1px solid rgba(110, 231, 183, 0.7);
  color: #047857;
}

body.light-theme .card-headline-msg.headline-volunteer i {
  color: #059669;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  min-height: 160px;
  background-color: #10141e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Framed feed media container for Home feed widgets & Task cards */
.card-image-wrapper.feed-media-frame {
  width: calc(100% - 24px) !important;
  margin: 4px 12px 6px 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  background-color: #080c14 !important;
  overflow: hidden !important;
  max-height: 850px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
body.light-theme .card-image-wrapper.feed-media-frame {
  background-color: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.card-image-wrapper.feed-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-image-wrapper.feed-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.card-map-placeholder i {
  font-size: 2.5rem;
  color: var(--primary);
}

.card-overlay-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: white;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.card-stats {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-actions {
  display: flex;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.01);
}

.card-action-btn {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-medium);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.card-action-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--primary);
}

.card-action-btn.active {
  color: var(--primary);
}

/* Home feed widget actions: match Issue Details button colours so they stand out */
.card-actions .card-action-btn:nth-child(1):not(:disabled),
.card-actions .card-action-btn:nth-child(1):hover {
  color: #eab308;
}
.card-actions .card-action-btn:nth-child(2) {
  color: var(--primary);
}

.card-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Map Views */
.map-view-container {
  flex-grow: 1;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-wrapper {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background-color: #0c0e14;
  z-index: 1;
}

.map-floating-filters {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-select-filter {
  flex: 1 1 calc(50% - 4px);
  min-width: 120px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: normal;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

/* Map Bottom Swipe Widget */
.map-bottom-widget {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideUp 0.3s ease-out;
}

.widget-main {
  display: flex;
  gap: 12px;
}

.widget-img {
  width: 70px;
  height: 70px;
  border-radius: var(--border-radius-md);
  object-fit: cover;
  background-color: #10141e;
}

.widget-info {
  flex-grow: 1;
  min-width: 0;
}

.widget-info h5 {
  font-size: 0.9rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.widget-btn {
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background-color: var(--bg-input);
  color: var(--text-medium);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}
.widget-btn:hover {
  background-color: var(--primary);
  color: white;
}
.widget-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Detail Screen Overlay */
.screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-app);
  z-index: 30000;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease-out;
}

.overlay-header {
  height: 56px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  flex-shrink: 0;
}

.overlay-title {
  font-size: 1.1rem;
  font-weight: 700;
  flex-grow: 1;
}

.overlay-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hide native PiP, casting, overflow and enhancement overlays */
video::-webkit-media-controls-picture-in-picture-button {
  display: none !important;
}
video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}
video::-webkit-media-controls-overflow-button {
  display: none !important;
}
video::-webkit-media-controls-cast-button {
  display: none !important;
}
video::-internal-media-controls-download-button {
  display: none !important;
}
#resolve-preview-overlay img,
#resolve-preview-overlay video,
#report-form-overlay img,
#report-form-overlay video {
  -webkit-user-drag: none;
  user-select: none;
}

/* Report Tab (Camera Simulator) */
.camera-container {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  background-color: #000000;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.camera-preview {
  width: 100%;
  flex: 1 1 0%;
  min-height: 0;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Camera Permission Card & Interactive Prompts */
.camera-permission-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
  transition: var(--transition-normal);
}

.perm-card-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 22px 18px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease-out;
}

.perm-icon-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.perm-icon-wrapper.blocked {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

.perm-main-icon {
  font-size: 1.6rem;
  color: var(--primary);
}

.perm-icon-wrapper.blocked .perm-main-icon {
  color: var(--warning);
}

.perm-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.perm-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.perm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.perm-btn-grant {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 0 15px var(--primary-glow);
  cursor: pointer;
  border: none;
  background: var(--primary);
  color: #ffffff;
  transition: var(--transition-fast);
}

.perm-btn-grant:hover {
  background: var(--primary-hover);
}

.perm-secondary-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.perm-btn-alt {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.perm-btn-alt:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* Blocked Guide */
.camera-blocked-guide {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  font-size: 0.76rem;
}

.guide-header {
  font-weight: 700;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.guide-steps {
  color: var(--text-medium);
  line-height: 1.45;
}

.guide-steps ol {
  margin: 0;
  padding-left: 18px;
}

.guide-steps li {
  margin-bottom: 3px;
}

.guide-steps b {
  color: var(--text-main);
}

.camera-grid-lines {
  display: none;
}

/* 3:4 Viewfinder Focus Frame */
.camera-viewfinder-wrapper {
  position: absolute;
  top: 36px;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  container-type: size;
}

.camera-viewfinder-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  width: min(100%, calc(100cqh * 3 / 4));
  max-width: 100%;
  max-height: 100%;
  height: auto;
  border-top: 1.5px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
  border-left: 1.5px solid rgba(255, 255, 255, 0.35);
  border-right: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.58);
  pointer-events: none;
  transition: all 0.25s ease;
}

.camera-viewfinder-wrapper.profile-mode .camera-viewfinder-frame {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  width: min(260px, calc(100% - 40px));
  border: 2px solid var(--primary);
}
.camera-viewfinder-wrapper.profile-mode .viewfinder-aspect-badge,
.camera-viewfinder-wrapper.profile-mode .viewfinder-grid-lines,
.camera-viewfinder-wrapper.profile-mode .viewfinder-corner,
.camera-viewfinder-wrapper.profile-mode .viewfinder-crosshair {
  display: none !important;
}

/* Corner Framing Brackets (Reticles) */
.viewfinder-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--primary);
  border-style: solid;
  pointer-events: none;
}
.viewfinder-corner.top-left {
  top: -2px;
  left: 0;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 0;
}
.viewfinder-corner.top-right {
  top: -2px;
  right: 0;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 0;
}
.viewfinder-corner.bottom-left {
  bottom: -2px;
  left: 0;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 0;
}
.viewfinder-corner.bottom-right {
  bottom: -2px;
  right: 0;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 0;
}

/* Rule of Thirds Grid inside 3:4 Frame */
.viewfinder-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 0;
  overflow: hidden;
}
.viewfinder-grid-lines::before {
  content: "";
  position: absolute;
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}
.viewfinder-grid-lines::after {
  content: "";
  position: absolute;
  left: 33.33%;
  right: 33.33%;
  top: 0;
  bottom: 0;
  border-left: 1px dashed rgba(255, 255, 255, 0.25);
  border-right: 1px dashed rgba(255, 255, 255, 0.25);
}

/* Center crosshair */
.viewfinder-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.viewfinder-crosshair::before,
.viewfinder-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
}
.viewfinder-crosshair::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
}
.viewfinder-crosshair::after {
  left: 6px;
  top: 0;
  width: 2px;
  height: 14px;
}

/* Frame aspect badge */
.viewfinder-aspect-badge {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.camera-overlay-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: auto;
}

#camera-resolve-back-btn {
  z-index: 101;
  position: relative;
  pointer-events: auto;
}

#camera-resolve-back-action-btn {
  z-index: 102;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
}

.camera-back-pill-btn {
  background: rgba(11, 15, 25, 0.85);
  color: #10b981;
  border: 1.5px solid #10b981;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: auto;
  min-width: 0;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  z-index: 102;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.camera-back-pill-btn:hover,
.camera-back-pill-btn:active {
  background: #10b981;
  color: #ffffff;
}

.camera-back-pill-btn i {
  color: inherit;
  font-size: 0.85rem;
}

.camera-mode-badge {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 6px 12px;
  border-radius: 20px;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.camera-scroller-sec {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

.camera-scroll-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  width: 100%;
  padding: 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.camera-scroll-container::-webkit-scrollbar {
  display: none;
}

.camera-scroll-item {
  scroll-snap-align: center;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-fast);
  user-select: none;
}

.camera-scroll-item.active {
  background-color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 10px var(--primary-glow);
}

.camera-subissue-item {
  scroll-snap-align: center;
  background-color: rgba(0, 0, 0, 0.65);
  color: white;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  transition: var(--transition-fast);
  user-select: none;
}

.camera-subissue-item.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 10px var(--primary-glow);
}

.camera-controls {
  height: 86px;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 24px 6px 24px;
  z-index: 10;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.camera-aux-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  width: 52px;
}

.camera-aux-wrapper:hover .camera-btn-aux {
  background-color: rgba(255, 255, 255, 0.2);
}

.camera-aux-wrapper:hover .camera-aux-label {
  color: var(--primary);
}

.camera-aux-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  user-select: none;
  transition: color 0.2s ease;
}

.camera-btn-aux {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.camera-shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 4px solid #333;
}
.camera-shutter-btn:active {
  transform: scale(0.95);
}
.camera-shutter-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid #000;
  transition: background-color 0.2s;
}
.camera-shutter-inner.recording {
  background-color: var(--danger);
  border-radius: 8px;
  width: 32px;
  height: 32px;
}

/* Report Form Screen */
.report-details-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#report-media-preview-container {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 140px;
  max-height: 600px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background-color: #10141e;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-photo-preview {
  width: 100% !important;
  height: auto !important;
  max-height: 600px !important;
  border-radius: var(--border-radius-lg);
  object-fit: contain !important;
  background-color: #10141e;
  display: block;
}

.location-map-toggle-wrapper {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.report-location-map {
  width: 100%;
  height: 100%;
}

.location-details-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  margin-top: 6px;
  min-height: 46px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

/* Leaderboard & Summaries */
.leaderboard-toggle-header {
  padding: 16px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toggle-group {
  display: flex;
  background-color: var(--bg-input);
  border-radius: var(--border-radius-md);
  padding: 3px;
  border: 1px solid var(--border-color);
}

.toggle-btn {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: none;
}

.toggle-btn.active {
  background-color: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
  transition: var(--transition-fast);
}

.leaderboard-row:first-child {
  border-top-left-radius: var(--border-radius-md);
  border-top-right-radius: var(--border-radius-md);
}
.leaderboard-row:last-child {
  border-bottom-left-radius: var(--border-radius-md);
  border-bottom-right-radius: var(--border-radius-md);
  border-bottom: none;
}

.leaderboard-row.pinned-row {
  border: 2px solid var(--primary);
  background-color: rgba(16, 185, 129, 0.05);
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.row-rank {
  width: 24px;
  font-weight: 700;
  text-align: center;
}

.row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.row-info {
  flex-grow: 1;
  min-width: 0;
}

.row-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.row-score-stats {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  text-align: center;
  flex-shrink: 0;
}

.row-stat-col {
  display: flex;
  flex-direction: column;
  min-width: 22px;
  align-items: center;
}
.row-stat-col .val {
  font-weight: 700;
  color: var(--text-main);
}
.row-stat-col .lbl {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* Category drill down */
.category-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.category-row {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.category-row:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(16, 185, 129, 0.15);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.category-info i {
  color: var(--primary);
  font-size: 1.1rem;
  width: 20px;
}
.category-title {
  font-weight: 600;
}

.category-stats-pills {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
}

.cat-pill {
  padding: 2px 6px;
  border-radius: 6px;
  background-color: var(--bg-input);
}
.cat-pill.reported {
  color: var(--secondary);
}
.cat-pill.upvoted {
  color: var(--warning);
}
.cat-pill.resolved {
  color: #10b981;
}
.cat-pill.closed {
  color: #a855f7;
}

/* Modal Popup Dialog box */
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 40000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 380px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* PWA Add to Home Screen Modal Theme-Aware Logo */
.pwa-install-logo-wrap {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pwa-install-logo-tile {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  overflow: hidden;
  background-color: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.pwa-install-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.35));
  transition: filter var(--transition-normal);
}

.pwa-install-brand-name {
  font-size: 1.35rem;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Light Theme overrides for PWA Install Logo */
body.light-theme .pwa-install-logo-tile {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.18);
}

body.light-theme .pwa-install-logo-img {
  filter: drop-shadow(0 2px 6px rgba(5, 150, 105, 0.22)) brightness(0.96);
}

/* Report Confirmation Modal Styling */
.report-confirm-card {
  max-width: 440px;
  width: 100%;
  max-height: calc(100dvh - 36px);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg, 14px);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  animation: scaleUp 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.report-confirm-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.report-confirm-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-confirm-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-confirm-statement-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--border-radius-md, 10px);
  padding: 12px 16px;
  text-align: left;
}

.report-confirm-statement-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.report-confirm-statement-row {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.55;
}

.report-confirm-statement-row strong,
.report-confirm-highlight,
.report-confirm-statement-text strong {
  color: var(--primary);
  font-weight: 700;
}

.report-confirm-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.report-confirm-media-container {
  position: relative;
  width: 100%;
  max-height: 200px;
  min-height: 110px;
  border-radius: var(--border-radius-md, 8px);
  overflow: hidden;
  background: #0b0f19;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-confirm-media-img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.report-confirm-media-video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.report-confirm-no-media {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.report-confirm-description-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 8px);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.45;
  word-break: break-word;
  max-height: 100px;
  overflow-y: auto;
}

.report-confirm-location-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 8px);
  padding: 10px 12px;
}

.report-confirm-ward-row {
  margin-bottom: 4px;
  font-size: 0.88rem;
  color: var(--text-main);
}

.report-confirm-ward-row strong {
  color: var(--primary);
  font-weight: 700;
}

body.light-theme .report-confirm-location-box {
  background: #f8fafc;
}

body.light-theme .report-confirm-statement-box {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
}

.report-confirm-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  background-color: var(--bg-card);
  flex-shrink: 0;
}

#locate-home-modal .modal-content-card {
  height: calc(100vh * 2 / 3);
  height: calc(100dvh * 2 / 3);
  max-height: 90vh;
  min-height: 380px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  box-sizing: border-box;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px 0;
  max-height: 200px;
  overflow-y: auto;
}

.modal-list-item {
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.modal-list-item:hover {
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
}

/* Service Not Available / Access Denied page overlays */
.access-denied-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 15, 25, 0.96);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  text-align: center;
  color: var(--text-main);
  animation: fadeIn 0.3s ease-out;
}
.access-denied-overlay i {
  font-size: 3rem;
  color: var(--warning);
  margin-bottom: 16px;
}
.access-denied-overlay h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.access-denied-overlay p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 280px;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

/* Volunteer Badge attached against Profile Pic / Avatar */
.avatar-badge-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.volunteer-badge-pip {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #10b981;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: lowercase;
  font-weight: 800;
  line-height: 1;
  border: 2px solid var(--bg-card, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
}

.avatar-badge-wrapper.size-50 .volunteer-badge-pip {
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  bottom: -1px;
  right: -1px;
  border-width: 2px;
}

.avatar-badge-wrapper.size-40 .volunteer-badge-pip {
  width: 16px;
  height: 16px;
  font-size: 0.6rem;
  bottom: -1px;
  right: -1px;
  border-width: 2px;
}

.avatar-badge-wrapper.size-32 .volunteer-badge-pip {
  width: 14px;
  height: 14px;
  font-size: 0.52rem;
  bottom: -2px;
  right: -2px;
  border-width: 1.5px;
}

.avatar-badge-wrapper.size-28 .volunteer-badge-pip {
  width: 13px;
  height: 13px;
  font-size: 0.48rem;
  bottom: -2px;
  right: -2px;
  border-width: 1.5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9999px;
  line-height: 1;
}

.badge-open,
.badge-unassigned {
  background-color: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.badge-assigned {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-field-visit {
  background-color: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.badge-work-order {
  background-color: rgba(163, 230, 53, 0.15);
  color: #a3e635;
  border: 1px solid rgba(163, 230, 53, 0.35);
}

.badge-in-progress,
.badge-work-in-progress {
  background-color: rgba(132, 204, 22, 0.15);
  color: #84cc16;
  border: 1px solid rgba(132, 204, 22, 0.35);
}

.badge-citizen-verification,
.badge-verification,
.badge-partially-resolved,
.badge-partially-verified {
  background-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.badge-completed,
.badge-closed,
.badge-resolved {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

body.light-theme .badge-citizen-verification,
body.light-theme .badge-verification,
body.light-theme .badge-partially-resolved,
.badge-partially-verified {
  background-color: rgba(5, 150, 105, 0.12);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

#map-selected-issue-widget .badge-partially-resolved,
.badge-partially-verified {
  background-color: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

body.light-theme .badge-completed,
body.light-theme .badge-closed,
body.light-theme .badge-resolved {
  background-color: rgba(5, 150, 105, 0.12);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

body.light-theme .badge-success {
  background-color: var(--success-bg);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.badge-expired {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

body.light-theme .badge-expired {
  background-color: rgba(100, 116, 139, 0.12);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.25);
}

.badge-deleted {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

body.light-theme .badge-deleted {
  background-color: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}

.toast {
  position: fixed;
  top: 24px;
  left: 20px;
  right: 20px;
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-card, #131926);
  color: var(--text-main, #f8fafc);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  padding: 14px 18px;
  border-radius: var(--border-radius-md, 10px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInDown 0.3s ease-out;
}

.toast i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast span {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-main, #f8fafc);
}

.toast.success {
  border-left: 4px solid var(--success, #10b981);
}
.toast.success i {
  color: var(--success, #10b981) !important;
}

.toast.warning {
  border-left: 4px solid var(--warning, #f59e0b);
}
.toast.warning i {
  color: var(--warning, #f59e0b) !important;
}

.toast.danger {
  border-left: 4px solid var(--danger, #f43f5e);
}
.toast.danger i {
  color: var(--danger, #f43f5e) !important;
}

/* Light Theme Toast Overrides */
body.light-theme .toast {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .toast span {
  color: #0f172a !important;
}

body.light-theme .toast.success {
  border-left-color: var(--success, #059669) !important;
}

body.light-theme .toast.warning {
  border-left-color: var(--warning, #d97706) !important;
}

body.light-theme .toast.danger {
  border-left-color: var(--danger, #e11d48) !important;
}

/* Leaflet Map Customizations */
.leaflet-popup-content-wrapper {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
  border-radius: 10px !important;
}
.leaflet-popup-tip {
  background-color: var(--bg-card) !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

path.leaflet-interactive:focus {
  outline: none !important;
}

/* Premium Swipable Media Carousel Styling */
.media-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.media-carousel-slides {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.media-carousel-slides::-webkit-scrollbar {
  display: none;
}
.media-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  background-color: #000;
}
.media-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.media-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background-color: #000;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
.carousel-btn-left {
  left: 8px;
}
.carousel-btn-right {
  right: 8px;
}
.carousel-indicators {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}
#widget-issue-media-container .carousel-indicators {
  bottom: 4px;
}
#widget-issue-media-container .carousel-dot {
  width: 4px;
  height: 4px;
}
#widget-issue-media-container .media-slide video {
  pointer-events: none; /* disable full controls on mini video */
}
#widget-issue-media-container img,
#widget-issue-media-container video,
#widget-issue-media-container .media-slide img,
#widget-issue-media-container .media-slide video {
  object-fit: contain !important;
  background-color: #000;
}

#detail-photo-pane,
#detail-photo-pane .media-carousel,
#detail-photo-pane .media-carousel-slides,
#detail-photo-pane .media-slide,
.card-photo-pane,
.card-photo-pane .media-carousel,
.card-photo-pane .media-carousel-slides,
.card-photo-pane .media-slide,
.card-map-pane {
  width: 100% !important;
  height: 100% !important;
}

#detail-photo-pane img,
#detail-photo-pane .media-slide img,
.card-photo-pane img,
.card-photo-pane .media-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

#detail-photo-pane video,
#detail-photo-pane .media-slide video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  background-color: #000;
}

.completion-media-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

#widget-issue-media-container .completion-media-badge,
#map-selected-issue-widget .completion-media-badge,
.widget-img .completion-media-badge {
  bottom: 3px;
  left: 3px;
  font-size: 0.44rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0;
  line-height: 1.1;
  max-width: calc(100% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.resolved-media-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 8px;
  background: #10b981;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

#widget-issue-media-container .resolved-media-badge,
#map-selected-issue-widget .resolved-media-badge,
.widget-img .resolved-media-badge {
  bottom: 3px;
  left: 3px;
  font-size: 0.44rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0;
  line-height: 1.1;
  max-width: calc(100% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}



/* Hide scrollbars for a clean, native app appearance */
.app-content::-webkit-scrollbar,
.tab-panel::-webkit-scrollbar,
.overlay-body::-webkit-scrollbar,
.modal-list::-webkit-scrollbar {
  display: none;
}

.app-content,
.tab-panel,
.overlay-body,
.modal-list {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* ==========================================================================
   Help & FAQs Overlay & Accordion Styles
   ========================================================================== */
#faq-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  z-index: 30000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.faq-container {
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  flex: 1;
}

.faq-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.faq-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.faq-search-box i.fa-magnifying-glass {
  color: var(--text-muted);
  margin-right: 8px;
  font-size: 0.85rem;
}

.faq-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.82rem;
  color: var(--text-main);
  font-family: inherit;
}

.faq-search-box input::placeholder {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.faq-search-box #faq-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 2px;
  flex-shrink: 0;
}

.faq-toolbar-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.faq-toggle-all-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-medium);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.faq-toggle-all-btn:hover {
  background-color: var(--bg-card);
  color: var(--primary);
  border-color: var(--primary);
}

.faq-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.faq-section.active {
  border-color: rgba(16, 185, 129, 0.4);
}

.faq-section-header {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  text-align: left;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
  border: none;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  line-height: 1.3;
}

.faq-section-header:hover {
  background-color: rgba(16, 185, 129, 0.14);
  color: var(--primary);
}

.faq-section.active .faq-section-header {
  border-bottom: 1px solid var(--border-color);
  color: var(--primary);
  background-color: rgba(16, 185, 129, 0.06);
}

.faq-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.faq-section-title-wrap i {
  color: var(--primary);
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.faq-section-chevron {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: transform 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}

.faq-section.active .faq-section-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-section-body {
  display: none;
  padding: 10px;
  background-color: var(--bg-app);
}

.faq-section.active .faq-section-body {
  display: block;
}

.faq-qa-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

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

.faq-q-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.faq-q-text i {
  color: var(--primary);
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.faq-a-text {
  font-size: 0.8rem;
  color: var(--text-medium);
  line-height: 1.6;
  padding-left: 20px;
}

.faq-a-text p {
  margin-bottom: 8px;
}

.faq-a-text p:last-child {
  margin-bottom: 0;
}

.faq-a-text ul, .faq-a-text ol {
  margin-left: 18px;
  margin-bottom: 8px;
}

.faq-a-text li {
  margin-bottom: 4px;
}

.faq-answer p {
  margin-bottom: 8px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul, .faq-answer ol {
  margin-left: 18px;
  margin-bottom: 8px;
}

.faq-answer li {
  margin-bottom: 4px;
}

.faq-callout {
  background-color: var(--bg-app);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 0.78rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-callout i {
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.faq-dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.faq-card-do {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 10px;
}

body.light-theme .faq-card-do {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
}

.faq-card-do h5 {
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.faq-card-dont {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 10px;
}

.faq-card-dont h5 {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.faq-card-do ul, .faq-card-dont ul {
  margin-left: 14px;
  margin-bottom: 0;
  font-size: 0.74rem;
}

.auth-faq-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-medium);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  transition: all var(--transition-fast);
}

.auth-faq-btn:hover {
  background-color: var(--bg-card);
  color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   CITY SUMMARY: VIEW TOGGLE, FILTERS, OVERLAYS & RANKINGS HEAT MAP
   (Light Theme Overlays for High Legibility on Light Basemap in Both Dark & Light Modes)
   ========================================================================== */

/* 1. Floating Dropdown Filters in City Summary */
#tab-city-summary .map-select-filter {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
  font-weight: 600 !important;
  height: 38px !important;
  box-sizing: border-box !important;
  padding: 6px 14px !important;
}

#tab-city-summary .map-select-filter:focus {
  border-color: var(--primary) !important;
  outline: none !important;
}

#tab-city-summary .map-select-filter option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* 2. City Summary View Toggle: Issues vs Ward Rank */
.map-view-toggle-group {
  flex: 1 1 calc(50% - 4px);
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.map-view-toggle-btn {
  flex: 1;
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.map-view-toggle-btn:hover {
  color: var(--text-main);
}

.map-view-toggle-btn.active {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
}

/* City Summary toggle styling with concentric pill shapes */
#tab-city-summary .map-view-toggle-group,
body:not(.light-theme) #tab-city-summary .map-view-toggle-group,
body.light-theme #tab-city-summary .map-view-toggle-group {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  padding: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

#tab-city-summary .map-view-toggle-group.hidden,
#tab-my-summary .map-view-toggle-group.hidden,
#tab-city-summary .hidden,
#tab-my-summary .hidden {
  display: none !important;
}

#tab-city-summary .map-view-toggle-btn,
body:not(.light-theme) #tab-city-summary .map-view-toggle-btn,
body.light-theme #tab-city-summary .map-view-toggle-btn {
  flex: 1 !important;
  border-radius: 9999px !important;
  border: none !important;
  color: #64748b !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  height: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all var(--transition-fast) !important;
  white-space: nowrap !important;
  user-select: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#tab-city-summary .map-view-toggle-btn:hover,
body:not(.light-theme) #tab-city-summary .map-view-toggle-btn:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

/* Active state for City Summary toggles (Issues/Rank & 2D/3D): NO green fill, clean neutral segment on white */
#tab-city-summary .map-view-toggle-btn.active,
body:not(.light-theme) #tab-city-summary .map-view-toggle-btn.active,
body.light-theme #tab-city-summary .map-view-toggle-btn.active {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#tab-city-summary .map-view-toggle-btn.active:hover,
body:not(.light-theme) #tab-city-summary .map-view-toggle-btn.active:hover,
body.light-theme #tab-city-summary .map-view-toggle-btn.active:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

#tab-city-summary .map-view-toggle-btn:disabled,
#tab-city-summary .map-view-toggle-btn.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

#tab-city-summary .map-view-toggle-btn:disabled:hover,
#tab-city-summary .map-view-toggle-btn.disabled:hover {
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   My Summary: Compact & Subtly Styled Slider + Dropdown (No Dominant Green Fill)
   ────────────────────────────────────────────────────────────────────────── */
#tab-my-summary .map-view-toggle-group {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  padding: 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  height: 30px !important;
  box-sizing: border-box !important;
}

body:not(.light-theme) #tab-my-summary .map-view-toggle-group {
  background: var(--bg-card, #131926) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

#tab-my-summary .map-view-toggle-btn {
  flex: 1 !important;
  border-radius: 9999px !important;
  border: none !important;
  color: #64748b !important;
  font-size: 0.73rem !important;
  font-weight: 500 !important;
  padding: 2px 10px !important;
  height: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all var(--transition-fast) !important;
  white-space: nowrap !important;
  user-select: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#tab-my-summary .map-view-toggle-btn:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

body:not(.light-theme) #tab-my-summary .map-view-toggle-btn {
  color: #94a3b8 !important;
}

body:not(.light-theme) #tab-my-summary .map-view-toggle-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Active state for My Summary: NO green fill */
#tab-my-summary .map-view-toggle-btn.active {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#tab-my-summary .map-view-toggle-btn.active:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body:not(.light-theme) #tab-my-summary .map-view-toggle-btn.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body:not(.light-theme) #tab-my-summary .map-view-toggle-btn.active:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

#tab-my-summary .map-view-toggle-btn:disabled,
#tab-my-summary .map-view-toggle-btn.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

#tab-my-summary .map-view-toggle-btn:disabled:hover,
#tab-my-summary .map-view-toggle-btn.disabled:hover {
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

/* Time Frame dropdown in My Summary matching compact pill design */
#tab-my-summary #leaderboard-time-select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  font-weight: 600 !important;
  height: 30px !important;
  box-sizing: border-box !important;
  padding: 2px 10px !important;
  font-size: 0.73rem !important;
}

#tab-my-summary #leaderboard-time-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body:not(.light-theme) #tab-my-summary #leaderboard-time-select {
  background-color: var(--bg-card, #131926) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

body:not(.light-theme) #tab-my-summary #leaderboard-time-select option {
  background-color: #131926 !important;
  color: #f8fafc !important;
}

#tab-my-summary #leaderboard-time-select:focus {
  border-color: var(--primary) !important;
  outline: none !important;
}

/* Prominent Rank badge for My Summary Personal Card - Emerald Green */
.my-summary-prominent-rank {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  white-space: nowrap !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  border: 1.5px solid #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18) !important;
}

.my-summary-prominent-rank i {
  color: #059669 !important;
  font-size: 1.15rem !important;
  filter: drop-shadow(0 1px 2px rgba(5, 150, 105, 0.35)) !important;
}

body:not(.light-theme) .my-summary-prominent-rank {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.6) !important;
  color: #34d399 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.22) !important;
}

body:not(.light-theme) .my-summary-prominent-rank i {
  color: #34d399 !important;
  filter: drop-shadow(0 1px 3px rgba(52, 211, 153, 0.45)) !important;
}

/* 2b. City Summary 2D / 3D Dimension Toggle */
#tab-city-summary .map-dimension-toggle-group {
  flex: 0 0 auto !important;
  min-width: 86px !important;
  border-radius: 9999px !important;
  padding: 3px !important;
}

#tab-city-summary .map-dimension-toggle-group .map-view-toggle-btn {
  padding: 5px 12px !important;
  min-width: 38px !important;
}

#city-summary-map-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 250px;
  background-color: #f2f3f0;
  z-index: 1;
}

#city-summary-map-3d.hidden {
  display: none !important;
}

/* Remove zoom controls on maps in City Summary */
#city-summary-map .leaflet-control-zoom {
  display: none !important;
}

#city-summary-map-3d .maplibregl-ctrl-top-left {
  display: none !important;
}

#city-summary-map-3d .maplibregl-ctrl-bottom-right,
#city-summary-map .leaflet-bottom.leaflet-right {
  bottom: 12px !important;
  right: 14px !important;
  z-index: 10002 !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: bottom 0.25s ease-out !important;
}

#city-summary-map .leaflet-bottom.leaflet-right .leaflet-control,
#city-summary-map-3d .maplibregl-ctrl-bottom-right .maplibregl-ctrl {
  margin: 0 !important;
}

/* When selected issue widget is active, elevate the 'i' button above the widget
   (placing the issue widget cleanly below the 'i') */
#tab-city-summary:has(#map-selected-issue-widget:not(.hidden)) #city-summary-map-3d .maplibregl-ctrl-bottom-right,
#tab-city-summary:has(#map-selected-issue-widget:not(.hidden)) #city-summary-map .leaflet-bottom.leaflet-right,
#tab-city-summary.has-selected-issue #city-summary-map-3d .maplibregl-ctrl-bottom-right,
#tab-city-summary.has-selected-issue #city-summary-map .leaflet-bottom.leaflet-right {
  bottom: 235px !important;
}

/* ==========================================================================
   Map Attribution Control (2D Leaflet & 3D MapLibre):
   - Collapsed to 22px circular 'ℹ' button on initial load
   - Expands ONLY on click
   - Condensed text in solid black (#000000), no clickable links
   - Placed below the issue widget on Citizen PWA
   ========================================================================== */

.citisense-map-attrib-ctrl {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  user-select: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  z-index: 10002 !important;
  display: block !important;
  pointer-events: auto !important;
}

.citisense-attrib-container {
  display: inline-flex !important;
  align-items: center !important;
  background-color: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
  border-radius: 12px !important;
  height: 22px !important;
  min-height: 22px !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
  position: relative !important;
  cursor: pointer !important;
}

/* Collapsed by default: exactly 22px circular button with 'i' */
.citisense-map-attrib-ctrl:not(.is-expanded) .citisense-attrib-container {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  border-radius: 50% !important;
  padding: 0 !important;
}

/* Hide text when collapsed, and never expand on hover */
.citisense-map-attrib-ctrl:not(.is-expanded) .citisense-attrib-text,
.citisense-map-attrib-ctrl:not(.is-expanded):hover .citisense-attrib-text {
  display: none !important;
}

/* 'ℹ' icon button */
.citisense-attrib-btn {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  border: none !important;
  background: transparent !important;
  color: #000000 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  line-height: 1 !important;
  font-family: inherit !important;
  flex-shrink: 0 !important;
}

.citisense-attrib-btn:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Expanded state: shows condensed text */
.citisense-map-attrib-ctrl.is-expanded .citisense-attrib-container {
  width: auto !important;
  border-radius: 11px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  background-color: rgba(255, 255, 255, 0.98) !important;
}

.citisense-attrib-text {
  display: inline-block !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  color: #000000 !important;
  white-space: nowrap !important;
  padding: 0 4px 0 8px !important;
  pointer-events: none !important;
  user-select: text !important;
}

.citisense-attrib-text *,
.citisense-attrib-text a {
  color: #000000 !important;
  text-decoration: none !important;
  pointer-events: none !important;
  cursor: default !important;
}

/* Universal attribution safety: disable links, force pure black text */
.leaflet-control-attribution,
.leaflet-control-attribution *,
.leaflet-control-attribution a,
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-attrib *,
.maplibregl-ctrl-attrib a {
  color: #000000 !important;
  text-decoration: none !important;
  pointer-events: none !important;
  cursor: default !important;
}

/* 3. Floating Boundary Toggle in City Summary */
.map-boundary-overlay-container {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 10000;
  display: flex;
  align-items: center;
}

.map-boundary-overlay-container.hidden {
  display: none !important;
}

.map-boundary-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 9999px;
  padding: 4px 12px 4px 8px;
  height: 38px;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  user-select: none;
  transition: opacity 0.2s, transform 0.2s;
}

#tab-city-summary #map-filter-boundary-text {
  color: #0f172a !important;
}

.map-boundary-toggle-wrapper:hover {
  opacity: 1 !important;
}

.map-boundary-switch {
  width: 28px;
  height: 16px;
  margin: 0;
  position: relative;
  display: inline-block;
}

.map-boundary-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.map-boundary-switch .map-boundary-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  border: 1px solid #94a3b8;
  transition: .3s;
  border-radius: 16px;
}

.map-boundary-switch .map-boundary-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 1px;
  bottom: 1px;
  background-color: #ffffff;
  transition: .3s;
  border-radius: 50%;
}

.map-boundary-switch input:checked + .map-boundary-slider {
  background-color: var(--primary);
  border-color: var(--primary);
}

.map-boundary-switch input:checked + .map-boundary-slider:before {
  transform: translateX(12px);
  background-color: #ffffff;
}

/* 4. Floating Heat Map Legend in Citizen PWA */
.map-rankings-legend-card {
  position: absolute;
  bottom: 20px;
  right: 12px;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

.map-rankings-legend-card.collapsed {
  min-width: auto;
  padding: 6px 10px;
}

.map-rankings-legend-card .legend-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 3px;
  margin-bottom: 5px;
}

.map-rankings-legend-card.collapsed .legend-header {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.map-rankings-legend-card .legend-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.map-rankings-legend-card #pwa-rankings-legend-toggle-btn {
  color: #64748b;
}

.map-rankings-legend-card .legend-scale-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-rankings-legend-card .legend-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-rankings-legend-card .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.64rem;
  color: #334155;
}

/* 5. Selected Issue Bottom Widget Card & Top Chevrons */
.map-bottom-widget-wrapper {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  animation: slideUp 0.3s ease-out;
}

.map-bottom-widget-wrapper.hidden {
  display: none !important;
}

.map-widget-top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  pointer-events: none;
}

.map-bottom-widget-wrapper .map-bottom-widget {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100%;
  pointer-events: auto;
  animation: none !important;
}

.widget-side-chevron-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 1.2rem;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.2s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.widget-side-chevron-btn:hover:not(.disabled):not(:disabled) {
  background: #f8fafc;
  color: var(--primary, #2563eb);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.widget-side-chevron-btn:active:not(.disabled):not(:disabled) {
  transform: scale(0.92);
  background: #f1f5f9;
}

.widget-side-chevron-btn.disabled,
.widget-side-chevron-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#tab-city-summary .map-bottom-widget,
#map-selected-issue-widget {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: var(--border-radius-lg) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18) !important;
  color: #0f172a !important;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity;
}

#map-selected-issue-widget #widget-issue-title {
  color: #0f172a !important;
}

#map-selected-issue-widget #widget-issue-category {
  color: #475569 !important;
}

#map-selected-issue-widget #widget-issue-id {
  color: #64748b !important;
}

#map-selected-issue-widget #widget-issue-comment {
  color: #475569 !important;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: calc(1.35em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  padding: 0;
  box-sizing: border-box;
}

#map-selected-issue-widget #widget-issue-comment.hidden {
  display: none !important;
}

#map-selected-issue-widget .widget-info {
  color: #475569 !important;
}

#map-selected-issue-widget #widget-issue-reporters-count,
#map-selected-issue-widget #widget-issue-upvotes-count,
#map-selected-issue-widget #widget-issue-age {
  color: #475569 !important;
}

#map-selected-issue-widget #widget-issue-address {
  color: #334155 !important;
}

#map-selected-issue-widget .widget-img,
#map-selected-issue-widget #widget-issue-media-container {
  background-color: #f1f5f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.map-rankings-legend-card .legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Tooltip & Popup for PWA Rankings */
.pwa-rankings-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 3px 6px !important;
}

body.light-theme .pwa-rankings-tooltip {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(5, 150, 105, 0.4) !important;
}

.pwa-rankings-popup-content {
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-main);
  padding: 2px 0;
}

.pwa-rankings-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.pwa-rankings-popup-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.pwa-rankings-popup-badge {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary);
  font-weight: 800;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
}

.pwa-rankings-popup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.pwa-rankings-popup-stat-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
}

body.light-theme .pwa-rankings-popup-stat-item {
  background: #f1f5f9;
}

.pwa-rankings-popup-stat-item .val {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.8rem;
}

/* Ward Rank Permanent Map Tooltip */
.leaflet-tooltip.pwa-rank-tooltip {
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 3px 7px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}
.leaflet-tooltip.pwa-rank-tooltip::before {
  display: none !important;
}
.pwa-rank-badge-tooltip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.15;
}
.pwa-rank-badge-tooltip .pwa-rank-num {
  font-weight: 800;
  font-size: 0.76rem;
  color: #38bdf8;
  letter-spacing: 0.5px;
}
.pwa-rank-badge-tooltip .pwa-rank-name {
  font-weight: 600;
  font-size: 0.70rem;
  color: #f8fafc;
}
.pwa-rank-badge-tooltip .pwa-rank-score {
  font-size: 0.62rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Feed Infinite Scroll & Pagination Styles */
.feed-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}

.feed-loader-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-full, 9999px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.feed-loader-spinner i {
  color: var(--primary);
  font-size: 1rem;
}

.feed-end-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  width: 100%;
}

.feed-end-indicator::before,
.feed-end-indicator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
  max-width: 60px;
}

/* Hide floating Google reCAPTCHA badge */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   ISSUE DETAILS: ENLARGED EDIT & DELETE BUTTONS & HALF SCREEN MAP HEIGHT
   ========================================================================== */
#btn-detail-edit,
#btn-detail-delete {
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.15s ease !important;
}

#btn-detail-edit:hover,
#btn-detail-delete:hover {
  filter: brightness(1.08);
}

#detail-media-container.map-active {
  min-height: 180px;
}

#detail-map-pane,
#detail-issue-map {
  width: 100% !important;
  height: 100% !important;
}

/* ==========================================================================
   LOCATION EDIT MODAL: ENLARGED 2/3 SCREEN MAP & RESPONSIVE CARD
   ========================================================================== */
#location-edit-modal {
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 12px;
  box-sizing: border-box;
  z-index: 40000;
}

#location-edit-modal .location-edit-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

#modal-edit-location-map-wrapper {
  width: 100%;
  height: 62vh;
  height: 62dvh;
  min-height: 440px;
  max-height: 580px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  flex-shrink: 0;
}

#modal-edit-location-map {
  width: 100%;
  height: 100%;
}

/* ================= Profile Edit & View Styling ================= */
/* Distinct styling for editable inputs vs disabled inputs on profile edit panel */
#profile-edit-panel input.editable-input,
#profile-edit-panel input:not(:disabled),
#profile-edit-panel select:not(:disabled) {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: text;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

#profile-edit-panel input.editable-input:focus,
#profile-edit-panel input:not(:disabled):focus,
#profile-edit-panel select:not(:disabled):focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: var(--bg-card);
}

#profile-edit-panel .disabled-input,
#profile-edit-panel input.disabled-input,
#profile-edit-panel input:disabled,
#profile-edit-panel input[disabled],
#profile-edit-panel select:disabled {
  background-color: rgba(148, 163, 184, 0.15) !important;
  color: var(--text-muted) !important;
  border: 1px dashed rgba(148, 163, 184, 0.45) !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
  box-shadow: none !important;
}

.mapped-category-item {
  line-height: 1.4;
}

.mapped-category-item:not(:first-child) {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.mapped-sub-issues {
  margin-left: 20px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ==========================================================================
   ANNOUNCEMENTS FEATURE (STAFF FAB, 3/4TH MODAL, & CITIZEN FEED CARDS)
   ========================================================================== */

/* Floating Circular Announce Button (Engineers & Managers above bottom nav) */
.staff-announce-fab {
  position: absolute;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10005;
  user-select: none;
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
}

.staff-announce-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.staff-announce-fab:active {
  transform: scale(0.94);
}

.staff-announce-fab .announce-fab-icon {
  font-size: 1.3rem;
  line-height: 1;
  color: #ffffff;
  transform: translateY(-8px);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}

.staff-announce-fab .announce-fab-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.announce-curve-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  fill: #ffffff;
  text-transform: uppercase;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

/* Announce Modal & 3/4th Height Sheet */
.announce-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 38000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.announce-sheet {
  background-color: var(--bg-card);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid var(--border-color);
  border-bottom: none;
  height: 75%;
  max-height: 75%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.45);
  animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.announce-sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.5);
  margin: 10px auto 4px auto;
  flex-shrink: 0;
}

.announce-sheet-header {
  padding: 10px 18px 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.announce-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.announce-sheet-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.announce-sheet-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.announce-sheet-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
}

.announce-sheet-body .form-select:focus,
.announce-sheet-body textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Citizen Home Feed - Official Announcements Section */
.home-announcements-section {
  padding: 10px 16px 2px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcements-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: opacity var(--transition-fast);
}

.announcements-header-title:hover {
  opacity: 0.85;
}

.announcements-chevron-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.announcements-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  display: inline-block;
  animation: pulse 1.8s infinite;
}

.announcements-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 60%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid #f59e0b;
  border-radius: var(--border-radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.announcement-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.announcement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-badge {
  background-color: rgba(245, 158, 11, 0.18);
  color: #d97706;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.light-theme .announcement-badge {
  color: #b45309;
  background-color: rgba(245, 158, 11, 0.2);
}

.announcement-time {
  font-size: 0.70rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.announcement-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-medium);
  flex-wrap: wrap;
}

.announcement-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.announcement-dot {
  color: var(--text-muted);
}

.announcement-ward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-main);
}

.announcement-agency-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  opacity: 0.95;
}

.announcement-agency-row i {
  color: var(--primary);
  font-size: 0.74rem;
}

.announcement-agency-name {
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.announcement-topics-compact {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 0.67rem;
  color: var(--text-muted);
}

.announcement-topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}

.light-theme .announcement-topic-tag {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-medium);
}

.announcement-topic-divider {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.7;
}

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

.announcement-tag {
  font-size: 0.67rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.light-theme .announcement-tag {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--text-medium);
  border-color: rgba(0, 0, 0, 0.08);
}

.announcement-tag.category-tag {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.announcement-tag.subissue-tag {
  background-color: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.announcement-message {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
  word-break: break-word;
  padding-top: 1px;
}

.announcement-actions {
  border-top: 1px solid var(--border-color);
  margin: 4px -12px -10px -12px;
  padding: 2px 10px;
  background: none !important;
  background-color: transparent !important;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-actions .card-action-btn {
  flex: 0 0 auto;
  padding: 4px 6px;
  background: none !important;
  border: none !important;
  color: var(--text-medium);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: none !important;
}

.announcement-actions .card-action-btn:hover {
  background: none !important;
  color: var(--primary);
}

.announcement-validity {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.light-theme .announcement-actions {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: none !important;
  background-color: transparent !important;
}

.staff-announce-fab.hidden {
  display: none !important;
}

/* Announcement Status Badges */
.badge-deleted {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}

body.light-theme .badge-deleted {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

.badge-expired {
  background-color: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}

body.light-theme .badge-expired {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

.badge-active {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}

body.light-theme .badge-active {
  background-color: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

/* ==========================================================================
   Floating Tooltip for Issue Status & Severity Pills
   ========================================================================== */
.info-pill-tooltip {
  position: fixed;
  z-index: 100000;
  width: 270px;
  max-width: calc(100vw - 24px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  box-sizing: border-box;
  animation: tooltipFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-pill-tooltip.hidden {
  display: none !important;
}

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

/* Tooltip Arrow */
.info-pill-tooltip-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transform: rotate(45deg);
  pointer-events: none;
  margin-left: -5px;
}

.info-pill-tooltip[data-placement="top"] .info-pill-tooltip-arrow {
  bottom: -6px;
  border-top: none;
  border-left: none;
}

.info-pill-tooltip[data-placement="bottom"] .info-pill-tooltip-arrow {
  top: -6px;
  border-bottom: none;
  border-right: none;
}

/* Tooltip Header */
.info-pill-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.info-pill-tooltip-icon-box {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.info-pill-tooltip-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.info-pill-tooltip-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.info-pill-tooltip-close:hover {
  color: var(--text-main);
}

/* Tooltip Body */
.info-pill-tooltip-body {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-medium);
  margin: 0;
}

/* Light Theme Overrides */
body.light-theme .info-pill-tooltip {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
}

body.light-theme .info-pill-tooltip-arrow {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .info-pill-tooltip-title {
  color: #0f172a;
}

body.light-theme .info-pill-tooltip-body {
  color: #334155;
}

/* ==========================================================================
   Language Picker Modal Styles
   ========================================================================== */
.lang-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-align: left;
  color: var(--text-main);
  box-sizing: border-box;
}

.lang-option-card:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.06);
}

.lang-option-card.active {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.12);
}

.lang-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-native-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.lang-english-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lang-option-indicator {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.lang-option-card.active .lang-option-indicator {
  color: var(--primary);
}

/* Indic Script Font Stack & Polish */
html[lang="kn"], html[lang="hi"], html[lang="ta"], html[lang="te"], html[lang="ml"], html[lang="gu"], html[lang="mr"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Nirmala UI', 'Noto Sans Devanagari', 'Noto Sans Kannada', 'Noto Sans Tamil', 'Noto Sans Telugu', 'Noto Sans Malayalam', 'Noto Sans Gujarati', sans-serif;
}

html[lang="kn"] body, html[lang="ta"] body, html[lang="te"] body, html[lang="ml"] body {
  line-height: 1.5;
}

/* ── Guest Preview Mode Styles ────────────────────────────────────────────── */
.btn-header-guest-join {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-header-guest-join:active {
  transform: scale(0.96);
}

.tab-btn.tab-btn-locked {
  opacity: 0.52;
  position: relative;
}

.tab-btn .tab-lock-badge {
  position: absolute;
  top: 4px;
  right: 16%;
  font-size: 0.58rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.guest-inline-location-bar {
  margin: 0 14px 10px 14px;
  padding: 9px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-headline-msg.headline-shared-issue {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.18) 0%, rgba(59, 130, 246, 0.14) 100%);
  color: var(--primary);
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
}

.issue-card.pinned-shared-issue-card {
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.14);
}

.modal-backdrop.guest-bottom-sheet-backdrop {
  align-items: flex-end;
  padding: 0;
}

.modal-content-card.guest-bottom-sheet-card {
  border-radius: 20px 20px 0 0;
  margin: 0 auto;
  animation: guestSheetSlideUp 0.22s ease-out;
}

.guest-bottom-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-color);
  margin: 0 auto 14px auto;
}

@keyframes guestSheetSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Auth Modal Card (In-place popup for Guest authentication) */
.modal-content-card.guest-bottom-sheet-card.auth-modal-card {
  max-width: 440px;
  width: 100%;
  padding: 18px 20px 24px;
  border-radius: 24px 24px 0 0;
  margin: 0 auto;
  box-sizing: border-box;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.45);
  animation: guestSheetSlideUp 0.22s ease-out;
  position: relative;
}

.signup-modal-card {
  max-height: 88vh;
  overflow-y: auto;
}

body.light-theme .modal-content-card.guest-bottom-sheet-card.auth-modal-card {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
}







.tab-btn:disabled,
.tab-btn.disabled,
.tab-btn.tab-btn-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
}

.tab-btn:disabled:hover,
.tab-btn.disabled:hover,
.tab-btn.tab-btn-disabled:hover {
  cursor: not-allowed !important;
  color: var(--text-muted) !important;
}
