/* Compass-inspired Time Tracker presentation.
   This stylesheet intentionally overrides presentation only. Existing IDs,
   navigation handlers, permissions, timer behavior, and data flows remain in
   index.html and ntt.js. */

:root {
  --tracker-shadow: 0 14px 42px rgba(26, 39, 68, 0.075);
  --tracker-shadow-soft: 0 7px 22px rgba(26, 39, 68, 0.045);
  --tracker-border-strong: #c8d2e2;
  --tracker-radius-lg: 16px;
  --tracker-radius-md: 12px;
  --tracker-control-height: 38px;
  --tracker-header-height: 64px;
  --tracker-sidebar-width: 210px;
}

html {
  min-height: 100%;
  scroll-padding-top: 78px;
  background: #f3f5f9;
}

body {
  background:
    radial-gradient(circle at 5% -8%, rgba(74, 110, 181, 0.13), transparent 30rem),
    radial-gradient(circle at 98% 2%, rgba(103, 78, 156, 0.05), transparent 25rem),
    #f3f5f9;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 9px 13px;
  border-radius: 9px;
  color: #fff;
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  display: block;
  min-height: 100vh;
}

/* Global applications remain sticky; Tracker navigation belongs to its workspace. */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: block;
  height: auto;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(200, 210, 226, 0.94);
  box-shadow: 0 8px 28px rgba(26, 39, 68, 0.08);
  backdrop-filter: blur(18px);
}

.sidebar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--navy), #4a6eb5 55%, #7c68a8);
  content: "";
}

.tracker-global-row {
  min-height: var(--tracker-header-height);
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  padding: 6px clamp(18px, 2.6vw, 40px);
}

.brand {
  min-width: 155px;
  padding: 0;
  border: 0;
}

.brand-logo {
  gap: 10px;
}

.brand-n {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 12px;
  color: transparent;
  background: linear-gradient(145deg, var(--navy), #36588f);
  box-shadow: 0 9px 22px rgba(26, 39, 68, 0.22);
}

.brand-n::before,
.brand-n::after {
  position: absolute;
  left: 9px;
  width: 26px;
  height: 6px;
  border-radius: 999px;
  background: #edf3ff;
  content: "";
  transform: rotate(-36deg);
}

.brand-n::before { top: 12px; }
.brand-n::after { top: 24px; left: 15px; width: 18px; }

.brand-name {
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: none;
}

.brand-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
}

.sidebar .application-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  flex: 1 1 auto;
  scrollbar-width: thin;
}

.application-nav .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.application-nav .nav-item {
  width: auto;
  flex: 0 0 auto;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.application-nav .nav-item:hover,
.application-nav .nav-item:focus-visible {
  color: var(--navy);
  border-color: var(--border);
  background: var(--surface2);
}

.application-nav .nav-icon {
  width: auto;
  color: var(--navy-light);
  font-size: 10px;
  font-weight: 700;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  border: 0;
}

.user-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
}

.user-email {
  max-width: 180px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-signout,
.btn-timer {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.btn-signout {
  color: var(--text-mid);
  border: 1px solid var(--border);
  background: #fff;
}

.btn-signout:hover {
  color: var(--red);
  border-color: #efc7c2;
  background: var(--red-bg);
}

.btn-timer {
  color: #fff;
  border: 1px solid var(--navy);
  background: var(--navy);
  box-shadow: 0 8px 20px rgba(26, 39, 68, 0.16);
}

.btn-timer:hover {
  color: #fff;
  background: var(--navy-mid);
  transform: none;
}

.tracker-layout {
  display: grid;
  grid-template-columns: var(--tracker-sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--tracker-header-height));
}

.tracker-local-sidebar {
  position: sticky;
  top: var(--tracker-header-height);
  z-index: 80;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--tracker-header-height));
  padding: 20px 13px 15px;
  overflow-y: auto;
  border-right: 1px solid rgba(200, 210, 226, 0.9);
  background: rgba(249, 250, 253, 0.92);
  backdrop-filter: blur(14px);
}

.tracker-page-nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.tracker-page-nav .nav-label {
  margin: 16px 9px 5px;
  padding: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tracker-page-nav .nav-label:first-child {
  margin-top: 2px;
}

.tracker-page-nav .nav-item {
  position: relative;
  width: 100%;
  min-height: 38px;
  flex: 0 0 auto;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-mid);
  font-size: 12.5px;
  font-weight: 650;
}

.tracker-page-nav .nav-item:hover,
.tracker-page-nav .nav-item:focus-visible {
  color: var(--navy);
  border-color: var(--border);
  background: var(--blue-soft);
}

.tracker-page-nav .nav-item.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 6px 15px rgba(26, 39, 68, 0.16);
}

.tracker-page-nav .nav-icon {
  width: 18px;
  color: var(--navy-light);
  font-size: 11px;
  text-align: center;
}

.tracker-page-nav .nav-item.active .nav-icon {
  color: #fff;
}

.tracker-sidebar-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.tracker-sidebar-actions .btn-timer {
  width: 100%;
  min-height: 40px;
}

/* Compass hierarchy with the denser rhythm needed for daily time entry. */
main {
  width: min(1440px, calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 30px 0 64px;
}

.page-header {
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-title {
  color: var(--navy);
  font-size: clamp(1.75rem, 2.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-title span {
  color: var(--navy-light);
  font-weight: 400;
}

.stats-row {
  grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card,
.card,
.hero-card,
.settings-card,
.client-card,
.log-table,
.task-table,
.inv-table {
  border-color: var(--border);
  border-radius: var(--tracker-radius-lg);
  box-shadow: var(--tracker-shadow);
}

.stat-card {
  min-height: 92px;
  padding: 14px 16px;
  border-top-width: 3px;
  box-shadow: var(--tracker-shadow-soft);
}

.stat-label,
.hero-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.2;
}

.stat-label {
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.stat-sub {
  margin-top: 4px;
  font-size: 11.5px;
}

.card,
.settings-card {
  padding: 20px 22px;
}

.card-header {
  margin-bottom: 16px;
}

.card-title {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

.hero-card {
  min-height: 90px;
  padding: 17px 21px;
  border-top-width: 3px;
  box-shadow: var(--tracker-shadow-soft);
}

.hero-total {
  font-size: clamp(32px, 3.5vw, 41px);
}

.hero-sub {
  margin-top: 5px;
  font-size: 11.5px;
}

.log-toolbar {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--tracker-radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--tracker-shadow-soft);
}

.search-input,
.filter-select,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: var(--tracker-border-strong);
  border-radius: 10px;
  background: #fff;
}

.search-input,
.filter-select {
  min-height: var(--tracker-control-height);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus,
.search-input:focus,
.filter-select:focus {
  border-color: var(--navy-light);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 110, 181, 0.11);
}

.btn-primary,
.btn-secondary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
}

.btn-primary:hover {
  transform: none;
}

.view-controls {
  gap: 16px;
  flex-wrap: wrap;
}

.view-tabs,
.filter-tabs {
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--tracker-shadow-soft);
}

.view-tab,
.filter-tab,
.grp-btn {
  border-radius: 999px;
}

.view-tab,
.filter-tab {
  padding: 7px 15px;
}

.log-table,
.task-table,
.inv-table {
  overflow: hidden;
}

.log-table-head,
.task-table-head,
.expense-table-head,
.inv-table-head {
  min-height: 43px;
  align-items: center;
  background: #f7f8fb;
}

.log-row,
.task-row,
.expense-row,
.inv-row {
  padding-top: 12px;
  padding-bottom: 12px;
}

.client-card {
  padding: 18px;
  border-top-width: 4px;
}

.client-card:hover {
  box-shadow: 0 18px 46px rgba(26, 39, 68, 0.12);
}

.add-trigger {
  border-radius: var(--tracker-radius-md);
  background: rgba(255, 255, 255, 0.68);
}

/* Reports: compact management dashboard instead of a full-width card stack. */
.report-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-view-tabs {
  flex-shrink: 0;
  background: var(--surface2);
}

.reports-grid {
  display: grid;
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.reports-primary-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
}

.reports-secondary-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
}

.reports-grid > .card {
  height: 100%;
  margin-bottom: 0;
}

.report-card-header {
  align-items: flex-start;
  gap: 12px;
}

.report-card-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.report-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-metric-tabs {
  flex-shrink: 0;
  background: var(--surface2);
}

.report-metric-tabs .view-tab {
  min-height: 31px;
  padding: 5px 11px;
  font-size: 11px;
}

.report-currency-select {
  width: 86px;
  min-height: 31px;
  padding: 5px 26px 5px 9px;
  font-size: 11px;
}

.report-expand-button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
}

.report-empty {
  padding: 24px 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.rep-row {
  grid-template-columns: minmax(80px, 1.05fr) minmax(48px, 1.6fr) minmax(86px, auto);
  gap: 10px;
  min-height: 34px;
  margin-bottom: 7px;
}

.rep-row .trend-label {
  overflow: hidden;
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
}

.rep-row .trend-bar-track {
  height: 18px;
}

.rep-row .trend-total {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
}

.report-row-value {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.report-month-scroll {
  padding-top: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.report-month-chart {
  display: grid;
  grid-template-columns: repeat(var(--report-month-count), minmax(58px, 1fr));
  gap: 8px;
  min-width: max(100%, calc(var(--report-month-count) * 66px));
}

.report-month-column {
  appearance: none;
  display: grid;
  grid-template-rows: 30px 168px 22px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.report-month-column:hover {
  background: rgba(42, 82, 152, 0.055);
}

.report-month-column:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.report-month-column.is-selected {
  background: rgba(42, 82, 152, 0.09);
  box-shadow: inset 0 0 0 2px rgba(42, 82, 152, 0.34);
}

.report-month-column.is-selected .report-month-bar {
  background: linear-gradient(180deg, #4dba89, var(--green));
}

.report-month-value {
  align-self: end;
  overflow: hidden;
  color: var(--text-mid);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-month-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 6px 4px 4px;
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(to top, rgba(221, 227, 240, 0.44) 1px, transparent 1px);
  background-size: 100% 25%;
}

.report-month-bar {
  width: min(34px, 64%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4a6eb5, var(--navy));
  box-shadow: 0 5px 14px rgba(42, 82, 152, 0.16);
}

.report-month-bar.is-empty {
  min-height: 0;
  background: transparent;
  box-shadow: none;
}

.report-month-label {
  align-self: center;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.report-trend-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.checkin-toolbar {
  align-items: center;
  gap: 10px;
}

.checkin-filter-label {
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 700;
}

.checkin-toolbar-note {
  flex: 1;
  min-width: 240px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.checkin-primary-grid {
  grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
}

.checkin-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.checkin-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12px;
}

.checkin-table th,
.checkin-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.checkin-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.checkin-table tbody tr:last-child td {
  border-bottom: 0;
}

.checkin-table td:nth-child(3),
.checkin-table td:nth-child(4),
.checkin-table td:nth-child(5) {
  white-space: nowrap;
}

.checkin-warning-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid #ead39f;
  border-radius: 999px;
  background: #fff8e8;
  color: #805a08;
  font-size: 10.5px;
  font-weight: 750;
}

.checkin-delta {
  color: var(--muted);
  font-weight: 700;
}

.checkin-delta.is-up,
.checkin-delta.is-down {
  color: var(--navy-light);
}

.checkin-attention-block + .checkin-attention-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.checkin-attention-title {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.checkin-attention-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.checkin-attention-block ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.55;
}

.checkin-attention-block li + li {
  margin-top: 7px;
}

.checkin-attention-block li span {
  color: var(--muted);
}

.checkin-all-clear {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid #cce6d8;
  border-radius: var(--tracker-radius-md);
  background: #f0faf5;
  color: var(--green);
  font-size: 13px;
}

.checkin-all-clear span {
  color: var(--text-mid);
  font-size: 11.5px;
  line-height: 1.45;
}

.checkin-other-card {
  margin-bottom: 18px;
}

.checkin-other-list {
  display: grid;
  gap: 0;
}

.checkin-other-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.5;
}

.checkin-other-row:first-child {
  padding-top: 0;
}

.checkin-other-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.checkin-other-row div div {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.checkin-other-row > span {
  flex-shrink: 0;
  color: var(--navy);
  font-weight: 800;
}

.modal-overlay {
  padding: 22px;
  background: rgba(17, 28, 51, 0.5);
  backdrop-filter: blur(6px);
}

.modal {
  border-color: var(--border);
  border-radius: var(--tracker-radius-lg);
  box-shadow: 0 28px 78px rgba(17, 28, 51, 0.27);
}

.modal-header {
  gap: 18px;
}

.modal-title {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.modal-close {
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
}

.state-multi-select { width: 100%; }
.state-multi-select > summary { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 10px 42px 10px 14px; position: relative; list-style: none; cursor: pointer; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 500; }
.state-multi-select > summary::-webkit-details-marker { display: none; }
.state-multi-select > summary::after { content: '▾'; position: absolute; right: 14px; color: var(--muted); transition: transform 0.15s; }
.state-multi-select[open] > summary { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(46,63,110,0.1); background: white; }
.state-multi-select[open] > summary::after { transform: rotate(180deg); }
.state-multi-select-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-sm); }
.state-multi-option { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border-radius: 6px; color: var(--text-mid); font-size: 12px; font-weight: 500; cursor: pointer; }
.state-multi-option:hover { background: var(--blue-soft); color: var(--navy); }
.state-multi-option input { flex: none; width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--navy); box-shadow: none; }

.migration-banner {
  border-radius: var(--tracker-radius-md);
  box-shadow: var(--tracker-shadow-soft);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(74, 110, 181, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  :root {
    --tracker-sidebar-width: 190px;
  }

  .tracker-global-row {
    grid-template-columns: auto minmax(200px, 1fr) auto;
    gap: 14px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .user-email {
    display: none;
  }

  main {
    width: min(100% - 36px, 1120px);
  }
}

@media (max-width: 900px) {
  .reports-primary-grid,
  .reports-secondary-grid,
  .checkin-primary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tracker-layout {
    display: block;
  }

  .tracker-local-sidebar {
    position: static;
    display: flex;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 7px 18px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(249, 250, 253, 0.95);
  }

  .tracker-page-nav {
    flex-direction: row;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .tracker-page-nav .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .tracker-page-nav .nav-item {
    width: auto;
    min-height: 36px;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .tracker-sidebar-actions {
    margin: 0 0 0 10px;
    padding: 0 0 0 10px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .tracker-sidebar-actions .btn-timer {
    width: auto;
    min-height: 36px;
  }

  .page-header {
    align-items: flex-start;
  }

  .report-page-actions {
    justify-content: flex-start;
  }

  .log-table,
  .task-table,
  .inv-table,
  .expense-table {
    overflow-x: auto;
  }

  .log-table-head,
  .log-row {
    min-width: 1040px;
  }

  .task-table-head,
  .task-row {
    min-width: 930px;
  }

  .expense-table-head,
  .expense-row {
    min-width: 980px;
  }

  .inv-table-head,
  .inv-row {
    min-width: 860px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 126px;
  }

  .tracker-global-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
    padding-top: 8px;
    padding-bottom: 7px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .sidebar-bottom {
    grid-column: 2;
    grid-row: 1;
  }

  .sidebar .application-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    padding: 2px 0 0;
  }

  .brand-n {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 14px;
  }

  .btn-timer,
  .btn-signout {
    min-height: 38px;
    padding: 0 10px;
    font-size: 11px;
  }

  .application-nav .nav-item {
    padding: 7px 9px;
    font-size: 11px;
  }

  .tracker-page-nav .nav-item {
    padding: 7px 9px;
    font-size: 11px;
  }

  .tracker-local-sidebar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .tracker-sidebar-actions {
    margin-left: 7px;
    padding-left: 7px;
  }

  main {
    width: calc(100% - 24px);
    padding-top: 24px;
  }

  .page-header,
  .view-controls,
  .trends-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .page-title {
    font-size: 1.85rem;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card,
  .settings-card,
  .hero-card,
  .modal {
    padding: 18px 16px;
  }

  .log-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .log-toolbar > *,
  .search-input,
  .filter-select {
    width: 100% !important;
    max-width: none !important;
  }

  .report-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .report-card-actions {
    justify-content: flex-start;
  }

  .report-card-actions .filter-select {
    width: 86px !important;
  }

  .rep-row {
    grid-template-columns: minmax(88px, 1fr) minmax(70px, 1.2fr) minmax(90px, auto);
    gap: 8px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-overlay {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .brand-logo > div:last-child {
    display: none;
  }

  .btn-timer,
  .btn-signout {
    padding-right: 8px;
    padding-left: 8px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .rep-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rep-row .trend-bar-track {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .skip-link,
  .sidebar,
  .tracker-local-sidebar {
    display: none !important;
  }

  .tracker-layout {
    display: block;
  }
}
