:root {
  --navy: #295577;
  --navy-dark: #214762;
  --lime: #91bc24;
  --lime-dark: #7fa51d;
  --text: #40474b;
  --muted: #859098;
  --border: #dedfe1;
  --background: #f6f6f6;
  --shadow: 0 1px 3px rgba(24, 42, 54, .055);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.45; color: var(--text); overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select, input[type="checkbox"] { cursor: pointer; }
button { color: inherit; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--lime-dark); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, select, textarea { width: 100%; max-width: 100%; min-width: 0; padding: 9px 10px; color: var(--text); background: #fff; border: 1px solid #d3d8dc; border-radius: 2px; outline: none; transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 35px; }
input:focus, select:focus, textarea:focus { border-color: #6f91aa; box-shadow: 0 0 0 2px rgba(41, 85, 119, .08); }
input::placeholder, textarea::placeholder { color: #a0a7ac; }
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: var(--lime-dark); flex: 0 0 auto; }
input[type="date"], input[type="datetime-local"] { min-width: 0; }
input[readonly], input:disabled, select:disabled { background: #f4f5f6; }
[hidden] { display: none !important; }
.app-header { height: 80px; background: #fff; border-bottom: 1px solid #e2e4e6; display: flex; align-items: center; padding: 0 30px; gap: 28px; position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; color: #1c1e1f; flex-shrink: 0; font-size: 24px; font-weight: 700; letter-spacing: -.7px; line-height: 1; white-space: nowrap; }
.brand:hover { color: #1c1e1f; }
.brand-light { font-weight: 400; }
.user-info { padding: 11px 15px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.user-info small { display: block; color: var(--muted); margin-top: 5px; }
.row-arrow { width: 28px; color: var(--navy); }
.search-filter { min-width: 220px; flex: 1; }
.advanced-filters { width: 100%; border-top: 1px solid #edf0f2; padding-top: 9px; }
.advanced-filters summary { cursor: pointer; color: var(--navy); }
.advanced-filters > .filters { padding: 12px 0 0; }
.advanced-filters .filter-field { max-width: 170px; }
.client-layout { display: grid; grid-template-columns: 265px minmax(0,1fr); gap: 20px; }
.client-sidebar, .client-main { min-width: 0; }
.client-sidebar .panel, .client-main .panel { margin-bottom: 18px; }
.client-sidebar h2 { margin: 20px 0; font-size: 18px; color: var(--navy); overflow-wrap: anywhere; }
.contact-facts { margin: 0; }
.contact-facts > div { padding: 8px 0; border-bottom: 1px solid #eff1f2; }
.contact-facts dt { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.contact-facts dd { margin: 0; overflow-wrap: anywhere; }
.detail-description { padding: 6px 0 20px; }
details.form-section { padding: 0; border: 1px solid var(--border); margin: 16px 0; }
details.form-section > summary { padding: 12px 15px; color: var(--navy); cursor: pointer; background: #f7f8f9; font-size: 14px; font-weight: 600; }
details.form-section .form-grid { padding: 20px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b54545; }
.brand svg { width: 43px; height: 48px; flex-shrink: 0; }
.brand small { display: block; margin-top: 6px; font-size: 9px; font-weight: 400; letter-spacing: 3.5px; color: #7d858b; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; }
.nav-link { padding: 0 13px; display: flex; align-items: center; gap: 7px; color: #5c646a; background: none; border: 0; border-bottom: 3px solid transparent; margin-top: 3px; white-space: nowrap; font-size: 13px; }
.nav-link:hover, .nav-link.active, .nav-link[aria-current="page"] { color: var(--navy); background: #fafbfc; border-bottom-color: var(--lime); }
.nav-dropdown { position: relative; display: flex; }
.nav-menu, .dropdown-menu { position: absolute; top: calc(100% - 1px); min-width: 190px; padding: 6px 0; background: #fff; border: 1px solid var(--border); box-shadow: 0 5px 18px rgba(24, 42, 54, .12); border-radius: 2px; z-index: 50; }
.nav-menu { left: 0; display: none; }
.nav-dropdown:hover .nav-menu, .nav-dropdown:focus-within .nav-menu { display: block; }
.nav-menu a, .nav-menu button, .dropdown-menu a, .dropdown-menu button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 15px; border: 0; background: #fff; text-align: left; color: #57616a; white-space: nowrap; }
.nav-menu a:hover, .nav-menu button:hover, .dropdown-menu a:hover, .dropdown-menu button:hover { background: #f3f6f8; color: var(--navy); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 13px; min-width: 0; }
.search-box { position: relative; width: 210px; }
.global-search { padding-left: 31px; border-color: transparent; background: #f5f6f7; font-size: 12px; }
.search-box > svg, .search-box > .search-icon { position: absolute; left: 10px; top: 11px; color: #8d979f; width: 14px; height: 14px; pointer-events: none; }
.search-results { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 32px); max-height: 400px; overflow-y: auto; background: #fff; border: 1px solid var(--border); box-shadow: 0 5px 18px #233f571a; }
.search-hit { display: block; padding: 11px 14px; border-bottom: 1px solid #edf0f2; }
.search-hit:hover { background: #f4f7f9; }
.search-hit-title { display: block; font-weight: 600; }
.search-hit-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.user-menu { position: relative; display: flex; align-items: center; gap: 8px; }
.user-menu > button { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; }
.user-menu .dropdown-menu { top: calc(100% + 12px); right: 0; }
.avatar { width: 33px; height: 33px; border-radius: 50%; background: #e8eff4; color: var(--navy); display: inline-flex; justify-content: center; align-items: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.quick-add { display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 8px 14px; border: 1px solid #d2d8dd; border-radius: 2px; background: #fff; color: var(--navy); line-height: 1.2; font-weight: 400; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: #f2f5f7; border-color: #abb9c3; color: var(--navy); }
.btn-primary { background: var(--lime); color: #fff; border-color: var(--lime); }
.btn-primary:hover { color: #fff; background: var(--lime-dark); border-color: var(--lime-dark); }
.btn-secondary { background: #f9fafb; }
.btn-danger { color: #be5555; border-color: #e6baba; }
.btn-danger:hover { background: #fff2f2; color: #a84242; border-color: #cd8f8f; }
.btn-sm { min-height: 29px; padding: 5px 9px; font-size: 11px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; background: transparent; border: 1px solid transparent; border-radius: 2px; color: #8998a2; cursor: pointer; }
.icon-btn:hover { color: var(--navy); background: #f0f4f6; border-color: #e3e8eb; }
.btn svg, .icon-btn svg, .nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.page { max-width: 1460px; margin: 0 auto; padding: 22px 30px 34px; min-height: calc(100vh - 124px); }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 19px; }
.breadcrumbs { margin-bottom: 6px; font-size: 11px; color: #98a0a7; display: flex; flex-wrap: wrap; gap: 7px; }
.breadcrumbs a { color: #7d919f; }
.page-title { margin: 0; color: var(--navy); font-size: 23px; font-weight: 400; line-height: 1.25; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.dashboard-tabs, .detail-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab { border: 0; border-bottom: 3px solid transparent; padding: 11px 19px; background: transparent; color: #859198; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--navy); }
.tab.active, .tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--lime); background: #fff; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 2px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 11px 16px; border-bottom: 1px solid #e7e9eb; }
.panel-title { margin: 0; font-weight: 400; font-size: 15px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.panel-title svg { width: 16px; height: 16px; color: #92a6b4; }
.panel-tools { display: flex; align-items: center; gap: 5px; color: #9ba9b2; }
.panel-body { padding: 18px; }
.panel-body:has(> .table-wrap:only-child) { padding: 0; }
.panel-footer { border-top: 1px solid #e9ecee; padding: 10px 16px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 11px; }
.span-2 { grid-column: 1 / -1; }
.empty-state { min-height: 130px; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #929ca4; gap: 7px; }
.empty-state p { margin: 0; max-width: 390px; }
.empty-state h3 { margin: 2px 0; color: #697f8e; font-size: 14px; font-weight: 400; }
.empty-state .btn { margin-top: 10px; }
.empty-icon { font-size: 28px; color: #c2cdd5; line-height: 1; }
.empty-icon svg { width: 32px; height: 32px; }
.metric-row { display: flex; flex-wrap: wrap; border-bottom: 1px solid #e9ecee; }
.metric { flex: 1; padding: 20px; border-right: 1px solid #e9ecee; min-width: 130px; }
.metric:last-child { border-right: 0; }
.metric-value { font-size: 27px; font-weight: 400; color: var(--navy); line-height: 1.25; }
.metric-label { color: #8b969e; font-size: 11px; margin-top: 6px; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.data-table th { padding: 11px 13px; color: #718591; background: #fafbfc; border-bottom: 1px solid #e1e6e9; font-weight: 400; white-space: nowrap; font-size: 11px; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcf8; }
.data-table td > a { font-weight: 500; }
.data-table td .small { display: block; margin-top: 3px; }
.data-table input[type="checkbox"] { vertical-align: middle; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--navy); }
.status { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 10px; line-height: 1.4; border-radius: 2px; white-space: nowrap; background: #f0f2f4; color: #7a8790; }
.status-green { background: #edf5df; color: #6e9421; }
.status-blue { background: #e9f1f8; color: #427ba5; }
.status-orange { background: #fff0de; color: #b9873b; }
.status-red { background: #fceaea; color: #be6161; }
.status-gray { background: #f0f2f4; color: #859098; }
.status-purple { background: #eeeaf7; color: #8971ae; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 16px; background: #fff; border-bottom: 1px solid #e7e9eb; }
.toolbar > input { width: 250px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.filter-field { min-width: 130px; max-width: 240px; }
.filter-field label { display: block; color: #87939b; font-size: 10px; margin-bottom: 4px; }
.filter-field select, .filter-field input { font-size: 12px; min-height: 32px; padding: 7px 9px; }
.field { min-width: 0; }
.field > label { display: block; margin-bottom: 6px; color: #627582; font-size: 12px; }
.field label .required, .field > label > span { color: #bd6464; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-help { font-size: 11px; color: #9aa4ab; margin: 5px 0 0; }
.field-error { font-size: 11px; color: #bb5555; margin-top: 5px; }
.field:has(.field-error:not(:empty)) input, .field:has(.field-error:not(:empty)) select { border-color: #d79595; }
.form-errors, .error-panel { padding: 12px 15px; border: 1px solid #e8c4c4; color: #a55353; background: #fff4f4; border-radius: 2px; margin-bottom: 16px; }
.form-errors:empty { display: none; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form-section { grid-column: 1 / -1; margin: 3px 0 -3px; padding-bottom: 8px; border-bottom: 1px solid #e8ecef; color: var(--navy); font-size: 13px; font-weight: 400; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #e7e9eb; color: #929ca4; font-size: 11px; flex-wrap: wrap; }
.pagination > div { display: flex; align-items: center; gap: 5px; }
.pagination button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-size { display: inline-flex; align-items: center; gap: 7px; }
.page-size select { width: 60px; min-height: 29px; padding: 5px; font-size: 11px; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #617582; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 245px; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-column { min-height: 330px; background: #eff1f2; border: 1px solid #e0e5e8; border-radius: 2px; }
.kanban-head { padding: 13px; color: var(--navy); display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #b3c4ce; }
.kanban-card { margin: 11px; padding: 13px; background: #fff; border: 1px solid #dee4e7; border-radius: 2px; box-shadow: var(--shadow); }
.kanban-card:hover { border-color: #a9bcc7; }
.card-title { font-size: 13px; color: var(--navy); margin-bottom: 8px; }
.card-meta { color: #89959e; font-size: 11px; display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 6px; }
.board-status { height: 3px; background: var(--lime); margin: -13px -13px 12px; }
.matrix { display: flex; flex-direction: column; gap: 14px; }
.matrix-row { display: flex; gap: 16px; align-items: center; }
.matrix-floor { width: 72px; flex-shrink: 0; color: #8396a3; font-size: 11px; }
.matrix-units { display: flex; flex-wrap: wrap; gap: 9px; }
.unit-tile { min-width: 88px; min-height: 70px; padding: 10px; border: 1px solid #c9dda5; border-radius: 2px; background: #f1f7e8; color: #6e912f; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; cursor: pointer; }
.unit-tile:hover { box-shadow: 0 0 0 2px #90b34f33; }
.unit-tile.status-red { border-color: #e9bdbd; background: #fceded; color: #ba6262; }
.unit-tile.status-orange { border-color: #e8d1a9; background: #fff4e5; color: #b38a47; }
.unit-tile.status-blue { border-color: #b9d3e8; background: #edf5fb; color: #5884a5; }
.unit-tile strong { font-size: 14px; }
.unit-tile small { font-size: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 0 3px; font-size: 11px; color: #85939d; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.calendar-head h3 { font-size: 15px; font-weight: 400; color: var(--navy); margin: 0; }
.calendar-head > div { display: flex; gap: 6px; align-items: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday { padding: 10px 6px; text-align: center; color: #93a1ab; font-size: 11px; border-top: 1px solid #e7ebee; border-bottom: 1px solid #e7ebee; background: #fafbfc; }
.calendar-cell { min-height: 105px; padding: 8px; border-right: 1px solid #e9edef; border-bottom: 1px solid #e9edef; min-width: 0; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-cell.outside { background: #fafbfc; color: #bdc6cc; }
.calendar-cell.today { background: #fbfdf6; }
.calendar-date { display: inline-flex; width: 23px; height: 23px; align-items: center; justify-content: center; color: #7c8e9a; font-size: 11px; }
.today .calendar-date { color: #fff; background: var(--lime); border-radius: 50%; }
.calendar-event { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; padding: 4px 5px; border-left: 2px solid var(--lime); background: #eef5e3; color: #7b983f; font-size: 10px; cursor: pointer; }
.calendar-list { display: flex; flex-direction: column; }
.calendar-list > div, .calendar-list > a { padding: 12px 16px; border-bottom: 1px solid #edf0f2; }
.week-calendar { display: grid; grid-template-columns: 50px repeat(7, minmax(80px, 1fr)); overflow-x: auto; }
.day-time { padding: 12px 7px; min-height: 54px; border-bottom: 1px solid #edf0f2; font-size: 10px; color: #9ba6ae; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 26px; }
.detail-label { color: #98a4ac; font-size: 11px; margin-bottom: 5px; }
.detail-value { color: #4d6678; overflow-wrap: anywhere; }
.detail-tabs { margin: 0; }
.detail-content { padding: 22px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-summary { display: flex; flex-wrap: wrap; padding: 21px; gap: 28px; background: #fbfcfd; border-bottom: 1px solid #e5e9ec; }
.summary-metric { min-width: 130px; }
.summary-metric strong { display: block; color: var(--navy); font-size: 23px; font-weight: 400; }
.summary-metric span { color: #8e9ca5; font-size: 11px; }
.notes-list { display: flex; flex-direction: column; gap: 13px; }
.note { padding: 13px 15px; border: 1px solid #e5e9ec; background: #fcfdfe; border-left: 3px solid #b2c4d1; overflow-wrap: anywhere; }
.note p { margin: 7px 0 0; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #97a4ad; font-size: 11px; }
.file-drop { border: 1px dashed #bacbd5; padding: 26px 20px; text-align: center; background: #fbfcfd; color: #879aa7; border-radius: 2px; }
.file-drop input { margin-top: 12px; background: #fff; font-size: 11px; }
.file-info { padding: 10px 12px; background: #f5f8fa; color: #8094a2; font-size: 11px; overflow-wrap: anywhere; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(25, 41, 54, .38); display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.modal { width: 600px; max-width: 100%; max-height: calc(100dvh - 56px); display: flex; flex-direction: column; background: #fff; border-radius: 3px; box-shadow: 0 16px 60px #172c4533; overflow: hidden; }
.modal-wide { width: 820px; }
.modal-head { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e2e7eb; flex-shrink: 0; }
.modal-title { font-weight: 400; font-size: 19px; color: var(--navy); margin: 0; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; padding: 22px; }
.modal-foot { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 9px; background: #fafbfc; border-top: 1px solid #e2e7eb; flex-shrink: 0; }
.modal-close { background: none; border: 0; color: #97a6b0; width: 29px; height: 29px; font-size: 23px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--navy); background: #f1f5f7; }
.toast-container { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: min(390px, calc(100vw - 32px)); }
.toast { background: #fff; border: 1px solid #dce4e9; border-left: 4px solid #7397b0; padding: 13px 17px; box-shadow: 0 5px 24px #2035491a; color: #557084; border-radius: 2px; animation: toast-in .18s ease-out; }
.toast-error { border-left-color: #c87676; color: #b45b5b; }
.toast-success { border-left-color: var(--lime); color: #6e8e35; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.login-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 30px 18px; background: linear-gradient(150deg, #f0f3f5, #fafbf7); }
.login-card { width: 390px; max-width: 100%; padding: 34px; background: #fff; border: 1px solid #dfe5e8; box-shadow: 0 8px 35px #2549660d; border-radius: 3px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 30px; }
.login-card h1 { font-size: 20px; font-weight: 400; color: var(--navy); text-align: center; margin: 0 0 8px; }
.login-card .field { margin-top: 18px; }
.login-card .btn-primary { width: 100%; margin-top: 22px; }
.setup-note { font-size: 11px; color: #8b9ba6; padding: 12px; background: #f7f9fa; margin-top: 18px; line-height: 1.6; }
.footer { max-width: 1460px; margin: 0 auto; padding: 13px 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e3e7e9; color: #a1acb4; font-size: 10px; }
.loading { padding: 55px 20px; text-align: center; color: #97a6b0; }
.skeleton { height: 14px; border-radius: 2px; background: linear-gradient(100deg, #edf1f3 30%, #f6f8fa 50%, #edf1f3 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.inline-actions { display: flex; align-items: center; gap: 6px; }
.link { padding: 0; border: 0; background: none; color: var(--navy); cursor: pointer; font: inherit; }
.link:hover { color: var(--lime-dark); text-decoration: underline; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.chart-bars { display: flex; flex-direction: column; gap: 15px; padding: 8px 0; }
.chart-bar-row { display: grid; grid-template-columns: 100px 1fr 60px; gap: 12px; align-items: center; font-size: 11px; color: #8496a3; }
.chart-track { height: 13px; background: #f0f3f5; border-radius: 1px; overflow: hidden; }
.chart-bar { height: 100%; background: #92b75a; min-width: 2px; border-radius: 1px; }
.chart-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.progress { height: 6px; background: #eef2f4; overflow: hidden; border-radius: 2px; }
.progress > span, .progress > div { height: 100%; display: block; background: var(--lime); }
.mobile-nav-toggle { display: none; background: none; border: 1px solid #e1e6e9; padding: 6px 9px; color: var(--navy); border-radius: 2px; font-size: 20px; }
.integration-list { display: flex; flex-direction: column; }
.integration-item { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid #e9edf0; }
.integration-item:first-child { padding-top: 0; }
.integration-item:last-child { border: 0; padding-bottom: 0; }
.integration-item h3 { font-size: 14px; font-weight: 400; color: var(--navy); margin: 0 0 5px; }
.integration-item p { margin: 0; color: #94a0a9; font-size: 11px; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.pill-count { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; min-width: 20px; font-size: 10px; background: #eef2f4; color: #7c929f; border-radius: 9px; }
.price { white-space: nowrap; color: var(--navy); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.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; }
.dashboard-config { display: flex; flex-wrap: wrap; gap: 16px; padding: 15px 18px; background: #fff; border: 1px solid var(--border); margin-bottom: 18px; }
.hint-banner { padding: 12px 16px; margin-bottom: 18px; background: #eff5f9; border: 1px solid #dbe8ef; color: #6c889d; font-size: 12px; border-radius: 2px; }
@media (min-width: 1500px) { .app-header { padding-right: max(30px, calc((100vw - 1400px) / 2)); padding-left: max(30px, calc((100vw - 1400px) / 2)); } }
@media (max-width: 1250px) { .app-header { gap: 15px; padding: 0 22px; } .brand { font-size: 20px; gap: 8px; } .brand svg { width: 36px; } .nav-link { padding: 0 9px; font-size: 12px; } .search-box { width: 155px; } .header-tools { gap: 9px; } .page { padding-left: 22px; padding-right: 22px; } }
@media (max-width: 1050px) { .search-box { display: none; } .main-nav { gap: 0; } .nav-link { padding: 0 8px; } .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .header-tools .user-name { display: none; } }
@media (max-width: 800px) {
  .app-header { height: 67px; padding: 0 17px; gap: 13px; } .brand { font-size: 20px; } .brand svg { height: 39px; width: 34px; } .brand small { font-size: 8px; letter-spacing: 2px; } .mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #dce3e8; box-shadow: 0 8px 15px #243d5612; padding: 7px 17px 12px; flex-direction: column; max-height: calc(100dvh - 67px); overflow-y: auto; }
  .mobile-nav-open .main-nav, .main-nav.mobile-nav-open, .main-nav.open { display: flex; } .nav-link { padding: 12px 10px; border: 0; border-left: 3px solid transparent; margin: 0; } .nav-link.active { border-left-color: var(--lime); } .nav-dropdown { display: block; } .nav-dropdown > .nav-link { width: 100%; } .nav-menu { position: static; box-shadow: none; margin-left: 12px; border: 0; border-left: 1px solid #e3e9ed; }
  .header-tools { margin-left: 0; } .header-tools .quick-add { display: none; } .page { padding: 19px 17px 28px; min-height: calc(100vh - 111px); } .page-title { font-size: 21px; } .dashboard-grid, .split { grid-template-columns: 1fr; } .dashboard-grid { gap: 16px; } .span-2 { grid-column: auto; } .detail-grid { grid-template-columns: 1fr 1fr; } .footer { padding: 12px 17px; } .calendar-cell { min-height: 80px; padding: 5px; } .calendar-event { padding: 3px; font-size: 9px; }
}
@media (max-width: 540px) {
  .header-tools { gap: 5px; } .user-menu > span, .user-menu .user-name { display: none; } .page-top { align-items: flex-start; gap: 12px; flex-wrap: wrap; } .page-actions { gap: 6px; } .page-actions .btn { min-height: 32px; font-size: 11px; padding: 7px 10px; } .panel-head { padding: 11px 13px; } .panel-title { font-size: 14px; } .panel-body { padding: 14px; } .tab { padding: 10px 13px; font-size: 12px; } .toolbar { padding: 12px; } .toolbar > input { width: 100%; } .filters { width: 100%; gap: 8px; } .filter-field { flex: 1; min-width: 120px; max-width: none; }
  .form-grid, .detail-grid, .report-grid { grid-template-columns: 1fr; } .form-grid { gap: 15px; } .check-grid { grid-template-columns: 1fr; } .metric { padding: 15px; min-width: 115px; } .metric-value { font-size: 24px; } .modal-backdrop { padding: 10px; } .modal { max-height: calc(100dvh - 20px); } .modal-head, .modal-body { padding: 17px; } .modal-foot { padding: 12px 17px; } .modal-title { font-size: 17px; } .detail-summary { padding: 16px; gap: 20px; } .detail-content { padding: 16px; } .matrix-row { gap: 9px; } .matrix-floor { width: 49px; font-size: 10px; } .unit-tile { min-width: 70px; min-height: 62px; padding: 8px; } .matrix-units { gap: 6px; }
  .calendar-head { padding: 12px; flex-wrap: wrap; } .calendar-cell { min-height: 65px; padding: 3px; } .weekday { font-size: 10px; padding: 8px 2px; } .calendar-event { height: 7px; padding: 0; border-left: 0; font-size: 0; background: #b3cf79; } .calendar-date { width: 21px; height: 21px; } .chart-bar-row { grid-template-columns: 80px 1fr 45px; gap: 8px; } .footer { flex-wrap: wrap; gap: 3px; } .integration-item { gap: 10px; align-items: flex-start; } .integration-item .btn { font-size: 11px; padding: 7px 9px; } .login-card { padding: 27px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .app-header, .footer, .page-actions, .toolbar, .pagination, .panel-tools, .modal-backdrop, .toast-container { display: none !important; } body, .page { background: #fff; } .page { padding: 0; max-width: 100%; } .panel { box-shadow: none; break-inside: avoid; } .dashboard-grid { gap: 12px; } .data-table th, .status, .unit-tile { print-color-adjust: exact; } }
@media (max-width: 850px) { .client-layout { grid-template-columns: 1fr; } .client-sidebar .contact-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; } .main-nav .dropdown-menu { position: static; box-shadow: none; border: 0; border-left: 1px solid var(--border); margin-left: 12px; } }
/* Platform workspaces retain the compact list and form language of the sales screens. */
.workspace-tabs { overflow-x: auto; white-space: nowrap; margin-bottom: 18px; }
.workspace-tabs .tab { flex-shrink: 0; }
.report-grid { margin-bottom: 20px; }
.metric-note { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.metric-value { overflow-wrap: anywhere; }
.provider-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.provider-card { padding: 18px; margin-bottom: 0; }
.provider-card h2 { font-size: 17px; font-weight: 400; color: var(--navy); margin: 15px 0 7px; }
.provider-card p { margin: 10px 0; line-height: 1.6; }
.provider-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.provider-method { font-size: 11px; font-weight: 600; color: var(--navy); }
.module-links { display: flex; flex-direction: column; padding: 4px 16px; }
.module-links a { padding: 12px 2px; border-bottom: 1px solid #edf0f2; display: flex; justify-content: space-between; gap: 12px; }
.module-links a:last-child { border-bottom: 0; }
.scope-options { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--border); margin: 18px 0; padding: 16px; }
.scope-options legend { padding: 0 6px; color: var(--navy); }
.scope-options label { display: flex; align-items: center; gap: 8px; }
.api-token { font-family: ui-monospace,monospace; font-size: 12px; overflow-wrap: anywhere; }
.main-nav .dropdown-menu { max-height: min(570px,calc(100dvh - 100px)); overflow-y: auto; }
@media (max-width: 1450px) { .search-box { display: none; } .app-header { gap: 15px; } .nav-link { padding-left: 9px; padding-right: 9px; } }
@media (max-width: 1100px) { .provider-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .app-header .quick-add { display: none; } .brand { font-size: 21px; } .nav-link { font-size: 12px; padding-left: 7px; padding-right: 7px; } }
@media (max-width: 980px) and (min-width: 801px) { .brand small { letter-spacing: 1px; font-size: 8px; } .app-header { padding: 0 13px; gap: 10px; } .brand { font-size: 19px; gap: 6px; } .brand svg { width: 28px; } .nav-link { padding-left: 5px; padding-right: 5px; } .header-tools { gap: 5px; } }
@media (max-width: 650px) { .provider-grid { grid-template-columns: 1fr; gap: 12px; } .provider-card { padding: 15px; } .workspace-tabs .tab { padding: 11px 13px; } }

/* Migration keeps source copies visibly separate from operational records. */
.migration-file { display: block; margin: 16px 0; }
.migration-file input { display: block; width: 100%; }
.migration-actions { flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.migration-warnings { margin: 0; padding-left: 20px; }
.migration-warnings li { margin: 6px 0; overflow-wrap: anywhere; }
.migration-source-url { overflow-wrap: anywhere; }
.archive-data { max-height: 55vh; overflow: auto; margin: 14px 0 0; padding: 16px; background: #f5f8fa; border: 1px solid var(--border); border-radius: 2px; color: var(--navy); white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, monospace; tab-size: 2; }
.connection-fields { margin-top: 20px; }
.connection-notes { margin-top: 20px; }
#connection-settings-form h3 { margin: 24px 0 6px; color: var(--navy); font-size: 15px; font-weight: 400; }
#connection-settings-form .form-section li { margin: 8px 0; }
@media (max-width: 540px) { .migration-actions { align-items: stretch; flex-direction: column; } .archive-data { padding: 12px; font-size: 11px; } }
