:root{
  font-family:system-ui,-apple-system,sans-serif;
  color:#243b36;
  background:#f3f1e9;
  --ink:#243b36;
  --brand:#154c5b;
  --line:#deded2;
  --muted:#55645d;
  --nav:#203d39

}
*{
  box-sizing:border-box
}
body{
  margin:0
}
a{
  color:var(--brand)
}
button,input,select,textarea{
  font:inherit
}
h1,h2,p{
  margin-top:0
}
h1{
  font-size:clamp(2rem,4vw,3.25rem);
  line-height:1.07;
  letter-spacing:-.05em;
  margin-bottom:1rem
}
h2{
  font-size:1.22rem
}
p{
  line-height:1.55
}
main{
  max-width:1140px;
  padding:3rem 1.5rem;
  margin:auto
}
.top{
  padding:1rem max(1.5rem,calc((100% - 1100px)/2));
  background:var(--nav);
  color:#f6f4e9;
  border-bottom:1px solid var(--line);
  display:flex;
  gap:1rem;
  align-items:center;
  justify-content:space-between
}
.top a{
  color:inherit;
  text-decoration:none
}
.brand,.row,.heading,.actions{
  display:flex;
  align-items:center;
  gap:.75rem
}
.brand{
  font-weight:730
}
.symbol{
  width:2.3rem;
  height:2.3rem;
  display:grid;
  place-items:center;
  background:var(--brand);
  border-radius:.6rem;
  color:white
}
.top nav{
  display:flex;
  gap:1rem;
  font-size:.9rem;
  flex-wrap:wrap
}
.home,.case-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1.5rem
}
.home{
  align-items:center;
  min-height:53vh;
  gap:4rem
}
.intro{
  max-width:42ch;
  font-size:1.1rem;
  color:var(--muted)
}
.panel,.table-wrap{
  background:#fffdf8;
  border:1px solid var(--line);
  border-radius:1rem;
  padding:1.5rem
}
.eyebrow{
  font-size:.82rem;
  font-weight:760;
  letter-spacing:.11em;
  color:var(--brand);
  margin-bottom:.7rem
}
.clinic-link{
  display:block;
  margin-top:.7rem
}
.access button{
  width:100%;
  text-align:left
}
button,.button{
  display:inline-block;
  border:1px solid var(--line);
  border-radius:.55rem;
  padding:.65rem .95rem;
  background:white;
  color:var(--ink);
  text-decoration:none;
  font-weight:650;
  cursor:pointer
}
.primary{
  background:var(--brand);
  color:white;
  border-color:var(--brand)
}
button:hover,.button:hover{
  filter:brightness(.94)
}
.heading{
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:1.4rem
}
.heading p:last-child{
  margin-bottom:0
}
.search{
  margin-bottom:1.2rem;
  max-width:27rem
}
.search input{
  flex:1;
  min-width:0
}
.table-wrap{
  padding:0;
  overflow:auto
}
table{
  border-collapse:collapse;
  text-align:left;
  width:100%
}
th,td{
  padding:1rem;
  border-bottom:1px solid var(--line)
}
th{
  background:#e8eee5;
  white-space:nowrap
}
tbody tr:last-child td{
  border:0
}
td a{
  font-weight:720
}
.sub{
  display:block;
  color:var(--muted);
  font-size:.86rem;
  margin-top:.25rem
}
.status{
  display:inline-block;
  color:#684a20;
  background:#f4ead5;
  border-radius:999px;
  padding:.3rem .65rem;
  font-weight:650;
  font-size:.83rem;
  white-space:nowrap
}
.status.draft{
  background:#dcece9;
  color:#145057
}
.status.ready{
  color:#34543f;
  background:#e1eddf
}
.empty p,.muted{
  color:var(--muted)
}
.form{
  max-width:760px;
  display:grid;
  gap:1rem
}
.fields,.images{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem
}
label{
  display:grid;
  gap:.35rem;
  font-weight:650
}
input,select,textarea{
  background:white;
  border:1px solid #b6c3bb;
  border-radius:.5rem;
  padding:.62rem;
  color:var(--ink);
  width:100%
}
textarea{
  resize:vertical
}
.upload{
  border:1px dashed #92a69b;
  border-radius:.6rem;
  padding:.8rem
}
.upload span{
  font-weight:400;
  color:var(--muted)
}
.actions{
  justify-content:flex-end;
  flex-wrap:wrap
}
.error{
  background:#fce8e6;
  color:#8c241b;
  padding:.8rem;
  border-radius:.5rem
}
.images a{
  overflow-wrap:anywhere
}
.images img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  border-radius:.5rem;
  object-fit:contain;
  background:#192537
}
.images span{
  display:block;
  margin-top:.3rem;
  font-size:.85rem
}
dt{
  font-weight:700
}
dd{
  margin:0 0 1rem;
  overflow-wrap:anywhere
}
@media(max-width:700px){
  .home,.case-grid,.fields{
    grid-template-columns:1fr
  }
  .home{
    gap:1rem;
    min-height:0
  }
  .heading,.top{
    flex-wrap:wrap
  }
  main{
    padding:1.5rem 1rem
  }
}

.workspace {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  min-height: 100vh;
}
.workspace .top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2rem;
  padding: 1.5rem 1rem;
  border: 0;
}
.workspace .symbol {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: .25rem;
}
.workspace .top nav {
  align-items: stretch;
  flex-direction: column;
  gap: .25rem;
}
.workspace .top nav a {
  padding: .7rem .55rem;
  border-radius: .3rem;
}
.workspace .top nav a[aria-current],
.workspace .top nav a:hover {
  background: #34544d;
}
.workspace .switch-access {
  margin-top: 1rem;
  color: #e2ece4;
}
.workspace main {
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}
.queue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--line);
}
.queue-filters a {
  color: var(--muted);
  text-decoration: none;
  padding: .55rem .1rem;
  border-bottom: 2px solid transparent;
}
.queue-filters a[aria-current] {
  color: var(--brand);
  border-color: currentColor;
  font-weight: 650;
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .workspace .top {
    gap: .75rem;
    padding: .8rem 1rem;
  }
  .workspace .top nav {
    flex-direction: row;
  }
  .workspace .top nav a {
    padding: .45rem .5rem;
  }
  .workspace .switch-access {
    margin-top: 0;
  }
}
.portal-logo, .clinic-logo {
  display: block;
  max-width: 9rem;
  max-height: 3.4rem;
  object-fit: contain;
}
.portal-logo {
  background: #fff;
  padding: .2rem;
  border-radius: .25rem;
}
.clinic-logo {
  margin-bottom: .8rem;
}
.clinic-directory {
  margin: 1.5rem 0 .5rem;
}
.workspace .switch-access button {
  color: #f6f4e9;
  border-color: #78938a;
  background: transparent;
}

.study-inbox tbody tr:hover {
  background: #f1f5ee;
}
.study-inbox td {
  vertical-align: middle;
}
.study-inbox time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.inbox-sender, .report-clinic {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.inbox-logo {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  object-fit: contain;
  border-radius: .35rem;
}
.inbox-logo.initials {
  display: grid;
  place-items: center;
  background: #e8eee5;
  color: #154c5b;
  font-size: .75rem;
  font-weight: 700;
}
.report-clinic {
  margin-bottom: 1rem;
}
.report-clinic p {
  margin-bottom: 0;
}

.report-workspace {
  grid-template-columns: minmax(165px, .65fr) minmax(210px, 1.1fr) minmax(270px, 1fr);
  align-items: start;
}
.report-library {
  min-width: 0;
}
.report-library label {
  margin-bottom: .3rem;
}
.template-list {
  list-style: none;
  padding: 0;
  margin: .7rem 0;
}
.template-list li + li {
  margin-top: .35rem;
}
.template-choice {
  width: 100%;
  text-align: left;
  font-size: .9rem;
}
.study-details {
  margin-bottom: .85rem;
}
.study-details summary {
  color: var(--brand);
  margin-bottom: .75rem;
}
#template-dialog {
  max-width: min(440px, 90vw);
  border: 1px solid var(--line);
  border-radius: .55rem;
  padding: 1.25rem;
  color: var(--ink);
}
#template-dialog::backdrop {
  background: rgb(19 36 66 / .46);
}
@media (max-width: 1100px) {
  .report-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .report-library {
    grid-column: 1 / -1;
  }
  .template-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
  }
  .template-list li + li {
    margin-top: 0;
  }
}
@media (max-width: 700px) {
  .report-workspace {
    grid-template-columns: 1fr;
  }
  .report-library {
    grid-column: auto;
  }
}

.portal-mark {
  display: block;
  width: 2.65rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: .65rem;
  background: #f4fbff;
  object-fit: contain;
  padding: .23rem;
}
.brand-name { line-height: 1.15; }
.brand-name small {
  display: block;
  margin-top: .24rem;
  color: #cbded2;
  font-size: .73rem;
  font-weight: 500;
}
.photo-entry {
  background: radial-gradient(ellipse at 12% 80%, #dcebed, transparent 65%), #f3f1e9;
}
.photo-entry main {
  min-height: 100svh;
  max-width: none;
  display: grid;
  place-items: center;
  padding: clamp(22px, 5vw, 78px);
}
.photo-login {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  width: min(100%, 1150px);
  min-height: 565px;
  overflow: hidden;
  border-radius: 27px;
  background: #fffdf8;
  box-shadow: 0 24px 80px #183b4822;
}
.login-visual { position: relative; background: #d7e6e5; }
.login-visual img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid #fff9;
  border-radius: 16px;
  pointer-events: none;
}
.photo-login .panel {
  width: min(100%, 470px);
  align-self: center;
  justify-self: center;
  padding: clamp(24px, 4vw, 60px);
  border: 0;
  background: transparent;
}
.photo-login h1 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 34px;
  font-size: clamp(25px, 3vw, 37px);
  color: #16304b;
  line-height: 1;
}
.photo-login h1 img {
  width: 59px;
  height: 59px;
  flex: none;
  padding: 5px;
  border-radius: 11px;
  background: #e8f4f5;
}
.photo-login input { min-height: 47px; border-color: #b8c8cd; }
.photo-login .primary {
  min-height: 48px;
  text-align: center;
  background: #154c5b;
  border-color: #154c5b;
}
@media (max-width: 700px) {
  .photo-login { grid-template-columns: 1fr; min-height: 0; }
  .login-visual { height: 220px; }
  .login-visual img { object-position: center 37%; }
  .photo-login .panel { padding: 26px; }
  .photo-login h1 { margin-bottom: 23px; font-size: clamp(20px, 6vw, 25px); }
  .photo-login h1 img { width: 46px; height: 46px; }
}

.clinic-previews { margin-bottom: 1rem; }
.clinic-previews summary { cursor: pointer; color: var(--brand); font-weight: 650; }
.clinic-previews nav { display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; padding: .65rem 0; }

.queue-workspace {
  background: radial-gradient(ellipse at 4% 90%, #dcebed, transparent 65%), #f3f1e9;
}
.queue-workspace .heading h1 {
  font-weight: 720;
  letter-spacing: -.055em;
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.queue-workspace .heading { margin-bottom: 1.75rem; }
.queue-tools {
  padding: 1.1rem 1.25rem 0;
  margin-bottom: 1rem;
}
.queue-tools .search { max-width: 35rem; }
.queue-tools .queue-filters { margin: 0; border-bottom: 0; }
.queue-tools .clinic-previews {
  margin-bottom: 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}
.queue-workspace .table-wrap, .queue-tools {
  box-shadow: 0 10px 26px #183b480b;
}
@media (max-width: 760px) {
  .queue-workspace .heading { margin-bottom: 1rem; }
  .queue-tools { padding-inline: 1rem; }
}

.photo-queue-heading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 157px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffcf5;
}
.photo-queue-heading::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 47%;
  background:
    linear-gradient(90deg, #fffcf5, #fffcf523 56%, #203d3928),
    url("portada-clinica.jpg") center 40% / cover;
}
@media (max-width: 760px) {
  .photo-queue-heading { min-height: 133px; padding: 18px; }
  .photo-queue-heading > div { max-width: 75%; }
  .photo-queue-heading::after {
    inset-inline-start: 42%;
    background-position: 58% 40%;
    opacity: .72;
  }
}

.study-inbox .inbox-logo:not(.initials) { width: 4.25rem; }

.monthly-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.monthly-filters label { flex: 1 1 11rem; }
.monthly-results h2 { margin-bottom: .4rem; }
.monthly-results p { margin-bottom: 0; }
.monthly-counts { margin-bottom: 1.25rem; }

.login-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.45rem;
  color: var(--muted);
  font-weight: 650;
}
.login-brand img { width: 2rem; height: 2rem; }
.photo-login h1 .clinic-login-logo {
  width: auto;
  height: auto;
  max-width: min(100%, 10rem);
  max-height: 3.75rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.photo-queue-heading .button { position: relative; }
@media (max-width: 760px) {
  .photo-queue-heading:has(.button) { flex-wrap: wrap; }
}
