/* Scoped additions to the existing dashboard; keep its design tokens. */
.dashboard-shell .brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.dashboard-shell .auth-brand {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dashboard-shell .auth-logo {
  display: block;
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}

.dashboard-shell .table-scroll { position: relative; max-width: 100%; }
.mobile-install-controls {
  position: relative;
  flex: 0 0 auto;
}

.mobile-install-controls [hidden],
.mobile-connection-status[hidden] {
  display: none !important;
}

.mobile-install-controls .mobile-install-button {
  min-height: 2.75rem;
  color: var(--accent, #126f34);
  border-color: var(--border, #c1cec2);
  white-space: nowrap;
}

.mobile-install-help {
  position: absolute;
  z-index: 30;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(22rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--border, #c1cec2);
  border-radius: var(--radius, 1rem);
  background: var(--surface, #fff);
  color: var(--text, #111827);
  box-shadow: var(--shadow, 0 8px 24px rgb(13 23 32 / 17%));
  font-size: 0.875rem;
}

.mobile-install-help p { margin: 0 0 0.75rem; }
.mobile-install-help button { min-height: 2.75rem; }

.mobile-connection-status {
  margin: 0;
  padding: 0.75rem max(1rem, env(safe-area-inset-left)) 0.75rem max(1rem, env(safe-area-inset-right));
  color: var(--warn, #714803);
  background: var(--warn-soft, #fff0cf);
  border-bottom: 1px solid var(--border, #c1cec2);
  font-size: 0.875rem;
}

@media (max-width: 42rem) {
  .mobile-install-controls { position: static; }
  .mobile-install-help { right: 1rem; }
  .dashboard-shell .attention-grid { min-width: 0; }
  .dashboard-shell .attention-grid thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .dashboard-shell .attention-grid tbody,
  .dashboard-shell .attention-grid tr,
  .dashboard-shell .attention-grid td { display: block; width: 100%; }
  .dashboard-shell .attention-grid tr { padding: 0.75rem; border-bottom: 1px solid var(--border, #c1cec2); }
  .dashboard-shell .attention-grid td { padding: 0.4rem; border: 0; }
  .dashboard-shell .attention-grid td[data-mobile-label]::before {
    content: attr(data-mobile-label); display: block; margin-bottom: 0.3rem;
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted, #414e63);
  }
  .dashboard-shell .attention-grid td button,
  .dashboard-shell .attention-grid td a { min-height: 2.75rem; }
  .dashboard-shell .attention-grid .attention-actions { white-space: normal; }
  .dashboard-shell .attention-grid .attention-actions form { margin-bottom: 0.3rem; }
}

@media (display-mode: standalone) {
  .mobile-install-controls .mobile-install-button { display: none; }
  .dashboard-shell .app-header {
    padding-top: max(0.7rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .dashboard-shell main { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
}

@media print {
  .mobile-install-controls, .mobile-connection-status { display: none; }
}
