/* Minimal page styles on top of the Ocean tokens (system font stack, shoxel index.css) */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--color-surface);
  color: var(--color-text-primary);
  min-height: 100vh;
}
a { color: var(--color-accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--color-border-subtle); }
.brand { font-weight: 700; letter-spacing: -0.01em; text-decoration: none; color: var(--color-text-primary); }
.brand span { color: var(--color-accent); }
nav a { margin-left: 16px; text-decoration: none; color: var(--color-text-secondary); }
.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--color-border-default); background: var(--color-surface-subtle); color: var(--color-text-primary); cursor: pointer; font: inherit; text-decoration: none; }
.btn.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-inverted); }
.hero { padding: 64px 0 32px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 12px; }
.hero p { color: var(--color-text-secondary); max-width: 560px; }
pre.code { background: var(--color-surface-subtle); border: 1px solid var(--color-border-subtle); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font-size: 0.9rem; }
.card { max-width: 400px; margin: 48px auto; padding: 24px; border: 1px solid var(--color-border-subtle); border-radius: 12px; background: var(--color-surface-subtle); }
label { display: block; margin: 12px 0 4px; color: var(--color-text-secondary); font-size: 0.9rem; }
input { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--color-border-default); background: var(--color-surface); color: var(--color-text-primary); font: inherit; }
input:focus { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.error { color: var(--color-danger); min-height: 1.2em; font-size: 0.9rem; margin-top: 8px; }
.muted { color: var(--color-text-muted); }

/* dashboard */
.page { padding: 24px 0 48px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.card.wide { max-width: none; margin: 0 0 20px; }
.card-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.card-head h2 { margin: 0 0 4px; font-size: 1.2rem; }
.card h3 { font-size: 0.95rem; color: var(--color-text-secondary); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.limits { display: flex; gap: 20px; margin: 0; }
.limits div { text-align: right; }
.limits dt { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.limits dd { margin: 2px 0 0; font-weight: 600; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; margin-left: 6px; background: var(--color-accent-subtle); color: var(--color-accent); border: 1px solid var(--color-accent-200); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font-weight: 500; color: var(--color-text-muted); font-size: 0.8rem; padding: 6px 8px; border-bottom: 1px solid var(--color-border-subtle); }
.table td { padding: 8px; border-bottom: 1px solid var(--color-border-subtle); vertical-align: middle; }
.table td.right, .table th.right { text-align: right; }
.table form { margin: 0; }
.inline-form { display: flex; gap: 8px; margin-top: 16px; }
.inline-form input { flex: 1; }
.btn.small { padding: 4px 10px; font-size: 0.85rem; }
.btn.danger { color: var(--color-danger); border-color: var(--color-danger-subtle); background: transparent; }
.btn.danger:hover { background: var(--color-danger-subtle); }
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--color-border-subtle); background: var(--color-surface-subtle); }
.notice.accent { border-color: var(--color-accent-300); background: var(--color-accent-subtle); }
.notice.danger { border-color: var(--color-danger); background: var(--color-danger-subtle); color: var(--color-danger); }
.token-once { margin: 10px 0 6px; font-size: 1rem; user-select: all; }
code { font-size: 0.9em; background: var(--color-surface-subtle); padding: 1px 5px; border-radius: 4px; }
.small { font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 640px) {
  .limits { gap: 12px; flex-wrap: wrap; }
  .limits div { text-align: left; }
  .table:not(.services) th:nth-child(4), .table:not(.services) td:nth-child(4) { display: none; }
  .inline-form { flex-direction: column; }
  .hero h1 { font-size: 1.6rem; }
}
.badge.warn { background: var(--color-warn-subtle); color: var(--color-warn); border-color: transparent; }
.badge.muted-badge { background: var(--color-surface-hover); color: var(--color-text-secondary); border-color: transparent; font-weight: 500; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
@media (max-width: 640px) { .table:not(.services) th:nth-child(3), .table:not(.services) td:nth-child(3) { display: none; } }

/* app shell: sidebar (voxoq: aside w-64 fixed, content offset) */
.app { display: block; }
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 16rem; padding: 16px 12px; background: var(--color-surface-subtle); border-right: 1px solid var(--color-border-subtle); display: flex; flex-direction: column; gap: 16px; z-index: 40; transform: translateX(-100%); transition: transform .15s ease; }
.sidebar.open { transform: none; box-shadow: 0 0 0 100vmax var(--color-overlay); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--color-text-secondary); text-decoration: none; }
.side-nav a:hover { background: var(--color-surface-hover); color: var(--color-text-primary); }
.side-nav a.active { background: var(--color-accent-subtle); color: var(--color-accent); font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-top { gap: 8px; }
.grow { flex: 1; }
.impersonation { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 8px; background: var(--color-warn-subtle); color: var(--color-warn); font-size: 0.9rem; margin: 0; }
.impersonation strong { color: inherit; }
@media (min-width: 768px) {
  .sidebar { transform: none; box-shadow: none; }
  .with-sidebar .wrap { margin-left: 16rem; max-width: none; padding: 0 24px; }
  .menu-toggle { display: none; }
}
.audit-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.audit-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.plan { margin: 0; padding: 12px; border: 1px solid var(--color-border-subtle); border-radius: 10px; background: var(--color-surface); display: flex; flex-direction: column; gap: 4px; }
.plan-name { text-transform: capitalize; font-weight: 600; }
.plan-price { font-size: 1.4rem; font-weight: 700; }
.plan .btn { margin-top: 6px; align-self: flex-start; }
.creds details summary { cursor: pointer; list-style: none; }
.creds details summary::-webkit-details-marker { display: none; }
.creds details[open] summary { display: none; }
.cred-url { margin-top: 4px; font-size: 0.75rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 6px; width: 100%; max-width: 420px; }


/* services table → stacked cards on phones (nothing hidden, credentials included) */
.w-160 { flex: 0 0 160px; }
@media (max-width: 640px) {
  .w-160 { flex: 1 1 auto; }
  .table.services thead { display: none; }
  .table.services, .table.services tbody, .table.services tr, .table.services td { display: block; width: 100%; }
  .table.services tr { border: 1px solid var(--color-border-subtle); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: var(--color-surface); }
  .table.services td { border: 0; padding: 4px 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
  .table.services td .cred-url { flex: 1 1 100%; margin-left: calc(5.5rem + 10px); }
  .table.services td::before { content: attr(data-label); flex: 0 0 5.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
  .table.services td.actions { justify-content: flex-end; }
  .table.services td.actions::before { content: ''; flex: 0; }
  .table.services td .cred-url { max-width: 100%; }
  .creds details[open] summary { display: none; }
}
