:root {
  --bg: #edf5ff;
  --bg-alt: #f8fbff;
  --card: #fafcff;
  --ink: #172033;
  --muted: #4b5f82;
  --primary: #0F766E;
  --secondary: #7DB7E8;
  --line: rgba(120, 170, 198, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(15, 118, 110, 0.22) 0%, rgba(15, 118, 110, 0) 40%),
    radial-gradient(circle at 90% 10%, rgba(125, 183, 232, 0.2) 0%, rgba(125, 183, 232, 0) 44%),
    linear-gradient(170deg, var(--bg), var(--bg-alt));
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
}

body[data-screen="auth"] .app-only {
  display: none;
}

body[data-screen="app"] .auth-only {
  display: none;
}

body[data-screen="app"] .app-only {
  animation: fade-up 380ms ease-out;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    linear-gradient(transparent 97%, rgba(15, 118, 110, 0.24) 98%),
    linear-gradient(90deg, transparent 97%, rgba(125, 183, 232, 0.2) 98%);
  background-size: 22px 22px;
}

.hero {
  position: relative;
  padding: 4.5rem 1.25rem 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  animation: rise-in 500ms ease-out;
}

.hero--landing {
  padding-bottom: 1.8rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.hero-layout--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.hero-copy {
  min-width: 0;
}

.top-auth-nav {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  display: flex;
  gap: 0.55rem;
  padding: 0.32rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 198, 0.28);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(20, 48, 92, 0.08);
}

.top-auth-nav .btn {
  padding: 0.58rem 0.95rem;
  border-radius: 999px;
}

.top-auth-nav .btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(120, 170, 198, 0.28);
}

.top-auth-nav .btn-secondary:hover {
  border-color: rgba(15, 118, 110, 0.3);
}

.kicker {
  margin: 0;
  font-size: 0.9rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Literata", Georgia, serif;
}

h1 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(2.3rem, 7vw, 4.2rem);
}

.lead {
  max-width: 65ch;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-pills {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 198, 0.26);
  background: rgba(255, 255, 255, 0.74);
  color: #17365c;
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-preview-card {
  border: 1px solid rgba(120, 170, 198, 0.3);
  border-radius: 18px;
  padding: 1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.08), transparent 44%),
    radial-gradient(circle at 0% 100%, rgba(125, 183, 232, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 34px rgba(17, 41, 79, 0.08);
  display: grid;
  gap: 0.65rem;
}

.hero-preview-kicker {
  margin: 0;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-preview-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.hero-preview-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
  color: #1a355c;
  font-size: 0.88rem;
  line-height: 1.45;
}

.hero-preview-actions {
  margin-top: 0.15rem;
}

.hero-preview-actions .btn {
  width: 100%;
  text-align: center;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible,
.btn-action:focus-visible,
.btn-action-compact:focus-visible,
.btn-action-ghost:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.42);
  outline-offset: 2px;
}

.btn-primary {
  color: white;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.27);
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

body.dashboard-body main.dashboard-shell {
  max-width: 1280px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-top: 1.25rem;
}

.dashboard-sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.sidebar-brand {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: color-mix(in srgb, var(--card) 90%, white);
}

.sidebar-brand h1 {
  margin: 0.2rem 0 0.55rem;
  font-size: 1.8rem;
}

.menu-nav {
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.65rem;
  background: color-mix(in srgb, var(--card) 90%, white);
}

.menu-group-title {
  margin: 0.25rem 0 0.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.menu-link {
  border: 1px solid rgba(120, 170, 198, 0.3);
  border-radius: 12px;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease, transform 120ms ease;
}

.menu-link:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.menu-link:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.42);
  outline-offset: 1px;
}

.menu-link.is-active {
  color: #f7fbff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.2);
}

.sidebar-actions {
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(120, 170, 198, 0.18);
  border-radius: 16px;
  padding: 0.65rem;
  background: color-mix(in srgb, var(--card) 92%, white);
}

.sidebar-actions .btn {
  text-align: center;
}

.sidebar-actions .btn-action {
  margin-top: 0;
}

.sidebar-session-card {
  background: color-mix(in srgb, var(--card) 88%, white);
}

.dashboard-main {
  display: grid;
  gap: 1rem;
}

.calendar-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.focus-column {
  display: grid;
  gap: 1rem;
}

.focus-column-main .panel {
  margin: 0;
}

.today-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.today-head h2 {
  margin: 0;
}

.today-head .workspace-intro {
  margin: 0;
  text-align: right;
}

.today-panel {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.today-panel h3 {
  margin: 0;
}

.dashboard-section {
  display: none;
}

.dashboard-section.is-active {
  display: block;
}

.dashboard-main-head {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--card) 90%, white);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.dashboard-main-head > div:first-child {
  display: grid;
  gap: 0.15rem;
}

.dashboard-main-head .kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(120, 170, 198, 0.28);
  border-radius: 999px;
  background: rgba(244, 250, 255, 0.82);
}

.dashboard-main-head h2 {
  margin: 0;
}

.dashboard-main-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.dashboard-main-actions .btn-action {
  margin-top: 0;
  min-height: 40px;
  padding: 0 0.9rem;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.dashboard-main-actions .btn-action-muted {
  box-shadow: 0 8px 18px rgba(47, 72, 108, 0.14);
}

.panel {
  background: color-mix(in srgb, var(--card) 84%, white);
  border: 1px solid rgba(29, 47, 58, 0.08);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: 0 14px 40px rgba(25, 52, 67, 0.08);
}

.panel + .panel {
  margin-top: 1rem;
}

.calendar-panel {
  border-style: solid;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(120, 170, 198, 0.18);
}

.calendar-head-title h2 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 2.7rem);
  line-height: 1.02;
}

.calendar-head-controls {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
  align-content: start;
}

.calendar-month-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.calendar-month-actions .btn {
  padding: 0.58rem 0.95rem;
  white-space: nowrap;
}

.calendar-head-controls .btn-action-compact {
  min-height: 40px;
  padding: 0 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.calendar-month-label {
  min-width: 0;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  background: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  line-height: 1.1;
}

.calendar-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 0.15rem;
}

.calendar-day {
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 82px;
  padding: 0.5rem 0.45rem 0.42rem;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.calendar-day:hover {
  border-color: rgba(15, 118, 110, 0.5);
  background: rgba(255, 255, 255, 0.96);
}

.calendar-day-number {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  justify-self: start;
}

.calendar-day-count {
  font-size: 0.76rem;
  color: var(--muted);
}

.calendar-day-markers {
  min-height: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  justify-self: start;
  margin-top: auto;
}

.calendar-day-marker {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 82%, var(--secondary));
  opacity: 0.9;
}

.calendar-day-marker--faint {
  opacity: 0.38;
}

.calendar-day--muted {
  opacity: 0.45;
  cursor: default;
}

.calendar-day--today {
  border-color: rgba(125, 183, 232, 0.85);
}

.calendar-day--selected {
  border-color: rgba(15, 118, 110, 0.9);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.35);
}

.calendar-day--has-events .calendar-day-number {
  color: #0f2246;
}

.calendar-agenda-card {
  margin-top: 0.5rem;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(120, 170, 198, 0.22);
  box-shadow: 0 8px 22px rgba(17, 41, 79, 0.03);
}

.calendar-agenda-card h3 {
  margin: 0 0 0.35rem;
}

.calendar-day-agenda-timeline {
  display: grid;
  gap: 0.45rem;
}

.calendar-day-agenda-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.15rem 0.05rem 0.05rem;
}

.calendar-day-agenda-header strong {
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
  font-size: 0.92rem;
}

.calendar-day-agenda-rows {
  display: grid;
  gap: 0.38rem;
}

.calendar-day-agenda-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.calendar-day-agenda-time {
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 198, 0.3);
  background: rgba(244, 250, 255, 0.85);
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.06rem;
  text-align: center;
}

.calendar-day-agenda-time strong {
  font-size: 0.84rem;
  line-height: 1.1;
}

.calendar-day-agenda-time span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.calendar-day-agenda-event {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.55rem 0.7rem;
}

.calendar-day-agenda-event strong {
  display: block;
}

.calendar-day-agenda-event p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-day-agenda-empty {
  border: 1px dashed rgba(120, 170, 198, 0.45);
  border-radius: 12px;
  background: rgba(244, 250, 255, 0.75);
  padding: 0.6rem 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.feature-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid article {
  background: color-mix(in srgb, var(--card) 92%, white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.feature-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 10px 22px rgba(17, 41, 79, 0.05);
}

.feature-grid article h3 {
  margin: 0.25rem 0 0;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 198, 0.24);
  background: rgba(239, 248, 253, 0.88);
  color: #274161;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.feature-grid p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-lead {
  margin: 0.1rem 0 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.trust-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% -12%, rgba(15, 118, 110, 0.22), rgba(15, 118, 110, 0) 45%),
    radial-gradient(circle at -10% 110%, rgba(125, 183, 232, 0.18), rgba(125, 183, 232, 0) 42%),
    color-mix(in srgb, var(--card) 88%, white);
  border: 1px solid rgba(89, 143, 220, 0.24);
  box-shadow: 0 20px 48px rgba(17, 41, 79, 0.12);
  color: var(--ink);
}

.trust-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(transparent 96%, rgba(15, 118, 110, 0.14) 97%),
    linear-gradient(90deg, transparent 96%, rgba(125, 183, 232, 0.11) 97%);
  background-size: 22px 22px;
  opacity: 0.2;
}

.trust-panel h2 {
  color: var(--ink);
  margin-top: 0.2rem;
  position: relative;
  z-index: 1;
}

.trust-kicker {
  color: var(--primary);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.trust-lead {
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.trust-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  position: relative;
  z-index: 1;
}

.trust-card {
  border-radius: 16px;
  border: 1px solid rgba(120, 170, 198, 0.28);
  background:
    radial-gradient(circle at 100% -30%, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0) 46%),
    rgba(255, 255, 255, 0.86);
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 10px 26px rgba(17, 41, 79, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.trust-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 14px 28px rgba(17, 41, 79, 0.11);
}

.trust-card-icon {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 170, 198, 0.4);
  background: linear-gradient(135deg, rgba(225, 241, 252, 0.9), rgba(243, 251, 255, 0.95));
  margin-bottom: 0.65rem;
  position: relative;
  font-size: 1.05rem;
  line-height: 1;
}

.trust-card-icon::after {
  content: attr(data-icon);
  filter: saturate(1.05);
}

.trust-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #122643;
}

.trust-card p {
  margin: 0;
  color: #3d5578;
  line-height: 1.5;
  font-size: 0.95rem;
}

.flow-panel {
  overflow: hidden;
}

.flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.flow-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.07);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.flow-list span {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(130deg, var(--primary), var(--secondary));
  font-weight: 700;
  color: #f7fbff;
}

.flow-list p {
  margin: 0.2rem 0 0;
  color: var(--ink);
}

.home-cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.home-cta-head h2 {
  margin: 0.2rem 0 0.35rem;
}

.home-cta-head .section-lead {
  margin: 0;
}

.home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.workspace-intro {
  color: var(--muted);
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.ops-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 0.85rem;
}

.ops-grid > .workspace-card {
  gap: 0.55rem;
}

.ops-grid .stacked-form {
  gap: 0.55rem;
}

.ops-grid .output-box {
  min-height: 72px;
  max-height: 180px;
  margin-top: 0.65rem;
}

body[data-page="dashboard-notifications"] #notification-panel > .workspace-card,
body[data-page="dashboard-ocr"] #ocr-panel > .workspace-card {
  margin-top: 0.75rem;
}

body[data-page="dashboard-settings"] #ayarlar-panel > h2,
body[data-page="dashboard-ai-summary"] #ai-summary-panel > h2,
body[data-page="dashboard-notifications"] #notification-panel > h2,
body[data-page="dashboard-ocr"] #ocr-panel > h2 {
  margin-bottom: 0.15rem;
}

body[data-page="dashboard-settings"] #ayarlar-panel .workspace-card h3,
body[data-page="dashboard-ai-summary"] #ai-summary-panel .workspace-card h3,
body[data-page="dashboard-notifications"] #notification-panel .workspace-card h3,
body[data-page="dashboard-ocr"] #ocr-panel .workspace-card h3 {
  font-size: 0.94rem;
}

.appointment-grid {
  margin-bottom: 0.9rem;
}

.appointment-grid--single {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0.75rem;
}

.appointment-create-card {
  max-width: 720px;
}

.appointment-create-form {
  gap: 0.55rem;
}

.appointment-create-time-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.85fr) minmax(0, 0.75fr);
  gap: 0.5rem;
  align-items: start;
}

.appointment-create-time-grid label {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.appointment-create-form .btn-action {
  margin-top: 0.35rem;
}

.ocr-workflow-card {
  display: grid;
  gap: 0.8rem;
}

.ocr-workflow-head {
  display: grid;
  gap: 0.45rem;
}

.ocr-workflow-head h3 {
  margin: 0;
}

.ocr-workflow-step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ocr-workflow-step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 198, 0.26);
  background: rgba(245, 251, 255, 0.75);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.ocr-workflow-step {
  display: grid;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid rgba(120, 170, 198, 0.18);
  border-radius: 14px;
  background: rgba(245, 251, 255, 0.42);
}

.ocr-workflow-step[hidden] {
  display: none;
}

.ocr-workflow-step-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ocr-workflow-step-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-family: "Literata", Georgia, serif;
}

.ocr-workflow-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  background: rgba(221, 237, 250, 0.85);
  color: #0f4b7c;
  font-size: 0.75rem;
  font-weight: 800;
}

.ocr-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}

.ocr-workflow-grid-actions {
  display: flex;
  gap: 0.4rem;
  min-width: 0;
  flex-wrap: wrap;
}

.ocr-workflow-grid label,
.ocr-workflow-form > label,
.ocr-workflow-draft-form > label {
  display: grid;
  gap: 0.28rem;
}

.ocr-workflow-grid .btn {
  margin-top: 0;
  min-height: 46px;
  padding-inline: 0.9rem;
  min-width: 132px;
}

.ocr-workflow-patients-shell {
  display: grid;
  gap: 0.35rem;
}

.ocr-workflow-patients {
  display: grid;
  gap: 0.4rem;
  max-height: 200px;
  overflow: auto;
  padding: 0.45rem;
  border: 1px solid rgba(120, 170, 198, 0.22);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.68);
}

.ocr-workflow-appointments-shell {
  display: grid;
  gap: 0.35rem;
}

.ocr-workflow-appointments-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 1.1rem;
}

.ocr-workflow-appointments-status:empty {
  display: none;
}

.ocr-workflow-appointments {
  display: grid;
  gap: 0.4rem;
  max-height: 220px;
  overflow: auto;
  padding: 0.45rem;
  border: 1px solid rgba(120, 170, 198, 0.22);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.68);
}

.ocr-workflow-appointment-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.ocr-workflow-appointment-option,
.ocr-workflow-patient-option {
  width: 100%;
  text-align: left;
  font: inherit;
  border: 1px solid rgba(120, 170, 198, 0.26);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  display: grid;
  gap: 0.18rem;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.ocr-workflow-appointment-option:hover,
.ocr-workflow-appointment-option:focus-visible,
.ocr-workflow-patient-option:hover,
.ocr-workflow-patient-option:focus-visible {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
  outline: none;
}

.ocr-workflow-appointment-option.is-selected,
.ocr-workflow-patient-option.is-selected {
  border-color: rgba(15, 118, 110, 0.62);
  background: rgba(221, 237, 250, 0.92);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
}

.ocr-workflow-appointment-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.ocr-workflow-appointment-title {
  font-weight: 700;
}

.ocr-workflow-appointment-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.ocr-workflow-file-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(120, 170, 198, 0.2);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.72);
  max-height: 180px;
  overflow: auto;
}

#ocr-workflow-files {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ocr-workflow-file-picker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.45rem;
  border: 1px solid rgba(120, 170, 198, 0.2);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.7);
}

.ocr-workflow-file-picker .btn {
  margin: 0;
  min-height: 40px;
}

.ocr-workflow-file-summary {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.ocr-workflow-file-summary.is-ready {
  color: #0f4b7c;
}

.shared-patient-picker {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.shared-patient-picker-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.shared-patient-picker-actions .btn {
  margin: 0;
  min-height: 38px;
}

.shared-patient-picker-panel {
  display: grid;
  gap: 0.35rem;
}

.shared-patient-picker-panel[hidden] {
  display: none;
}

.shared-patient-picker-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 1.05rem;
}

.shared-patient-picker-status:empty {
  display: none;
}

.shared-patient-picker-list {
  max-height: 190px;
}

.ocr-workflow-file-item {
  margin: 0;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(120, 170, 198, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  color: #1d3557;
}

.ocr-workflow-file-item small {
  color: var(--muted);
}

.ocr-workflow-file-item--empty {
  color: var(--muted);
  font-style: italic;
}

.ocr-workflow-draft-form textarea {
  min-height: 220px;
}

.ocr-workflow-output[hidden] {
  display: none;
}

.ocr-workflow-structured-root {
  display: grid;
  gap: 0.5rem;
  max-height: min(64vh, 980px);
  overflow: auto;
  padding-right: 0.1rem;
}

.ocr-workflow-structured-shell {
  display: grid;
  gap: 0.5rem;
}

.ocr-workflow-note-conflict {
  border: 1px solid rgba(120, 170, 198, 0.24);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.7);
  padding: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.ocr-workflow-note-conflict[hidden] {
  display: none;
}

.ocr-workflow-note-conflict-text {
  margin: 0;
  color: #26466d;
  font-size: 0.82rem;
}

.ocr-workflow-note-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ocr-workflow-note-conflict-actions .btn.is-selected {
  border-color: rgba(15, 118, 110, 0.6);
  background: rgba(221, 237, 250, 0.92);
  color: #0f3b71;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.ocr-workflow-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ocr-workflow-actions .btn,
.ocr-workflow-actions .btn-action {
  margin-top: 0;
}

.ocr-advanced-tools {
  margin-top: 0.85rem;
}

.ocr-advanced-tools > summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.ocr-advanced-tools > summary::-webkit-details-marker {
  display: none;
}

.ocr-advanced-tools > summary::after {
  content: "Aç";
  margin-left: 0.5rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.ocr-advanced-tools[open] > summary::after {
  content: "Kapat";
}

.ocr-advanced-tools > .workspace-intro {
  margin-top: 0.55rem;
}

.ocr-advanced-tools > .workspace-grid,
.ocr-advanced-tools > .workspace-card {
  margin-top: 0.65rem;
}

.appointment-duration-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.appointment-duration-presets-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 0.1rem;
}

.appointment-duration-preset {
  border: 1px solid rgba(120, 170, 198, 0.35);
  background: rgba(245, 251, 255, 0.92);
  color: #163055;
  min-height: 34px;
  padding: 0 0.7rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.appointment-duration-preset:hover,
.appointment-duration-preset:focus-visible {
  border-color: rgba(15, 118, 110, 0.5);
  background: rgba(221, 237, 250, 0.92);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
  outline: none;
}

.appointment-time-preview {
  margin: -0.1rem 0 0;
  min-height: 1.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.appointment-time-preview[data-state="ready"] {
  color: #0f4b7c;
  font-weight: 600;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.auth-panel .auth-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}

.auth-hero {
  padding-bottom: 1.4rem;
}

.auth-panel {
  position: relative;
  overflow: hidden;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 16%, rgba(15, 118, 110, 0.06), transparent 38%),
    radial-gradient(circle at 86% 8%, rgba(125, 183, 232, 0.07), transparent 34%);
}

.auth-panel > h2 {
  margin: 0 0 0.85rem;
  position: relative;
  z-index: 1;
}

.auth-panel .auth-layout > * {
  position: relative;
  z-index: 1;
}

.auth-card {
  gap: 0.7rem;
}

.auth-card-head {
  display: grid;
  gap: 0.15rem;
}

.auth-card-head h3 {
  margin: 0;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-side-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(245, 251, 255, 0.96), rgba(241, 248, 255, 0.92));
  border-color: rgba(120, 170, 198, 0.3);
}

.auth-side-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
  color: #1b355c;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-side-note {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 198, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
}

.form-help-text {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 198, 0.2);
  background: rgba(245, 251, 255, 0.78);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.auth-form {
  gap: 0.7rem;
}

.auth-form .btn-action {
  margin-top: 0.1rem;
}

body[data-page="login"] .auth-form,
body[data-page="signup"] .auth-form {
  padding: 0.1rem 0;
}

body[data-page="login"] #login-role {
  min-height: 54px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  padding-inline: 0.8rem;
}

body[data-page="login"] .output-box,
body[data-page="signup"] .output-box {
  min-height: 72px;
  max-height: 180px;
  background: rgba(14, 22, 38, 0.96);
}

.auth-switch-link {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-switch-link a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

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

.workspace-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(125, 183, 232, 0.06), transparent 38%),
    color-mix(in srgb, var(--card) 90%, white);
  box-shadow: 0 10px 30px rgba(17, 41, 79, 0.05);
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

.workspace-card h3 {
  margin: 0;
  font-size: 1rem;
}

.stacked-form {
  display: grid;
  gap: 0.65rem;
}

.stacked-form label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.stacked-form input,
.stacked-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 198, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 0.66rem 0.78rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.stacked-form select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 198, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 0.66rem 0.78rem;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

body[data-page="login"] #login-role,
body[data-page="login"] #login-role option {
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
}

.stacked-form input:focus,
.stacked-form textarea:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(15, 118, 110, 0.12);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.stacked-form select:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(15, 118, 110, 0.12);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.stacked-form textarea {
  min-height: 120px;
}

.stacked-form input::placeholder,
.stacked-form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, white);
  font-family: inherit;
}

.stacked-form .toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 600;
}

.stacked-form .toggle-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-height: 1.1rem;
  accent-color: var(--primary);
  margin: 0;
  padding: 0;
}

.auth-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
  margin-bottom: 0.8rem;
}

.auth-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  border-radius: 12px;
  min-height: 40px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  color: #f7fbff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
}

.btn-action {
  margin-top: 0.4rem;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  font-weight: 700;
  color: #f7fbff;
  cursor: pointer;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.btn-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
}

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

.btn-action-muted {
  background: linear-gradient(120deg, #2f486c, #3a5d8b);
  box-shadow: 0 8px 20px rgba(47, 72, 108, 0.24);
}

.output-box {
  display: none;
  margin: 0.9rem 0 0;
  min-height: 86px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 198, 0.34);
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.87rem;
  line-height: 1.4;
}

.output-box[data-state="success"] {
  border-color: rgba(10, 92, 71, 0.32);
  background: rgba(219, 244, 235, 0.75);
  color: #0a5c47;
}

.output-box[data-state="error"] {
  border-color: rgba(149, 49, 69, 0.35);
  background: rgba(255, 235, 240, 0.82);
  color: #953145;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.dashboard-head h3 {
  margin: 0;
}

.status-pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
}

.status-pill[data-state="authenticated"] {
  color: #0e5478;
  border-color: rgba(125, 183, 232, 0.55);
  background: rgba(125, 183, 232, 0.16);
}

.kv-list {
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.kv-list div {
  display: grid;
  gap: 0.15rem;
}

.kv-list dt {
  font-size: 0.78rem;
  color: var(--muted);
}

.kv-list dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.dashboard-nav-card .quick-actions a.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.quick-actions .btn-action {
  margin-top: 0;
}

.dashboard-message {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace-panel[data-locked="true"] {
  border-style: dashed;
}

.workspace-panel[data-locked="true"] .workspace-intro {
  color: #20457f;
}

.appointment-list-card {
  border-style: solid;
  border-color: rgba(120, 170, 198, 0.24);
  box-shadow: 0 12px 32px rgba(17, 41, 79, 0.05);
}

.appointment-list-card--primary {
  gap: 0.75rem;
}

.appointment-list-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.appointment-list-card-head .workspace-intro {
  margin: 0;
}

.appointment-list-head-copy {
  display: grid;
  gap: 0.15rem;
}

.appointment-list-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
  min-width: min(100%, 430px);
}

.appointment-list-search-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.appointment-list-search-form input {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 198, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.appointment-list-search-form input:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(15, 118, 110, 0.1);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.06);
}

.appointment-list-search-form .btn-action-compact {
  min-height: 40px;
}

.appointment-inline-status {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.appointment-inline-status:empty {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.integration-grid {
  align-items: start;
}

.integration-card h4 {
  margin: 1rem 0 0.5rem;
  font-family: "Literata", Georgia, serif;
  font-size: 1rem;
}

.compact-kv-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
}

.today-stats-grid {
  margin-top: 0.1rem;
  gap: 0.55rem;
}

.today-stats-grid div {
  border: 1px solid rgba(120, 170, 198, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.7rem 0.8rem;
  min-height: 66px;
  align-content: start;
  box-shadow: 0 6px 18px rgba(17, 41, 79, 0.03);
}

.today-stats-grid dt {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.today-stats-grid dd {
  font-size: 1.55rem;
  line-height: 1.05;
  font-weight: 700;
  color: #142342;
}

.today-stats-grid div:last-child {
  grid-column: 1 / -1;
}

.today-upcoming-title {
  margin-top: 0.1rem;
}

.today-upcoming-list {
  max-height: 260px;
  overflow: auto;
  padding-right: 0.1rem;
  align-content: start;
}

.today-upcoming-list .integration-item {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border-color: rgba(120, 170, 198, 0.28);
  background: rgba(255, 255, 255, 0.78);
}

.today-upcoming-list .integration-item p {
  margin-top: 0.14rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.today-upcoming-list .integration-empty {
  border: 1px dashed rgba(120, 170, 198, 0.38);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  background: rgba(249, 252, 255, 0.72);
}

.integration-list {
  display: grid;
  gap: 0.6rem;
}

.integration-item {
  border: 1px solid rgba(120, 170, 198, 0.34);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(17, 41, 79, 0.03);
}

.integration-item strong {
  display: block;
}

.integration-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.integration-empty {
  margin: 0;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.feature-sync-list {
  display: grid;
  gap: 0.55rem;
}

.feature-sync-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.84);
}

.feature-sync-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.feature-sync-item h4 {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
  font-size: 1rem;
}

.feature-sync-item p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.feature-sync-routes {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  color: var(--ink);
  font-size: 0.82rem;
  display: grid;
  gap: 0.12rem;
}

.sync-status-pill {
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.sync-status-pill[data-state="active"] {
  color: #0a5c47;
  border-color: rgba(10, 92, 71, 0.25);
  background: rgba(52, 199, 132, 0.2);
}

.sync-status-pill[data-state="not_configured"] {
  color: #953145;
  border-color: rgba(149, 49, 69, 0.25);
  background: rgba(220, 66, 102, 0.14);
}

.appointment-list {
  display: grid;
  gap: 0.75rem;
  max-height: 560px;
  overflow: auto;
  padding-right: 0.1rem;
  border-top: 1px solid rgba(120, 170, 198, 0.18);
  padding-top: 0.75rem;
}

.patient-directory-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
  max-height: 420px;
  overflow: auto;
  padding-right: 0.15rem;
}

.patient-directory-empty {
  margin: 0;
  color: var(--muted);
}

.patient-directory-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  width: 100%;
  text-align: left;
  display: block;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.patient-directory-item:hover,
.patient-directory-item:focus-visible {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.patient-directory-item.is-selected {
  border-color: rgba(15, 118, 110, 0.65);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.16);
  background: rgba(221, 237, 250, 0.9);
}

.patient-directory-item strong {
  display: block;
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
}

.patient-directory-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.appointment-empty {
  margin: 0;
  color: var(--muted);
}

.patient-detail-card {
  margin-top: 0.75rem;
  border-style: solid;
}

.patient-detail-card[data-state="ready"] {
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: 0 14px 36px rgba(17, 41, 79, 0.06);
}

.patient-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.patient-detail-head h3 {
  margin-bottom: 0.3rem;
}

.patient-detail-grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.45fr);
  grid-template-areas:
    "profile notes"
    "appointments notes";
  gap: 0.65rem;
  align-items: start;
}

.patient-detail-grid > section {
  border: 1px solid rgba(120, 170, 198, 0.24);
  border-radius: 16px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
}

.patient-detail-grid > section:nth-child(1) {
  grid-area: profile;
}

.patient-detail-grid > section:nth-child(2) {
  grid-area: notes;
  min-height: 0;
}

.patient-detail-grid > section:nth-child(3) {
  grid-area: appointments;
}

.patient-detail-grid section h4 {
  margin: 0 0 0.45rem;
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.patient-note-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr) auto;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 0.45rem;
  padding: 0.4rem;
  border: 1px solid rgba(120, 170, 198, 0.2);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.72);
}

.patient-note-filter-input,
.patient-note-filter-select {
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(120, 170, 198, 0.42);
  background: rgba(255, 255, 255, 0.96);
  color: #102248;
  min-height: 40px;
  padding: 0.45rem 0.6rem;
  font: inherit;
}

.patient-note-filter-input:focus-visible,
.patient-note-filter-select:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.45);
  outline-offset: 1px;
}

.patient-note-filter-summary {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.patient-note-item {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.patient-note-item::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 3px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
}

.patient-note-item.integration-item {
  padding-left: 1rem;
}

.patient-note-item:hover,
.patient-note-item:focus-visible {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.patient-note-item.is-selected {
  border-color: rgba(15, 118, 110, 0.65);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
  background: rgba(221, 237, 250, 0.9);
}

.patient-note-item.is-selected::before {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.patient-note-item strong {
  font-size: 0.82rem;
}

.patient-note-item p:first-of-type {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.patient-note-item p:last-of-type {
  display: none;
}

.patient-note-preview {
  margin-top: 0.5rem;
  border: 1px solid rgba(120, 170, 198, 0.22);
  border-radius: 14px;
  padding: 0.55rem;
  background: rgba(250, 253, 255, 0.72);
  min-height: 110px;
}

.patient-note-preview-text {
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid rgba(120, 170, 198, 0.3);
  border-radius: 10px;
  padding: 0.7rem;
  font-size: 0.84rem;
  line-height: 1.45;
}

#patient-detail-notes.integration-list {
  max-height: 400px;
  overflow: auto;
  padding-right: 0.1rem;
}

#patient-detail-appointments.integration-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 0.1rem;
}

/* Plain dashboard pass: hide non-essential helper copy, keep core data/actions visible */
body.dashboard-body .sidebar-brand .workspace-intro,
body.dashboard-body .dashboard-main-head .workspace-intro,
body.dashboard-body .workspace-panel > .workspace-intro,
body.dashboard-body .workspace-card > .workspace-intro,
body.dashboard-body .today-head .workspace-intro,
body.dashboard-body .dashboard-message,
body.dashboard-body .note-modal-editor-help,
body.dashboard-body .note-modal-mode-meta,
body.dashboard-body .note-edit-quick-nav-head .note-edit-muted,
body.dashboard-body .patient-note-filter-summary {
  display: none;
}

body.dashboard-body #patient-detail-subtitle {
  display: none;
}

body.note-modal-open {
  overflow: hidden;
}

.note-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 1rem;
  overflow-y: auto;
}

.note-modal[hidden] {
  display: none;
}

.note-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 40, 0.62);
  backdrop-filter: blur(3px);
}

.note-modal-dialog {
  position: relative;
  width: min(980px, 94vw);
  height: min(88vh, calc(100vh - 2rem));
  height: min(88dvh, calc(100dvh - 2rem));
  max-height: none;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 94%, white);
  box-shadow: 0 24px 70px rgba(16, 42, 84, 0.28);
}

.note-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(120, 170, 198, 0.4);
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--card) 96%, white);
  backdrop-filter: blur(6px);
}

.note-modal-head h3 {
  margin: 0;
}

.note-modal-head .workspace-intro {
  margin: 0.25rem 0 0;
}

.note-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  align-items: center;
}

.note-modal-actions .btn-action-compact,
.note-modal-actions .btn-action-ghost {
  min-height: 38px;
  padding-inline: 0.8rem;
}

.note-modal-body {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.85rem 1rem 1.25rem;
  scroll-padding-top: 6rem;
}

.note-modal-mode-strip {
  position: sticky;
  top: 0.4rem;
  z-index: 2;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.5rem 0.45rem;
  border: 1px solid rgba(120, 170, 198, 0.24);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.97);
  backdrop-filter: blur(4px);
  display: grid;
  gap: 0.25rem;
}

.note-modal-mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  width: min(100%, 260px);
}

.note-modal-mode-btn {
  border: 1px solid rgba(120, 170, 198, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #102248;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.note-modal-mode-btn.is-active {
  border-color: rgba(15, 118, 110, 0.45);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(125, 183, 232, 0.12));
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.09);
}

.note-modal-mode-btn:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.45);
  outline-offset: 1px;
}

.note-modal-mode-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.note-modal-editor-field {
  display: grid;
  gap: 0.5rem;
}

.note-modal-editor-field label {
  font-size: 0.84rem;
  font-weight: 600;
}

.note-modal-editor-input {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 198, 0.45);
  background: rgba(255, 255, 255, 0.95);
  color: #102248;
  padding: 0.85rem 0.95rem;
  font: inherit;
  line-height: 1.5;
}

.note-modal-editor-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.note-modal-editor-error {
  margin: 0 0 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(239, 71, 111, 0.28);
  background: rgba(255, 235, 240, 0.9);
  color: #8a1c42;
  font-size: 0.82rem;
}

.note-edit-structured-section {
  border-top: 1px dashed rgba(120, 170, 198, 0.45);
  padding-top: 0.65rem;
}

.note-edit-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.note-edit-quick-nav {
  margin: 0.05rem 0 0.75rem;
  border: 1px solid rgba(120, 170, 198, 0.25);
  border-radius: 12px;
  padding: 0.6rem;
  background: rgba(239, 248, 253, 0.86);
}

.note-edit-quick-nav-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.note-edit-quick-nav-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
}

.note-edit-quick-nav-head .note-edit-muted {
  text-align: right;
  font-size: 0.76rem;
}

.note-edit-block-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.note-edit-block-jump-chip {
  border: 1px solid rgba(120, 170, 198, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #102248;
  padding: 0.34rem 0.6rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.note-edit-block-jump-chip:hover,
.note-edit-block-jump-chip:focus-visible {
  border-color: rgba(15, 118, 110, 0.45);
  background: rgba(227, 240, 252, 0.95);
  transform: translateY(-1px);
}

.note-edit-block-card.is-jump-target {
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.note-edit-block-list {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.75rem;
}

.note-edit-block-card {
  border: 1px solid rgba(120, 170, 198, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.note-edit-block-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.note-edit-block-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.note-edit-block-toolbar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.note-edit-block-body {
  display: grid;
  gap: 0.6rem;
}

.note-edit-block-body label,
.note-edit-group label,
.note-edit-subcard label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.77rem;
  color: var(--muted);
}

.note-edit-input,
.note-edit-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 198, 0.42);
  background: rgba(255, 255, 255, 0.96);
  color: #102248;
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.note-edit-textarea {
  min-height: 120px;
  resize: vertical;
}

.note-edit-textarea--note-text {
  min-height: 260px;
}

.note-edit-group {
  display: grid;
  gap: 0.45rem;
}

.note-edit-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.note-edit-group-head h6 {
  margin: 0;
  font-size: 0.82rem;
}

.note-edit-substack {
  display: grid;
  gap: 0.45rem;
}

.note-edit-diagram-canvas-wrap {
  display: grid;
  gap: 0.35rem;
}

.note-edit-diagram-canvas {
  position: relative;
  min-height: 230px;
  border: 1px solid rgba(120, 170, 198, 0.34);
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 18%, rgba(125, 183, 232, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.88));
  overflow: auto;
}

.note-edit-diagram-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 170, 198, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 198, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.note-edit-diagram-canvas-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.note-edit-diagram-canvas-edges line {
  stroke: rgba(43, 83, 132, 0.55);
  stroke-width: 2;
}

.note-edit-diagram-canvas-edges marker path {
  fill: rgba(43, 83, 132, 0.65);
}

.note-edit-diagram-canvas-nodes {
  position: relative;
  min-height: inherit;
  z-index: 2;
}

.note-edit-diagram-canvas-node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: #102248;
  box-shadow: 0 8px 18px rgba(16, 34, 72, 0.08);
  padding: 0 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.note-edit-diagram-canvas-node span {
  display: block;
  line-height: 1.2;
  pointer-events: none;
}

.note-edit-diagram-canvas-node:hover {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 10px 20px rgba(16, 34, 72, 0.12);
}

.note-edit-diagram-canvas-node:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.6);
  outline-offset: 2px;
}

.note-edit-diagram-canvas-node.is-dragging {
  cursor: grabbing;
  border-color: rgba(125, 183, 232, 0.7);
  background: rgba(235, 249, 255, 0.98);
  box-shadow: 0 14px 24px rgba(16, 34, 72, 0.18);
}

.note-edit-subcard {
  border: 1px solid rgba(120, 170, 198, 0.28);
  border-radius: 12px;
  background: rgba(244, 249, 255, 0.85);
  padding: 0.6rem;
  display: grid;
  gap: 0.4rem;
}

.note-edit-subcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.note-edit-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.note-edit-table-columns {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.note-edit-table-column-card {
  align-content: start;
}

.note-edit-table-row-cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.45rem;
}

.note-edit-table-row-cells > p.note-edit-muted {
  grid-column: 1 / -1;
}

.note-structured-section + .note-structured-section {
  margin-top: 0.8rem;
}

.note-structured-section h4 {
  margin: 0 0 0.45rem;
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
  font-size: 0.9rem;
}

.note-modal-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 280px;
  max-height: none;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 198, 0.3);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  line-height: 1.5;
}

.note-structured-stack {
  display: grid;
  gap: 0.7rem;
}

.note-structured-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.65rem;
}

.note-structured-block h5 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
}

.note-structured-block pre {
  min-height: 0;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.note-structured-table-wrap {
  overflow-x: auto;
}

.note-structured-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 380px;
}

.note-structured-table th,
.note-structured-table td {
  border: 1px solid rgba(120, 170, 198, 0.4);
  padding: 0.45rem 0.5rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}

.note-structured-table th {
  background: rgba(15, 118, 110, 0.08);
}

.note-structured-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.note-diagram-visual {
  margin: 0 0 0.65rem;
  border: 1px solid rgba(120, 170, 198, 0.32);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(228, 241, 252, 0.82));
  padding: 0.45rem;
  overflow-x: auto;
}

.note-diagram-svg {
  width: 100%;
  min-width: 420px;
  height: auto;
  display: block;
}

.note-diagram-svg .note-diagram-edges line {
  stroke: rgba(43, 83, 132, 0.48);
  stroke-width: 2;
}

.note-diagram-svg marker path {
  fill: rgba(43, 83, 132, 0.62);
}

.note-diagram-svg .note-diagram-node rect {
  fill: rgba(255, 255, 255, 0.95);
  stroke: rgba(15, 118, 110, 0.28);
  stroke-width: 1.5;
}

.note-diagram-svg .note-diagram-node text {
  fill: #0d1b36;
  font-size: 11px;
  font-family: "Space Grotesk", "Avenir Next", "Gill Sans", sans-serif;
  font-weight: 600;
}

.note-structured-dual section h6 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.note-structured-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
}

.note-chart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.note-chart-list li {
  display: grid;
  gap: 0.26rem;
}

.note-chart-visual {
  margin: 0 0 0.65rem;
}

.note-chart-pie-layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}

.note-chart-pie-svg {
  width: min(100%, 220px);
  height: auto;
  justify-self: center;
}

.note-chart-pie-hole {
  fill: rgba(255, 255, 255, 0.95);
  stroke: rgba(120, 170, 198, 0.28);
  stroke-width: 1;
}

.note-chart-pie-slice-label {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(13, 27, 54, 0.45);
  stroke-width: 2px;
}

.note-chart-pie-total-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.note-chart-pie-total-value {
  fill: #102248;
  font-size: 18px;
  font-weight: 700;
}

.note-chart-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.note-chart-pie-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.82rem;
}

.note-chart-pie-legend strong {
  font-size: 0.8rem;
}

.note-chart-pie-legend small {
  color: var(--muted);
  font-size: 0.74rem;
}

.note-chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.note-chart-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.84rem;
}

.note-chart-row-head strong {
  font-size: 0.8rem;
}

.note-chart-row-head small {
  color: var(--muted);
  font-size: 0.74rem;
  margin-left: auto;
}

.note-chart-row-bar {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(120, 170, 198, 0.3);
  overflow: hidden;
}

.note-chart-row-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
}

@media (max-width: 760px) {
  .note-edit-block-head {
    flex-direction: column;
  }

  .note-edit-block-toolbar {
    justify-content: flex-start;
  }

  .note-edit-grid-two {
    grid-template-columns: 1fr;
  }

  .note-structured-dual {
    grid-template-columns: 1fr;
  }

  .note-chart-pie-layout {
    grid-template-columns: 1fr;
  }

  .note-chart-pie-svg {
    width: min(100%, 200px);
  }
}

.notification-queue-list {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.6rem;
}

.notification-queue-item {
  display: grid;
  gap: 0.5rem;
}

.notification-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}

.notification-queue-head p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.notification-state-pill {
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: rgba(209, 231, 250, 0.74);
  color: #0e3f82;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.notification-state-pill[data-state="sent"] {
  border-color: rgba(13, 173, 108, 0.34);
  background: rgba(216, 247, 232, 0.78);
  color: #0f6c3f;
}

.notification-state-pill[data-state="failed"] {
  border-color: rgba(208, 62, 86, 0.36);
  background: rgba(255, 224, 230, 0.86);
  color: #8a1c36;
}

.appointment-item {
  border: 1px solid rgba(120, 170, 198, 0.34);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(17, 41, 79, 0.04);
}

.appointment-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

.appointment-item-head:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
  border-radius: 10px;
}

.appointment-item-head-main {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
}

.appointment-item-head strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.appointment-item-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.appointment-item-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.appointment-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 198, 0.25);
  background: rgba(245, 251, 255, 0.9);
  color: #274161;
  padding: 0.12rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 600;
  max-width: 100%;
}

.appointment-meta-chip--time {
  color: #0f4b7c;
  border-color: rgba(15, 118, 110, 0.2);
  background: rgba(221, 237, 250, 0.9);
}

.appointment-item-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.appointment-item-body {
  margin-top: 0.7rem;
  display: none;
}

.appointment-item.is-expanded .appointment-item-body {
  display: grid;
}

.appointment-item-form {
  display: grid;
  gap: 0.5rem;
}

.appointment-item-form-shell {
  border: 1px solid rgba(120, 170, 198, 0.22);
  border-radius: 12px;
  padding: 0.6rem;
  background: rgba(245, 251, 255, 0.75);
}

.appointment-item-form-shell .appointment-duration-presets {
  margin-top: 0.45rem;
}

.appointment-item-form-shell .appointment-time-preview {
  margin-top: 0.35rem;
}

.appointment-item-form label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.appointment-item-form input,
.appointment-item-form select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 198, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 0.55rem 0.65rem;
}

.appointment-item-form input:focus,
.appointment-item-form select:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(15, 118, 110, 0.1);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.06);
}

.appointment-item-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appointment-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 0.1rem;
}

.btn-action-compact {
  min-height: 36px;
  padding: 0 0.8rem;
  border-radius: 10px;
  border: 0;
  color: #f7fbff;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
}

.btn-action-ghost {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-danger {
  background: linear-gradient(120deg, #cc3550, #a22038);
}

.appointment-status-pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.2rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
}

.appointment-status-pill[data-status="scheduled"] {
  color: #165ea0;
  border-color: rgba(22, 94, 160, 0.36);
}

.appointment-status-pill[data-status="completed"] {
  color: #0a5c47;
  border-color: rgba(10, 92, 71, 0.32);
}

.appointment-status-pill[data-status="cancelled"],
.appointment-status-pill[data-status="no_show"] {
  color: #96344b;
  border-color: rgba(150, 52, 75, 0.34);
}

footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

body.dashboard-body footer {
  max-width: 1280px;
}

.home-footer {
  max-width: 1280px;
  margin: 1.25rem auto 0;
  padding: 1.25rem 1.25rem 2.25rem;
  display: grid;
  gap: 0.85rem;
  color: var(--muted);
}

.home-footer-legal,
.legal-bar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 251, 255, 0.94)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(125, 183, 232, 0.05));
  border: 1px solid rgba(120, 170, 198, 0.32);
  border-radius: 1.2rem;
  padding: 1.35rem 1.35rem 1.05rem;
  box-shadow: 0 14px 34px rgba(20, 48, 92, 0.08);
}

.home-footer-legal h2 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: 1.95rem;
}

.legal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 1.1rem 1.25rem;
}

.legal-bar-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 0.35rem;
}

.legal-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
}

.legal-bar-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.15rem 0.2rem;
  border-radius: 0.35rem;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.legal-bar-links a:hover,
.legal-bar-links a:focus-visible {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.home-footer-legal-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem 2.25rem;
}

.home-footer-legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.home-footer-legal-list a {
  display: inline-block;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.35;
  text-decoration: none;
  padding: 0.2rem 0.2rem;
  border-radius: 0.35rem;
  transition: color 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.home-footer-legal-list a:hover,
.home-footer-legal-list a:focus-visible {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.08);
  transform: translateX(2px);
}

.home-footer-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  padding: 0 0.25rem;
}

body.page-loaded .panel {
  animation: fade-up 420ms ease-out;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 800px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-preview-card {
    order: 2;
  }

  .home-cta-panel {
    grid-template-columns: 1fr;
  }

  .home-cta-actions {
    justify-content: flex-start;
  }

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

  .top-auth-nav {
    position: static;
    justify-content: flex-end;
    margin-bottom: 1rem;
  }

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

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

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

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

  .auth-panel .auth-layout {
    grid-template-columns: 1fr;
    max-width: 640px;
  }

  .auth-card {
    order: 1;
  }

  .auth-side-card {
    order: 2;
  }

  .home-footer-legal-columns {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .home-footer-legal h2 {
    font-size: 1.45rem;
  }

  .legal-bar {
    padding: 0.95rem 1rem;
  }

  .legal-bar-title {
    width: 100%;
  }

  .legal-bar-links {
    gap: 0.35rem 0.75rem;
  }

  .home-footer-legal-list a {
    font-size: 1rem;
  }

  .home-footer-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .patient-detail-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "notes"
      "appointments";
  }

  .patient-note-filters {
    grid-template-columns: 1fr;
  }

  .calendar-day-agenda-row {
    grid-template-columns: 1fr;
  }

  .calendar-day-agenda-time {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .calendar-month-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .calendar-month-actions .btn {
    flex: 1 1 calc(50% - 0.2rem);
    text-align: center;
  }

  .calendar-month-label {
    flex: 1 1 100%;
    order: -1;
    text-align: center;
  }

  .note-modal-mode-toggle {
    width: 100%;
  }

  .note-modal-head {
    padding: 0.8rem 0.85rem 0.6rem;
  }

  .note-modal-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .note-modal-actions .btn-action-compact,
  .note-modal-actions .btn-action-ghost {
    flex: 1 1 calc(50% - 0.3rem);
    justify-content: center;
  }

  .note-modal-body {
    padding: 0.75rem 0.85rem 1rem;
  }

  .note-edit-quick-nav-head {
    flex-direction: column;
  }

  .note-edit-quick-nav-head .note-edit-muted {
    text-align: left;
  }

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

  .appointment-create-time-grid {
    grid-template-columns: 1fr;
  }

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

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

  .today-stats-grid div {
    min-height: 60px;
    padding: 0.6rem 0.7rem;
  }

  .today-stats-grid dd {
    font-size: 1.25rem;
  }

  .today-stats-grid div:last-child {
    grid-column: 1 / -1;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

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

  .today-head .workspace-intro {
    text-align: left;
  }

  #patient-detail-open-appointments {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 1000px) {
  body.dashboard-body main.dashboard-shell {
    grid-template-columns: 1fr;
    padding-top: 0.9rem;
    gap: 0.8rem;
  }

  .dashboard-sidebar {
    position: static;
  }

  .calendar-focus-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-main-head {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 0.9rem;
  }

  .dashboard-main-actions {
    width: 100%;
    justify-content: stretch;
  }

  .dashboard-main-actions .btn-action {
    flex: 1;
    min-height: 38px;
  }

  .panel {
    padding: 1rem;
    border-radius: 18px;
  }

  .workspace-card {
    padding: 0.85rem;
    border-radius: 14px;
  }

  .calendar-head {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-head-controls {
    justify-items: stretch;
  }

  .calendar-head-controls .btn-action-compact {
    width: 100%;
  }

  .calendar-month-actions {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-grid {
    gap: 0.35rem;
  }

  .calendar-day {
    min-height: 72px;
  }

  .patient-detail-head {
    flex-direction: column;
  }

  .appointment-item-head {
    flex-direction: column;
  }

  .appointment-item-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .appointment-item-meta-row {
    gap: 0.28rem;
  }

  .appointment-meta-chip {
    font-size: 0.72rem;
  }

  .appointment-list-search-form {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .ocr-workflow-grid {
    grid-template-columns: 1fr;
  }

  .ocr-workflow-grid-actions {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ocr-workflow-grid .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  body.dashboard-body main.dashboard-shell {
    padding-inline: 0.75rem;
  }

  body.dashboard-body footer {
    padding-inline: 0.75rem;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-start;
  }

  .menu-nav,
  .sidebar-actions {
    padding: 0.55rem;
  }

  .calendar-grid {
    gap: 0.25rem;
  }

  .calendar-weekday {
    font-size: 0.7rem;
  }

  .calendar-day {
    min-height: 60px;
    border-radius: 12px;
    padding: 0.4rem 0.35rem 0.3rem;
  }

  .calendar-day-number {
    font-size: 0.8rem;
  }

  .calendar-day-marker {
    width: 5px;
    height: 5px;
  }

  .appointment-item-head-actions {
    justify-content: stretch;
  }

  .appointment-item-head-actions .btn-action-compact {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
  }

  .patient-note-filters .btn-action-compact {
    width: 100%;
    justify-content: center;
  }
}
