:root {
  /* GIS Brand */
  --gis-blue: #3aabe1;
  --gis-charcoal: #5e5e60;

  /* Backgrounds */
  --background: #f7f9fb;
  --surface: #ffffff;

  /* Borders */
  --border: #d9e2ea;

  /* Status */
  --success: #2e8b57;
  --warning: #f4a300;
  --danger: #c73b3b;



  /* Text */
  --text-primary: #2f3a43;
  --text-secondary: #6f7a85;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* Shadows */
  --shadow-card: 0 8px 24px rgba(40, 62, 80, 0.08);

  /* Existing application variables */
  color-scheme: light;
  --ink: #182026;
  --muted: #65717b;
  --line: #d9e1e5;
  --panel: #ffffff;
  --page: #f5f7f3;
  --nav: #16262e;
  --nav-soft: #223740;
  --accent: #0b6e69;
  --accent-strong: #075955;
  --gold: #c78b1f;
  --good: #347f54;
  --blue: #376a9e;
  --shadow: 0 18px 46px rgba(28, 40, 45, 0.12);
}
* {
  box-sizing: border-box;
}

body{
    font-family: "Inter", sans-serif;
    background: var(--background);
    color: var(--text-primary);
}

h1,h2,h3{
    font-family:"PT Serif",serif;
    color:var(--gis-charcoal);
}

[id] {
  scroll-margin-top: 18px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border);
  color: #f7fbfb;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
}

.brand {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #FFFFFF;
  color: var(--nav);
  font-weight: 800;
  letter-spacing: 0;
  border: 3px solid var(--gis-blue);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  color: var(--gis-charcoal);
  line-height: 1.1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.nav-list {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  background: var(--gis-blue);
}

.nav-item {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: var(--nav-soft);
  color: #FFFFFF;
}

.sidebar-action {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
}

.sidebar-action:hover {
  background: var(--background);
}

.appointment-return-action {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  margin-top: 10px;
  border-color: var(--gis-blue);
  background: var(--gis-blue);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(20, 35, 45, 0.24);
}

.appointment-return-action:hover {
  background: var(--gis-blue);
  color: #111111;
}

.appointment-return-action .sidebar-action-icon {
  background: transparent;
  color: #111111;
}

.appointment-return-action[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.system-card,
.section-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.section-card {
  margin-top: 0;
}

.system-card {
  margin-top: auto;
}

.system-label {
  color: #bfd0d0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.system-link {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.section-link {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: #ffffff;
  min-height: 32px;
  padding: 7px 0;
  text-align: left;
  font-weight: 700;
}

.section-link:hover {
  color: #d7ece8;
}

.main-panel {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar-layout {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.topbar-layout .top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  min-width: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 10px;
  display: grid;
  gap: 3px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
}

.search-box input,
.full-input,
.mini-search input,
.dialog-form input,
.dialog-form select,
.worksheet-field input,
.worksheet-field select,
.worksheet-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--ink);
  min-height: 42px;
}

.worksheet-field textarea {
  resize: vertical;
  min-height: 120px;
}

.search-box input {
  border: 0;
  padding: 0;
  min-height: 22px;
}

.primary-action,
.text-action,
.segment,
.icon-button,
menu button {
  border-radius: 7px;
  min-height: 40px;
  padding: 0 14px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;

  border: 0;
  border-radius: 10px;

  background: var(--accent);
  color: #ffffff;

  font-size: 0.95rem;
  font-weight: 700;

  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.primary-action:hover {
  background: var(--accent-strong);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.text-action {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent);
  font-weight: 700;
}


.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric.warning {
  border-left-color: var(--gold);
}

.metric.danger {
  border-left-color: var(--danger);
}

.metric.good {
  border-left-color: var(--good);
}

.metric-label,
.metric-note,
.pill,
small {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 31px;
  line-height: 1;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel.wide {
  min-height: 280px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf2f2;
  color: #526065;
  white-space: nowrap;
}

.pill.danger {
  background: #fae8e6;
  color: var(--danger);
}

.pill.warning {
  background: #fff4d8;
  color: #8a5a00;
}

.pill.success {
  background: #def0e6;
  color: var(--success);
}

.worksheet-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.autosave-pill {
  background: #e7f3ef;
  color: var(--accent-strong);
}

.autosave-pill.saved {
  background: #def0e6;
  color: var(--good);
}

.storage-pill {
  background: #edf2f2;
  color: var(--muted);
}

.storage-pill.connected {
  background: #def0e6;
  color: var(--good);
}

.storage-pill.off {
  background: #fae8e6;
  color: var(--danger);
}

.storage-pill.browser {
  background: #fff4d8;
  color: #8a5a00;
}

.timeline,
.alert-list,
.activity-list,
.client-stack,
.client-list,
.task-board,
.calendar-grid {
  display: grid;
  gap: 10px;
}

.timeline-item,
.alert-item,
.activity-item,
.client-row,
.task-item,
.calendar-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.timeline-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.time-chip {
  min-height: 34px;
  border-radius: 6px;
  background: #edf2f2;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent-strong);
}

.item-title {
  font-weight: 800;
  margin-bottom: 3px;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
}

.client-preferred-name {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.alert-item {
  border-left: 5px solid var(--danger);
}

.alert-item.warning {
  border-left-color: var(--gold);
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.mini-search {
  margin-bottom: 10px;
}

.client-row {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--ink);
}

.client-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-badge {
  border-radius: 999px;
  padding: 5px 8px;
  background: #e7f3ef;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.client-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(11, 110, 105, 0.16);
}

.client-search-panel {
  margin-bottom: 16px;
}

.client-search-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(280px, 1.4fr) minmax(220px, 0.65fr);
  gap: 12px;
  align-items: end;
}

.client-profile-panel {
  min-height: 680px;
}

.client-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.client-name {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gis-charcoal);
}

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.client-summary-column {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.client-summary-column h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.client-summary-column .field {
  margin-bottom: 14px;
}

.client-summary-column .field:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .client-summary-grid {
    grid-template-columns: 1fr;
  }
}

.status-select-label {
  min-width: 230px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-select-label select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--ink);
  min-height: 42px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  min-height: 72px;
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.field strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.profile-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 14px;
}

.subpanel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.section-complete {
  border-color: rgba(52, 127, 84, 0.38);
  background: #f1f8f4;
}

.section-complete h3::after,
.section-complete h4::after {
  content: "Complete";
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #def0e6;
  color: var(--good);
  font-size: 12px;
  font-weight: 800;
}

.prep-summary {
  grid-column: 1 / -1;
  border: 1px solid rgba(184, 68, 63, 0.28);
  border-radius: 8px;
  padding: 14px;
  margin: 0 0 16px;
  background: #fff8f7;
  box-shadow: var(--shadow);
}

.prep-summary.prep-ready {
  border-color: rgba(52, 127, 84, 0.38);
  background: #f1f8f4;
}

.prep-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.prep-summary-header h3 {
  margin-bottom: 4px;
}

.prep-score {
  min-width: 82px;
  min-height: 64px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
}

.prep-score.danger {
  background: #fae8e6;
  border-color: #efc4bf;
  color: var(--danger);
}

.prep-score.warning {
  background: #fff4d8;
  border-color: #efd28c;
  color: #8a5a00;
}

.prep-score.success {
  background: #def0e6;
  border-color: #add8bd;
  color: var(--success);
}

.prep-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.prep-score strong {
  font-size: 24px;
  line-height: 1;
}

.prep-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prep-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.prep-item:hover {
  box-shadow: 0 0 0 2px rgba(11, 110, 105, 0.12);
}

.prep-item.ready {
  border-color: rgba(52, 127, 84, 0.32);
}

.prep-item.missing {
  border-color: rgba(184, 68, 63, 0.32);
}

.prep-status {
  min-height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #fae8e6;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.prep-item.ready .prep-status {
  background: #def0e6;
  color: var(--good);
}

.notes-panel {
  grid-column: 1 / -1;
  min-height: 180px;
}

.client-file-setup-panel {
  margin-bottom: 16px;
}

.worksheet-panel {
  grid-column: 1 / -1;
}

.worksheet-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.worksheet-divider {
  height: 2px;
  background: var(--nav);
  border-radius: 999px;
  margin: 22px 0 6px;
  opacity: 0.18;
}

.active-appointment-section {
  background: #f8fbfa;
  border: 1px solid rgba(11, 110, 105, 0.18);
  border-radius: 8px;
  padding: 14px;
}

.annual-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.appointment-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: #ffffff;
}

.appointment-checklist-item.ready {
  border-color: var(--success);
  background: #eef8f2;
  color: var(--success);
}

.appointment-checklist-item.missing {
  border-color: var(--warning);
  background: #fff9db;
  color: #7a5a00;
}

.appointment-notes-field {
  margin-top: 10px;
}

.worksheet-section h4,
.provider-block h5,
.repeat-card h5 {
  margin: 0 0 10px;
}

.appointment-workspace {
  display: grid;
  gap: 18px;
}

.appointment-workspace-header {
  padding: 24px;
}

.appointment-workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.appointment-workspace-heading h2 {
  margin: 0;
}

#appointmentClientName {
  margin: 8px 0 0;
  font-size: 1.75rem;
  color: var(--gis-charcoal);
}

.appointment-workspace-status {
  display: flex;
  align-items: center;
}

.intake-packet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.intake-packet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.intake-packet-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.appointment-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.appointment-review-grid .text-action {
  width: 100%;
}

.appointment-notes-panel textarea {
  width: 100%;
  resize: vertical;
}

.appointment-completion-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

@media (max-width: 900px) {
  .appointment-workspace-heading,
  .appointment-completion-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .intake-packet-grid,
  .appointment-review-grid {
    grid-template-columns: 1fr;
  }
}

.worksheet-section h4 {
  font-size: 15px;
}

.provider-block h5,
.repeat-card h5 {
  font-size: 13px;
  color: var(--muted);
}

.form-grid,
.question-grid,
.repeating-grid {
  display: grid;
  gap: 10px;
}

.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.question-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.repeating-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.worksheet-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wide-field {
  grid-column: 1 / -1;
}

.provider-block,
.repeat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.repeat-card {
  display: grid;
  gap: 8px;
}

.provider-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.compact-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.provider-result {
  margin-top: 10px;
}

.provider-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(11, 110, 105, 0.25);
  border-radius: 8px;
  padding: 10px;
  background: #f2faf8;
}

.provider-suggestion.empty {
  display: block;
  color: var(--muted);
  background: #fbfcfb;
  border-color: var(--line);
}

.provider-verified {
  border: 1px solid rgba(52, 127, 84, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f0f8f3;
  color: var(--good);
  font-size: 13px;
  font-weight: 800;
}

.specialist-list {
  display: grid;
  gap: 10px;
}

.specialist-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.specialist-row.is-hidden,
.rx-row.is-hidden {
  display: none;
}

.specialist-number {
  min-height: 42px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #edf2f2;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.specialist-fields {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(140px, 1fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr);
  gap: 8px;
  align-items: end;
}

.specialist-search {
  align-self: end;
}

.specialist-row .provider-result {
  grid-column: 2;
  margin-top: 0;
}

.rx-list {
  display: grid;
  gap: 10px;
}

.rx-row {
  display: grid;
  grid-template-columns: 56px minmax(180px, 1.5fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr) 40px;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.rx-number {
  min-height: 42px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #edf2f2;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.remove-rx-button {
  align-self: end;
}

.pharmacy-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  margin-top: 12px;
  margin-bottom: 10px;
}

.pharmacy-number {
  min-height: 42px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #edf2f2;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.pharmacy-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(100px, 0.7fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr) minmax(80px, 0.5fr) auto;
  gap: 8px;
  align-items: end;
}

.pharmacy-search {
  align-self: end;
}

.pharmacy-row .provider-result {
  grid-column: 2;
  margin-top: 0;
}

.facility-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.facility-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.facility-number {
  min-height: 42px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #edf2f2;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.facility-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(140px, 1fr) minmax(90px, 0.6fr);
  gap: 8px;
  align-items: end;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.appointment-history-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.appointment-history-entry {
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.appointment-history-entry:nth-child(even) {
  background: #e3edef;
  border-color: #b8cfd4;
}

.appointment-history-note {
  margin: 10px 0 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.checklist {
  display: grid;
  gap: 8px;
}

.check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.check-item input {
  width: 18px;
  height: 18px;
}

.upload-check-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.upload-check-item.uploaded {
  border-color: rgba(52, 127, 84, 0.45);
}

.upload-check-item.refresh-needed {
  border-color: rgba(184, 68, 63, 0.6);
  background: #fff8f7;
}

.upload-status-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #edf2f2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-check-item.uploaded .upload-status-mark {
  background: #def0e6;
  color: var(--good);
}

.upload-check-item.refresh-needed .upload-status-mark {
  background: #fae8e6;
  color: var(--danger);
}

.upload-copy {
  min-width: 0;
}

.soa-note {
  color: var(--accent-strong);
  font-weight: 700;
}

.refresh-needed .soa-note {
  color: var(--danger);
}

.retention-history {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.retention-history.empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.retention-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(35, 48, 58, 0.12);
  border-radius: 7px;
  background: #f8fbfb;
}

.retention-row.discard-eligible {
  background: #fff8f0;
  border-color: rgba(177, 100, 43, 0.35);
}

.retention-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retention-badge {
  border-radius: 999px;
  background: #e8f0ef;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
  white-space: nowrap;
}

.discard-eligible .retention-badge {
  background: #ffe7cf;
  color: #9a4d17;
}

.stored-file-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.stored-file-link.button-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.stored-file-link:hover {
  text-decoration: underline;
}

.upload-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.file-input {
  display: none;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.external-button {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent);
  background: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.segmented {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 8px;
  background: #f4f7f7;
}

.segment {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segment.active {
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: 0 1px 5px rgba(20, 28, 32, 0.08);
}

.task-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-item {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-status {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.status-button {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 7px;
  min-height: 34px;
  color: var(--accent);
  font-weight: 700;
}

.calendar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: center;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.forms-list {
  display: grid;
  gap: 14px;
}

.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.form-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.form-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-email-block {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.form-source {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.form-source code {
  padding: 10px;
  border-radius: 7px;
  background: #edf2f2;
  overflow-wrap: anywhere;
}

.form-open-link {
  width: fit-content;
  min-width: 130px;
}

.report-block {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-block strong {
  font-size: 36px;
}

dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: min(480px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(10, 20, 25, 0.45);
}

.dialog-form {
  display: grid;
  gap: 14px;
}

.dialog-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  border: 1px solid var(--line);
  background: #ffffff;
  min-width: 40px;
  padding: 0;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 0;
}

menu button {
  border: 1px solid var(--line);
  background: #ffffff;
}

@media (max-width: 1100px) {
  .metric-grid,
  .report-grid,
  .form-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout,
  .client-search-row,
  .profile-sections,
  .prep-grid,
  .annual-doc-grid,
  .form-grid,
  .form-grid.two,
  .question-grid,
  .repeating-grid,
  .rx-row,
  .pharmacy-row,
  .pharmacy-fields,
  .facility-row,
  .facility-fields,
  .snapshot-grid,
  .specialist-row,
  .specialist-fields {
    grid-template-columns: 1fr;
  }

  .specialist-row .provider-result,
  .pharmacy-row .provider-result {
    grid-column: 1;
  }

  .client-profile-panel {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 16px;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    font-size: 12px;
    padding: 8px 6px;
  }

  .system-card {
    display: none;
  }

  .main-panel {
    padding: 16px;
  }

  .topbar,
  .top-actions,
  .client-header {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
  }

  .metric-grid,
  .task-board,
  .profile-grid,
  .report-grid,
  .form-detail-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item,
  .calendar-row,
  .activity-item {
    grid-template-columns: 1fr;
  }
}
.producer-heading h1 {
  margin: 0;
  font-family: "PT Serif", Georgia, serif;
  color: #5e5e60;
}

.producer-date,
.producer-summary {
  margin: 4px 0 0;
  color: #6f7a85;
}

.next-appointment-panel {
  background: #ffffff;
  border: 1px solid #d9e2ea;
  border-left: 8px solid #3aabe1;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(40, 62, 80, 0.08);
  margin-bottom: 24px;
}

.next-appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.next-appointment-header h2 {
  margin: 4px 0 0;
  font-family: "PT Serif", Georgia, serif;
  font-size: 2rem;
  color: #2f3a43;
}

.next-appointment-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.next-time-block,
.next-plan-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.next-time-block strong {
  font-size: 2rem;
  color: #2f3a43;
}

.field-label {
  color: #6f7a85;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.appointment-checklist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.appointment-checklist > div {
  background: #f7f9fb;
  border: 1px solid #d9e2ea;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appointment-checklist span {
  color: #6f7a85;
  font-size: 0.88rem;
}

.start-appointment-button {
  width: 100%;
  min-height: 52px;
  background: #3aabe1;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.start-appointment-button:hover {
  filter: brightness(0.96);
}

@media (max-width: 900px) {
  .next-appointment-main,
  .appointment-checklist {
    grid-template-columns: 1fr;
  }
}
.full-day-panel {
  margin-top: 24px;
}

.schedule-header-row {
  display: grid;
  grid-template-columns: 110px 1.5fr 1fr 170px;
  gap: 18px;
  padding: 0 18px 10px;
  color: #6f7a85;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 110px 1.5fr 1fr 170px;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #d9e2ea;
  border-left: 6px solid transparent;
  border-radius: 12px;
  color: #2f3a43;
  text-align: left;
  cursor: pointer;
}

.schedule-entry:hover {
  border-color: #3aabe1;
  transform: translateY(-1px);
}

.schedule-entry.completed {
  opacity: 0.7;
  border-left-color: #2e8b57;
}

.schedule-entry.next {
  border-left-color: #3aabe1;
  background: #f3fbff;
  box-shadow: 0 6px 18px rgba(58, 171, 225, 0.12);
}

.schedule-entry.warning {
  border-left-color: #f4a300;
}

.schedule-time {
  font-weight: 800;
  font-size: 1rem;
}

.schedule-client-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.schedule-client-block strong {
  font-family: "PT Serif", Georgia, serif;
  font-size: 1.08rem;
}

.schedule-client-block small {
  color: #6f7a85;
}

.schedule-type {
  color: #4f5b65;
}

.schedule-owner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.schedule-status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-status.ready {
  background: #eaf7ef;
  color: #2e8b57;
}

.schedule-status.completed {
  background: #edf1f4;
  color: #5e5e60;
}

.schedule-status.next {
  background: #dff4fd;
  color: #167ba9;
}

.schedule-status.warning {
  background: #fff3d8;
  color: #9a6500;
}

@media (max-width: 1000px) {
  .schedule-header-row {
    display: none;
  }

  .schedule-entry {
    grid-template-columns: 90px 1fr;
  }

  .schedule-type,
  .schedule-owner {
    grid-column: 2;
  }
}

/* Temporary Blue Folder dialog visibility fix */
#blueFolderDialog[open] {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: min(720px, calc(100vw - 32px)) !important;
  height: auto !important;
  max-height: calc(100vh - 48px) !important;
  margin: auto !important;
  padding: 0 !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 70px rgba(20, 35, 45, 0.28) !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#blueFolderDialog .blue-folder-dialog-form {
  display: flex !important;
  width: auto !important;
  height: auto !important;
  min-height: 300px !important;
  flex-direction: column !important;
  gap: 20px !important;
  padding: 24px !important;
  background: #ffffff !important;
}

#blueFolderDialog::backdrop {
  background: rgba(20, 35, 45, 0.58);
}

/* Workspace visibility — keep at end of file */

.client-snapshot-card {
  margin-top: 16px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #d9e2e8;
  border-radius: 8px;
}

.client-snapshot-header {
  margin-bottom: 14px;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #3f4f5a;
}

.client-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
}

.client-snapshot-grid > div {
  padding: 12px;
  background: #f7f9fa;
  border: 1px solid #e3e9ed;
  border-radius: 6px;
}

.snapshot-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #6b7b86;
}

.client-snapshot-grid strong {
  color: #233746;
}

@media (max-width: 1000px) {
  .client-snapshot-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 650px) {
  .client-snapshot-grid {
    grid-template-columns: 1fr;
  }
}
.appointment-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
}

.appointment-workspace-main,
.appointment-workspace-sidebar {
  min-width: 0;
}

.appointment-workspace-main {
  display: grid;
  gap: 16px;
}

.appointment-workspace-sidebar {
  display: grid;
  gap: 16px;
}

.appointment-workspace-sidebar .client-snapshot-card {
  margin-top: 0;
}

.appointment-workspace-sidebar .client-snapshot-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 1000px) {
  .appointment-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.blue-folder-progress-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.blue-folder-progress-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8edf0;
  color: #6b7b86;
  font-weight: 700;
}

.blue-folder-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fae8e6;
  border: 1px solid #efc4bf;
  border-radius: 8px;
}

.blue-folder-progress-item:not(.is-complete) .blue-folder-progress-icon {
  color: var(--danger);
}

.blue-folder-progress-item.is-complete {
  background: #def0e6;
  border-color: #add8bd;
}

.blue-folder-progress-item.is-complete .blue-folder-progress-icon {
  background: #2e8b57;
  color: #ffffff;
}

.blue-folder-progress-item p {
  margin: 3px 0 0;
}

.blue-folder-progress-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e3e9ed;
}
.client-identity {
  min-width: 230px;
}

.client-plan-summary {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(240px, 1fr)
  );
  gap: 10px;
  flex: 1;
  max-width: 760px;
}

.client-plan-record {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px 14px;
}

.client-plan-record span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-plan-record strong {
  display: block;
  line-height: 1.35;
}

.client-plan-record small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.upcoming-plan-record {
  border-color: var(--accent);
  background: rgba(11, 110, 105, 0.06);
}

@media (max-width: 900px) {
  .client-header {
    flex-direction: column;
  }

  .client-plan-summary {
    width: 100%;
    max-width: none;
  }
}
.current-plan-record {
  border-color: var(--gis-blue);
  background: var(--gis-blue);
  color: #ffffff;
}

.current-plan-record span {
  color: rgba(255, 255, 255, 0.9);
}

.current-plan-record strong {
  color: #ffffff;
}

.client-workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 6px 0 10px;
  padding: 10px 8px 12px;
  border-radius: 8px;
  background: var(--gis-blue);
}

.section-link {
  width: 100%;
  padding: 9px 12px 9px 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd9df;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.section-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}
.client-workspace-nav[hidden] {
  display: none;
}
#clientProfile.client-details-editing
  > :not(.client-header):not(.client-details-editor) {
  display: none !important;
}