@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #24392f;
  background: #f9faf7;
  --green: #315c42;
  --muted: #728077;
  --line: #e2e7df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: #304738;
  border-radius: 9px;
  padding: 10px 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
.button:hover {
  background: #f0f4ec;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover {
  background: #244a32;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: #24392f;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #6e9377;
  box-shadow: 0 0 0 3px #315c4210;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #69786d;
}
label input,
label select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
h1,
h2,
h3 {
  font-family: Manrope, system-ui, sans-serif;
  margin: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -1px;
}
h2 {
  font-size: 18px;
}
p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #779078;
}
.shell {
  display: grid;
  grid-template-columns: 88px 270px minmax(0, 1fr);
  min-height: 100vh;
}
.shell > * {
  min-width: 0;
}
.rail {
  border-right: 1px solid var(--line);
  background: #f0f3ec;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 26px 8px;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 32px;
  text-decoration: none;
  color: var(--green);
  font-weight: 800;
  position: relative;
  margin-bottom: 24px;
}
.brand span {
  font-size: 17px;
  position: absolute;
  top: 0;
  right: -11px;
}
.nav {
  border: 0;
  background: none;
  flex-direction: column;
  font-size: 24px;
  width: 70px;
  padding: 12px 4px;
}
.nav small {
  font-size: 10px;
  font-weight: 500;
}
.nav.active {
  background: #dfe8d9;
}
.rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  max-width: 70px;
  overflow-wrap: anywhere;
}
.rail-bottom button {
  font-size: 10px;
  padding: 6px;
}
.worklist {
  border-right: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.list-top {
  padding: 25px 18px 12px;
}
.list-top > .primary {
  width: 100%;
  margin-bottom: 27px;
}
.list-top h2 {
  font-size: 14px;
  margin-bottom: 16px;
}
.list-top h2 span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.list-top input {
  width: 100%;
  font-size: 12px;
}
.list-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.list-filter select {
  border: 0;
  font-size: 12px;
  padding: 5px;
}
.visit-list {
  overflow: auto;
  flex: 1;
  padding: 5px 9px;
}
.visit-row {
  border: 0;
  border-radius: 10px;
  width: 100%;
  display: block;
  text-align: left;
  padding: 15px 13px;
  margin: 3px 0;
  font-size: 13px;
  background: transparent;
}
.visit-row.active {
  background: #eaf0e5;
}
.visit-row span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.visit-row .badge {
  font-size: 10px;
  color: var(--green);
}
main {
  padding: 35px 44px;
  max-width: 1400px;
  width: 100%;
  margin: auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
header p {
  margin: 7px 0;
}
.status {
  font-size: 11px;
  background: #eaf0e5;
  padding: 8px 13px;
  border-radius: 30px;
  white-space: nowrap;
}
.patient-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1.7fr;
  gap: 18px;
  margin: 27px 0;
}
.capture-card {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 27px;
  background: linear-gradient(130deg, #f0f4e8, #f8f9f3);
  margin-bottom: 25px;
}
.capture-card.compact {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.capture-card.compact > .capture-symbol,
.capture-card.compact > .eyebrow,
.capture-card.compact > p:not(.eyebrow) {
  display: none;
}
.capture-card.compact h2 {
  font-size: 16px;
}
.capture-card.compact .capture-actions {
  margin: 0;
}
.capture-symbol {
  font-size: 32px;
  color: #547953;
}
.capture-card h2 {
  font-size: 23px;
}
.capture-card p {
  margin: 8px;
}
.capture-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
  font-size: 12px;
}
.capture-actions .button {
  font-size: 12px;
}
.recording-level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  font-variant-numeric: tabular-nums;
}
meter {
  width: 150px;
}
.artifact-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
}
.artifact-tabs button {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 13px;
}
.artifact-tabs button[aria-selected="true"] {
  color: var(--green);
  border-bottom: 2px solid var(--green);
}
.artifact-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.artifact-head p {
  font-size: 12px;
  margin: 6px 0;
}
.artifact-head > div:last-child {
  display: flex;
  gap: 8px;
}
.artifact-head > div:first-child {
  display: block;
}
.artifact textarea {
  width: 100%;
  min-height: 235px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.8;
  padding: 20px;
}
.review-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 12px;
}
.review-check input {
  margin: 0;
  width: auto;
  accent-color: var(--green);
}
.note-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  margin-bottom: 15px;
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #edf0e9;
  background: #fcfdf9;
}
.section-head h3 {
  font-size: 14px;
}
.section-head button {
  padding: 5px 9px;
  font-size: 11px;
  border: 0;
  background: none;
}
.note-section textarea {
  border: 0;
  border-radius: 0;
  min-height: 160px;
  box-shadow: none;
  resize: vertical;
}
.edit-bar {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.edit-bar input {
  flex: 1;
  min-width: 0;
}
.edit-bar button {
  font-size: 12px;
}
.template-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  margin-top: 14px;
}
.template-card p {
  margin-bottom: 0;
}
#notice {
  border: 1px solid #dec99c;
  background: #fff8e6;
  color: #785620;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 13px;
}
footer {
  margin-top: 35px;
  font-size: 11px;
  color: #96a18f;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  width: 390px;
  padding: 32px;
}
dialog::backdrop {
  background: #20352ca6;
}
dialog label {
  margin-top: 18px;
}
dialog button {
  width: 100%;
  margin-top: 18px;
}
#loginError {
  color: #a94436;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 70px 220px minmax(0, 1fr);
  }
  main {
    padding: 28px 24px;
  }
  .patient-bar {
    grid-template-columns: 1fr 1fr;
  }
  .patient-bar label:last-child {
    grid-column: 1/-1;
  }
  .artifact-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
.paused-list {
  max-height: 14rem;
  overflow-y: auto;
  overflow-x: hidden;
}
.paused-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.paused-row > span {
  flex: 1 1 140px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#pausedShelf {
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
#pausedShelf summary { cursor: pointer; }
#workspace.recording .patient-bar { display: none; }

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  .worklist {
    grid-column: 2;
    height: 230px;
    position: relative;
    border-bottom: 1px solid var(--line);
  }
  .rail {
    grid-row: 1/3;
    width: 60px;
  }
  .nav {
    width: 48px;
  }
  main {
    grid-column: 2;
    padding: 23px 16px;
  }
  .list-top {
    padding: 12px;
  }
  .list-top > .primary {
    margin-bottom: 10px;
  }
  .list-top h2 {
    display: none;
  }
  .list-top input {
    width: 58%;
  }
  .list-filter {
    display: inline-flex;
    width: 39%;
    margin-top: 0;
    gap: 4px;
  }
  .list-filter label {
    display: none;
  }
  .list-filter select {
    min-width: 0;
    width: 100%;
  }
  .visit-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .visit-row {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 9px 10px;
  }
  .patient-bar {
    grid-template-columns: minmax(0, 1fr);
  }
  .patient-bar > label {
    grid-column: auto;
    min-width: 0;
  }
  .patient-bar {
    gap: 10px;
  }
  h1 {
    font-size: 23px;
  }
  .capture-card {
    padding: 20px 12px;
  }
  .edit-bar {
    flex-direction: column;
  }
  .status {
    max-width: 100px;
    white-space: normal;
  }
  .rail-bottom {
    max-width: 50px;
  }
}
