:root { --brand: #006efd; --ink: #0b193b; --line: #e5edfa; --soft: #f4f8ff; }
/* Shared revenue targets and cost monitoring. */
.form-panel, .sub-panel, .user-manage, .product-manage { border-color:#e5edfa; border-radius:14px; background:#fff; }
.sub-panel { padding:22px; }
.form-panel label, .user-form label, .salary-settings-form label { color:#65799b; font-size:13px; gap:8px; }
.form-panel input, .form-panel select, .form-panel textarea, .sub-panel input, .sub-panel select, .filters input, .filters select { border-color:#dce7f7; border-radius:9px; min-height:42px; background:#fbfdff; color:#17345e; }
.form-panel input:focus, .sub-panel input:focus { background:white; }
.filters, .product-filters { gap:12px; }
.item-row { padding:16px; background:#f7faff; border:1px solid #e5edfa; border-radius:12px; }
.order-total, .profit-formula, .lock-line { border-color:#dceaff; border-radius:10px; background:#f1f7ff; }
.user-manage h3, .product-manage h3, .form-panel h3 { color:#0b193b; }
.modal-body { border-radius:16px; border-color:#e5edfa; box-shadow:0 24px 80px #102c5626; }
button.danger { color:#c93e53; background:#fff0f2; }
button.secondary { color:#3267ae; background:#edf4ff; }
input:disabled, select:disabled { color:#8392a9; background:#f0f3f8; cursor:not-allowed; }
.target-dialog { width:min(440px, calc(100vw - 32px)); border:1px solid #e5edfa; border-radius:16px; padding:26px; color:#0b193b; box-shadow:0 24px 80px #102c5633; }
.target-dialog::backdrop { background:#142f544d; }
.target-dialog form { display:grid; gap:12px; }
.target-dialog p { font-size:13px; margin:0; }
.sidebar-license > div { display:flex; align-items:center; gap:9px; }
.sidebar-license .license-crown { font-size:29px; line-height:1; }
.sidebar-license .license-chevron { margin-left:auto; font-size:27px; }
.dashboard-insight-grid { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:16px; }
#dashboardPage .panel:has(#recentRows) { display:none; }
.trend-legend { display:flex; justify-content:flex-end; gap:18px; margin:-5px 0 8px; color:#006efd; font-size:12px; }
.trend-legend span:last-child { color:#9b7cff; }
.cost-alert { display:flex; gap:12px; align-items:center; padding:12px; border:1px solid #e5edfa; border-radius:9px; margin-bottom:9px; }
.cost-alert > span { color:#006efd; background:#edf5ff; padding:8px; border-radius:9px; display:flex; }
.cost-alert svg { width:22px; height:22px; }
.cost-alert > div { flex:1; min-width:0; }
.cost-alert strong { display:block; font-size:13px; }
.cost-alert small { display:block; color:#7283a0; font-size:11px; line-height:1.7; margin-top:5px; }
.cost-alert em { color:#e44e62; background:#fff0f3; border-radius:99px; padding:4px 8px; font-size:11px; font-style:normal; white-space:nowrap; }
.target-layout { display:flex; align-items:center; gap:24px; }
.target-ring { width:130px; aspect-ratio:1; flex-shrink:0; border-radius:50%; background:conic-gradient(#006efd var(--progress),#eaf1fb 0); display:grid; place-items:center; }
.target-ring > div { width:78%; aspect-ratio:1; border-radius:50%; background:white; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:5px; }
.target-ring strong { font-size:23px; }
.target-ring small { font-size:11px; color:#71829f; }
.target-values { flex:1; min-width:0; }
.target-values > div { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:12px 0; border-bottom:1px solid #eaf0fa; font-size:12px; color:#65799b; }
.target-values strong { color:#17294b; font-variant-numeric:tabular-nums; }
@media(max-width:1200px) { .dashboard-insight-grid { grid-template-columns:1fr; } }
@media(max-width:640px) { .target-layout { gap:14px; } .target-ring { width:105px; } .cost-alert { flex-wrap:wrap; } }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", Arial, sans-serif; color: #17345e; background: #f3f7ff; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; }
button { border: 0; background: #0057ff; color: white; padding: 9px 16px; border-radius: 6px; cursor: pointer; min-height: 38px; }
button.secondary { background: #edf3ff; color: #17345e; }
button.danger { background: #b93434; }
button.tiny { min-height: 28px; padding: 4px 8px; font-size: 12px; }
button:hover { filter: brightness(0.96); }
input, select { width: 100%; border: 1px solid #c7d8f2; border-radius: 6px; padding: 9px 10px; background: white; min-height: 38px; }
label { display: grid; gap: 6px; color: #465b78; font-size: 14px; }
h1, h2, h3 { margin: 0; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid #e5edf9; text-align: left; padding: 10px; font-size: 14px; }
th { color: #526582; background: #f5f8ff; }
tr:hover td { background: #fbfdff; }
.hidden { display: none !important; }
.muted { color: #657894; }
.error { color: #b93434; min-height: 22px; }
.message { color: #0057ff; min-height: 22px; }
.money { color: #082858; font-weight: 800; }
.money.income { color: #127a3a; }
.money.expense { color: #ad5400; }
.money.profit { color: #0057ff; }
.money.loss { color: #b93434; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pill.normal { background: #e8f7ef; color: #127a3a; }
.status-pill.void { background: #fff1f1; color: #b93434; }
.status-pill.locked { background: #e8f0ff; color: #0057ff; }
.login-shell { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #f3f7ff, #e3efff); }
.login-box { width: 360px; background: white; border: 1px solid #dce7f7; padding: 28px; border-radius: 8px; box-shadow: 0 16px 40px rgba(20, 40, 70, .08); display: grid; gap: 16px; }
.app { min-height: 100vh; display: grid; grid-template-columns: 210px 1fr; }
.sidebar { background: #082858; color: white; padding: 18px 14px; display: flex; flex-direction: column; gap: 8px; }
.brand { font-weight: 700; font-size: 20px; padding: 10px 8px 18px; }
.nav { width: 100%; text-align: left; background: transparent; border-radius: 6px; color: #dceaff; }
.nav.active, .nav:hover { background: #0057ff; color: white; }
.main { min-width: 0; }
.topbar { height: 62px; background: white; border-bottom: 1px solid #dce7f7; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.tag { display: inline-block; margin-left: 8px; padding: 3px 8px; background: #e8f0ff; color: #0057ff; border-radius: 999px; font-size: 12px; }
.page { padding: 24px; display: grid; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; }
.stat, .panel { background: white; border: 1px solid #dce7f7; border-radius: 8px; padding: 18px; }
.panel { overflow-x: auto; }
.stat span { display: block; color: #607694; }
.stat b { display: block; font-size: 30px; margin-top: 8px; color: #082858; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid.one-two { display: grid; grid-template-columns: 1fr; gap: 16px; }
#supplierForm, #productForm, #storeForm { display: grid; align-content: start; gap: 14px; }
.rank { display: grid; gap: 10px; margin-top: 14px; }
.rank-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf3ff; }
.chart-rank { gap: 14px; }
.dash-bar-row { display: grid; gap: 7px; }
.dash-bar-head { display: flex; justify-content: space-between; gap: 12px; color: #526582; font-size: 14px; }
.dash-bar-head b { color: #082858; }
.dash-bar-track { height: 12px; background: #e7f0ff; border-radius: 999px; overflow: hidden; }
.dash-bar { height: 100%; background: linear-gradient(90deg, #0057ff, #00b7ff); border-radius: 999px; }
.form-panel { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.section-head, .actions, .export-line { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.items { display: grid; gap: 10px; }
.delivery-config { display: grid; grid-template-columns: 180px auto 150px minmax(150px, 1fr) 110px 72px; gap: 10px; align-items: end; margin: 12px 0; padding: 10px; border: 1px solid #dce7f7; border-radius: 6px; background: #f8fbff; }
.short-btn { min-width: 0; padding-left: 12px; padding-right: 12px; }
.item-row { display: grid; grid-template-columns: 2fr 1fr 80px; gap: 10px; align-items: end; }
.item-row.quantity-enabled { grid-template-columns: 2fr .9fr .8fr .9fr 1fr 80px; }
.quantity-field { display: none; }
.item-row.quantity-enabled .quantity-field { display: grid; }
.total-line { text-align: right; font-size: 18px; }
.order-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 12px 14px; border: 1px solid #c7ddff; border-radius: 8px; background: #f0f6ff; color: #465b78; }
.order-total b { color: #0057ff; font-size: 26px; font-variant-numeric: tabular-nums; }
.file-label { border: 1px dashed #adc8ee; padding: 14px; border-radius: 8px; }
.existing-photos { border: 1px solid #dce7f7; border-radius: 8px; padding: 14px; background: #f8fbff; }
.existing-photos h4 { margin: 0 0 12px; }
.photo-card { display: grid; gap: 8px; width: 150px; }
.photo-card button { width: 100%; padding: 7px 10px; }
.filters, .export-line { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.export-line { grid-template-columns: 220px 180px 1fr; justify-content: start; }
.search-select { min-width: 0; }
.search-select input { width: 100%; }
.search-select.has-clear { position: relative; display: block; }
.search-select.has-clear input { padding-right: 38px; }
.clear-input {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: #e3efff;
  color: #526582;
  font-size: 16px;
  line-height: 1;
}
.clear-input:hover { background: #d2e4ff; filter: none; }
.busy-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(20, 32, 46, .32); }
.busy-box { min-width: 210px; display: grid; justify-items: center; gap: 12px; padding: 24px 30px; border-radius: 8px; background: white; color: #082858; box-shadow: 0 18px 52px rgba(20, 32, 46, .22); font-weight: 700; }
.busy-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #d2e4ff; border-top-color: #0057ff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-box { position: fixed; top: 42%; left: 50%; z-index: 90; display: grid; justify-items: center; gap: 10px; width: min(460px, calc(100vw - 36px)); transform: translate(-50%, -50%); pointer-events: none; }
.toast { position: relative; display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; min-height: 46px; transform: translateY(10px) scale(.96); opacity: 0; padding: 12px 18px 12px 15px; border-radius: 999px; background: rgba(255, 255, 255, .98); color: #082858; border: 1px solid #c7ddff; box-shadow: 0 22px 55px rgba(0, 87, 255, .24), 0 8px 18px rgba(20, 32, 46, .10); font-size: 15px; font-weight: 800; line-height: 1.45; backdrop-filter: blur(10px); transition: opacity .18s ease, transform .18s ease; }
.toast::before { content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 999px; background: #0057ff; box-shadow: 0 0 0 5px #e8f0ff; }
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.success { border-color: #bfe6d0; color: #0f5130; }
.toast.success::before { background: #127a3a; box-shadow: 0 0 0 5px #e8f7ef; }
.toast.error { border-color: #f0c9c9; color: #7a1f1f; }
.toast.error::before { background: #b93434; box-shadow: 0 0 0 5px #fff1f1; }
.toast.info { border-color: #c7ddff; color: #082858; }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(20, 32, 46, .45); display: grid; place-items: center; padding: 24px; }
#photoPreviewModal { z-index: 30; }
.modal-body { width: min(820px, 96vw); max-height: 88vh; overflow: auto; background: white; border-radius: 8px; padding: 22px; position: relative; }
.close { position: absolute; top: 12px; right: 12px; background: #edf3ff; color: #17345e; }
.detail-modal-body { overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
#detailContent { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.detail-meta { flex: 0 0 auto; display: grid; grid-template-columns: 132px minmax(0, 1fr) 144px; gap: 10px; min-width: 0; }
.detail-meta > div { min-width: 0; min-height: 54px; padding: 9px 12px; border: 1px solid #dce7f7; border-radius: 6px; background: #f8fbff; }
.detail-meta span { display: block; color: #607694; font-size: 12px; line-height: 1.3; }
.detail-meta b { display: block; margin-top: 5px; color: #082858; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-remark-button { display: block; width: 100%; min-width: 0; min-height: 0; margin-top: 5px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #526582; text-align: left; font-size: 15px; font-weight: 400; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-remark-button:hover { background: transparent; color: #0057ff; filter: none; }
.detail-remark-button:focus-visible { outline: 2px solid #0057ff; outline-offset: 2px; }
.detail-remark-button:disabled { cursor: default; opacity: 1; color: #657894; }
.detail-total { text-align: right; }
.detail-total b { overflow: visible; text-overflow: clip; font-variant-numeric: tabular-nums; }
#remarkFullModal { z-index: 35; }
.remark-full-body { width: min(600px, 96vw); }
.remark-full-body h3 { padding-right: 48px; }
#remarkFullText { margin-top: 14px; padding: 16px; border: 1px solid #dce7f7; border-radius: 6px; background: #f5f8ff; color: #465b78; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-table-wrap { flex: 1 1 auto; min-height: 180px; max-height: 52vh; overflow: auto; border: 1px solid #dfe7ef; border-radius: 8px; background: white; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.detail-table { min-width: 0; table-layout: fixed; }
.detail-table thead th { position: sticky; top: 0; z-index: 1; background: #eef4fb; color: #082858; font-size: 13px; }
.detail-product-col { width: 70%; }
.detail-money-col { width: 30%; }
.detail-table th, .detail-table td { height: 38px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-table tbody tr:nth-child(even) td { background: #fbfdff; }
.detail-table tbody tr:hover td { background: #f3f8fc; }
.detail-table th:first-child, .detail-table td:first-child { padding-left: 14px; }
.detail-table th:last-child, .detail-table td:last-child { text-align: right; padding-right: 18px; }
.detail-table td:last-child { color: #8a4b00; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-photos { flex: 0 0 auto; }
.detail-photos h4 { margin: 0; }
.photos { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.photos img { width: 150px; height: 110px; object-fit: cover; border: 1px solid #dce7f7; border-radius: 6px; }
.photo-preview-btn { min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; border-radius: 6px; }
.photo-preview-btn:hover { filter: none; }
.photo-preview-btn:hover img { border-color: #0057ff; box-shadow: 0 0 0 2px rgba(0, 87, 255, .12); }
.photo-preview-modal { width: min(960px, 96vw); max-height: 92vh; display: grid; gap: 14px; overflow: hidden; }
.photo-preview-modal img { width: 100%; max-height: calc(92vh - 110px); object-fit: contain; border-radius: 6px; background: #f3f7ff; }
.photo-preview-actions { display: flex; justify-content: flex-end; }
.download-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 16px; border-radius: 6px; background: #0057ff; color: white; text-decoration: none; }
.user-manage { display: grid; gap: 14px; }
.user-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.field-title { display: block; color: #465b78; font-size: 14px; margin-bottom: 6px; }
.checks { min-height: 38px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 10px; border: 1px solid #c7d8f2; border-radius: 6px; background: white; }
.checks label { display: inline-flex; grid-template-columns: none; align-items: center; gap: 5px; font-size: 14px; }
.checks input { width: auto; min-height: auto; }
.mini-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.mini-list span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dce7f7; border-radius: 6px; padding: 6px; }
#supplierManageList .mini-list { max-height: 260px; overflow: auto; align-content: flex-start; padding: 8px; border: 1px solid #dce7f7; border-radius: 6px; background: #f8fbff; }
.supplier-chip { cursor: pointer; }
.supplier-chip b { color: #082858; }
.product-result { max-height: 260px; overflow: auto; border: 1px solid #dce7f7; border-radius: 6px; }
.product-result table { min-width: 0; }
.product-result th, .product-result td { padding: 8px 10px; }
.product-manage { display: grid; gap: 12px; }
.product-filters { grid-template-columns: minmax(180px, 260px) minmax(240px, 1fr); margin-bottom: 0; }
.supplier-filters { margin-top: 4px; }
.profit-panel { display: grid; gap: 16px; }
.year-filters { grid-template-columns: minmax(280px, 1fr) 150px 110px; align-items: end; }
.year-store-filter { min-width: 0; }
.year-store-checks { max-height: 92px; overflow: auto; align-content: flex-start; }
.year-store-checks label:first-child { font-weight: 800; color: #0057ff; }
.profit-form { display: grid; grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) minmax(180px,1.5fr) 150px; gap: 12px; align-items: end; }
.profit-summary { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; }
.statement-summary { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
.statement-title { margin: 22px 0 10px; }
.statement-table { margin-bottom: 18px; }
.statement-table tbody tr { cursor: pointer; }
.statement-table tbody tr.active td { background: #eaf5ff; }
.statement-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.statement-detail-tools { display: grid; grid-template-columns: minmax(220px, 1fr) 130px 130px 150px 90px 110px; gap: 10px; margin-bottom: 10px; }
.table-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 10px; color: #526582; font-size: 14px; }
.table-pager .pager-actions { display: flex; align-items: center; gap: 8px; }
.table-pager button { min-height: 30px; padding: 5px 10px; }
.statement-detail-wrap { max-height: 560px; overflow: auto; border: 1px solid #d2e2f7; border-radius: 8px; background: white; }
.statement-detail-table { min-width: 900px; border-collapse: separate; border-spacing: 0; }
.statement-detail-table.compact { min-width: 700px; }
.statement-detail-table th, .statement-detail-table td { border-right: 1px solid #dce7f7; border-bottom: 1px solid #dce7f7; }
.statement-detail-table th:last-child, .statement-detail-table td:last-child { border-right: 0; }
.statement-detail-table thead th { position: sticky; top: 0; z-index: 1; background: #eef4fb; color: #082858; box-shadow: 0 1px 0 #d2e2f7; }
.statement-detail-table tbody tr:nth-child(even) td { background: #fbfdff; }
.statement-detail-table tbody tr:hover td { background: #f3f8fc; }
.statement-detail-table .amount-cell { text-align: right; padding-right: 18px; white-space: nowrap; }
.statement-detail-total { margin-top: 10px; text-align: right; color: #082858; font-size: 16px; font-weight: 800; }
.profit-formula { color: #0057ff; background: #eaf5ff; border: 1px solid #cfe5f8; border-radius: 6px; padding: 10px 12px; }
.setup-guide { color: #7a4a00; background: #fff7e6; border: 1px solid #f2d28b; border-radius: 6px; padding: 12px 14px; }
.setup-guide b { color: #5d3900; }
.lock-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #526582; background: #f5f8ff; border: 1px solid #dce7f7; border-radius: 6px; padding: 10px 12px; }
.password-box { display: grid; gap: 14px; max-width: 420px; }
.fixed-cost-form { display: grid; gap: 16px; }
.cost-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tab-buttons { display: flex; gap: 10px; }
.salary-panel { display: grid; gap: 16px; }
.employee-directory { background: white; padding: 20px; gap: 18px; min-width: 0; }
.employee-directory-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.employee-directory-heading p { margin: 7px 0 0; font-size: 13px; }
.employee-directory-heading button { white-space: nowrap; }
.employee-directory-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 170px auto; align-items: end; gap: 12px; padding: 14px; background: #f5f8ff; border-radius: 8px; }
.employee-directory-table-wrap { overflow: auto; max-width: 100%; border: 1px solid #dce7f7; border-radius: 8px; }
.employee-directory-table { min-width: 980px; }
.employee-directory-table th { padding: 14px; white-space: nowrap; font-size: 13px; }
.employee-directory-table td { padding: 16px 14px; white-space: nowrap; }
.employee-directory-table tbody tr:last-child td { border-bottom: 0; }
.employee-secondary { display: block; font-size: 12px; color: #657894; margin-top: 6px; }
.employee-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.employee-status.active { background: #e8f7ef; color: #127a3a; }
.employee-status.inactive { background: #edf1f7; color: #657894; }
.employee-action-group { display: flex; gap: 6px; align-items: center; }
.employee-directory-pager { display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size: 13px; color: #657894; }
.employee-directory-pager > div { display: flex; gap: 12px; align-items: center; }
.employee-directory button:disabled { cursor: default; opacity: .45; }
.employee-form-hint { padding: 12px; margin: 0; font-size: 13px; color: #0057ff; background: #e8f0ff; border-radius: 8px; line-height: 1.7; }
.employee-history-dialog { width: min(560px, 94vw); max-height: 85vh; overflow: auto; padding: 28px; }
.employee-history-dialog > h3 { padding-right: 28px; }
.employee-history-dialog > p { font-size: 13px; line-height: 1.7; }
.employee-history-item { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-top: 1px solid #e5edf9; }
.employee-history-number { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: #e8f0ff; color: #0057ff; }
.employee-history-item p { margin: 6px 0 0; font-size: 13px; color: #657894; }
@media (max-width: 640px) {
  .employee-directory { padding: 12px; }
  .employee-directory-heading { align-items: flex-start; }
  .employee-directory-filters { grid-template-columns: 1fr; }
  .employee-directory-pager { align-items: flex-start; flex-direction: column; }
}
.sub-panel { display: grid; align-content: start; gap: 12px; border: 1px solid #dce7f7; border-radius: 8px; padding: 14px; background: #f8fbff; }
.salary-settings-form { max-height: 520px; overflow-y: auto; padding-right: 12px; }
.salary-param-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.salary-department-add { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) auto auto; gap: 8px; align-items: center; }
.salary-department-add input { width: 100%; }
.salary-department-add button { white-space: nowrap; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #34495e; }
.inline-check input { width: auto; }
.salary-tier-editor, .salary-position-editor { display: grid; gap: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head h4 { margin: 0; color: #082858; font-size: 15px; }
.salary-tier-wrap { overflow-x: auto; border: 1px solid #d2e2f7; border-radius: 6px; background: white; }
.salary-tier-wrap table { min-width: 760px; }
.salary-tier-wrap th, .salary-tier-wrap td { border-bottom: 1px solid #dce7f7; }
.salary-tier-wrap tbody tr:last-child td { border-bottom: 0; }
.salary-tier-wrap input { width: 100%; min-width: 96px; padding: 7px 8px; }
.salary-position-rules { display: grid; gap: 8px; }
.salary-position-empty { margin: 0; padding: 14px; border: 1px dashed #cfd9e4; border-radius: 8px; background: white; text-align: center; }
.salary-position-rule-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: white;
}
.salary-position-rule-row:hover { border-color: #c9d7e4; background: #fbfdff; }
.position-rule-summary { min-width: 0; display: grid; gap: 4px; }
.position-rule-summary b { color: #082858; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.position-rule-summary span { color: #607694; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.position-rule-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: #f1f4f7; color: #607694; font-size: 12px; white-space: nowrap; }
.rule-tag.on { background: #e8f7ef; color: #127a3a; }
.position-rule-actions { display: flex; gap: 6px; justify-content: flex-end; }
.position-rule-modal { display: grid; gap: 14px; max-width: 560px; }
.position-rule-modal h3 { padding-right: 42px; }
.position-rule-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.percent-input { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 0; }
.percent-input input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.percent-input b { display: grid; place-items: center; align-self: stretch; min-height: 34px; border: 1px solid #c7d8f2; border-left: 0; border-radius: 0 6px 6px 0; background: #f5f8ff; color: #526582; font-size: 13px; }
.position-rule-options { display: grid; gap: 8px; padding: 10px; border: 1px solid #dce7f7; border-radius: 8px; background: #f8fbff; }
.option-toggle { display: flex; grid-template-columns: none; align-items: center; gap: 8px; min-height: 32px; color: #34495e; }
.option-toggle input { width: 16px; min-height: 16px; }
.commission-editor { display: grid; gap: 10px; padding-top: 2px; }
.commission-rows { display: grid; gap: 8px; }
.commission-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(86px, .65fr) minmax(86px, .65fr) minmax(90px, .65fr) 52px; align-items: end; gap: 8px; padding: 10px; border: 1px solid #dce7f7; border-radius: 8px; background: #f8fbff; }
.commission-row label { font-size: 13px; color: #526582; }
.commission-row input, .commission-row select { padding: 7px 8px; min-height: 34px; }
.commission-empty { margin: 0; padding: 12px; border: 1px dashed #d2e2f7; border-radius: 8px; background: #f8fbff; text-align: center; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.salary-table-wrap input { min-width: 86px; padding: 7px 8px; }
.salary-table-wrap { min-width: 0; max-width: 100%; overflow: auto; border: 1px solid #dce7f7; border-radius: 10px; background: white; }
.salary-payroll-table { min-width: 1370px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.salary-col-employee { width: 150px; }
.salary-col-type { width: 155px; }
.salary-col-standard { width: 155px; }
.salary-col-attendance { width: 190px; }
.salary-col-additions { width: 170px; }
.salary-col-deductions { width: 145px; }
.salary-col-total { width: 135px; }
.salary-col-remark { width: 160px; }
.salary-col-actions { width: 110px; }
.salary-payroll-table th { white-space: nowrap; padding: 16px 14px; font-size: 13px; }
.salary-payroll-table td { padding: 18px 14px; vertical-align: middle; background: white; line-height: 1.6; overflow-wrap: anywhere; }
.salary-payroll-table tbody tr:nth-child(even) td { background: #f8fbff; }
.salary-payroll-table tbody tr:hover td { background: #f0f6ff; }
.salary-payroll-table tbody tr:last-child td { border-bottom: 0; }
.salary-payroll-table th:first-child, .salary-payroll-table td:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 3px 0 8px -5px #adc8ee; }
.salary-payroll-table th:last-child, .salary-payroll-table td:last-child { position: sticky; right: 0; z-index: 1; box-shadow: -3px 0 8px -5px #adc8ee; }
.salary-payroll-table th:first-child, .salary-payroll-table th:last-child { z-index: 2; background: #f5f8ff; }
.salary-employee-name { display: block; font-size: 15px; color: #082858; }
.salary-employee-meta { display: block; margin-top: 6px; font-size: 12px; color: #657894; }
.salary-type-badge { display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 12px; background: #e8f0ff; color: #0057ff; }
.salary-type-badge.temporary { color: #07648d; background: #e5f7ff; }
.salary-inline-field { display: grid; gap: 5px; margin-bottom: 7px; font-size: 12px; }
.salary-inline-field:last-child { margin-bottom: 0; }
.salary-payroll-table td:nth-child(4) .salary-inline-field { grid-template-columns: 66px minmax(0, 1fr); gap: 6px; align-items: center; }
#salaryInfo { color: #465b78; font-size: 13px; line-height: 1.8; border-left: 3px solid #0057ff; }
.salary-payroll-table input { min-width: 0; width: 100%; font-variant-numeric: tabular-nums; }
.salary-payroll-table input[type="number"] { text-align: right; }
.salary-detail-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 2; }
.salary-detail-line > span:first-child, .salary-cell-note { color: #657894; font-size: 12px; }
.salary-detail-line > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.salary-standard-amount { display: block; margin-top: 5px; font-variant-numeric: tabular-nums; }
.salary-final-amount { font-size: 18px; color: #0057ff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.salary-row-actions { display: grid; justify-items: stretch; gap: 9px; text-align: center; }
.salary-row-actions button { padding: 8px; white-space: nowrap; font-size: 13px; }
.salary-payroll-status { font-size: 12px; white-space: nowrap; }
.salary-payroll-status.pending { color: #ad5400; }
.salary-payroll-status.confirmed { color: #127a3a; }
.salary-payroll-table .salary-empty { position: static; padding: 36px; text-align: center; color: #657894; box-shadow: none; }
.bar-chart { display: grid; gap: 10px; margin-top: 14px; min-width: 360px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 90px; align-items: center; gap: 10px; }
.bar-row span { color: #526582; font-size: 13px; }
.bar-row b { text-align: right; font-size: 13px; }
.bar-track { height: 18px; background: #e7f0ff; border-radius: 4px; overflow: hidden; }
.bar { height: 100%; background: #0057ff; border-radius: 4px; }
.bar.negative { background: #b93434; }
.compare-filters { grid-template-columns: minmax(160px, 1.2fr) 54px minmax(100px, .8fr) minmax(100px, .8fr) 54px minmax(100px, .8fr) minmax(100px, .8fr) 130px; align-items: end; }
.compare-label { display: grid; place-items: center; min-height: 38px; border-radius: 6px; background: #eaf5ff; color: #0057ff; font-weight: 700; }
.compare-table { display: grid; gap: 12px; }
.compare-metric { background: white; border: 1px solid #dce7f7; border-radius: 8px; padding: 14px; display: grid; gap: 10px; }
.compare-metric-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compare-metric-title b { font-size: 18px; color: #082858; }
.compare-metric-title em { font-style: normal; font-weight: 700; }
.compare-metric-title em.up { color: #127a3a; }
.compare-metric-title em.down { color: #b93434; }
.compare-side { display: grid; grid-template-columns: minmax(150px, 220px) 110px 1fr; align-items: center; gap: 10px; color: #526582; }
.compare-side strong { color: #082858; text-align: right; }
.compare-track { height: 14px; background: #e7f0ff; border-radius: 999px; overflow: hidden; }
.compare-fill { height: 100%; border-radius: 999px; }
.compare-fill.left { background: #0057ff; }
.compare-fill.right { background: #00b7ff; }
.license-notice-panel { position: fixed; right: 24px; bottom: 84px; z-index: 80; display: grid; gap: 10px; width: min(430px, calc(100vw - 48px)); padding: 18px; border: 1px solid #ffb66b; border-radius: 8px; background: #fff5e9; color: #7a430d; box-shadow: 0 22px 60px rgba(20, 32, 46, .24); transform: translateY(28px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.license-notice-panel.show { transform: translateY(0); opacity: 1; }
.license-notice-panel b { font-size: 18px; color: #a34f00; }
.license-notice-panel span { line-height: 1.7; }
.license-notice-panel button { justify-self: start; background: #a34f00; }
.license-notice-fab { position: fixed; right: 24px; bottom: 24px; z-index: 79; min-height: 42px; padding: 0 16px; border-radius: 999px; background: #a34f00; color: #fff; box-shadow: 0 12px 30px rgba(255, 138, 0, .24); }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 2; flex-direction: row; overflow-x: auto; }
  .brand { min-width: 120px; padding: 8px; }
  .nav { white-space: nowrap; }
  .grid.two, .stats, .form-grid, .filters, .user-form, .profit-form, .profit-summary, .cost-grid, .salary-param-grid, .compare-filters { grid-template-columns: 1fr; }
  .salary-department-add { grid-template-columns: 1fr; }
  .salary-position-rule-row { grid-template-columns: 1fr; align-items: stretch; }
  .position-rule-actions { justify-content: flex-start; }
  .commission-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commission-row .remove-commission-rule { grid-column: 1 / -1; justify-self: end; }
  .compare-side { grid-template-columns: 1fr; }
  .item-row, .item-row.quantity-enabled, .delivery-config { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  button, input, select { font-size: 16px; }
  body { background: white; }
  .login-shell { align-items: start; padding: 18px 12px; }
  .login-box { width: 100%; padding: 22px 18px; box-shadow: none; }
  .login-box h1 { font-size: 24px; line-height: 1.25; }
  .sidebar { padding: 10px 10px; gap: 6px; }
  .brand { min-width: 92px; font-size: 17px; padding: 9px 6px; }
  .nav { width: auto; min-width: max-content; padding: 9px 12px; }
  .topbar { height: auto; min-height: 54px; align-items: flex-start; gap: 8px; padding: 12px 14px; flex-direction: column; }
  .top-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .tag { margin-left: 6px; }
  .page { padding: 14px 12px 22px; gap: 14px; }
  .page h2 { font-size: 22px; }
  .stat, .panel { border-radius: 6px; padding: 14px; }
  .stat b { font-size: 26px; }
  .section-head, .actions { align-items: stretch; }
  .section-head { gap: 12px; }
  .section-head button, .actions button { width: 100%; }
  .items { gap: 14px; }
  .item-row { border: 1px solid #dce7f7; border-radius: 6px; padding: 12px; background: #f8fbff; }
  .item-row .remove { width: 100%; }
  .total-line { font-size: 20px; padding-top: 2px; }
  .file-label { padding: 12px; }
  .filters, .export-line { grid-template-columns: 1fr; }
  .lock-line { align-items: stretch; flex-direction: column; }
  .position-rule-modal-grid { grid-template-columns: 1fr; }
  .commission-row { grid-template-columns: 1fr; }
  .commission-row .remove-commission-rule { justify-self: stretch; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
  table { min-width: 620px; }
  th, td { padding: 9px 8px; white-space: nowrap; }
  td button { margin: 2px 0; padding: 8px 10px; }
  .modal { padding: 10px; align-items: start; }
  .modal-body { width: 100%; max-height: calc(100vh - 20px); padding: 18px 14px; }
  .detail-meta { grid-template-columns: 108px minmax(0, 1fr) 128px; gap: 8px; }
  .detail-meta > div { padding: 9px 8px; }
  .detail-meta b, .detail-remark-button { font-size: 14px; }
  .photos img { width: 120px; height: 90px; }
  .photo-card { width: 120px; }
}
/* Historical Excel import */
.excel-import-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:12px 0; }
.excel-import-confirm { display:flex; flex-direction:row; align-items:center; gap:8px; margin:14px 0; }
.excel-import-confirm input, .excel-import-scroll input[type="checkbox"] { width:auto; }
.excel-import-scroll { overflow:auto; max-height:480px; margin:12px 0; }
.excel-import-scroll th { position:sticky; top:0; background:#e8f0ff; z-index:1; }
.excel-import-scroll input:not([type="checkbox"]) { min-width:180px; }
.excel-import-missing { background:#fff1df; }
.excel-import-scroll tfoot th, .excel-import-scroll tfoot td { background:#ffebd1; font-weight:700; position:static; }
#excelImportResult { white-space:pre-wrap; overflow-wrap:anywhere; }
#excelImportResult.excel-import-error { border:1px solid #ff8a00; background:#fff5e9; }

/* v3.0: shared application shell and customer overview. */
body { color: var(--ink); background: var(--soft); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; }
button { background: var(--brand); border-radius: 8px; transition: background .15s, box-shadow .15s; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #83b9ff; outline-offset: 3px; }
input:focus, select:focus { outline: 2px solid #b8d7ff; border-color: var(--brand); }
button:disabled { cursor: not-allowed; opacity: .55; }
.app { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px 16px; background: #fff; border-right: 1px solid var(--line); color: var(--ink); gap: 5px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; font-size: 23px; letter-spacing: .5px; white-space: nowrap; }
.brand small { display: block; margin-top: 5px; color: #657795; font-size: 12px; font-weight: 400; letter-spacing: 2px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 42px; height: 46px; color: white; font-size: 26px; font-weight: 800; background: linear-gradient(145deg, #14a3ff, #0054fa); border-radius: 13px; box-shadow: 0 5px 13px #006efd22; }
.nav-group-label { margin: 14px 12px 8px; font-size: 12px; font-weight: 600; color: #7c8ba5; letter-spacing: 1px; }
.sidebar .nav { display: flex; align-items: center; gap: 14px; min-height: 44px; flex-shrink: 0; padding: 11px 14px; color: #354868; font-size: 14px; background: transparent; border-radius: 9px; font-weight: 500; }
.sidebar .nav svg { width: 21px; height: 21px; flex-shrink: 0; color: #667b9e; }
.sidebar .nav:hover { background: #f1f6ff; color: var(--brand); filter: none; }
.sidebar .nav.active { color: var(--brand); background: #e5efff; font-weight: 700; }
.sidebar .nav.active svg { color: var(--brand); }
.sidebar-license { display: grid; gap: 10px; margin: auto 0 10px; padding: 18px 14px; border-radius: 12px; background: linear-gradient(120deg, #277eff, #48a1ff); color: white; }
.sidebar-license strong { font-size: 17px; }
.sidebar-license span { font-size: 12px; line-height: 1.6; }
.topbar { height: 64px; padding: 0 24px; background: #ffffffd9; border-color: var(--line); gap: 20px; }
.breadcrumb { display: flex; align-items: center; gap: 16px; white-space: nowrap; font-size: 13px; color: #6b7fa1; }
.breadcrumb strong { color: #162b4b; }
.topbar-account { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.top-actions { gap: 14px; }
.top-actions button { font-size: 12px; min-height: 32px; padding: 7px 10px; }
.page { padding: 24px; gap: 18px; }
.page h2 { font-size: 26px; letter-spacing: -.5px; }
.panel, .stat { border-color: var(--line); border-radius: 13px; box-shadow: 0 3px 12px #1c5baf05; }
.panel h3 { font-size: 17px; }
th { background: #f0f5fc; color: #455a7d; font-weight: 600; }
th, td { border-color: #eaf0fa; }
tbody tr:last-child td { border-bottom: 0; }
.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-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.dashboard-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.dashboard-title h2 { font-size: 29px; }
.dashboard-title p { margin: 0; font-size: 14px; color: #62769a; }
.dashboard-filters { display: flex; align-items: center; gap: 10px; }
.dashboard-filters select { width: 160px; }
.dashboard-filters input { width: 160px; }
.dashboard-filters button { white-space: nowrap; box-shadow: 0 4px 10px #006efd20; }
.dashboard-status { margin: -6px 0 -4px; color: #7b8da8; font-size: 12px; min-height: 17px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; }
.kpi { display: flex; gap: 12px; align-items: flex-start; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; box-shadow: 0 4px 14px #1763bc06; }
.kpi > div { min-width: 0; }
.kpi div > span { display: block; font-size: 13px; font-weight: 600; color: #344767; }
.kpi b { display: block; margin: 12px 0 10px; font-size: clamp(20px, 1.65vw, 31px); font-weight: 750; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small { display: block; font-size: 11px; color: #8191aa; line-height: 1.6; }
.kpi-icon { flex: 0 0 38px; height: 42px; display: grid; place-items: center; color: var(--brand); border-radius: 12px; background: #eaf4ff; }
.kpi-icon svg { width: 25px; height: 25px; }
.kpi-icon.violet { color: #7757f5; background: #f0edff; }
.kpi-profit { background: linear-gradient(120deg, #1687ff, #0060fa); color: white; border-color: transparent; position: relative; overflow: hidden; }
.kpi-profit:after { content: ''; position: absolute; width: 140px; height: 95px; bottom: -60px; right: -25px; transform: rotate(-25deg); border-radius: 30px; background: #ffffff14; pointer-events: none; }
.kpi-profit div > span, .kpi-profit b, .kpi-profit small { color: white; }
.kpi-profit .kpi-icon { background: #ffffff14; color: white; }
.dashboard-chart-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(300px,1fr); gap: 16px; }
.dashboard-detail-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,1fr); gap: 16px; }
#dashboardPage .panel { min-width: 0; padding: 20px; overflow: hidden; }
.dashboard-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dashboard-panel-head h3 { display: flex; align-items: center; gap: 10px; }
.dashboard-panel-head h3 > span[data-icon] { display: flex; color: var(--brand); }
.dashboard-panel-head svg { width: 22px; height: 22px; }
.dashboard-panel-head > .muted { font-size: 12px; }
.chart-tabs { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.chart-tabs button { color: #7b8aa6; background: white; min-height: 28px; font-size: 12px; padding: 4px 12px; border-radius: 5px; }
.chart-tabs button[aria-pressed="true"] { background: var(--brand); color: white; }
.dashboard-trend { position: relative; min-height: 160px; }
.dashboard-trend svg { display: block; width: 100%; height: auto; }
.dashboard-trend text { fill: #7b8dab; font-size: 11px; font-family: inherit; }
.chart-note { margin: 4px 0 0; color: #8a99b0; font-size: 11px; }
.trend-empty { position: absolute; top: 40%; left: 25%; padding: 8px 12px; border-radius: 8px; background: #fffffff0; color: #8796b0; font-size: 12px; }
.dashboard-composition { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 190px; }
.cost-donut { width: clamp(130px, 12vw, 190px); aspect-ratio: 1; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; }
.cost-donut > div { width: 73%; aspect-ratio: 1; border-radius: 50%; background: white; display: flex; justify-content: center; flex-direction: column; align-items: center; gap: 6px; }
.cost-donut strong { font-size: clamp(13px, 1.15vw, 20px); font-variant-numeric: tabular-nums; }
.cost-donut small { color: #8796b0; font-size: 10px; }
.cost-legend { display: grid; gap: 20px; flex: 1; min-width: 0; }
.cost-legend > div { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.cost-legend i { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; flex-shrink: 0; }
.cost-legend span { flex: 1; }
.cost-legend strong { display: block; margin-top: 5px; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cost-legend b { font-weight: 600; font-size: 11px; }
.dashboard-table-wrap { overflow: auto; }
#dashboardPage table { white-space: nowrap; }
#dashboardPage th, #dashboardPage td { font-size: 12px; padding: 12px 10px; font-variant-numeric: tabular-nums; }
#dashboardPage th { background: #eff4fb; }
.numeric { text-align: right; }
.margin-chip { display: inline-block; color: #079e62; background: #e3faef; padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.margin-chip.negative { color: #d54545; background: #fff0f0; }
.dashboard-tasks { display: grid; gap: 12px; }
.dashboard-task { width: 100%; display: flex; align-items: center; text-align: left; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); }
.dashboard-task:hover { background: #fbfdff; filter: none; border-color: #c6ddff; }
.dashboard-task > span:nth-child(2) { flex: 1; }
.dashboard-task strong { display: block; font-size: 13px; }
.dashboard-task small { display: block; margin-top: 6px; color: #8493ab; font-size: 11px; }
.dashboard-task em { white-space: nowrap; background: #fff0df; color: #ed8311; padding: 4px 8px; font-size: 11px; font-style: normal; border-radius: 99px; }
.task-icon { width: 36px; height: 40px; border-radius: 9px; background: #fff5e9; color: #ff8a00; display: grid; place-items: center; flex-shrink: 0; }
.task-icon svg { width: 23px; height: 23px; }
.task-count { font-size: 11px; color: #f08a18; background: #fff1df; padding: 4px 8px; border-radius: 99px; }
.task-count:empty { display: none; }
button.text-button { color: var(--brand); background: transparent; font-size: 12px; min-height: 26px; padding: 3px 0; }
.dashboard-empty { color: #8796ae; text-align: center; padding: 25px 10px; font-size: 13px; font-weight: 400; }
.dashboard-suppliers summary { cursor: pointer; color: #637a9b; font-size: 13px; }
.login-box { border-radius: 18px; border-color: var(--line); box-shadow: 0 20px 70px #0054b012; }
@media (min-width: 901px) and (max-width: 1300px) {
  .app { grid-template-columns: 196px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 20px; gap: 8px; }
  .page { padding: 20px; }
  .dashboard-kpis { gap: 9px; }
  .kpi { display: block; padding: 15px 12px; }
  .kpi-icon { width: 32px; height: 32px; margin-bottom: 10px; border-radius: 9px; }
  .kpi-icon svg { width: 21px; height: 21px; }
  .dashboard-composition { flex-direction: column; }
  .cost-legend { width: 100%; gap: 10px; }
  .cost-legend strong { display: inline; margin-left: 6px; font-size: 11px; }
}
@media (max-width: 1100px) {
  .dashboard-detail-grid { grid-template-columns: minmax(0,1fr); }
  .topbar-account #scopeText { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; }
  .brand { padding: 0 14px 0 0; font-size: 18px; }
  .brand-mark { flex-basis: 32px; height: 35px; font-size: 22px; }
  .brand small, .nav-group-label, .sidebar-license { display: none; }
  .sidebar .nav { width: auto; min-width: max-content; gap: 8px; padding: 9px 12px; font-size: 13px; }
  .sidebar .nav svg { width: 18px; height: 18px; }
  .dashboard-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .kpi b { font-size: 22px; }
  .dashboard-chart-grid { grid-template-columns: minmax(0,1fr); }
  .cost-donut { width: 160px; }
  .cost-donut strong { font-size: 16px; }
  .cost-legend { max-width: 220px; }
  .topbar { padding: 0 18px; }
}
@media (max-width: 640px) {
  .page { padding: 18px 12px; }
  .topbar { padding: 12px; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .topbar-account { flex-wrap: wrap; gap: 8px; }
  .top-actions { width: auto; display: flex; flex-direction: row; }
  .breadcrumb { font-size: 12px; gap: 8px; }
  .dashboard-heading { gap: 16px; }
  .dashboard-title { gap: 10px; }
  .dashboard-title h2 { font-size: 26px; }
  .dashboard-title p { font-size: 12px; }
  .dashboard-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .dashboard-filters input, .dashboard-filters select { width: 100%; min-width: 0; font-size: 14px; }
  .dashboard-filters button { grid-column: 1/-1; }
  .dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .kpi { display: block; padding: 15px; }
  .kpi-icon { width: 32px; height: 32px; margin-bottom: 10px; }
  .kpi-icon svg { width: 21px; height: 21px; }
  .kpi b { font-size: 21px; margin: 10px 0 6px; }
  .kpi-profit { grid-column: 1/-1; display: flex; align-items: center; gap: 18px; }
  .kpi-profit b { font-size: 28px; }
  #dashboardPage .panel { padding: 16px; }
  .dashboard-panel-head { margin-bottom: 12px; }
  .dashboard-panel-head h3 { font-size: 16px; }
  .dashboard-task { gap: 8px; padding: 10px 8px; }
  .dashboard-task em { white-space: normal; max-width: 85px; }
  .cost-donut { width: 132px; }
  .cost-donut strong { font-size: 13px; }
  .dashboard-composition { gap: 14px; }
  .cost-legend strong { font-size: 12px; }
  .dashboard-trend { overflow-x: auto; }
  .dashboard-trend svg { min-width: 500px; }
  .dashboard-status { line-height: 1.7; }
}
/* Consistent destructive action buttons. */
button.danger { background:#b93434; color:#fff; border:0; border-radius:8px; }
button.danger:hover:not(:disabled) { background:#a52929; filter:none; }
button.danger:disabled { background:#dba9a9; color:#fff; opacity:1; cursor:not-allowed; }
/* Selected-month targets and supplier analysis. */
.dashboard-insight-grid { grid-template-columns:minmax(0,1.65fr) minmax(330px,1fr); }
.target-rank-table { white-space:nowrap; }
.rank-number { display:inline-grid; place-items:center; width:21px; height:19px; margin-right:10px; border-radius:5px; background:#e7f0ff; color:#006efd; font-size:11px; font-weight:700; }
.target-rank-table tr:first-child .rank-number, .supplier-ranking-table tr:first-child .rank-number { background:#006efd; color:#fff; }
.completion-cell { display:flex; align-items:center; gap:10px; font-size:12px; font-variant-numeric:tabular-nums; }
.completion-cell > i { display:block; width:78px; height:7px; border-radius:20px; background:#e5ecf7; overflow:hidden; }
.completion-cell b { display:block; height:100%; background:#006efd; border-radius:20px; }
#dashboardPage .supplier-analysis { padding:20px; }
.supplier-analysis-grid { display:grid; grid-template-columns:minmax(300px,.9fr) minmax(0,1.4fr); gap:24px; align-items:center; }
.supplier-analysis-chart { display:flex; align-items:center; gap:18px; min-width:0; }
.supplier-donut { width:150px; flex-shrink:0; }
.supplier-chart-legend { flex:1; display:grid; gap:15px; min-width:0; }
.supplier-chart-legend > div { display:grid; grid-template-columns:9px minmax(65px,1fr) auto auto; align-items:center; gap:8px; font-size:11px; }
.supplier-chart-legend i { width:9px; height:9px; border-radius:50%; }
.supplier-chart-legend span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.supplier-chart-legend b, .supplier-chart-legend strong { font-size:11px; font-variant-numeric:tabular-nums; }
.supplier-analysis-ranking { min-width:0; padding-left:24px; border-left:1px solid #e4edfb; }
.supplier-analysis-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px; }
.supplier-analysis-toolbar > strong { font-size:13px; margin-right:auto; }
.supplier-analysis-toolbar input { width:155px; min-height:32px; padding:6px 10px; font-size:12px; border-color:#dce7fa; border-radius:20px; }
.supplier-analysis-toolbar .chart-tabs button { font-size:11px; padding:4px 10px; }
.supplier-change { white-space:nowrap; font-variant-numeric:tabular-nums; color:#8a9bb4; }
.supplier-change.rising { color:#ef5969; }.supplier-change.falling { color:#169769; }
.supplier-ranking-table td:nth-child(3), .supplier-ranking-table th:nth-child(3), .supplier-ranking-table td:nth-child(4), .supplier-ranking-table th:nth-child(4) { text-align:right; }
@media(max-width:1350px) { .supplier-analysis-grid { grid-template-columns:minmax(0,1fr); }.supplier-analysis-ranking { border-left:0; border-top:1px solid #e4edfb; padding:20px 0 0; }.supplier-analysis-chart { max-width:650px; }.supplier-chart-legend { max-width:400px; } }
@media(max-width:1100px) { .dashboard-insight-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:640px) { .supplier-analysis-chart { flex-direction:column; }.supplier-chart-legend { width:100%; max-width:none; }.supplier-analysis-toolbar input { width:100%; }.supplier-donut { width:155px; }.supplier-chart-legend > div { grid-template-columns:9px minmax(65px,1fr) auto auto; }.target-rank-table { min-width:660px; } }
/* Supplier module: match the approved compact split layout. */
#dashboardPage .supplier-analysis { padding:20px 22px 14px; border:1px solid #cddfff; border-radius:15px; box-shadow:0 3px 12px #006efd0b; }
.supplier-analysis-scroll { overflow-x:auto; }
.supplier-analysis .supplier-analysis-grid { min-width:1100px; display:grid; grid-template-columns:minmax(450px,.95fr) minmax(620px,1.3fr); gap:24px; align-items:start; }
.supplier-analysis-left { min-width:0; }
.supplier-analysis-title { display:flex; align-items:center; gap:14px; height:36px; margin-bottom:14px; white-space:nowrap; }
#dashboardPage .supplier-analysis-title h3 { display:flex; align-items:center; gap:9px; font-size:19px; font-weight:750; letter-spacing:-.4px; color:#0b193b; }
.supplier-analysis-title h3 > span { display:flex; color:#006efd; }.supplier-analysis-title svg { width:25px; height:25px; }
.supplier-analysis-title > span { color:#7a8ca9; font-size:12px; font-weight:500; }
.supplier-analysis .supplier-analysis-chart { flex-direction:row; align-items:center; gap:23px; max-width:none; min-height:205px; }
.supplier-analysis .supplier-donut { width:180px; height:180px; flex:0 0 180px; }
.supplier-analysis .supplier-donut strong { font-size:18px; font-weight:750; letter-spacing:-.7px; }
.supplier-analysis .supplier-donut small { font-size:12px; font-weight:500; }
.supplier-analysis .supplier-chart-legend { flex:1; min-width:0; width:auto; max-width:none; gap:17px; }
.supplier-analysis .supplier-chart-legend > div { grid-template-columns:10px minmax(86px,1fr) 100px 47px; gap:8px; font-size:12px; }
.supplier-chart-legend i { width:10px; height:10px; }
.supplier-analysis .supplier-chart-legend span { color:#183253; font-weight:650; }
.supplier-analysis .supplier-chart-legend b { font-size:12px; text-align:right; color:#0b193b; font-weight:700; }
.supplier-analysis .supplier-chart-legend strong { font-size:12px; text-align:right; color:#0b193b; font-weight:700; }
.supplier-analysis .supplier-analysis-ranking { border-top:0; border-left:1px solid #dce8fc; padding:0 0 0 24px; min-height:242px; }
.supplier-analysis .supplier-analysis-toolbar { display:flex; flex-wrap:nowrap; gap:10px; height:36px; margin:0 0 14px; }
.supplier-analysis-toolbar > strong { font-size:15px; font-weight:750; color:#0b193b; white-space:nowrap; margin:0 auto 0 0; }
.supplier-analysis-toolbar .chart-tabs { border:1px solid #d4e4ff; border-radius:999px; padding:2px; background:#f9fbff; flex-shrink:0; }
.supplier-analysis .chart-tabs button { min-height:29px; padding:5px 13px; font-size:12px; border-radius:999px; color:#425c85; font-weight:650; white-space:nowrap; background:transparent; }
.supplier-analysis .chart-tabs button[aria-pressed="true"] { background:#006efd; color:#fff; box-shadow:0 2px 7px #006efd20; }
.supplier-analysis-toolbar .text-button { flex-shrink:0; font-size:12px; font-weight:650; white-space:nowrap; }
.supplier-analysis .supplier-analysis-toolbar input { width:146px; min-width:110px; min-height:32px; border-radius:999px; font-size:11px; padding:6px 12px; }
.supplier-ranking-table { table-layout:fixed; width:100%; border-collapse:collapse; }
.supplier-col-rank { width:47px; }.supplier-col-name { width:auto; }.supplier-col-amount { width:128px; }.supplier-col-share { width:80px; }.supplier-col-change { width:102px; }
#dashboardPage .supplier-ranking-table th, #dashboardPage .supplier-ranking-table td, .supplier-dialog .supplier-ranking-table th, .supplier-dialog .supplier-ranking-table td { height:37px; padding:8px 9px; font-size:12px; white-space:nowrap; border-bottom:1px solid #edf2fa; font-variant-numeric:tabular-nums; line-height:1.4; }
#dashboardPage .supplier-ranking-table th, .supplier-dialog .supplier-ranking-table th { color:#354c71; background:#f0f5fd; font-weight:700; }
#dashboardPage .supplier-ranking-table td, .supplier-dialog .supplier-ranking-table td { color:#142b4d; font-weight:650; }
.supplier-ranking-table td:nth-child(2) { overflow:hidden; text-overflow:ellipsis; }
#dashboardPage .supplier-ranking-table th:nth-child(1), #dashboardPage .supplier-ranking-table td:nth-child(1), .supplier-dialog .supplier-ranking-table th:nth-child(1), .supplier-dialog .supplier-ranking-table td:nth-child(1) { text-align:center; }
.supplier-ranking-table th:nth-child(3), .supplier-ranking-table td:nth-child(3), .supplier-ranking-table th:nth-child(4), .supplier-ranking-table td:nth-child(4), .supplier-ranking-table th:nth-child(5), .supplier-ranking-table td:nth-child(5) { text-align:right; }
.supplier-ranking-table th:first-child { border-radius:7px 0 0 7px; }.supplier-ranking-table th:last-child { border-radius:0 7px 7px 0; }
.supplier-crown { display:block; width:23px; height:23px; margin:auto; }.crown-1 { color:#f5ae00; }.crown-2 { color:#a2aec2; }.crown-3 { color:#e99a63; }
.supplier-rank-badge { display:inline-grid; place-items:center; width:22px; height:18px; background:#e5edf9; color:#354867; border-radius:5px; font-weight:750; font-size:12px; }
#dashboardPage .supplier-ranking-table .supplier-change.rising, .supplier-dialog .supplier-change.rising { color:#ef5969; }
#dashboardPage .supplier-ranking-table .supplier-change.falling, .supplier-dialog .supplier-change.falling { color:#11984d; }
.change-arrow { margin-left:7px; font-size:17px; font-weight:700; vertical-align:-1px; }
.supplier-analysis-foot { display:flex; justify-content:space-between; gap:12px; margin-top:13px; font-size:11px; color:#8c9cb4; }
.supplier-dialog { width:min(960px,calc(100vw - 40px)); max-height:85vh; padding:26px; border:1px solid #dbe7f9; border-radius:18px; box-sizing:border-box; color:#0b193b; box-shadow:0 25px 90px #102c5633; }
.supplier-dialog::backdrop { background:#142f545c; }
.supplier-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:18px; }.supplier-dialog-head h3 { font-size:20px; font-weight:750; }.supplier-dialog-head p { margin:8px 0 0; color:#8395af; font-size:12px; }
button.supplier-dialog-close { width:32px; height:32px; min-height:32px; border-radius:50%; padding:0; color:#7189ac; background:#edf3fc; font-size:24px; }
.supplier-dialog > input { max-width:280px; min-height:36px; border-radius:999px; font-size:13px; margin-bottom:17px; }
.supplier-dialog-table { height:min(430px,48vh); overflow:auto; }
.supplier-dialog-table .supplier-ranking-table { min-width:620px; }
.supplier-dialog-table th { position:sticky; top:0; z-index:1; }
.supplier-dialog-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid #e7eef9; padding-top:17px; margin-top:14px; font-size:12px; color:#7a8da9; }
.supplier-dialog-footer > div { display:flex; align-items:center; gap:12px; }.supplier-dialog-footer button { min-height:31px; font-size:12px; padding:6px 12px; border-radius:999px; }
@media(max-width:640px) { .supplier-analysis-foot { flex-direction:column; }.supplier-dialog { padding:18px; }.supplier-dialog-footer { flex-wrap:wrap; } }
/* Overview typography: readable financial figures and deliberate field spacing. */
#dashboardPage { --dashboard-caption:13px; --dashboard-body:14px; --dashboard-heading:20px; gap:20px; color:#102444; }
#dashboardPage .panel { padding:22px; border-radius:15px; }
#dashboardPage .dashboard-title { gap:18px; }
#dashboardPage .dashboard-title h2 { font-size:30px; font-weight:750; letter-spacing:-.8px; }
#dashboardPage .dashboard-title p { font-size:14px; font-weight:500; }
#dashboardPage .dashboard-panel-head { margin-bottom:20px; gap:16px; }
#dashboardPage .dashboard-panel-head h3 { font-size:var(--dashboard-heading); font-weight:750; letter-spacing:-.35px; }
#dashboardPage .dashboard-panel-head > .muted { font-size:13px; }
#dashboardPage .dashboard-kpis { gap:15px; }
#dashboardPage .kpi { padding:22px 18px; gap:14px; }
#dashboardPage .kpi div > span { font-size:14px; line-height:1.45; font-weight:650; }
#dashboardPage .kpi b { font-size:clamp(24px,1.75vw,32px); line-height:1.25; letter-spacing:-.8px; margin:11px 0 9px; }
#dashboardPage .kpi small { font-size:12px; line-height:1.6; }
#dashboardPage .dashboard-chart-grid { gap:18px; grid-template-columns:minmax(0,1.65fr) minmax(360px,1fr); }
#dashboardPage .dashboard-composition { gap:24px; align-items:center; min-height:205px; }
#dashboardPage .cost-donut:not(.supplier-donut) { width:176px; flex-basis:176px; }
#dashboardPage .cost-donut > div > strong { font-size:19px; font-weight:750; letter-spacing:-.6px; }
#dashboardPage .cost-donut > div > small { font-size:12px; line-height:1.4; }
#dashboardPage .cost-legend { width:auto; max-width:none; gap:22px; }
#dashboardPage .cost-legend > div { display:grid; grid-template-columns:10px minmax(80px,1fr) 57px; column-gap:12px; align-items:start; font-size:14px; line-height:1.5; }
#dashboardPage .cost-legend i { width:10px; height:10px; margin-top:6px; }
#dashboardPage .cost-legend span { font-size:14px; font-weight:600; color:#435b7d; }
#dashboardPage .cost-legend strong { display:block; margin:5px 0 0; font-size:15px; font-weight:700; color:#142b4d; white-space:nowrap; letter-spacing:-.3px; }
#dashboardPage .cost-legend b { display:block; min-width:57px; text-align:right; font-size:16px; font-weight:750; color:#102444; line-height:1.5; font-variant-numeric:tabular-nums; }
#dashboardPage .target-rank-table th, #dashboardPage .target-rank-table td { padding:13px 14px; font-size:13px; line-height:1.45; }
#dashboardPage .target-rank-table th { font-weight:700; }
#dashboardPage .target-rank-table td { font-weight:550; }
#dashboardPage .target-rank-table td:first-child { font-weight:650; }
#dashboardPage .completion-cell { font-size:13px; gap:12px; font-weight:600; }
#dashboardPage .target-values > div { padding:14px 0; font-size:13px; }
#dashboardPage .target-values strong { font-size:15px; font-weight:700; }
#dashboardPage .target-layout { gap:27px; }
#dashboardPage .target-ring strong { font-size:27px; }
#dashboardPage .supplier-analysis { padding:22px 24px 16px; }
#dashboardPage .supplier-analysis-grid { grid-template-columns:minmax(490px,1fr) minmax(680px,1.35fr); min-width:1198px; gap:28px; }
#dashboardPage .supplier-analysis-title { gap:16px; margin-bottom:19px; }
#dashboardPage .supplier-analysis-title h3 { font-size:20px; font-weight:750; }
#dashboardPage .supplier-analysis-title > span { font-size:13px; font-weight:500; }
#dashboardPage .supplier-analysis-chart { gap:22px; min-height:230px; }
#dashboardPage .supplier-donut { width:184px; height:184px; flex-basis:184px; }
#dashboardPage .supplier-chart-legend { gap:19px; }
#dashboardPage .supplier-chart-legend > div { grid-template-columns:10px minmax(98px,1fr) 108px 50px; gap:10px; font-size:13px; line-height:1.5; }
#dashboardPage .supplier-chart-legend span { font-weight:600; }
#dashboardPage .supplier-chart-legend b, #dashboardPage .supplier-chart-legend strong { font-size:13px; font-weight:700; }
#dashboardPage .supplier-analysis-ranking { padding-left:28px; min-height:263px; }
#dashboardPage .supplier-analysis-toolbar { margin-bottom:18px; gap:12px; }
#dashboardPage .supplier-analysis-toolbar > strong { font-size:16px; font-weight:750; letter-spacing:-.25px; }
#dashboardPage .supplier-analysis-toolbar .chart-tabs button { font-size:12px; padding:6px 15px; }
#dashboardPage .supplier-analysis-toolbar .text-button { font-size:12px; }
#dashboardPage .supplier-analysis-toolbar input { font-size:12px; width:151px; }
#dashboardPage .supplier-ranking-table th, #dashboardPage .supplier-ranking-table td { height:42px; padding:10px 12px; font-size:13px; line-height:1.5; }
#dashboardPage .supplier-ranking-table th { font-weight:700; }
#dashboardPage .supplier-ranking-table td { font-weight:650; }
#dashboardPage .supplier-col-rank { width:49px; }
#dashboardPage .supplier-col-amount { width:139px; }
#dashboardPage .supplier-col-share { width:85px; }
#dashboardPage .supplier-col-change { width:110px; }
#dashboardPage .supplier-analysis-foot { margin-top:16px; font-size:12px; }
#dashboardPage .chart-note { font-size:12px; line-height:1.7; }
@media(min-width:901px) and (max-width:1350px) {
  #dashboardPage .dashboard-composition { flex-direction:column; gap:18px; }
  #dashboardPage .cost-legend { width:100%; gap:15px; }
  #dashboardPage .cost-legend > div { grid-template-columns:10px minmax(80px,1fr) 62px; }
  #dashboardPage .cost-legend span { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:12px; }
  #dashboardPage .cost-legend strong { display:block; margin:0; font-size:14px; }
}
@media(max-width:900px) {
  #dashboardPage .dashboard-chart-grid { grid-template-columns:minmax(0,1fr); }
  #dashboardPage .dashboard-composition { flex-direction:row; }
}
@media(max-width:640px) {
  #dashboardPage .panel { padding:17px; }
  #dashboardPage .kpi { padding:16px; }
  #dashboardPage .kpi b { font-size:23px; }
  #dashboardPage .dashboard-panel-head h3 { font-size:18px; }
  #dashboardPage .dashboard-composition { gap:16px; }
  #dashboardPage .cost-donut:not(.supplier-donut) { width:130px; flex-basis:130px; }
  #dashboardPage .cost-donut > div > strong { font-size:14px; }
  #dashboardPage .cost-legend > div { grid-template-columns:8px minmax(70px,1fr) 50px; column-gap:7px; }
  #dashboardPage .cost-legend span { font-size:13px; }
  #dashboardPage .cost-legend strong { font-size:13px; }
  #dashboardPage .cost-legend b { font-size:15px; min-width:50px; }
}
/* Larger ring centres keep full currency amounts readable. */
#dashboardPage .cost-donut:not(.supplier-donut) { width:208px; height:208px; flex-basis:208px; }
#dashboardPage .supplier-donut { width:220px; height:220px; flex-basis:220px; }
#dashboardPage .cost-donut > div { width:84%; height:84%; aspect-ratio:1; flex-shrink:0; gap:8px; }
#dashboardPage .cost-donut > div > strong { white-space:nowrap; }
#dashboardPage .dashboard-composition { gap:14px; flex-wrap:wrap; }
#dashboardPage .dashboard-composition .cost-legend { min-width:168px; }
#dashboardPage .supplier-analysis-chart { gap:14px; }
#dashboardPage .supplier-analysis-grid { grid-template-columns:minmax(540px,1fr) minmax(680px,1.35fr); min-width:1248px; }
@media(max-width:640px) {
  #dashboardPage .cost-donut:not(.supplier-donut) { width:176px; height:176px; flex-basis:176px; }
  #dashboardPage .dashboard-composition { justify-content:center; }
  #dashboardPage .dashboard-composition .cost-legend { flex-basis:168px; }
}

/* Shared direction arrows for dashboard and all profit report tabs. */
.trend-arrow { display:inline-block; width:14px; height:14px; margin-left:4px; vertical-align:-2px; flex-shrink:0; }
