/* Readability refresh: loaded after the existing layout and mobile rules. */
:root {
  --ink: #253b43;
  --muted: #71818a;
  --line: #e2eae7;
  --soft: #f6f9f7;
  --shadow: 0 5px 22px rgba(31, 58, 48, .045);
  --radius: 16px;
  color: var(--ink);
  font-size: 14px;
}

body { background: #f3f6f7; line-height: 1.55; }
.sidebar { border-right-color: #e4ebe7; }
.topbar { border-bottom-color: #e4ebe7; }
.panel, .stat-card { border-color: #e2eae6; }
.stat-card { box-shadow: var(--shadow); }
.profit-card { border-color: #253b48; }
.nav-link { font-size: 14px; padding-top: 12px; padding-bottom: 12px; }
.nav-link.active { background: #e6f3ec; }
.workspace-pill, .breadcrumb, .top-date { font-size: 13px; }
.nav-caption, .help-card strong, .help-card span { font-size: 11px; }
.brand-copy span { font-size: 9px; }
.top-user strong { font-size: 13px; }
.top-user span, .demo-badge { font-size: 11px; }
.page-heading h1, .panel-heading h2, .modal-head h2,
.login-heading h1 { font-family: inherit; letter-spacing: 0; }
.page-heading h1 { font-size: 28px; font-weight: 650; }
.panel-heading h2 { font-size: 18px; font-weight: 650; }
.eyebrow { font-size: 10px; }
.page-heading p { font-size: 13px; color: #71818a; line-height: 1.7; }
.panel-heading { flex-wrap: wrap; }
.panel-heading p { font-size: 12px; color: #71818a; line-height: 1.65; }

.button, .filter-right .button, .panel-heading > .button,
.panel-actions .button, .login-form .button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.button.primary { background: #19755f; box-shadow: 0 3px 9px #16735d18; }
.button.primary:hover { background: #14654f; }
.button.outline { border-color: #dbe5df; color: #52685f; }
.button:focus-visible, .nav-link:focus-visible,
.text-link:focus-visible, .small-action:focus-visible,
.icon-button:focus-visible { outline: 2px solid #4a9a7c; outline-offset: 3px; }
.text-link, .small-action { font-size: 12px; line-height: 1.5; }
.small-action { padding: 7px 6px; }
.icon-button { width: 34px; height: 34px; }
.row-actions, .modal-actions, .panel-actions { flex-wrap: wrap; }
.row-actions { gap: 5px; }

.stat-top { color: #71818a; font-size: 12px; }
.stat-value { font-size: 28px; line-height: 1.3; }
.stat-value small { font-size: 12px; }
.stat-note { font-size: 11px; color: #71818a; }
.profit-card .stat-top { color: #c4d7d5; }
.profit-card .stat-note { color: #c4d7d5; }

th { padding: 12px 18px; font-size: 12px; color: #71818a; background: #f6f9f7; }
td { padding: 14px 18px; font-size: 13px; color: #4c6169; }
th, td { line-height: 1.55; }
tbody tr:hover { background: #fafcfb; }
.person-cell strong, .strong-cell { font-size: 14px; }
.person-cell small, .strong-cell small { font-size: 11px; color: #71818a; }
.person-mini, .entry-id, .amount-main, .commission-value { font-size: 13px; }
.person-avatar { width: 32px; height: 32px; font-size: 12px; }
.tabular, .stat-value, .amount-main, .commission-value,
.input-suffix input { font-variant-numeric: tabular-nums; }
.entries-table td { padding-top: 14px; padding-bottom: 14px; }
.entries-table td > small, .entries-table td strong + small {
  font-size: 11px; color: #71818a; line-height: 1.55;
}
.amount-main small, .entries-table td strong small { font-size: 11px; color: #71818a; }
.currency-chip, .snapshot, .status-tag, .status-tag small,
.status-badge, .read-only-badge, .employee-state,
.currency-code, .account-code, .audit-details { font-size: 11px; }
.entries-summary { font-size: 12px; gap: 8px; flex-wrap: wrap; color: #71818a; }
.filter-bar { flex-wrap: wrap; gap: 12px; }
.filter-dates, .filter-right { flex-wrap: wrap; }
.filter-dates { justify-content: flex-start; }
.filter-dates, .filter-dates label { font-size: 12px; color: #71818a; }
.filter-right select { max-width: 180px; }

.stack-form label, .modal-form label, .login-form label,
.telegram-form label, .rate-row label, .daily-group-control {
  color: #60776d; font-size: 12px; line-height: 1.55;
}
.stack-form input, .stack-form select,
.modal-form input, .modal-form select, .login-form input,
.telegram-form input, .input-suffix input,
.global-price input, .global-price select,
.filter-dates input, .filter-right select,
.date-picker input, .daily-selectors select,
.daily-group-control select {
  font-size: 14px;
  color: #38524b;
  border-color: #dce6df;
}
.stack-form input, .stack-form select,
.modal-form input, .modal-form select,
.telegram-form input, .input-suffix input,
.global-price input, .global-price select,
.filter-dates input, .filter-right select,
.daily-group-control select { height: 40px; }
.login-form input { height: 44px; }
.date-picker { height: 42px; }
.date-picker input, .daily-selectors select { min-height: 36px; }
.daily-selectors .date-picker { min-width: 0; }
.daily-selectors select { max-width: 100%; }
.input-suffix span { font-size: 11px; color: #71818a; }
.rate-row { padding: 10px; gap: 12px; }
.rate-row > *, .modal-form label, .detail-grid > div,
.daily-scope-copy, .bot-status-copy { min-width: 0; }
.rate-employee > div strong, .global-copy strong,
.setting-line strong, .daily-scope-copy strong,
.telegram-group-name strong { font-size: 13px; }
.rate-employee > div span, .global-copy span,
.currency-name small, .telegram-group-name small,
.daily-scope-copy span:not(.daily-scope-icon) { font-size: 11px; color: #71818a; }
.currency-name > b { font-size: 12px; }
.global-price, .daily-currency-tag { font-size: 12px; }
.daily-currency-tag b { font-size: 13px; }
.daily-group-control select { min-width: 210px; }
.panel-actions { font-size: 12px; color: #71818a; gap: 12px; }
.daily-scope { flex-wrap: wrap; }

.calc-token > span, .calc-token strong small,
.calc-footer, .setting-line, .setting-line small,
.formula-strip span, .formula-strip strong { font-size: 12px; }
.calc-token strong { font-size: 15px; }
.calc-footer strong { font-size: 13px; }
.calc-token > span, .calc-footer, .setting-line, .setting-line small { color: #71818a; }
.calc-equation { flex-wrap: wrap; row-gap: 14px; }
.calc-token { min-width: 0; }
.formula-strip span { line-height: 1.7; }
.notice-inline, .notice-card p, .notice-card strong,
.token-security p, .telegram-tip p, .telegram-tip code,
.command-list code, .command-list span, .role-note,
.confirm-copy, .binding-modal > p, .calc-preview {
  font-size: 12px; line-height: 1.7;
}
.notice-card p, .token-security p, .telegram-tip p,
.command-list span { color: #71867a; }
.command-list > div { align-items: flex-start; gap: 12px; }
.command-list code { flex-shrink: 0; }
.command-list span { min-width: 0; }
.bot-status-copy h2 { font-size: 18px; }
.bot-status-copy p { font-size: 12px; line-height: 1.65; }
.telegram-version span, .telegram-version strong,
.binding-expiry, .optional, .page-footer { font-size: 11px; }
.page-footer { color: #7b8b91; gap: 12px; flex-wrap: wrap; }
.empty-state { font-size: 13px; color: #71818a; }
.empty-state strong { font-size: 14px; }
.detail-grid span { font-size: 12px; color: #71818a; }
.detail-grid strong { font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.detail-amount small { font-size: 14px; }
.detail-amount span { font-size: 11px; }
.toast { font-size: 13px; line-height: 1.6; }
.form-error { font-size: 12px; }
.login-heading p { font-size: 13px; color: #71818a; }
.login-foot { font-size: 11px; color: #71818a; }

@media (max-width: 1250px) {
  .filter-bar { align-items: flex-start; }
  .filter-right { flex-wrap: wrap; }
  .stat-value { font-size: 26px; }
}

@media (max-width: 760px) {
  .daily-scope-controls { min-width: 0; }
  .daily-group-control select { min-width: 0; max-width: 100%; }
}

@media (max-width: 680px) {
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 12px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-heading p { font-size: 12px; }
  .top-user strong { font-size: 12px; }
  .top-user span { font-size: 10px; }
  .stat-top { font-size: 12px; }
  .stat-value { font-size: 24px; }
  .stat-value small, .stat-note { font-size: 11px; }
  th { padding: 11px 10px; }
  td { padding: 12px 10px; }
  .team-panel .table-wrap { overflow-x: auto; }
  .team-panel table { min-width: 420px; }
  .entries-table { min-width: 900px; }
  .filter-dates { width: 100%; gap: 8px; }
  .filter-dates label { flex: 1 1 150px; flex-wrap: wrap; }
  .filter-dates input { width: 100%; min-width: 0; }
  .filter-right select { min-width: 120px; max-width: none; }
  .stack-form input, .stack-form select,
  .modal-form input, .modal-form select, .login-form input,
  .telegram-form input, .input-suffix input,
  .global-price input, .global-price select,
  .filter-dates input, .filter-right select,
  .date-picker input, .daily-selectors select,
  .daily-group-control select { font-size: 16px; }
  .global-price { flex-wrap: wrap; }
  .rate-row { gap: 10px; }
  .input-suffix { flex-wrap: wrap; gap: 4px; }
  .calc-token strong { font-size: 13px; }
  .calc-token > span { font-size: 11px; }
  .calc-equation { justify-content: flex-start; gap: 12px; }
  .panel-actions { align-items: flex-start; }
  .daily-scope-copy strong, .telegram-group-name strong { font-size: 13px; }
  .daily-scope-copy span:not(.daily-scope-icon) { font-size: 11px; }
  .page-footer { font-size: 10px; }
  .modal-head h2 { font-size: 20px; overflow-wrap: anywhere; }
  .modal-card { padding: 19px; }
  .modal-form .field-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .detail-amount { font-size: 25px; }
  .detail-grid { gap: 12px; }
}
