/* Sukraa Appointment — prototype styles. Colors and type come from tokens.css. */
@import url("tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--glow) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height: 100vh;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.role-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.hero {
  padding: 1.25rem 0 2.5rem;
  display: grid;
  gap: 1.75rem;
  align-items: end;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    min-height: min(72vh, 640px);
    padding-top: 2rem;
  }
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  color: var(--brand-deep);
}

.hero-copy p {
  margin: 0 0 1.4rem;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero-visual {
  position: relative;
  min-height: 280px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(12, 107, 92, 0.92), rgba(8, 76, 66, 0.75)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='1' d='M0 80h160M80 0v160M20 20l120 120M140 20L20 140'/%3E%3C/svg%3E");
  background-size: cover, 48px 48px;
  color: #f7fffb;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: rise 0.8s ease both;
}

.hero-visual strong {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
}

.hero-visual p {
  margin: 0.35rem 0 0;
  opacity: 0.9;
  max-width: 28ch;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--touch);
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-press);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-deep);
  border: 1.5px solid var(--line);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-sm {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
}

.section {
  padding: 2rem 0 3rem;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.section .lede {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

.module-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .module-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.module-link {
  display: block;
  padding: 1.25rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
  animation: fade-up 0.6s ease both;
}

.module-link:nth-child(2) {
  animation-delay: 0.08s;
}

.module-link:nth-child(3) {
  animation-delay: 0.16s;
}

.module-link:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.module-link h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.module-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.module-link .go {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.88rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  min-width: 0;
}

.filters input,
.filters select {
  flex: 1 1 140px;
}

.list {
  display: grid;
  gap: 0.65rem;
}

.list-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
}

@media (min-width: 720px) {
  .list-row {
    grid-template-columns: 1fr auto;
  }
}

.list-row h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  margin-right: 0.35rem;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

.slot {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.88rem;
}

.slot:hover,
.slot.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.slot:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
}

.field .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
}

.required::after {
  content: " *";
  color: var(--accent);
}

.staff-shell {
  display: grid;
  gap: 1rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 960px) {
  .staff-shell {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

.side-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.75rem;
  position: sticky;
  top: 0.75rem;
}

.side-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
}

.side-nav a:hover,
.side-nav a.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.kpi-row {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .kpi-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.kpi .label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.kpi .value {
  font-family: var(--display);
  font-size: 1.7rem;
  margin-top: 0.2rem;
  letter-spacing: -0.02em;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.status-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.footer {
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

.steps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.step {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.step.current {
  background: var(--brand);
  color: #fff;
}

.step.done {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.step-link {
  text-decoration: none;
}

.summary {
  background: var(--brand-soft);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
}

.summary h2 {
  font-family: var(--font);
  font-size: 1.2rem;
  margin: 0.45rem 0 0.35rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(8, 76, 66, 0.12);
}

.summary-row span {
  color: var(--muted);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}

.cal span,
.cal button {
  text-align: center;
  font-size: 0.78rem;
  padding: 0.45rem 0;
  border-radius: 8px;
}

.cal span {
  color: var(--muted);
  font-weight: 600;
}

.cal button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}

.cal button.picked {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.cal button:disabled {
  background: #f3f6f4;
  color: #b7c4be;
  cursor: not-allowed;
}

.slot-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 8.5rem;
  text-align: left;
}

.slot-card small {
  color: var(--muted);
  font-weight: 500;
}

.slot-card.selected small,
.slot.selected small {
  color: var(--brand-deep);
}

.slot-card:disabled small {
  color: var(--warn);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.appt {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

@media (min-width: 720px) {
  .appt {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.appt h3 {
  margin: 0.25rem 0;
}

.btn-quiet {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.theme-toggle {
  min-height: var(--touch);
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.btn-danger {
  background: #fde8e6;
  color: var(--danger);
}

.split {
  display: grid;
  gap: 1rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.notice {
  background: var(--accent-soft);
  color: #6a3112;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.toggle:last-child {
  border-bottom: 0;
}

.switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #c5d5ce;
  position: relative;
  flex: 0 0 auto;
}

.switch.on {
  background: var(--brand);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s ease;
}

.switch.on::after {
  left: 21px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.page-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}

.crumb {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.crumb a {
  color: var(--brand);
  font-weight: 600;
}

.start-cards {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}

@media (min-width: 768px) {
  .start-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.start-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 96px;
  padding: 1rem 1rem 1rem 0.9rem;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.start-card strong {
  display: block;
  font-size: 1.05rem;
}

.mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--brand-deep);
}

.mark svg,
.spec-grid svg,
.need-grid svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chev {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  color: var(--brand-deep);
  font-weight: 700;
}

.start-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}

.start-doctor { background: var(--brand-soft); }
.start-lab { background: #f7eef2; }
.start-well { background: var(--warn-soft); }

[data-theme="dark"] .start-lab { background: #2a1c28; }
[data-theme="dark"] .chev { background: rgba(255, 255, 255, 0.08); }

.need-grid,
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

@media (min-width: 768px) {
  .need-grid,
  .spec-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.need-grid a,
.spec-grid a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 72px;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}

.spec-grid a {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: 132px;
}

.spec-grid .mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--brand-soft);
}

.finder {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--bg1);
  border: 1px solid var(--line);
}

.finder-grid {
  display: grid;
  gap: 0.75rem;
  align-items: end;
}

@media (min-width: 768px) {
  .finder-grid {
    grid-template-columns: 1fr 1fr auto;
  }
}

.finder label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.finder select {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 0.75rem;
}

.doc-card {
  display: grid;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

@media (min-width: 768px) {
  .doc-card {
    grid-template-columns: auto 1fr auto;
  }
}

.doc-card h3 {
  margin: 0 0 0.15rem;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
}

.doc-book {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

@media (min-width: 768px) {
  .doc-book {
    justify-items: end;
  }
}

.day-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin: 0.4rem 0 1rem;
}

.day-strip button {
  min-width: 68px;
  min-height: 76px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.day-strip button small,
.day-strip button em {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-style: normal;
}

.day-strip button strong {
  font-size: 1.15rem;
}

.day-strip button.picked {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.day-strip button.picked small,
.day-strip button.picked em {
  color: #fff;
}

.day-strip button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.slot-group h3 {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin: 0.8rem 0 0.45rem;
}

.slot-group h3 span {
  color: var(--muted);
  font-weight: 600;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.book-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.book-bar strong {
  display: block;
  font-size: 1.25rem;
}

.visit-line {
  margin: 0 0 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}

.doctor-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .doctor-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .filter-toggle {
    display: none;
  }

  .filter-rail .filters {
    flex-direction: column;
  }
}

@media (max-width: 1023px) {
  .filter-rail:not(.open) {
    display: none;
  }
}

.filter-rail {
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}

.sheet[hidden] {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 42, 74, 0.42);
}

.sheet-panel {
  position: relative;
  width: min(440px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  padding: 1.2rem 1.15rem 2rem;
  box-shadow: -16px 0 40px rgba(11, 42, 74, 0.16);
}

.sheet-x {
  position: sticky;
  top: 0;
  float: right;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.optional {
  margin: 0.4rem 0 0.8rem;
}

.optional summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}


