:root {
  color-scheme: light;
  --bg: #d4eae7;
  --panel: rgba(212, 234, 231, 0.94);
  --panel-light: rgba(255, 255, 255, 0.78);
  --ink: #2b3534;
  --muted: #556261;
  --line: rgba(85, 98, 97, 0.22);
  --accent: #5c7f7b;
  --accent-dark: #2b3534;
  --warn: #b85c21;
  --danger: #a73737;
  --done: #267045;
  --soft-green: #e8f3ee;
  --soft-amber: #fff2df;
  --soft-red: #fae8e7;
  --shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
  font-family: "WorkSans-Light", "WixMadeforText-Regular", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(212, 234, 231, 0.62), rgba(212, 234, 231, 0.76)),
    url("assets/images/regenbogen_background_pastell_quer.png") center / cover fixed;
  color: var(--ink);
}

body.patient-portal,
body.patient-portal main *,
body.patient-portal .portal-hero * {
  hyphens: none;
  overflow-wrap: normal;
  text-align: initial;
}

body.patient-portal main div,
body.patient-portal main p,
body.patient-portal main ul,
body.patient-portal main li,
body.patient-portal main h1,
body.patient-portal main h2,
body.patient-portal main h3,
body.patient-portal main h4,
body.patient-portal main h5,
body.patient-portal main h6 {
  padding: 0;
}

button,
input,
select {
  font: inherit;
}

body.patient-portal .site-header {
  background-color: #add4d0;
  border-bottom: 1px solid rgba(85, 98, 97, 0.3);
}

body.patient-portal .header-container {
  padding: 0.625rem 1.25rem;
}

body.patient-portal .logo img {
  height: clamp(96px, 18vh, 180px);
  margin-right: 0;
}

body.patient-portal .header-text h2 {
  color: var(--ink);
  font-family: "DreamingOutloudSans-Caps", "WixMadeforDisplay-Bold", sans-serif;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  text-align: center;
}

body.patient-portal .main-nav {
  max-width: min(980px, 96%);
}

body.patient-portal .main-nav .nav-button {
  color: var(--accent-dark);
  min-height: 2.5rem;
}

body.patient-portal .main-nav .nav-button:hover {
  color: #d4eae7;
}

h1,
h2,
h3,
p {
  margin: 0;
  padding: 0;
}

h1 {
  font-family: "DreamingOutloudSans-Caps", "WixMadeforText-ExtraBold", sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.05;
}

h2 {
  font-family: "WixMadeforText-ExtraBold", "WorkSans-SemiBold", sans-serif;
  font-size: clamp(23px, 2vw, 31px);
  line-height: 1.15;
}

h3 {
  font-family: "WixMadeforText-Bold", "WorkSans-SemiBold", sans-serif;
  font-size: 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.role-switch {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  padding: 4px;
}

.role-button {
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  color: var(--muted);
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
}

.role-button.active {
  background: #5c7f7b;
  box-shadow: 0 6px 18px rgba(30, 45, 40, 0.09);
  color: #d4eae7;
  font-weight: 750;
}

.portal-main {
  background:
    linear-gradient(180deg, rgba(244, 250, 249, 0.64), rgba(212, 234, 231, 0.72)),
    url("assets/images/regenbogen_background_pastell_quer.png") center / cover;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  padding: 32px clamp(18px, 4vw, 56px) 56px;
}

.portal-hero {
  align-items: center;
  background: rgba(212, 234, 231, 0.9);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 24px;
  max-width: 1180px;
  padding: clamp(20px, 4vw, 36px);
}

.portal-intro {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 720px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.split-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
}

.login-panel,
.summary-panel,
.timeline-panel,
.task-panel,
.practice-toolbar,
.metric,
.case-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  box-shadow: var(--shadow);
}

.login-panel {
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 24px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

input,
select {
  background: rgba(255, 255, 255, 0.9);
  border: 0.125rem solid rgba(85, 98, 97, 0.2);
  border-radius: 0.625rem;
  color: var(--ink);
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(31, 122, 107, 0.22);
  outline-offset: 2px;
}

.primary-button {
  background: var(--accent);
  border: 0;
  border-radius: 0.625rem;
  color: white;
  cursor: pointer;
  font-weight: 800;
  min-height: 46px;
  padding: 0 18px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-workspace {
  display: grid;
  gap: 18px;
}

.empty-state {
  align-items: center;
  background: rgba(212, 234, 231, 0.88);
  border: 1px dashed #bac8c0;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  min-height: 260px;
  padding: 30px;
  text-align: center;
}

.summary-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.patient-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.patient-meta {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}

.progress-track {
  background: #e7ece8;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-fill {
  background: var(--accent);
  height: 100%;
}

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

.status-tile {
  background: var(--panel-light);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}

.status-tile strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 7px;
}

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

.content-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.task-panel,
.timeline-panel {
  padding: 22px;
}

.panel-title {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.task-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

.task-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  display: grid;
  gap: 9px;
  padding: 14px;
}

.task-top,
.row-top {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.pill.open,
.pill.due {
  background: var(--soft-amber);
  color: var(--warn);
}

.pill.complete,
.pill.done {
  background: var(--soft-green);
  color: var(--done);
}

.pill.missing {
  background: var(--soft-red);
  color: var(--danger);
}

.task-item p,
.timeline-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.task-action {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.practice-toolbar {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 24px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
}

.toolbar-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(170px, 220px) 150px minmax(170px, 240px) minmax(150px, auto);
}

.toolbar-controls .primary-button {
  align-self: end;
}

.metric-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
}

.metric {
  padding: 18px;
}

.metric strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}

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

.case-table {
  display: grid;
  gap: 12px;
  margin: 0 auto;
  max-width: 1180px;
}

.case-row {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.4fr) minmax(180px, 0.9fr);
  padding: 18px;
}

.case-main p,
.case-detail p,
.case-next p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 6px;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.mini-tag {
  background: #f1f4f1;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
}

.error {
  background: var(--soft-red);
  border: 1px solid #edc6c2;
  border-radius: 8px;
  color: var(--danger);
  font-weight: 750;
  padding: 16px;
}

body.patient-portal .site-footer {
  background-color: #add4d0;
  border-top: 1px solid rgba(85, 98, 97, 0.3);
  padding: 1.5rem 0;
}

body.patient-portal .site-footer .footer-container {
  max-width: 1180px;
  padding: 0 1.25rem;
}

body.patient-portal .footer-box h5 {
  color: var(--ink);
  font-family: "WixMadeforText-Bold", sans-serif;
  margin-bottom: 0.35rem;
  text-align: left;
}

body.patient-portal .footer-box p,
body.patient-portal .footer-box a {
  color: var(--accent);
  font-family: "WorkSans-Light", sans-serif;
  line-height: 1.5;
  text-align: left;
}

body.patient-portal .footer-icons {
  display: flex;
  gap: 0.625rem;
  padding-top: 0.5rem;
}

body.patient-portal .footer-icons img {
  height: 2rem;
  width: 2rem;
}

body.patient-portal .footer-nav {
  align-items: center;
  display: flex;
  gap: 0.9rem;
}

@media (max-width: 940px) {
  .portal-hero,
  .practice-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .split-layout,
  .content-grid,
  .case-row {
    grid-template-columns: 1fr;
  }

  .metric-row,
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .role-switch,
  .toolbar-controls,
  .metric-row,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .portal-main {
    padding-inline: 14px;
  }

  body.patient-portal .main-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .patient-head,
  .task-top,
  .row-top {
    align-items: flex-start;
    flex-direction: column;
  }
}
