:root {
  --ink: #17161e;
  --ink-soft: #687083;
  --ink-faint: #9aa0ae;
  --line: #dfe3ea;
  --surface: #ffffff;
  --canvas: #f8f6f1;
  --mint: #edf1f8;
  --mint-strong: #5f7faa;
  --coral: #c3a05c;
  --coral-soft: #f7f1e2;
  --yellow: #d7ad5a;
  --yellow-soft: #f7f0e1;
  --navy: #1d2a46;
  --shadow: 0 12px 40px rgba(29, 42, 70, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(75, 110, 170, .28); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 246px; flex: 0 0 246px; background: #f0f2f8; border-right: 1px solid #dfe3ea; padding: 26px 16px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 12px 12px 12px 4px; background: var(--navy); box-shadow: 0 6px 12px rgba(29, 42, 70, .2); }
.brand-mark img { width: 31px; height: 31px; object-fit: contain; }
.brand strong { display: block; font-family: Manrope, sans-serif; font-size: 15px; letter-spacing: -.02em; }
.brand span { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.clinic-switcher { display: flex; align-items: center; gap: 9px; padding: 11px 9px; margin-bottom: 25px; background: rgba(255,255,255,.7); border: 1px solid #e2e5ec; border-radius: 13px; }
.clinic-avatar, .profile-avatar, .mini-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; font-weight: 700; }
.clinic-avatar { width: 30px; height: 30px; color: #667ca4; background: var(--mint); font-size: 9px; }
.clinic-copy, .profile-copy { min-width: 0; flex: 1; }
.clinic-copy strong, .profile-copy strong { display: block; overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.clinic-copy span, .profile-copy span { display: block; margin-top: 3px; overflow: hidden; color: var(--ink-faint); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.chevron { color: var(--ink-faint); font-size: 15px; }
.nav-label { margin: 0 10px 9px; color: #a0a5b0; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 29px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 10px; margin-bottom: 4px; color: #6d7482; background: transparent; border-radius: 10px; font-size: 12px; text-align: left; transition: .2s ease; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.nav-item.active { color: var(--ink); background: #fff; box-shadow: 0 5px 15px rgba(29, 42, 70, .05); font-weight: 700; }
.nav-icon { width: 17px; color: #8b92a2; font-size: 17px; line-height: 1; text-align: center; }
.nav-item.active .nav-icon { color: var(--coral); }
.nav-count { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-left: auto; color: #fff; background: var(--coral); border-radius: 6px; font-size: 9px; }
.status-dot { width: 6px; height: 6px; margin-left: auto; background: #e8b54d; border-radius: 50%; }
.sidebar-bottom { margin-top: auto; }
.help-card { padding: 14px 13px; margin-bottom: 18px; background: #e9eef8; border-radius: 14px; }
.help-spark { width: 23px; height: 23px; display: grid; place-items: center; margin-bottom: 9px; color: #fff; background: #7b94bd; border-radius: 8px; font-size: 12px; }
.help-card strong, .help-card span { display: block; }
.help-card strong { font-size: 11px; }
.help-card > span { margin-top: 5px; color: #637796; font-size: 10px; line-height: 1.4; }
.text-button { padding: 0; color: var(--ink); background: transparent; font-size: 11px; font-weight: 700; }
.help-card .text-button { margin-top: 12px; color: #345685; }
.text-button span, .full-width-button span { margin-left: 7px; font-size: 15px; }
.profile-row { display: flex; align-items: center; gap: 9px; padding: 11px 6px 0; border-top: 1px solid #dfe3ea; }
.profile-avatar { width: 29px; height: 29px; color: #fff; background: #7b879d; font-size: 9px; }
.more-button { padding: 2px 4px; color: #a0a5b0; background: transparent; letter-spacing: 1px; }

.main-content { min-width: 0; flex: 1; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: rgba(247,247,244,.82); }
.breadcrumbs { color: var(--ink-faint); font-size: 11px; }
.breadcrumbs b { margin: 0 9px; color: #c4c9d4; font-weight: 400; }
.breadcrumbs strong { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.icon-button { position: relative; display: grid; place-items: center; width: 29px; height: 29px; color: #7a8494; background: transparent; border-radius: 9px; font-size: 20px; }
.icon-button:hover { background: #eaedf3; color: var(--ink); }
.notification-badge { position: absolute; top: 3px; right: 4px; width: 5px; height: 5px; background: var(--coral); border: 1px solid var(--canvas); border-radius: 50%; }
.top-divider { width: 1px; height: 26px; background: var(--line); }
.account-chip { display: flex; align-items: center; gap: 8px; color: var(--ink); background: transparent; font-size: 11px; }
.mini-avatar { width: 27px; height: 27px; color: #fff; background: var(--navy); font-size: 8px; }
.account-chip .chevron { margin-left: 2px; font-size: 13px; }
.page { max-width: 1500px; padding: 39px 40px 54px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 29px; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--coral); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-family: Manrope, sans-serif; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.055em; line-height: 1.1; }
.wave { display: inline-block; color: var(--yellow); font-size: .72em; transform: rotate(12deg); }
.page-subtitle { margin-bottom: 0; color: var(--ink-soft); font-size: 12px; }
.primary-button, .outline-button, .today-button, .round-button { transition: .2s ease; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 16px; color: #fff; background: var(--navy); border-radius: 10px; box-shadow: 0 8px 18px rgba(41, 61, 60, .12); font-size: 11px; font-weight: 700; white-space: nowrap; }
.primary-button:hover { background: #1e3030; transform: translateY(-1px); }
.primary-button span { color: #a9d3b5; font-size: 17px; line-height: 0; }
.outline-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 600; }
.outline-button:hover { color: var(--ink); border-color: #bfcac4; background: #fbfcf9; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 130px; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card-primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.stat-top, .stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.stat-card-primary .stat-label { color: #b7cac2; }
.stat-icon { width: 27px; height: 27px; display: grid; place-items: center; color: #6a8b7b; background: var(--mint); border-radius: 8px; font-size: 14px; }
.soft-green { color: #6b9c7d; background: var(--mint); }.soft-yellow { color: #bc8e38; background: var(--yellow-soft); }.soft-coral { color: var(--coral); background: var(--coral-soft); }
.stat-value { display: block; margin: 12px 0 10px; font-family: Manrope, sans-serif; font-size: 30px; letter-spacing: -.05em; }
.stat-foot { color: var(--ink-faint); font-size: 9px; }
.stat-card-primary .stat-foot { color: #9fb5ac; }.trend-up { color: #a8dcb3; font-weight: 700; }.trend-down { color: #dc8b73; font-weight: 700; }.status-text.green { color: #559b73; font-weight: 700; }.status-text.yellow { color: #bc8e38; font-weight: 700; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .78fr); gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.calendar-panel { min-width: 0; overflow: hidden; }.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 22px 17px; }.panel-header h2 { margin-bottom: 5px; font-family: Manrope, sans-serif; font-size: 15px; letter-spacing: -.035em; }.panel-header p { margin-bottom: 0; color: var(--ink-faint); font-size: 10px; }.calendar-actions { display: flex; gap: 9px; align-items: center; }.segmented-control { display: inline-flex; padding: 3px; background: #f3f5f1; border-radius: 8px; }.segmented-control button { padding: 6px 9px; color: var(--ink-faint); background: transparent; border-radius: 6px; font-size: 10px; }.segmented-control button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 5px rgba(35, 50, 45, .08); font-weight: 700; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 22px; background: #fbfcfa; border-top: 1px solid #f1f3ef; border-bottom: 1px solid var(--line); }.date-navigator { display: flex; align-items: center; gap: 7px; }.date-navigator strong { margin-left: 7px; font-size: 11px; }.round-button, .today-button { height: 27px; border-radius: 7px; }.round-button { width: 27px; color: var(--ink-soft); background: #f0f3ef; font-size: 18px; }.round-button:hover { background: #e5ece5; }.today-button { padding: 0 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.select-wrap { position: relative; }.select-wrap select { appearance: none; padding: 8px 27px 8px 10px; color: var(--ink-soft); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='m2 3 3 3 3-3' fill='none' stroke='%2391a09c' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 10px center; border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 10px; }
.calendar-body { padding: 7px 22px 14px; }.time-row { position: relative; display: grid; grid-template-columns: 49px minmax(0, 1fr); min-height: 67px; border-bottom: 1px solid #f1f3ef; }.time-row:last-child { border-bottom: 0; }.time-label { padding-top: 11px; color: #9ba7a2; font-size: 10px; }.time-slot { position: relative; min-width: 0; padding: 7px 0 7px 13px; }.time-slot:before { content: ""; position: absolute; top: 0; left: 0; width: 1px; height: 100%; background: #edf0eb; }.appointment-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 53px; padding: 9px 11px; border-left: 3px solid var(--mint-strong); background: #eef8f1; border-radius: 9px; }.appointment-card.coral { border-left-color: var(--coral); background: #fff2ed; }.appointment-card.yellow { border-left-color: var(--yellow); background: #fff9eb; }.appointment-main { min-width: 0; }.appointment-name { display: block; margin-bottom: 4px; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.appointment-meta { display: flex; gap: 8px; overflow: hidden; color: var(--ink-soft); font-size: 9px; white-space: nowrap; }.appointment-meta span { overflow: hidden; text-overflow: ellipsis; }.appointment-meta span + span:before { content: "·"; margin-right: 7px; color: #b5c0bb; }.appointment-status { flex: 0 0 auto; padding: 5px 7px; border-radius: 5px; color: #5b9472; background: rgba(255,255,255,.72); font-size: 8px; font-weight: 700; }.appointment-status.pending { color: #b38734; }.appointment-status.cancelled { color: #c26b5b; }.empty-slot { color: #c0c9c4; font-size: 9px; }
.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(132px, 1fr)); gap: 8px; overflow-x: auto; padding: 8px 0 2px; }.week-day { min-height: 280px; padding: 10px; background: #fbfcfa; border: 1px solid #edf1ec; border-radius: 10px; }.week-day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 9px; margin-bottom: 8px; color: var(--ink-faint); border-bottom: 1px solid #edf1ec; font-size: 9px; text-transform: uppercase; }.week-day-heading strong { color: var(--ink); font-family: Manrope, sans-serif; font-size: 18px; }.week-day .appointment-card { display: block; min-height: 0; padding: 8px; margin-bottom: 7px; }.week-day .appointment-name { font-size: 9px; }.week-day .appointment-meta { display: block; margin-top: 5px; font-size: 8px; white-space: normal; }.week-day .appointment-meta span { display: block; }.week-day .appointment-meta span + span { margin-top: 3px; }.week-day .appointment-meta span + span:before { display: none; }.week-day .appointment-status { display: inline-block; margin-top: 7px; font-size: 7px; }.week-day .empty-slot { display: block; padding: 12px 0; text-align: center; }
.side-column { display: grid; gap: 18px; }.today-panel { overflow: hidden; }.compact-header { padding: 19px 18px 14px; }.next-patient-list { padding: 0 18px; }.next-patient { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f0f2ee; }.next-patient:last-child { border-bottom: 0; }.patient-initial { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: #86b59a; border-radius: 10px; font-size: 9px; font-weight: 700; }.patient-initial.coral { background: #ed957f; }.patient-initial.yellow { color: #84692d; background: #f6d78c; }.next-patient-copy { min-width: 0; flex: 1; }.next-patient-copy strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.next-patient-copy span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }.next-patient-time { align-self: flex-start; color: var(--ink); font-size: 10px; font-weight: 700; }.full-width-button { width: calc(100% - 36px); padding: 11px 0; margin: 7px 18px 17px; color: var(--ink-soft); background: #f7f9f6; border-radius: 8px; font-size: 10px; font-weight: 700; }.quick-panel { display: grid; grid-template-columns: 33px 1fr; gap: 11px; padding: 17px; background: #f7fbf7; border-color: #dfede1; }.quick-icon { width: 31px; height: 31px; display: grid; place-items: center; color: #4f936c; background: var(--mint); border-radius: 10px; font-size: 18px; }.quick-panel h3 { margin: 1px 0 5px; font-family: Manrope, sans-serif; font-size: 11px; }.quick-panel p { margin-bottom: 10px; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }.quick-panel .text-button { color: #468060; }

.table-panel { overflow: hidden; }.table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }.search-field { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); padding: 8px 10px; color: var(--ink-faint); background: #f7f9f6; border: 1px solid #eef1ec; border-radius: 8px; }.search-field input { width: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; }.search-field input::placeholder { color: #a8b1ad; }.table-scroll { overflow-x: auto; }table { width: 100%; min-width: 680px; border-collapse: collapse; }th { padding: 12px 20px; color: #9aa7a1; background: #fbfcfa; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }td { padding: 15px 20px; border-top: 1px solid #f0f2ee; color: var(--ink-soft); font-size: 10px; }td strong { color: var(--ink); font-size: 11px; }td small { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }.table-avatar { display: inline-grid; width: 29px; height: 29px; place-items: center; margin-right: 8px; vertical-align: middle; color: #fff; background: #86b59a; border-radius: 9px; font-size: 9px; font-weight: 700; }.table-avatar.coral { background: #ed957f; }.table-avatar.yellow { color: #84692d; background: #f6d78c; }.pill { display: inline-block; padding: 5px 7px; color: #57936d; background: #ebf7ef; border-radius: 5px; font-size: 8px; font-weight: 700; }.pill.yellow { color: #aa7f2b; background: #fff7e1; }.pill.grey { color: #87928d; background: #f0f2ef; }
.professional-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }.professional-card { padding: 18px; }.professional-top { display: flex; align-items: center; gap: 11px; }.professional-avatar { width: 43px; height: 43px; display: grid; place-items: center; color: #fff; background: var(--navy); border-radius: 13px; font-size: 12px; font-weight: 700; }.professional-card:nth-child(2) .professional-avatar { background: #e98e77; }.professional-card:nth-child(3) .professional-avatar { color: #4e795d; background: #dcefe2; }.professional-top h3 { margin: 0 0 4px; font-family: Manrope, sans-serif; font-size: 13px; }.professional-top p { margin: 0; color: var(--ink-faint); font-size: 10px; }.professional-detail { display: flex; justify-content: space-between; padding-top: 17px; margin-top: 17px; border-top: 1px solid #eff2ed; }.professional-detail span { display: block; margin-bottom: 4px; color: var(--ink-faint); font-size: 9px; }.professional-detail strong { font-size: 11px; }
.draft-pill, .approved-pill { padding: 7px 9px; color: #a47c2c; background: var(--yellow-soft); border-radius: 6px; font-size: 9px; font-weight: 700; }.whatsapp-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }.connection-card { display: flex; align-items: center; gap: 37px; min-height: 350px; padding: 30px; overflow: hidden; }.connection-illustration { position: relative; width: 190px; height: 220px; display: grid; place-items: center; flex: 0 0 auto; }.phone-outline { position: relative; z-index: 2; width: 107px; height: 192px; padding: 7px; background: var(--navy); border-radius: 22px; box-shadow: 15px 17px 0 #e3f2e7; transform: rotate(-7deg); }.phone-screen { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; background: #355350; border: 4px solid var(--navy); border-radius: 16px; }.phone-screen span { width: 42px; height: 42px; display: grid; place-items: center; color: #5cae7b; background: #caecd6; border-radius: 50%; font-size: 25px; }.phone-screen small { font-size: 9px; font-weight: 700; }.connection-orbit { position: absolute; border: 1px dashed #b4d7bd; border-radius: 50%; }.orbit-one { width: 180px; height: 180px; }.orbit-two { width: 130px; height: 130px; border-color: #f2d28f; }.connection-copy { max-width: 400px; }.connection-copy h2 { margin-bottom: 9px; font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: -.05em; }.connection-copy p { margin-bottom: 20px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }.muted-note { display: block; margin-top: 13px; color: var(--ink-faint); font-size: 9px; }.message-preview { padding-bottom: 19px; }.chat-bubble { position: relative; width: calc(100% - 36px); padding: 15px; margin: 4px 18px 15px; color: #466653; background: #e8f6eb; border-radius: 4px 14px 14px 14px; font-size: 11px; line-height: 1.55; }.chat-bubble p { margin: 13px 0 0; }.chat-head { display: flex; align-items: center; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid rgba(95, 150, 111, .16); }.chat-avatar { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: #65a37b; border-radius: 9px; font-size: 8px; font-weight: 700; }.chat-head strong, .chat-head span { display: block; }.chat-head strong { font-size: 10px; }.chat-head span { color: #7fa28a; font-size: 8px; }.chat-time { display: block; margin-top: 8px; color: #7fa28a; font-size: 8px; text-align: right; }.message-rule { display: flex; gap: 7px; padding: 0 18px; color: var(--ink-faint); font-size: 9px; line-height: 1.5; }.message-rule span { width: 14px; height: 14px; display: grid; place-items: center; flex: 0 0 auto; color: #75927d; background: #e4f1e6; border-radius: 50%; font-size: 9px; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }.report-card { padding: 20px; }.report-card strong { display: block; margin: 13px 0; font-family: Manrope, sans-serif; font-size: 30px; }.report-card small { color: var(--ink-faint); font-size: 9px; }.bar { height: 7px; overflow: hidden; margin-bottom: 10px; background: #e9f4ec; border-radius: 20px; }.bar span { display: block; height: 100%; background: var(--mint-strong); border-radius: inherit; }.bar.coral { background: #ffebe4; }.bar.coral span { background: var(--coral); }.bar.yellow { background: #fff4d8; }.bar.yellow span { background: var(--yellow); }.empty-report { min-height: 220px; display: grid; place-items: center; align-content: center; text-align: center; }.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 10px; color: var(--coral); background: var(--coral-soft); border-radius: 14px; }.empty-report h2 { margin-bottom: 7px; font-family: Manrope, sans-serif; font-size: 15px; }.empty-report p { max-width: 320px; margin-bottom: 0; color: var(--ink-faint); font-size: 10px; line-height: 1.5; }.settings-list { display: grid; gap: 12px; max-width: 820px; }.setting-row { display: flex; align-items: center; gap: 14px; padding: 17px 19px; }.setting-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; color: #b4822c; background: var(--yellow-soft); border-radius: 10px; font-size: 17px; }.setting-icon.green-bg { color: #4a9167; background: var(--mint); }.setting-icon.yellow-bg { color: #b4822c; background: var(--yellow-soft); }.setting-row > div:nth-child(2) { flex: 1; }.setting-row h3 { margin: 0 0 5px; font-family: Manrope, sans-serif; font-size: 12px; }.setting-row p { margin: 0; color: var(--ink-faint); font-size: 10px; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(30, 41, 41, .4); backdrop-filter: blur(5px); }.modal-card { width: min(620px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px; background: #fff; border-radius: 20px; box-shadow: 0 25px 80px rgba(30, 41, 41, .2); }.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }.modal-header h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 21px; letter-spacing: -.04em; }.close-button { width: 30px; height: 30px; color: var(--ink-soft); background: #f3f5f1; border-radius: 8px; font-size: 20px; line-height: 1; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.form-grid label, .full-field { display: flex; flex-direction: column; gap: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 600; }.form-grid select, .form-grid input, .full-field textarea { width: 100%; padding: 10px 11px; color: var(--ink); background: #fbfcfa; border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 11px; }.form-grid select:focus, .form-grid input:focus, .full-field textarea:focus { border-color: #9bb9a3; box-shadow: 0 0 0 3px #ecf7ef; }.full-field { margin-top: 15px; }.full-field textarea { resize: vertical; }.form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 21px; margin-top: 20px; border-top: 1px solid #eff2ed; }.form-hint { flex: 1; color: var(--ink-faint); font-size: 9px; line-height: 1.4; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 300px; padding: 12px 16px; color: #fff; background: var(--navy); border-radius: 10px; box-shadow: 0 12px 30px rgba(30,41,41,.2); opacity: 0; transform: translateY(10px); pointer-events: none; font-size: 11px; transition: .25s ease; }.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) { .sidebar { width: 218px; flex-basis: 218px; }.topbar, .page { padding-left: 28px; padding-right: 28px; }.stat-grid { grid-template-columns: repeat(2, 1fr); }.content-grid { grid-template-columns: 1fr; }.side-column { grid-template-columns: 1fr 1fr; }.whatsapp-layout { grid-template-columns: 1fr; }.connection-card { min-height: 290px; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { width: 100%; height: auto; padding: 15px 16px 10px; border-right: 0; border-bottom: 1px solid #e0e7df; }.brand { padding: 0 3px 15px; }.clinic-switcher, .sidebar-bottom { display: none; }.main-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }.nav-label { display: none; }.nav-item { width: auto; flex: 0 0 auto; margin: 0; padding: 9px 10px; }.nav-count, .status-dot { display: none; }.topbar { height: 60px; padding: 0 18px; }.account-chip > span:not(.mini-avatar):not(.chevron) { display: none; }.page { padding: 27px 18px 42px; }.page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 23px; }.page-heading .primary-button, .page-heading .outline-button { align-self: stretch; }.stat-grid { gap: 9px; }.stat-card { min-height: 113px; padding: 14px; }.stat-value { margin: 10px 0 7px; font-size: 25px; }.stat-foot { display: block; line-height: 1.5; }.stat-foot span { display: block; }.calendar-actions { align-items: stretch; flex-direction: column; }.calendar-header { padding: 18px; }.calendar-toolbar { align-items: flex-start; flex-direction: column; padding: 12px 18px; }.date-navigator strong { display: none; }.calendar-body { padding: 7px 18px 12px; }.side-column { grid-template-columns: 1fr; }.professional-grid, .report-grid { grid-template-columns: 1fr; }.connection-card { align-items: flex-start; flex-direction: column; gap: 15px; padding: 22px; }.connection-illustration { align-self: center; transform: scale(.8); margin: -19px 0 -15px; }.connection-copy h2 { font-size: 22px; }.form-grid { grid-template-columns: 1fr; }.form-footer { align-items: stretch; flex-wrap: wrap; }.form-hint { flex-basis: 100%; }.form-footer .outline-button, .form-footer .primary-button { flex: 1; }.table-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }.search-field { width: 100%; } }
/* Patient address section */
.form-section-label { grid-column: 1 / -1; padding-top: 4px; margin-top: 3px; color: var(--ink); border-top: 1px solid #eff2ed; font-family: Manrope, sans-serif; font-size: 11px; font-weight: 700; }
/* Finance module */
.heading-actions { display: flex; align-items: center; gap: 9px; }
.finance-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.finance-main-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; margin-bottom: 18px; }
.cashflow-panel, .due-panel, .finance-table-panel { overflow: hidden; }
.cashflow-chart { display: flex; height: 245px; padding: 15px 20px 0 12px; }
.chart-y-axis { display: flex; flex: 0 0 43px; flex-direction: column; justify-content: space-between; padding: 3px 0 30px; color: var(--ink-faint); font-size: 8px; text-align: right; }
.chart-area { position: relative; min-width: 0; flex: 1; margin-left: 13px; }
.chart-grid-lines { position: absolute; inset: 4px 0 29px; display: flex; flex-direction: column; justify-content: space-between; }
.chart-grid-lines i { display: block; width: 100%; height: 1px; background: #edf1ed; }
.chart-columns { position: absolute; inset: 4px 0 0; display: flex; justify-content: space-around; gap: 8px; }
.chart-month { display: flex; min-width: 28px; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 9px; }
.chart-month small { color: var(--ink-faint); font-size: 9px; }
.chart-month.current small { color: var(--ink); font-weight: 700; }
.bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; height: 185px; }
.chart-bar { display: block; width: min(22px, 28%); min-height: 5px; border-radius: 5px 5px 2px 2px; }
.chart-bar.income { background: #8bc49d; }.chart-bar.expense { background: #f3a18d; }
.chart-legend { display: flex; align-items: center; gap: 17px; padding: 12px 22px 18px; color: var(--ink-soft); font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }.legend-dot.income { background: #8bc49d; }.legend-dot.expense { background: #f3a18d; }.chart-caption { margin-left: auto; color: var(--ink-faint); }
.due-list { padding: 0 18px; }.due-item { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f0f2ee; }.due-item:last-child { border-bottom: 0; }.due-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; color: #5b9b74; background: var(--mint); border-radius: 9px; font-weight: 700; }.due-icon.expense { color: var(--coral); background: var(--coral-soft); }.due-copy { min-width: 0; flex: 1; }.due-copy strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.due-copy span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }.due-value { font-size: 10px; white-space: nowrap; }.due-value.income { color: #52946d; }.due-value.expense { color: var(--coral); }.empty-finance { padding: 24px 0; color: var(--ink-faint); font-size: 10px; text-align: center; }
.finance-table-panel { margin-bottom: 10px; }.finance-table-header { align-items: center; }.finance-filters { display: flex; align-items: center; gap: 8px; }.finance-filters .search-field { width: 190px; }.finance-filters select { padding: 8px 25px 8px 9px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 10px; }.finance-value.income { color: #55936d; }.finance-value.expense { color: var(--coral); }.pill.coral { color: #c26b5b; background: var(--coral-soft); }
.finance-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }.finance-actions .more-button { color: #64756e; font-size: 10px; letter-spacing: 0; }.finance-actions .danger-action { color: #bf7567; }.finance-actions .more-button:hover { color: var(--ink); text-decoration: underline; }.finance-actions .danger-action:hover { color: #a6493d; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }.summary-panel { overflow: hidden; }.summary-list { padding: 0 18px 14px; }.summary-row { padding: 9px 0; }.summary-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 10px; }.summary-label strong { color: var(--ink); font-size: 10px; }.summary-track { height: 5px; margin-top: 7px; overflow: hidden; background: #edf4ee; border-radius: 99px; }.summary-track i { display: block; height: 100%; background: #79af8c; border-radius: inherit; }.summary-track.method { background: #f9ebe6; }.summary-track.method i { background: #e4937f; }
.profile-hero { display: flex; align-items: center; gap: 13px; padding: 15px; background: #f7fbf7; border: 1px solid #e4eee5; border-radius: 13px; }.profile-avatar { width: 45px; height: 45px; display: grid; place-items: center; color: #fff; background: var(--navy); border-radius: 13px; font-size: 13px; font-weight: 800; }.profile-hero strong, .profile-hero span { display: block; }.profile-hero strong { font-size: 13px; }.profile-hero span { margin-top: 4px; color: var(--ink-faint); font-size: 9px; }.profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 21px 0 3px; }.profile-details div { display: flex; flex-direction: column; gap: 5px; }.profile-details span { color: var(--ink-faint); font-size: 9px; }.profile-details strong { color: var(--ink-soft); font-size: 11px; line-height: 1.4; }.profile-detail-wide { grid-column: 1 / -1; }.report-summary { display: flex; align-items: center; gap: 14px; padding: 21px; }.report-summary-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #4f936c; background: var(--mint); border-radius: 12px; font-size: 21px; }.report-summary h2 { margin: 5px 0 3px; font-family: Manrope, sans-serif; font-size: 21px; letter-spacing: -.04em; }.report-summary p { margin: 0; color: var(--ink-faint); font-size: 10px; }
@media (max-width: 1200px) { .finance-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .finance-main-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .heading-actions { width: 100%; }.heading-actions > * { flex: 1; }.finance-kpi-grid, .finance-summary-grid { grid-template-columns: 1fr; }.finance-filters { align-items: stretch; flex-direction: column; }.finance-filters .search-field { width: 100%; }.finance-filters select { width: 100%; }.finance-table-header { align-items: stretch; flex-direction: column; }.cashflow-chart { height: 210px; padding-right: 12px; }.bar-pair { height: 150px; }.chart-caption { display: none; }.profile-details { grid-template-columns: 1fr; }.profile-detail-wide { grid-column: auto; } }
