:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1d2433;
  --muted: #6b7280;
  --line: #edf0f6;
  --shadow: 0 10px 24px rgba(20, 25, 35, 0.06);
  --radius: 14px;
  --accent: #e48a2a;
  --accent-2: #f3a457;
  --sidebar: #fff3f0;
  --sidebar-ink: #4b5563;
  --font-sans: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Live SOAP Notes header + layout tweaks */
.note-editor__docbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:10px 0 12px}
.note-editor__doctag{font-size:10px;font-weight:900;letter-spacing:.18em;text-transform:uppercase;color:#2563EB}
.note-editor__doctitle{font-size:14px;font-weight:900;color:#101828;margin-top:2px}
.note-editor__prevlink{font-size:12px;font-weight:800;color:#344054;text-decoration:none;display:inline-flex;align-items:center;gap:8px}
.note-editor__prevlink i{color:#667085}
.soapbox--full{grid-column:1/-1}
.soapbox__kicker{justify-content:space-between}
.soapbox__kicker-right{display:inline-flex;align-items:center;gap:8px}
.soapbox__pill{background:#FEF3F2;color:#B42318;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:900;letter-spacing:.08em}

/* Prescription list (read-only UI) */
.rxpanel{background:#fff;border:1px solid #EAECF0;border-radius:16px;padding:12px}
.rxpanel__meta{display:flex;justify-content:flex-end;margin-bottom:8px}
.rxpanel__pill{background:#EEF4FF;color:#1D4ED8;font-weight:900;font-size:10px;border-radius:999px;padding:5px 9px;letter-spacing:.08em}
.rxpanel__search{display:flex;align-items:center;gap:8px;border:1px solid #EAECF0;border-radius:12px;padding:10px 12px;background:#F9FAFB;margin-bottom:10px}
.rxpanel__search i{color:#98A2B3}
.rxpanel__search input{border:0;outline:0;background:transparent;width:100%;font-size:12px;color:#101828}
.rxpanel__search input:disabled{color:#667085}
.rxlist{display:flex;flex-direction:column;gap:10px}
.rxrow{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #EAECF0;border-radius:14px;padding:10px 12px;background:#F8FAFF}
.rxrow__left{display:flex;align-items:center;gap:10px;min-width:0}
.rxrow__icon{width:34px;height:34px;border-radius:12px;background:#EEF4FF;color:#1D4ED8;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.rxrow__text{min-width:0}
.rxrow__title{font-size:12.5px;font-weight:900;color:#101828;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.rxrow__sub{font-size:11px;color:#667085;margin-top:2px}
.rxrow__right{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.rxmini{min-width:64px;text-align:center}
.rxmini__label{font-size:9px;font-weight:900;letter-spacing:.16em;color:#98A2B3}
.rxmini__val{font-size:12px;font-weight:900;color:#101828;margin-top:2px}
.rxrow__trash{border:0;background:#FEE4E2;color:#B42318;border-radius:10px;width:34px;height:34px;display:flex;align-items:center;justify-content:center}
.rxrow__trash[disabled]{opacity:.55}

/* ===== Clinical Note Editor (Patient Show) ===== */
.note-editor__crumb{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.note-editor__crumb-muted{font-size:11px;letter-spacing:.16em;font-weight:800;color:#98A2B3}
.note-editor__crumb-accent{font-size:11px;letter-spacing:.16em;font-weight:800;color:#D97706}
.note-editor__crumb-sep{color:#D0D5DD}
.note-editor__surface{background:#FBF8FF;border-radius:18px;padding:18px}
.note-editor__top{display:flex;gap:16px;align-items:stretch;justify-content:space-between;margin-bottom:14px}
.note-editor__patientcard{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid #EAECF0;border-radius:16px;padding:14px 16px;flex:1;min-width:340px}
.note-editor__avatarwrap{position:relative;flex:0 0 auto}
.note-editor__avatar{width:58px;height:58px;border-radius:14px;object-fit:cover;border:2px solid #F2F4F7}
.note-editor__verified{position:absolute;left:50%;transform:translateX(-50%);bottom:-10px;background:#111827;color:#fff;font-size:9px;font-weight:800;letter-spacing:.08em;padding:3px 6px;border-radius:999px}
.note-editor__patientmeta{min-width:0}
.note-editor__name-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.note-editor__name{font-size:18px;font-weight:900;color:#101828;line-height:1.1}
.note-editor__pid{font-size:11px;color:#667085;background:#F2F4F7;border-radius:10px;padding:3px 8px}
.note-editor__meta-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:6px;color:#667085;font-size:12px}
.note-editor__meta-item i{color:#D97706;margin-right:6px}
.note-editor__actions{display:flex;flex-direction:column;gap:10px;align-items:flex-end;justify-content:center;min-width:280px}
.note-editor__statusrow{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.note-editor__status{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;letter-spacing:.08em}
.note-editor__statusdot{width:7px;height:7px;border-radius:999px;background:currentColor;opacity:.7}
.note-editor__status.is-finalized{background:#ECFDF3;color:#027A48}
.note-editor__status.is-draft{background:#FFFAEB;color:#B54708}
.note-editor__btn{border:0;border-radius:10px;padding:9px 12px;font-weight:800;font-size:12px;display:inline-flex;align-items:center;gap:8px}
.note-editor__btn[disabled]{opacity:.55;cursor:not-allowed}
.note-editor__btn--ghost{background:#F2F4F7;color:#101828}
.note-editor__btn--primary{background:#E07E2A;color:#fff}
.note-editor__btn--wide{min-width:180px;justify-content:center}
.note-editor__sessionrow{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.note-editor__sessionpill{background:#EEF4FF;color:#1D4ED8;font-weight:800;font-size:11px;border-radius:999px;padding:6px 10px}
.note-editor__sessionselect{background:#fff;border:1px solid #EAECF0;border-radius:10px;padding:8px 10px;font-size:12px;color:#101828;min-width:190px}
.note-editor__card{background:#fff;border:1px solid #EAECF0;border-radius:18px;padding:16px}
.note-editor__cardhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.note-editor__cardtitle{font-size:14px;font-weight:900;color:#101828;display:flex;align-items:center;gap:10px}
.note-editor__cardtitle i{color:#667085}
.note-editor__soapgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.soapbox{border-radius:16px;border:1px solid #EAECF0;background:#fff;padding:12px}
.soapbox__kicker{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#344054;display:flex;align-items:center;gap:10px;margin-bottom:8px}
.soapbox__badge{width:22px;height:22px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;background:#F2F4F7;color:#101828;font-size:12px}
.soapbox__field{width:100%;border:0;outline:0;resize:vertical;min-height:100px;color:#101828;font-size:12.5px;line-height:1.55;background:transparent}
.soapbox__field[readonly]{color:#475467}
.soapbox__toolbar{display:flex;align-items:center;gap:8px;margin:2px 0 10px}
.soapbox__tool{border:1px solid #EAECF0;background:#fff;border-radius:10px;width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;color:#475467}
.soapbox__tool:hover{background:#F9FAFB;color:#111827}
.soapbox__toolsep{width:1px;height:22px;background:#EAECF0;margin:0 2px}
.soapbox__editor{min-height:100px;border:1px solid #EAECF0;border-radius:14px;padding:10px 12px;background:#fff;outline:none;font-size:12.5px;line-height:1.55;color:#101828}
.soapbox__editor:focus{border-color:rgba(228,138,42,0.45);box-shadow:0 0 0 4px rgba(228,138,42,0.12)}
.soapbox__editor[contenteditable="false"]{background:#F9FAFB;color:#475467}
.soapbox__editor-ck{width:100%;min-height:120px;border:1px solid #EAECF0;border-radius:14px;padding:10px 12px;background:#fff;outline:none;font-size:12.5px;line-height:1.55;color:#101828}

/* CKEditor: soften borders to match UI */
.ck.ck-editor__main>.ck-editor__editable{border-radius:14px}
.ck.ck-toolbar{border-radius:14px 14px 10px 10px}
.soapbox--s{border-left:4px solid #2563EB}
.soapbox--o{border-left:4px solid #16A34A}
.soapbox--a{border-left:4px solid #F59E0B}
.soapbox--p{border-left:4px solid #06B6D4}
.note-editor__divider{height:1px;background:#EAECF0;margin:14px 0}
.note-editor__rxhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.note-editor__rxtitle{font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#16A34A;display:flex;align-items:center;gap:10px}
.note-editor__rxtitle i{color:#16A34A}
.note-editor__rxlink{font-size:12px;color:#344054;font-weight:800}
.note-editor__rxgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rxcard{display:flex;align-items:center;gap:12px;background:#F5F6FF;border-radius:14px;padding:12px;border:1px solid #EEF2FF}
.rxcard__thumb{width:42px;height:32px;border-radius:10px;background:#E0E7FF;color:#1D4ED8;display:flex;align-items:center;justify-content:center}
.rxcard__body{min-width:0}
.rxcard__title{font-weight:900;color:#101828;font-size:12.5px}
.rxcard__sub{color:#667085;font-size:11.5px;margin-top:2px}
.rxcard__chev{margin-left:auto;color:#667085}
.note-editor__emptyrx{grid-column:1 / -1;color:#667085;font-size:12px;background:#F9FAFB;border:1px dashed #D0D5DD;border-radius:14px;padding:12px}
.note-editor__footer{margin-top:14px;display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.note-editor__linkdanger{border:0;background:transparent;color:#B42318;font-weight:900;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.note-editor__linkdanger i{margin-right:6px}
.note-editor__linkdanger.is-disabled{opacity:.45}

@media (max-width: 980px){
  .note-editor__top{flex-direction:column;align-items:stretch}
  .note-editor__actions{align-items:flex-start;min-width:0}
  .note-editor__statusrow{justify-content:flex-start}
}
@media (max-width: 760px){
  .note-editor__soapgrid{grid-template-columns:1fr}
  .note-editor__rxgrid{grid-template-columns:1fr}
}

/* ===== Invoice Detail (Billing Show) ===== */
.invd-wrap{padding-bottom:24px}
.invd-topbar{display:flex;justify-content:space-between;align-items:center}
.invd-crumb{display:flex;align-items:flex-start;gap:12px}
.invd-back{width:32px;height:32px;border-radius:10px;background:#fff;border:1px solid #EAECF0;display:flex;align-items:center;justify-content:center;color:#101828;text-decoration:none}
.invd-kicker{font-size:11px;font-weight:900;letter-spacing:.16em;color:#98A2B3}
.invd-title-row{display:flex;gap:12px;align-items:center;margin-top:2px;flex-wrap:wrap}
.invd-title{font-size:16px;font-weight:900;color:#D97706}
.invd-badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;letter-spacing:.08em}
.invd-badgedot{width:7px;height:7px;border-radius:999px;background:currentColor;opacity:.7}
.invd-badge.is-paid{background:#ECFDF3;color:#027A48}
.invd-badge.is-pending{background:#EEF4FF;color:#1D4ED8}
.invd-grid{margin-top:14px;display:grid;grid-template-columns: 1.5fr 0.9fr;gap:14px;align-items:start}
.invd-card{background:#fff;border:1px solid #EAECF0;border-radius:18px;padding:14px}
.invd-card__label{font-size:11px;font-weight:900;letter-spacing:.18em;color:#F97316}
.invd-card--patient{grid-column:1 / span 1}
.invd-card--actions{grid-column:2 / span 1}
.invd-patient{margin-top:10px;display:flex;gap:14px;align-items:flex-start}
.invd-avatar{width:56px;height:56px;border-radius:16px;overflow:hidden;border:2px solid #F2F4F7;background:#F2F4F7;flex:0 0 auto}
.invd-avatar img{width:100%;height:100%;object-fit:cover}
.invd-pmeta{min-width:0;flex:1}
.invd-pname{font-size:18px;font-weight:900;color:#101828;line-height:1.1}
.invd-pchips{margin-top:6px;display:flex;gap:10px;flex-wrap:wrap}
.invd-chip{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#667085}
.invd-chip i{color:#D97706}
.invd-plines{margin-top:8px;color:#667085;font-size:12px;display:flex;flex-direction:column;gap:4px}
.invd-plines i{color:#98A2B3;width:14px;text-align:center;margin-right:6px}
.invd-paction{margin-left:auto}
.invd-mini{display:inline-flex;gap:8px;align-items:center;background:#F2F4F7;border-radius:10px;padding:8px 10px;color:#101828;text-decoration:none;font-weight:800;font-size:12px;border:1px solid #EAECF0}
.invd-actions{margin-top:10px;display:flex;flex-direction:column;gap:10px}
.invd-action{border:1px solid #EAECF0;background:#fff;border-radius:10px;padding:10px 12px;font-weight:900;font-size:12px;display:flex;align-items:center;justify-content:space-between;color:#101828}
.invd-action{text-decoration:none}
.invd-action:hover{text-decoration:none}
.invd-action--primary{background:#E07E2A;color:#fff;border-color:#E07E2A}
.invd-card--items{grid-column:1 / span 1}
.invd-card--pay{grid-column:2 / span 1}
.invd-sectiontitle{font-size:13px;font-weight:900;color:#1F2A73;margin-bottom:10px}
.invd-table{border:1px solid #EAECF0;border-radius:16px;overflow:hidden}
.invd-thead{display:grid;grid-template-columns: 1fr 80px 120px 140px;gap:10px;background:#F9FAFB;padding:12px 14px;font-size:10px;font-weight:900;letter-spacing:.18em;color:#667085}
.invd-row{display:grid;grid-template-columns: 1fr 80px 120px 140px;gap:10px;padding:12px 14px;border-top:1px solid #EAECF0;align-items:start}
.invd-itemname{font-weight:900;color:#101828;font-size:12.5px}
.invd-itemsub{color:#98A2B3;font-size:11px;margin-top:2px}
.invd-amt{font-weight:900;color:#101828}
.invd-totals{border-top:1px solid #EAECF0;background:#FBFAFF;padding:12px 14px}
.invd-tline{display:flex;justify-content:flex-end;gap:24px;color:#667085;font-size:12px;margin-top:6px}
.invd-tline span:first-child{min-width:120px;text-align:left}
.invd-tline span:last-child{min-width:120px;text-align:right;color:#101828;font-weight:800}
.invd-tline--neg span:last-child{color:#B42318}
.invd-ttotal{display:flex;justify-content:flex-end;gap:24px;margin-top:10px;padding-top:10px;border-top:1px dashed #D0D5DD;font-weight:900;color:#1F2A73}
.invd-ttotal__amt{min-width:120px;text-align:right;color:#E07E2A;font-size:16px}
.invd-linked{margin-top:12px;background:#F5F6FF;border:1px solid #EEF2FF;border-radius:16px;padding:12px;display:flex;gap:12px;align-items:center}
.invd-linked__ico{width:34px;height:34px;border-radius:12px;background:#E0E7FF;color:#1D4ED8;display:flex;align-items:center;justify-content:center}
.invd-linked__title{font-weight:900;color:#101828;font-size:12.5px}
.invd-linked__sub{color:#667085;font-size:11.5px;margin-top:2px}
.invd-linked__chev{margin-left:auto;color:#667085}
.invd-paybox{border:1px solid #EAECF0;border-radius:16px;padding:12px}
.invd-paylabel{font-size:10px;font-weight:900;letter-spacing:.18em;color:#98A2B3}
.invd-paymethod{display:flex;gap:10px;align-items:center;margin-top:8px}
.invd-paypill{background:#EEF4FF;color:#1D4ED8;font-weight:900;font-size:11px;border-radius:8px;padding:4px 8px}
.invd-paytext{font-weight:900;color:#101828;font-size:12px}
.invd-payrow{margin-top:12px}
.invd-payvalue{margin-top:6px;font-weight:900;color:#101828;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.invd-copy{color:#98A2B3}
.invd-quote{margin-top:12px;background:#ECFDF3;border:1px solid #D1FADF;border-radius:16px;padding:12px;display:flex;gap:10px;align-items:flex-start;color:#027A48}
.invd-quote__title{font-weight:900;font-size:11.5px}
.invd-quote__sub{color:#039855;font-size:11px;margin-top:2px}

@media (max-width: 980px){
  .invd-grid{grid-template-columns:1fr}
  .invd-card--patient,.invd-card--actions,.invd-card--items,.invd-card--pay{grid-column:1 / -1}
  .invd-thead,.invd-row{grid-template-columns:1fr 60px 90px 110px}
}
@media print{
  .aligned-shell, .aligned-main, .aligned-content{background:#fff}
  .invd-back, .invd-card--actions{display:none}
  .invd-grid{grid-template-columns:1fr}
  .invd-card{box-shadow:none}
}

/* Invoice (Create New Invoice) */
.invoice-wrap {
  max-width: 1120px;
}

.invoice-header {
  margin-top: 2px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.invoice-kicker-sep {
  color: rgba(29, 36, 51, 0.35);
  padding: 0 6px;
}

.invoice-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 6px;
}

.invoice-savepaid {
  height: 40px;
  border-radius: 12px;
  padding: 0 16px;
}

.invoice-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.invoice-card {
  margin-top: 0;
}

.invoice-card + .invoice-card {
  margin-top: 16px;
}

.invoice-card__header {
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.invoice-card__header--center {
  justify-content: center;
}

.invoice-card__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}

.invoice-card__title--plain {
  font-size: 14px;
}

.invoice-card__icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(228, 138, 42, 0.12);
  color: var(--accent);
}

.invoice-card__body {
  padding: 16px 16px;
}

.invoice-search {
  position: relative;
  min-width: 190px;
  flex: 0 0 auto;
}

.invoice-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(107, 114, 128, 0.8);
  font-size: 12px;
}

.invoice-search__input {
  width: 100%;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f7f8fc;
  padding: 0 12px 0 34px;
  outline: none;
  font-size: 12px;
}

.invoice-search__input:focus {
  border-color: rgba(228, 138, 42, 0.35);
  box-shadow: 0 0 0 3px rgba(228, 138, 42, 0.12);
}

.invoice-patient {
  background: #f7f8fc;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.invoice-patient__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.invoice-patient__meta {
  min-width: 0;
  flex: 1 1 auto;
}

.invoice-patient__top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.invoice-patient__name {
  font-size: 13px;
  font-weight: 900;
}

.invoice-patient__pill {
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.invoice-patient__sub {
  margin-top: 3px;
  color: rgba(107, 114, 128, 0.95);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.invoice-dot {
  opacity: 0.6;
}

.invoice-patient__aside {
  text-align: right;
  flex: 0 0 auto;
}

.invoice-patient__aside-label {
  font-size: 10px;
  text-transform: none;
  color: rgba(107, 114, 128, 0.85);
  font-weight: 700;
}

.invoice-select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f7f8fc;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #111827;
}

.invoice-select i {
  color: rgba(107, 114, 128, 0.9);
}

.invoice-add-item {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.invoice-add-item:hover {
  text-decoration: underline;
}

.invoice-table {
  display: grid;
  gap: 10px;
}

.invoice-table__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 110px 120px;
  gap: 12px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--line);
  color: rgba(107, 114, 128, 0.85);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.invoice-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 110px 120px;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(237, 240, 246, 0.8);
  align-items: center;
  font-size: 12px;
}

.invoice-table__row:last-child {
  border-bottom: none;
}

.invoice-item__name {
  font-weight: 900;
  font-size: 12px;
}

.invoice-item__sub {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(107, 114, 128, 0.9);
}

.invoice-amt {
  font-weight: 900;
}

.invoice-totals {
  margin-top: 14px;
  margin-left: auto;
  max-width: 320px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.6);
}

.invoice-totals__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 11px;
}

.invoice-totals__label {
  color: rgba(107, 114, 128, 0.9);
  font-weight: 700;
}

.invoice-totals__value {
  font-weight: 900;
}

.invoice-totals__value--neg {
  color: #dc2626;
}

.invoice-totals__grand {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.invoice-totals__grand-label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1d4ed8;
}

.invoice-totals__grand-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
}

.invoice-field + .invoice-field {
  margin-top: 14px;
}

.invoice-field__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(107, 114, 128, 0.95);
  font-weight: 900;
  display: block;
  margin-bottom: 8px;
}

.invoice-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.invoice-method {
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f7f8fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(55, 65, 81, 0.9);
}

.invoice-method i {
  color: rgba(107, 114, 128, 0.9);
}

.invoice-method.is-active {
  background: rgba(228, 138, 42, 0.12);
  border-color: rgba(228, 138, 42, 0.28);
  color: #9a5a11;
}

.invoice-method.is-active i {
  color: var(--accent);
}

.invoice-input {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f7f8fc;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.invoice-input__prefix {
  font-weight: 900;
  color: rgba(107, 114, 128, 0.9);
}

.invoice-input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  font-weight: 900;
  color: #111827;
}

.invoice-text {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f7f8fc;
  padding: 0 12px;
  outline: none;
  font-size: 12px;
  font-weight: 900;
  color: #111827;
}

.invoice-note {
  margin-top: 16px;
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.invoice-note--success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.14);
}

.invoice-note__icon {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
  flex: 0 0 auto;
}

.invoice-note__title {
  font-weight: 900;
  font-size: 12px;
}

.invoice-note__text {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(55, 65, 81, 0.85);
  line-height: 1.45;
}

@media (max-width: 992px) {
  .invoice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .invoice-card--sticky {
    position: static;
  }
}

@media (min-width: 993px) {
  .invoice-card--sticky {
    position: sticky;
    top: 18px;
  }
}

* {
  box-sizing: border-box;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

html,
body {
  height: 100%;
}

body.aligned-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  text-transform: capitalize;
}

h1 {
  font-size: 31px;
  letter-spacing: normal;
  line-height: 34px;
  font-weight: 500;
}

p {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.6;
}

span:not([class]) {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.aligned-shell {
  min-height: 100vh;
  display: flex;
}

.aligned-sidebar {
  width: 260px;
  font-family: var(--font-sans);
  background: var(--sidebar);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 215vh;
   max-height: 265vh;
  overflow: hidden;
  transition: width 180ms ease, transform 180ms ease;
}

/* Title Case for common UI titles */
.page-title,
.card-title,
.modal-title,
.invd-title,
.note-editor__cardtitle,
.rxcard__title {
  text-transform: capitalize;
}

.aligned-sidebar a,
.aligned-sidebar a:hover,
.aligned-sidebar a:focus,
.aligned-sidebar a:visited {
  text-decoration: none !important;
}

.aligned-brand__name,
.aligned-nav__link span,
.aligned-sidebar__bottom .dash-btn,
.aligned-sidebar__bottom .help-link {
  transition: opacity 160ms ease, transform 160ms ease;
}

body.sidebar-collapsed .aligned-sidebar {
  width: 88px;
  padding: 22px 12px;
}

body.sidebar-collapsed .aligned-brand {
  justify-content: center;
  padding-bottom: 10px;
}

body.sidebar-collapsed .aligned-brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

body.sidebar-collapsed .aligned-brand__name {
  opacity: 0;
  transform: translateX(-6px);
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

body.sidebar-collapsed .aligned-nav {
  padding: 6px 0;
}

body.sidebar-collapsed .aligned-nav__link {
  justify-content: center;
  gap: 0;
  padding: 12px 10px;
}

body.sidebar-collapsed .aligned-nav__link span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

body.sidebar-collapsed .aligned-sidebar__bottom {
  padding: 10px 0 6px;
}

body.sidebar-collapsed .aligned-sidebar__bottom .dash-btn {
  height: 42px;
  padding: 0;
  justify-content: center;
  font-size: 0;
}

body.sidebar-collapsed .aligned-sidebar__bottom .dash-btn i {
  font-size: 14px;
  margin: 0;
}

body.sidebar-collapsed .aligned-sidebar__bottom .help-link {
  justify-content: center;
  gap: 0;
  font-size: 0;
}

body.sidebar-collapsed .aligned-sidebar__bottom .help-link i {
  font-size: 14px;
}

@media (max-height: 760px) {
  .aligned-sidebar__bottom {
    display: none;
  }
}

.aligned-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 14px;
}

.aligned-brand__logo {
  width: 200px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.aligned-brand__logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.aligned-brand__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.aligned-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  font-weight: 500;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 121, 9, 0.45) transparent;
}

.aligned-nav::-webkit-scrollbar {
  width: 6px;
}

.aligned-nav::-webkit-scrollbar-thumb {
  background: rgba(236, 121, 9, 0.45);
  border-radius: 999px;
}

.aligned-nav::-webkit-scrollbar-track {
  background: transparent;
}

.aligned-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aligned-nav__item {
  list-style: none;
}

.aligned-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: 12px;
  /* font-weight: 700; */
  line-height: 1.2;
  transition: background 120ms ease, color 120ms ease;
}

.aligned-sidebar .aligned-nav__link {
  font-size: 13px;
  font-weight: 500;
}

.aligned-nav__link.aligned-nav__link--dashboard {
  font-size: 13px;
  font-weight: 500;
  padding-top: 12px;
  padding-bottom: 12px;
}

.aligned-nav__link.aligned-nav__link--dashboard i {
  font-size: 14px;
  color: #64748b;
}

.aligned-nav__link.aligned-nav__link--dashboard.is-active i {
  color: #EC7909;
}

.aligned-nav__link--toggle {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.aligned-nav__link i {
  width: 20px;
  text-align: center;
  font-size: 14px;
  margin-right: 0 !important;
  opacity: 0.95;
  color: #8b93a7;
}

.aligned-nav__caret {
  margin-left: auto;
  color: #9aa3b2;
  transition: transform 140ms ease;
}

.aligned-nav__item.is-open .aligned-nav__caret {
  transform: rotate(180deg);
}

.aligned-submenu {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px 0 0 38px;
  border-left: 1px dashed rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: max-height 220ms ease, opacity 160ms ease, transform 160ms ease;
}

.aligned-nav__item.is-open .aligned-submenu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.aligned-submenu__link {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #7a8194;
  transition: background 120ms ease, color 120ms ease;
}

.aligned-submenu__link:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.aligned-submenu__link.is-active {
  background: rgba(228, 138, 42, 0.12);
  color: var(--ink);
}

body.sidebar-collapsed .aligned-nav__caret,
body.sidebar-collapsed .aligned-submenu {
  display: none !important;
}

.aligned-nav__link:hover {
  background: rgba(228, 138, 42, 0.12);
  color: var(--ink);
}

.aligned-nav__link.is-active {
  background: rgba(237, 123, 2, 0.05);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  color: #EC7909;
}

.aligned-nav__link.is-active i {
  color: #EC7909;
}

.aligned-sidebar__bottom {
  margin-top: auto;
  padding: 10px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.help-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7a8194;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
}

.help-link:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.aligned-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.aligned-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: rgba(246, 247, 251, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon:hover {
  background: #f7f8fc;
}

.topbar-icon--menu {
  display: inline-flex;
}

.topbar-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F0F4FD;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
}

.topbar-search__icon {
  color: #9aa3b2;
}

.topbar-search__input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  background: transparent;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.branch-switch {
  position: relative;
}

.branch-switch__btn {
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.branch-switch__btn i {
  color: #99a1b2;
}

.branch-switch__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 170px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}

.branch-switch.is-open .branch-switch__menu {
  display: block;
}

.branch-switch__item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: #374151;
}

.branch-switch__item:hover {
  background: #f6f7fb;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
}

.topbar-user__text {
  text-align: right;
  line-height: 1.1;
}

.topbar-user__name {
  font-weight: 700;
  font-size: 12px;
}

.topbar-user__role {
  font-size: 11px;
  color: #8b93a7;
}

.topbar-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: #222;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.user-menu {
  position: relative;
  display: inline-flex;
}

.user-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.user-menu__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  box-shadow: 0 18px 34px rgba(20, 25, 35, 0.12);
  padding: 10px;
  display: none;
  z-index: 40;
}

.user-menu.is-open .user-menu__dropdown {
  display: block;
}

.user-menu__meta {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 8px;
}

.user-menu__name {
  font-weight: 900;
  font-size: 12px;
  color: #111827;
}

.user-menu__sub {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(107, 114, 128, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-menu__item:hover {
  background: #f6f7fb;
}

.aligned-content {
  padding: 20px 22px 28px;
  width: 100%;
}

.dash-wrap {
  max-width: 1080px;
  margin: 0 auto;
}

.dash-header {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.staff-wrap {
  padding-bottom: 12px;
}

.staff-header {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.staff-btn {
  height: 46px;
  border-radius: 14px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  /* font-weight: 900; */
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #e48a2a;
  color: white;
}

.staff-btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 20px rgba(228, 138, 42, 0.22);
}

.staff-btn--primary:hover {
  background: #dd7e1a;
  color: #fff;
}

.staff-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.staff-stat {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  box-shadow: 0 10px 18px rgba(20, 25, 35, 0.05);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.staff-metrics .staff-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(20, 25, 35, 0.08);
}

.staff-metrics .staff-stat:nth-child(1):hover {
  background: #fff9db;
  border-color: rgba(234, 179, 8, 0.24);
}

.staff-metrics .staff-stat:nth-child(2):hover {
  background: #dcfce7;
  border-color: rgba(22, 163, 74, 0.22);
}

.staff-metrics .staff-stat:nth-child(3):hover {
  background: #ffe4e6;
  border-color: rgba(244, 63, 94, 0.22);
}

.staff-metrics .staff-stat:nth-child(4):hover {
  background: #dbeafe;
  border-color: rgba(59, 130, 246, 0.22);
}

.staff-stat__label {
  font-size: 12px;
  color: #8b93a7;
  font-weight: 800;
}

.staff-stat__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.staff-stat__select {
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  outline: none;
}

.staff-stat__value-row {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-stat__value {
  font-size: 22px;
  line-height: 1;
  /* font-weight: 900; */
  letter-spacing: -0.02em;
  color: #1f3a8a;
}

.staff-stat__sub {
  font-size: 12px;
  color: #8b93a7;
  font-weight: 700;
}

.staff-stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 900;
  color: #16a34a;
}

.staff-badge {
  height: 22px;
  padding: 0 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.staff-badge--peak {
  background: rgba(239, 68, 68, 0.16);
  color: #b91c1c;
}

.staff-bar {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
}

.staff-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #f2b267);
}

.staff-card {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.staff-card__filters {
    padding: 22px 5px 17px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    /* flex-wrap: wrap; */
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.staff-tabs {
  display: inline-flex;
  align-items: center;
  /* gap: 6px; */
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.staff-tabs__select {
  height: 32px;
  min-width: 180px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: #4b5563;
  appearance: none;
  padding: 0 14px;
}

.staff-tab {
  height: 42px;
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  background: transparent;
  font-size: 13px;
  /* font-weight: 900; */
  color: #6b7280;
}

.staff-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 16px rgba(228, 138, 42, 0.22);
}

.staff-filter {
  position: relative;
  min-width: 220px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  padding: 0 14px 0 40px;
}

.staff-filter__icon {
  position: absolute;
  left: 14px;
  color: #9aa3b2;
}

.staff-filter__caret {
  position: absolute;
  right: 14px;
  color: #9aa3b2;
  pointer-events: none;
}

.staff-filter__select {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  /* font-weight: 900; */
  color: #4b5563;
  appearance: none;
  padding: 10px;
}

.staff-search {
  position: relative;
  min-width: 260px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  padding: 0 14px 0 40px;
}

.staff-search__icon {
  position: absolute;
  left: 14px;
  color: #9aa3b2;
}

.staff-search__input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: #4b5563;
}

.staff-search__input::placeholder {
  color: #9aa3b2;
  font-size: 12.5px;
}

.staff-sort {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.staff-sort__label {
  font-size: 13px;
  color: #9aa3b2;
  font-weight: 800;
}

.staff-sort__btn {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.staff-table {
  width: 100%;
  overflow-x: hidden;
}

.staff-table__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 0;
  table-layout: fixed;
}

.staff-table__head th {
  background: #fafbff;
  font-size: 11px;
  /* text-transform: uppercase; */
  letter-spacing: 0.12em;
  color: #9aa3b2;
  font-weight: 900;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.staff-table__head th:first-child,
.staff-table__body td:first-child {
  width: 70px;
  text-align: center;
}

.staff-table__head th:nth-child(2),
.staff-table__body td:nth-child(2) {
  width: 70px;
  text-align: center;
}

.staff-table__head th:nth-child(3),
.staff-table__body td:nth-child(3) {
  width: 250px;
}

.staff-table__head th:nth-child(4),
.staff-table__body td:nth-child(4) {
  width: 130px;
}

.staff-table__head th:nth-child(5),
.staff-table__body td:nth-child(5) {
  width: 100px;
}

.staff-table__head th:nth-child(6),
/* .staff-table__body td:nth-child(6) {
  width: 100px;
} */

.staff-table__head th:nth-child(7),
.staff-table__body td:nth-child(7) {
  width: 100px;
  text-align: center;
}

.staff-table__head th:nth-child(8),
.staff-table__body td:nth-child(8) {
  width: 100px;
}

.staff-table__body td:first-child {
  color: #6b7280;
  font-weight: 900;
}

.staff-table__body td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-table__body td:last-child {
  overflow: visible;
  text-overflow: clip;
}

/* Prevent horizontal scroll by letting content wrap when needed */
.staff-table__body td:not(:last-child) {
  white-space: normal;
}

.staff-table__head th:last-child,
.staff-table__body td:last-child {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  /* Hide Shift column */
  .staff-table__head th:nth-child(6),
  .staff-table__body td:nth-child(6) {
    display: none;
  }

  .staff-table__head th,
  .staff-table__body td {
    padding: 10px 14px;
  }

  .staff-table__head th {
    font-size: 10px;
  }

  .staff-table__head th:first-child,
  .staff-table__body td:first-child {
    width: 54px;
  }

  .staff-table__head th:nth-child(3),
  .staff-table__body td:nth-child(3) {
    width: 320px;
  }
}

@media (max-width: 900px) {
  /* Hide Branch column */
  .staff-table__head th:nth-child(5),
  .staff-table__body td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 760px) {
  /* Hide Role column */
  .staff-table__head th:nth-child(4),
  .staff-table__body td:nth-child(4) {
    display: none;
  }

  .staff-name {
    gap: 10px;
  }

  .staff-name__primary {
    font-size: 13px;
  }

  .staff-name__secondary {
    font-size: 11px;
  }
}

.staff-table__body tr:hover td {
  background: #fbfcff;
}

.staff-table__empty {
  padding: 18px 18px;
  color: #9aa3b2;
  font-weight: 800;
  text-align: center;
}

.staff-row {
  display: grid;
  grid-template-columns: 320px 1.1fr 140px 90px 140px 80px;
  gap: 12px;
  padding: 18px 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  min-width: 980px;
}

.staff-row--head {
  border-top: none;
  background: #fafbff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa3b2;
  font-weight: 900;
}

.staff-cell {
  min-width: 0;
}

.staff-name {
  display: flex;
  align-items: center;
  gap: 14px;
}

.staff-avatar {
  width: 32px;
  height: 36px;
  border-radius: 14px;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.staff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.staff-avatar--dark {
  background: #111827;
  color: #fff;
}

.staff-avatar--photo {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.staff-avatar--gray {
  background: #e5e7eb;
  color: #6b7280;
}

.staff-avatar--navy {
  background: #1f3a8a;
  color: #fff;
}

.staff-avatar--peach {
  background: #f6a46f;
  color: #fff;
}

.staff-presence {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #fff;
}

.staff-presence.is-online {
  background: #22c55e;
}

.staff-presence.is-offline {
  background: #94a3b8;
}

.staff-name__primary {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    line-height: 1.1;
}

.staff-name__secondary {
  margin-top: 4px;
  font-size: 12px;
  color: #9aa3b2;
  font-weight: 700;
  word-break: break-word;
}

.staff-role__primary {
   font-size: 14px;
    font-weight: 500;
  color: #0f766e;
}

.staff-role__primary--green {
  color: #15803d;
}

.staff-role__primary--muted {
  color: #6b7280;
}

.staff-role__secondary {
  margin-top: 4px;
  font-size: 12px;
  color: #9aa3b2;
  font-weight: 700;
}

.staff-branch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
    font-weight: 500;
  color: #111827;
}

.staff-branch i {
  color: #9aa3b2;
}

.staff-shift {
  font-size: 14px;
    font-weight: 500;
  color: #4b5563;
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 10px;
    font-weight: 500;
  /* text-transform: uppercase;
  letter-spacing: 0.08em; */
  white-space: nowrap;
}

.staff-pill--count {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
  height: 30px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 16px;
    font-weight: 500;
}

.staff-pill--count-muted {
  background: rgba(148, 163, 184, 0.22);
  color: #64748b;
}

.staff-pill--on {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.staff-pill--leave {
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
}

.staff-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 84px;
}

.staff-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .staff-card__filters {
    justify-content: flex-start;
  }

  .staff-search,
  .staff-filter {
    flex: 1 1 240px;
    min-width: 240px;
  }
}

.staff-action-btn:hover {
  background: #f6f7fb;
  color: #6b7280;
}

/* Keep staff row hover looking uniform */
.staff-table__body tr:hover .staff-action-btn:hover {
  background: #fff !important;
}
.staff-table__body tr:hover .staff-action-btn--delete:hover {
  background: rgba(239, 68, 68, 0.06) !important;
}

.staff-action-btn--edit {
  text-decoration: none;
}

.staff-action-btn--edit:hover {
  color: #111827;
}

.staff-action-btn--delete {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.22);
}

.staff-action-btn--delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.staff-card__footer {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.staff-pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.staff-pager__btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.staff-pager__btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.staff-pager__meta {
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
}

.staff-create__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.staff-create__form {
  margin-top: 18px;
}

.staff-create__body {
  padding: 18px;
  background: #fff;
}

.staff-create__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.staff-create__section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.staff-create__main .staff-create__section + .staff-create__section {
  margin-top: 16px;
}

.staff-create__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.staff-create__section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111827;
}

.staff-create__section-sub {
  font-size: 12px;
  font-weight: 700;
  color: #8b93a7;
}

.staff-create__label {
  font-size: 12px;
  font-weight: 900;
  color: #6b7280;
  margin-bottom: 6px;
}

.staff-create .form-control,
.staff-create .form-select {
  height: 46px;
  border-radius: 14px;
  border-color: rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  background-color: #fff;
}

.staff-create textarea.form-control {
  height: auto;
  min-height: 96px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.staff-create .form-control:focus,
.staff-create .form-select:focus {
  border-color: rgba(228, 138, 42, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(228, 138, 42, 0.14);
}

.staff-create__radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 6px;
}

.staff-create__check .form-check-input {
  margin-top: 0.2rem;
}

.staff-create__days {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.staff-create__day {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.staff-create__day input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.staff-create__day span {
  font-size: 12px;
  font-weight: 900;
  color: #4b5563;
}

.staff-create__profile {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 0 6px;
}

.staff-create__avatar {
  width: 56px;
  height: 56px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(228, 138, 42, 0.14);
  color: var(--accent);
  font-size: 18px;
}

.staff-create__profile-title {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.staff-create__profile-sub {
  font-size: 12px;
  font-weight: 700;
  color: #8b93a7;
}

.staff-create__toggles {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.staff-create__toggle {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.staff-create__toggle input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.staff-create__toggle-title {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #111827;
}

.staff-create__toggle-sub {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #8b93a7;
  margin-top: 2px;
}

.staff-create__footer {
  background: #fff;
}

.staff-create__footer-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.staff-create__section--sticky {
  position: sticky;
  top: 18px;
}

@media (max-width: 980px) {
  .staff-create__grid {
    grid-template-columns: 1fr;
  }

  .staff-create__section--sticky {
    position: static;
  }
}

/* PhysioPilates - Staff Registration (exact screen match) */
.pp-staffreg {
  /* Extend to the edges of .aligned-content (padding: 20px 22px 28px) */
  margin: -20px -22px -28px;
  padding: 24px 22px 30px;
  background: #fbf8ff;
  min-height: calc(100vh - 70px);
}

.pp-staffreg__wrap {
  max-width: 860px;
  margin: 0 auto;
}

.pp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    /* letter-spacing: 0.14em; */
    /* text-transform: uppercase; */
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 10px;
}

.pp-breadcrumb__item--muted {
  color: #9aa3b2;
}

.pp-breadcrumb__sep {
  color: #c3c9d6;
}

.pp-title {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
  color: #111827;
}

.pp-subtitle {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #9aa3b2;
}

.pp-form {
  margin-top: 18px;
}

.pp-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 26px rgba(20, 25, 35, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-top: 18px;
}

.pp-card__head {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pp-card__icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.pp-card__icon--orange {
  background: rgba(228, 138, 42, 0.16);
  color: var(--accent);
}

.pp-card__icon--green {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.pp-card__title {
  font-size: 21px;
  font-weight: 500;
  color: #111827;
}



.pp-card__body {
  padding: 16px 22px 20px;
  /* background: #f3f2ff; */
}

.pp-label {
  display: block;
  /* font-size: 13px; */
  /* letter-spacing: 0.14em; */
  /* text-transform: uppercase; */
  /* font-weight: 800; */
  color: #8b93a7;
  margin-bottom: 6px;
  /* padding: 8px; */
}

.pp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pp-field .pp-label {
  margin-bottom: 0;
}

.pp-label--proper {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: #6b7280;
}

.pp-label--section {
    margin-bottom: 18px;
    margin-top: 10px;
}

.pp-req {
  color: #ef4444;
}

.pp-input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #eef0f4;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.pp-input::placeholder {
  color: #9aa3b2;
  font-weight: 500;
}

.pp-textarea {
  min-height: 92px;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pp-input:focus {
  background: #ffffff;
  border-color: rgba(228, 138, 42, 0.4);
  box-shadow: 0 0 0 0.16rem rgba(228, 138, 42, 0.14);
}

.pp-select-multi {
  height: auto;
  min-height: 120px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pp-field-title {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
  color: #8b93a7;
  margin-bottom: 10px;
}

.pp-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.pp-choice {
  position: relative;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #eef0f4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 800;
  color: #374151;
}

.pp-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pp-choice span {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding-left: 22px;
  margin-bottom: 0;
}

.pp-choice span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pp-choice input:checked + span::before {
  background: var(--accent);
  border-color: transparent;
}

.pp-branch {
  display: grid;
  gap: 10px;
}

.pp-branch__item {
  position: relative;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #eef0f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 800;
  color: #374151;
}

.pp-branch__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pp-branch__item span {
  position: relative;
  display: block;
  width: 100%;
  padding-right: 22px;
  margin-bottom: 0;
}

.pp-branch__item span::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pp-branch__item input:checked + span::after {
  background: var(--accent);
  border-color: transparent;
}

.pp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pp-chip {
  position: relative;
  height: 26px;
  border-radius: 10px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  /* font-size: 10px;
  font-weight: 900; */
  color: #374151;
}

.pp-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pp-chip__label {
  height: 100%;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  background: #eef0f4;
}

.pp-chip input:checked + .pp-chip__label {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 16px rgba(228, 138, 42, 0.22);
}

.pp-chip--add {
  border: 1px dashed rgba(0, 0, 0, 0.12);
  background: #f3f4f6;
  color: #9aa3b2;
  cursor: default;
  padding: 0 12px;
}

.pp-chip--add i {
  margin-right: 8px;
}

.pp-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 18px 0;
}

.pp-access {
  background: #f3f4f6;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pp-access__title {
  font-size: 11px;
  font-weight: 900;
  color: #111827;
}

.pp-access__sub {
  font-size: 11px;
  font-weight: 700;
  color: #8b93a7;
  margin-top: 2px;
}

.pp-seg {
  /* height: 30px; */
  border-radius: 12px;
  background: #e5e7eb;
  padding: 3px;
  display: inline-flex;
  gap: 4px;
}

.pp-seg__opt {
  position: relative;
  height: 100%;
  min-width: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.pp-seg__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pp-seg__label {
  height: 24px;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.pp-seg__opt input:checked + .pp-seg__label {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 16px rgba(228, 138, 42, 0.18);
}

.pp-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Staff Edit */
.pp-staffedit .pp-subtitle {
  max-width: 520px;
}

.pp-staffedit .pp-photo {
    width: calc(52vw - -16px);
    margin-left: calc(50% - 50vw + 354px);
    margin-right: calc(50% - 54vw + 40px);
}

.pp-photo .pp-card__body {
  padding-top: 18px;
  padding-bottom: 18px;
}

.pp-photo__grid {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.pp-photo__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.pp-photo__right {
  flex: 1 1 360px;
  min-width: 260px;
  padding-left: 6px;
}

.pp-photo__noteTitle {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 4px;
}

.pp-photo__note {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  line-height: 1.55;
}

.pp-photo__avatar {
  width: 135px;
    height: 132px;
    border-radius: 999px;
    background: #fff;
    display: grid;
    place-items: center;
    border: 4px solid rgba(228, 138, 42, 0.18);
    flex: 0 0 auto;
    overflow: hidden;
}
.pp-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pp-photo__title {
      font-size: 20px;
    font-weight: 500;
    color: #111827;
}

.pp-photo__sub {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #9aa3b2;
}

.pp-photo__meta {
  min-width: 0;
}

.pp-photo__actions {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pp-photo__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pp-photo__btn {
  height: 32px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #6b7280;
  font-weight: 900;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.pp-photo__btn--primary {
  background: rgba(228, 138, 42, 0.12);
  border-color: rgba(228, 138, 42, 0.26);
  color: #9a5a11;
}

.pp-photo__btn--danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.22);
  color: #dc2626;
}

.pp-status {
  background: #f3f4f6;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 14px 14px;
}

.pp-status__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pp-status__pills {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pp-status-pill {
  position: relative;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.pp-status-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pp-status-pill span {
  height: 30px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  color: #6b7280;
}

.pp-status-pill input:checked + span {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 18px rgba(228, 138, 42, 0.22);
}

@media (max-width: 620px) {
  .pp-staffreg {
    margin: -20px -22px -28px;
    padding: 18px 14px 22px;
  }

  .pp-choice-grid {
    grid-template-columns: 1fr;
  }

  .pp-card__head,
  .pp-card__body {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* PhysioPilates - Patient Profile (create/edit screen match) */
.pp-patientreg {
  margin: -20px -22px -28px;
  padding: 22px 22px 30px;
  background: #fbf8ff;
  min-height: calc(100vh - 70px);
}

.pp-patientreg--fluid {
  padding-right: 0 !important;
}

.pp-patientreg__wrap {
  max-width: 1090px;
  margin: 0 auto;
}

.pp-patientreg__wrap.container-fluid,
.pp-patientreg--fluid .pp-patientreg__wrap {
  max-width: none !important;
  margin: 0 !important;
}

.pp-patientreg__main {
  margin-top: 0;
}

.pp-patientreg__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
}

.pp-patientreg__side {
  position: sticky;
  top: 88px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pp-patient-sidecard {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 26px rgba(20, 25, 35, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 14px;
}

.pp-patient-sidecard__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pp-patientreg__main .pp-card:first-child {
  margin-top: 0;
}

.pp-patientreg__main .pp-card {
  border-radius: 16px;
}

.pp-patientreg__main .pp-card__body {
  padding-top: 18px;
}

.pp-patient-sidecard__photo {
  flex: 0 0 auto;
}

.pp-photo__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pp-photo {
  /* width: 92px;
  height: 92px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ff9b80, #e48a2a);
  display: inline-flex; */
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  position: relative;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 16px 28px rgba(20, 25, 35, 0.12);
  cursor: pointer;
  user-select: none;
}

.pp-photo:hover {
  filter: saturate(1.03);
}

.pp-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.pp-photo.has-image .pp-photo__img {
  display: block;
}

.pp-photo.has-image .pp-photo__fallback {
  display: none;
}

.pp-photo__fallback {
  font-size: 26px;
  letter-spacing: 0.02em;
}

.pp-photo__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.pp-patient-sidecard__name {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.pp-patient-sidecard__sub {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #9aa3b2;
}

.pp-patient-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 6px 4px;
}

.pp-patient-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  color: #111827;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.pp-patient-nav__item i {
  width: 18px;
  text-align: center;
  color: rgba(17, 24, 39, 0.55);
}

.pp-patient-nav__item:hover {
  background: rgba(228, 138, 42, 0.08);
}

.pp-patient-nav__item.is-active {
  background: rgba(228, 138, 42, 0.14);
  color: #111827;
}

.pp-patient-nav__item.is-active i {
  color: var(--accent);
}

.pp-patient-nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
  flex: 0 0 auto;
}

.pp-patient-nav__item.is-active .pp-patient-nav__dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(228, 138, 42, 0.18);
}

.pp-quicknote {
  background: #1f6a6a;
  border-radius: 12px;
  padding: 14px 14px;
  color: #e6fffb;
  box-shadow: 0 14px 26px rgba(20, 25, 35, 0.08);
}

.pp-quicknote__title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  color: rgba(230, 255, 251, 0.9);
  margin-bottom: 6px;
}

.pp-quicknote__text {
  font-size: 11px;
  font-weight: 600;
  color: rgba(230, 255, 251, 0.9);
  line-height: 1.5;
}

.pp-card__head--split {
  justify-content: space-between;
}

.pp-card__head-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.pp-badge {
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pp-badge--green {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.pp-select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #9aa3b2 50%),
    linear-gradient(135deg, #9aa3b2 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.pp-pillrow {
  height: 38px;
  padding: 5px;
  border-radius: 12px;
  background: #eef0f4;
  display: inline-flex;
  gap: 8px;
}

.pp-pill {
  border: none;
  background: transparent;
  height: 28px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
}

.pp-pill.is-active {
  background: #fff;
  box-shadow: 0 10px 16px rgba(20, 25, 35, 0.08);
  color: var(--accent);
}

.pp-consent {
  height: 67px;
    border-radius: 12px;
    background: #eef0f4;
    padding: 13px 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pp-consent__title {
  font-size: 11px;
  font-weight: 900;
  color: #111827;
  line-height: 1.1;
}

.pp-consent__sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #9aa3b2;
}

.pp-switch {
  width: 38px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.36);
  position: relative;
  flex: 0 0 auto;
}

.pp-switch__dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 140ms ease;
}

.pp-switch.is-on {
  background: rgba(228, 138, 42, 0.34);
}

.pp-switch.is-on .pp-switch__dot {
  transform: translateX(16px);
}

.pp-link-muted {
    color: #806b75;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    padding: 10px;
    border: 1px solid #9aa3b2;
    border-radius: 10px;
}

.pp-link-muted:hover {
  color: #111827;
}

.pp-patient-actions {
  padding-bottom: 10px;
}

@media (max-width: 980px) {
  .pp-patientreg__grid {
    grid-template-columns: 1fr;
  }

  .pp-patientreg__side {
    position: static;
  }
}

@media (max-width: 620px) {
  .pp-patientreg {
    margin: -20px -22px -28px;
    padding: 18px 14px 22px;
  }

  .pp-patientreg--fluid {
    padding-right: 0 !important;
  }
}

.staff-pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.staff-pager__btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.staff-pager__btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.staff-pager__meta {
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
}

.staff-insights {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.insight-card {
  border-radius: 22px;
  padding: 26px 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  color: #fff;
  overflow: hidden;
}

.insight-card--orange {
  background: linear-gradient(135deg, #f08a13, #ef7d00);
}

.insight-card--teal {
  background: linear-gradient(135deg, #0b5f66, #074f56);
  grid-template-columns: 1fr auto;
  align-items: center;
}

.insight-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.insight-card__title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.insight-card__text {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.insight-card__btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #b45309;
  font-weight: 900;
  text-decoration: none;
  width: fit-content;
}

.insight-card__btn:hover {
  background: #fff;
  color: #a04308;
}

.insight-ring {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(7, 79, 86, 1) 58%, transparent 59%),
    conic-gradient(rgba(255, 255, 255, 0.6) 0 7%, rgba(255, 255, 255, 0.12) 7% 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.insight-ring__inner {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
}

.dash-kicker {
  text-transform: uppercase;
  font-size: 10px;
  /* letter-spacing: 0.12em; */
  color: var(--accent);
  font-weight: 700;
}

.dash-title {
  margin: 6px 0 0;
  font-size: 27px;
  letter-spacing: normal;
  line-height: 34px;
  /* font-weight: 900; */
  color: #000000;
}

.dash-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 25, 35, 0.06);
}

.metric-card--green:hover {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.18);
}

.metric-card--red:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
}

.metric-card--yellow:hover {
  background: rgba(234, 179, 8, 0.09);
  border-color: rgba(234, 179, 8, 0.18);
}

.metric-card--blue:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.18);
}

.metric-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.metric-icon--orange {
  background: rgba(228, 138, 42, 0.16);
  color: var(--accent);
}

.metric-icon--green {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.metric-icon--blue {
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
}

.metric-icon--red {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  /* letter-spacing: 0.1em; */
  color: #9aa3b2;
  font-weight: 700;
}

.metric-name {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
}

.metric-value-row {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.metric-value {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.metric-delta {
  font-size: 11px;
  color: var(--muted);
}

.metric-delta__up {
  color: #16a34a;
  font-weight: 800;
}

.metric-split {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric-split__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aa3b2;
  font-weight: 700;
}

.metric-split__value {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
}

.dash-card {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 20px;
}

.dash-card--tight {
  box-shadow: 0 8px 18px rgba(20, 25, 35, 0.06);
}

.dash-card__header {
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.dash-card__header--small {
  padding: 14px 16px;
}

.dash-card__title {
  font-size: 13px;
  font-weight: 800;
}

.dash-card__subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.dash-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  /* justify-content: flex-end; */
}

.dash-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.dash-link:hover {
  text-decoration: underline;
}

.dash-btn {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #e48a2a;
  color: white;
  height: 34px;
  border-radius: 12px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  /* font-weight: 800; */
  text-decoration: none;
}

.dash-btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 18px rgba(228, 138, 42, 0.22);
}

.dash-btn--primary:hover {
  background: #dd7e1a;
  color: #fff;
}

.dash-btn--block {
  width: 100%;
}

.dash-table {
  width: 100%;
  overflow-x: auto;
}

.scroll-anim {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
  will-change: transform, opacity;
}

.scroll-anim.is-inview {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-anim {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.dash-table__table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.dash-table__table th,
.dash-table__table td {
  padding: 0;
  text-align: left;
}

.dash-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dash-select {
  height: 34px;
  border-radius: 12px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  outline: none;
}

.dash-select:focus {
  border-color: rgba(228, 138, 42, 0.6);
  box-shadow: 0 0 0 4px rgba(228, 138, 42, 0.12);
}

.dash-action-form {
  display: inline-flex;
  margin: 0;
}

.dash-action {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.dash-action:hover {
  color: #111827;
  box-shadow: 0 8px 16px rgba(20, 25, 35, 0.06);
}

.dash-action--danger {
  color: #ef4444;
}

.dash-action--danger:hover {
  color: #b91c1c;
}

.dash-filterbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dash-filterbar__group {
  position: relative;
  height: 36px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  padding: 0 12px 0 34px;
  min-width: 220px;
}

.dash-filterbar__group:focus-within {
  border-color: rgba(228, 138, 42, 0.32);
  box-shadow: 0 0 0 0.14rem rgba(228, 138, 42, 0.12);
}

.dash-filterbar__icon {
  position: absolute;
  left: 12px;
  color: #9aa3b2;
  font-size: 13px;
}

.dash-filterbar__caret {
  position: absolute;
  right: 10px;
  color: #9aa3b2;
  pointer-events: none;
}

.dash-filterbar__input,
.dash-filterbar__select {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
}

.dash-filterbar__select {
  appearance: none;
  padding-right: 18px;
}

.dash-table--appt .dash-table__row {
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  animation: dashRowIn 260ms ease both;
  animation-delay: calc(var(--i, 0) * 28ms);
  grid-template-columns: 44px 60px 110px 1.2fr 1fr 0.9fr 0.8fr 0.8fr 120px;
  min-width: 980px;
}

.dash-table--appt .dash-table__row:not(.dash-table__head):hover {
  background: rgba(228, 138, 42, 0.08);
  transform: translateY(-1px);
}

.dash-table--appt .dash-table__row.is-hidden {
  display: none;
}

.dash-empty {
  padding: 18px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: #fff;
}

.dash-empty__title {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.dash-empty__sub {
  margin-top: 4px;
  font-size: 12px;
  color: #8b93a7;
  font-weight: 600;
}

@keyframes dashRowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Appointment Calendar */
.cal-wrap {
  max-width: 1120px;
  margin: 0 auto;
  animation: calFadeIn 240ms ease both;
}

.cal-header {
  margin-top: 2px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cal-title {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #111827;
}

.cal-viewtabs {
    /* display: inline-flex; */
    /* align-items: center; */
    /* gap: 2px; */
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 16px rgba(20, 25, 35, 0.05);
}

.cal-tab {
  height: 34px;
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  color: #7a8194;
}

.cal-tab.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 16px rgba(20, 25, 35, 0.08);
}

.cal-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.cal-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cal-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  box-shadow: 0 14px 22px rgba(20, 25, 35, 0.06);
  padding: 16px;
}

.cal-card__title {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.cal-pulse__stack {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.cal-pulse__pill {
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
}

.cal-pulse__value {
  font-size: 14px;
  letter-spacing: 0;
  color: #111827;
}

.cal-pulse__pill--blue {
  background: #e6efff;
  color: #2f5eea;
}

.cal-pulse__pill--green {
  background: #dcfce7;
  color: #16a34a;
}

.cal-pulse__pill--gray {
  background: #f3f4f6;
  color: #6b7280;
}

.cal-focus {
  position: relative;
  border-radius: 18px;
  padding: 18px 18px 16px;
  color: #fff;
  background: linear-gradient(135deg, #e1892b, #d56f12);
  box-shadow: 0 18px 26px rgba(213, 111, 18, 0.26);
  overflow: hidden;
}

.cal-focus__kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 900;
  opacity: 0.9;
}

.cal-focus__title {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cal-focus__text {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 18rem;
}

.cal-focus__btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cal-focus__btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cal-focus__spark {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(18deg);
}

.cal-board {
  position: relative;
}

.cal-grid {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  box-shadow: 0 14px 26px rgba(20, 25, 35, 0.06);
  overflow: hidden;
}

.cal-grid__head {
  display: grid;
  grid-template-columns: 110px repeat(4, minmax(0, 1fr));
  gap: 0;
  background: #fafbff;
  border-bottom: 1px solid var(--line);
}

.cal-colhead {
  padding: 14px 12px;
}

.cal-colhead--time {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa3b2;
  font-weight: 900;
}

.cal-colhead--provider:nth-child(odd) {
  background: rgba(34, 197, 94, 0.03);
}

.cal-provider {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.cal-provider__avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: #111827;
}

.cal-provider__avatar--photo {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.cal-provider__avatar--dark {
  background: #111827;
}

.cal-provider__avatar--peach {
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.cal-provider__avatar--navy {
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.cal-provider__name {
  /* font-size: 12px; */
  font-weight: 900;
  color: #111827;
  /* line-height: 1.2; */
}

.cal-provider__role {
    /* font-size: 9px; */
    /* font-weight: 800; */
    /* letter-spacing: 0.12em; */
    /* text-transform: uppercase; */
    color: #9aa3b2;
    /* line-height: 1.2; */
}

.cal-grid__body {
  display: grid;
}

.cal-row {
  display: grid;
  grid-template-columns: 110px repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  min-height: 64px;
  animation: calRowIn 260ms ease both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

.cal-row:first-child {
  border-top: none;
}

.cal-time {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9aa3b2;
}

.cal-cell {
  padding: 10px 10px;
  background: #fff;
}

.cal-row .cal-cell:nth-child(odd) {
 background: rgb(34 197 94 / 16%);
}

.cal-slot {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px 8px 12px;
  text-align: left;
  box-shadow: 0 10px 16px rgba(20, 25, 35, 0.05);
  position: relative;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.cal-slot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: #ef4444;
}

.cal-slot__name {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  line-height: 1.1;
}

.cal-slot__sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #b91c1c;
}

.cal-slot--booked::before {
  background: #ef4444;
}

.cal-slot--focus {
  background: linear-gradient(135deg, rgba(228, 138, 42, 0.92), rgba(228, 138, 42, 0.78));
  border-color: rgba(228, 138, 42, 0.3);
  box-shadow: 0 16px 22px rgba(228, 138, 42, 0.22);
}

.cal-slot--focus::before {
  background: rgba(255, 255, 255, 0.9);
}

.cal-slot--focus .cal-slot__name,
.cal-slot--focus .cal-slot__sub {
  color: #fff;
}

.cal-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 22px rgba(20, 25, 35, 0.08);
}

.cal-slot.is-selected {
  outline: none;
  box-shadow: 0 0 0 0.16rem rgba(228, 138, 42, 0.22), 0 18px 26px rgba(20, 25, 35, 0.1);
}

.cal-break {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-top: 1px solid var(--line);
  background: #fff;
  min-height: 52px;
}

.cal-break__label {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
  color: #9aa3b2;
  background: rgba(99, 102, 241, 0.03);
}

.cal-break__line {
  display: none;
}

.cal-selected {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 210px;
  background: linear-gradient(135deg, rgba(228, 138, 42, 0.95), rgba(228, 138, 42, 0.82));
  color: #fff;
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: 0 18px 26px rgba(228, 138, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.16);
  animation: calPop 220ms ease both;
}

.cal-selected__title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.cal-selected__sub {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.95;
  line-height: 1.35;
}

@keyframes calRowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes calFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes calPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .cal-layout {
    grid-template-columns: 1fr;
  }

  .cal-side {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cal-card,
  .cal-focus {
    flex: 1;
    min-width: 240px;
  }
}

@media (max-width: 740px) {
  .cal-grid {
    overflow-x: auto;
  }

  .cal-grid__head,
  .cal-row {
    min-width: 860px;
  }
}

/* New Appointment Booking */
.book-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.book-header {
  margin-top: 2px;
}

.book-dot {
  margin: 0 6px;
  opacity: 0.7;
}

.book-title {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #111827;
}

.book-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.book-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.book-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.book-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  box-shadow: 0 14px 22px rgba(20, 25, 35, 0.06);
  padding: 16px;
}

.book-card--form {
  padding: 16px 16px 14px;
}

.book-label {
    font-size: 16px;
    font-weight: 500;

    color: #9aa3b2;
}
.book-help {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #8b93a7;
}

.book-topgrid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  align-items: end;
}

.book-search {
  margin-top: 8px;
  position: relative;
  height: 38px;
  border-radius: 12px;
  background: #f1f3f8;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  padding: 0 12px 0 34px;
}

.book-search:focus-within {
  background: #fff;
  border-color: rgba(228, 138, 42, 0.32);
  box-shadow: 0 0 0 0.14rem rgba(228, 138, 42, 0.12);
}

.book-search__icon {
  position: absolute;
  left: 12px;
  color: #9aa3b2;
  font-size: 13px;
}

.book-search__input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
}

.book-toggle {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.book-toggle__btn {
  height: 30px;
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #7a8194;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.book-toggle__btn.is-active {
  background: rgba(228, 138, 42, 0.18);
  color: #111827;
  box-shadow: 0 10px 16px rgba(20, 25, 35, 0.06);
}

.book-services {
  margin-top: 14px;
}

.book-pills {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-pill {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #4b5563;
    height: 42px;
    border-radius: 12px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* font-size: 12px; */
    font-weight: 500;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.book-pill i {
  color: #9aa3b2;
}

.book-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 18px rgba(20, 25, 35, 0.06);
}

.book-pill.is-active {
  background: rgba(228, 138, 42, 0.16);
  border-color: rgba(228, 138, 42, 0.28);
  color: #111827;
}

.book-pill.is-active i {
  color: var(--accent);
}

.book-formgrid {
  margin: 0;
}

.book-field--full {
  margin-top: 14px;
}

.book-select,
.book-input {
  margin-top: 8px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f1f3f8;
  /* font-size: 13px; */
  font-weight: 500;
  color: #4b5563;
}

.book-select:focus,
.book-input:focus {
  background: #fff;
  border-color: rgba(228, 138, 42, 0.32);
  box-shadow: 0 0 0 0.14rem rgba(228, 138, 42, 0.12);
}

.book-slots {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-slot {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  color: #6b7280;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.book-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 18px rgba(20, 25, 35, 0.06);
}

.book-slot.is-active {
  background: rgba(228, 138, 42, 0.16);
  border-color: rgba(228, 138, 42, 0.28);
  color: #111827;
}

.book-durations {
  margin-top: 10px;
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.book-duration {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  color: #6b7280;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.book-duration.is-active {
  background: rgba(228, 138, 42, 0.16);
  border-color: rgba(228, 138, 42, 0.28);
  color: #111827;
}

.book-textarea {
  margin-top: 8px;
  min-height: 86px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #f1f3f8;
  font-size: 13px;
  font-weight: 700;
}

.book-textarea:focus {
  background: #fff;
  border-color: rgba(228, 138, 42, 0.32);
  box-shadow: 0 0 0 0.14rem rgba(228, 138, 42, 0.12);
}

.book-notify {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.book-notify__opt {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.book-notify__opt:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 18px rgba(20, 25, 35, 0.06);
}

.book-notify__opt.is-active {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.22);
}

.book-notify__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.book-notify__icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.book-notify__opt.is-active .book-notify__icon {
  background: rgba(34, 197, 94, 0.16);
  color: #16a34a;
}

.book-notify__meta {
  display: grid;
  gap: 2px;
}

.book-notify__name {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
}

.book-notify__sub {
  font-size: 10px;
  font-weight: 700;
  color: #9aa3b2;
}

.book-summary {
  border-radius: 18px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, rgba(228, 138, 42, 0.98), rgba(214, 112, 18, 0.9));
  color: #fff;
  box-shadow: 0 20px 28px rgba(228, 138, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.book-summary__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-summary__icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
}

.book-summary__title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.95;
}

.book-summary__rows {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.book-summary__row {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.book-summary__row:first-child {
  padding-top: 0;
  border-top: none;
}

.book-summary__label {
    font-size: 16px;
    /* letter-spacing: 0.16em; */
    /* text-transform: uppercase; */
    font-weight: 500;
    opacity: 0.85;
}

.book-summary__value {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.book-summary__sub {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.9;
}

.book-summary__actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.book-summary__btn {
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  transition: background 140ms ease, transform 140ms ease;
}

.book-summary__btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.book-summary__btn--primary {
  background: #fff;
  color: #d56f12;
  border-color: transparent;
}

.book-summary__btn--primary:hover {
  background: #fff;
  color: #c35f08;
}

.book-policy {
  display: flex;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  background: #e9f5ff;
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.book-policy__icon {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.book-policy__title {
  font-size: 11px;
  font-weight: 900;
  color: #1e3a8a;
}

.book-policy__text {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  color: #1e40af;
}

.book-photo {
  height: 140px;
  border-radius: 18px;
  /* background:
    radial-gradient(120px 80px at 20% 30%, rgba(255, 255, 255, 0.24), transparent 60%),
    linear-gradient(135deg, #0f172a, #1d4ed8 65%, #60a5fa); */
  overflow: hidden;
  position: relative;
  box-shadow: 0 16px 24px rgba(20, 25, 35, 0.14);
}

.book-photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.book-photo__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 71, 141, 0.22);
  z-index: 1;
}

.book-photo__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.92;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.book-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 12px 22px rgba(20, 25, 35, 0.06);
  position: sticky;
  bottom: 14px;
  backdrop-filter: blur(8px);
}

@media (max-width: 980px) {
  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-side {
    order: 2;
  }
}

@media (max-width: 760px) {
  .book-topgrid {
    grid-template-columns: 1fr;
  }

  .book-notify {
    grid-template-columns: 1fr;
  }

  .book-actions {
    position: static;
  }
}

.dash-table__row {
  display: grid;
  grid-template-columns: 110px 1.2fr 1fr 0.9fr 0.8fr 0.8fr;
  gap: 10px;
  padding: 12px 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  min-width: 760px;
}

.dash-table--history .dash-table__row {
  grid-template-columns: 120px 1.3fr 1fr 1fr 0.9fr 0.8fr 96px;
  min-width: 980px;
}

.dash-table--history .dash-table__row > :last-child {
  justify-self: end;
}

.dash-branch-link {
  text-decoration: none;
}

.dash-branch-link:hover {
  text-decoration: underline;
}

.dash-table__head {
  border-top: none;
  background: #fafbff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa3b2;
  font-weight: 800;
}

.dash-time {
  font-weight: 900;
  color: var(--accent);
  font-size: 11px;
}

.dash-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-person__name {
  font-weight: 500;
  font-size: 14px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
}

.avatar--tiny {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.avatar--brown {
  background: #9c5c3c;
}
.avatar--charcoal {
  background: #111827;
}
.avatar--peach {
  background: #f6a46f;
}
.avatar--navy {
  background: #1f3a8a;
}
.avatar--slate {
  background: #475569;
}
.avatar--green {
  background: rgba(34, 197, 94, 0.2);
  color: #14532d;
}
.avatar--orange {
  background: rgba(249, 115, 22, 0.2);
  color: #9a3412;
}
.avatar--sky {
  background: rgba(14, 165, 233, 0.18);
  color: #0c4a6e;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.pill--teal {
  background: rgba(20, 184, 166, 0.16);
  color: #0f766e;
}
.pill--lime {
  background: rgba(132, 204, 22, 0.18);
  color: #3f6212;
}
.pill--green {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}
.pill--blue {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}
.pill--gray {
  background: rgba(148, 163, 184, 0.22);
  color: #334155;
}

.pill--orange {
  background: rgba(234, 179, 8, 0.18);
  color: #92400e;
}

.dash-card__footer {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.dash-muted {
  color: var(--muted);
  font-size: 11px;
}

.dash-pager {
  display: flex;
  gap: 14px;
}

.dash-pager__link {
  font-size: 11px;
  color: #6b7280;
  text-decoration: none;
  font-weight: 700;
}

.dash-pager__link:hover {
  color: var(--ink);
}

/* Billing */
.billing-wrap .dash-title {
  display: none;
}

/* Billing typography normalization (reduce heavy bold) */
.billing-wrap .billing-stat__delta,
.billing-wrap .billing-stat__label,
.billing-wrap .billing-stat__value,
.billing-wrap .billing-stat__badge,
.billing-wrap .dash-kicker,
.billing-wrap .dash-muted,
.billing-wrap .dash-pager__link {
  font-weight: 500;
  letter-spacing: 0;
}

.billing-wrap .dash-table--billing th,
.billing-wrap .dash-table--billing td,
.billing-wrap .dash-person__name,
.billing-wrap .billing-amt {
  font-weight: 500;
}

.billing-wrap .dash-table--billing td {
  vertical-align: middle;
}

.invoice-wrap .dash-title,
.invoice-wrap .dash-kicker,
.invoice-wrap .dash-muted,
.invoice-wrap .invoice-card__title,
.invoice-wrap .invoice-field__label,
.invoice-wrap .invoice-add-item,
.invoice-wrap .invoice-item__name,
.invoice-wrap .invoice-amt,
.invoice-wrap .invoice-totals__value,
.invoice-wrap .invoice-totals__grand-label,
.invoice-wrap .invoice-totals__grand-value,
.invoice-wrap .invoice-input__prefix,
.invoice-wrap .invoice-input input,
.invoice-wrap .invoice-text,
.invoice-wrap .invoice-method {
  font-weight: 500;
  letter-spacing: 0;
}

.invoice-wrap .invoice-table__head {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.invd-wrap .invd-kicker,
.invd-wrap .invd-title,
.invd-wrap .invd-badge,
.invd-wrap .invd-card__label,
.invd-wrap .invd-pname,
.invd-wrap .invd-mini,
.invd-wrap .invd-action,
.invd-wrap .invd-sectiontitle,
.invd-wrap .invd-thead,
.invd-wrap .invd-itemname,
.invd-wrap .invd-amt,
.invd-wrap .invd-tline span:last-child,
.invd-wrap .invd-ttotal,
.invd-wrap .invd-ttotal__amt,
.invd-wrap .invd-linked__title,
.invd-wrap .invd-paypill,
.invd-wrap .invd-paytext,
.invd-wrap .invd-payvalue,
.invd-wrap .invd-quote__title {
  font-weight: 500;
  letter-spacing: 0;
}

.invd-wrap .invd-thead {
  letter-spacing: 0.08em;
}

.billing-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.billing-stat {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.billing-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 25, 35, 0.06);
}

.billing-stat__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.billing-stat__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.billing-stat__icon--orange {
  background: rgba(228, 138, 42, 0.14);
  color: var(--accent);
}

.billing-stat__icon--green {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.billing-stat__icon--amber {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.billing-stat__icon--red {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.billing-stat__delta {
  font-size: 11px;
  font-weight: 800;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.billing-stat__delta--green {
  color: #16a34a;
}

.billing-stat__label {
  margin-top: 12px;
  font-size: 11px;
  color: #7b879a;
  font-weight: 700;
}

.billing-stat__value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111827;
}

.billing-stat__badge {
  height: 20px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.billing-filters-card {
  margin-top: 18px;
}

.billing-filters-header {
  padding: 14px 14px;
  border-bottom: none;
}

.billing-filterbar {
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 180px 160px 160px 140px;
  gap: 10px;
  align-items: center;
  justify-content: stretch;
}

.billing-filterbar__group {
  min-width: 0;
  height: 40px;
  border-radius: 12px;
}

.billing-filterbar__group--search {
  min-width: 0;
}

.billing-export-btn {
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.dash-table--billing .dash-table__row {
  grid-template-columns: 70px 150px minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 0.7fr) 10px;
  min-width: 0;
}

.dash-table--billing .dash-table__row > * {
  min-width: 0;
}

.dash-table--billing tbody .dash-table__row {
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  animation: dashRowIn 260ms ease both;
  animation-delay: calc(var(--i, 0) * 28ms);
}

.dash-table--billing tbody .dash-table__row:hover {
  background: rgba(59, 130, 246, 0.04);
  transform: translateY(-1px);
}

.billing-inv {
  font-weight: 900;
  color: var(--accent);
  font-size: 11px;
}

.billing-amt {
  font-weight: 900;
  color: #111827;
}

.billing-actions {
  display: flex;
  justify-content: flex-end;
}

.billing-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.billing-action-btn:hover {
  background: #f6f7fb;
  color: #6b7280;
}

.pill--red {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.billing-pager .dash-pager__link {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  color: #6b7280;
}

.billing-pager .dash-pager__link:hover {
  background: rgba(15, 23, 42, 0.04);
  color: #111827;
}

.billing-pager .dash-pager__link.is-active {
  background: rgba(228, 138, 42, 0.14);
  border-color: rgba(228, 138, 42, 0.28);
  color: var(--accent);
}

@media (max-width: 1080px) {
  .billing-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-filterbar {
    grid-template-columns: 1fr 1fr;
  }

  .billing-export-btn {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .billing-metrics {
    grid-template-columns: 1fr;
  }
}

.dash-bottom {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 16px;
  align-items: start;
}

.capacity {
  padding: 14px 16px 16px;
}

.capacity-item {
  padding: 10px 0 14px;
}

.capacity-item + .capacity-item {
  border-top: 1px solid var(--line);
}

.capacity-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.capacity-item__label {
    font-size: 13px;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.12em; */
    font-weight: 900;
    color: #9aa3b2;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: #f1f3f9;
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  border-radius: 999px;
}

.bar__fill--orange {
  background: linear-gradient(90deg, var(--accent), #f0ad63);
}

.bar__fill--green {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.capacity-item__hint {
  margin-top: 8px;
}

.staff-box {
  margin-top: 10px;
  background: #fafbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.staff-box__title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  color: #9aa3b2;
}

.staff-box__row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.staff-avatars {
  display: flex;
  align-items: center;
}

.staff-avatars .avatar {
  margin-left: -6px;
  border: 2px solid #fafbff;
}

.staff-avatars .avatar:first-child {
  margin-left: 0;
}

.clinical {
  padding: 14px 16px 18px;
}

.clinical-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.clinical-item + .clinical-item {
  border-top: 1px solid var(--line);
}

.clinical-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 4px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(228, 138, 42, 0.18);
}

.clinical-item__dot--green {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.clinical-item__title {
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 2px;
}

.clinical-head {
  display: flex;
  align-items: center;
}

.clinical-head__icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: #fafbff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa3b2;
}

.clinical-dir__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.clinical-dir__title {
  margin: 2px 0 0;
  font-size: 30px;
  line-height: 34px;
  color: #111827;
  font-weight: 900;
}

.clinical-dir__subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.clinical-dir__cta i {
  margin-right: 8px;
}

.clinical-card__filters {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.clinical-filters {
  width: 100%;
  justify-content: space-between;
}

.clinical-filter-pill {
  min-width: 0;
}

.clinical-filter-pill--branch {
  flex: 1 1 420px;
}

.clinical-filter-pill--date {
  min-width: 320px;
}

.clinical-segment .patient-segment__btn {
  font-weight: 800;
}

.clinical-segment .patient-segment__btn.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.clinical-date-control {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 34px;
}

.clinical-date-control__picker {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  padding: 0;
}

.clinical-date-control__iconbtn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 4px;
  line-height: 1;
  color: #9aa3b2;
  cursor: pointer;
}

.clinical-date-control__iconbtn:hover {
  color: #64748b;
}

.clinical-date-control__iconbtn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
}

.clinical-date-control__sep {
  color: #9aa3b2;
  font-weight: 900;
  font-size: 12px;
}

.clinical-date-control__picker::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 0;
  height: 0;
}

.clinical-date-control__icon {
  pointer-events: none;
}

.clinical-table {
  min-width: 980px;
}

.clinical-table thead th {
  background: #f1f2fb;
  border-top: none;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa3b2;
  font-weight: 800;
}

.clinical-table tbody tr {
  border-top: 1px solid var(--line);
  background: #fff;
}

.clinical-table tbody tr:nth-child(even) {
  background: #f6f7ff;
}

.clinical-table th,
.clinical-table td {
  padding: 14px 18px;
  vertical-align: middle;
}

.clinical-table__actions-head,
.clinical-table__actions {
  text-align: right;
  white-space: nowrap;
}

.clinical-datecell__date {
    font-weight: 500;
    font-size: 13px;
    color: #111827;
}

.clinical-datecell__time {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}

.clinical-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clinical-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.clinical-person__name {
    font-weight: 500;
    font-size: 14px;
    color: #111827;
}

.clinical-person__meta {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}

.clinical-pill {
  gap: 6px;
}

.clinical-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0f766e;
}

.clinical-pill__dot--lime {
  background: #3f6212;
}

.clinical-action {
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  color: var(--accent);
}

.clinical-action:hover {
  text-decoration: underline;
}

.clinical-footer {
  padding: 16px 18px;
}

.clinical-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.clinical-page {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #6b7280;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.clinical-page:hover {
  background: #f6f7fb;
  color: #111827;
}

.clinical-page.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.fab {
  position: fixed;
  right: 28px;
  bottom: 26px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent);
  border: none;
  color: #fff;
  box-shadow: 0 16px 26px rgba(228, 138, 42, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 1000;
}

.fab:hover {
  background: #dd7e1a;
}

.fab-wrap {
  position: fixed;
  right: 28px;
  bottom: 26px;
  z-index: 1000;
}

.fab-wrap .fab {
  position: static;
}

.fab-menu {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 240px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
  padding: 10px;
  display: none;
}

.fab-wrap.is-open .fab-menu {
  display: block;
}

.fab-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: #111827;
  font-weight: 800;
  font-size: 13px;
}

.fab-menu__item:hover {
  background: #f6f7fb;
  color: #111827;
}

.fab-menu__icon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: rgba(228, 138, 42, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.aligned-footer {
  padding: 16px 22px 26px;
}

.aligned-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.aligned-footer__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.aligned-footer__link {
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  text-decoration: none;
}

.aligned-footer__link:hover {
  color: var(--ink);
}

.aligned-footer__sep {
  color: #c7ccd8;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-bottom {
    grid-template-columns: 1fr;
  }

  .staff-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .aligned-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    z-index: 30;
    box-shadow: 0 18px 40px rgba(20, 25, 35, 0.14);
  }

  body.sidebar-open .aligned-sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed .aligned-sidebar {
    width: 260px;
    padding: 22px 18px;
  }

  body.sidebar-collapsed .aligned-brand__name,
  body.sidebar-collapsed .aligned-nav__link span,
  body.sidebar-collapsed .aligned-sidebar__bottom .dash-btn,
  body.sidebar-collapsed .aligned-sidebar__bottom .help-link {
    opacity: 1;
    transform: none;
    width: auto;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 25;
  }

  .topbar-icon--menu {
    display: inline-flex;
  }

  .aligned-content {
    padding: 18px 16px 24px;
  }

  .aligned-topbar {
    padding: 14px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .topbar-search {
    order: 3;
    flex-basis: 100%;
  }

  .dash-table__row {
    grid-template-columns: 90px 1.2fr 0.9fr;
    grid-auto-rows: auto;
    min-width: 0;
  }

  .dash-table__row > :nth-child(4),
  .dash-table__row > :nth-child(5),
  .dash-table__row > :nth-child(6) {
    display: none;
  }

  .dash-table--appt .dash-table__row {
    grid-template-columns: 90px 1.2fr 0.9fr;
    grid-auto-rows: auto;
    min-width: 0;
  }

  /* Appointments: bulk-select adds a checkbox column (col 1). Keep Time + Patient + Actions visible. */
  .dash-table--appt .dash-table__row > :nth-child(1),
  .dash-table--appt .dash-table__row > :nth-child(2),
  .dash-table--appt .dash-table__row > :nth-child(5),
  .dash-table--appt .dash-table__row > :nth-child(6),
  .dash-table--appt .dash-table__row > :nth-child(7),
  .dash-table--appt .dash-table__row > :nth-child(8) {
    display: none;
  }

  .dash-table--appt .dash-table__row > :nth-child(3),
  .dash-table--appt .dash-table__row > :nth-child(4),
  .dash-table--appt .dash-table__row > :nth-child(9) {
    display: block;
  }

  .staff-table {
    overflow-x: visible;
  }

  .staff-row {
    grid-template-columns: 1fr;
    min-width: 0;
    gap: 14px;
  }

  .staff-row--head {
    display: none;
  }

  .staff-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9aa3b2;
    font-weight: 900;
  }


.label_add{
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    letter-spacing: 0.22px;
    margin-top: 18px;
}


  .staff-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .dash-metrics {
    grid-template-columns: 1fr;
  }

  .dash-card__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .branch-switch__btn {
    padding: 0 10px;
  }

  .topbar-user__text {
    display: none;
  }

  .fab {
    right: 18px;
    bottom: 18px;
  }

  .staff-btn {
    width: 100%;
    justify-content: center;
  }

  .staff-metrics {
    grid-template-columns: 1fr;
  }

  .staff-filter {
    min-width: 100%;
    width: 100%;
  }

  .staff-sort {
    width: 100%;
    justify-content: space-between;
  }
}

/* Patient registry (scoped so it doesn't affect staff screens) */
.patient-card__filters {
  background: transparent;
  border-bottom: none;
  padding: 18px 18px 8px;
}

.patient-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.patient-filter-pill {
    min-width: 240px;
    height: 43px;
    border-radius: 14px;
    background: #f2f4ff;
    border: 1px solid rgba(17, 24, 39, 0.04);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.patient-filter-pill__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa3b2;
  white-space: nowrap;
}

.patient-filter-pill__control {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.patient-filter-pill__select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #111827;
  font-size: 14px;
  appearance: none;
  padding-right: 26px;
  min-width: 0;
  padding: 10px;
}

.patient-filter-pill__caret {
  position: absolute;
  right: 4px;
  color: #9aa3b2;
  pointer-events: none;
}

.patient-filter-pill--status {
  min-width: 360px;
}

.patient-segment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: #eef1ff;
  border: 1px solid rgba(17, 24, 39, 0.04);
}

.patient-segment__btn {
  border: none;
  background: transparent;
  height: 32px;
  padding: 0 16px;
  border-radius: 12px;
  color: #6b7280;
  font-size: 13px;
}

.patient-segment__btn.is-active {
  background: #fff;
  box-shadow: 0 8px 16px rgba(20, 25, 35, 0.08);
  color: var(--accent);
}

.patient-row {
  grid-template-columns: 320px 120px 220px 140px 170px 160px 90px;
  min-width: 1380px;
}

.patient-cell--actions-head {
  text-align: right;
}

.patient-row--head {
  background: #f1f2fb;
  border-top: none;
}

.patient-card .patient-row:not(.patient-row--head) {
  background: #fff;
}

.patient-card .patient-row:not(.patient-row--head):nth-child(odd) {
  background: #f6f7ff;
}

.patient-avatar {
  border-radius: 14px;
}

.patient-avatar--indigo {
  background: #d8defc;
  color: #111827;
}

.patient-avatar--sky {
  background: #bfefff;
  color: #111827;
}

.patient-avatar--slate {
  background: #e5e7eb;
  color: #4b5563;
}

.patient-avatar--lime {
  background: #b8f28e;
  color: #111827;
}

.patient-muted {
  color: #4b5563;
}

.patient-therapist {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  min-width: 0;
}

.patient-therapist__icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex: 0 0 auto;
}

.patient-therapist__icon--green {
  color: #15803d;
}

.patient-sessions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.patient-progress {
  width: 86px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.patient-progress__fill {
  height: 100%;
  border-radius: 999px;
}

.patient-progress__fill--orange {
  background: #e48a2a;
}

.patient-progress__fill--green {
  background: #2f7d32;
}

.patient-progress__fill--gray {
  background: #6b7280;
}

.patient-pill--due {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

.patient-pill--inactive {
  background: rgba(148, 163, 184, 0.22);
  color: #6b7280;
}

.patient-action-btn {
  border-radius: 12px;
  background: #f6f7ff;
}

@media (max-width: 900px) {
  .patient-row {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .patient-filter-pill,
  .patient-filter-pill--status {
    min-width: 100%;
  }
}

@media (max-width: 1150px) {
  .patient-row {
    grid-template-columns: 320px 120px 220px 140px 170px 160px 90px;
    min-width: 980px;
  }
}

@media (max-width: 1000px) {
  .patient-row--head {
    display: none;
  }

  .patient-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    min-width: 0;
    gap: 14px;
  }

  .patient-row > :nth-child(3),
  .patient-row > :nth-child(4) {
    display: none;
  }

  .patient-actions {
    justify-content: flex-start;
  }
}

.patient-actions {
  justify-content: flex-end;
  gap: 10px;
}

.patient-action-btn {
  text-decoration: none;
}

.patient-action-btn--edit {
  color: #64748b;
}

.patient-action-btn--edit:hover {
  color: #111827;
}

.patient-action-btn--delete {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.22);
}

.patient-action-btn--delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Clinical notes: keep Branch / Therapist / Date in one row (no horizontal scroll) */
.clinical-filters {
  flex-wrap: nowrap;
  overflow: visible;
  justify-content: flex-start;
  gap: 12px;
}

.clinical-filters .patient-filter-pill {
  min-width: 0;
  flex: 1 1 0;
}

.clinical-filters .clinical-filter-pill--branch {
  flex: 2 1 420px;
}

.clinical-filters .clinical-filter-pill--therapist {
  flex: 1 1 320px;
  min-width: 260px;
}

.clinical-filters .clinical-filter-pill--date {
  flex: 1 1 380px;
  min-width: 320px;
}

@media (max-width: 1100px) {
  .clinical-filters {
    flex-wrap: wrap;
  }

  .clinical-filters .patient-filter-pill {
    flex: 1 1 320px;
    min-width: 280px;
  }
}

.clinical-filter-pill--branch .patient-segment {
  width: 100%;
  position: relative;
}

.clinical-filter-pill--branch .patient-segment__btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.clinical-filter-pill--branch .patient-segment__btn::after {
  content: attr(data-full);
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translate(-50%, -100%);
  background: rgba(17, 24, 39, 0.96);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
}

.clinical-filter-pill--branch .patient-segment__btn:hover,
.clinical-filter-pill--branch .patient-segment__btn:focus-visible,
.clinical-filter-pill--branch .patient-segment__btn.is-active {
  overflow: visible;
  text-overflow: initial;
  transform: scale(1.05);
  z-index: 2;
}

.clinical-filter-pill--branch .patient-segment__btn:hover::after,
.clinical-filter-pill--branch .patient-segment__btn:focus-visible::after,
.clinical-filter-pill--branch .patient-segment__btn.is-active::after {
  opacity: 1;
}

@media (max-width: 1100px) {
  .clinical-filters {
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* =========================
   Settings (Clinic Settings)
   ========================= */
.settings-wrap {
  background: #fbf7fd;
}

.settings-hero {
  margin-bottom: 18px;
}

.settings-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(228, 138, 42, 0.9);
}

.settings-title {
  font-size: 32px;
  margin: 6px 0 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.settings-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
  overflow: hidden;
}

.settings-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
}

.settings-card__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 200;
  color: #111827;
}

.settings-card__title i {
  color: rgba(228, 138, 42, 0.9);
}

.branch-grid {
  padding: 14px 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.branch-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.settings-wrap .branch-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.10);
}

.settings-wrap .branch-card:nth-child(odd):hover {
  background: rgba(250, 204, 21, 0.14); /* light yellow */
  border-color: rgba(250, 204, 21, 0.28);
}

.settings-wrap .branch-card:nth-child(even):hover {
  background: rgba(239, 68, 68, 0.10); /* light red */
  border-color: rgba(239, 68, 68, 0.22);
}

.branch-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.badge--active {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(22, 163, 74, 1);
}

.branch-card__edit {
  border: 0;
  background: transparent;
  color: #9aa3b2;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.branch-card__edit:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #111827;
}

.branch-card__name {
  font-weight: 900;
  font-size: 16px;
  color: #111827;
}

.branch-card__meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.branch-card__meta i {
  margin-right: 6px;
  color: rgba(0, 0, 0, 0.35);
}

.branch-card__info {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.branch-info__label {
  font-size: 10px;
  font-weight: 900;
  color: rgba(107, 114, 128, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.branch-info__value {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 100;
  color: #111827;
}

.branch-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.branch-edit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.branch-edit__addr {
  grid-column: 1 / -1;
}

.branch-edit__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.settings-card--notice {
  background: #f6f1ff;
  border-color: rgba(0, 0, 0, 0.06);
}

.notice-form {
  padding: 14px 16px 16px;
}

.notice-list {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px;
}

.settings-wrap .notice-list--summary5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.settings-wrap .notice-list--summary5 .notice-item {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 12px 12px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  height: 100%;
}

.settings-wrap .notice-list--summary5 .notice-item + .notice-item {
  border-top: 0;
}

.settings-wrap .notice-list--summary5 .notice-pill {
  margin-top: auto;
  min-width: 0;
  width: 100%;
  justify-content: flex-start;
}

.settings-wrap .notice-list--summary5 .notice-item > div {
  width: 100%;
  min-width: 0;
}

.settings-wrap .notice-list--summary5 .notice-item__title,
.settings-wrap .notice-list--summary5 .notice-item__sub {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.settings-wrap .notice-list--summary5 .notice-item {
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.settings-wrap .notice-list--summary5 .notice-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 25, 35, 0.06);
}

/* Hover colors (Summary cards) */
.settings-wrap .notice-list--summary5 .notice-item:nth-child(1):hover {
  background: rgba(59, 130, 246, 0.10); /* light blue */
  border-color: rgba(59, 130, 246, 0.22);
}

.settings-wrap .notice-list--summary5 .notice-item:nth-child(2):hover {
  background: rgba(34, 197, 94, 0.10); /* light green */
  border-color: rgba(34, 197, 94, 0.22);
}

.settings-wrap .notice-list--summary5 .notice-item:nth-child(3):hover {
  background: rgba(250, 204, 21, 0.14); /* light yellow */
  border-color: rgba(250, 204, 21, 0.28);
}

.settings-wrap .notice-list--summary5 .notice-item:nth-child(4):hover {
  background: rgba(239, 68, 68, 0.10); /* light red */
  border-color: rgba(239, 68, 68, 0.22);
}

.settings-wrap .notice-list--summary5 .notice-item:nth-child(5):hover {
  background: rgba(245, 158, 11, 0.12); /* light amber */
  border-color: rgba(245, 158, 11, 0.26);
}

@media (max-width: 1200px) {
  .settings-wrap .notice-list--summary5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .settings-wrap .notice-list--summary5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .settings-wrap .notice-list--summary5 { grid-template-columns: 1fr; }
}

.notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 6px;
}

.notice-item + .notice-item {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.notice-item__title {
  font-weight: 500;
  font-size: 15px;
  color: #111827;
}

.notice-item__sub {
  font-size: 11px;
  color: #8b93a7;
  margin-top: 2px;
  font-weight: 700;
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: rgba(37, 99, 235, 1);
  min-width: 86px;
  justify-content: flex-end;
}

.notice-pill--warn {
  background: rgba(239, 68, 68, 0.12);
  color: rgba(220, 38, 38, 1);
}

.notice-pill--ok {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(22, 163, 74, 1);
}

.notice-pill__input {
  width: 48px;
  border: 0;
  outline: none;
  background: transparent;
  font-weight: 900;
  text-align: right;
  color: inherit;
}

.notice-gateway {
  margin-top: 14px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px;
}

.notice-gateway__kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(228, 138, 42, 0.9);
  margin-bottom: 10px;
}

.notice-gateway__opts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gateway-chip {
  position: relative;
  display: inline-flex;
}

.gateway-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gateway-chip__ui {
  height: 34px;
  border-radius: 12px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  cursor: pointer;
  min-width: 98px;
}

.gateway-chip input:checked + .gateway-chip__ui {
  border-color: rgba(228, 138, 42, 0.4);
  box-shadow: 0 12px 20px rgba(228, 138, 42, 0.14);
}

.notice-gateway__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.settings-card--matrix {
  margin-top: 18px;
}

.matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.matrix-title {
  font-size: 16px;
  font-weight: 900;
  color: #111827;
}

.matrix-tablewrap {
  padding: 0 16px 12px;
  overflow: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.matrix-table thead th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 900;
  color: #6b7280;
  padding: 12px 10px;
  background: #f3f4f6;
}

.matrix-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 12px;
}

.matrix-module {
  font-weight: 900;
  color: #111827;
}

.matrix-cell {
  text-align: center;
}

.matrix-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 24px;
  cursor: pointer;
}

.matrix-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.matrix-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(156, 163, 175, 0.55);
  display: inline-block;
}

.matrix-toggle input:checked + .matrix-dot {
  border-color: rgba(22, 163, 74, 1);
  background: rgba(22, 163, 74, 1);
  box-shadow: 0 10px 16px rgba(22, 163, 74, 0.18);
  position: relative;
}

.matrix-toggle input:checked + .matrix-dot::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.matrix-actions {
  padding: 0 16px 16px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .branch-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Finance
   ========================= */
.finance-wrap {
  padding-bottom: 24px;
}

.finance-header {
  align-items: center;
}

.finance-filter-card {
  margin-bottom: 18px;
}

.finance-filterbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.finance-card {
  margin-bottom: 18px;
}

.finance-streams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.finance-stream {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.finance-stream__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  flex: 0 0 auto;
}

.finance-stream:nth-child(2) .finance-stream__icon {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.finance-stream:nth-child(3) .finance-stream__icon {
  background: rgba(228, 138, 42, 0.14);
  color: #d97706;
}

.finance-stream:nth-child(4) .finance-stream__icon {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

.finance-stream__label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #6b7280;
  text-transform: uppercase;
}

.finance-stream__value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  color: #111827;
}

.finance-eod {
  padding: 16px;
}

.finance-eod__row,
.finance-eod__total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #6b7280;
  font-size: 12px;
}

.finance-eod__row strong,
.finance-eod__total strong {
  color: #111827;
  text-align: right;
}

.finance-eod__total {
  border-bottom: 0;
  margin-top: 4px;
  padding: 13px 12px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.10);
  color: #15803d;
  font-weight: 900;
}

.finance-liability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: rgba(228, 138, 42, 0.12);
  color: #d97706;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
}

.finance-liability strong {
  color: #111827;
}

.finance-tablewrap {
  padding-bottom: 16px;
}

.finance-table td,
.finance-table th {
  white-space: nowrap;
}

.finance-amount--credit {
  color: #15803d;
  font-weight: 900;
}

.finance-amount--debit {
  color: #b42318;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .finance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .finance-metrics,
  .finance-streams {
    grid-template-columns: 1fr;
  }

  .finance-header {
    align-items: flex-start;
  }

  .finance-filterbar .dash-filterbar__group {
    width: 100%;
  }
}
