.dashboard-shell {
  background: var(--paper);
}

[hidden] {
  display: none !important;
}

.dashboard-hero,
.auth-panel,
.dashboard-app {
  padding: clamp(42px, 7vw, 86px) clamp(20px, 4vw, 56px);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 28px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dashboard-hero h1 {
  max-width: 900px;
}

.dashboard-hero p:not(.eyebrow),
.auth-panel p,
.dashboard-sidebar p,
.dashboard-card p {
  color: var(--muted);
  line-height: 1.65;
}

.dashboard-status,
.privacy-note,
.scan-entry-details {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 244, 239, 0.68);
}

.dashboard-status span,
.insight-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-status strong {
  display: block;
  overflow-wrap: anywhere;
}

.status-sign-out,
.status-switch-account {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status-switch-account {
  margin-top: 12px;
  color: var(--surface);
  background: var(--teal-dark);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(28px, 6vw, 82px);
}

.dashboard-form,
.goal-form,
.scan-form {
  display: grid;
  gap: 16px;
}

.pdf-import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 244, 239, 0.58);
}

.pdf-import h3 {
  margin-bottom: 6px;
}

.pdf-import p {
  margin: 0;
}

.pdf-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.pdf-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#pdf-message {
  grid-column: 1 / -1;
}

.pdf-save-note {
  display: grid;
  gap: 4px;
  margin-top: -6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(31, 111, 104, 0.08);
  color: var(--muted);
}

.pdf-save-note strong {
  color: var(--ink);
}

.pdf-save-note p {
  margin: 0;
}

.dashboard-form {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 244, 239, 0.74);
}

.auth-toggle button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-toggle button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(19, 32, 32, 0.08);
}

.google-auth-button {
  width: 100%;
  border-color: var(--line);
  background: var(--surface);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.dashboard-form label,
.goal-form label,
.scan-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.dashboard-form input,
.goal-form input,
.goal-form select,
.goal-form textarea,
.scan-form input,
.scan-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.goal-form textarea {
  resize: vertical;
}

.scan-form textarea {
  resize: vertical;
}

.setup-warning,
.form-message {
  border-radius: 8px;
  line-height: 1.55;
}

.setup-warning {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(169, 126, 65, 0.34);
  background: rgba(247, 244, 239, 0.74);
  color: var(--ink);
}

.setup-warning span {
  color: var(--muted);
}

.form-message {
  min-height: 24px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message:not(:empty) {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(247, 244, 239, 0.74);
}

.form-message[data-tone="success"] {
  border-color: rgba(63, 115, 103, 0.28);
  background: rgba(225, 239, 234, 0.7);
  color: var(--teal-dark);
}

.form-message[data-tone="warning"] {
  border-color: rgba(169, 126, 65, 0.34);
  color: #8a672c;
}

.form-message[data-tone="error"] {
  border-color: rgba(154, 74, 55, 0.3);
  background: rgba(250, 232, 226, 0.7);
  color: #9a4a37;
}

.consent-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  font-weight: 600;
}

.consent-check input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.dashboard-app {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
  gap: 22px;
}

.dashboard-sidebar,
.dashboard-card,
.insight-card,
.dashboard-report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.dashboard-sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px;
}

.sidebar-goal-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 244, 239, 0.68);
}

.sidebar-goal-panel h3,
.sidebar-goal-panel p {
  margin-bottom: 0;
}

.sidebar-goal-panel .goal-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.sidebar-goal-panel .goal-notes,
.sidebar-goal-panel #goal-summary,
.sidebar-goal-panel #goal-message {
  grid-column: auto;
}

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

.goal-list > p {
  color: var(--muted);
  font-size: 0.9rem;
}

.goal-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.goal-chip strong,
.goal-chip span {
  display: block;
}

.goal-chip span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.goal-chip button {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(247, 244, 239, 0.74);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.goal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dashboard-main {
  display: grid;
  gap: 18px;
}

.dashboard-card {
  padding: clamp(22px, 4vw, 34px);
}

.manual-upload-card {
  order: 10;
  background: rgba(247, 244, 239, 0.46);
}

.manual-upload-card h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.manual-upload-card .pdf-import {
  background: rgba(255, 253, 248, 0.58);
}

.profile-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 22px;
  align-items: end;
}

.profile-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.profile-form #profile-message {
  grid-column: 1 / -1;
}

.goal-form,
.scan-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.goal-notes,
.scan-notes {
  grid-column: 1 / -1;
}

#goal-summary,
#goal-message {
  grid-column: 1 / -1;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.insight-card {
  min-height: 180px;
  padding: 22px;
}

.insight-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3vw, 3.4rem);
  line-height: 1;
}

.dashboard-report-card {
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(23, 27, 28, 0.08);
}

.dashboard-report-card .report-header {
  margin-bottom: 22px;
}

.dashboard-report-card .report-header h2 {
  font-size: clamp(1.8rem, 3vw, 3.5rem);
}

.dashboard-report-card .report-header span {
  align-self: start;
  white-space: nowrap;
}

.report-scan-picker {
  display: grid;
  gap: 8px;
  min-width: min(100%, 260px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-scan-picker select {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-report-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-report-stat-grid article {
  min-height: 190px;
}

.report-pdf-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(31, 111, 104, 0.18);
  border-radius: 8px;
  background: rgba(31, 111, 104, 0.08);
}

.report-pdf-access p {
  margin: 4px 0 0;
  color: var(--muted);
}

.report-pdf-access .button {
  white-space: nowrap;
}

.clinic-shell {
  gap: 0;
}

.clinic-hero,
.clinic-auth {
  border-bottom: 1px solid var(--line);
}

.clinic-upload-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 40px auto;
  max-width: 1100px;
  padding: 28px;
  width: calc(100% - 32px);
}

.clinic-form .full-width,
.clinic-form .scan-notes {
  grid-column: 1 / -1;
}

.clinic-appointment-picker {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(31, 111, 104, 0.18);
  border-radius: 8px;
  background: rgba(31, 111, 104, 0.06);
}

.clinic-appointment-picker legend {
  padding: 0 8px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clinic-appointment-picker label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.clinic-appointment-picker input,
.clinic-appointment-picker select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.clinic-appointment-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

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

.appointment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 104, 0.18);
  border-radius: 8px;
  background: var(--surface);
}

.appointment-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.clinic-pending-panel {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.clinic-pending-panel .report-header {
  align-items: end;
  margin-bottom: 18px;
}

.pending-report-list {
  display: grid;
  gap: 10px;
}

.pending-report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 244, 239, 0.58);
}

.pending-report-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.button.danger {
  border-color: rgba(164, 63, 41, 0.4);
  background: rgba(164, 63, 41, 0.08);
  color: #8e2f1f;
}

.dashboard-movement-section h3 {
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.dashboard-movement-section p {
  margin-bottom: 0;
}

.analysis-card {
  background: var(--ink);
  color: var(--surface);
}

.analysis-card .eyebrow,
.analysis-card p {
  color: #d8dfd2;
}

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

.analysis-scan-picker {
  display: grid;
  gap: 8px;
  max-width: 360px;
  margin-bottom: 16px;
  color: var(--surface);
  font-weight: 800;
}

.analysis-scan-picker select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.analysis-list article {
  padding: 16px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.08);
}

.analysis-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--surface);
}

.analysis-list p {
  margin: 0;
}

.analysis-list a {
  color: var(--surface);
  font-weight: 800;
}

.analysis-ask {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.08);
}

.analysis-ask h3,
.analysis-ask p {
  margin-bottom: 0;
}

.suggested-questions,
.analysis-question-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggested-questions button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.08);
  color: var(--surface);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.analysis-question-form input {
  flex: 1 1 280px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.analysis-answer {
  padding: 14px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
  background: rgba(23, 27, 28, 0.28);
  color: var(--surface);
  font-weight: 700;
  line-height: 1.6;
}

.analysis-answer a {
  color: var(--surface);
  font-weight: 800;
}

.share-progress-button {
  width: fit-content;
  margin-top: 16px;
  border-color: rgba(255, 253, 248, 0.74);
  color: var(--surface);
}

.share-panel {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.08);
}

.share-mode-options,
.share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-mode-options {
  padding: 0;
  border: 0;
}

.share-mode-options legend {
  width: 100%;
  margin-bottom: 2px;
  color: #d8dfd2;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-mode-options label,
.share-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 999px;
  color: var(--surface);
  font-weight: 800;
}

.share-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 8px;
  color: #d8dfd2;
  font-weight: 700;
  line-height: 1.55;
}

.share-consent input {
  margin-top: 4px;
}

#share-card {
  width: min(100%, 360px);
  height: auto;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 8px;
  background: var(--surface);
}

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

.share-actions .button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

#share-message {
  margin-top: 12px;
  color: #d8dfd2;
}

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

.trend-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 244, 239, 0.54);
}

.trend-card-empty {
  justify-content: space-between;
  min-height: 260px;
  background: rgba(247, 244, 239, 0.3);
}

.trend-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.trend-card-header h3 {
  margin-bottom: 4px;
  line-height: 1.15;
}

.trend-card-header p,
.trend-change {
  margin: 0;
  color: var(--muted);
}

.trend-card-header strong {
  font-size: 1.4rem;
  text-align: right;
  white-space: nowrap;
}

.trend-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.trend-card line {
  stroke: #ded8cd;
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.trend-card polyline {
  fill: none;
  stroke: var(--teal);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-card circle {
  fill: var(--surface);
  stroke: var(--teal-dark);
  stroke-width: 4;
}

.trend-point {
  outline: none;
}

.trend-point:hover circle,
.trend-point:focus circle {
  fill: var(--sage);
  stroke-width: 6;
}

.trend-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.trend-tooltip rect {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2;
}

.trend-tooltip text {
  fill: var(--surface);
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.trend-point:hover .trend-tooltip,
.trend-point:focus .trend-tooltip {
  opacity: 1;
}

.trend-axis-label {
  fill: var(--muted);
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
}

.trend-axis-label {
  font-size: 13px;
}

.trend-point-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

.trend-point-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.trend-point-list b {
  color: var(--ink);
}

.scan-history {
  display: grid;
  gap: 10px;
}

.scan-history article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(247, 244, 239, 0.56);
}

.scan-entry-toggle {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.scan-history span {
  color: var(--muted);
  font-weight: 700;
}

.scan-entry-toggle em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 800;
}

.scan-entry-details {
  background: rgba(255, 253, 248, 0.72);
}

.scan-entry-details dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.scan-entry-details div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(247, 244, 239, 0.58);
}

.scan-entry-details dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-entry-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.scan-entry-details p {
  margin: 12px 0 0;
}

.history-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.history-actions button,
.scan-history button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@media (max-width: 980px) {
  .dashboard-hero,
  .auth-panel,
  .dashboard-app,
  .goal-form,
  .scan-form,
  .insight-grid,
  .dashboard-report-stat-grid,
  .dashboard-movement-section {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .scan-history article {
    grid-template-columns: 1fr 1fr;
  }

  .scan-entry-toggle,
  .scan-entry-details dl {
    grid-template-columns: 1fr 1fr;
  }

  .history-actions {
    justify-content: flex-start;
  }

  .pdf-import {
    grid-template-columns: 1fr;
  }

  .pdf-upload {
    width: 100%;
  }

  .report-pdf-access {
    align-items: flex-start;
    flex-direction: column;
  }

  .clinic-appointment-controls {
    grid-template-columns: 1fr;
  }

  .clinic-appointment-controls .button {
    width: 100%;
  }

  .appointment-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .appointment-item .button {
    width: 100%;
  }

  .pending-report-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .pending-report-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-hero,
  .auth-panel,
  .dashboard-app {
    padding: 32px 16px;
  }

  .dashboard-form,
  .dashboard-card,
  .dashboard-report-card,
  .dashboard-sidebar,
  .insight-card {
    padding: 18px;
  }

  .auth-toggle {
    grid-template-columns: 1fr;
  }

  .share-progress-button,
  .share-actions .button,
  .analysis-question-form .button {
    width: 100%;
  }

  .consent-check {
    grid-template-columns: 1fr;
  }

  .scan-history article,
  .scan-entry-toggle,
  .scan-entry-details dl,
  .trend-chart {
    grid-template-columns: 1fr;
  }

  .history-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .history-actions button {
    width: 100%;
  }
}
