:root {
  --bg-deep: #090c15;
  --bg-surface: #0e1322;
  --bg-card: rgba(18, 24, 40, 0.78);
  --bg-card-hover: rgba(28, 36, 60, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #f59e0b;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --gold-bg: rgba(245, 158, 11, 0.15);
  --cyan: #38bdf8;
  --indigo: #818cf8;
  --emerald: #10b981;
  --rose: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light (White) Theme Overrides */
[data-theme="light"] {
  --bg-deep: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-subtle: rgba(15, 23, 42, 0.14);
  --border-card: rgba(15, 23, 42, 0.09);
  --border-focus: #d97706;
  --gold: #b45309;
  --gold-glow: rgba(180, 83, 9, 0.22);
  --gold-bg: rgba(245, 158, 11, 0.16);
  --cyan: #0284c7;
  --indigo: #4f46e5;
  --emerald: #059669;
  --rose: #dc2626;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
}

/* Hide scrollbars globally while retaining smooth scrolling */
html, body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

sup {
  font-size: 0.58em;
  vertical-align: super;
  font-weight: 750;
  line-height: 0;
  letter-spacing: 0;
  text-transform: lowercase;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse 70% 35% at 50% -10%, rgba(245, 158, 11, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(56, 189, 248, 0.06), transparent),
    linear-gradient(180deg, rgba(9, 12, 21, 0.93) 0%, rgba(5, 7, 12, 0.97) 100%),
    url('map.jpg');
  background-size: auto, auto, auto, cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="light"] body {
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(ellipse 70% 35% at 50% -10%, rgba(245, 158, 11, 0.1), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(2, 132, 199, 0.05), transparent),
    linear-gradient(180deg, rgba(241, 245, 249, 0.94) 0%, rgba(226, 232, 240, 0.96) 100%),
    url('map.jpg');
  background-size: auto, auto, auto, cover;
  background-position: center;
}

/* Android Material Symbols Rounded Standard */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.app-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.85rem 1rem 5.5rem;
  display: flex;
  flex-direction: column;
}

/* Header: Royal Archer Theme */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.95rem;
  gap: 0.75rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  flex: 1;
  min-width: 0;
}

.archer-crest {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 14px var(--gold-glow);
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.crest-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-titles {
  min-width: 0;
}

.brand-titles h1 {
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

[data-theme="light"] .brand-titles h1 {
  background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-titles span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-badge {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
  transform: scale(1.05);
}

.theme-toggle-btn .theme-icon {
  font-size: 22px;
}

/* Search Island */
.search-island {
  position: sticky;
  top: 0.5rem;
  z-index: 40;
  margin-bottom: 0.95rem;
}

.search-field {
  position: relative;
  width: 100%;
}

.search-field .search-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  font-size: 22px;
}

.search-input {
  width: 100%;
  padding: 0.88rem 2.6rem 0.88rem 3rem;
  background: rgba(18, 24, 40, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 550;
  outline: none;
  backdrop-filter: blur(16px);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .search-input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  color: var(--text-main);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
}

.clear-search-btn {
  position: absolute;
  right: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: none;
  padding: 4px;
}

.clear-search-btn.active {
  display: block;
}

/* Filter Strip */
.filter-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.3rem;
  margin-bottom: 0.95rem;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.micro-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
  white-space: nowrap;
}

[data-theme="light"] .micro-pill {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}

.micro-pill:hover {
  color: var(--text-main);
  border-color: var(--gold);
}

.micro-pill.active {
  background: var(--gold-bg);
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.45);
  font-weight: 750;
}

/* Directory List Rows (Elderly Friendly High Legibility) */
.directory-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.plot-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  backdrop-filter: blur(12px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

[data-theme="light"] .plot-row {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.plot-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.plot-tag {
  font-size: 1.15rem;
  font-weight: 850;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #374151, #1f2937);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f3f4f6;
  font-size: 0.9rem;
  font-weight: 750;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

[data-theme="light"] .row-avatar {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.15);
}

.row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.name-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.name-text {
  font-size: 1.12rem;
  font-weight: 750;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges */
.badge-tenant {
  font-size: 0.74rem;
  font-weight: 750;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

[data-theme="light"] .badge-tenant {
  color: #7e22ce;
  background: rgba(168, 85, 247, 0.12);
}

.icon-encroach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose);
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 9999px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon-encroach .material-symbols-rounded {
  font-size: 15px;
}

.icon-nuisance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon-nuisance .material-symbols-rounded {
  font-size: 15px;
}

/* Tenant Verification Indicator Badges */
.indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  line-height: 1.25;
}

.indicator-badge .material-symbols-rounded {
  font-size: 16px;
}

.indicator-badge.verified {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.indicator-badge.pending {
  color: var(--gold);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="light"] .indicator-badge.verified {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .indicator-badge.pending {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Action Micro-Buttons (Enlarged Touch Targets for Elderly: 40x40px) */
.row-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-icon .material-symbols-rounded {
  font-size: 21px;
}

.btn-icon.call {
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-icon.call:hover {
  background: var(--cyan);
  color: #ffffff;
}

.btn-icon.sms {
  background: rgba(129, 140, 248, 0.14);
  color: var(--indigo);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.btn-icon.sms:hover {
  background: var(--indigo);
  color: #ffffff;
}

.btn-icon.wa {
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-icon.wa:hover {
  background: var(--emerald);
  color: #ffffff;
}

/* Accordion Details on Tap */
.row-details {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.94rem;
  color: var(--text-muted);
}

.plot-row.expanded .row-details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.15rem 0;
}

.detail-item span:first-child {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 550;
}

.detail-item span:last-child {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 650;
}

/* Individual Members with Verified Contacts */
.members-section {
  margin: 0.55rem 0 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.members-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.members-header .material-symbols-rounded {
  font-size: 19px;
  color: var(--gold);
}

.members-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.member-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  transition: var(--transition);
}

[data-theme="light"] .member-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

.member-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .member-card:hover {
  background: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.member-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.member-top-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.member-name-text {
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--text-main);
  line-height: 1.25;
}

.member-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  white-space: nowrap;
}

[data-theme="light"] .member-badge {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}

.member-phone-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--cyan);
  font-weight: 650;
  letter-spacing: 0.02em;
}

[data-theme="light"] .member-phone-row {
  color: #0284c7;
}

.member-phone-icon {
  font-size: 15px;
}

.member-action-btns {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.member-action-btns .btn-icon {
  width: 38px;
  height: 38px;
}

.row-expand-indicator {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: var(--transition);
  flex-shrink: 0;
}

[data-theme="light"] .row-expand-indicator {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.12);
}

.row-expand-indicator .chevron-icon {
  font-size: 22px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.plot-row:hover .row-expand-indicator {
  border-color: var(--gold);
  color: var(--gold);
}

.plot-row.expanded .row-expand-indicator {
  background: var(--gold-bg);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--gold);
}

.plot-row.expanded .row-expand-indicator .chevron-icon {
  transform: rotate(180deg);
}

.detail-alert-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  color: #fde68a;
  font-size: 0.88rem;
  margin-top: 0.35rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.45;
}

[data-theme="light"] .detail-alert-box {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Grievance & Contact Cards */
.utility-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  transition: var(--transition);
}

[data-theme="light"] .utility-card {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.utility-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.35);
}

.utility-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.utility-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

[data-theme="light"] .utility-icon {
  background: var(--gold-bg);
}

.utility-title {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text-main);
  line-height: 1.25;
}

.utility-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.btn-open {
  background: var(--gold);
  color: #05070c;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-open:hover {
  background: #fde68a;
  box-shadow: 0 2px 12px var(--gold-glow);
}

/* Bottom Floating Dock Navigation */
.bottom-dock {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 0.4rem 0.6rem;
  display: flex;
  gap: 0.4rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
  z-index: 50;
  max-width: 92vw;
}

[data-theme="light"] .bottom-dock {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.dock-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  white-space: nowrap;
}

.dock-btn:hover {
  color: var(--text-main);
}

.dock-btn.active {
  background: var(--gold);
  color: #05070c;
  font-weight: 750;
  box-shadow: 0 2px 14px var(--gold-glow);
}

[data-theme="light"] .dock-btn.active {
  color: #ffffff;
}

/* Header Action Buttons (Language & Theme) */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle-btn:hover {
  background: var(--gold-bg);
  border-color: var(--gold);
  color: var(--gold);
}

.lang-indicator {
  letter-spacing: 0.04em;
}

[data-theme="light"] .lang-toggle-btn {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

/* Governance Counter: Warnings (Compact) */
.governance-counters {
  display: flex;
  align-items: center;
  margin: 0.45rem 0 0.25rem 0;
}

.counter-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="light"] .counter-box {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.09);
}

.counter-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stepper-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.stepper-btn .material-symbols-rounded {
  font-size: 13px !important;
  line-height: 1;
}

.stepper-btn:hover {
  background: var(--gold-bg);
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.08);
}

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

[data-theme="light"] .stepper-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
}

.stepper-value {
  font-size: 0.88rem;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Publicly Editable Notes */
.editable-notes-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

[data-theme="light"] .editable-notes-section {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.08);
}

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

.notes-header-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-save-note {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-save-note:hover {
  background: rgba(16, 185, 129, 0.22);
}

.note-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 48px;
  outline: none;
  transition: var(--transition);
}

.note-textarea:focus {
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .note-textarea {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .note-textarea:focus {
  background: #ffffff;
}

.note-save-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--emerald);
  min-height: 14px;
}

/* Issues Section & Media Thumbnails */
.issues-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

[data-theme="light"] .issues-section {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.08);
}

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

.issues-header-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text-main);
}

.issues-count-badge {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
}

.btn-add-issue {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-issue:hover {
  background: rgba(56, 189, 248, 0.22);
}

.issues-thumb-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

.issues-thumb-strip::-webkit-scrollbar {
  display: none;
}

.issue-thumb-box {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.issue-thumb-box:hover {
  border-color: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.issue-thumb-box img,
.issue-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.issue-thumb-box.add-box {
  border: 1.5px dashed var(--border-subtle);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.issue-thumb-box.add-box:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.08);
}

.video-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border-radius: 50%;
  font-size: 16px;
  padding: 2px;
  pointer-events: none;
}

/* Fullscreen Issues Slideshow Lightbox */
.slideshow-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.slideshow-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 13, 0.88);
  backdrop-filter: blur(16px);
}

.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 620px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.slideshow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-card);
}

.slideshow-title-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

.slideshow-counter {
  font-size: 0.75rem;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  color: var(--text-muted);
}

.slideshow-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 50%;
  transition: var(--transition);
}

.slideshow-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.slideshow-body {
  position: relative;
  width: 100%;
  height: 52vh;
  min-height: 280px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slideshow-media-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-media-wrapper img,
.slideshow-media-wrapper video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.slideshow-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.slideshow-nav-btn:hover {
  background: rgba(245, 158, 11, 0.85);
  color: #05070c;
  border-color: var(--gold);
}

.slideshow-nav-btn.prev {
  left: 0.75rem;
}

.slideshow-nav-btn.next {
  right: 0.75rem;
}

.slideshow-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slideshow-caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.slideshow-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.slideshow-filepath {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.slideshow-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.slideshow-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.slideshow-action-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.15);
}

.slideshow-action-btn.delete {
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.1);
}

.slideshow-action-btn.delete:hover {
  color: #ffffff;
  border-color: var(--rose);
  background: rgba(244, 63, 94, 0.45);
}

/* Member Avatar Mini in Cards */
.member-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-subtle);
  flex-shrink: 0;
}

/* Progress & Milestones Timeline View */
.progress-section-header {
  margin-bottom: 1rem;
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.section-subheading {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Add Progress Form Card */
.progress-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .progress-form-card {
  background: #ffffff;
  border-color: var(--border-card);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.progress-form-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.progress-form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

@media (max-width: 500px) {
  .progress-form-row {
    flex-direction: column;
    gap: 0.5rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.progress-input,
.progress-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}

[data-theme="light"] .progress-input,
[data-theme="light"] .progress-textarea {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.15);
}

.progress-input:focus,
.progress-textarea:focus {
  border-color: var(--border-focus);
}

.progress-textarea {
  resize: vertical;
  min-height: 52px;
}

.progress-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.btn-progress-file {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-progress-file:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--gold);
}

.btn-submit-progress {
  background: var(--gold);
  border: none;
  color: #05070c;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 10px var(--gold-glow);
}

[data-theme="light"] .btn-submit-progress {
  color: #ffffff;
}

.btn-submit-progress:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.progress-form-preview {
  margin-top: 0.65rem;
  border-radius: 8px;
  overflow: hidden;
  max-height: 160px;
}

.progress-form-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

/* Timeline Layout */
.timeline-container {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 4.5rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold) 0%, rgba(56, 189, 248, 0.6) 50%, rgba(255, 255, 255, 0.1) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.25s ease;
}

.timeline-marker {
  position: absolute;
  left: -1.5rem;
  top: 0.3rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  border: 2px solid var(--bg-deep);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-subtle);
  transform: translateY(-1px);
}

[data-theme="light"] .timeline-card {
  background: #ffffff;
}

.timeline-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.timeline-date-badge {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--gold);
  background: var(--gold-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.timeline-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}

.timeline-title {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.timeline-note {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-media {
  border-radius: 8px;
  overflow: hidden;
  max-height: 220px;
  margin-top: 0.5rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.timeline-media:hover {
  border-color: var(--gold);
  transform: scale(1.01);
}

.timeline-media img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}


