@font-face {
  font-family: Vazirmatn;
  src: url("fonts/vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f0f6f6;
  --surface: #fff;
  --ink: #172e31;
  --muted: #4d6568;
  --border: #d9e7e7;
  --brand: #3A9A9A;
  --brand-dark: #235459;
  --brand-soft: #e5f3f3;
  --on-brand: #082327;
  --shadow: 0 6px 18px #153e4210;
  font: 16px/1.6 Vazirmatn, "Noto Sans Arabic", Tahoma, sans-serif;
  background: var(--background);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p, ul, dl, dd { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }

:is(a, input, button):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
}

.site-header {
  background: var(--surface);
  border-block-end: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
}

.brand img { display: block; flex: none; }

.help, .back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  color: var(--brand-dark);
  font-weight: 650;
  text-decoration: none;
}

.help {
  padding-inline: .9rem;
  background: var(--brand-soft);
  border: 1px solid #bddddd;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
}

.help:is(:hover, [aria-current="page"]) {
  background: #cfe8e8;
  border-color: var(--brand);
}

.page { padding-block: clamp(1rem, 3vw, 2rem) 3rem; }

.hero {
  --art-width: clamp(8rem, 30vw, 21rem);
  position: relative;
  min-height: 14.5rem;
  display: flex;
  align-items: center;
  padding: clamp(1.2rem, 4vw, 3rem);
  padding-inline-end: var(--art-width);
  overflow: hidden;
  border-radius: 1.5rem;
  background: linear-gradient(90deg, var(--brand), #20676b 38%, #144a50);
  box-shadow: 0 12px 28px #144a5024;
  color: white;
}

.hero-compact { min-height: 10.75rem; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 3.1rem); font-weight: 800; line-height: 1.28; }
.hero-compact h1 { font-size: clamp(1.65rem, 3.3vw, 2.5rem); }
.hero p { margin-block-start: .6rem; color: #e1f5f4; overflow-wrap: anywhere; }

.hero-art {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: var(--art-width);
  pointer-events: none;
}

.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
}

.hero-art::before {
  width: 90%;
  aspect-ratio: 1;
  top: 50%;
  left: 45%;
  transform: translate(-50%, -50%);
  border: 1px solid #d5ffff40;
  border-radius: 50%;
  box-shadow: 0 0 0 2rem #d5ffff13, inset 0 0 0 1.65rem #d5ffff17;
}

.hero-art::after {
  inset: 12% 10%;
  background-image: radial-gradient(circle, #e3ffff8a 1px, transparent 1.5px);
  background-size: 13px 13px;
  mask-image: linear-gradient(125deg, #000, transparent 35%, transparent 74%, #000);
}

.hero-calendar {
  position: absolute;
  z-index: 1;
  top: 49%;
  left: 42%;
  width: 44%;
  max-width: 8.5rem;
  aspect-ratio: 1.08;
  transform: translate(-50%, -50%) rotate(-12deg);
  border: 1px solid #ddf5f5;
  border-radius: 14%;
  background: linear-gradient(#a9dada 29%, #ecfafa 29%);
  box-shadow: 0 .8rem 1.5rem #072f3460;
}

.hero-compact .hero-calendar { max-width: 6.3rem; }

.hero-calendar::before,
.hero-calendar::after {
  content: "";
  position: absolute;
  top: -9%;
  width: 7%;
  height: 19%;
  border-radius: 1rem;
  background: #f5ffff;
  box-shadow: 0 2px 3px #144a5038;
}

.hero-calendar::before { left: 24%; }
.hero-calendar::after { right: 24%; }

.calendar-days {
  position: absolute;
  inset: 42% 15% 12%;
  border-radius: .35rem;
  background: radial-gradient(circle, var(--brand) 2px, transparent 2.5px) 0 0 / 25% 50%;
}

.calendar-check {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 2;
  left: 53%;
  top: 55%;
  width: 22%;
  max-width: 4.3rem;
  aspect-ratio: 1;
  transform: rotate(10deg);
  border: 1px solid #d5fafa;
  border-radius: 27%;
  background: linear-gradient(145deg, #d1f3f3, #90d7d7);
  color: var(--brand-dark);
  box-shadow: 0 .6rem 1.1rem #072f3450;
}

.hero-compact .calendar-check { max-width: 3.3rem; }

.calendar-check::after {
  content: "";
  width: 31%;
  height: 17%;
  transform: translateY(-12%) rotate(-45deg);
  border: solid currentColor;
  border-width: 0 0 clamp(2px, .4vw, 4px) clamp(2px, .4vw, 4px);
}

.dashboard {
  display: grid;
  gap: 1rem;
  align-items: start;
  margin-block-start: clamp(1rem, 3vw, 1.75rem);
}

.dashboard.with-lookup { grid-template-columns: minmax(0, 1fr) minmax(16rem, 18rem); }
.dashboard:not(.with-lookup) { max-width: 47rem; }
.content { display: grid; gap: .85rem; min-width: 0; }

.panel {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filters, .lookup, .detail, .prose { padding: clamp(1rem, 2.5vw, 1.4rem); }

.filters h2 {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-block-end: .75rem;
  font-size: .95rem;
  font-weight: 700;
}

.filters h2 .icon { color: var(--brand-dark); }

.filter-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .38rem;
  padding: .35rem;
  border-radius: .85rem;
  background: var(--background);
}

.filter-links a {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  padding: .4rem .25rem;
  border-radius: .6rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.filter-links a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.filter-links a[aria-current="page"] { background: var(--brand); color: var(--on-brand); font-weight: 750; }
.back-link { padding-inline: .3rem .65rem; }
.back-link:hover { text-decoration: underline; text-underline-offset: .25em; }
.back-link .chevron { transform: rotate(-135deg); }

.appointments { display: grid; gap: .7rem; padding: 0; list-style: none; }

.appointment, .detail-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
}

.appointment {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 5.4rem;
  padding: .85rem 1rem;
  text-decoration: none;
}

.appointment:hover { border-color: var(--brand); }
.appointment:hover .provider { color: var(--brand-dark); }
.appointment-copy { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.provider { display: block; font-weight: 750; }
.specialty { display: block; color: var(--muted); font-size: .875rem; }

.date {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .45rem;
  max-width: 100%;
  padding: .35rem .65rem;
  border-radius: .5rem;
  background: var(--background);
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.appointment > .chevron { margin-inline: .1rem; color: var(--brand-dark); }

.empty {
  display: grid;
  justify-items: center;
  gap: .3rem;
  padding: clamp(1.5rem, 5vw, 2.5rem) 1rem;
  text-align: center;
}

.empty .icon-tile { margin-block-end: .45rem; }
.empty h2 { font-size: 1.05rem; }
.empty p { color: var(--muted); font-size: .9rem; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .9rem 1rem;
  border: 1px solid #e9d6a8;
  border-radius: .85rem;
  background: #fff8e8;
  color: #70480e;
  overflow-wrap: anywhere;
}

.notice .icon { margin-block-start: .15em; }

.prose { display: grid; justify-items: start; gap: .9rem; overflow-wrap: anywhere; }
.prose h2, .detail h2 { font-size: 1.2rem; line-height: 1.4; }
.detail h2 { margin-block-end: .15rem; }

.detail-fields {
  margin-block: 1.2rem;
  border-block-start: 1px solid var(--border);
}

.detail-fields div {
  display: grid;
  grid-template-columns: minmax(5.4rem, 24%) minmax(0, 1fr);
  align-items: baseline;
  gap: .5rem 1rem;
  padding-block: .65rem;
  border-block-end: 1px solid var(--border);
}

.detail-fields dt { color: var(--muted); }
.detail-fields dd { overflow-wrap: anywhere; }

.status {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 1rem;
  background: var(--background);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.status-booked { background: var(--brand-soft); color: var(--brand-dark); }
.status-completed { background: #e9f0fd; color: #234c7b; }
.status-cancelled { background: #fce9e7; color: #852e29; }

.lookup label {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-block-end: 1rem;
  font-weight: 750;
}

.lookup .icon-tile { width: 2.4rem; height: 2.4rem; border-radius: .65rem; }
.lookup-controls { display: grid; gap: .6rem; }

.lookup input {
  width: 100%;
  min-width: 0;
  min-height: 2.875rem;
  padding: .55rem .75rem;
  border: 1px solid #809fa1;
  border-radius: .65rem;
  background: var(--surface);
  color: var(--ink);
}

.lookup input:placeholder-shown { text-align: right; }
.lookup input::placeholder { color: var(--muted); opacity: 1; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: #54acac; }
.button.secondary { border-color: var(--border); background: var(--background); color: var(--brand-dark); }
.button.secondary:hover { background: var(--brand-soft); }

.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: .85rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.15rem;
}

.icon { position: relative; display: inline-block; flex: none; width: 1em; height: 1em; }

.guide-icon {
  width: 1.2em;
  height: .95em;
  border: 1.5px solid currentColor;
  border-radius: .25em .25em .15em .15em;
  background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}

.guide-icon::before, .guide-icon::after {
  content: "";
  position: absolute;
  top: 32%;
  width: .23em;
  height: 1px;
  background: currentColor;
  box-shadow: 0 .19em currentColor;
}

.guide-icon::before { left: 13%; }
.guide-icon::after { right: 13%; }

.alert-icon {
  display: inline-grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
  line-height: 1;
}

.calendar-icon {
  height: .9em;
  margin-block-start: .11em;
  border: 1.5px solid currentColor;
  border-radius: .2em;
  background: linear-gradient(currentColor, currentColor) 0 30% / 100% 1.5px no-repeat;
}

.calendar-icon::before, .calendar-icon::after {
  content: "";
  position: absolute;
  top: -.21em;
  width: 1.5px;
  height: .32em;
  border-radius: 1px;
  background: currentColor;
}

.calendar-icon::before { left: 22%; }
.calendar-icon::after { right: 22%; }

.clock-icon { border: 1.5px solid currentColor; border-radius: 50%; }
.clock-icon::after {
  content: "";
  position: absolute;
  inset: 19% 35% 43% 46%;
  border: solid currentColor;
  border-width: 0 0 1px 1px;
}

.search-icon::before, .search-icon::after { content: ""; position: absolute; }
.search-icon::before {
  width: 62%;
  height: 62%;
  inset: 0 auto auto 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  width: 35%;
  height: 1.5px;
  right: -3%;
  bottom: 8%;
  transform: rotate(45deg);
  background: currentColor;
}

.chevron {
  width: .5em;
  height: .5em;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 0 0 1.5px 1.5px;
}

@media (max-width: 57rem) {
  .appointment, .detail-heading { column-gap: .65rem; row-gap: .4rem; }
  .appointment { grid-template-columns: auto minmax(0, 1fr) auto; }
  .detail-heading { grid-template-columns: auto minmax(0, 1fr); }
  :is(.appointment, .detail-heading) .icon-tile { grid-row: span 2; align-self: start; }
  :is(.appointment, .detail-heading) .date { grid-area: 2 / 2; }
  .appointment > .chevron { grid-area: 1 / 3 / span 2; }
}

@media (max-width: 47rem) {
  .dashboard.with-lookup { grid-template-columns: minmax(0, 1fr); }
  .lookup-controls { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (max-width: 34rem) {
  .hero { min-height: 10.75rem; border-radius: 1.2rem; }
  .hero-compact { min-height: 8.5rem; }
  .hero h1 { font-size: clamp(1.45rem, 6vw, 1.85rem); }
  .filter-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 22rem) {
  .hero { --art-width: 6.25rem; }
  .lookup-controls { grid-template-columns: 1fr; }
}
