/* Rounded theme (Colin 2026-11-04, from an "Expenses" dashboard he liked): Classic's colours, but the workspace is a
   light panel with curved corners set into one dark frame. The rail, the top bar (breadcrumbs) and the invoice/return
   action bar share the rail's colour, so they read as part of the navigation; the page scrolls inside the panel, so
   all four rounded corners always show. Every rule is scoped to [data-look="rounded"] (tools/tests/v2/theme.js). */
[data-look="rounded"] body { background: var(--rail); }
[data-look="rounded"] .shell { background: var(--rail); height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* Top bar: part of the frame */
[data-look="rounded"] .top { position: static; background: var(--rail); backdrop-filter: none; border-bottom: 0; padding-top: 14px; padding-bottom: 12px; }
[data-look="rounded"] .top-row { max-width: none; padding: 0 12px 0 4px; }
[data-look="rounded"] .crumbs a { color: var(--rail-text); opacity: .8; }
[data-look="rounded"] .crumbs a:hover { color: #fff; opacity: 1; }
[data-look="rounded"] .crumbs li + li::before { color: var(--rail-text); opacity: .5; }
[data-look="rounded"] .crumbs li:last-child span, [data-look="rounded"] .crumbs li:last-child a { color: #fff; }
[data-look="rounded"] .menu-btn { color: #fff; }

/* The workspace panel: curved corners, scrolls inside itself; content keeps its 1240px column */
[data-look="rounded"] main {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; max-width: none; width: auto;
  margin: 0 12px 12px 0; border-radius: 22px; background: var(--bg);
  padding: 22px max(20px, calc((100% - 1240px) / 2)) 28px;
}
[data-look="rounded"] main:has(.action-bar) { margin-bottom: calc(var(--ab-h, 66px) + 2px); padding-bottom: 28px; } /* --ab-h: the bar's real height (core.js), it wraps on phones */

/* Action bar (invoices, returns, drafts): part of the frame, under the panel */
[data-look="rounded"] .action-bar { background: var(--rail); border-top: 0; box-shadow: none; padding: 12px 24px 14px 16px; color: var(--rail-text); }
[data-look="rounded"] .action-bar .muted, [data-look="rounded"] .action-bar .small { color: var(--rail-text); }
[data-look="rounded"] .action-bar button:not(.primary), [data-look="rounded"] .action-bar a.btn:not(.primary) { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
[data-look="rounded"] .action-bar button.ghost { background: transparent; border-color: transparent; }
[data-look="rounded"] .action-bar button:not(.primary):hover, [data-look="rounded"] .action-bar a.btn:not(.primary):hover { background: rgba(255,255,255,.14); box-shadow: none; }
[data-look="rounded"] .action-bar button.ab-danger { color: #ff9b8f; }
[data-look="rounded"] .action-bar .ab-menu-list button { color: var(--ink); background: transparent; border-color: transparent; }
[data-look="rounded"] .action-bar .ab-menu-list button:hover { background: var(--brand-soft); }
[data-look="rounded"] .action-bar .ab-menu-list button.ab-danger { color: var(--bad); }

/* Phones: the panel goes edge to edge with a small inset */
@media (max-width: 700px) {
  [data-look="rounded"] main { margin: 0 8px 8px; border-radius: 18px; padding: 16px 12px 24px; }
}
