:root {
  color-scheme: light;
  --ink: #233238;
  --muted: #89999c;
  --muted-dark: #66777a;
  --line: #e8eeed;
  --surface: #ffffff;
  --canvas: #f6f8f8;
  --teal: #2a8d86;
  --teal-dark: #207971;
  --teal-pale: #e5f4f2;
  --shadow: 0 3px 18px rgba(34, 70, 69, .035);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(42, 141, 134, .3); outline-offset: 2px; }
.app-shell { min-height: 100vh; }
.app-shell[hidden], .auth-screen[hidden] { display: none !important; }
.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 28px 18px; background: radial-gradient(ellipse at 50% 0%, #e8f4f2 0, transparent 48%), var(--canvas); }
.auth-card { width: min(100%, 440px); padding: 38px; border: 1px solid #e7eeec; border-radius: 18px; background: var(--surface); box-shadow: 0 18px 60px rgba(33, 69, 67, .09); }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 34px; color: inherit; text-decoration: none; }
.auth-brand .brand-mark { width: 42px; height: 42px; }
.auth-brand .brand-copy strong { font-size: 20px; }
.auth-heading { margin-bottom: 27px; }
.auth-heading .section-kicker { color: var(--teal); }
.auth-heading h1 { margin: 10px 0 7px; color: #26383b; font: 700 27px/1.2 "Manrope", "DM Sans", sans-serif; }
.auth-heading p { margin: 0; color: var(--muted-dark); font-size: 13px; line-height: 1.55; }
.auth-form { display: grid; gap: 17px; }
.auth-form .form-field { gap: 7px; }
.auth-form .form-field > span { color: #526466; font-size: 12px; font-weight: 600; }
.auth-form input { width: 100%; min-height: 45px; padding: 0 12px; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; }
.auth-form input:focus { border-color: #67aaa4; outline: 3px solid rgba(42, 141, 134, .13); }
.auth-submit { width: 100%; min-height: 45px; justify-content: center; margin-top: 1px; }
.auth-submit:disabled { cursor: not-allowed; opacity: .62; }
.auth-message { margin: 0; padding: 10px 12px; border: 1px solid #f0d6cb; border-radius: 8px; background: #fff8f5; color: #915a46; font-size: 12px; line-height: 1.5; }
.auth-message[hidden] { display: none; }
.auth-footnote { margin: 23px 0 0; padding-top: 17px; border-top: 1px solid #edf1f0; color: #89999a; font-size: 10px; line-height: 1.6; }
.auth-logout { padding: 8px 11px; white-space: nowrap; font-size: 10px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 252px; padding: 25px 17px 16px; background: #fff; border-right: 1px solid #edf1f0; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 35px; color: inherit; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: #e6f4f2; }
.brand-mark svg { width: 30px; fill: #2c8c84; }
.brand-mark .brand-spark { fill: none; stroke: white; stroke-width: 2.8; stroke-linecap: round; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { color: #2b5554; font: 800 21px/1 "Manrope", sans-serif; letter-spacing: .12em; }
.brand-copy small { color: #879b99; font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.workspace-label { margin: 0 9px 15px; color: #b1bfbe; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group-label { padding: 0 10px 8px; color: #9caaaa; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.nav-group-spaced { margin-top: 22px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #718184; text-align: left; font-size: 12.5px; cursor: pointer; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: #f6f9f8; color: #3e6967; }
.nav-item.active { background: #eaf5f3; color: #267e78; font-weight: 600; }
.nav-item.active::before { position: absolute; top: 10px; bottom: 10px; left: -17px; width: 3px; border-radius: 0 4px 4px 0; background: #399b91; content: ""; }
.nav-icon, [data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nav-icon svg, [data-icon] svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { margin-left: auto; color: #7d9293; font-size: 10px; }
.nav-count.soft { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; background: #f1f5f4; color: #718482; }
.nav-active-dot { display: none; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: #4caaa0; }
.sidebar-bottom { margin-top: auto; }
.help-card { display: flex; align-items: center; gap: 9px; margin: 0 2px 17px; padding: 13px 10px; border: 1px solid #edf1f0; border-radius: 9px; background: #fbfcfc; }
.help-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: #f1f4f3; color: #718381; }
.help-icon svg { width: 15px; height: 15px; }
.help-card div { display: grid; gap: 3px; }
.help-card strong { font-size: 10px; font-weight: 600; }
.help-card small { color: #9aa8a8; font-size: 9px; }
.help-arrow { margin-left: auto; color: #9caead; }
.help-arrow svg { width: 14px; height: 14px; }
.profile-button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 6px 1px; border: 0; border-top: 1px solid #edf1f0; background: transparent; text-align: left; cursor: pointer; }
.avatar { display: inline-grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 50%; font-size: 9px; font-weight: 700; }
.avatar-lavender { background: #eee8fb; color: #7763a5; }
.profile-copy { display: grid; flex: 1; gap: 3px; }
.profile-copy strong { font-size: 11px; font-weight: 600; }
.profile-copy small { color: #94a2a2; font-size: 9px; }
.profile-more { color: #98a6a5; }
.profile-more svg { width: 15px; height: 15px; }

.main-area { min-height: 100vh; margin-left: 252px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; height: 67px; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid #eaf0ef; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #92a0a0; font-size: 11px; }
.breadcrumb strong { color: #455659; font-weight: 600; }
.crumb-separator { color: #c5cecd; }
.topbar-actions { display: flex; height: 100%; align-items: center; gap: 20px; }
.today-chip { display: flex; align-items: center; gap: 8px; color: #7e8c8d; font-size: 10px; }
.today-dot { width: 6px; height: 6px; border-radius: 50%; background: #57aa97; }
.icon-button { position: relative; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #7f9292; cursor: pointer; }
.icon-button:hover { background: #f1f6f5; }
.icon-button svg { width: 17px; height: 17px; }
.notification-button i { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: #e39b77; }
.topbar-divider { width: 1px; height: 25px; background: #e9efee; }
.topbar-profile { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: #59696b; font-size: 10px; cursor: pointer; }
.topbar-profile > [data-icon] { color: #9ba9a8; }
.topbar-profile > [data-icon] svg { width: 13px; height: 13px; }
.mobile-menu { display: none; }
.page-content { width: min(1390px, 100%); margin: 0 auto; padding: 35px 40px 22px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; margin: 1px 0 26px; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 7px; color: #94a3a2; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.eyebrow-line { display: inline-block; width: 14px; height: 1px; background: #7db8ad; }
h1, h2, p { margin: 0; }
h1 { margin-top: 9px; color: #26383b; font: 700 25px/1.28 "Manrope", sans-serif; letter-spacing: -.035em; }
.wave { display: inline-block; margin-left: 3px; color: #dbad71; font-size: 18px; vertical-align: 2px; }
.welcome-subtitle { margin-top: 7px; color: #849395; font-size: 11.5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 7px; font-size: 10px; font-weight: 600; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: #318c84; color: #fff; box-shadow: 0 3px 9px rgba(49,140,132,.14); }
.button-primary:hover { background: #267a73; }
.button svg { width: 15px; height: 15px; stroke-width: 2; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.summary-card { position: relative; min-height: 141px; overflow: hidden; padding: 16px 17px 13px; border: 1px solid #e9efee; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.summary-card-top { display: flex; height: 30px; align-items: flex-start; justify-content: space-between; }
.summary-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; }
.summary-icon svg { width: 15px; height: 15px; }
.icon-teal { background: #e6f4f1; color: #439a8e; }
.icon-lilac { background: #f0ecfa; color: #8c78b6; }
.icon-peach { background: #fbf0e8; color: #c78b64; }
.icon-blue { background: #eaf1f9; color: #7795b6; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; }
.trend svg { width: 12px; height: 12px; }
.trend-up { color: #4a9d81; }
.trend-neutral { padding: 4px 7px; border-radius: 5px; background: #f3f6f5; color: #899997; font-size: 8px; }
.summary-label { margin-top: 8px; color: #859495; font-size: 10px; }
.summary-value { margin-top: 2px; color: #2c3d40; font: 700 24px/1.25 "Manrope", sans-serif; letter-spacing: -.03em; }
.summary-value small { color: #91a0a0; font: 500 10px "DM Sans", sans-serif; letter-spacing: 0; }
.summary-value small.currency { color: #718080; font-weight: 600; }
.summary-foot { margin-top: 2px; color: #a2aeae; font-size: 8.5px; }
.sparkline { position: absolute; right: 16px; bottom: 16px; display: flex; height: 24px; align-items: end; gap: 3px; opacity: .8; }
.sparkline i { display: block; width: 3px; border-radius: 4px; background: currentColor; opacity: .52; }
.spark-teal { color: #69b5a6; }.spark-lilac { color: #9a8bc3; }.spark-peach { color: #d69d79; }.spark-blue { color: #88a8c4; }
.sparkline i:nth-child(1) { height: 35%; }.sparkline i:nth-child(2) { height: 55%; }.sparkline i:nth-child(3) { height: 41%; }.sparkline i:nth-child(4) { height: 70%; }.sparkline i:nth-child(5) { height: 54%; }.sparkline i:nth-child(6) { height: 83%; }.sparkline i:nth-child(7) { height: 67%; }.sparkline i:nth-child(8) { height: 100%; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(280px, .9fr); gap: 16px; align-items: stretch; margin-bottom: 17px; }
.panel { border: 1px solid #e8eeed; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.appointments-panel { padding: 18px 20px 7px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-kicker { margin-bottom: 5px; font-size: 8px; }
h2 { color: #304246; font: 700 15px/1.3 "Manrope", sans-serif; letter-spacing: -.025em; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: #388c83; font-size: 9px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.text-button:hover { color: #206c66; }
.text-button svg { width: 13px; height: 13px; }
.appointment-list { margin-top: 10px; }
.appointment-row { display: grid; grid-template-columns: 48px 11px 32px minmax(0, 1fr) auto 20px; min-height: 58px; align-items: center; gap: 9px; border-top: 1px solid #f0f3f2; }
.appointment-time { display: flex; align-items: baseline; gap: 3px; color: #415355; }
.appointment-time strong { font-size: 10px; font-weight: 700; }.appointment-time small { color: #a3aeae; font-size: 8px; }
.time-rail { position: relative; display: flex; height: 100%; justify-content: center; }
.time-rail::before { position: absolute; top: 0; bottom: 0; left: 5px; width: 1px; background: #e9efed; content: ""; }
.time-rail i { z-index: 1; width: 6px; height: 6px; margin-top: 26px; border: 1px solid #78b8ac; border-radius: 50%; background: #fff; }
.time-rail.last::before { bottom: 50%; }
.patient-avatar { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; font-size: 9px; font-weight: 700; }
.avatar-blue { background: #e8f1f8; color: #6f91aa; }.avatar-peach { background: #faeee7; color: #ba8368; }.avatar-mint { background: #e7f3ee; color: #5c9982; }.avatar-yellow { background: #f8f2de; color: #a4904e; }
.appointment-details { display: grid; min-width: 0; gap: 4px; }
.appointment-details strong { overflow: hidden; color: #425357; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.appointment-details > span { overflow: hidden; color: #9aa7a7; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.detail-dot { display: inline-block; width: 3px; height: 3px; margin: 0 4px 2px; border-radius: 50%; background: #b3c2be; }
.status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 8px; }
.status > i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-confirmed { color: #58a58c; }.status-pending { color: #d19d67; }
.row-more { display: grid; width: 22px; height: 24px; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #9eacab; cursor: pointer; }
.row-more:hover { background: #f3f7f6; color: #547674; }.row-more svg { width: 15px; height: 15px; }
.right-column { display: grid; grid-template-rows: 1.15fr .85fr; gap: 15px; }
.week-panel, .reminders-panel { padding: 17px 18px; }
.compact { align-items: flex-start; }
.icon-button.small { width: 25px; height: 25px; margin: -4px -5px 0 0; color: #9aa9a7; }
.icon-button.small svg { width: 15px; height: 15px; }
.week-total { display: flex; align-items: baseline; gap: 7px; margin-top: 10px; }
.week-total strong { color: #344649; font: 700 22px/1 "Manrope", sans-serif; letter-spacing: -.04em; }
.week-total > span { color: #91a09f; font-size: 8px; }.week-total .week-change { margin-left: auto; color: #51a087; font-size: 8px; }
.chart-wrap { display: flex; height: 104px; gap: 9px; margin-top: 7px; }
.chart-y-labels { display: flex; flex-direction: column; justify-content: space-between; padding: 0 0 15px; color: #a8b2b2; font-size: 7px; }
.bar-chart { position: relative; display: flex; flex: 1; justify-content: space-around; padding-bottom: 15px; }
.chart-gridline { position: absolute; right: 0; left: 0; border-top: 1px dashed #edf1f0; }.g1 { top: 0; }.g2 { top: 21%; }.g3 { top: 42%; }.g4 { top: 63%; }.g5 { top: 84%; }
.chart-column { z-index: 1; display: flex; width: 24px; flex-direction: column; align-items: center; justify-content: end; gap: 6px; color: #a2aeae; font-size: 7px; }
.chart-column.selected { color: #368c84; font-weight: 700; }
.bar { position: relative; display: flex; width: 13px; align-items: end; border-radius: 4px 4px 2px 2px; background: #e5f1ef; }
.bar i { display: block; width: 100%; border-radius: inherit; background: #82bdb3; }
.bar-1 { height: 38%; }.bar-1 i { height: 70%; }.bar-2 { height: 64%; }.bar-2 i { height: 68%; }.bar-3 { height: 81%; background: #dcefeb; }.bar-3 i { height: 86%; background: #409b90; }.bar-4 { height: 58%; }.bar-4 i { height: 75%; }.bar-5 { height: 73%; }.bar-5 i { height: 58%; }.bar-6 { height: 29%; }.bar-6 i { height: 55%; }
.reminder-count { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 6px; background: #f2f3fa; color: #8478ab; font-size: 9px; font-weight: 600; }
.reminder-item { display: flex; align-items: center; gap: 9px; padding-top: 12px; margin-top: 11px; border-top: 1px solid #f0f3f2; }
.reminder-symbol { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 7px; }
.reminder-symbol svg { width: 14px; height: 14px; }.reminder-purple { background: #f0edfa; color: #8574b0; }.reminder-green { background: #e8f4ef; color: #569580; }
.reminder-item div { display: grid; flex: 1; gap: 3px; }
.reminder-item strong { color: #516164; font-size: 9px; font-weight: 600; }.reminder-item small { color: #9ba8a8; font-size: 8px; }
.reminder-item button { display: grid; width: 22px; height: 22px; place-items: center; border: 0; background: transparent; color: #a2afad; cursor: pointer; }.reminder-item button svg { width: 14px; height: 14px; }

.patients-panel { padding: 18px 20px 6px; }
.table-actions { display: flex; align-items: center; gap: 17px; }
.search-box { display: flex; width: 170px; height: 29px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #edf1f0; border-radius: 6px; color: #9aa9a7; }
.search-box svg { width: 13px; height: 13px; }.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #556568; font-size: 9px; }.search-box input::placeholder { color: #a8b3b2; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; margin-top: 13px; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead { background: #fafcfc; }
th { height: 31px; padding: 0 11px; color: #9ba9a8; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
td { height: 48px; padding: 0 11px; border-bottom: 1px solid #f0f3f2; color: #829091; font-size: 9px; }
tbody tr:last-child td { border-bottom: 0; }
.table-patient { display: flex; align-items: center; gap: 9px; }
.table-patient .patient-avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 8px; }
.table-patient > span:last-child { display: grid; gap: 3px; }
.table-patient strong { color: #4a5a5d; font-size: 9px; font-weight: 600; }.table-patient small { color: #a0adad; font-size: 8px; }
.table-status { display: inline-block; padding: 4px 7px; border-radius: 5px; font-size: 8px; }
.status-active { background: #eaf5f0; color: #579680; }.status-new { background: #edf2fa; color: #758eae; }.status-follow { background: #f5f0fa; color: #8c79ad; }
.page-footer { display: flex; justify-content: space-between; padding: 17px 1px 0; color: #a6b1b0; font-size: 8px; }
.page-footer > span:last-child { display: inline-flex; align-items: center; gap: 5px; }
.footer-lock svg { width: 12px; height: 12px; color: #8aa8a1; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #d8e9e5; border-radius: 9px; background: white; box-shadow: 0 8px 35px rgba(30, 71, 67, .14); color: #43635f; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-backdrop { display: none; }

/* Secondary sections are lightweight previews, with no patient data persistence. */
.section-placeholder { display: grid; min-height: 365px; place-items: center; padding: 30px; border: 1px solid #e8eeed; border-radius: 10px; background: white; text-align: center; box-shadow: var(--shadow); }
.placeholder-inner { max-width: 390px; }
.placeholder-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 16px; border-radius: 16px; background: #eaf5f3; color: #388e84; }
.placeholder-icon svg { width: 25px; height: 25px; }
.placeholder-inner h2 { font-size: 19px; }
.placeholder-inner p { margin-top: 8px; color: #879696; font-size: 12px; line-height: 1.7; }
.preview-tag { display: inline-block; margin-top: 17px; padding: 6px 9px; border-radius: 6px; background: #f3f6f5; color: #7b8d8b; font-size: 9px; }

/* Pacientes: directorio, ficha y formulario breve del prototipo local. */
[hidden] { display: none !important; }
.patients-view { margin: 0 0 22px; }
.demo-notice { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #f0e6ca; border-radius: 9px; background: #fffaf0; color: #927345; }
.demo-notice > span { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #f8efd9; }
.demo-notice svg { width: 16px; height: 16px; }
.demo-notice div { display: grid; gap: 3px; }.demo-notice strong { font-size: 10px; font-weight: 700; }.demo-notice small { color: #a28d67; font-size: 9px; line-height: 1.45; }
.patients-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 21px 0 12px; }
.patient-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.patients-toolbar h2 { font-size: 19px; }.patients-toolbar p { margin-top: 5px; color: #899799; font-size: 10px; }
.patient-list-panel { overflow: hidden; }
.patient-list-tools { display: flex; align-items: center; gap: 13px; padding: 14px 17px; border-bottom: 1px solid #edf1f0; }
.patient-search { display: flex; width: min(350px, 52%); height: 35px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #e6eceb; border-radius: 7px; color: #8c9d9c; }
.patient-search:focus-within { border-color: #92c9bf; box-shadow: 0 0 0 3px rgba(66, 153, 141, .08); }
.patient-search svg { width: 15px; height: 15px; }
.patient-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #445558; font-size: 10px; }
.patient-search input::placeholder { color: #a6b1b0; }
.filter-label { display: flex; align-items: center; gap: 7px; color: #859494; font-size: 9px; }
.filter-label select { height: 33px; padding: 0 26px 0 9px; border: 1px solid #e8eeed; border-radius: 7px; background: #fff; color: #536466; font-size: 9px; }
.result-count { margin-left: auto; color: #93a09f; font-size: 9px; }
.patient-table-scroll { position: relative; width: 100%; overflow-x: auto; }
.patient-table { width: 100%; min-width: 760px; margin: 0; border-collapse: collapse; text-align: left; }
.patient-table th { height: 37px; padding: 0 13px; background: #fafcfc; color: #9ba9a8; font-size: 8px; }
.patient-table td { height: 58px; padding: 0 13px; border-bottom: 1px solid #f0f3f2; color: #718183; font-size: 9px; }
.patient-row { cursor: pointer; transition: background .12s ease; }.patient-row:hover { background: #fbfdfc; }.patient-row:focus-visible { outline: 2px solid #8dc5bb; outline-offset: -2px; }
.patient-list-code { color: #668985; font-size: 9px; font-weight: 600; }
.patient-list-person { display: flex; min-width: 145px; align-items: center; gap: 9px; }
.patient-list-person > span:last-child { display: grid; gap: 4px; }
.patient-list-person strong { color: #425356; font-size: 10px; font-weight: 600; }.patient-list-person small { color: #a0acab; font-size: 8px; }
.list-avatar, .profile-patient-avatar { display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #eaf4f1; color: #478b7d; font-size: 9px; font-weight: 700; }
.list-avatar { width: 31px; height: 31px; }
.patient-state { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; font-size: 8px; white-space: nowrap; }
.patient-state i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.patient-state.active { background: #eaf5f0; color: #579680; }.patient-state.inactive { background: #f1f3f3; color: #829090; }
.row-open-button { display: grid; width: 26px; height: 26px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #9eacab; cursor: pointer; }.row-open-button:hover { background: #f0f6f4; color: #438d83; }.row-open-button svg { width: 15px; height: 15px; }
.patient-empty { display: grid; min-height: 220px; justify-items: center; align-content: center; padding: 25px; text-align: center; }
.empty-icon { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 11px; border-radius: 13px; background: #eaf5f3; color: #4b9489; }.empty-icon svg { width: 20px; height: 20px; }
.patient-empty > strong { color: #4b5d5f; font-size: 12px; font-weight: 600; }.patient-empty p { max-width: 300px; margin: 5px 0 13px; color: #93a1a0; font-size: 9px; line-height: 1.55; }
.button-secondary { border: 1px solid #e3ebea; background: #fff; color: #5a7774; }.button-secondary:hover { background: #f6faf9; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin: 17px 0 11px; padding: 4px 0; border: 0; background: transparent; color: #528a83; font-size: 10px; font-weight: 600; cursor: pointer; }.back-link svg { width: 15px; height: 15px; }
.patient-profile-card { overflow: hidden; padding: 20px 22px 18px; }
.patient-profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #edf1f0; }
.patient-profile-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
.profile-patient-avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 14px; }
.patient-code { margin-bottom: 4px; color: #87a09b; font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.patient-profile-identity h2 { color: #314447; font-size: 18px; }
.profile-subline { margin-top: 4px; color: #859494; font-size: 9px; }
.profile-actions { display: flex; align-items: center; gap: 8px; }.profile-actions .button { min-height: 32px; font-size: 9px; }
.button-outline-danger { border: 1px solid #eedfdb; background: #fff; color: #a96e61; }.button-outline-danger:hover { background: #fff8f6; }
.profile-content-grid { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 19px 0; }
.profile-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.registration-date { color: #9aa8a7; font-size: 8px; }
.patient-info-grid, .guardian-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.patient-info-item { min-width: 0; padding: 11px 12px; border: 1px solid #edf1f0; border-radius: 8px; background: #fcfdfd; }
.patient-info-item span { display: block; margin-bottom: 5px; color: #9aa7a6; font-size: 8px; }.patient-info-item strong { display: block; overflow-wrap: anywhere; color: #4b5d60; font-size: 10px; font-weight: 600; }
.guardian-section { padding-top: 16px; border-top: 1px solid #edf1f0; }.guardian-info-grid { margin-top: 10px; }
.future-modules { padding-top: 16px; border-top: 1px solid #edf1f0; }
.future-module-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.future-module-grid article { display: grid; min-height: 90px; justify-items: start; align-content: center; gap: 6px; padding: 10px; border: 1px dashed #dfe8e6; border-radius: 8px; background: #fcfdfd; }
.future-module-grid article > span { color: #7caaa1; }.future-module-grid svg { width: 16px; height: 16px; }
.future-module-grid strong { color: #68797a; font-size: 8px; font-weight: 600; }.future-module-grid small { color: #a6b1b0; font-size: 7px; }
.form-dialog { width: min(620px, calc(100vw - 24px)); max-width: 620px; max-height: min(90vh, 800px); overflow-y: auto; padding: 0; border: 1px solid #e5ecea; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 20px 75px rgba(27, 54, 53, .2); }
.form-dialog::backdrop { background: rgba(23, 43, 43, .35); backdrop-filter: blur(2px); }
.form-dialog form { padding: 23px 25px 20px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.dialog-heading h2 { font-size: 19px; }
.dialog-close { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 7px; background: #f4f7f6; color: #7d8d8c; font-size: 21px; line-height: 1; cursor: pointer; }
.dialog-intro { margin-top: 7px; color: #8e9c9b; font-size: 10px; }
.form-grid { display: grid; gap: 13px; }.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-field { display: grid; min-width: 0; gap: 6px; margin-top: 15px; color: #596c6d; font-size: 9px; font-weight: 600; }
.form-field > span small, .more-information summary span { margin-left: 4px; color: #9ba8a7; font-size: 8px; font-weight: 400; }.form-field b { color: #c37d6e; font-weight: 600; }
.form-field > input, .phone-input-wrap input, .extra-phone-row input, .extra-phone-row select { width: 100%; height: 36px; min-width: 0; padding: 0 10px; border: 1px solid #e4ebea; border-radius: 7px; outline: 0; background: #fff; color: #45585a; font-size: 10px; }
.form-field > input:focus, .phone-input-wrap:focus-within, .extra-phone-row input:focus, .extra-phone-row select:focus { border-color: #92c9bf; box-shadow: 0 0 0 3px rgba(66, 153, 141, .08); }
.form-field > input::placeholder, .extra-phone-row input::placeholder { color: #aab5b4; }
.phone-input-wrap { display: flex; height: 36px; align-items: center; border: 1px solid #e4ebea; border-radius: 7px; }
.phone-prefix { padding: 0 8px 0 10px; border-right: 1px solid #e9efee; color: #819391; font-size: 9px; }.phone-input-wrap input { height: 34px; border: 0; box-shadow: none; }
.more-information { margin-top: 18px; border-top: 1px solid #edf1f0; border-bottom: 1px solid #edf1f0; }
.more-information summary { padding: 12px 1px; color: #4d706d; font-size: 10px; font-weight: 600; cursor: pointer; list-style-position: inside; }
.more-information-content { padding: 0 0 14px; }
.extra-phones-block, .guardian-fields { margin-top: 16px; padding-top: 13px; border-top: 1px solid #f0f3f2; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #5c6e6f; font-size: 9px; font-weight: 600; }.field-heading > small { color: #9ca9a8; font-size: 8px; font-weight: 400; }
.inline-add { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: #39877e; font-size: 8px; font-weight: 600; cursor: pointer; }.inline-add svg { width: 13px; height: 13px; }
.field-hint { display: block; margin-top: 7px; color: #9aa7a7; font-size: 8px; }
.extra-phone-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 28px; align-items: end; gap: 9px; margin-top: 9px; }
.extra-phone-row label { display: grid; gap: 5px; color: #849392; font-size: 8px; }.extra-phone-row input, .extra-phone-row select { height: 33px; font-size: 9px; }
.remove-phone { display: grid; width: 27px; height: 30px; place-items: center; margin-bottom: 1px; border: 1px solid #ebefee; border-radius: 6px; background: #fff; color: #a4776f; font-size: 17px; cursor: pointer; }
.form-error { margin-top: 12px; padding: 9px 10px; border: 1px solid #f0d6d0; border-radius: 7px; background: #fff7f5; color: #a25e50; font-size: 9px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }.dialog-actions .button { min-height: 35px; font-size: 9px; }

@media (min-width: 1500px) { .page-content { padding-right: 50px; padding-left: 50px; }.topbar { padding-right: 50px; padding-left: 50px; } }
@media (max-width: 1120px) {
  .sidebar { width: 220px; padding-right: 14px; padding-left: 14px; }.main-area { margin-left: 220px; }.nav-item.active::before { left: -14px; }
  .topbar { padding: 0 25px; }.page-content { padding: 30px 25px 20px; }.summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.content-grid { grid-template-columns: minmax(0, 1.35fr) minmax(250px, .8fr); gap: 12px; }.appointments-panel { padding-right: 14px; padding-left: 14px; }.appointment-row { grid-template-columns: 44px 9px 29px minmax(0,1fr) auto 16px; gap: 7px; }.patient-avatar { width: 28px; height: 28px; }
}
@media (max-width: 820px) {
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 10px 0 30px rgba(27, 60, 58, .08); }.sidebar.open { transform: translateX(0); }.main-area { margin-left: 0; }.mobile-menu { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #637878; cursor: pointer; }.mobile-menu svg { width: 19px; height: 19px; }.topbar { justify-content: flex-start; gap: 10px; padding: 0 21px; }.topbar-actions { margin-left: auto; }.today-chip { display: none; }.mobile-backdrop.visible { position: fixed; inset: 0; z-index: 15; display: block; background: rgba(28, 48, 48, .22); }.page-content { padding: 27px 21px 18px; }.content-grid { grid-template-columns: 1fr; }.right-column { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(205px, auto); }.appointments-panel { padding: 18px 20px 7px; }
}
@media (max-width: 560px) {
  .topbar { height: 58px; padding: 0 14px; }.breadcrumb { gap: 7px; font-size: 10px; }.topbar-actions { gap: 9px; }.topbar-divider, .topbar-profile > span:not(.avatar), .topbar-profile > [data-icon] { display: none; }.topbar-profile { padding: 0; }.topbar-profile .avatar { width: 29px; height: 29px; }
  .page-content { padding: 24px 14px 15px; }.welcome-row { align-items: flex-start; gap: 15px; margin-bottom: 20px; }.eyebrow { font-size: 8px; }h1 { font-size: 21px; }.welcome-subtitle { max-width: 250px; font-size: 10px; }.welcome-row .button { min-height: 33px; padding: 0 9px; font-size: 9px; white-space: nowrap; }.button svg { width: 13px; }
  .summary-grid { gap: 9px; margin-bottom: 12px; }.summary-card { min-height: 130px; padding: 13px 12px 10px; }.summary-value { font-size: 21px; }.summary-foot { font-size: 8px; }.sparkline { right: 12px; bottom: 14px; gap: 2px; }
  .content-grid { gap: 11px; margin-bottom: 12px; }.appointments-panel, .patients-panel { padding: 15px 12px 5px; }.panel-heading { align-items: flex-start; }.text-button { font-size: 8px; }.appointment-row { grid-template-columns: 39px 8px 26px minmax(0, 1fr) 17px; gap: 6px; min-height: 57px; }.appointment-row .status { display: none; }.appointment-time strong { font-size: 9px; }.appointment-time small { font-size: 7px; }.patient-avatar { width: 26px; height: 26px; border-radius: 8px; font-size: 8px; }.appointment-details strong { font-size: 9px; }.appointment-details > span { font-size: 8px; }.appointment-row .row-more { grid-column: 5; }
  .right-column { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 10px; }.week-panel, .reminders-panel { padding: 15px; }.chart-wrap { height: 112px; }.reminder-item { padding-top: 10px; margin-top: 9px; }
  .patients-panel .panel-heading { flex-direction: column; }.table-actions { width: 100%; justify-content: space-between; gap: 8px; }.search-box { flex: 1; max-width: 220px; }.table-scroll { margin-right: -12px; }.table-scroll table { min-width: 570px; }.page-footer { gap: 8px; font-size: 7px; }
}
@media (max-width: 680px) {
  .patients-toolbar { align-items: flex-start; }.patient-toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }.patients-toolbar .button { min-height: 34px; padding: 0 10px; font-size: 9px; white-space: nowrap; }
  .patient-list-tools { flex-wrap: wrap; gap: 9px; padding: 11px; }.patient-search { width: 100%; max-width: none; flex-basis: 100%; }.filter-label { margin-right: auto; }.result-count { margin-left: 0; }
  .patient-profile-card { padding: 15px 13px; }.patient-profile-heading { align-items: flex-start; flex-direction: column; gap: 13px; }.profile-actions { width: 100%; flex-wrap: wrap; }.profile-actions .patient-state { margin-right: auto; }
  .patient-info-grid, .guardian-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.future-module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.future-module-grid article:last-child { grid-column: 1 / -1; }
  .form-dialog form { padding: 19px 15px 15px; }.two-columns { grid-template-columns: 1fr; gap: 0; }.extra-phone-row { grid-template-columns: 95px minmax(0,1fr) 28px; gap: 6px; }
}
