/* ---------- Login / home ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden;
  background: var(--night);
  color: #d9ece9; padding: 48px 56px; display: flex; flex-direction: column;
}
.auth-brand .brand-word { font-size: 1.7rem; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-headline {
  font-family: var(--font-display); font-weight: 300; color: #fff;
  font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.12; letter-spacing: -.03em; margin: auto 0 18px; max-width: 13ch;
}
.auth-copy { max-width: 46ch; color: #a9c9c4; font-size: 1.02rem; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; max-width: 46ch; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: #cfe5e1; }
.auth-points svg.lucide { color: #7fd3c9; }
.auth-contact { margin-top: 36px; padding-top: 20px; border-top: 1px solid #23474d; display: flex; gap: 24px; flex-wrap: wrap; font-size: .92rem; }
.auth-contact a { color: #e2f3f0; display: inline-flex; gap: 8px; align-items: center; }
.arch { position: absolute; right: -90px; top: -40px; width: 460px; opacity: .14; pointer-events: none; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 26px; }
.auth-card .field { margin-bottom: 16px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 26px 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.register-cta {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px dashed #b7d6d0; border-radius: var(--r);
  background: #f7fbfa; color: var(--ink); text-decoration: none;
}
.register-cta:hover { border-color: var(--teal); background: var(--teal-tint); text-decoration: none; color: var(--ink); }
.register-cta b { display: block; }
.register-cta small { color: var(--muted); }
.register-cta .chev { margin-left: auto; color: var(--teal); }

.register-shell { min-height: 100vh; background: var(--enamel); }
.register-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; background: var(--night); }
.register-top a.back { color: #cfe5e1; display: inline-flex; gap: 8px; align-items: center; }
.register-body { max-width: 920px; margin: 0 auto; padding: 34px 20px 60px; }
.register-body .intro { margin-bottom: 22px; }
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: #fff; font-size: .82rem; font-weight: 700; }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px; }
  .auth-headline { margin-top: 36px; }
  .register-top { padding: 14px 16px; }
}

/* ---------- Dental chart ---------- */
.chart-wrap { overflow-x: auto; padding: 6px 2px 2px; }
.arch-row { display: flex; justify-content: center; gap: 4px; min-width: 700px; }
.arch-row.split-mid > .half { display: flex; gap: 4px; }
.arch-row.split-mid > .half:first-child { padding-right: 10px; border-right: 2px dashed var(--line); }
.arch-row.split-mid > .half:last-child { padding-left: 10px; }
.jaw-label { text-align: center; font-size: .8rem; color: var(--muted); margin: 8px 0; }
.tooth {
  width: 40px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px;
  border: 1px solid transparent; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--ink);
}
.tooth:hover { background: var(--teal-tint); border-color: #bfe0da; }
.tooth .crown {
  width: 30px; height: 36px; border-radius: 9px 9px 13px 13px; border: 2px solid #c9d6d4; background: #fff;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #fff; transition: background .15s;
}
.lower .tooth .crown { border-radius: 13px 13px 9px 9px; }
.tooth .tnum { font-size: .74rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.primary-teeth .tooth .crown { width: 24px; height: 28px; }
.c-healthy .crown { background: #fff; border-color: #9fcfc6; }
.c-caries .crown { background: #c0503e; border-color: #c0503e; }
.c-filled .crown { background: #3e72a8; border-color: #3e72a8; }
.c-missing .crown { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #e3e8e9 4px, #e3e8e9 8px); border-style: dashed; border-color: #a8b4b7; }
.c-crown .crown { background: #c69a2a; border-color: #c69a2a; }
.c-rct-done .crown { background: #6c4fa6; border-color: #6c4fa6; }
.c-implant .crown { background: #445a62; border-color: #445a62; }
.c-bridge .crown { background: #9a7a3c; border-color: #9a7a3c; }
.c-fractured .crown { background: #e08a3c; border-color: #e08a3c; }
.c-mobile .crown { background: #f1d27a; border-color: #d9b44b; }
.c-impacted .crown { background: #8f8f8f; border-color: #8f8f8f; }
.c-extraction-needed .crown { background: #fff; border-color: #c0503e; border-width: 3px; }
.c-watch .crown { background: #fff; border-color: #c69a2a; border-style: dashed; border-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .82rem; color: var(--ink-soft); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid #c9d6d4; display: inline-block; }
.cond-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cond-grid label { display: flex; }
.cond-grid input { position: absolute; opacity: 0; }
.cond-grid span { flex: 1; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .85rem; cursor: pointer; }
.cond-grid input:checked + span { border-color: var(--teal); background: var(--teal-tint); font-weight: 600; }
.cond-grid i { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; border: 2px solid #c9d6d4; }

/* ---------- Calendar (FullCalendar theme) ---------- */
.fc { --fc-border-color: var(--line-soft); --fc-today-bg-color: #f0f8f6; --fc-now-indicator-color: var(--rose); font-size: .88rem; }
.fc .fc-toolbar-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.fc .fc-button { background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; text-transform: none; box-shadow: none !important; }
.fc .fc-button:hover { background: var(--grey-tint); color: var(--ink); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--night); border-color: var(--night); color: #fff; }
.fc .fc-timegrid-slot { height: 2.4em; }
.fc-event { border-radius: 6px; padding: 1px 3px; cursor: pointer; }
.fc .is-cancelled, .fc .is-no-show { opacity: .5; text-decoration: line-through; }
.fc .fc-col-header-cell-cushion { color: var(--ink); font-weight: 600; padding: 8px 4px; }
.fc .fc-timegrid-slot-label-cushion { color: var(--muted); }
.status-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.status-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Dashboard ---------- */
.queue-item { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line-soft); }
.queue-item:last-child { border-bottom: 0; }
.queue-time { width: 74px; font-family: var(--font-display); font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.queue-item .who { flex: 1; min-width: 0; }
.status-bar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: var(--line-soft); margin: 12px 0 10px; }
.greeting { font-family: var(--font-display); font-weight: 300; font-size: 1.9rem; letter-spacing: -.02em; }

/* ---------- Subscription plans ---------- */
.plans-shell { min-height: 100vh; background: var(--enamel); }
.plans-body { max-width: 1080px; margin: 0 auto; padding: 40px 20px 60px; }
.plans-intro { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.plans-intro h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 12px 0 8px; }
.plans-intro .pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--amber-tint); color: #7b5208; font-size: .84rem; font-weight: 600;
}
.plans-intro .pill.ok { background: var(--teal-tint); color: var(--teal-deep); }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 22px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.plan-card:hover { transform: translateY(-2px); border-color: #b9dcd5; box-shadow: 0 14px 34px rgba(18, 48, 58, .1); }
.plan-card.featured { border: 2px solid var(--teal); }
.plan-card .tag {
  position: absolute; top: -12px; left: 22px; padding: 3px 10px; border-radius: 999px;
  background: var(--teal); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
}
.plan-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink-soft); }
.plan-price { font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; letter-spacing: -.02em; color: var(--ink); }
.plan-per { font-size: .85rem; color: var(--muted); }
.plan-valid {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r);
  background: var(--enamel); font-size: .88rem;
}
.plan-valid svg.lucide { color: var(--teal); width: 16px; height: 16px; }
.plans-cta {
  margin: 30px auto 0; max-width: 760px; padding: 26px 28px; border-radius: var(--r-lg); text-align: center;
  background: var(--night); color: #d9ece9; box-shadow: var(--shadow-pop);
}
.plans-cta p { font-size: 1.05rem; line-height: 1.6; margin: 0 0 18px; }
.plans-cta .phone { font-family: var(--font-display); font-size: 1.5rem; color: #fff; font-weight: 600; }
.plans-cta .btn-primary { background: #7fd3c9; border-color: #7fd3c9; color: var(--night); }
.plans-cta .btn-primary:hover { background: #a3e2da; border-color: #a3e2da; color: var(--night); }
@media (max-width: 1000px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } .plans-body { padding-top: 26px; } }

/* ---------- Super admin ---------- */
.sidebar.admin { background: #102a43; }
.sidebar.admin .nav a.active { background: #1d3f63; box-shadow: inset 3px 0 0 #8cc4f2; }
.sidebar.admin .nav a:hover { background: #17365a; }
.admin-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #8cc4f2; color: #102a43; font-size: .66rem; font-weight: 700; letter-spacing: .04em; vertical-align: 3px; }
.rev-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 170px; padding: 8px 4px 0; }
.rev-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.rev-bar i { display: block; width: 100%; max-width: 46px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--teal); }
.rev-bar:last-child i { background: var(--blue); }
.rev-bar small { color: var(--muted); font-size: .76rem; }
.rev-bar b { font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.action-cards { display: grid; gap: 18px; }
.audit-details { font-size: .82rem; color: var(--muted); }
.audit-details b { color: var(--ink-soft); font-weight: 600; }
