/* Professional finishing pass: search, receipts and workspace settings. */
html {
  scrollbar-gutter: stable;
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog {
  overscroll-behavior: contain;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
.topbar {
  position: relative;
  z-index: 35;
}
.searchbox {
  position: relative;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.searchbox input {
  width: 210px;
  font-size: 14px;
}
.global-search-results {
  position: absolute;
  top: calc(100% + 11px);
  left: 0;
  width: 390px;
  max-height: 490px;
  overflow: auto;
  border: 1px solid #d7e8eb;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 18px 60px #0b203825;
  z-index: 70;
  padding: 8px;
}
.global-search-results[hidden] {
  display: none;
}
.search-result-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 9px 12px;
  font-size: 14px;
  color: #506675;
  border-bottom: 1px solid #e8f0f2;
}
.search-result-heading button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #f4f8f9;
  color: #506675;
  font-size: 17px;
}
.global-search-results section {
  padding: 7px 0 3px;
  border-bottom: 1px solid #edf2f4;
}
.global-search-results section h3 {
  font-size: 12px;
  color: #506675;
  letter-spacing: 0.4px;
  margin: 6px 10px 8px;
  font-weight: 400;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  padding: 10px 9px;
  width: 100%;
  text-align: right;
  background: #fff;
  transition: background 0.15s;
}
.search-result:hover,
.search-result:focus {
  background: #edf8f4;
  outline: 0;
}
.search-result > span {
  height: 31px;
  width: 31px;
  border-radius: 9px;
  background: #eff7f8;
  border: 1px solid #e0ecee;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.search-result > span svg {
  height: 15px;
  width: 15px;
  color: #087568;
}
.search-result > div {
  min-width: 0;
}
.search-result b {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #2c5269;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result small {
  display: block;
  font-size: 12px;
  color: #506675;
  margin-top: 5px;
  line-height: 1.6;
}
.search-result small small {
  display: inline;
  font-size: 12px;
}
.search-result i {
  font-size: 14px;
  font-style: normal;
  color: #506675;
  margin-right: auto;
  flex-shrink: 0;
}
.search-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #506675;
  padding: 12px 10px 5px;
}
.search-empty {
  padding: 30px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.search-empty > svg {
  height: 28px;
  width: 28px;
  color: #506675;
  stroke-width: 1.2;
}
.search-empty b {
  font-size: 14px;
  font-weight: 500;
  color: #506675;
}
.search-empty span {
  font-size: 12px;
  color: #506675;
}
.notification-count {
  height: 14px !important;
  width: auto !important;
  min-width: 14px !important;
  right: 0 !important;
  top: 0 !important;
  border: 2px solid #fff;
  border-radius: 50px;
  font: 600 12px Manrope;
  display: grid;
  place-items: center;
  color: #0b2038;
  padding: 0 2px;
}
.notification-count[hidden] {
  display: none;
}
.receipt-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 12px;
}
.receipt-open svg {
  height: 12px;
  width: 12px;
}
.receipt-sheet {
  border: 1px solid #dbe9eb;
  border-radius: 13px;
  padding: 28px;
  background: white;
  position: relative;
  overflow: hidden;
}
.receipt-sheet:before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #0b2038, #0e9f8e, #d0f0eb);
}
.receipt-brand {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid #e1ecef;
  gap: 20px;
}
.receipt-brand .logo {
  font-size: 25px;
}
.receipt-brand .brandmark {
  height: 31px;
  width: 28px;
}
.receipt-brand h3 {
  font-size: 15px;
  margin: 13px 0 7px;
}
.receipt-brand p {
  font-size: 12px;
  line-height: 1.8;
  color: #506675;
  margin: 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.receipt-stamp {
  border: 1px solid #c9e7dc;
  background: #ecf8f1;
  color: #087568;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 14px;
  border-radius: 50px;
  margin-top: 5px;
  white-space: nowrap;
}
.receipt-stamp svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}
.receipt-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 0 16px;
  gap: 20px;
}
.receipt-heading > div > span {
  font-size: 14px;
  color: #506675;
  display: block;
}
.receipt-heading b {
  display: block;
  font: 12px Manrope;
  color: #506675;
  margin-top: 7px;
}
.receipt-heading > span {
  font: 14px Manrope;
  color: #506675;
}
.receipt-to {
  padding: 0 0 22px;
}
.receipt-to > span {
  font-size: 12px;
  color: #506675;
}
.receipt-to h2 {
  font-size: 22px;
  margin: 7px 0 !important;
  color: #1e465d;
}
.receipt-to p {
  font-size: 14px;
  color: #506675;
  margin: 6px 0 0;
}
.receipt-amount {
  background: linear-gradient(110deg, #eff8f7, #e0f3ed);
  border: 1px solid #d1e9e1;
  border-radius: 10px;
  padding: 19px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.receipt-amount > span {
  font-size: 14px;
  color: #087568;
}
.receipt-amount strong {
  font-size: 33px;
  line-height: 1.5;
  font-weight: 500;
  color: #145b4d;
  letter-spacing: -1px;
}
.receipt-amount strong small {
  font-size: 15px;
  margin-right: 3px;
}
.receipt-details {
  margin: 19px 0 0;
}
.receipt-details > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #edf2f4;
  padding: 13px 0;
  font-size: 14px;
}
.receipt-details dt {
  color: #506675;
}
.receipt-details dd {
  margin: 0;
  color: #446f81;
  text-align: end;
}
.receipt-details dd small {
  font-size: 12px;
}
.receipt-notes {
  font-size: 12px;
  color: #506675;
  line-height: 1.9;
  white-space: pre-wrap;
  margin: 18px 0 0;
  padding: 12px;
  background: #f6fafb;
  border-radius: 7px;
}
.receipt-footer {
  display: block;
  border-top: 1px dashed #d6e7eb;
  padding: 17px 0 0;
  margin-top: 23px;
  font-size: 12px;
  line-height: 1.9;
  color: #506675;
  text-align: center;
}
.receipt-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.receipt-actions .btn {
  font-size: 14px;
  padding: 12px 19px;
  gap: 9px;
}
.receipt-actions .btn svg {
  width: 15px;
  height: 15px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}
.clinic-settings-panel,
.backup-panel {
  padding: 25px;
}
.clinic-settings-panel .panel-title,
.backup-panel .panel-title {
  margin-bottom: 26px;
}
.clinic-settings-panel .panel-title > svg,
.backup-panel .panel-title > svg {
  width: 23px;
  height: 23px;
  stroke: #9fc5ca;
  stroke-width: 1.2;
}
.clinic-settings-panel form > label {
  font-size: 14px;
  margin-bottom: 20px;
}
.clinic-settings-panel input,
.clinic-settings-panel textarea {
  font-size: 15px;
  background: #f8fbfc;
  border-color: #dce9ec;
}
.clinic-settings-panel form > .btn {
  margin-top: 22px;
  font-size: 14px;
  padding: 12px 17px;
  gap: 9px;
  width: 100%;
}
.clinic-settings-panel form > .btn svg {
  height: 15px;
  width: 15px;
}
.settings-readonly {
  display: flex;
  gap: 30px;
  border: 1px solid #e2edef;
  border-radius: 9px;
  padding: 15px 17px;
  background: #f6fafb;
}
.settings-readonly > span {
  font-size: 12px;
  color: #506675;
  flex: 1;
}
.settings-readonly b {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-top: 7px;
  color: #506675;
}
.settings-side {
  display: grid;
  gap: 20px;
}
.backup-download {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #d3e9e1;
  border-radius: 10px;
  background: #f0f9f5;
  padding: 19px 17px;
  text-align: right;
  transition: 0.2s;
}
.backup-download:hover {
  background: #e4f5ed;
  border-color: #afd9cb;
}
.backup-download > span {
  height: 43px;
  width: 43px;
  border: 1px solid #cde6dc;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.backup-download > span svg {
  width: 21px;
  height: 21px;
  stroke: #46a388;
  stroke-width: 1.3;
}
.backup-download b {
  display: block;
  font-size: 15px;
  color: #087568;
  font-weight: 500;
}
.backup-download small {
  display: block;
  font-size: 12px;
  color: #506675;
  margin-top: 6px;
}
.backup-download > svg {
  width: 16px;
  height: 16px;
  color: #506675;
  margin-right: auto;
  flex-shrink: 0;
}
.restore-section {
  margin-top: 22px;
  border-top: 1px solid #e4eef0;
  padding-top: 22px;
}
.restore-file-label {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #b9d5dd;
  border-radius: 9px;
  padding: 15px 13px;
  position: relative;
  color: #506675;
  font-size: 14px;
  cursor: pointer;
  background: #f8fbfc;
}
.restore-file-label:hover {
  background: #edf6f8;
}
.restore-file-label svg {
  width: 15px;
  height: 15px;
}
.restore-file-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.restore-file-label:focus-within {
  outline: 2px solid #16c4b0;
  outline-offset: 3px;
}
.restore-hint {
  font-size: 12px;
  color: #506675;
  line-height: 1.9;
  margin: 12px 0 0;
}
.restore-section .form-error {
  font-size: 14px;
  margin-top: 15px;
}
#restore-preview {
  padding: 18px;
  background: #eff8f4;
  border: 1px solid #cde5db;
  border-radius: 9px;
  margin-top: 17px;
}
#restore-preview > strong {
  font-size: 14px;
  font-weight: 500;
  color: #087568;
}
.restore-counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 15px;
}
.restore-counts > span {
  padding: 8px;
  background: #fff8;
  border: 1px solid #d4e8df;
  border-radius: 5px;
  font-size: 12px;
  color: #087568;
  text-align: center;
}
#restore-preview > p {
  font-size: 12px;
  color: #506675;
  line-height: 1.9;
  margin: 13px 0;
}
#restore-preview .btn {
  font-size: 14px;
  padding: 10px 13px;
  width: 100%;
}
.restore-last {
  font-size: 12px;
  color: #506675;
  background: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 19px auto 0;
  padding: 8px 0;
  border-bottom: 1px solid #d9e8ed;
}
.restore-last svg {
  height: 13px;
  width: 13px;
}
.workspace-status-card {
  display: flex;
  gap: 15px;
  background: linear-gradient(125deg, #0e2b43, #163e53);
  border: 1px solid #204c5f;
  border-radius: 13px;
  padding: 22px;
}
.workspace-status-icon {
  height: 38px;
  width: 38px;
  border: 1px solid #3b7280;
  background: #1a4a5b;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.workspace-status-icon svg {
  height: 20px;
  width: 20px;
  stroke: #8dcdc4;
  stroke-width: 1.3;
}
.workspace-status-card b {
  color: #d7ebed;
  font-size: 15px;
  font-weight: 500;
}
.workspace-status-card p {
  color: #506675;
  font-size: 14px;
  line-height: 1.9;
  margin: 9px 0 11px;
}
.workspace-status-card > div > span {
  font-size: 12px;
  color: #506675;
}
.notification-list {
  display: grid;
  gap: 8px;
}
.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #e0ecef;
  background: #f9fcfd;
  border-radius: 9px;
  width: 100%;
  text-align: right;
}
.notification-item:hover {
  background: #edf8f5;
  border-color: #bbdfd3;
}
.notification-item > .iconbox {
  height: 34px;
  width: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}
.notification-item > .iconbox svg {
  width: 17px;
  height: 17px;
}
.notification-item b {
  font-size: 15px;
  font-weight: 500;
  display: block;
}
.notification-item small {
  font-size: 12px;
  color: #506675;
  display: block;
  margin-top: 5px;
}
.notification-item > .status {
  margin-right: auto;
}
.notification-section-title {
  font-size: 14px;
  color: #506675;
  margin: 24px 0 13px;
}
.notification-debt {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e3edf0;
  padding: 12px 0;
}
.notification-debt > a {
  font-size: 14px;
  color: #506675;
}
.notification-debt > b {
  margin-right: auto;
  font-size: 15px;
  font-weight: 500;
  color: #1f6a5b;
}
.notification-debt > b small {
  font-size: 12px;
}
.appointment-history .action-history {
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.8;
}
.appointment-history .action-history > span {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #9ec9be;
  flex-shrink: 0;
}
.appointment-history .action-history small {
  margin: 0 0 0 auto;
  font-size: 12px;
  color: #506675;
}
@media (max-width: 1100px) {
  .searchbox input {
    width: 180px;
  }
  .settings-layout {
    gap: 17px;
    grid-template-columns: 0.9fr 1.1fr;
  }
  .clinic-settings-panel,
  .backup-panel {
    padding: 21px;
  }
  .backup-download {
    padding: 16px 13px;
  }
  .backup-download b {
    font-size: 14px;
  }
  .backup-download small {
    font-size: 12px;
  }
  .backup-download > span {
    width: 35px;
    height: 35px;
    border-radius: 10px;
  }
  .workspace-status-card {
    padding: 20px;
  }
  .workspace-status-card p {
    font-size: 12px;
  }
}
@media (max-width: 850px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-side {
    gap: 17px;
  }
  .clinic-settings-panel,
  .backup-panel {
    padding: 23px;
  }
  .backup-download small {
    font-size: 12px;
  }
  .backup-download b {
    font-size: 15px;
  }
}
@media (max-width: 760px) {
  .topbar {
    z-index: 35;
  }
  .searchbox input {
    width: 145px;
    font-size: 12px;
  }
  .global-search-results {
    position: fixed;
    top: 66px;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: min(65vh, 480px);
    border-radius: 12px;
  }
  .search-result b {
    font-size: 14px;
  }
  .search-result small {
    font-size: 12px;
  }
  .search-result {
    padding: 12px 10px;
  }
  .search-result > span {
    height: 32px;
    width: 32px;
  }
  .search-result-heading {
    font-size: 14px;
    padding: 9px 10px 12px;
  }
  .search-result-heading button {
    height: 25px;
    width: 25px;
  }
  .search-footer {
    font-size: 12px;
    padding-bottom: 7px;
  }
  .search-empty > span {
    font-size: 12px;
  }
  .receipt-sheet {
    padding: 23px 20px;
    border-radius: 10px;
  }
  .receipt-brand .logo {
    font-size: 23px;
  }
  .receipt-brand .brandmark {
    height: 29px;
    width: 25px;
  }
  .receipt-brand h3 {
    font-size: 14px;
  }
  .receipt-brand p {
    font-size: 12px;
  }
  .receipt-stamp {
    font-size: 12px;
    padding: 5px 9px;
  }
  .receipt-heading {
    padding-top: 20px;
  }
  .receipt-heading > div > span {
    font-size: 14px;
  }
  .receipt-heading b {
    font-size: 12px;
  }
  .receipt-heading > span {
    font-size: 12px;
  }
  .receipt-to h2 {
    font-size: 21px;
  }
  .receipt-amount {
    padding: 17px 15px;
    gap: 12px;
  }
  .receipt-amount > span {
    font-size: 14px;
  }
  .receipt-amount strong {
    font-size: 28px;
  }
  .receipt-amount strong small {
    font-size: 15px;
  }
  .receipt-details > div {
    font-size: 12px;
    padding: 13px 0;
  }
  .receipt-notes {
    font-size: 12px;
  }
  .receipt-footer {
    font-size: 12px;
  }
  .receipt-actions .btn {
    font-size: 14px;
    width: 100%;
    padding: 12px;
  }
  .clinic-settings-panel,
  .backup-panel {
    padding: 21px;
  }
  .clinic-settings-panel .panel-title,
  .backup-panel .panel-title {
    margin-bottom: 23px;
  }
  .clinic-settings-panel .panel-title p,
  .backup-panel .panel-title p {
    font-size: 12px;
    line-height: 1.9;
  }
  .clinic-settings-panel input,
  .clinic-settings-panel textarea {
    font-size: 14px;
  }
  .clinic-settings-panel form > .btn {
    font-size: 14px;
  }
  .backup-download {
    padding: 17px 14px;
  }
  .backup-download b {
    font-size: 14px;
  }
  .backup-download small {
    font-size: 12px;
    line-height: 1.8;
  }
  .restore-file-label {
    font-size: 14px;
    padding: 16px 12px;
  }
  .restore-hint {
    font-size: 12px;
  }
  .restore-last {
    font-size: 12px;
  }
  .workspace-status-card {
    padding: 20px;
    gap: 12px;
  }
  .workspace-status-card b {
    font-size: 14px;
  }
  .workspace-status-card p {
    font-size: 12px;
  }
  .restore-counts > span {
    font-size: 12px;
  }
  #restore-preview .btn {
    font-size: 12px;
  }
  .notification-item b {
    font-size: 14px;
  }
  .notification-item small {
    font-size: 12px;
  }
  .notification-item {
    padding: 12px;
    gap: 9px;
  }
  .notification-item .status {
    font-size: 12px;
    padding: 4px 6px;
  }
  .notification-debt > a {
    font-size: 14px;
  }
  .notification-debt > b {
    font-size: 15px;
  }
  .appointment-history .action-history {
    flex-wrap: wrap;
    gap: 7px;
  }
  .appointment-history .action-history small {
    font-size: 12px;
  }
}
@media (max-width: 380px) {
  .searchbox input {
    width: 119px;
  }
  .receipt-sheet {
    padding: 21px 16px;
  }
  .receipt-amount strong {
    font-size: 24px;
  }
  .receipt-heading {
    gap: 12px;
  }
  .settings-readonly {
    gap: 15px;
  }
  .backup-download {
    gap: 10px;
  }
}
@media print {
  body:has(#record-dialog.receipt-dialog[open]) {
    background: white !important;
    overflow: visible !important;
  }
  body:has(#record-dialog.receipt-dialog[open]) > #app,
  body:has(#record-dialog.receipt-dialog[open]) > #toast,
  body:has(#record-dialog.receipt-dialog[open]) > #booking {
    display: none !important;
  }
  #record-dialog.receipt-dialog[open] {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    max-width: none;
    width: 100%;
    max-height: none;
    height: auto;
    overflow: visible;
    padding: 0;
    margin: 0;
    background: white;
    color: #0b2038;
  }
  #record-dialog.receipt-dialog::backdrop {
    background: white;
  }
  #record-dialog.receipt-dialog .close,
  #record-dialog.receipt-dialog form > .eyebrow,
  #record-dialog.receipt-dialog form > h2,
  #record-dialog.receipt-dialog .form-error,
  #record-dialog.receipt-dialog .receipt-actions {
    display: none !important;
  }
  .receipt-sheet {
    border: 0;
    border-radius: 0;
    padding: 20px;
    max-width: 720px;
    margin: auto;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .receipt-sheet:before {
    height: 4px;
  }
  .receipt-to h2 {
    display: block !important;
  }
  .receipt-brand {
    break-inside: avoid;
  }
  .receipt-details > div {
    break-inside: avoid;
  }
  .receipt-footer {
    break-inside: avoid;
  }
}

.sidebar {
  z-index: 50;
}
.sidebar-backdrop {
  display: none;
}
.sidebar-dismiss {
  display: none;
}
@media (max-width: 760px) {
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: #0b20384f;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    backdrop-filter: blur(2px);
  }
  .dashboard:has(.sidebar.open) .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar-dismiss {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    position: absolute;
    left: 11px;
    top: 15px;
    font-size: 21px;
    background: #eef7f5;
    border: 1px solid #d8eae4;
    color: #506675;
    border-radius: 6px;
    z-index: 2;
  }
  body:has(.sidebar.open) {
    overflow: hidden;
  }
}

.plans-empty-state {
  background: #fff;
  border: 1px dashed #c6dfe2;
  border-radius: 15px;
  padding: 55px 24px;
  text-align: center;
}
.plans-empty-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  background: #edf8f5;
  border: 1px solid #d6eae4;
  border-radius: 20px;
  margin: 0 auto 20px;
  transform: rotate(-6deg);
}
.plans-empty-icon svg {
  width: 29px;
  height: 29px;
  stroke: #64ac9c;
  stroke-width: 1.3;
}
.plans-empty-state h3 {
  font-size: 20px;
  margin: 0 0 10px;
}
.plans-empty-state p {
  font-size: 15px;
  color: #506675;
  margin-bottom: 24px;
}
.plans-empty-state .btn {
  font-size: 14px;
  padding: 12px 19px;
  gap: 8px;
}
.plans-empty-state .btn svg {
  width: 15px;
  height: 15px;
}
@media (max-width: 760px) {
  .plans-empty-state {
    padding: 40px 20px;
  }
  .plans-empty-state h3 {
    font-size: 18px;
  }
  .plans-empty-state p {
    font-size: 14px;
  }
}
