/* Barvy sladěné s exportem — viz static/js/export-brand.js */
:root {
  --brand: #a287c0;
  --brand-dark: #7a5f94;
  --brand-light: #c4b0d4;
  --bg: #ece9f0;
  --panel: #f4f2f7;
  --paper: #ffffff;
  --border: #ddd8e6;
  --text: #2a2630;
  --muted: #6e6678;
  --accent: var(--brand);
  --accent-hover: var(--brand-dark);
  --danger: #c62828;
  --shadow: 0 2px 12px rgba(42, 38, 48, 0.08);
  --radius: 10px;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

main.workspace[hidden],
#recallView[hidden] {
  display: none !important;
}

.footer {
  padding: 0.75rem 1.25rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer a {
  color: var(--brand-dark);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--brand-dark);
  cursor: pointer;
  text-decoration: none;
}

.footer-link-btn:hover {
  text-decoration: underline;
}

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

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: var(--brand);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(42, 38, 48, 0.12);
}

.top-bar-left {
  justify-self: start;
  min-width: 0;
}

.top-bar-right {
  justify-self: end;
  min-width: 0;
}

.btn-logout {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-logout:hover {
  background: #fff;
}

.logo-app {
  display: block;
  height: 2.5rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.logo-practice {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}

.patient-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  justify-self: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.visit-date {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.visit-date--historical {
  background: rgba(255, 255, 255, 0.92);
  color: #5c4a72;
  border-color: rgba(255, 255, 255, 0.55);
}

.patient-name {
  font-weight: 600;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  padding: 0.25rem 0.45rem;
  margin: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 0.15em;
}

.patient-name:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration-color: #fff;
}

.patient-name.no-patient {
  color: rgba(255, 255, 255, 0.78);
  font-style: italic;
}

.btn {
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.btn:hover:not(:disabled) {
  background: #faf9fc;
  border-color: var(--brand-light);
}

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

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn.danger {
  color: var(--danger);
  border-color: #e0a0a0;
}

.btn.danger:hover:not(:disabled) {
  background: #ffebee;
}

.btn.link {
  border: none;
  background: transparent;
  color: var(--brand-dark);
  text-decoration: underline;
}

.workspace {
  flex: 1;
  padding: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.chart-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.chart-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.chart-main {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.record-view-banner {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d4c4e6;
  border-radius: var(--radius);
  background: #ede8f4;
}

.record-view-banner[hidden] {
  display: none !important;
}

.record-view-label {
  margin: 0;
  color: #4a3d5c;
  font-size: 0.92rem;
  font-weight: 600;
}

.chart-panel.chart-historical {
  box-shadow: inset 0 0 0 2px #c4b0d4;
}

.patients-workspace {
  max-width: 640px;
}

.patients-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.patients-header h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text);
}

.patients-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.patient-search-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.patient-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
}

.patient-search:focus {
  outline: 2px solid var(--brand-light);
  border-color: var(--brand);
}

.patient-search::-webkit-search-cancel-button {
  cursor: pointer;
}

.patient-recall-filter {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text);
}

.recall-badge {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  width: fit-content;
}

.recall-badge--overdue {
  color: #b71c1c;
  background: #ffebee;
  border: 1px solid #ef9a9a;
}

.recall-badge--soon {
  color: #e65100;
  background: #fff3e0;
  border: 1px solid #ffcc80;
}

.recall-badge--booked {
  color: #2e7d32;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
}

.patient-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  max-height: min(420px, 50vh);
  overflow-y: auto;
}

.patient-list-row {
  border-bottom: 1px solid var(--border);
}

.patient-list-row:last-child {
  border-bottom: none;
}

.patient-list-item {
  width: 100%;
  display: grid;
  gap: 0.15rem;
  border: none;
  background: var(--paper);
  text-align: left;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: background 0.1s ease;
}

.patient-list-name {
  font-weight: 500;
}

.patient-list-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.patient-list-item:hover {
  background: #faf9fc;
}

.patient-list-item.selected {
  background: #ede8f4;
  box-shadow: inset 3px 0 0 var(--brand);
}

.patient-list-empty {
  padding: 1.25rem 0.9rem;
  color: var(--muted);
  text-align: center;
}

.patients-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.patients-header-action {
  margin-top: 0.65rem;
}

.patients-header .btn + .btn {
  margin-left: 0.5rem;
}

#openRecallBtn .recall-count {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #ffebee;
  color: #b71c1c;
  font-size: 0.78rem;
  font-weight: 700;
}

#openRecallBtn .recall-count:empty {
  display: none;
}

.recall-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.recall-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.recall-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.recall-header .btn {
  margin-top: 0.65rem;
}

.recall-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.recall-filter-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.recall-list-item-due {
  font-size: 0.85rem;
  color: var(--muted);
}

.recall-list-item-due--overdue {
  color: #b71c1c;
  font-weight: 600;
}

.patient-card-recall-summary {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #faf9fc;
  display: grid;
  gap: 0.25rem;
}

.patient-card-recall-line {
  margin: 0;
  font-size: 0.9rem;
}

.patient-card-recall-line--muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.patient-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem 0.75rem;
  background: #f5f2f9;
  border-top: 1px solid var(--border);
}

.patient-card-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.patient-card-header {
  display: grid;
  gap: 0.75rem;
}

.patient-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.patient-card-heading h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text);
}

.patient-card-recall .recall-badge {
  display: inline-block;
}

.patient-card-form {
  display: grid;
  gap: 0.85rem;
}

.patient-card-form.patient-card-form--readonly input,
.patient-card-form.patient-card-form--readonly textarea {
  pointer-events: none;
  background: #f8f7fa;
  color: var(--text);
  border-color: var(--border);
}

.patient-card-form.patient-card-form--readonly input:disabled {
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}

.patient-card-field textarea {
  font-weight: 400;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
  resize: vertical;
  min-height: 3.5rem;
}

.patient-card-readonly-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.patient-card-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.patient-card-field input {
  font-weight: 400;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
}

.patient-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.patient-card-view-controls,
.patient-card-edit-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.patient-card-view-controls[hidden],
.patient-card-edit-controls[hidden] {
  display: none !important;
}

.patient-card-view-controls .btn.danger {
  margin-right: auto;
}

.chart-host {
  width: 100%;
  max-width: 1299px;
}

.chart-host svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--paper);
  border-radius: calc(var(--radius) - 2px);
}

.tooth {
  fill: none;
  stroke: #b0b0b0;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tooth-label {
  fill: #a8a8a8;
  font-size: 13px;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}

.space-hit {
  cursor: pointer;
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.space {
  fill: var(--space-fill, transparent);
  stroke: var(--space-stroke, #c8c8c8);
  stroke-width: 1.5;
  pointer-events: none;
  transition: fill 0.12s ease, stroke 0.12s ease;
}

.space-hit:hover + .space:not(.filled) {
  --space-stroke: #999;
  stroke-width: 2;
}

.space-hit:hover + .space.filled {
  filter: brightness(0.92);
}

.space-mark {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.chart-summary {
  pointer-events: none;
}

.chart-summary-text {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  fill: var(--text);
}

.chart-summary-count {
  font-size: 16px;
  font-weight: 600;
  fill: var(--muted);
}

.chart-summary-mark {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.brush-toolbar {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
  overflow-x: hidden;
}

.brush-selectors {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.brush-select-wrap {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.brush-select-wrap span,
.brush-select-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
}

.brush-selectors select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  padding: 0;
  box-sizing: border-box;
}

.brush-select-wrap--size {
  position: relative;
  z-index: 2;
}

.brush-size-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper);
  max-height: 11.4rem;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
}

.brush-size-list.is-locked {
  pointer-events: none;
  opacity: 0.6;
}

.brush-size-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  padding: 0.18rem 0.4rem;
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
  text-align: left;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.brush-size-item:last-child {
  border-bottom: none;
}

.brush-size-item:hover {
  background: #faf9fc;
}

.brush-size-item.selected {
  background: var(--brand);
  color: #fff;
}

.brush-size-item.selected:hover {
  background: var(--brand-dark);
}

.brush-size-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.brush-size-item.selected .brush-size-dot {
  border-color: rgba(255, 255, 255, 0.45);
}

.chart-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.75rem;
  width: 100%;
  max-width: 720px;
}

.visit-note-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.visit-note {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  background: var(--paper);
  color: var(--text);
  line-height: 1.45;
}

.visit-note:focus {
  outline: 2px solid var(--brand-light);
  border-color: var(--brand);
}

.visit-note:read-only {
  background: #f8f7fa;
  color: var(--muted);
}

.chart-controls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.chart-controls-view,
.chart-controls-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.chart-controls-view[hidden],
.chart-controls-edit[hidden] {
  display: none !important;
}

.chart-readonly .space-hit {
  cursor: default;
  pointer-events: none;
}

.chart-readonly .space-hit:hover + .space:not(.filled) {
  --space-stroke: #c8c8c8;
  stroke-width: 1.5;
}

.chart-readonly .space-hit:hover + .space.filled {
  filter: none;
}

.brush-toolbar.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.hint {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.brush-selectors option {
  padding: 0.15rem 0.4rem;
}

.modal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  max-width: 400px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow);
}

.modal-wide {
  max-width: 560px;
}

.modal::backdrop {
  background: rgba(42, 38, 48, 0.4);
}

.history-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
}

.history-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.history-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.history-compare {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #faf9fc;
}

.history-compare-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.history-compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
}

.history-compare-field {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.history-compare-field select {
  min-width: 8.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  background: var(--paper);
}

.history-compare-result {
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
}

.history-compare-result-lead {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.history-compare-diff {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.86rem;
  line-height: 1.4;
}

.history-compare-added {
  color: #2e7d32;
}

.history-compare-removed {
  color: #c62828;
}

.history-compare-changed {
  color: #6a4c93;
}

.history-compare-note {
  color: var(--muted);
  font-style: italic;
}

.history-compare-same {
  color: var(--muted);
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  max-height: min(420px, 55vh);
  overflow-y: auto;
}

.history-item {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--border);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.history-item-head strong {
  font-size: 1rem;
}

.history-item-meta {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 0.88rem;
}

.history-item-summary {
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.history-item-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.history-item-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand-dark);
  background: #ede8f4;
  border: 1px solid #d4c4e6;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.history-item--active {
  background: #f7f4fb;
  box-shadow: inset 3px 0 0 var(--brand);
}

.history-item--latest:not(.history-item--active) {
  background: #faf9fc;
}

.history-item-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.history-empty {
  padding: 1.1rem 0.95rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.modal-form {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem;
}

.modal-form h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--text);
}

.modal-form input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.55rem;
}

.modal-form input:focus {
  outline: 2px solid var(--brand-light);
  border-color: var(--brand);
}

.patient-form-field {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.patient-form-field input,
.patient-form-field textarea {
  font-weight: 400;
}

.patient-form-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .logo-app {
    height: 2.75rem;
    max-width: 10rem;
  }

  .logo-practice {
    height: 2.5rem;
    max-width: 12rem;
  }

  .chart-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }

  .brush-toolbar {
    flex: 0 0 10.5rem;
    width: 10.5rem;
  }

  .brush-selectors {
    flex-direction: column;
    gap: 0.75rem;
  }

  .brush-size-list {
    max-height: none;
  }

  .chart-main {
    flex: 1;
  }
}

@media (max-width: 700px) {
  .top-bar {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left right"
      "center center";
  }

  .top-bar-left {
    grid-area: left;
  }

  .top-bar-right {
    grid-area: right;
  }

  .patient-banner {
    grid-area: center;
    justify-self: stretch;
    justify-content: flex-start;
    text-align: left;
  }

  .patient-banner .btn-logout {
    margin-left: auto;
  }

  .logo-app {
    height: 2rem;
  }

  .logo-practice {
    height: 1.85rem;
  }

  .brush-size-list {
    max-height: 9rem;
  }

  .workspace {
    padding: 0.65rem;
  }

  .chart-panel {
    padding: 0.75rem;
  }

  .patient-list-actions,
  .patient-card-view-controls,
  .patient-card-edit-controls {
    flex-direction: column;
  }

  .patient-list-actions .btn,
  .patient-card-view-controls .btn,
  .patient-card-edit-controls .btn {
    width: 100%;
  }

  .patient-card-view-controls .btn.danger {
    margin-right: 0;
  }

  .patients-toolbar .btn {
    flex: 1;
  }
}
