:root {
  color-scheme: light;
  --background: #f5f7f9;
  --foreground: #183044;
  --muted: #708193;
  --border: #e5ebee;
  --teal: #06796f;
  --teal-dark: #06645c;
  --sidebar: #112c35;
  --clinic-font: "Google Sans", Roboto, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--clinic-font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.certificate-font-control select { min-height: 29px; padding: 0 8px; color: #425360; background: #fff; border: 1px solid #e2e7e9; border-radius: 5px; font-family: var(--clinic-font); font-size: 11px; }
.certificate-size-control select { min-width: 56px; }
[hidden] { display: none !important; }
button { cursor: pointer; }
.clinic-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 246px; background: var(--sidebar); color: #eef7f7; display: flex; flex-direction: column; z-index: 4; }
.brand { height: 90px; display: flex; align-items: center; gap: 12px; padding: 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark,.loading-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 23px; font-weight: 750; background: #11a498; color: white; }
.brand strong { display: block; font-size: 15px; letter-spacing: .12em; }
.brand span { display: block; font-size: 10px; color: #a8bdc1; margin-top: 3px; }
.sidebar-section-label { padding: 21px 19px 10px; font-size: 10px; letter-spacing: .11em; color: #85a4aa; font-weight: 700; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 11px; flex: 1; overflow: auto; }
.nav-item { min-height: 39px; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; padding: 0 11px; border-radius: 7px; text-align: left; background: transparent; color: #c5d4d6; font-size: 12.5px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-active { color: #fff; background: #088578; }
.nav-active:hover { background: #06766c; }
.nav-item i { margin-left: auto; padding: 2px 6px; border-radius: 20px; background: rgba(255,255,255,.15); font-size: 10px; font-style: normal; }
.sidebar-account { padding: 15px; border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; gap: 10px; }
.sidebar-account strong,.sidebar-account span { display: block; }
.sidebar-account strong { font-size: 12px; }.sidebar-account span { color: #9eb2b8; font-size: 11px; margin-top: 3px; }
.avatar { width: 37px; height: 37px; flex: 0 0 37px; display: grid; place-items: center; background: #e4f5f2; color: var(--teal); border-radius: 50%; font-weight: 700; }.avatar-light { background: rgba(255,255,255,.12); color: #fff; }
.workspace { margin-left: 246px; min-height: 100vh; }.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 30px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 3; }
.global-search,.picker-input { display: flex; align-items: center; gap: 9px; color: #728293; }.global-search { max-width: 460px; width: 100%; }.global-search input,.picker-input input { width: 100%; border: 0; outline: 0; color: var(--foreground); background: transparent; }.global-search input::placeholder,.picker-input input::placeholder { color: #91a0ad; }.topbar-actions { display: flex; align-items: center; gap: 13px; }.date-chip { color: #697986; font-size: 12px; white-space: nowrap; }
.topbar { padding-right: 145px; }
.app-logout { position: fixed; top: 16px; right: 30px; z-index: 5; color: #963f4a; background: #fff7f8; border-color: #efd5d9; box-shadow: 0 3px 12px rgba(84,35,43,.08); }
.app-logout:hover { color: #7d303a; background: #ffedef; border-color: #e9c6cc; }
.page { max-width: 1450px; padding: 32px 34px 55px; margin: 0 auto; }.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 23px; }.eyebrow { color: #718291; font-size: 10px; font-weight: 700; letter-spacing: .105em; }.page-heading h1 { font-size: clamp(21px,3vw,29px); letter-spacing: -.035em; margin: 7px 0 5px; }.page-heading p,.surface-head p,.modal-head p,.chart-detail > p { color: var(--muted); margin: 4px 0 0; line-height: 1.5; font-size: 12px; }
.button { min-height: 37px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-size: 12px; font-weight: 650; white-space: nowrap; }.button-primary { color: #fff; background: var(--teal); }.button-primary:hover { background: var(--teal-dark); }.button-soft { color: #425466; background: #fff; border-color: #e1e8ed; }.button-soft:hover { background: #f4f8fa; }.button-full { width: 100%; }.button-link { border: 0; background: none; color: var(--teal); font-size: 12px; font-weight: 650; padding: 4px; }.icon-button { width: 34px; height: 34px; border: 1px solid #e4ebee; border-radius: 7px; display: inline-grid; place-items: center; background: #fff; color: #60717f; }.whatsapp-button { color: #138c54; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 21px; }.stat-card { min-height: 146px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }.stat-card > span,.stat-card > strong,.stat-card > small { display: block; }.stat-card > span { color: #687987; font-size: 12px; }.stat-card > strong { font-size: 25px; letter-spacing: -.035em; margin-top: 8px; }.stat-card > small { color: #7e8d98; font-size: 11px; margin-top: 4px; }.stat-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; margin-bottom: 12px; }.stat-teal { background: #e1f5f2; color: #087e71; }.stat-blue { background: #e7f0fc; color: #3565a9; }.stat-green { background: #e6f5e8; color: #278444; }.stat-amber { background: #fff0dc; color: #af721a; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .9fr; gap: 17px; margin-bottom: 20px; }.surface { background: #fff; border: 1px solid var(--border); border-radius: 10px; min-width: 0; overflow: hidden; margin-bottom: 18px; }.dashboard-grid .surface { margin-bottom: 0; }.surface-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #edf0f2; }.surface-head h2,.chart-detail h2 { font-size: 14px; margin: 0; }.surface-head p { font-size: 11px; }
.quick-grid { padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }.quick-grid button { text-align: left; background: #fff; padding: 15px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--foreground); }.quick-grid button:hover { background: #f3faf8; border-color: #e1efec; }.quick-grid button svg { color: var(--teal); }.quick-grid button strong,.quick-grid button span { display: block; }.quick-grid button strong { margin-top: 8px; font-size: 11px; }.quick-grid button span { color: #788793; font-size: 10px; margin-top: 3px; }
.schedule-list { padding: 5px 16px; }.schedule-item { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px solid #f0f2f3; }.schedule-item:last-child { border: 0; }.appointment-time { color: var(--teal); font-weight: 650; font-size: 11px; }.schedule-treatment { margin-left: auto; color: #6e7d89; font-size: 11px; }.person-cell { display: grid; gap: 3px; }.person-cell strong { font-size: 12px; }.person-cell span,.table-wrap small { color: #7d8a95; font-size: 11px; }.compact-patients { padding: 4px 15px; }.compact-patient { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid #eef1f2; }.compact-patient:last-child { border: 0; }.compact-patient .person-cell { flex: 1; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 30px; font-size: 10px; font-weight: 650; white-space: nowrap; }.badge-neutral { background: #f1f4f6; color: #5e6b76; }.badge-green { background: #e8f6ed; color: #248747; }.badge-red { background: #fdeeee; color: #bb4750; }.badge-amber { background: #fff3df; color: #ad711a; }.badge-blue { background: #e9f1fd; color: #426bae; }.badge-teal { background: #e3f5f1; color: #0c7b6f; }
.table-wrap { overflow-x: auto; }.table-wrap table { width: 100%; border-collapse: collapse; }.table-wrap th { padding: 12px 13px; text-align: left; color: #687784; background: #f9fafb; font-weight: 650; font-size: 10px; text-transform: uppercase; letter-spacing: .045em; white-space: nowrap; }.table-wrap td { padding: 12px 13px; border-top: 1px solid #edf0f2; font-size: 12px; color: #324656; }.table-wrap tbody tr:hover { background: #fbfdfc; }.row-actions { display: flex; align-items: center; gap: 7px; }.address-cell { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.status-button { border: 0; background: transparent; padding: 0; }
.empty { min-height: 260px; padding: 32px 18px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 13px; background: #e9f5f3; color: var(--teal); }.empty h3 { margin: 13px 0 5px; font-size: 14px; }.empty p { max-width: 330px; color: #71808c; line-height: 1.5; font-size: 11px; margin: 0 0 15px; }
.chart-layout { display: grid; grid-template-columns: 1fr 270px; gap: 17px; align-items: start; }.chart-main { padding: 21px; }.chart-detail { padding: 20px; }.chart-toolbar { margin-top: 19px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }.odontogram { margin: 28px 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 2px; }.tooth-quadrant { padding: 10px; }.quadrant-0,.quadrant-2 { border-right: 1px solid #dfe7ea; }.quadrant-0,.quadrant-1 { border-bottom: 1px solid #dfe7ea; }.quadrant-label { display: block; text-align: center; margin-bottom: 12px; color: #84929a; font-size: 9px; letter-spacing: .08em; }.teeth-row { display: flex; justify-content: center; gap: 4px; }.tooth { width: 38px; min-height: 54px; padding: 5px 1px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid transparent; border-radius: 7px; color: #506473; }.tooth:disabled { opacity: .55; cursor: not-allowed; }.tooth span { font-size: 10px; font-weight: 650; }.tooth-selected { border: 2px solid var(--teal); }.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; }.chart-legend span,.condition-list button { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #556674; }.chart-legend i,.condition-list i { width: 12px; height: 12px; border: 1px solid #d8e1e5; border-radius: 3px; }.condition-list { display: grid; gap: 5px; margin: 19px 0; }.condition-list button { gap: 10px; height: 38px; padding: 0 10px; background: #fff; border: 1px solid #edf1f2; border-radius: 6px; text-align: left; }.condition-list button:hover,.condition-active { background: #f3faf8 !important; border-color: #d7ebe7 !important; }
.revenue-chart { height: 215px; display: flex; align-items: end; justify-content: space-around; gap: 8px; padding: 16px 14px 18px; }.chart-bar-wrap { flex: 1; display: flex; align-items: center; flex-direction: column; justify-content: end; gap: 7px; }.chart-bar-wrap > span { font-size: 9px; color: #71818d; }.chart-bar-wrap strong { font-size: 10px; color: #556674; }.chart-bar { width: min(47px,80%); border-radius: 5px 5px 0 0; background: linear-gradient(180deg,#28ad9c,#087b70); }.report-list { padding: 8px 18px; }.report-list > div { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #eef1f2; font-size: 12px; }.report-list > div:last-child { border: 0; }.report-list > div span { color: #61717e; }
.settings-layout { max-width: 1080px; }.tabs { display: flex; gap: 3px; margin: 0 0 18px; border-bottom: 1px solid #dfe6e9; overflow-x: auto; }.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 11px 14px; color: #697986; font-size: 12px; white-space: nowrap; }.tabs .tab-active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 650; }.profile-form { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.profile-submit { padding-top: 6px; }.feature-list { padding: 4px 19px; }.feature-row { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid #edf0f1; }.feature-row:last-child { border: 0; }.feature-row > div:first-child strong,.feature-row > div:first-child span { display: block; }.feature-row > div:first-child strong { font-size: 12px; }.feature-row > div:first-child span { margin-top: 4px; color: #73818c; font-size: 11px; }.feature-control { display: flex; align-items: center; gap: 10px; }.toggle { width: 42px; height: 24px; flex: 0 0 42px; padding: 3px; background: #d8dee2; border: 0; border-radius: 30px; }.toggle span { width: 18px; height: 18px; display: block; background: white; border-radius: 50%; transition: transform .18s ease; }.toggle-on { background: var(--teal); }.toggle-on span { transform: translateX(18px); }.module-control-note { display: grid; gap: 5px; margin-bottom: 17px; padding: 13px 15px; background: #edf8f5; border: 1px solid #d6ebe5; border-radius: 8px; }.module-control-note strong { color: #1d5e55; font-size: 12px; }.module-control-note span { color: #5e766f; font-size: 11px; }.data-update-card > div:last-child { display: grid; justify-items: start; gap: 9px; padding: 24px; }.data-update-card > div:last-child > svg { color: var(--teal); }.data-update-card > div:last-child > strong { font-size: 14px; }.data-update-card > div:last-child > span { max-width: 620px; color: #6b7c88; font-size: 11px; line-height: 1.6; }.data-update-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(11,29,35,.53); }.modal { width: min(610px,100%); max-height: min(90vh,860px); overflow: auto; background: white; border-radius: 12px; box-shadow: 0 22px 70px rgba(0,0,0,.22); }.modal-wide { width: min(760px,100%); }.modal-head { padding: 20px 22px 15px; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid #edf0f1; }.modal-head h2 { margin: 0; font-size: 17px; }.modal-head p { font-size: 11px; max-width: 490px; }.close-button { width: 30px; height: 30px; border: 0; background: #f0f3f4; color: #60717b; border-radius: 5px; font-size: 21px; line-height: 1; }.modal-content { padding: 19px 22px; }.modal-actions { padding: 13px 22px; display: flex; justify-content: end; gap: 9px; border-top: 1px solid #edf0f1; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.field { display: grid; align-content: start; gap: 6px; min-width: 0; }.field-wide { grid-column: 1 / -1; }.field > span,.field-label { color: #485b69; font-size: 11px; font-weight: 650; }.field > span i,.field-label i { font-style: normal; color: #ca5361; }.field input,.field textarea { width: 100%; min-height: 37px; padding: 8px 10px; outline: none; color: #253a4a; background: white; border: 1px solid #dfe6e9; border-radius: 6px; font-size: 12px; }.field textarea { min-height: 70px; resize: vertical; }.field input:focus,.field textarea:focus,.picker-input:focus-within { border-color: #36988d; box-shadow: 0 0 0 3px rgba(6,121,111,.08); }.choice-group { min-height: 37px; display: flex; flex-wrap: wrap; gap: 5px; }.choice { padding: 6px 10px; background: #fff; border: 1px solid #e1e7ea; border-radius: 6px; color: #556774; font-size: 11px; }.choice-active { color: var(--teal); border-color: #9fd5cb; background: #effaf7; }.ledger-notice { display: flex; align-items: start; gap: 8px; margin-top: 16px; padding: 11px; background: #eff8f6; border: 1px solid #d9eee8; border-radius: 7px; color: #286659; font-size: 11px; line-height: 1.5; }
.patient-picker { position: relative; margin-bottom: 18px; }.patient-picker .field-label { display: block; margin-bottom: 7px; }.picker-input { min-height: 41px; padding: 0 10px; border: 1px solid #dfe6e9; border-radius: 6px; }.picker-results { position: absolute; left: 0; right: 0; z-index: 2; margin-top: 4px; padding: 4px; background: #fff; border: 1px solid #e1e7ea; border-radius: 7px; box-shadow: 0 8px 22px rgba(0,0,0,.09); }.picker-results button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 9px; background: transparent; border: 0; border-radius: 4px; text-align: left; }.picker-results button:hover { background: #f3faf8; }.picker-results button strong { font-size: 11px; }.picker-results button span,.patient-picker > small { font-size: 10px; color: #687985; }.patient-picker > small { display: block; margin-top: 6px; }.selected-patient { min-height: 57px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #cfe6e1; background: #f3faf8; border-radius: 7px; }.selected-patient strong,.selected-patient span { display: block; }.selected-patient strong { font-size: 12px; }.selected-patient span { color: #71808b; margin-top: 4px; font-size: 10px; }
.invoice-lines { margin: 2px 0 17px; }.invoice-lines-header,.invoice-line { display: grid; grid-template-columns: 1fr 70px 100px; gap: 8px; }.invoice-lines-header { padding: 5px 0 7px; color: #5d6e7a; font-size: 10px; font-weight: 650; }.invoice-line { margin-bottom: 9px; }.invoice-line input { width: 100%; min-height: 35px; padding: 7px; border: 1px solid #dfe6e9; border-radius: 5px; font-size: 11px; }.invoice-line .line-remark { grid-column: 1 / -1; }.add-line { margin-top: 2px; }.receipt-split { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }.receipt-split span { display: flex; align-items: center; gap: 7px; padding: 10px; border: 1px solid #e2eaea; border-radius: 7px; color: #61727d; font-size: 11px; }.receipt-split i { width: 8px; height: 8px; border-radius: 50%; background: #168b7d; }.receipt-split span:nth-child(2) i { background: #3f6fb5; }.receipt-split strong { margin-left: auto; color: #203846; }.invoice-summary { margin-top: 15px; padding: 13px; background: #f6f9fa; border: 1px solid #e8edef; border-radius: 7px; display: flex; justify-content: space-between; gap: 8px; }.invoice-summary span { color: #61717e; font-size: 11px; }.invoice-summary strong { display: block; color: #1d3441; font-size: 15px; margin-top: 3px; }.preview-button { margin-right: auto; }
.toast { position: fixed; right: 23px; bottom: 23px; z-index: 12; max-width: 440px; padding: 13px 16px; background: #143a36; border-radius: 8px; color: white; font-size: 12px; box-shadow: 0 10px 35px rgba(0,0,0,.15); }.loading-screen { min-height: 100vh; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 10px; }.loading-screen strong { font-size: 17px; }.loading-screen > span { color: #71818d; font-size: 12px; }
.patient-timeline { display: grid; gap: 10px; padding: 17px; max-height: 55vh; overflow: auto; }.patient-timeline-item { display: grid; gap: 6px; padding: 12px; border: 1px solid #e8edef; border-radius: 7px; }.patient-timeline-item > .badge { width: fit-content; }.patient-timeline-item > strong { font-size: 12px; }.patient-timeline-item > span:last-child { color: #73818c; font-size: 11px; }
.medicine-group-picker { display: grid; gap: 8px; margin: 17px 0; }.medicine-editor { margin-top: 18px; }.medicine-editor-heading,.medicine-line-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }.medicine-editor-heading { margin-bottom: 10px; }.medicine-editor-heading > strong,.medicine-line-heading > strong { font-size: 12px; }.medicine-editor-heading > span { color: #6b7c88; font-size: 11px; }.medicine-line { padding: 12px; margin-bottom: 10px; background: #fbfdfd; border: 1px solid #e4eceb; border-radius: 8px; }.medicine-line-heading { margin-bottom: 10px; }.linked-supplier { margin: 16px 0; display: grid; gap: 7px; }.linked-supplier > small,.form-hint { color: #73818c; font-size: 10px; line-height: 1.5; }.supplier-summary { margin-bottom: 15px; }.modal-ledger { width: min(850px,100%); }.ledger-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; padding: 17px 19px; border-bottom: 1px solid #edf0f1; }.ledger-overview > span { color: #687987; font-size: 10px; }.ledger-overview strong { display: block; color: #173544; font-size: 17px; margin-top: 6px; }.ledger-table { max-height: 48vh; }
.medicine-library-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; padding: 9px 10px; background: #eff8f6; border: 1px solid #d9ebe7; border-radius: 7px; color: #35665f; }.medicine-library-hint > span { flex: 1; font-size: 10px; line-height: 1.45; }.medicine-library-hint > strong { white-space: nowrap; font-size: 10px; }.button:disabled,.close-button:disabled { cursor: wait; opacity: .7; }.completion-notice { position: fixed; right: 22px; bottom: 21px; z-index: 13; width: min(440px,calc(100vw - 28px)); overflow: hidden; background: #fff; border: 1px solid #dbe8e4; border-radius: 11px; box-shadow: 0 16px 50px rgba(16,45,48,.2); }.completion-notice-head { display: flex; align-items: flex-start; gap: 10px; padding: 15px 15px 12px; }.completion-mark { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; background: #e3f5ed; color: #17834e; font-size: 17px; font-weight: 700; }.completion-error .completion-mark { background: #fdeaea; color: #bd3945; }.completion-notice-head > div { display: grid; gap: 4px; flex: 1; }.completion-notice-head > div > strong { color: #203946; font-size: 12px; }.completion-notice-head > div > span { color: #627480; font-size: 11px; line-height: 1.5; }.completion-close { width: 24px; height: 24px; border: 0; border-radius: 5px; background: #f0f3f4; color: #657681; font-size: 17px; }.completion-details { display: grid; gap: 6px; margin: 0 14px 12px 51px; padding: 10px 11px; background: #f6f9f8; border: 1px solid #ebf0ee; border-radius: 7px; }.completion-details > span { color: #405360; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }.completion-history { width: 100%; padding: 10px 14px; text-align: left; background: #f2faf7; border: 0; border-top: 1px solid #dfede9; color: #08776a; font-size: 11px; font-weight: 650; }
.invoice-preview-backdrop { z-index: 15; align-items: flex-start; overflow-y: auto; }.invoice-preview-modal { width: min(920px,100%); margin: 10px 0 30px; overflow: hidden; background: #eef2f3; border-radius: 12px; box-shadow: 0 22px 70px rgba(0,0,0,.24); }.invoice-preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 13px 16px; background: #fff; border-bottom: 1px solid #dde5e8; }.invoice-preview-toolbar > div:first-child { display: grid; gap: 3px; }.invoice-preview-toolbar strong { font-size: 12px; }.invoice-preview-toolbar span { color: #73838e; font-size: 10px; }.invoice-preview-toolbar > div:last-child { display: flex; gap: 8px; }.invoice-print-layer { width: min(790px,calc(100% - 32px)); min-height: 980px; margin: 18px auto 24px; padding: 38px 42px; background: #fff; color: #203542; box-shadow: 0 5px 24px rgba(34,58,66,.12); }.invoice-document-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid var(--teal); }.invoice-logo { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--teal); color: #fff; font-size: 25px; font-weight: 750; }.invoice-document-head h1 { margin: 0; color: var(--teal); font-size: 22px; letter-spacing: -.02em; }.invoice-document-head p { margin: 4px 0; color: #637580; font-size: 10px; }.invoice-document-head span { font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }.invoice-document-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 25px; margin: 24px 0; }.invoice-document-meta > div { display: grid; gap: 3px; }.invoice-document-meta span { color: #758590; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }.invoice-document-meta strong { font-size: 12px; }.invoice-document-meta small { color: #6c7c87; font-size: 10px; line-height: 1.4; }.invoice-document-table { width: 100%; border-collapse: collapse; }.invoice-document-table th { padding: 10px 8px; text-align: left; color: #526672; background: #f0f5f4; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }.invoice-document-table td { padding: 11px 8px; border-bottom: 1px solid #e7ecee; font-size: 10px; }.invoice-document-table th:last-child,.invoice-document-table td:last-child { text-align: right; }.invoice-document-bottom { display: grid; grid-template-columns: 1fr 250px; gap: 28px; margin-top: 22px; }.invoice-payment-box { align-self: start; display: grid; gap: 8px; padding: 12px; background: #f5f9f8; border: 1px solid #e1ebe8; border-radius: 7px; }.invoice-payment-box > strong { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }.invoice-payment-box span { display: flex; justify-content: space-between; color: #647681; font-size: 10px; }.invoice-payment-box small { color: #75858f; font-size: 9px; }.invoice-totals { display: grid; gap: 8px; }.invoice-totals span { display: flex; justify-content: space-between; color: #63747f; font-size: 10px; }.invoice-totals b { color: #203744; }.invoice-grand-total { padding-top: 9px; border-top: 1px solid #dce5e7; font-size: 12px !important; }.invoice-balance-due,.invoice-balance-clear { padding: 8px; border-radius: 5px; font-weight: 700; }.invoice-balance-due { color: #a14c2d !important; background: #fff0e9; }.invoice-balance-clear { color: #24754b !important; background: #eaf7ef; }.invoice-remark { margin-top: 23px; padding: 10px 12px; background: #fafbfb; border-left: 3px solid var(--teal); color: #586a76; font-size: 10px; }.invoice-document-foot { display: flex; justify-content: space-between; margin-top: 95px; color: #5e707a; font-size: 10px; }.invoice-document-foot span { min-width: 150px; padding-top: 7px; border-top: 1px solid #94a2a9; text-align: center; }

.login-screen,.install-screen { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at top left,#e9f8f4,#f5f7f9 48%,#edf4f6); }
.login-card,.install-card { width: min(445px,100%); display: grid; gap: 17px; padding: 35px; background: #fff; border: 1px solid #e2e9ed; border-radius: 17px; box-shadow: 0 18px 65px rgba(20,48,55,.09); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }.login-brand strong,.login-brand span:last-child { display:block; }.login-brand strong { font-size: 14px; letter-spacing: .13em; }.login-brand div:last-child span { margin-top: 4px; color:#778892; font-size:11px; }
.login-card h1,.install-card h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }.login-card > p,.install-card > p { margin:0; color:#697986; line-height:1.6; font-size:12px; }.login-card > small { text-align:center; color:#7a8892; font-size:10px; }.login-submit { min-height:43px; margin-top:4px; }.login-error { padding:10px 12px; color:#ae3e48 !important; background:#fff0f1; border:1px solid #f5d7da; border-radius:7px; }.install-card .brand-mark { margin-bottom:5px; }
.nav-glyph { display: inline-grid; place-items:center; width:17px; font-size:15px; }.search-icon { font-size:21px; line-height:1; }.field select { width: 100%; min-height: 37px; padding:8px 10px; outline: none; color:#253a4a; background:white; border:1px solid #dfe6e9; border-radius:6px; font-size:12px; }.field select:focus { border-color:#36988d; box-shadow:0 0 0 3px rgba(6,121,111,.08); }
.invoice-line { position:relative; padding-right:23px; }.editor-remove { position:absolute; top:7px; right:0; width:19px; height:19px; border:0; background:#f3f5f6; color:#70808a; border-radius:4px; }.medicine-line .editor-remove { position:static; }.medicine-library-hint { line-height:1.55; font-size:11px; }.stat-card[data-action] { cursor:pointer; }.stat-card[data-action]:hover { border-color:#abdcd2; }

.brand-mark img,.invoice-logo img,.clinic-logo-preview img{width:100%;height:100%;object-fit:contain;border-radius:inherit;background:#fff}.patient-history-link{padding:0;border:0;background:transparent;text-align:left;cursor:pointer}.patient-history-link:hover strong{color:var(--teal);text-decoration:underline}.clinic-logo-manager{display:flex;align-items:center;gap:16px;padding:16px;border:1px solid #e3e9ee;border-radius:10px;background:#fafcfd}.clinic-logo-preview{width:76px;height:76px;flex:0 0 76px;display:grid;place-items:center;border-radius:13px;background:#e9f5f3;color:var(--teal);font-size:32px;font-weight:700}.clinic-logo-manager>div:nth-child(2){display:grid;gap:5px}.clinic-logo-manager>div:nth-child(2)>strong{font-size:13px}.clinic-logo-manager>div:nth-child(2)>span{color:#6d7c88;font-size:11px}.clinic-logo-actions{display:flex;align-items:center;gap:10px;margin-top:4px}.clinic-logo-actions input[type=file]{display:none}.settings-disabled-note{padding:24px;color:#6c7c87;font-size:12px}.certificate-editor-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:20px 0 10px}.certificate-editor-heading>div{display:grid;gap:4px}.certificate-editor-heading strong{font-size:12px}.certificate-editor-heading span{max-width:440px;color:#70808b;font-size:10px;line-height:1.5}.certificate-editor{border:1px solid #dbe4e8;border-radius:8px;overflow:hidden}.certificate-toolbar{display:flex;flex-wrap:wrap;gap:4px;padding:8px;background:#f6f8f9;border-bottom:1px solid #e2e8eb}.certificate-toolbar button{min-height:29px;padding:0 9px;background:#fff;border:1px solid #e2e7e9;border-radius:5px;color:#425360;font-size:10px}.certificate-toolbar button:hover{background:#edf7f5;color:var(--teal)}.certificate-writing-area{min-height:240px;padding:17px 19px;background:#fff;color:#304454;outline:none;font-size:13px;line-height:1.8}.certificate-writing-area p{margin:0 0 12px}.patient-history-modal{width:min(930px,100%)}.patient-history-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:15px 18px;background:#f8fafb;border-bottom:1px solid #e8edef}.patient-history-summary>span{display:grid;gap:5px;color:#697985;font-size:10px}.patient-history-summary strong{color:#283d4b;font-size:11px;font-weight:600;overflow-wrap:anywhere}.timeline-event-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.timeline-event-heading>span:last-child{color:#72818d;font-size:10px}.timeline-open-button{justify-self:start;margin-top:3px}.patient-history-actions{flex-wrap:wrap}.certificate-print-layer{min-height:1030px}.certificate-letterhead{padding-bottom:20px}.certificate-meta{display:flex;justify-content:space-between;gap:12px;margin:21px 0;color:#64737c;font-size:11px}.certificate-meta strong{color:#263846}.certificate-document-title{margin:23px 0 19px;text-align:center;color:#164b4a;font-size:19px;letter-spacing:.075em;text-transform:uppercase}.certificate-patient-bar{display:flex;flex-wrap:wrap;gap:15px 25px;padding:12px 0;border-top:1px solid #e2e8e9;border-bottom:1px solid #e2e8e9;color:#62717c;font-size:10px}.certificate-patient-bar strong{display:block;margin-top:4px;color:#273b49;font-size:11px}.certificate-document-body{min-height:365px;margin-top:28px;color:#293b48;font-size:13px;line-height:1.95}.certificate-document-body p{margin:0 0 15px}.certificate-document-body h1,.certificate-document-body h2,.certificate-document-body h3{margin:15px 0 10px;color:#24504c}.certificate-document-body li{margin-bottom:6px}.certificate-rest-period{padding:12px 14px;background:#f3f8f7;border-left:3px solid var(--teal);font-size:11px}.certificate-signature{display:flex;justify-content:flex-end;margin-top:70px}.certificate-signature>div{display:grid;gap:5px;min-width:215px;padding-top:9px;border-top:1px solid #74858d}.certificate-signature strong{font-size:13px}.certificate-signature span{color:#687983;font-size:10px}.certificate-footer-note{margin-top:46px;padding-top:10px;border-top:1px solid #e1e6e8;text-align:center;color:#70808a;font-size:9px}

@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid,.chart-layout{grid-template-columns:1fr}.sidebar{width:214px}.workspace{margin-left:214px}.page{padding-left:23px;padding-right:23px}.tooth{width:40px}}
@media(max-width:760px){.sidebar{position:sticky;inset:auto;width:100%;height:auto}.brand{height:62px;padding:10px 14px}.sidebar-section-label,.sidebar-account{display:none}.sidebar nav{display:flex;flex-direction:row;overflow-x:auto;padding:6px 8px 9px;gap:4px}.nav-item{width:auto;min-height:35px;padding:0 9px;white-space:nowrap}.workspace{margin-left:0;min-height:auto}.topbar{position:static;padding:0 13px;height:62px}.app-logout{top:auto;right:14px;bottom:14px;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;box-shadow:0 8px 24px rgba(84,35,43,.2)}.app-logout span{display:none}.date-chip{display:none}.topbar-actions .button span{display:none}.global-search input{font-size:11px}.page{padding:22px 13px 40px}.page-heading{align-items:flex-start}.page-heading p{max-width:250px}.page-heading>.button{font-size:0;min-width:38px;padding:0}.page-heading>.button svg{width:18px;height:18px}.stats-grid{gap:9px}.stat-card{padding:13px;min-height:128px}.stat-card>strong{font-size:20px}.dashboard-grid{gap:10px}.surface-head{padding:14px 12px}.quick-grid{padding:7px}.odontogram{gap:17px 0}.tooth-quadrant{padding:6px 1px}.teeth-row{gap:2px}.tooth{width:28px;min-height:44px}.tooth svg{width:19px;height:19px}.tooth span{font-size:9px}.chart-main{padding:13px}.chart-toolbar{flex-direction:column;align-items:flex-start}.chart-legend{gap:8px}.profile-form,.form-grid{grid-template-columns:1fr}.modal-content,.modal-head,.modal-actions{padding-left:15px;padding-right:15px}.feature-list{padding:4px 12px}.feature-row>div:first-child span{line-height:1.4}.feature-control>.badge{display:none}.compact-patient>.badge{display:none}.invoice-lines-header,.invoice-line{grid-template-columns:1fr 50px 75px}.receipt-split{grid-template-columns:1fr}.invoice-summary{display:grid;grid-template-columns:1fr 1fr}.tabs button{padding:10px 8px;font-size:10px}.ledger-overview{grid-template-columns:1fr 1fr}.medicine-line{padding:10px}.invoice-preview-toolbar{align-items:flex-start}.invoice-preview-toolbar>div:first-child span{display:none}.invoice-print-layer{width:calc(100% - 16px);min-height:auto;margin:8px;padding:22px 16px}.invoice-document-head h1{font-size:17px}.invoice-document-meta{grid-template-columns:1fr}.invoice-document-bottom{grid-template-columns:1fr}.invoice-document-table th:nth-child(2),.invoice-document-table td:nth-child(2),.invoice-document-table th:nth-child(4),.invoice-document-table td:nth-child(4){display:none}.invoice-document-foot{margin-top:55px}}

@media print {
  body { background: #fff; }
  body > * { visibility: hidden !important; }
  .invoice-preview-backdrop,.invoice-preview-backdrop * { visibility: visible !important; }
  .invoice-preview-backdrop { position: absolute; inset: 0; display: block; padding: 0; overflow: visible; background: #fff; }
  .invoice-preview-modal { width: 100%; margin: 0; background: #fff; border-radius: 0; box-shadow: none; }
  .invoice-preview-toolbar { display: none; }
  .invoice-print-layer { width: 100%; min-height: auto; margin: 0; padding: 20px 28px; box-shadow: none; }
}
