    * { box-sizing: border-box; }
    body { margin: 0; padding: 36px 20px; font: 15px/1.5 system-ui, sans-serif; color: #172b40; background: #f3f6f9; }
    main { max-width: 1150px; margin: auto; }
    header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
    .brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
    .brand-logo { width: 84px; height: 84px; flex: 0 0 auto; object-fit: contain; }
    .brand-text { min-width: 0; }
    h1 { font-size: 30px; letter-spacing: -.7px; margin: 0 0 5px; }
    h2 { margin: 0; font-size: 23px; }
    p { margin: 5px 0; color: #536679; }
    a { color: #155eae; }
    .panel { background: white; border: 1px solid #dbe4ec; border-radius: 12px; margin-top: 24px; overflow: hidden; }
    .location-head { padding: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
    .stats { color: #536679; }
    form { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 24px 0 0; }
    input[type=search] { padding: 10px 12px; border: 1px solid #bccbd9; border-radius: 6px; font: inherit; font-size: 16px; max-width: 100%; width: 290px; min-height: 44px; }
    form label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
    input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: #175da4; }
    button, header > a { min-height: 44px; }
    header > a { display: inline-flex; align-items: center; }
    :focus-visible { outline: 3px solid #237ad1; outline-offset: 3px; }
    button { border: 0; border-radius: 6px; padding: 11px 18px; font: inherit; color: white; background: #175da4; cursor: pointer; }
    .table-scroll { overflow-x: auto; }
    table { border-collapse: collapse; width: 100%; text-align: left; }
    th { color: #536679; background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
    th, td { padding: 15px 20px; border-top: 1px solid #e5ebf0; }
    td:first-child { font-weight: 650; }
    small { display: block; color: #65788a; }
    .badge { display: inline-block; border-radius: 20px; padding: 4px 10px; white-space: nowrap; font-size: 13px; font-weight: 600; }
    .active { color: #14633e; background: #e4f5eb; }
    .inactive { color: #566575; background: #edf1f5; }
    .unknown { color: #805413; background: #fff3d8; }
    .note { padding: 16px 20px; border-top: 1px solid #e5ebf0; font-size: 13px; overflow-wrap: anywhere; }
    footer { margin-top: 24px; font-size: 13px; }
    .error { padding: 16px 20px; background: #fff7e7; color: #79551c; }
    @media (max-width: 700px) {
      body { padding: 20px 12px; }
      header { gap: 8px; }
      header > div { flex: 1 1 100%; }
      .brand { gap: 12px; }
      .brand-logo { width: 64px; height: 64px; }
      .brand-text p { font-size: 13px; }
      h1 { font-size: 25px; }
      h2 { font-size: 21px; }
      form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 16px; }
      input[type=search] { grid-column: 1 / -1; width: 100%; min-width: 0; }
      button { min-width: 80px; }
      .panel { margin-top: 20px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
      .location-head { padding: 0 2px 12px; gap: 4px; }
      .stats { flex-basis: 100%; font-size: 14px; }
      .table-scroll { overflow: visible; }
      table, tbody { display: block; width: 100%; }
      thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
      tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-bottom: 10px; padding: 16px; background: white; border: 1px solid #dbe4ec; border-radius: 12px; }
      td { display: block; border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
      td:nth-child(1) { grid-column: 1; grid-row: 1; align-self: center; }
      td:nth-child(1)::before { content: 'Tablet '; }
      td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; font-size: 18px; font-weight: 600; }
      td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; font-size: 15px; }
      td:nth-child(2)::before, td:nth-child(3)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 500; color: #536679; }
      td:nth-child(4) { grid-column: 2; grid-row: 1; }
      tr.empty td { grid-column: 1 / -1; font-weight: 400; }
      tr.empty td::before { content: none; }
      .note { padding: 4px 2px 12px; border: 0; }
      footer { margin-top: 16px; }
    }
    .page-nav { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
    .page-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; background: white; border: 1px solid #bccbd9; border-radius: 8px; }
    select, input[type=date] { font: inherit; font-size: 16px; min-height: 44px; padding: 8px; border: 1px solid #bccbd9; border-radius: 6px; max-width: 100%; }
    .history-filters label { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
    .history-filters label input, .history-filters label select { width: 100%; }
    .history-filters input[type=search] { width: 200px; }
    .collector-status { margin-top: 16px; font-size: 13px; }
    .collector-warning { color: #805413; }
    .pagination { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
    .pagination a { min-height: 44px; display: inline-flex; align-items: center; }
    @media (max-width: 700px) {
      .history-filters { grid-template-columns: minmax(0, 1fr); }
      .history-filters input[type=search] { width: 100%; }
      .history-filters > * { min-width: 0; }
      .history-table td:nth-child(5) { grid-column: 1 / -1; grid-row: 4; }
      .history-table td:nth-child(5)::before { content: attr(data-label); display: block; font-size: 12px; color: #536679; }
    }


/* Keep both locations side by side at every screen width. */
main.dashboard-layout {
  max-width: 1600px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  align-items: start;
}
.dashboard-layout > :not(.panel) { grid-column: 1 / -1; }
.dashboard-layout > .panel { min-width: 0; }
.dashboard-layout table { table-layout: fixed; }
.dashboard-layout th, .dashboard-layout td { padding: 12px 8px; overflow-wrap: anywhere; }
.dashboard-layout th:first-child { width: 14%; }
.dashboard-layout th:last-child { width: 23%; }
.dashboard-layout .location-head { padding: 16px 12px; }
.dashboard-layout .stats { flex-basis: 100%; }
@media (max-width: 1199px) {
  main.dashboard-layout { column-gap: 10px; }
  .dashboard-layout > .panel { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .dashboard-layout .location-head { padding: 0 2px 10px; gap: 4px; }
  .dashboard-layout h2 { font-size: clamp(15px, 2.5vw, 21px); overflow-wrap: anywhere; }
  .dashboard-layout .stats { font-size: 12px; }
  .dashboard-layout .table-scroll { overflow: visible; }
  .dashboard-layout table, .dashboard-layout tbody { display: block; width: 100%; }
  .dashboard-layout thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dashboard-layout tbody tr { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 10px; background: white; border: 1px solid #dbe4ec; border-radius: 10px; }
  .dashboard-layout td { display: block; padding: 0; border: 0; min-width: 0; }
  .dashboard-layout td:nth-child(1) { order: 1; align-self: auto; font-size: 13px; }
  .dashboard-layout td:nth-child(1)::before { content: 'Tablet '; }
  .dashboard-layout td:nth-child(2) { order: 3; font-size: 14px; font-weight: 600; }
  .dashboard-layout td:nth-child(3) { order: 4; font-size: 12px; }
  .dashboard-layout td:nth-child(2)::before, .dashboard-layout td:nth-child(3)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 500; color: #536679; }
  .dashboard-layout td:nth-child(4) { order: 2; }
  .dashboard-layout .badge { font-size: 11px; padding: 3px 7px; }
  .dashboard-layout tr.empty td::before { content: none; }
  .dashboard-layout .note { border: 0; padding: 4px 2px; font-size: 11px; }
  .dashboard-layout .error { padding: 10px; font-size: 12px; overflow-wrap: anywhere; }
}

/* Usage is a full-width subsection with two compact location columns. */
.usage-section { min-width: 0; margin-top: 32px; padding-top: 24px; border-top: 1px solid #cfdbe6; }
.usage-heading { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.usage-period { margin: 0; gap: 8px; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.usage-location { min-width: 0; }
.usage-location h3 { margin: 0 0 12px; font-size: 20px; }
.usage-users, .usage-tablets { list-style: none; padding: 0; margin: 0; }
.usage-user { background: white; border: 1px solid #dbe4ec; border-radius: 10px; padding: 16px; margin-bottom: 10px; overflow-wrap: anywhere; }
.usage-user-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.usage-time { color: #155eae; font-weight: 700; white-space: nowrap; }
.usage-user summary { min-height: 44px; display: list-item; cursor: pointer; padding-top: 10px; color: #536679; font-size: 13px; }
.usage-tablets li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 6px 0; font-size: 14px; border-top: 1px solid #edf1f5; }
.usage-caption { font-size: 12px; margin-top: 12px; }
.usage-empty { font-size: 14px; }
@media (max-width: 700px) {
  .usage-section { margin-top: 24px; padding-top: 20px; }
  .usage-grid { gap: 10px; }
  .usage-heading { gap: 12px; }
  .usage-heading h2 { font-size: 22px; }
  .usage-heading p { font-size: 13px; }
  .usage-period { width: 100%; display: flex; flex-wrap: wrap; }
  .usage-period label { font-size: 13px; }
  .usage-period select { flex: 1; min-width: 0; }
  .usage-location h3 { font-size: 16px; }
  .usage-user { padding: 10px; }
  .usage-user-head { flex-direction: column; gap: 4px; font-size: 14px; }
  .usage-user summary { font-size: 11px; }
  .usage-tablets li, .usage-user small, .usage-empty { font-size: 12px; }
}

.usage-paused { color: #805413; font-size: 12px; margin: 0 0 10px; }
