:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #6e7788;
  --border: #e2e7ef;
  --primary: #ef6c00;
  --primary-dark: #c65300;
  --accent: #1f5fbf;
  --success: #1d8b57;
  --shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: 82px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #ff9800);
  color: #fff;
  font-weight: 800;
}

.brand-title {
  font-weight: 800;
  letter-spacing: .2px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.icon-btn,
.back-btn {
  border: 0;
  background: transparent;
  font-size: 24px;
  padding: 8px;
}

.content {
  padding: 22px 16px 32px;
}

.screen {
  display: none;
  animation: fade .18s ease;
}

.screen.active {
  display: block;
}

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

.welcome-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.welcome-card {
  padding: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 6vw, 42px);
}

h2 {
  margin-bottom: 4px;
}

.muted,
.section-head p,
.choice-card small,
.menu-card small {
  color: var(--muted);
}

.menu-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-card,
.choice-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 110px;
  transition: .18s ease;
}

.menu-card:hover,
.choice-card:hover {
  transform: translateY(-2px);
  border-color: #f5b77c;
}

.menu-icon,
.choice-card > span {
  font-size: 30px;
}

.menu-card strong,
.menu-card small,
.choice-card strong,
.choice-card small {
  display: block;
}

.menu-card small,
.choice-card small {
  margin-top: 5px;
}

.section-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 26px;
}

.form-card {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2a44;
}

label.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid #2f6b3f;
  background: #fff;
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1f4d2e;
  box-shadow: 0 0 0 2px rgba(47, 107, 63, 0.12);
  outline: none;
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.small-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

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

.secondary-btn {
  background: #eef2f7;
  color: var(--text);
}

.small-btn {
  padding: 8px 12px;
  font-size: 13px;
  background: #eef2f7;
}

.toolbar {
  margin-bottom: 14px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(23,32,51,.05);
}

.list-card strong {
  display: block;
  margin-bottom: 4px;
}

.list-card small {
  color: var(--muted);
}

.empty {
  padding: 28px 18px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
}

.split-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  flex-direction: column;
  align-items: flex-start;
}

.subheading {
  margin: 22px 0 12px;
}

.planned-summary {
  margin-bottom: 18px;
  border: 1px solid #ffe0bf;
  background: #fff8f1;
  border-radius: 12px;
  padding: 13px 14px;
}

.hidden {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 1180px);
  height: 68px;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 30;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-size: 18px;
  color: var(--text);
}

.bottom-nav span {
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 50;
  background: #172033;
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  .menu-grid,
  .split-actions,
  .form-grid {
    grid-template-columns: 1fr;
  }

  label.full {
    grid-column: auto;
  }

  .content {
    padding: 16px 12px 26px;
  }

  .welcome-card {
    padding: 20px;
  }

  .menu-card {
    min-height: 90px;
  }
}


.field-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: -2px;
}

.hierarchy-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8f1;
  border: 1px solid #ffe0bf;
  color: #7b4a19;
  font-size: 13px;
  font-weight: 700;
}


#otherProfessionWrap {
  transition: opacity .18s ease;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.hindi-text {
  font-family: "Khand", sans-serif;
  font-weight: 600;
}

.photo-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.photo-heading {
  font-weight: 700;
}

.photo-upload-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 6px;
}

@media (max-width: 700px) {
  .photo-upload-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.event-strip {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8f1;
  border: 1px solid #ffd3a6;
  color: #7b3f00;
  font-size: 14px;
  font-weight: 700;
}

form input,
form select,
form textarea {
  border: 1.5px solid #2f6b3f !important;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: #1f4d2e !important;
  box-shadow: 0 0 0 2px rgba(47, 107, 63, 0.12);
  outline: none;
}

.profile-btn {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  text-align: right;
  border-radius: 10px;
}

.profile-user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.profile-user-text strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.profile-user-text small {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.profile-icon {
  font-size: 20px;
}

.inactive-member {
  opacity: 0.62;
  background: #f5f5f5;
  border-color: #c8c8c8;
}

.inactive-member strong {
  text-decoration: line-through;
}

.inactive-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fde8e8;
  color: #a61b1b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.pravas-warning {
  color: #b00020;
  font-weight: 700;
}

.recent-events-section {
  margin-top: 24px;
}

.recent-events-section h3 {
  margin-bottom: 12px;
}

.recent-events-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(240px, 1fr)
  );
  gap: 14px;
}

.event-card {
  border: 1px solid #d8e2d8;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
}

.event-card-photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.event-card-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.event-card-meta {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}

.event-report-filters {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(180px, 1fr)
  );
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #d8e2d8;
  border-radius: 10px;
}

.event-report-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.event-photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.event-photo-modal.hidden {
  display: none;
}

.event-photo-modal-content {
  position: relative;
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
}

.event-photo-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 32px;
  cursor: pointer;
}

.event-photo-full-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(260px, 1fr)
  );
  gap: 14px;
  margin-top: 18px;
}

.event-photo-full-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

#currentUserInfo {
  margin-top: 14px;
}

#completedPravasList .event-card-photo {
  width: 140px;
  height: 90px;
  object-fit: cover;
  flex: 0 0 140px;
  border-radius: 10px;
}

#completedPravasList {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 900px;
  align-items: start;
}

#completedPravasList .list-card {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  align-items: flex-start;
}

#completedPravasList .list-card > div {
  width: 100%;
  min-width: 0;
}

#completedPravasList .pravas-actual-block {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

#completedPravasList .event-card-photo {
  width: 110px;
  height: 75px;
  object-fit: cover;
  flex: 0 0 110px;
  border-radius: 8px;
}
#viewEventsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 230px));
  gap: 12px;
  align-items: start;
}

#viewEventsGrid .event-card-photo {
  width: 100px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

#viewEventsGrid .event-card {
  padding: 10px;
  min-height: 0;
}
.pravas-planned-block {
  background: #f3f4f6;
  color: #6b7280;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.pravas-planned-block strong,
.pravas-planned-block small {
  color: #6b7280;
}

.pravas-actual-block {
  padding: 10px 0 0 0;
}

.pravas-actual-block strong {
  color: #111827;
}


/* ========================================================
   PRAVAS OVERVIEW
   Senior visit coordination and junior activity summary
   ======================================================== */

.overview-scope-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pravas-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.overview-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.05);
}

.overview-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.overview-stat-card strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.overview-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.overview-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.overview-panel-head h3 {
  margin-bottom: 4px;
}

.overview-panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.overview-visit-list {
  display: grid;
  gap: 10px;
}

.overview-visit-card {
  display: grid;
  grid-template-columns: minmax(100px, 130px) 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.overview-visit-date {
  font-weight: 800;
  color: var(--text);
}

.overview-visit-details strong {
  display: block;
  margin-bottom: 3px;
}

.overview-visit-details small {
  color: var(--muted);
}

.overview-location {
  margin-top: 6px;
  color: #364152;
  font-size: 13px;
  line-height: 1.45;
}

.overview-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.overview-table th,
.overview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.overview-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-table th:not(:first-child),
.overview-table td:not(:first-child) {
  text-align: center;
}

.overview-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .overview-visit-card {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .pravas-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ========================================================
   PRAVAS OVERVIEW - DETAILED TEAM / JUNIOR RECORDS
   Shows the people, dates and locations behind summary counts.
   ======================================================== */

.overview-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.overview-details h4 {
  margin: 0 0 3px;
}

.overview-details-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.overview-detail-section {
  margin-top: 14px;
}

.overview-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.overview-detail-heading span {
  min-width: 28px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.overview-detail-list {
  display: grid;
  gap: 8px;
}

.overview-detail-card {
  display: grid;
  grid-template-columns: minmax(92px, 115px) 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #ffffff;
}

.overview-detail-date {
  font-weight: 800;
  font-size: 13px;
}

.overview-detail-main strong {
  display: block;
  margin-bottom: 2px;
}

.overview-detail-main small {
  color: var(--muted);
}

.overview-status-badge {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.overview-detail-empty,
.overview-detail-more {
  padding: 9px 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .overview-detail-card {
    grid-template-columns: 1fr auto;
  }

  .overview-detail-date {
    grid-column: 1 / -1;
  }
}

/* ========================================================
   PRAVAS OVERVIEW - FILTERS AND DISTRICT GROUPING
   ======================================================== */

.overview-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 4px 0 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.overview-filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-filter-bar select {
  width: 100%;
  min-height: 40px;
}

.overview-filter-clear {
  min-height: 40px;
  white-space: nowrap;
}

.overview-filter-result-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.overview-district-list {
  display: grid;
  gap: 10px;
}

.overview-district-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.overview-district-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.overview-district-heading::-webkit-details-marker {
  display: none;
}

.overview-district-heading::after {
  content: "▾";
  margin-left: 8px;
  font-size: 12px;
  transition: transform 0.15s ease;
}

.overview-district-group:not([open])
  .overview-district-heading::after {
  transform: rotate(-90deg);
}

.overview-district-counts {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.overview-district-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
}

.overview-district-body .overview-detail-section:first-child {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .overview-filter-bar {
    grid-template-columns: 1fr;
  }

  .overview-filter-clear {
    width: 100%;
  }

  .overview-district-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .overview-district-counts {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }
}


/* ========================================================
   PRABHARI / AREA RESPONSIBILITY
   ======================================================== */

select[multiple] {
  min-height: 170px;
  padding: 8px;
}

.prabhari-filter-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 700;
  color: var(--text);
}

.prabhari-filter-toggle input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.prabhari-text {
  color: #6b4b16;
  font-weight: 700;
}

.pravas-view-only {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ========================================================
   OCT 2026 RELEASE - WORKING PRAKOSHTH / PRABHAR / MESSAGES
   ======================================================== */

.working-prakoshth {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 7px;
  max-width: 460px;
}

.working-prakoshth label {
  font-size: 13px;
}

.working-prakoshth small {
  color: var(--muted);
}

.message-menu-card {
  position: relative;
}

.message-badge {
  margin-left: auto;
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 9px;
  background: #b42318;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.message-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.message-tab {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 800;
  color: var(--text);
}

.message-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.message-panel {
  display: grid;
  gap: 14px;
}

.nested-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
}

.nested-grid .full {
  grid-column: 1 / -1;
}

.message-fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}

.message-fieldset legend {
  padding: 0 7px;
  font-weight: 800;
  color: #1f2a44;
}

.message-fieldset-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.area-checkbox-grid {
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.check-option {
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  line-height: 1.25;
}

.check-option input {
  width: auto;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.message-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 15px 16px;
  box-shadow: 0 6px 18px rgba(23,32,51,.05);
}

.message-card.unread {
  border-left: 4px solid var(--primary);
}

.message-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.message-card-head h3 {
  margin: 7px 0 4px;
  font-size: 18px;
}

.message-card-head small {
  color: var(--muted);
}

.message-type-pill,
.unread-dot {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.message-type-pill {
  background: #eef4ff;
  color: #1849a9;
}

.unread-dot {
  margin-left: 5px;
  background: #fff0e0;
  color: #a83d00;
}

.message-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.official-notice {
  display: grid;
  gap: 8px;
  line-height: 1.45;
}

.notice-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.notice-body {
  white-space: normal;
}

.join-meeting-btn {
  display: inline-block;
  width: fit-content;
  text-decoration: none;
  margin: 6px 0;
}

.prabhar-assignment-card {
  align-items: flex-start;
}

.prabhar-area-line {
  margin-top: 7px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.danger-btn {
  background: #fff1f0;
  color: #b42318;
  border: 1px solid #f4c7c3;
}

@media (max-width: 700px) {
  .nested-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .nested-grid .full {
    grid-column: auto;
  }

  .message-card-head {
    flex-direction: column;
  }

  .message-card-head > button {
    align-self: flex-start;
  }
}


/* ========================================================
   TEAM ENTRY - QUICK LOCATION SEARCH
   ======================================================== */

.quick-location-card {
  grid-column: 1 / -1;
  padding: 16px 18px;
  border: 1px solid #b8d6ff;
  border-radius: 14px;
  background: #f3f8ff;
}

.quick-location-title {
  margin-bottom: 6px;
  color: #174fae;
  font-size: 18px;
  font-weight: 800;
}

.quick-location-instruction {
  margin: 0 0 14px;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}

.quick-location-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.quick-location-action {
  display: flex;
  align-items: flex-start;
  padding-top: 27px;
}

.quick-location-btn {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: #1d5bd7;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.quick-location-btn:hover {
  background: #164bb6;
}

.quick-location-btn:focus-visible {
  outline: 3px solid rgba(29, 91, 215, .25);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .quick-location-fields {
    grid-template-columns: 1fr;
  }

  .quick-location-action,
  .quick-location-btn {
    width: 100%;
  }
}

/* ========================================================
   IMPORTANT MESSAGES - NOTICE ATTACHMENT PREVIEW
   ======================================================== */
.notice-attachment-wrap {
  margin-top: 6px;
}

.notice-attachment-link {
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  width: min(220px, 100%);
  color: var(--text);
  text-decoration: none;
}

.notice-attachment-thumb {
  position: relative;
  display: block;
  width: 210px;
  max-width: 100%;
  height: 145px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f6f7f9;
  box-shadow: 0 4px 12px rgba(23,32,51,.08);
}

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

.notice-pdf-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: #fff;
}

.notice-pdf-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(23,32,51,.88);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
}

.notice-attachment-name {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.notice-attachment-link:hover .notice-attachment-thumb,
.notice-attachment-link:focus-visible .notice-attachment-thumb {
  border-color: #aab4c3;
  box-shadow: 0 6px 16px rgba(23,32,51,.12);
}

@media (max-width: 700px) {
  .notice-attachment-link,
  .notice-attachment-thumb {
    width: min(210px, 100%);
  }
}

/* ========================================================
   ENTER YOUR TEAM - FORM SECTIONS
   The existing Team form remains one form. These styles only
   separate Basic Information from Assign Responsibility.
   ======================================================== */

.team-form-section {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.team-form-section:last-of-type {
  margin-bottom: 0;
}

.team-form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.team-form-section-number {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.team-form-section-head h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.team-form-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .team-form-section {
    padding: 15px;
  }
}



/* ========================================================
   VIEW TEAM - MULTI DESIGNATION FILTER
   ======================================================== */
.multi-select-filter {
  position: relative;
  width: 100%;
  margin-top: 10px;
}

.multi-select-filter > summary {
  list-style: none;
  width: 100%;
  border: 1.5px solid #2f6b3f;
  background: #fff;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.multi-select-filter > summary::-webkit-details-marker {
  display: none;
}

.multi-select-filter > summary::after {
  content: "▾";
  float: right;
}

.multi-select-filter[open] > summary::after {
  content: "▴";
}

.multi-select-options {
  margin-top: 6px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.multi-select-options label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  font-weight: 600;
  cursor: pointer;
}

.multi-select-options input[type="checkbox"] {
  width: auto;
  margin: 0;
}

@media (max-width: 700px) {
  .multi-select-options {
    grid-template-columns: 1fr;
  }
}


/* ========================================================
   VIEW TEAM - SENIOR HIERARCHY / TEAM SEPARATION
   Presentation only: backend visibility rules are unchanged.
   ======================================================== */

.view-team-block-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.senior-hierarchy-section {
  margin-bottom: 22px;
}

.senior-hierarchy-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.senior-hierarchy-card {
  padding: 13px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(23, 32, 51, 0.05);
}

.senior-hierarchy-card strong,
.senior-hierarchy-card small {
  display: block;
}

.senior-hierarchy-card strong {
  margin-bottom: 4px;
}

.senior-hierarchy-card small {
  margin-top: 2px;
  color: var(--muted);
}

.filter-team-title {
  margin-top: 2px;
}

.your-team-title {
  margin-top: 22px;
}

@media (max-width: 700px) {
  .senior-hierarchy-list {
    grid-template-columns: 1fr;
  }
}


/* ========================================================
   EDIT PERSONAL DETAILS - LOCKED ADMINISTRATIVE FIELDS
   ======================================================== */

#userRegistrationForm input:disabled,
#userRegistrationForm select:disabled,
#userRegistrationForm textarea:disabled {
  background: #f3f5f8;
  color: #667085;
  cursor: not-allowed;
  opacity: 1;
}

/* ========================================================
   PRAVAS - ROLE / PRABHAR AWARE PLAN BUILDER
   ======================================================== */

.pravas-plan-form {
  display: grid;
  gap: 16px;
}

.pravas-plan-scope-summary {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff8f1;
  font-weight: 800;
  color: #6f451d;
}

.pravas-plan-type-block {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.pravas-plan-type-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.pravas-plan-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pravas-plan-type-option {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.pravas-plan-type-option input[type="radio"] {
  width: auto;
  margin-top: 3px;
}

.pravas-plan-type-option strong,
.pravas-plan-type-option small {
  display: block;
}

.pravas-plan-type-option small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 600;
}

.pravas-single-date-row {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.pravas-single-date-row label {
  max-width: 360px;
}

.pravas-plan-heading-row h3 {
  margin-bottom: 5px;
}

.pravas-primary-area-list {
  display: grid;
  gap: 12px;
}

.pravas-primary-area-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.pravas-primary-select-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  cursor: pointer;
}

.pravas-primary-select-row input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex: 0 0 auto;
}

.pravas-primary-select-row span {
  min-width: 0;
}

.pravas-primary-select-row strong,
.pravas-primary-select-row small {
  display: block;
}

.pravas-primary-select-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 600;
}

.pravas-primary-details {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.pravas-lower-area-block {
  display: grid;
  gap: 8px;
}

.pravas-lower-area-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.pravas-lower-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pravas-lower-option {
  min-width: 0;
}

.pravas-lower-option-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pravas-lower-date-wrap {
  margin-left: 28px;
  font-size: 12px;
}

.pravas-lower-date-wrap input {
  margin-top: 4px;
}

@media (max-width: 700px) {
  .pravas-plan-type-options,
  .pravas-lower-area-grid {
    grid-template-columns: 1fr;
  }
}


/* ========================================================
   IMPORTANT MESSAGES - IN-APP ATTACHMENT VIEWER
   ======================================================== */
.notice-attachment-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body.message-attachment-open {
  overflow: hidden;
}

.message-attachment-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 16, 28, 0.82);
}

.message-attachment-modal.hidden {
  display: none;
}

.message-attachment-modal-content {
  width: min(1000px, 96vw);
  height: min(900px, 92vh);
  height: min(900px, 92dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.message-attachment-modal-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.message-attachment-modal-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-attachment-modal-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .45px;
}

.message-attachment-modal-heading strong {
  max-width: 62vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.message-attachment-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.message-attachment-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
}

.message-attachment-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #eef2f7;
  color: #172033;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
}

.message-attachment-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #eef1f5;
}

.message-attachment-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.message-attachment-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 700px) {
  .message-attachment-modal {
    padding: 0;
    align-items: stretch;
  }

  .message-attachment-modal-content {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .message-attachment-modal-bar {
    min-height: 60px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px 12px;
  }

  .message-attachment-modal-heading strong {
    max-width: 48vw;
  }

  .message-attachment-external {
    display: none;
  }

  .message-attachment-close {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 32px;
  }
}


/* =========================================================
   MODULE BACK BUTTONS - TOP RIGHT + BOTTOM RIGHT
   ========================================================= */

/* Keep the module heading on the left and Back on the right. */
.section-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.section-head > div {
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.section-head > .back-btn {
  order: 2;
  margin-left: auto;
  flex: 0 0 auto;
}

/* Clear, consistent Back control used throughout the modules. */
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid #cfd7e3;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(23, 32, 51, 0.04);
}

.back-btn:hover {
  background: #f4f6f9;
  border-color: #b9c3d1;
}

.back-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* In forms, the normal Save/Submit controls stay left,
   while Back sits at the far right of the same action row. */
.form-actions .form-back-btn {
  margin-left: auto;
}

/* List/overview modules without a submit row get a bottom-right Back. */
.module-end-back {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 22px;
  width: 100%;
}

@media (max-width: 700px) {
  .section-head {
    gap: 12px;
  }

  .back-btn {
    min-width: 82px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .form-actions .form-back-btn {
    margin-left: auto;
  }
}


/* =========================================================
   VIEW EVENTS - PDF / SHARE ACTIONS
   ========================================================= */

.event-report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.event-report-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .event-report-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .event-report-actions button {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* =========================================================
   VIEW EVENTS - TABLE LAYOUT
   ========================================================= */

#viewEventsGrid.event-table-host {
  display: block;
  width: 100%;
}

.event-table-summary {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.event-table-scroll {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(23, 32, 51, 0.04);
  -webkit-overflow-scrolling: touch;
}

.event-report-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: #ffffff;
}

.event-report-table th,
.event-report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e8edf3;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.4;
}

.event-report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  color: #172033;
  font-weight: 800;
  white-space: nowrap;
}

.event-report-table tbody tr:hover {
  background: #fafbfd;
}

.event-report-table tbody tr:last-child td {
  border-bottom: 0;
}

.event-col-date,
.event-col-number {
  white-space: nowrap;
}

.event-col-event {
  min-width: 155px;
}

.event-col-event strong,
.event-col-event small {
  display: block;
}

.event-col-event small {
  margin-top: 4px;
  font-weight: 500;
  color: var(--muted);
}

.event-id-inline {
  margin-top: 7px !important;
  font-size: 11px;
  letter-spacing: .2px;
}

.event-col-remarks {
  min-width: 180px;
  max-width: 260px;
  white-space: normal;
}

.event-col-photos {
  min-width: 125px;
}

.event-photo-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.event-table-thumb {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid #e2e7ef;
  cursor: pointer;
  background: #f5f7fb;
}

.event-view-photos-btn {
  padding: 6px 9px;
  white-space: nowrap;
}

.event-photo-unavailable {
  max-width: 100px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.event-table-empty {
  padding: 24px 16px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

@media (max-width: 700px) {
  .event-table-scroll {
    border-radius: 10px;
  }

  .event-report-table {
    min-width: 1030px;
  }

  .event-report-table th,
  .event-report-table td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .event-table-thumb {
    width: 76px;
    height: 52px;
  }
}


/* =========================================================
   PROFILE PHOTO
   ========================================================= */

.profile-avatar-small {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #eef2f7;
  border: 1px solid #d7dee8;
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-small .profile-icon {
  font-size: 21px;
  line-height: 1;
}

.profile-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.profile-details-pane {
  min-width: 0;
}

.profile-photo-pane {
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.profile-photo-frame {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f2f5f9;
  border: 2px solid #dbe2eb;
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.08);
}

.profile-photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-fallback {
  font-size: 58px;
  line-height: 1;
}

.profile-photo-btn {
  width: 100%;
  padding: 9px 12px;
}

.profile-photo-remove-btn {
  border: 0;
  background: transparent;
  color: #a33a2b;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.profile-photo-remove-btn:hover {
  text-decoration: underline;
}

.profile-photo-note {
  margin-top: 0;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .profile-card-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-photo-pane {
    width: 100%;
    order: -1;
  }

  .profile-photo-frame {
    width: 116px;
    height: 116px;
  }

  .profile-photo-btn {
    width: auto;
    min-width: 190px;
  }
}

/* =========================================================
   MOBILE HEADER FIT + STATE UNDER PRAKOSHTH
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell {
  width: 100%;
  max-width: 1180px;
  overflow-x: clip;
}

.topbar {
  gap: 8px;
}

.topbar > * {
  min-width: 0;
}

.brand {
  min-width: 0;
  flex: 1 1 auto;
}

.brand > div {
  min-width: 0;
}

.brand-title,
.brand-subtitle,
.brand-state {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle,
.brand-state {
  white-space: nowrap;
}

.brand-state {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.1;
  color: var(--muted);
}

.profile-btn {
  min-width: 0;
  max-width: 52%;
  flex: 0 1 auto;
}

.profile-user-text {
  min-width: 0;
  max-width: 100%;
}

.profile-user-text strong,
.profile-user-text small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   DATE OF BIRTH - DAY / MONTH / YEAR SELECTORS
   ========================================================= */

.dob-select-group {
  display: grid;
  grid-template-columns: minmax(72px, .75fr) minmax(92px, 1fr) minmax(92px, 1fr);
  gap: 8px;
  width: 100%;
}

.dob-select-group .dob-part {
  min-width: 0;
  width: 100%;
  text-align: center;
}

@media (max-width: 700px) {
  .topbar {
    padding: 8px 10px;
    gap: 5px;
  }

  .topbar .icon-btn {
    padding: 6px;
    flex: 0 0 auto;
  }

  .brand {
    gap: 6px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .brand-title {
    font-size: 16px;
    line-height: 1.05;
  }

  .brand-subtitle {
    font-size: 11px;
    line-height: 1.1;
  }

  .brand-state {
    font-size: 9px;
  }

  .profile-btn {
    max-width: 48%;
    gap: 5px;
    padding: 4px 2px;
  }

  .profile-user-text strong {
    font-size: 12px;
  }

  .profile-user-text small {
    margin-top: 2px;
    font-size: 9.5px;
  }

  .profile-avatar-small {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .dob-select-group {
    grid-template-columns: minmax(68px, .8fr) minmax(86px, 1fr) minmax(88px, 1fr);
    gap: 6px;
  }

  .dob-select-group .dob-part {
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
  }
}


/* ========================================================
   VIEW TEAM - CO-CONVENER HEADED SECTIONS
   Keeps the existing member card and designation order.
   ======================================================== */

.team-structured-sections {
  display: grid;
  gap: 24px;
  margin-top: 22px;
}

.team-view-group {
  min-width: 0;
}

.team-view-group .view-team-block-title {
  margin-bottom: 10px;
}

.team-view-group-list {
  display: grid;
  gap: 12px;
}

.team-view-group-note {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}


/* ========================================================
   SELF PROFILE EDIT
   ======================================================== */

.profile-edit-form {
  margin-top: 18px;
}

.profile-readonly-field {
  background: #f4f5f7;
  cursor: not-allowed;
}

.profile-location-result {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(25, 135, 84, 0.28);
  border-radius: 12px;
  background: rgba(25, 135, 84, 0.06);
}

.profile-location-result > strong {
  display: block;
  margin-bottom: 10px;
}

.profile-location-result-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.6fr);
  gap: 7px 14px;
  align-items: start;
}

.profile-location-result-grid span {
  color: #666;
}

.profile-location-result-grid b {
  overflow-wrap: anywhere;
}

.profile-form-status {
  min-height: 20px;
  margin: 10px 0 0;
}

.profile-form-error {
  color: #b42318;
}

@media (max-width: 640px) {
  .profile-location-result-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .profile-location-result-grid b {
    margin-bottom: 7px;
  }
}


/* ========================================================
   PROFILE PHOTO CROPPER
   ======================================================== */
.profile-photo-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.profile-photo-crop-modal.hidden {
  display: none !important;
}

.profile-photo-crop-card {
  width: min(94vw, 420px);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.profile-photo-crop-card h3 {
  margin: 0 0 6px;
}

.profile-photo-crop-stage {
  width: min(78vw, 320px);
  aspect-ratio: 1;
  margin: 16px auto;
  border-radius: 50%;
  overflow: hidden;
  background: #e8edf3;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #cbd5e1;
}

#profilePhotoCropCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#profilePhotoCropCanvas:active {
  cursor: grabbing;
}

.profile-photo-crop-controls {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
}

.profile-photo-crop-controls button {
  min-width: 46px;
  padding: 8px 10px;
  font-size: 22px;
  line-height: 1;
}

.profile-photo-crop-controls input[type="range"] {
  width: 100%;
}

.profile-photo-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 520px) {
  .profile-photo-crop-card {
    padding: 16px;
  }

  .profile-photo-crop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .profile-photo-crop-actions button {
    width: 100%;
  }
}


/* =========================================================
   PROFILE PHOTO WEBCAM
   ========================================================= */

.profile-photo-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 5001;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.76);
}

.profile-photo-camera-modal.hidden {
  display: none !important;
}

.profile-photo-camera-card {
  width: min(94vw, 520px);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.30);
  text-align: center;
}

.profile-photo-camera-card h3 {
  margin: 0 0 6px;
}

.profile-photo-camera-stage {
  width: min(82vw, 440px);
  aspect-ratio: 4 / 3;
  margin: 16px auto;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

#profilePhotoCameraVideo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scaleX(-1);
}

.profile-photo-camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 520px) {
  .profile-photo-camera-card {
    padding: 16px;
  }

  .profile-photo-camera-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .profile-photo-camera-actions button {
    width: 100%;
  }
}
