/* =====================================================================
   style.css — Citizen Portal
   All custom styles and layouts. Sections are numbered so they are
   easy to find. Change colors in section 1.
   ===================================================================== */

/* =====================================================================
   1. COLORS AND BASIC SETTINGS
   ===================================================================== */
:root {
  --navy: #0f2557;
  --navy-deep: #081838;
  --navy-soft: #1c3673;
  --canvas: #ccdbe5;
  --cream: #fff8f0;
  --ink: #141414;
  --muted: #56606f;
  --blue: #2c5cc5;
  --green: #5f9a1b;
  --amber: #f2a300;
  --red: #c62f2f;
  --focus: #6f9cff;
}

* {
  box-sizing: border-box;
}

/* Anything with the "hidden" attribute is never shown */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
}

body {
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: #eef0f4;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.25;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Text only screen readers can see */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 22px; }

/* Keeps the line breaks the user typed */
.pre-line { white-space: pre-line; }


/* =====================================================================
   2. PAGE LAYOUT (header on top, sidebar on the left, main on the right)
   ===================================================================== */
.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-rows: 70px 1fr;
  min-height: 100vh;
}

/* ---------- Top header ---------- */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #dde3ea;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.brand-name {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--navy);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.admin-label {
  font-size: 24px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: #eef2f7;
}

.icon-btn img {
  display: block;
}

/* The ☰ button that opens the sidebar only shows on small screens */
.nav-toggle {
  display: none;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--navy);
  color: #fff;
  padding-top: 120px;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.nav-dash {
  display: block;
  padding: 13px 10px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: #fff;
  text-decoration: none;
}

.nav-dash.active {
  background: var(--navy-deep);
}

.nav-dash:not(.active):hover {
  background: var(--navy-soft);
}

.nav-label {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8b99b8;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px 8px 10px;
  font-size: 14.5px;
  color: #fff;
  text-decoration: none;
  border-left: 4px solid transparent;
}

.nav-item img {
  width: 22px;
  height: 22px;
  flex: none;
}

.nav-item:hover {
  background: var(--navy-soft);
}

.nav-item.active {
  background: var(--navy-deep);
  border-left-color: var(--amber);
}

.nav-sep {
  margin: 14px;
  border: 0;
  border-top: 1px solid #2a4382;
}

/* ---------- Main area ---------- */
main {
  min-width: 0;
  padding: 16px 34px 48px;
  background: var(--canvas);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h1 {
  font-weight: 400;
  font-size: 26px;
}

.head-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 6px;
}

.crumbs {
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a {
  color: var(--navy);
}


/* =====================================================================
   3. NOTIFICATION BELL AND DROPDOWN MENUS
   ===================================================================== */
.bell-wrap {
  position: relative;
}

.bell-btn img {
  width: 30px;
  height: 30px;
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #fff;
  border: 1px solid #d6dee7;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(10, 27, 64, 0.22);
  z-index: 60;
}

/* JavaScript adds the "open" class to show a dropdown */
.dropdown.open {
  display: block;
}

.notif-dd {
  width: 340px;
  max-width: 86vw;
}

.dd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5eaf0;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
}

.notif-list button {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  background: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.notif-list button:hover {
  background: #f4f7fb;
}

.notif-list li.unread button {
  background: #eef4ff;
}

/* Blue dot in front of unread notifications */
.notif-list li.unread .notif-text::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.notif-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.notif-empty {
  padding: 18px 14px;
  color: var(--muted);
}

.menu-dd a,
.menu-dd button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 14.5px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.menu-dd a:hover,
.menu-dd button:hover {
  background: #f1f5f9;
}

.menu-dd .who {
  padding: 12px 16px;
  border-bottom: 1px solid #e5eaf0;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}


/* =====================================================================
   4. DASHBOARD (summary cards, quick post box, shortcut tiles)
   ===================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 0 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 86px;
  padding: 12px 10px 10px 12px;
  background: var(--cream);
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.stat:hover {
  transform: translate(-1px, -1px);
}

.stat-blue  { box-shadow: 4px 4px 0 var(--blue); }
.stat-green { box-shadow: 4px 4px 0 var(--green); }
.stat-amber { box-shadow: 4px 4px 0 var(--amber); }

.stat-label {
  font-size: 13px;
}

.stat-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.stat-row strong {
  padding-left: 4px;
  font-size: 21px;
}

.stat-row img {
  display: block;
  height: 40px;
  width: auto;
}

.composer {
  margin: 22px 10px 0;
  padding: 12px 14px 8px;
  background: #fff;
  border-radius: 18px;
}

.composer textarea {
  width: 100%;
  min-height: 40px;
  padding: 4px;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--navy);
  resize: vertical;
}

.composer textarea::placeholder {
  color: #1f3566;
}

.composer textarea:focus-visible {
  outline: 2px solid var(--focus);
  border-radius: 6px;
}

.composer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-post {
  padding: 2px 20px;
  border: 0;
  border-radius: 5px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  box-shadow: 2px 2px 0 #0008;
  cursor: pointer;
}

.hint {
  font-size: 13px;
  color: var(--red);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 170px);
  gap: 42px;
  justify-content: center;
  margin-top: 28px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 128px;
  padding: 8px;
  background: #fff;
  border-radius: 3px;
  color: #1d1d1d;
  text-decoration: none;
}

.tile img {
  width: 96px;
  height: 92px;
}

.tile span {
  font-size: 12.5px;
  text-align: center;
}

.tile:hover {
  box-shadow: 0 0 0 2px var(--navy);
}


/* =====================================================================
   5. PANELS, FORMS AND BUTTONS (used on every page)
   ===================================================================== */
.panel {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #bfcdd9;
  border-radius: 10px;
}

.panel h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

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

.panel-intro {
  margin: 0 0 16px;
}

.narrow {
  max-width: 900px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* One form field = label + input + help text + error message */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.field label,
.field legend,
.field .label {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}

.help {
  font-size: 12.5px;
  color: var(--muted);
}

/* Error messages stay hidden until JavaScript adds "invalid" to the field */
.err {
  display: none;
  font-size: 13px;
  color: var(--red);
}

.field.invalid .err {
  display: block;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #a9b9c8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

input[readonly] {
  background: #f1f4f7;
  color: var(--muted);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--navy);
}

input[type="file"] {
  padding: 7px;
}

textarea {
  resize: vertical;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  cursor: pointer;
}

.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.actions.left   { justify-content: flex-start; }
.actions.center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn img {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

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

.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn-secondary:hover {
  background: #eef3fa;
}

.btn-danger {
  background: var(--red);
  color: #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Small colored labels ("chips") */
.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8eef6;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip.senior { background: #e1e9fb; color: #1f4aa8; }
.chip.pwd    { background: #e6f1d8; color: #3f6e0e; }
.chip.solo   { background: #fcedd0; color: #855500; }
.chip.urgent { background: #fbe1e1; color: #a01f1f; }
.chip.ok     { background: #e6f1d8; color: #3f6e0e; }
.chip.wait   { background: #fcedd0; color: #855500; }
.chip.info   { background: #e1e9fb; color: #1f4aa8; }
.chip.ready  { background: #dff3f1; color: #0f6b61; }

/* ---------- Tables ---------- */
.table-wrap {
  position: relative;   /* keeps hidden labels inside, so the page doesn't scroll sideways */
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data th {
  padding: 10px;
  border-bottom: 2px solid #d5dee6;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

table.data td {
  padding: 11px 10px;
  border-bottom: 1px solid #e3e9ef;
  vertical-align: middle;
}

table.data tr:hover td {
  background: #f8fafc;
}

.nowrap { white-space: nowrap; }
.align-right { text-align: right; }

.empty-state {
  padding: 30px 10px;
  text-align: center;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar input  { max-width: 320px; }
.toolbar select { max-width: 220px; }

.notice {
  padding: 10px 14px;
  background: #fff8e6;
  border: 1px solid #f0d28a;
  border-radius: 8px;
  font-size: 14px;
}

.notice.info    { background: #eef4ff; border-color: #bcd0f5; }
.notice.success { background: #eef7e3; border-color: #bcd99a; }

/* ---------- Tabs (filter buttons above a list) ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 14px;
  border-bottom: 2px solid #dde5ec;
}

.tab {
  margin-bottom: -2px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

/* JavaScript adds "active" to the selected tab */
.tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: 600;
}

.tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e8eef6;
  font-size: 12px;
  text-align: center;
}

/* ---------- Label / value lists (<dl class="kv">) ---------- */
.kv {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px 18px;
  margin: 0;
  font-size: 14.5px;
  text-align: left;
}

.kv.compact {
  grid-template-columns: 130px 1fr;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

/* A <div> around a <dt>/<dd> pair lets us hide the pair with "hidden" */
.kv > div {
  display: contents;
}

.sub {
  margin: 20px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #e3e9ef;
  font-size: 15px;
}

.quote {
  max-height: 200px;
  overflow: auto;
  padding: 10px 14px;
  background: #f6f9fb;
  border-left: 4px solid var(--navy);
  border-radius: 4px;
  white-space: pre-wrap;
}

.quote-label {
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
}


/* =====================================================================
   6. STEP-BY-STEP FORMS AND "DONE" SCREENS
   ===================================================================== */
.stepper {
  display: flex;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.stepper li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.stepper li:last-child {
  flex: none;
}

.stepper .num {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid #9fb0c0;
  border-radius: 50%;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* Line between two steps */
.stepper li:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 14px;
  height: 2px;
  margin: 0 10px;
  background: #c3cfda;
}

.stepper li.active {
  color: var(--ink);
  font-weight: 600;
}

.stepper li.active .num {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.stepper li.done .num {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.stepper li.done:not(:last-child)::after {
  background: var(--green);
}

.step-intro {
  margin: 4px 0 18px;
}

/* Big clickable cards used as radio buttons */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: #fff;
  border: 2px solid #c3d1dc;
  border-radius: 10px;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice:hover {
  border-color: #8aa0b8;
}

.choice:has(input:checked) {
  border-color: var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice.taken {
  opacity: 0.55;
  cursor: not-allowed;
}

.choice-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.pw-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-box input {
  font-family: Consolas, Menlo, monospace;
  letter-spacing: 1px;
}

.review-block {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #d5dee6;
  border-radius: 8px;
}

.review-block .panel-head {
  margin-bottom: 8px;
}

.review-block h3 {
  font-size: 15px;
}

/* "Done" screen shown after an action succeeds */
.result {
  max-width: 640px;
  margin: 10px auto;
  padding: 34px 30px;
  background: #fff;
  border: 1px solid #bfcdd9;
  border-radius: 12px;
  text-align: center;
}

.result h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.result .kv {
  margin: 22px 0;
  padding: 16px;
  background: #f6f9fb;
  border-radius: 8px;
}

.result .notice {
  text-align: left;
}

.badge-ic {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e6f1d8;
  animation: pop 0.35s ease-out;
}

.badge-ic img {
  width: 40px;
  height: 40px;
}

.result.danger .badge-ic  { background: #fbe1e1; }
.result.pending .badge-ic { background: #fcedd0; }

@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}


/* =====================================================================
   7. ANNOUNCEMENTS AND SENDING SMS / EMAIL
   ===================================================================== */
.ann {
  padding: 16px;
  background: #fff;
  border: 1px solid #d5dee6;
  border-radius: 10px;
}

.ann.urgent {
  border-left: 5px solid var(--red);
}

.ann-image {
  width: 100%;
  max-height: 220px;
  margin-bottom: 10px;
  object-fit: cover;
  border-radius: 6px;
}

.ann h3 {
  margin: 8px 0 6px;
  font-size: 17px;
}

.ann p {
  margin: 0 0 10px;
  white-space: pre-line;
  word-break: break-word;
}

.ann-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

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

.ann-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e6ecf1;
}

.ann-row:last-child {
  border-bottom: 0;
}

.ann-row h3 {
  margin-bottom: 4px;
  font-size: 15px;
}

.ann-row .btns {
  display: flex;
  flex-wrap: wrap;
  flex: none;
  gap: 8px;
}

.gateway {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: #eef7e3;
  border: 1px solid #bcd99a;
  border-radius: 999px;
  font-size: 13.5px;
}

.gateway .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #d4ebb6;
}

.counter {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}

.summary-box {
  padding: 14px 16px;
  background: #f3f7fb;
  border: 1px solid #d3dde7;
  border-radius: 8px;
}

.summary-box .big {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.summary-box .kv {
  grid-template-columns: 110px 1fr;
  margin-top: 10px;
  font-size: 14px;
}

.sticky-preview {
  position: sticky;
  top: 90px;
}

.progress {
  height: 14px;
  margin: 18px 0 8px;
  overflow: hidden;
  background: #e1e8ef;
  border-radius: 7px;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--navy);
  transition: width 0.2s linear;
}

.progress-steps {
  display: inline-block;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  text-align: left;
}

.progress-steps li {
  padding: 4px 0;
  color: var(--muted);
}

.progress-steps li.on {
  color: var(--ink);
  font-weight: 600;
}

.progress-steps li.ok::before {
  content: "\2713  ";
  color: var(--green);
  font-weight: 700;
}


/* =====================================================================
   8. POP-UP WINDOWS (<dialog>) AND TOAST MESSAGES
   ===================================================================== */
dialog.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Only use flex while the dialog is open, so closed dialogs stay hidden */
dialog.modal[open] {
  display: flex;
  flex-direction: column;
}

dialog.modal.wide {
  max-width: 760px;
}

dialog.modal::backdrop {
  background: rgba(8, 24, 56, 0.55);
}

.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e3e9ef;
}

.modal header h2 {
  font-size: 18px;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-body > p:first-child {
  margin-top: 0;
}

.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e3e9ef;
}

.file-preview {
  padding: 30px 10px;
  background: #f5f8fb;
  border-radius: 8px;
  text-align: center;
}

.file-preview img {
  width: 60px;
  height: 60px;
}

/* An uploaded ID shown in the file pop-up */
.attachment-image {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  margin: 0 auto;
  border-radius: 8px;
}

/* An uploaded PDF shown in the file pop-up */
.pdf-preview {
  display: block;
  width: 100%;
  height: 60vh;
  margin-bottom: 10px;
  border: 1px solid #d5dee6;
  border-radius: 8px;
}

.pdf-preview[hidden] {
  display: none;
}

/* Document request: "Use an ID I already uploaded" (list + View button) */
.saved-id-row {
  display: flex;
  gap: 8px;
  margin: 6px 0 10px 26px;
}

.saved-id-row select {
  flex: 1;
  min-width: 0;
}

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 120;
}

.toast {
  max-width: 360px;
  padding: 12px 18px;
  background: var(--navy);
  color: #fff;
  border-left: 5px solid var(--green);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: slide 0.25s ease-out;
}

.toast.error {
  border-left-color: var(--red);
}

@keyframes slide {
  from { transform: translateY(12px); opacity: 0; }
}

/* Logged-out page */
.logged-out {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--canvas);
}


/* =====================================================================
   9. PUBLIC PAGE PREVIEW (sector page / barangay page)
   ===================================================================== */
.page-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.page-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #bfcdd9;
  border-radius: 10px;
}

.page-card .band {
  height: 10px;
}

.page-card .body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.page-card h2 {
  font-size: 18px;
}

.page-card .kv {
  grid-template-columns: 120px 1fr;
  font-size: 13.5px;
}

.page-card .actions {
  margin-top: auto;
  justify-content: flex-start;
}

.spage {
  --theme: #2c5cc5;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d5dee6;
  border-radius: 10px;
}

.spage-banner {
  padding: 22px 24px;
  background: var(--theme);
  color: #fff;
}

.spage-banner small {
  opacity: 0.85;
}

.spage-banner h2 {
  margin: 4px 0;
  font-size: 24px;
}

.spage-banner p {
  margin: 0;
  opacity: 0.95;
}

.spage-body {
  padding: 20px 24px;
}

.spage-body > p {
  margin-top: 0;
  white-space: pre-line;
  word-break: break-word;
}

.spage-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  background: #f5f8fb;
  border-radius: 8px;
}

.spage-info h4 {
  margin-bottom: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.spage-info p {
  margin: 0;
  font-size: 14px;
  word-break: break-word;
}

.spage-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.spage-cols h3 {
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--theme);
}

.spage-cols ul {
  margin: 0;
  padding-left: 20px;
}

.hidden-note {
  padding: 8px 12px;
  background: #fff3d6;
  border-radius: 6px;
  font-size: 13.5px;
}

.preview-wrap {
  max-width: 900px;
}

/* Editor: add/remove list items */
.list-editor ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.list-editor li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: #f5f8fb;
  border-radius: 6px;
  font-size: 14px;
}

.list-editor .add {
  display: flex;
  gap: 8px;
}

.list-editor li img {
  width: 18px;
  height: 18px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #9fb0c0;
  cursor: pointer;
}

.swatch.selected {
  box-shadow: 0 0 0 3px var(--ink);
}

/* On/off switch made from a checkbox */
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  cursor: pointer;
}

.switch input {
  appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #b8c4cf;
  cursor: pointer;
  transition: background 0.15s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}

.switch input:checked {
  background: var(--green);
}

.switch input:checked::after {
  left: 23px;
}

/* Timeline (history of a request or activity) */
.timeline {
  list-style: none;
  margin: 12px 0 18px;
  padding: 0 0 0 22px;
  border-left: 2px solid #c9d5e0;
}

.timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 0 16px 6px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green);
}

.timeline li:last-child::before {
  background: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}

.timeline li.bad::before {
  background: var(--red);
  box-shadow: 0 0 0 2px var(--red);
}

/* Big number boxes */
.big-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.big-stats div {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #bfcdd9;
  border-radius: 10px;
}

.big-stats strong {
  display: block;
  font-size: 24px;
  color: var(--navy);
}

.big-stats span {
  font-size: 13px;
  color: var(--muted);
}

/* My QR code (My Account) */
.qr-image {
  display: block;
  margin: 0 auto 8px;
  max-width: 100%;
  height: auto;
}
.qr-image[hidden] {
  display: none;
}
/* "Resident ID: RES-2026-0003" under the QR code */
.resident-id {
  margin: 0 0 6px;
  text-align: center;
  font-size: 15px;
}

/* List of attached files */
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 8px 10px;
  background: #f5f8fb;
  border-radius: 6px;
  font-size: 14px;
}

.file-list li img {
  width: 20px;
  height: 20px;
  flex: none;
}

.file-list li span {
  flex: 1;
}

.next-step {
  padding-top: 14px;
  border-top: 1px solid #e3e9ef;
}

.next-step h3 {
  font-size: 15px;
}


/* =====================================================================
   SMALLER SCREENS (tablets and phones)
   ===================================================================== */
@media (min-width: 901px) {
  /* Keeps the sidebar color running the full height on long pages */
  .app {
    background: linear-gradient(to right, var(--sidebar-color, var(--navy)) 264px, transparent 264px);
  }
}

@media (max-width: 1100px) {
  .stats {
    gap: 20px;
    padding: 0;
  }

  .tiles {
    grid-template-columns: repeat(3, minmax(0, 170px));
    gap: 20px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .sticky-preview {
    position: static;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* The sidebar slides in from the left when body has "nav-open" */
  .sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 270px;
    padding-top: 24px;
    z-index: 35;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }

  body.nav-open .sidebar {
    transform: none;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
  }

  main {
    padding: 14px 16px 40px;
  }

  .topbar {
    padding: 0 12px;
  }

  .brand-name {
    font-size: 18px;
  }

  .seal {
    width: 44px;
    height: 44px;
  }

  .admin-label {
    font-size: 18px;
  }

  .choice-grid,
  .page-cards,
  .spage-info,
  .spage-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .big-stats {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .tiles {
    grid-template-columns: 1fr 1fr;
  }

  .row-2 {
    grid-template-columns: 1fr;
  }

  .kv,
  .kv.compact {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .kv dd {
    margin-bottom: 8px;
  }

  .stepper .st-label {
    display: none;
  }

  .stepper li.active .st-label {
    display: inline;
  }

  .admin-label {
    display: none;
  }

  .ann-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* =====================================================================
   11. LOGIN PAGE (login.html)
   ===================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

/* Grey bar with the seal and portal name */
.login-header {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 70px;
  padding: 0 16px;
  background: #e6e6e6;
}

.login-seal {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.login-site-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}

.login-main {
  flex: 1;
  background: var(--cream);   /* cream, not the dashboard's blue-grey */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

/* Navy login box */
.login-card {
  width: 100%;
  max-width: 290px;
  min-height: 345px;
  padding: 36px 32px;
  background: #12285c;
  color: #fff;
}

.login-card h2 {
  margin-bottom: 38px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.login-card .field {
  margin-bottom: 24px;
}

.login-card input {
  padding: 5px 6px;
  border: 1px solid #000;
  border-radius: 0;
  font-size: 15px;
}

/* Error text is light red so it can be read on the navy box */
.login-card .err {
  color: #ffb4b4;
}

.login-error {
  margin: -20px 0 16px;
  padding: 6px 10px;
  background: #fbe4e4;
  border-radius: 4px;
  color: #8a1c1c;
  font-size: 13px;
}

/* Password box with the eye button inside it */
.password-box {
  position: relative;
}

.password-box input {
  padding-right: 40px;
}

.eye-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  padding: 2px;
  border: 0;
  background: none;
  transform: translateY(-50%);
  cursor: pointer;
}

.eye-btn img {
  width: 22px;
  height: 22px;
}

.login-btn {
  display: block;
  width: 158px;
  margin: 6px auto 0;
  padding: 8px 0;
  background: #081838;
  border: 2px solid #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.login-btn:hover {
  background: var(--navy);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.login-forgot {
  margin: 8px 0 0;
  text-align: center;
  font-size: 10px;
}

.login-link {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 10px;
  text-decoration: underline;
  cursor: pointer;
}

/* Black bar at the bottom */
.login-footer {
  min-height: 32px;
  padding: 8px 16px;
  background: #000;
  color: #bbb;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 640px) {
  .login-site-name {
    font-size: 18px;
  }
}

/* =====================================================================
   12. CITIZEN PORTAL
   ===================================================================== */
body {
  font-family: "Inter", "Open Sans", Arial, sans-serif;
}

/* Colors for the account type chip */
.chip.standard { background: #eef1f5; color: #334155; }

/* ---------- Header: "BACOOR PORTAL" + orange subtitle ---------- */
.login-titles {
  display: flex;
  flex-direction: column;
}

.login-subtitle {
  margin: 2px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: #f2a300;
}

/* ---------- Citizen Login ---------- */
.citizen-card {
  border: 1px solid #000;
}

.login-note {
  margin: -20px 0 16px;
  padding: 6px 10px;
  background: #eef7e3;
  border-radius: 4px;
  color: #2f5a0c;
  font-size: 13px;
}

/* ---------- Set a new password (change-password.html) ---------- */
.login-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

.login-help {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: #c9d4ee;
}

.login-welcome {
  margin: -20px 0 22px;
  text-align: center;
  font-size: 13px;
  color: #dbe3f5;
}

.login-create {
  margin: 26px 0 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #f2a300;
}

.login-create a {
  color: #f2a300;
}

/* "Sector office staff? Log in as Sector Admin" under the login form */
.login-switch {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  font-size: 11.5px;
}

.login-switch span {
  display: block;
  opacity: 0.85;
}

.login-switch a {
  display: inline-block;
  margin-top: 4px;
  color: #ffd35c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.login-switch a:hover {
  text-decoration: underline;
}

/* ---------- Create an Account (choose a sector) ---------- */
.register-main {
  flex: 1;
  padding: 18px 16px 40px;
  background: var(--cream);
}

.register-title {
  margin-bottom: 22px;
  text-align: center;
  font-family: "Anton", Impact, sans-serif;
  font-size: 26px;
  font-weight: 400;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 325px));
  justify-content: center;
  gap: 24px 26px;
}

.sector-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  height: 156px;
  border: 1px solid var(--navy);
  text-decoration: none;
}

.sector-card:hover {
  background: #fff;
  box-shadow: 4px 4px 0 var(--navy);
}

.sector-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.sector-icon img {
  width: 30px;
  height: 30px;
}

.icon-pwd      { background: #eaf2ff; }
.icon-solo     { background: #f6effe; }
.icon-senior   { background: #fff6db; }
.icon-standard { background: #eef1f5; }

.sector-name {
  font-size: 19px;
  font-weight: 600;
  color: #1a2b5f;
}

.register-back {
  margin-top: 26px;
  text-align: center;
  font-size: 14px;
}

/* ---------- Registration form (2 steps) ---------- */
.form-main {
  flex: 1;
  padding: 8px 16px 40px;
  background: #fff;
}

.reg-box {
  max-width: 530px;
  margin: 0 auto;
}

.reg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f6f8fb;
  border-bottom: 1px solid #e5e9f0;
}

.reg-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.reg-head p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #64748b;
}

.reg-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
}

.reg-back-btn img {
  width: 14px;
  height: 14px;
}

.reg-body {
  padding: 18px 20px 0;
}

.reg-section {
  margin: 6px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef1f5;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #94a3b8;
}

.reg-body .field label,
.reg-body .field .label {
  font-size: 12.5px;
  font-weight: 500;
  color: #1f2937;
}

.reg-body input,
.reg-body select,
.reg-body textarea {
  padding: 10px 12px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  font-size: 13.5px;
}

.reg-body input::placeholder,
.reg-body textarea::placeholder {
  color: #94a3b8;
}

.reg-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.reg-actions.spread {
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #eef1f5;
}

.next-btn {
  padding: 8px 14px;
  background: #081838;
  border: 0;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  cursor: pointer;
}

/* Light blue box with the sector's own questions */
.requirements {
  margin-bottom: 18px;
  padding: 14px 18px 4px;
  background: #f5f9ff;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
}

.req-title {
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dbe6f5;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1d4ed8;
}

/* Dashed upload area (a <label> for a hidden file input) */
.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 20px;
  background: #fbfdff;
  border: 1.5px dashed #bcd0f5;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
}

.upload-box:hover {
  background: #f2f7ff;
}

.upload-box img {
  width: 30px;
  height: 30px;
}

.field .upload-box .upload-title {
  font-size: 12.5px;
  font-weight: 500;
  color: #1d4ed8;
}

.upload-hint {
  font-size: 10.5px;
  font-weight: 400;
  color: #64748b;
}

.small-upload {
  min-height: 100px;
}

.field.invalid .upload-box {
  border-color: var(--red);
}

.back-btn {
  padding: 10px 18px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.submit-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: #16a34a;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover {
  background: #15803d;
}

.submit-btn:disabled {
  opacity: 0.6;
}

.submit-btn img {
  width: 16px;
  height: 16px;
}

.form-main .result {
  margin-top: 30px;
}

/* ---------- Pages after logging in ---------- */
.citizen-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.citizen-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 14px;
}

/* Navy menu bar under the header */
.citizen-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 16px;
  background: var(--navy);
}

.nav-link {
  padding: 12px 16px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--navy-soft);
}

.nav-link.active {
  background: var(--navy-deep);
  border-bottom-color: var(--amber);
}

.logout-link {
  margin-left: auto;
}

/* Menu button: hidden on computers, shown on phones (see the 760px rules below) */
.citizen-nav-toggle {
  display: none;
}

.citizen-main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  background: transparent;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.page-intro {
  margin: 4px 0 18px;
}

.panel-title {
  margin-bottom: 10px;
  font-size: 17px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.latest-request {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f6f9fb;
  border-radius: 8px;
}

.steps-list {
  margin: 0 0 12px;
  padding-left: 20px;
}

.steps-list li {
  margin-bottom: 8px;
}

.guide + .guide {
  margin-top: 22px;
}

.guide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 14px 0;
}

.guide-cols h4 {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--navy);
}

.guide-cols ul {
  margin: 0;
  padding-left: 20px;
}

/* SMS / email messages */
.message {
  padding: 12px 0;
  border-bottom: 1px solid #e6ecf1;
}

.message:last-child {
  border-bottom: 0;
}

.message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.message-text {
  margin: 6px 0 0;
  white-space: pre-line;
}

/* Colored dot before the desk status */
.dot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.dot-status::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: #9aa7b5;
}

.dot-status.available::before   { background: var(--green); }
.dot-status.break::before       { background: var(--amber); }
.dot-status.unavailable::before { background: var(--red); }

/* Meetings list */
.meeting {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e6ecf1;
}

.meeting:last-child {
  border-bottom: 0;
}

.meeting .date {
  width: 64px;
  flex: none;
  overflow: hidden;
  border: 1px solid #cfd8e1;
  border-radius: 8px;
  text-align: center;
}

.meeting .date b {
  display: block;
  padding: 2px 0;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
}

.meeting .date strong {
  display: block;
  padding: 4px 0;
  font-size: 22px;
}

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

.meeting h3 {
  font-size: 15.5px;
}

.meeting p {
  margin: 6px 0 0;
}

@media (max-width: 760px) {
  .dash-grid,
  .guide-cols,
  .sector-grid {
    grid-template-columns: 1fr;
  }

  .citizen-user {
    display: none;
  }

  .logout-link {
    margin-left: 0;
  }

  /* Phones: the menu is closed until the ☰ button is tapped (body gets "nav-open") */
  .citizen-nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .citizen-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  body.nav-open .citizen-nav {
    display: flex;
  }

  .citizen-nav .nav-link {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--navy-soft);
  }

  .citizen-nav .nav-link.active {
    border-bottom-color: var(--navy-soft);
    border-left: 4px solid var(--amber);
  }

  .reg-head {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* "Back to homepage" link in the grey header of the login pages */
.home-link {
  margin-left: auto;
  padding: 8px 12px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: #1f2937;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.home-link:hover {
  background: rgba(0, 0, 0, 0.07);
}

/* Login page header on phones: smaller title and seal, and the
   "Back to homepage" link may wrap, so the header fits the screen */
@media (max-width: 640px) {
  .login-header {
    gap: 10px;
    padding: 0 12px;
  }

  .login-seal {
    width: 44px;
    height: 44px;
  }

  .login-site-name {
    font-size: 17px;
  }

  .home-link {
    padding: 6px 4px;
    white-space: normal;
    text-align: right;
  }
}
