/* Compact application surface from the supplied dashboard guide. */
:root { --radius: 10px; }
#workspace { grid-template-columns: 256px minmax(0, 1fr); }
#sidebar { background: var(--background-secondary); border-inline-end: 1px solid var(--line); padding: 24px 16px 16px; }
#sidebar .brand { font-size: 22px; gap: 12px; margin: 0 8px 28px; }
#sidebar .brand-mark { background: none; width: 36px; }
.nav-caption { font-size: 11px; margin-inline: 12px; }
#sidebar nav { gap: 4px; }
#sidebar nav button { min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; gap: 12px; }
#sidebar nav button.selected { box-shadow: inset -3px 0 var(--focus); }
.aside-bottom { padding: 24px 8px 0; }
.sidebar-account { padding-top: 16px; }
.sidebar-account small, .profile small { font-size: 11px; }
.topbar { height: 72px; padding-inline: 24px; gap: 16px; background: var(--background-top); }
.sidebar-toggle { color: var(--description); background: transparent; border-color: var(--line); }
.sidebar-toggle:hover { background: var(--hover); box-shadow: none; }
.page-search { width: min(440px, 50%); margin-inline-end: auto; box-shadow: none; border-radius: var(--radius-sm); background: var(--surface); }
.page-search>input { padding-block: 10px; }
.profile { gap: 12px; }
.avatar { border-radius: var(--radius-sm); font-size: 18px; }
.page-content { padding: 24px; max-width: 1536px; }
.page-header { margin-bottom: 24px; gap: 24px; }
.page-header h1 { font-size: 28px; margin-block: 8px; }
.breadcrumb { font-size: 12px; }
.page-header p { font-size: 13px; }
.header-actions>button:first-of-type { min-height: 40px; }
button { border-radius: var(--radius-sm); padding: 8px 16px; min-height: 40px; font-size: 13px; gap: 8px; }
button:hover { box-shadow: none; }
button.secondary { color: var(--ink); background: var(--surface); }
button.secondary:hover { background: var(--hover); }
.icon-button { width: 40px; height: 40px; }
article { padding: 24px; border-radius: var(--radius-sm); box-shadow: none; }
h2, .section-heading h2 { font-size: 17px; font-weight: 500; }
.section-heading { gap: 16px; }
.stats { gap: 16px; margin-bottom: 24px; }
button.stat { width: 100%; padding: 0; text-align: start; color: var(--ink); background: var(--surface); box-shadow: none; font-weight: 400; display: block; }
button.stat:hover { background: var(--hover); border-color: var(--focus); }
.stat-inner { display: flex; align-items: flex-start; min-height: 148px; padding: 20px; background: transparent; gap: 8px; }
.stat strong { order: 2; padding: 0; font-size: 30px; line-height: 1.4; }
.stat small { order: 1; margin: 0; color: var(--description); font-size: 12px; padding-inline-end: 28px; }
.stat-context { order: 3; font-size: 11px; color: var(--muted); }
.stats .stat .stat-icon { inset-inline-end: 16px; top: 18px; background: none; color: var(--muted); width: 24px; height: 24px; }
.dashboard-grid { grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 24px; margin-bottom: 24px; }
.dashboard-grid.chart-only { grid-template-columns: minmax(0, 1fr); }
.period-chip { background: var(--background-secondary); border-radius: 8px; font-size: 11px; }
.chart-summary { font-size: 12px; gap: 16px; padding-top: 16px; }
.card-caption { font-size: 12px; }
.connection-summary { padding-block: 20px; }
.connection-name b { font-size: 17px; }
.connection-summary p { font-size: 12px; }
.connections-card>.text-button { font-size: 12px; }
.status-dot { background: var(--status-success); }
.badge { font-size: 11px; border-radius: 6px; padding: 4px 8px; gap: 4px; }
.badge.accepted, .badge.is-active { color: var(--status-success); background: color-mix(in srgb, var(--status-success) 10%, var(--surface)); }
.badge.failed { color: var(--status-error); background: color-mix(in srgb, var(--status-error) 10%, var(--surface)); }
.badge.unknown { color: var(--status-warning); background: color-mix(in srgb, var(--status-warning) 10%, var(--surface)); }
.badge.sending { color: var(--status-info); background: color-mix(in srgb, var(--status-info) 10%, var(--surface)); }
.recent-card { padding: 24px 0 0; border-radius: var(--radius-sm); margin-bottom: 24px; }
.recent-card>.section-heading { padding-inline: 24px; }
table { font-size: 13px; }
th, td { padding: 12px 16px; text-align: center; }
th:first-child, td:first-child { text-align: start; }
th:last-child, td:last-child { text-align: end; }
td:last-child .form-actions { justify-content: flex-end; }
td button { font-size: 12px; min-height: 36px; }
td select { font-size: 12px; }
.owner-email { font-size: 11px; }
.table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.table-wrap { border-radius: 8px; }
.empty { padding: 40px 24px; }
.empty h2 { font-size: 16px; }
.empty p { font-size: 13px; }
.getting-started { border-radius: var(--radius-sm); background: var(--surface); padding-inline: 24px; }
.getting-started summary { padding-block: 20px; font-size: 14px; }
.steps { gap: 24px; padding-block: 8px 24px; }
.steps b, .steps p { font-size: 13px; }
.step-number { border-radius: 6px; color: var(--focus); }
input, select, textarea { background: var(--surface); padding: 9px 12px; font-size: 14px; }
label { margin-bottom: 16px; font-size: 13px; }
.grid { gap: 24px; }
.callout { border-radius: var(--radius-sm); border-inline-start: 3px solid var(--status-info); font-size: 13px; padding: 12px 16px; }
.callout[role="alert"] { border-color: var(--status-error); background: var(--surface); }
dialog { border-radius: var(--radius-md); padding: 24px; box-shadow: 0 20px 60px #0003; }
dialog .section-heading h2 { font-size: 20px; }
dialog small { font-size: 12px; }
#notice { background: var(--surface); color: var(--ink); border-inline-start: 4px solid var(--status-success); border-radius: var(--radius-sm); box-shadow: 0 8px 28px #0002; }
#notice.error { border-color: var(--line); border-inline-start-color: var(--status-error); }
.auth-layout { padding: 24px; gap: 24px; }
.intro { border-radius: var(--radius-lg); background: var(--background-secondary); border: 1px solid var(--line); }
.intro h1 { font-size: clamp(34px, 3.2vw, 52px); line-height: 1.6; }
.intro .brand { margin-bottom: 48px; }
.intro p { line-height: 2; }
.auth-card { width: 420px; }
.auth-card h2 { font-size: 28px; font-weight: 700; }
.auth-card input { background: var(--surface); }
.page-feedback { padding-block: 8px; }
.page-feedback>p { font-size: 13px; color: var(--description); margin-bottom: 16px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.skeleton-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 24px; }
.skeleton-line { display: block; height: 14px; margin-bottom: 16px; border-radius: 4px; background: var(--background-secondary); animation: skeleton-pulse 1.6s ease-in-out infinite alternate; }
.skeleton-line:last-child { width: 50%; height: 28px; margin: 0; }
.page-load-error { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.page-load-error>.icon { color: var(--status-error); }
.page-load-error p { color: var(--description); }
@keyframes skeleton-pulse { to { opacity: .4; } }
@media (min-width: 961px) {
  body.sidebar-compact #workspace { grid-template-columns: 80px minmax(0, 1fr); }
  body.sidebar-compact #sidebar { padding-inline: 12px; overflow: visible; }
  body.sidebar-compact #sidebar .brand { margin-inline: auto; justify-content: center; }
  body.sidebar-compact #sidebar .brand>span:last-child,
  body.sidebar-compact .nav-caption,
  body.sidebar-compact .sidebar-account>div { display: none; }
  body.sidebar-compact #sidebar nav button,
  body.sidebar-compact #logout { font-size: 0; gap: 0; justify-content: center; width: 100%; position: relative; }
  body.sidebar-compact .aside-bottom { padding-inline: 0; }
  body.sidebar-compact .sidebar-account { justify-content: center; }
  body.sidebar-compact #sidebar button::after { content: attr(aria-label); display: none; position: absolute; inset-inline-start: calc(100% + 12px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12px; white-space: nowrap; z-index: 65; box-shadow: 0 6px 20px #0002; pointer-events: none; }
  body.sidebar-compact #sidebar button:hover::after,
  body.sidebar-compact #sidebar button:focus-visible::after { display: block; }
  body.sidebar-compact .sidebar-toggle .icon { transform: rotate(180deg); }
}
@media (max-width: 1200px) and (min-width: 961px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 961px) and (max-height: 800px) {
  body.sidebar-compact #sidebar { overflow-y: auto; overflow-x: hidden; }
  body.sidebar-compact #sidebar button::after { display: none; }
}
@media (max-width: 960px) {
  #workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar-toggle { display: none; }
  #sidebar { width: 256px; overflow-y: auto; }
  .topbar { height: 64px; padding-inline: 16px; gap: 12px; }
  .page-search { width: auto; }
  .page-content { padding: 24px 16px; }
  .dashboard-grid { gap: 16px; }
  .stats { gap: 12px; }
  .stat-inner { padding: 16px; }
  .stats .stat .stat-icon { inset-inline-end: 12px; top: 14px; }
  .stat small { font-size: 11px; }
}
@media (max-width: 680px) {
  .auth-layout { padding: 16px; }
  .intro { padding: 28px; }
  .auth-card { padding: 32px 8px; }
  .page-header { gap: 12px; }
  .page-header h1 { font-size: 24px; }
  .page-header p { font-size: 12px; max-width: 240px; }
  .breadcrumb { font-size: 11px; }
  .header-actions { gap: 8px; padding-top: 24px; }
  .header-actions>button:first-of-type, .header-actions .icon-button { min-height: 40px; width: 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-inner { min-height: 152px; gap: 8px; }
  .stat strong { font-size: 28px; }
  .stat small { max-width: 100%; padding-inline-end: 0; padding-top: 28px; }
  .stat-context { font-size: 10px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  article { padding: 20px 16px; }
  .recent-card { padding: 20px 0 0; }
  .recent-card>.section-heading { padding-inline: 16px; }
  .chart-summary { font-size: 11px; gap: 12px; }
  .section-heading h2 { font-size: 16px; }
  .getting-started { padding-inline: 16px; }
  .getting-started summary { font-size: 13px; }
  .grid { gap: 0; }
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skeleton-card { padding: 16px; }
  input, select, textarea { font-size: 16px; }
  td, th { padding: 12px; }
}
