:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1e2934; background: #f4f6f8; font-synthesis: none; text-rendering: optimizeLegibility; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 236px; padding: 28px 16px 18px; background: #fff; border-right: 1px solid #e8edf1; z-index: 2; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px; color: #182432; font-size: 15px; font-weight: 800; letter-spacing: -.4px; text-decoration: none; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { color: inherit; font-size: 15px; font-weight: 800; letter-spacing: -.4px; }
.brand-copy b { display: block; color: #8995a2; font-size: 9px; font-weight: 650; letter-spacing: .2px; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; color: white; background: #245bce; font-size: 19px; font-weight: 800; box-shadow: 0 4px 10px #245bce2e; }
.brand-logo { display: block; flex: 0 0 auto; width: 38px; height: 38px; object-fit: contain; }
.nav-caption { margin: 47px 12px 12px; color: #a0a9b3; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
.navigation { display: grid; flex: 1 1 auto; min-height: 0; gap: 5px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #aeb9c4 transparent; }
.navigation::-webkit-scrollbar { width: 8px; }
.navigation::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #aeb9c4; background-clip: padding-box; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 12px; border: 0; border-radius: 8px; color: #687583; background: transparent; text-align: left; font-size: 13px; font-weight: 600; transition: background .15s, color .15s; }
.nav-link:hover { color: #245bce; background: #f4f7fd; }
.nav-link.active { color: #245bce; background: #edf3ff; }
.nav-icon { width: 17px; color: #8794a2; text-align: center; font-size: 18px; }
.nav-link.active .nav-icon { color: #245bce; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 13px 11px 0; border-top: 1px solid #edf0f3; color: #84909c; font-size: 11px; }
.connection-dot, .environment-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2e9b6f; }
.main-content { min-height: 100vh; margin-left: 236px; padding: 0 42px 22px; }
.topbar { display: flex; height: 71px; align-items: center; gap: 11px; border-bottom: 1px solid #e8edf1; }
.topbar-spacer { flex: 1; }
.environment-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e2e8ed; border-radius: 20px; color: #6b7784; background: #fff; font-size: 11px; font-weight: 600; }
.icon-button { width: 33px; height: 33px; border: 1px solid #e2e8ed; border-radius: 9px; color: #637180; background: #fff; font-size: 19px; }
.icon-button:hover { color: #245bce; border-color: #bdd0f5; }
.mobile-brand { display: none; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; }
.mobile-brand .brand-logo { width: 32px; height: 32px; }
.mobile-view-label, .mobile-view-picker, .mobile-menu-button, .mobile-menu-backdrop { display: none; }
.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: #f4f6f8; }
.auth-screen[hidden] { display: none; }
.auth-card { display: grid; width: min(100%,410px); gap: 14px; padding: 30px; border: 1px solid #e7ebef; border-radius: 14px; background: #fff; box-shadow: 0 12px 40px #19355010; }
.auth-card .brand-logo { width: 42px; height: 42px; }
.auth-card .eyebrow { margin: 0; }
.auth-card h1 { margin: -8px 0 0; }
.auth-card .subheading { margin: -9px 0 4px; }
.auth-card label { display: grid; gap: 7px; color: #536373; font-size: 12px; font-weight: 650; }
.auth-card input { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid #dce3e9; border-radius: 7px; color: #344352; background: #fff; font: inherit; }
.auth-card .brand-lockup { padding: 0; margin-bottom: 2px; }
.password-control { display: flex; align-items: stretch; min-width: 0; }
.password-control input { flex: 1; min-width: 0; border-radius: 7px 0 0 7px; }
.password-toggle { min-width: 67px; padding: 0 10px; border: 1px solid #dce3e9; border-left: 0; border-radius: 0 7px 7px 0; color: #245bce; background: #f8faff; font-size: 11px; font-weight: 650; }
.password-toggle:hover { background: #edf3ff; }
.password-toggle:focus-visible { position: relative; z-index: 1; outline: 2px solid #245bce; outline-offset: 2px; }
.auth-card .primary-button { min-height: 44px; justify-content: center; }
.auth-error { margin: 0; color: #a53e35; font-size: 12px; }
.auth-error[hidden] { display: none; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 31px 0 22px; }
.eyebrow { margin: 0 0 7px; color: #6383bd; font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; color: #182432; font: 800 27px Manrope, sans-serif; letter-spacing: -.8px; }
.subheading { margin-bottom: 0; color: #8793a0; font-size: 13px; }
.date-control { display: flex; align-items: center; gap: 10px; color: #7b8793; font-size: 11px; font-weight: 600; }
.date-control input { min-height: 36px; padding: 0 10px; border: 1px solid #e1e7ec; border-radius: 7px; color: #374554; background: #fff; font-size: 12px; }
.incident-date-controls { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; margin-bottom: 21px; }
.date-range { display: flex; align-items: end; gap: 8px; }
.date-range label { display: grid; gap: 5px; color: #7b8793; font-size: 10px; }
.date-range input { min-height: 34px; padding: 0 8px; border: 1px solid #e1e7ec; border-radius: 7px; color: #374554; background: #fff; font-size: 11px; }
.notice-panel { margin-bottom: 16px; padding: 13px 16px; border: 1px solid #e3e8ed; border-radius: 9px; color: #687684; background: #f7f8fa; font-size: 12px; line-height: 1.55; }
.metric-card { display: grid; gap: 7px; padding: 16px 18px; border: 1px solid #e7ebef; border-radius: 11px; background: #fff; box-shadow: 0 1px 3px #19355008; }
.metric-shortcut { width: 100%; color: inherit; text-align: left; transition: border-color .15s, box-shadow .15s; }
.metric-shortcut:hover, .metric-shortcut:focus-visible { border-color: #b8cbee; box-shadow: 0 3px 12px #245bce12; }
.metric-card span { color: #84909c; font-size: 11px; font-weight: 600; }
.metric-card strong { color: #1c2b3a; font-size: 24px; font-weight: 800; letter-spacing: -.7px; }
.metric-card small { color: #a1aab3; font-size: 10px; }
.pnl-panel { border-color: #dce4ee; }
.pnl-table th { padding-top: 10px; padding-bottom: 10px; }
.pnl-table td { padding-top: 15px; padding-bottom: 15px; font-size: 17px; font-weight: 800; }
.pnl-table td.pnl-positive { color: #147a54; background: #eaf7f0; }
.pnl-table td.pnl-negative { color: #b93630; background: #fff0ef; }
.pnl-table td.pnl-neutral { color: #566473; background: #f2f4f6; }
.pnl-note { margin: 0 15px 13px; }
.panel { margin-bottom: 17px; overflow: hidden; border: 1px solid #e7ebef; border-radius: 11px; background: #fff; box-shadow: 0 1px 3px #19355008; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px 14px; }
.panel-heading h2 { margin: 0 0 4px; color: #243342; font-size: 14px; font-weight: 700; }
.panel-heading p { margin: 0; color: #97a1ab; font-size: 11px; }
.daily-plan-summary { margin: 0 19px 11px; color: #516170; font-size: 12px; font-weight: 700; }
.daily-plan-list { display: grid; gap: 8px; padding: 0 19px; }
.daily-plan-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid #e7ebef; border-radius: 9px; background: #fbfcfd; }
.daily-plan-details { min-width: 0; }
.daily-plan-details .text-button { font-size: 12px; font-weight: 700; }
.daily-plan-details p { margin: 4px 0 0; color: #84909c; font-size: 11px; overflow-wrap: anywhere; }
.daily-plan-status { flex: none; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.daily-plan-status.registered { color: #147a54; background: #eaf7f0; }
.daily-plan-status.unregistered { color: #536273; background: #eef1f4; }
.daily-plan-note { margin: 11px 19px 15px; color: #84909c; font-size: 10px; line-height: 1.5; }
.search { display: flex; align-items: center; gap: 8px; width: 224px; height: 34px; padding: 0 10px; border: 1px solid #e7ebef; border-radius: 7px; color: #a5afb8; }
.search input { width: 100%; border: 0; outline: 0; color: #364554; background: transparent; font-size: 11px; }
.search input::placeholder { color: #a7b0b9; }
.filter-row { display: flex; align-items: center; gap: 7px; padding: 0 19px 12px; }
.filter { padding: 6px 10px; border: 0; border-radius: 6px; color: #7f8b97; background: transparent; font-size: 10px; font-weight: 600; }
.filter:hover { background: #f3f6fa; }
.filter.active { color: #245bce; background: #edf3ff; }
.updated { margin-left: auto; color: #a1aab3; font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead { background: #fafbfc; }
th { padding: 10px 14px; color: #9aa4ad; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
th:first-child, td:first-child { padding-left: 19px; }
td { padding: 11px 14px; border-top: 1px solid #f0f2f4; color: #63707d; font-size: 11px; }
td b { color: #324252; font-weight: 700; }
.empty-cell { height: 90px; color: #9ba5ae; text-align: center; white-space: normal; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; }
.status.open { color: #188660; background: #eaf7f0; }
.status.closed { color: #6d7885; background: #f0f2f4; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.link-button { color: #3669c0; text-decoration: none; font-size: 10px; font-weight: 600; }
.link-button:hover { text-decoration: underline; }
.panel-footer { display: flex; justify-content: space-between; padding: 11px 19px; border-top: 1px solid #f0f2f4; color: #9aa4ad; font-size: 10px; }
.form-panel { padding-bottom: 17px; }
.inline-form { display: flex; align-items: end; gap: 12px; padding: 0 19px; }
#catalog-form { flex-wrap: wrap; }
#catalog-form .schedule-days { flex: 1 1 100%; min-width: 0; margin: 0; padding: 11px 13px; border: 1px solid #e7ebef; border-radius: 9px; }
#catalog-form .schedule-days legend { padding: 0 5px; color: #687684; font-size: 10px; font-weight: 700; }
#catalog-form .weekday-options { display: flex; flex-wrap: wrap; gap: 7px; }
#catalog-form .weekday-options label { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #e1e7ec; border-radius: 7px; color: #536373; background: #fff; }
#catalog-form .weekday-options input { width: auto; min-height: auto; margin: 0; accent-color: #245bce; }
#catalog-form .schedule-days .field-help { margin-top: 8px; }
.inline-form label { display: grid; flex: 1; gap: 6px; color: #687684; font-size: 10px; font-weight: 600; }
.inline-form input { width: 100%; min-height: 37px; padding: 0 10px; border: 1px solid #e1e7ec; border-radius: 7px; outline: none; color: #344352; background: #fff; font-size: 11px; }
.inline-form input:focus { border-color: #8eafea; box-shadow: 0 0 0 3px #245bce12; }
.optional { color: #a3adb6; font-weight: 400; }
.primary-button { min-height: 37px; padding: 0 14px; border: 0; border-radius: 7px; color: #fff; background: #245bce; font-size: 10px; font-weight: 700; white-space: nowrap; }
.primary-button:hover { background: #194cae; }
.form-actions { display: flex; align-items: center; gap: 8px; }
.operator-form { display: grid; gap: 14px; padding: 0 19px; }
.operator-required-fields { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.operator-required-fields label { display: grid; min-width: 0; gap: 6px; color: #526273; font-size: 12px; font-weight: 650; }
.operator-required-fields input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #d7e0e8; border-radius: 7px; outline: none; color: #263747; background: #fff; font-size: 14px; }
.operator-required-fields input:focus { border-color: #8eafea; box-shadow: 0 0 0 3px #245bce12; }
.field-help { color: #8290a0; font-size: 11px; font-weight: 400; }
.operator-form .advanced-fields { min-width: 0; padding: 12px 0 2px; border-top: 1px solid #f0f2f4; }
.advanced-fields summary { width: fit-content; color: #52677f; cursor: pointer; font-size: 11px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 13px; }
.field-grid label { display: grid; gap: 6px; color: #687684; font-size: 10px; font-weight: 600; }
.field-grid input:not([type=checkbox]), .field-grid textarea { width: 100%; min-height: 35px; padding: 7px 9px; border: 1px solid #e1e7ec; border-radius: 7px; outline: none; color: #344352; background: #fff; font-size: 11px; }
.field-grid label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
.field-grid input[type=checkbox] { accent-color: #245bce; }
.secondary-button { min-height: 29px; padding: 0 10px; border: 1px solid #e1e7ec; border-radius: 6px; color: #64717e; background: #fff; font-size: 10px; font-weight: 600; }
.secondary-button:hover { color: #245bce; border-color: #b8cbee; }
.danger-button { min-height: 29px; margin-left: 4px; padding: 0 10px; border: 1px solid #f0d4d1; border-radius: 6px; color: #a53e35; background: #fff; font-size: 10px; font-weight: 600; }
.danger-button:hover { border-color: #dfa29c; background: #fff8f7; }
.edit-dialog { width: min(480px, calc(100vw - 28px)); padding: 0; border: 1px solid #e1e7ec; border-radius: 12px; color: #1e2934; box-shadow: 0 18px 60px #1d344433; }
.edit-dialog::backdrop { background: #18243266; }
.edit-dialog form { display: grid; gap: 14px; padding: 22px; }
.edit-dialog h2 { margin: 0; font-size: 17px; }
.edit-dialog label { display: grid; gap: 6px; color: #687684; font-size: 11px; font-weight: 600; }
.edit-dialog input, .edit-dialog textarea, .edit-dialog select { width: 100%; padding: 9px; border: 1px solid #e1e7ec; border-radius: 7px; color: #344352; background: #fff; font: inherit; font-size: 12px; }
.request-action { margin: 0 4px 0 0; }
.request-action.primary-button { min-height: 30px; }
.operator-form .form-actions { padding-bottom: 2px; }
.toast { position: fixed; right: 22px; bottom: 20px; z-index: 5; max-width: min(420px, calc(100vw - 32px)); margin: 0; padding: 12px 16px; border: 1px solid #dce5ef; border-radius: 9px; color: #334556; background: white; box-shadow: 0 8px 26px #1d344421; font-size: 12px; }
.toast.error { color: #a53e35; border-color: #f0d4d1; background: #fffafa; }
.app-footer { margin-top: 20px; color: #a4adb5; font-size: 10px; letter-spacing: .25px; }
.app-footer span { padding: 0 4px; color: #c3c9cf; }
.view[hidden] { display: none; }
.view.active { display: block; }
.notification-badge { min-width: 17px; height: 17px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 4px; border-radius: 9px; color: #fff; background: #d24d43; font-size: 9px; }
.calendar-legend { display: flex; gap: 18px; margin: 0 0 12px; color: #687684; font-size: 11px; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 9px; height: 9px; border-radius: 3px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border: 1px solid #e7ebef; border-radius: 11px; background: #fff; }
.calendar-agenda { display: none; }
.calendar-weekday { padding: 11px 9px; color: #7c8995; background: #fafbfc; font-size: 10px; font-weight: 700; text-align: center; }
.calendar-day { min-height: 116px; padding: 8px; border-top: 1px solid #edf0f3; border-right: 1px solid #edf0f3; overflow: hidden; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day > b { display: grid; width: 23px; height: 23px; place-items: center; margin-bottom: 5px; color: #526273; font-size: 11px; }
.calendar-day.today > b { border-radius: 50%; color: #fff; background: #245bce; }
.calendar-day.outside { background: #fafbfc; }
.calendar-event { overflow: hidden; margin: 3px 0; padding: 4px 5px; border-radius: 4px; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.event-service { color: #1d5a9e; background: #e9f2ff; }
.event-planned { color: #6842a5; background: #f0eafe; }
.event-timeoff { color: #315f9d; background: #eaf2fc; }
.event-payment { color: #187255; background: #e7f7ef; }
.progress-list { display: grid; gap: 17px; padding: 3px 19px 19px; }
.progress-item { display: grid; gap: 7px; }
.progress-heading { display: flex; justify-content: space-between; gap: 12px; color: #536373; font-size: 11px; }
.progress-heading b { color: #293a4a; }
.progress-track { height: 10px; overflow: hidden; border-radius: 7px; background: #edf1f5; }
.progress-track i { display: block; height: 100%; min-width: 0; border-radius: inherit; background: #4d7dd8; transition: width .2s; }
.progress-track i.complete { background: #21a477; }
.progress-item small { color: #8a96a1; font-size: 10px; }
.compact-metrics { padding: 0 19px 13px; margin: 0; }
.variance-good { color: #16845f; font-weight: 700; }
.variance-over { color: #b2543b; font-weight: 700; }
.notification-list { display: grid; gap: 9px; }
.notification-tabs { display: flex; gap: 6px; margin: 0 0 12px; padding: 4px; width: fit-content; border: 1px solid #e7ebef; border-radius: 9px; background: #f5f7fa; }
.notification-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; color: #687684; background: transparent; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.notification-tab span { display: inline-grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 10px; color: #687684; background: #e7ebef; font-size: 10px; }
.notification-tab.active { color: #245bce; background: #fff; box-shadow: 0 1px 3px #1723341a; }
.notification-tab.active span { color: #fff; background: #245bce; }
.notification-card { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 14px 16px; border: 1px solid #e7ebef; border-radius: 9px; background: #fff; }
.notification-card.unread { border-color: #bcd0f3; background: #f8faff; }
.notification-card b { color: #314354; font-size: 12px; }
.notification-card p { grid-column: 1; margin: 0; color: #687684; font-size: 11px; }
.notification-card small { color: #98a2ab; font-size: 10px; }
.notification-card button { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.check-label { display: flex !important; align-items: center; gap: 8px !important; min-height: 37px; }
.check-label input { accent-color: #245bce; }
.text-button { padding: 0; border: 0; color: #245bce; background: transparent; font: inherit; font-weight: 650; text-align: left; }
.text-button:hover { text-decoration: underline; }
.field-help { display: block; margin-top: 2px; line-height: 1.4; }
.period-toolbar { display: flex; align-items: end; gap: 10px; margin: 0 0 14px; padding: 12px 15px; border: 1px solid #e7ebef; border-radius: 9px; background: #fff; }
.period-toolbar label { display: grid; gap: 5px; color: #687684; font-size: 10px; font-weight: 600; }
.period-toolbar input, .period-toolbar select { min-height: 35px; padding: 0 9px; border: 1px solid #e1e7ec; border-radius: 6px; color: #344352; background: #fff; font: inherit; font-size: 11px; }
.financial-metrics { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); }
.finance-period-label { margin: -8px 0 13px; font-size: 11px; }
.finance-form { display: grid; gap: 13px; padding: 0 19px 4px; }
.finance-group { min-width: 0; margin: 0; padding: 13px; border: 1px solid #e7ebef; border-radius: 9px; }
.finance-group legend { padding: 0 6px; color: #49617d; font-size: 11px; font-weight: 700; }
.finance-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.finance-fields label, .history-filters label { display: grid; min-width: 0; gap: 6px; color: #687684; font-size: 11px; font-weight: 600; }
.finance-fields input, .finance-fields select, .history-filters input, .history-filters select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #dce3e9; border-radius: 7px; color: #344352; background: #fff; font: inherit; font-size: 12px; }
.finance-tax-fields { grid-template-columns: repeat(2, minmax(180px, 240px)) minmax(0, 1fr); }
.finance-repeat-fields { grid-template-columns: repeat(2, minmax(180px, 240px)) minmax(0, 1fr); }
.finance-help { align-self: center; margin: 0; }
.finance-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 1px 0; }
.finance-form-footer .field-help { max-width: 520px; }
.finance-form-footer .form-actions { flex-shrink: 0; }
.history-filters { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 11px; align-items: end; padding: 0 19px 15px; }
.history-filters label:last-of-type { grid-column: span 2; }
.history-filters .secondary-button { min-height: 40px; }
.entity-link { max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.profile-dialog { width: min(980px,calc(100vw - 28px)); max-height: min(90vh,900px); overflow: auto; padding: 20px; border: 1px solid #e1e7ec; border-radius: 12px; color: #1e2934; background: #fff; box-shadow: 0 18px 60px #1d344433; }
.profile-dialog::backdrop { background: #18243266; }
.profile-dialog-heading, .profile-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.profile-dialog-heading h2 { margin: 0; font-size: 20px; }
.operator-profile-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 9px; margin: 17px 0 22px; }
.profile-detail { display: grid; gap: 5px; padding: 10px; border: 1px solid #edf0f3; border-radius: 7px; }
.profile-detail small { color: #8995a0; font-size: 10px; }
.profile-detail b { color: #344352; font-size: 11px; overflow-wrap: anywhere; }
.profile-calendar-heading { margin-bottom: 10px; }
.profile-calendar-heading h3 { margin: 0; color: #344352; font-size: 14px; }
.profile-calendar-heading label { display: flex; align-items: center; gap: 8px; color: #687684; font-size: 11px; }
.profile-calendar-heading input { min-height: 34px; border: 1px solid #e1e7ec; border-radius: 7px; color: #344352; background: #fff; }
.profile-calendar .calendar-day { min-height: 82px; }
.service-photos-section { margin: 18px 0 22px; }
.service-photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 12px; }
.service-photo-card { min-width: 0; overflow: hidden; border: 1px solid #e1e7ec; border-radius: 9px; background: #fff; }
.service-photo-preview { position: relative; display: grid; min-height: 145px; place-items: center; overflow: hidden; color: #687684; background: #f3f5f8; text-decoration: none; }
.service-photo-preview img { display: block; width: 100%; height: 175px; object-fit: cover; }
.service-photo-preview img[hidden] { display: none; }
.service-photo-unavailable { padding: 18px; color: #687684; font-size: 12px; text-align: center; }
.service-photo-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; color: #687684; font-size: 10px; }
.service-photo-drive-link { flex: 0 0 auto; color: #245bce; font-weight: 700; }
.service-photos-empty { grid-column: 1 / -1; margin: 0; padding: 12px; border-radius: 8px; color: #718091; background: #f6f8fa; font-size: 12px; }
.service-photos-note { padding: 4px 0 0; background: transparent; font-size: 11px; }
html[data-theme="dark"] body { color: #e4e9ef; background: #151a20; }
html[data-theme="dark"] .topbar { color: #eef2f6; background: #151a20; }
html[data-theme="dark"] .mobile-brand { color: #eef2f6; }
html[data-theme="dark"] .sidebar, html[data-theme="dark"] .panel, html[data-theme="dark"] .metric-card, html[data-theme="dark"] .profile-dialog, html[data-theme="dark"] .edit-dialog, html[data-theme="dark"] .notification-card, html[data-theme="dark"] .period-toolbar { color: #e4e9ef; background: #20262e; border-color: #343d48; }
html[data-theme="dark"] .main-content, html[data-theme="dark"] .topbar, html[data-theme="dark"] .sidebar-footer { border-color: #343d48; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] .metric-card strong, html[data-theme="dark"] .brand, html[data-theme="dark"] .profile-detail b { color: #eef2f6; }
html[data-theme="dark"] .subheading, html[data-theme="dark"] .panel-heading p, html[data-theme="dark"] td, html[data-theme="dark"] .metric-card span, html[data-theme="dark"] .profile-detail small { color: #a7b2bf; }
html[data-theme="dark"] .nav-link { color: #bac4d0; }
html[data-theme="dark"] .nav-link.active { color: #a9c5ff; background: #29394f; }
html[data-theme="dark"] .nav-link:hover { color: #a9c5ff; background: #29313b; }
html[data-theme="dark"] .navigation { scrollbar-color: #657181 transparent; }
html[data-theme="dark"] .navigation::-webkit-scrollbar-thumb { background: #657181; background-clip: padding-box; }
html[data-theme="dark"] th, html[data-theme="dark"] .calendar-weekday { color: #aab5c1; background: #252d36; }
html[data-theme="dark"] td, html[data-theme="dark"] th, html[data-theme="dark"] .calendar-day, html[data-theme="dark"] .profile-detail { border-color: #343d48; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea, html[data-theme="dark"] .date-control input, html[data-theme="dark"] .date-range input { color: #e4e9ef; background: #171c22; border-color: #3a4552; }
html[data-theme="dark"] .calendar-grid { border-color: #343d48; background: #20262e; }
html[data-theme="dark"] .calendar-day.outside { background: #1b2027; }
html[data-theme="dark"] #catalog-form .schedule-days { border-color: #343d48; }
html[data-theme="dark"] #catalog-form .schedule-days legend, html[data-theme="dark"] #catalog-form .weekday-options label { color: #b7c4d3; }
html[data-theme="dark"] #catalog-form .weekday-options label { background: #171c22; border-color: #3a4552; }
html[data-theme="dark"] .event-planned { color: #d1bbff; background: #3a2f50; }
html[data-theme="dark"] .secondary-button, html[data-theme="dark"] .icon-button { color: #d5dce4; background: #252d36; border-color: #3a4552; }
html[data-theme="dark"] .password-toggle { color: #b7ceff; background: #252d36; border-color: #3a4552; }
html[data-theme="dark"] .notification-card p { color: #bbc5d0; }
html[data-theme="dark"] .notification-card.unread { background: #222e3e; border-color: #3e5d87; }
html[data-theme="dark"] .daily-plan-summary { color: #d1d9e2; }
html[data-theme="dark"] .daily-plan-item { background: #252d36; border-color: #343d48; }
html[data-theme="dark"] .daily-plan-details p, html[data-theme="dark"] .daily-plan-note { color: #a7b2bf; }
html[data-theme="dark"] .daily-plan-status.unregistered { color: #d1d9e2; background: #343d48; }
html[data-theme="dark"] .mobile-agenda-day { background: #20262e; border-color: #343d48; }
html[data-theme="dark"] .mobile-agenda-event p { color: #c0cad5; }
html[data-theme="dark"] .notification-tabs { background: #171c22; border-color: #343d48; }
html[data-theme="dark"] .notification-tab { color: #bac4d0; }
html[data-theme="dark"] .notification-tab span { color: #d5dce4; background: #343d48; }
html[data-theme="dark"] .notification-tab.active { color: #a9c5ff; background: #29394f; box-shadow: none; }
html[data-theme="dark"] .notification-tab.active span { color: #fff; background: #245bce; }
html[data-theme="dark"] .notice-panel { color: #b7c4d3; background: #20262e; border-color: #343d48; }
html[data-theme="dark"] .event-timeoff { color: #b7ceff; background: #29394f; }
html[data-theme="dark"] .pnl-table td.pnl-positive { color: #91e0b7; background: #1d3c30; }
html[data-theme="dark"] .pnl-table td.pnl-negative { color: #ffaaa5; background: #482726; }
html[data-theme="dark"] .pnl-table td.pnl-neutral { color: #d1d8e0; background: #29313b; }
html[data-theme="dark"] .finance-group { border-color: #343d48; }
html[data-theme="dark"] tr { background: #20262e; border-color: #343d48; }
html[data-theme="dark"] td { border-color: #343d48; }
html[data-theme="dark"] .finance-group legend { color: #b7c9e5; }
html[data-theme="dark"] .finance-fields input, html[data-theme="dark"] .finance-fields select, html[data-theme="dark"] .history-filters input, html[data-theme="dark"] .history-filters select { color: #e4e9ef; background: #171c22; border-color: #3a4552; }
html[data-theme="dark"] .edit-dialog::backdrop, html[data-theme="dark"] .profile-dialog::backdrop { background: #0009; }
html[data-theme="dark"] .service-photo-card { border-color: #343d48; background: #20262e; }
html[data-theme="dark"] .service-photo-preview { color: #b2bdc9; background: #171c22; }
html[data-theme="dark"] .service-photo-caption, html[data-theme="dark"] .service-photo-unavailable { color: #b2bdc9; }
html[data-theme="dark"] .service-photos-empty { color: #b2bdc9; background: #252d36; }
html[data-theme="dark"] .service-photos-note { background: transparent; }

@media (max-width: 1000px) {
  .main-content { padding-right: 24px; padding-left: 24px; }
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form label { min-width: 210px; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .navigation { max-height: calc(100vh - 160px); overflow-y: auto; }
  .calendar-day { min-height: 95px; padding: 5px; }
  .calendar-event { font-size: 8px; }
}
@media (max-width: 760px) {
  .auth-card { padding: 24px 19px; }
  .sidebar { position: fixed; inset: 0 auto 0 0; display: flex; width: min(310px, 86vw); padding: max(24px,env(safe-area-inset-top)) 15px max(18px,env(safe-area-inset-bottom)); border-right: 1px solid #dce3e9; border-radius: 0 14px 14px 0; box-shadow: 16px 0 45px #11182730; transform: translateX(-110%); transition: transform .22s ease; z-index: 21; }
  .sidebar.open { transform: translateX(0); }
  .sidebar .navigation { display: grid; max-height: none; overflow-y: auto; }
  .sidebar .nav-caption { margin-top: 25px; }
  .mobile-menu-backdrop { position: fixed; inset: 0; z-index: 20; border: 0; background: #0b1220a6; }
  .app-shell.menu-open .mobile-menu-backdrop { display: block; }
  .main-content { width: 100%; min-width: 0; margin: 0; padding: 0 12px 20px; }
  .topbar { position: sticky; top: 0; z-index: 3; display: grid; width: calc(100% + 24px); height: auto; min-height: 58px; grid-template-columns: minmax(0,1fr) repeat(4,38px); grid-template-rows: 42px; gap: 6px; margin: 0 -12px 8px; padding: max(7px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 7px max(12px,env(safe-area-inset-left)); border-bottom: 1px solid #e8edf1; background: #f4f6f8; }
  html[data-theme="dark"] .topbar { background: #151a20; }
  .mobile-brand { display: flex; min-width: 0; grid-column: 1; grid-row: 1; gap: 7px; overflow: hidden; font-size: 13px; white-space: nowrap; }
  .mobile-brand .brand-logo { width: 29px; height: 29px; }
  .mobile-view-label { display: none; }
  .topbar .topbar-spacer, .topbar .environment-pill { display: none; }
  #mobile-menu-button { display: block; grid-column: 2; grid-row: 1; width: 38px; height: 38px; padding: 0; font-size: 19px; }
  #refresh-button { grid-column: 3; grid-row: 1; width: 38px; height: 38px; }
  #password-open-button { grid-column: 4; grid-row: 1; }
  #logout-button { grid-column: 5; grid-row: 1; }
  #password-open-button, #logout-button { width: 38px; min-width: 38px; min-height: 38px; padding: 0; overflow: hidden; font-size: 0; }
  #password-open-button::before { content: '⌑'; font-size: 21px; }
  #logout-button::before { content: '↪'; font-size: 18px; }
  .page-heading { align-items: start; flex-direction: column; margin: 20px 0 16px; }
  .page-heading:has(.date-control) { flex-direction: column; align-items: stretch; }
  .date-control { justify-content: space-between; }
  .date-control input { min-height: 42px; }
  h1 { font-size: clamp(21px,6vw,24px); line-height: 1.2; overflow-wrap: anywhere; }
  .subheading { font-size: 12px; line-height: 1.45; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .date-range { align-items: stretch; flex-wrap: wrap; }
  .date-range label { flex: 1; }
  .metric-card { gap: 5px; padding: 12px 10px; }
  .metric-card span { font-size: 9px; }
  .metric-card strong { font-size: 20px; }
  .metric-card small { font-size: 9px; }
  .panel-heading { align-items: start; flex-direction: column; padding: 15px 14px 12px; }
  .daily-plan-summary { margin: 0 14px 10px; }
  .daily-plan-list { padding: 0 12px; }
  .daily-plan-item { align-items: start; flex-direction: column; gap: 8px; }
  .daily-plan-note { margin-right: 14px; margin-left: 14px; }
  .search { width: 100%; }
  .filter-row { padding-right: 13px; padding-left: 13px; }
  .updated { font-size: 9px; }
  .table-wrap { min-width: 0; overflow: visible; padding: 0 8px 9px; }
  table { display: block; white-space: normal; }
  thead { display: none; }
  tbody { display: grid; gap: 9px; }
  tr { display: grid; overflow: hidden; border: 1px solid #e7ebef; border-radius: 9px; background: #fff; }
  td { display: grid; grid-template-columns: minmax(72px, 34%) minmax(0,1fr); align-items: start; gap: 8px; min-width: 0; padding: 9px 10px; border-top: 1px solid #f0f2f4; overflow-wrap: anywhere; font-size: 12px; }
  td:first-child { padding-left: 11px; }
  td::before { content: attr(data-label); color: #8995a0; font-size: 10px; font-weight: 700; }
  td.empty-cell { display: block; height: auto; min-height: 0; padding: 17px 12px; text-align: center; }
  td.empty-cell::before { content: none; }
  .inline-form { align-items: stretch; flex-direction: column; padding: 0 14px; }
  .inline-form label { min-width: 0; width: 100%; font-size: 12px; }
  .inline-form input, .inline-form select, .operator-required-fields input, .field-grid input:not([type=checkbox]), .field-grid textarea { min-height: 44px; font-size: 16px; }
  .form-actions { width: 100%; flex-wrap: wrap; }
  .form-actions > button { flex: 1 1 130px; }
  .operator-form { padding: 0 14px; }
  .operator-required-fields, .field-grid { grid-template-columns: minmax(0, 1fr); }
  .primary-button, .secondary-button, .danger-button { min-height: 40px; }
  .calendar-grid { width: 100%; min-width: 0; grid-template-columns: repeat(7,minmax(0,1fr)); }
  #view-calendario > .calendar-grid { display: none; }
  .calendar-agenda { display: grid; gap: 10px; }
  .mobile-agenda-day { display: grid; gap: 8px; padding: 12px; border: 1px solid #e7ebef; border-radius: 10px; background: #fff; }
  .mobile-agenda-day.today { border-color: #8eafea; box-shadow: inset 3px 0 #245bce; }
  .mobile-agenda-day h2 { margin: 0 0 2px; color: #536373; font-size: 13px; font-weight: 750; text-transform: capitalize; }
  .mobile-agenda-event { min-width: 0; padding: 10px; border-radius: 8px; }
  .mobile-agenda-event-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
  .mobile-agenda-event-heading .text-button, .mobile-agenda-event-heading b { min-width: 0; color: #27425e; font-size: 13px; overflow-wrap: anywhere; }
  .mobile-agenda-event-heading > span { flex: none; color: #667687; font-size: 10px; font-weight: 700; }
  .mobile-agenda-event p { margin: 5px 0 0; color: #536373; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
  .mobile-agenda-empty { margin: 0; padding: 22px 14px; border: 1px solid #e7ebef; border-radius: 10px; color: #687684; background: #fff; text-align: center; font-size: 13px; }
  html[data-theme="dark"] .mobile-agenda-day, html[data-theme="dark"] .mobile-agenda-empty { background: #20262e; border-color: #343d48; }
  html[data-theme="dark"] .mobile-agenda-day h2, html[data-theme="dark"] .mobile-agenda-event-heading > span, html[data-theme="dark"] .mobile-agenda-event-heading .text-button, html[data-theme="dark"] .mobile-agenda-event-heading b, html[data-theme="dark"] .mobile-agenda-event p, html[data-theme="dark"] .mobile-agenda-empty { color: #c3ceda; }
  #view-calendario { min-width: 0; overflow-x: visible; }
  .calendar-day { min-width: 0; min-height: 70px; padding: 3px 2px; }
  .calendar-day > b { width: 21px; height: 21px; margin: 0 auto 3px; font-size: 10px; }
  .calendar-event { margin: 2px 0; padding: 2px 1px; overflow: hidden; font-size: 0; line-height: 1.1; text-align: center; text-overflow: clip; }
  .calendar-event::after { content: attr(data-mobile-label); font-size: 7px; font-weight: 700; }
  .calendar-legend { flex-wrap: wrap; gap: 8px 14px; }
  .progress-heading { font-size: 10px; }
  .notification-card { grid-template-columns: 1fr; }
  .notification-card p, .notification-card button { grid-column: 1; grid-row: auto; }
  .finance-form { padding: 0 14px 4px; }
  .finance-fields, .finance-tax-fields, .finance-repeat-fields { grid-template-columns: minmax(0, 1fr); }
  .finance-form-footer { align-items: stretch; flex-direction: column; }
  .finance-form-footer .form-actions { flex-wrap: wrap; }
  .history-filters { grid-template-columns: minmax(0,1fr); padding: 0 14px 14px; }
  .history-filters label:last-of-type { grid-column: auto; }
  .history-filters .secondary-button { justify-self: start; }
  .panel-footer { padding: 10px 13px; font-size: 9px; }
  .panel { border-radius: 9px; }
  .panel-heading { gap: 11px; }
  .pnl-table tbody { gap: 0; }
  .pnl-table td { font-size: 15px; }
  .finance-form { gap: 10px; }
  .finance-group { padding: 11px; }
  .finance-fields input, .finance-fields select, .history-filters input, .history-filters select, .period-toolbar input, .period-toolbar select, .edit-dialog input, .edit-dialog select, .edit-dialog textarea { min-height: 44px; font-size: 16px; }
  .finance-form-footer .primary-button, .finance-form-footer .secondary-button { width: 100%; justify-content: center; }
  .finance-form-footer .form-actions { display: grid; grid-template-columns: 1fr; }
  .profile-dialog { width: calc(100vw - 12px); max-width: 980px; max-height: 92dvh; padding: 14px 8px; }
  .profile-calendar-heading { align-items: start; flex-direction: column; }
  .profile-calendar { width: 100%; min-width: 0; }
  .profile-dialog .calendar-grid { overflow: hidden; }
  .service-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .service-photo-preview { min-height: 115px; }
  .service-photo-preview img { height: 125px; }
  .service-photo-caption { align-items: flex-start; flex-direction: column; }
  .profile-dialog-heading { padding: 0 5px; }
  .profile-dialog .table-wrap { min-width: 0; overflow: visible; padding: 4px 2px 8px; }
  .profile-dialog .panel-heading { padding: 13px 7px 8px; }
  .date-range label { min-width: 0; }
  .date-range input { min-height: 42px; width: 100%; font-size: 14px; }
  .period-toolbar { align-items: stretch; flex-wrap: wrap; padding: 10px; }
  .period-toolbar label { flex: 1 1 135px; min-width: 0; }
  .period-toolbar input, .period-toolbar select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
  .filter-row { flex-wrap: wrap; gap: 5px; }
  .filter { min-height: 38px; }
  .search { min-width: 0; }
  .profile-detail { min-width: 0; }
  .toast { right: 10px; bottom: max(10px,env(safe-area-inset-bottom)); max-width: calc(100vw - 20px); }
}

@media (max-width: 360px) {
  .main-content { padding-right: 9px; padding-left: 9px; }
  .topbar { width: calc(100% + 18px); margin-right: -9px; margin-left: -9px; }
  .metrics { grid-template-columns: minmax(0,1fr); }
  .calendar-day { min-height: 62px; }
  .calendar-event::after { font-size: 6px; }
  td { grid-template-columns: minmax(64px,32%) minmax(0,1fr); gap: 6px; padding-right: 8px; padding-left: 8px; }
}

html[data-theme="dark"] .auth-screen { background: #151a20; }
html[data-theme="dark"] .auth-card { color: #e4e9ef; background: #20262e; border-color: #343d48; }
html[data-theme="dark"] .auth-card h1 { color: #eef2f6; }
html[data-theme="dark"] .auth-card input { color: #e4e9ef; background: #171c22; border-color: #3a4552; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .topbar { color: #eef2f6; background: #151a20; border-color: #343d48; }
  html:not([data-theme]) .mobile-brand { color: #eef2f6; }
  html:not([data-theme]) .auth-screen { background: #151a20; }
  html:not([data-theme]) .auth-card { color: #e4e9ef; background: #20262e; border-color: #343d48; }
  html:not([data-theme]) .auth-card h1 { color: #eef2f6; }
  html:not([data-theme]) .auth-card input { color: #e4e9ef; background: #171c22; border-color: #3a4552; }
  html:not([data-theme]) body { color: #e4e9ef; background: #151a20; }
  html:not([data-theme]) .sidebar, html:not([data-theme]) .panel, html:not([data-theme]) .metric-card, html:not([data-theme]) .profile-dialog, html:not([data-theme]) .edit-dialog, html:not([data-theme]) .notification-card, html:not([data-theme]) .period-toolbar { color: #e4e9ef; background: #20262e; border-color: #343d48; }
  html:not([data-theme]) h1, html:not([data-theme]) h2, html:not([data-theme]) h3, html:not([data-theme]) .metric-card strong, html:not([data-theme]) .brand, html:not([data-theme]) .profile-detail b { color: #eef2f6; }
  html:not([data-theme]) .subheading, html:not([data-theme]) .panel-heading p, html:not([data-theme]) td, html:not([data-theme]) .metric-card span, html:not([data-theme]) .profile-detail small { color: #a7b2bf; }
  html:not([data-theme]) th, html:not([data-theme]) .calendar-weekday { color: #aab5c1; background: #252d36; }
  html:not([data-theme]) td, html:not([data-theme]) th, html:not([data-theme]) .calendar-day { border-color: #343d48; }
  html:not([data-theme]) input, html:not([data-theme]) select, html:not([data-theme]) textarea, html:not([data-theme]) .date-control input, html:not([data-theme]) .date-range input { color: #e4e9ef; background: #171c22; border-color: #3a4552; }
  html:not([data-theme]) .secondary-button, html:not([data-theme]) .icon-button { color: #d5dce4; background: #252d36; border-color: #3a4552; }
  html:not([data-theme]) .password-toggle { color: #b7ceff; background: #252d36; border-color: #3a4552; }
  html:not([data-theme]) .notification-tabs { background: #171c22; border-color: #343d48; }
  html:not([data-theme]) .notification-tab { color: #bac4d0; }
  html:not([data-theme]) .notification-tab span { color: #d5dce4; background: #343d48; }
  html:not([data-theme]) .notification-tab.active { color: #a9c5ff; background: #29394f; box-shadow: none; }
  html:not([data-theme]) .notification-tab.active span { color: #fff; background: #245bce; }
  html:not([data-theme]) .pnl-table td.pnl-positive { color: #91e0b7; background: #1d3c30; }
  html:not([data-theme]) .pnl-table td.pnl-negative { color: #ffaaa5; background: #482726; }
  html:not([data-theme]) .pnl-table td.pnl-neutral { color: #d1d8e0; background: #29313b; }
  html:not([data-theme]) .finance-group { border-color: #343d48; }
  html:not([data-theme]) tr { background: #20262e; border-color: #343d48; }
  html:not([data-theme]) td { border-color: #343d48; }
  html:not([data-theme]) .finance-fields input, html:not([data-theme]) .finance-fields select, html:not([data-theme]) .history-filters input, html:not([data-theme]) .history-filters select { color: #e4e9ef; background: #171c22; border-color: #3a4552; }
}
