/* Mens Medica: a clinical folio. Ink, mineral paper, engraved instruments. */
:root {
  --bg: #eeece6;
  --surface: #fff;
  --subtle: #e7e3da;
  --text: #252b2c;
  --muted: #626761;
  --line: #cbc7bc;
  --blue: #343e40;
  --link: #76502e;
  --primary: #292f31;
  --primary-hover: #41494b;
  --blue-bg: #e6e4dd;
  --green: #416044;
  --green-bg: #eaf0e7;
  --amber: #725629;
  --amber-bg: #f1ead9;
  --red: #9b332f;
  --red-bg: #f8e8e4;
  --purple: #655348;
  --purple-bg: #ede7df;
  --hover-border: #8c7960;
  --topbar: #f9f8f4;
  --login-glow: transparent;
  --icon-accent: #946b3e;
}
:root[data-theme="dark"] {
  --bg: #141718;
  --surface: #202627;
  --subtle: #2b3030;
  --text: #f0ede4;
  --muted: #bdbeb4;
  --line: #52534c;
  --blue: #d8cbb4;
  --link: #d5b68c;
  --primary: #cbb38d;
  --primary-hover: #dfcbaa;
  --blue-bg: #383d3a;
  --green: #b9ceaf;
  --green-bg: #273729;
  --amber: #e3c79a;
  --amber-bg: #3a3124;
  --red: #ffb5a6;
  --red-bg: #432824;
  --purple: #d3b9a3;
  --purple-bg: #382f29;
  --hover-border: #cfb083;
  --topbar: #202627;
  --icon-accent: #c49c67;
}
body {
  font-family: Jakarta, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
button {
  min-height: 44px;
  border-radius: 2px;
  padding: 11px 16px;
  font-size: 14px;
  box-shadow: none;
}
button.primary {
  box-shadow: none;
  border: 1px solid var(--primary);
  color: #fff;
}
[data-theme="dark"] button.primary {
  color: #161a1b;
}
button.small {
  min-height: 40px;
  font-size: 13px;
  border-radius: 2px;
}
input,
select,
textarea {
  min-height: 44px;
  font-size: 16px;
  border-radius: 2px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 3.1vw, 46px);
  line-height: 1.1;
  letter-spacing: -1.1px;
  font-weight: 400;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 16px;
}
.eyebrow,
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: var(--muted);
}
.clinical-symbol {
  width: 26px;
  height: 26px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.brand {
  gap: 13px;
  padding: 0 0 27px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.brandmark {
  width: 48px;
  height: 62px;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.brandmark svg {
  width: 48px;
  height: 48px;
}
.brand > .brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 1px;
}
.brand-name > span {
  display: block;
}
.brand .brand-name small {
  font-family: Jakarta, "Segoe UI", sans-serif;
  font-size: 9px;
  letter-spacing: 0.9px;
  margin-top: 12px;
  color: inherit;
  opacity: 0.75;
  text-transform: none;
  line-height: 1.3;
}
.sidebar {
  background: #242b2c;
  color: #f5f2e9;
  padding: 34px 20px 22px;
  --line: #59605b;
  --surface: #242b2c;
  --icon-paper: #242b2c;
  --icon-accent: #c49c67;
}
.sidebar .nav-label {
  color: #b2b4a9;
  padding: 12px 10px 7px;
  font-size: 9px;
}
.sidebar nav {
  gap: 0;
}
.sidebar nav button {
  border-radius: 0;
  min-height: 52px;
  color: #d8dbd2;
  border-bottom: 1px solid #ffffff09;
  font-size: 13px;
  padding: 11px 10px;
  gap: 13px;
  font-weight: 500;
}
.sidebar nav button svg {
  width: 25px;
  height: 25px;
}
.sidebar nav button.active {
  background: #41483f;
  color: #fff;
  border-left: 0;
  box-shadow: inset 2px 0 #c49c67;
}
.workspace-tools {
  margin-top: 27px;
  padding-top: 12px;
  border-top: 1px solid #59605b;
}
.workspace-tools summary {
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #c9cdbf;
  font-size: 12px;
}
.workspace-tools summary::after {
  content: "+";
  font-size: 20px;
  margin-left: auto;
}
.workspace-tools[open] summary::after {
  content: "−";
}
.sidebar-bottom {
  padding: 22px 0 0;
}
.sidebar .manual-link,
.sidebar .profile,
.sidebar .profile small {
  color: #d8dbd2;
}
.sidebar .pilot-tag {
  background: none;
  border: 0;
  border-top: 1px solid #59605b;
  border-radius: 0;
  padding: 16px 0 0;
  color: #aeb5a8;
  line-height: 1.8;
}
.sidebar .avatar {
  color: #ded8c9;
  background: #454e46;
  border-radius: 0;
}
.topbar {
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  min-height: 74px;
}
.topbar select {
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 13px;
}
.topbar button {
  border-radius: 2px;
}
.content {
  max-width: 1460px;
  margin: 0 auto;
  padding-top: 38px;
}
.page-heading {
  border-bottom: 2px solid var(--text);
  padding-bottom: 24px;
  margin-bottom: 0;
}
.page-heading .eyebrow {
  margin-bottom: 15px;
}
.page-heading p {
  font-size: 14px;
  max-width: 65ch;
  color: var(--muted);
  margin-top: 12px;
}
.card,
.stat,
.patient-fact,
.action-tile {
  border-radius: 0;
  box-shadow: none;
  border-color: var(--line);
}
.card {
  padding: 25px;
}
.stats {
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}
.stat {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 22px 26px;
}
.stat:last-child {
  border-right: 0;
}
.stat strong {
  font-family: Georgia, serif;
  font-size: 40px;
  font-weight: 400;
}
.stat svg {
  color: var(--text);
  width: 27px;
  height: 27px;
}
.grid-main {
  gap: 24px;
}
.badge {
  border-radius: 1px;
  font-size: 11px;
  letter-spacing: 0.3px;
}
.note-icon,
.avatar {
  border-radius: 2px;
  background: var(--subtle);
  color: var(--text);
}
.action-tile {
  border-left: 2px solid var(--icon-accent);
}
.callout {
  border-radius: 0;
  border-left: 3px solid var(--icon-accent);
  font-size: 13px;
}
.medical-worklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border-bottom: 0;
  margin: 18px 0 24px;
}
.medical-worklist > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.medical-worklist > div:not(:first-child) {
  padding-left: 20px;
}
.medical-worklist > div:last-child {
  border-right: 1px solid var(--line);
}
.medical-worklist strong {
  font-family: Jakarta, "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.medical-worklist span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  max-width: none;
}
.clinical-register {
  padding: 0;
  margin-top: 16px;
  border: 0;
  background: transparent;
}
.register-tools {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
}
.register-search {
  position: relative;
  flex: 1;
  max-width: 440px;
}
.register-search .field {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.register-search .field input {
  margin-top: 6px;
  height: 42px;
  min-height: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 16px 0 40px;
  font-size: 14px;
  color: var(--text);
  box-sizing: border-box;
  width: 100%;
}
.register-search svg {
  position: absolute;
  left: 12px;
  bottom: 11px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}
#new-patient.primary {
  min-height: 42px;
  height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s ease;
}
#new-patient.primary:hover {
  filter: brightness(1.12);
}
.medical-filters {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
  padding: 3px;
  margin: 8px 0 16px;
}
.medical-filters button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none;
}
.medical-filters button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.register-columns {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 140px;
  gap: 16px;
  padding: 10px 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  border-bottom: 1px solid var(--line);
}
.patient-ledger-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 18px 20px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.patient-ledger-row:hover {
  border-color: var(--link);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.patient-reference {
  align-self: start;
  padding-top: 2px;
  color: var(--link);
  font-family: Jakarta, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
}
.patient-reference small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  margin-top: 3px;
}
.patient-ledger-row h2 {
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--text);
  margin: 0 0 4px;
}
.patient-ledger-row .patient-team {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.patient-ledger-row > button {
  justify-self: end;
  min-width: 110px;
  min-height: 38px;
  height: 38px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--subtle);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
}
.patient-ledger-row > button:hover {
  background: color-mix(in srgb, var(--subtle) 80%, var(--primary) 10%);
}
.medical-next {
  margin-top: 10px;
}
.medical-next button {
  min-height: 36px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--icon-accent) 40%, var(--line) 60%);
  border-left: 3px solid var(--icon-accent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--icon-accent) 6%, var(--surface) 94%);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.medical-next button:hover {
  background: color-mix(in srgb, var(--icon-accent) 12%, var(--surface) 88%);
}
.clinical-empty {
  padding: 45px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
}
.clinical-empty svg {
  width: 50px;
  height: 50px;
  color: var(--muted);
}
.clinical-empty p {
  margin: 0;
  max-width: 55ch;
  font-size: 14px;
}
.clinical-templates {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 20px 0;
}
.clinical-templates summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.patient-facts {
  gap: 0;
}
.patient-fact {
  border-width: 0 0 1px;
  padding: 18px 0;
  background: transparent;
}
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  min-height: 100dvh;
  padding: 0;
  background: var(--surface);
  align-items: stretch;
}
.login-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #e8e2d7;
  color: #242b2c;
  padding: 60px clamp(38px, 6.1vw, 94px);
  overflow: hidden;
  border-right: 1px solid #b5ac9c;
}
.login-story .eyebrow {
  color: #6d675a;
  letter-spacing: 2px;
  font-size: 10px;
  margin-bottom: 25px;
}
.login-story h1 {
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 1.05;
  margin: 0 0 18px;
}
.login-story > p {
  font-size: 14px;
  line-height: 1.8;
  color: #5a615a;
  max-width: 40ch;
  margin: 0;
}
.medica-plate {
  position: relative;
  margin-top: 40px;
  min-height: 265px;
  border-top: 1px solid #b5ac9c;
  border-bottom: 1px solid #b5ac9c;
  padding: 30px 0;
  --icon-paper: #e8e2d7;
}
.plate-symbol {
  display: block;
  width: 175px;
  height: 175px;
  margin: 0 auto;
  --icon-accent: #946b3e;
}
.plate-label {
  position: absolute;
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
}
.plate-label small {
  display: block;
  font-family: Jakarta, sans-serif;
  font-size: 8px;
  letter-spacing: 1.5px;
  font-style: normal;
  color: #726953;
  margin-bottom: 3px;
}
.plate-label:nth-of-type(1) {
  top: 34px;
  left: 0;
}
.plate-label:nth-of-type(2) {
  top: 126px;
  right: 0;
  text-align: right;
}
.plate-label:nth-of-type(3) {
  bottom: 28px;
  left: 0;
}
.plate-caption {
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  margin-top: 13px;
  color: #736a58;
}
.login-card {
  position: relative;
  align-self: center;
  background: transparent;
  width: min(430px, calc(100% - 80px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 60px auto;
}
.login-card .brand {
  padding-bottom: 25px;
  margin-bottom: 36px;
}
.login-card .brandmark {
  width: 59px;
  height: 70px;
}
.login-card .brandmark svg {
  width: 58px;
  height: 58px;
}
.login-card .brand > .brand-name {
  font-size: 34px;
}
.login-card h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 8px;
}
.login-card > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.login-card form {
  margin: 28px 0 18px;
}
.login-card form > .field {
  margin-bottom: 19px;
  font-size: 12px;
}
.login-card input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-left: 0;
  font-size: 16px;
}
.login-card .primary {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
}
.login-card .theme-toggle {
  position: absolute;
  top: 6px;
  right: 0;
  border: 0;
  background: transparent;
}
.login-card details summary {
  min-height: 40px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--muted);
}
.login-card details summary::before {
  content: "+";
  font-size: 18px;
}
.login-card details[open] summary::before {
  content: "−";
}
.security-card {
  max-width: 600px;
  margin: 70px auto;
  grid-column: 1/-1;
}
.security-card button {
  margin: 8px 0;
}
.security-card .recovery-codes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .login-story {
  background: #252824;
  color: #f0ede4;
  border-color: #52534c;
}
[data-theme="dark"] .login-story > p,
[data-theme="dark"] .login-story .eyebrow,
[data-theme="dark"] .plate-caption,
[data-theme="dark"] .plate-label small {
  color: #bbb5a6;
}
[data-theme="dark"] .medica-plate {
  --icon-paper: #252824;
  color: #f0ede4;
  border-color: #52534c;
}
[data-theme="dark"] .clinical-register .patient-ledger-row {
  background: #202627;
}
:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 220px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .shell {
    grid-template-columns: 220px 1fr;
  }
  .main {
    margin-left: 0;
  }
  .brand > .brand-name {
    font-size: 22px;
  }
  .medical-worklist > div {
    gap: 12px;
  }
  .patient-ledger-row,
  .register-columns {
    grid-template-columns: 115px 1fr 115px;
  }
  .content {
    padding-left: 28px;
    padding-right: 28px;
  }
}
@media (max-width: 900px) {
  .login {
    grid-template-columns: 1fr 1fr;
  }
  .login-story {
    padding: 48px 30px;
  }
  .medica-plate {
    min-height: 240px;
  }
  .plate-symbol {
    width: 145px;
    height: 145px;
  }
  .plate-label {
    font-size: 13px;
  }
  .login-card {
    width: calc(100% - 54px);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    width: 244px;
  }
  .sidebar.open {
    display: flex;
  }
  .content {
    padding: 25px 18px;
  }
  .topbar {
    min-height: 64px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .medical-worklist > div,
  .medical-worklist > div:not(:first-child) {
    padding: 20px 10px;
    display: block;
  }
  .medical-worklist strong {
    font-size: 34px;
    display: block;
    margin-bottom: 8px;
  }
  .medical-worklist span {
    font-size: 10px;
    line-height: 1.5;
    display: block;
  }
  .register-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .register-search {
    max-width: none;
  }
  .register-tools > button {
    align-self: flex-start;
  }
  .medical-filters {
    flex-wrap: wrap;
  }
  .medical-filters button {
    font-size: 11px;
    padding: 12px 10px;
  }
  .register-columns {
    display: none;
  }
  .patient-ledger-row {
    grid-template-columns: 1fr auto;
    gap: 13px;
    padding: 20px 15px;
  }
  .patient-reference {
    grid-column: 1/-1;
    font-size: 17px;
  }
  .patient-reference small {
    display: inline;
    margin-left: 12px;
  }
  .patient-ledger-row h2 {
    font-size: 21px;
  }
  .patient-ledger-row > button {
    min-width: 92px;
    padding: 10px;
  }
  .clinical-empty {
    padding: 30px 10px;
    gap: 15px;
  }
  .clinical-empty svg {
    width: 38px;
    height: 38px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid #b5ac9c;
    min-height: 0;
  }
  .login-story h1 {
    font-size: 37px;
    line-height: 1.07;
  }
  .login-story .eyebrow {
    font-size: 8px;
    margin-bottom: 15px;
  }
  .login-story > p {
    font-size: 12px;
  }
  .medica-plate,
  .plate-caption {
    display: none;
  }
  .login-card {
    width: calc(100% - 48px);
    margin: 30px auto;
  }
  .login-card .brand {
    margin-bottom: 25px;
  }
  .login-card .brand > .brand-name {
    font-size: 28px;
  }
  .login-card form {
    margin-top: 22px;
  }
  .security-card {
    margin: 36px 24px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    padding: 18px;
  }
  .workspace-tools summary {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
:root .language-picker {display:inline-flex;align-items:center;gap:.4rem;font-size:.8rem;}
:root .language-picker select {min-width:6.5rem;max-width:8rem;padding:.4rem;}
@media(max-width:600px){:root .language-picker{font-size:0;}:root .language-picker select{font-size:.9rem;min-width:5.6rem;}}
