/* GENERATED by generator/tokens.py (generator/rma_ui.py and rma_ui.css) — do not edit.
   RMA app UI, the shared stylesheet of GUIDELINES.md 7: the card language (owner, 2026-10-22).
   Apps vendor it beside tokens/brand.css and assets/fonts/fonts.css, in that order:
     <link rel="stylesheet" href="fonts.css"><link rel="stylesheet" href="brand.css"><link rel="stylesheet" href="rma-ui.css">
   and set <html data-rma-brand="group|network|dental|airlines">. The corner wire art is the app's: set
   --rma-ui-art-light / --rma-ui-art-dark on :root to url(...) of assets/art/rma-<brand>-art-<mode>.svg. */

/* Brand tone tokens: per brand, both modes. The mode blocks below pick -l or -d. */
[data-rma-brand="group"], :root {
  --rma-ui-b-accent-l: var(--rma-group-base); --rma-ui-b-tint-l: #F6EDD8; --rma-ui-b-sel-l: #FBF6EA;
  --rma-ui-b-nav-l: rgba(119,88,2,0.09); --rma-ui-b-chart-l: var(--rma-group-mid); --rma-ui-b-chartb-l: #B9C4C8;
  --rma-ui-b-accent-d: var(--rma-group-ondark); --rma-ui-b-tint-d: rgba(225,183,92,0.16); --rma-ui-b-sel-d: rgba(225,183,92,0.08);
  --rma-ui-b-nav-d: rgba(255,255,255,.07); --rma-ui-b-chart-d: #C9A14A; --rma-ui-b-chartb-d: #5D6E75;
}
[data-rma-brand="network"] {
  --rma-ui-b-accent-l: var(--rma-network-base); --rma-ui-b-tint-l: #E2ECE4; --rma-ui-b-sel-l: #F7F9F7;
  --rma-ui-b-nav-l: rgba(16,95,29,0.09); --rma-ui-b-chart-l: var(--rma-network-mid); --rma-ui-b-chartb-l: #B9C4C8;
  --rma-ui-b-accent-d: var(--rma-network-ondark); --rma-ui-b-tint-d: rgba(88,196,106,0.16); --rma-ui-b-sel-d: rgba(88,196,106,0.08);
  --rma-ui-b-nav-d: rgba(255,255,255,.07); --rma-ui-b-chart-d: var(--rma-network-ondark); --rma-ui-b-chartb-d: #5D6E75;
}
[data-rma-brand="dental"] {
  --rma-ui-b-accent-l: var(--rma-dental-base); --rma-ui-b-tint-l: #ECE2FA; --rma-ui-b-sel-l: #F9F7FE;
  --rma-ui-b-nav-l: rgba(96,16,216,0.09); --rma-ui-b-chart-l: var(--rma-dental-mid); --rma-ui-b-chartb-l: #B9C4C8;
  --rma-ui-b-accent-d: var(--rma-dental-ondark); --rma-ui-b-tint-d: rgba(181,140,242,0.16); --rma-ui-b-sel-d: rgba(181,140,242,0.08);
  --rma-ui-b-nav-d: rgba(255,255,255,.07); --rma-ui-b-chart-d: var(--rma-dental-ondark); --rma-ui-b-chartb-d: #5D6E75;
}
[data-rma-brand="airlines"] {
  --rma-ui-b-accent-l: var(--rma-airlines-base); --rma-ui-b-tint-l: #E2E9F3; --rma-ui-b-sel-l: #F7F9FC;
  --rma-ui-b-nav-l: rgba(15,75,155,0.09); --rma-ui-b-chart-l: var(--rma-airlines-mid); --rma-ui-b-chartb-l: #B9C4C8;
  --rma-ui-b-accent-d: var(--rma-airlines-ondark); --rma-ui-b-tint-d: rgba(113,170,254,0.16); --rma-ui-b-sel-d: rgba(113,170,254,0.08);
  --rma-ui-b-nav-d: rgba(255,255,255,.07); --rma-ui-b-chart-d: var(--rma-airlines-ondark); --rma-ui-b-chartb-d: #5D6E75;
}

/* Light is the default; the system's dark mode applies unless <html data-theme="light">; data-theme="light|dark" on
   any element scopes a mode to it (a wrapper, a preview). Put data-rma-brand on that element or above it. */
:root, [data-theme="light"] {
  --rma-ui-ground: #EEF0F1;
  --rma-ui-panel: #FFFFFF;
  --rma-ui-edge: rgba(15,26,31,.13);
  --rma-ui-line: rgba(15,26,31,.06);
  --rma-ui-inset: #F5F6F7;
  --rma-ui-box: #B4BFC4;
  --rma-ui-field: #FFFFFF;
  --rma-ui-strong: #0F1A1F;
  --rma-ui-ink: #2B373C;
  --rma-ui-muted: #5E6B70;
  --rma-ui-hover: rgba(15,26,31,.04);
  --rma-ui-glass: rgba(255,255,255,.66);
  --rma-ui-glass-strong: rgba(255,255,255,.78);
  --rma-ui-glass-line: rgba(255,255,255,.9);
  --rma-ui-glass-shadow: 0 8px 30px rgba(28,38,42,.08), inset 0 0 0 .5px rgba(15,26,31,.06);
  --rma-ui-float-shadow: 0 16px 40px rgba(28,38,42,.18), inset 0 0 0 .5px rgba(15,26,31,.08);
  --rma-ui-art-opacity: 0.9;
  --rma-ui-art: var(--rma-ui-art-light, none);
  --rma-ui-accent-ink: #FFFFFF;
  --rma-ui-success: #1B7E2A;
  --rma-ui-warning: #B9530A;
  --rma-ui-danger: #C4302B;
  --rma-ui-info: #2563A8;
  --rma-ui-dot-quiet: #8CC59A;
  --rma-ui-tick-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M2.5%206.2l2.3%202.3%204.7-5'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  --rma-ui-dash-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M3%206h6'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='1.8'%20stroke-linecap='round'/%3E%3C/svg%3E");
  --rma-ui-radio-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Ccircle%20cx='6'%20cy='6'%20r='4'%20fill='%23FFFFFF'/%3E%3C/svg%3E");
  --rma-ui-knob-on: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%3E%3Ccircle%20cx='7'%20cy='7'%20r='6'%20fill='%23FFFFFF'/%3E%3C/svg%3E");
  --rma-ui-knob-off: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%3E%3Ccircle%20cx='7'%20cy='7'%20r='5'%20fill='%235E6B70'/%3E%3C/svg%3E");
  --rma-ui-accent: var(--rma-ui-b-accent-l);
  --rma-ui-accent-text: var(--rma-ui-b-accent-l);
  --rma-ui-accent-tint: var(--rma-ui-b-tint-l);
  --rma-ui-accent-sel: var(--rma-ui-b-sel-l);
  --rma-ui-accent-nav: var(--rma-ui-b-nav-l);
  --rma-ui-chart-a: var(--rma-ui-b-chart-l);
  --rma-ui-chart-b: var(--rma-ui-b-chartb-l);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rma-ui-ground: #0B1012;
    --rma-ui-panel: #172025;
    --rma-ui-edge: rgba(255,255,255,.10);
    --rma-ui-line: rgba(255,255,255,.06);
    --rma-ui-inset: #1C262B;
    --rma-ui-box: rgba(255,255,255,.30);
    --rma-ui-field: rgba(255,255,255,.04);
    --rma-ui-strong: #F2F6F8;
    --rma-ui-ink: #E4EBEE;
    --rma-ui-muted: #93A2A9;
    --rma-ui-hover: rgba(255,255,255,.05);
    --rma-ui-glass: rgba(22,30,34,.62);
    --rma-ui-glass-strong: rgba(30,40,45,.78);
    --rma-ui-glass-line: rgba(255,255,255,.10);
    --rma-ui-glass-shadow: 0 8px 32px rgba(0,0,0,.35);
    --rma-ui-float-shadow: 0 16px 40px rgba(0,0,0,.5);
    --rma-ui-art-opacity: 0.55;
    --rma-ui-art: var(--rma-ui-art-dark, none);
    --rma-ui-accent-ink: #1C262A;
    --rma-ui-success: #58C46A;
    --rma-ui-warning: #F0A05A;
    --rma-ui-danger: #F07A73;
    --rma-ui-info: #6FA8E6;
    --rma-ui-dot-quiet: #4E9A5B;
    --rma-ui-tick-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M2.5%206.2l2.3%202.3%204.7-5'%20fill='none'%20stroke='%231C262A'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
    --rma-ui-dash-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M3%206h6'%20fill='none'%20stroke='%231C262A'%20stroke-width='1.8'%20stroke-linecap='round'/%3E%3C/svg%3E");
    --rma-ui-radio-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Ccircle%20cx='6'%20cy='6'%20r='4'%20fill='%231C262A'/%3E%3C/svg%3E");
    --rma-ui-knob-on: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%3E%3Ccircle%20cx='7'%20cy='7'%20r='6'%20fill='%231C262A'/%3E%3C/svg%3E");
    --rma-ui-knob-off: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%3E%3Ccircle%20cx='7'%20cy='7'%20r='5'%20fill='%2393A2A9'/%3E%3C/svg%3E");
    --rma-ui-accent: var(--rma-ui-b-accent-d);
    --rma-ui-accent-text: var(--rma-ui-b-accent-d);
    --rma-ui-accent-tint: var(--rma-ui-b-tint-d);
    --rma-ui-accent-sel: var(--rma-ui-b-sel-d);
    --rma-ui-accent-nav: var(--rma-ui-b-nav-d);
    --rma-ui-chart-a: var(--rma-ui-b-chart-d);
    --rma-ui-chart-b: var(--rma-ui-b-chartb-d);
    color-scheme: dark;
  }
}
[data-theme="dark"] {
  --rma-ui-ground: #0B1012;
  --rma-ui-panel: #172025;
  --rma-ui-edge: rgba(255,255,255,.10);
  --rma-ui-line: rgba(255,255,255,.06);
  --rma-ui-inset: #1C262B;
  --rma-ui-box: rgba(255,255,255,.30);
  --rma-ui-field: rgba(255,255,255,.04);
  --rma-ui-strong: #F2F6F8;
  --rma-ui-ink: #E4EBEE;
  --rma-ui-muted: #93A2A9;
  --rma-ui-hover: rgba(255,255,255,.05);
  --rma-ui-glass: rgba(22,30,34,.62);
  --rma-ui-glass-strong: rgba(30,40,45,.78);
  --rma-ui-glass-line: rgba(255,255,255,.10);
  --rma-ui-glass-shadow: 0 8px 32px rgba(0,0,0,.35);
  --rma-ui-float-shadow: 0 16px 40px rgba(0,0,0,.5);
  --rma-ui-art-opacity: 0.55;
  --rma-ui-art: var(--rma-ui-art-dark, none);
  --rma-ui-accent-ink: #1C262A;
  --rma-ui-success: #58C46A;
  --rma-ui-warning: #F0A05A;
  --rma-ui-danger: #F07A73;
  --rma-ui-info: #6FA8E6;
  --rma-ui-dot-quiet: #4E9A5B;
  --rma-ui-tick-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M2.5%206.2l2.3%202.3%204.7-5'%20fill='none'%20stroke='%231C262A'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  --rma-ui-dash-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M3%206h6'%20fill='none'%20stroke='%231C262A'%20stroke-width='1.8'%20stroke-linecap='round'/%3E%3C/svg%3E");
  --rma-ui-radio-img: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Ccircle%20cx='6'%20cy='6'%20r='4'%20fill='%231C262A'/%3E%3C/svg%3E");
  --rma-ui-knob-on: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%3E%3Ccircle%20cx='7'%20cy='7'%20r='6'%20fill='%231C262A'/%3E%3C/svg%3E");
  --rma-ui-knob-off: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%3E%3Ccircle%20cx='7'%20cy='7'%20r='5'%20fill='%2393A2A9'/%3E%3C/svg%3E");
  --rma-ui-accent: var(--rma-ui-b-accent-d);
  --rma-ui-accent-text: var(--rma-ui-b-accent-d);
  --rma-ui-accent-tint: var(--rma-ui-b-tint-d);
  --rma-ui-accent-sel: var(--rma-ui-b-sel-d);
  --rma-ui-accent-nav: var(--rma-ui-b-nav-d);
  --rma-ui-chart-a: var(--rma-ui-b-chart-d);
  --rma-ui-chart-b: var(--rma-ui-b-chartb-d);
  color-scheme: dark;
}

/* ===== Base: ground, text ===== */
/* .rma-ground is the page: flat ground colour, the corner wire art behind it (set --rma-ui-art-light and
   --rma-ui-art-dark to url(...) of assets/art/rma-<brand>-art-<mode>.svg), brand text. */
/* overflow-x only: when the ground is <body>, its overflow passes to the window, and hidden/clip there stops the page
   from scrolling (client portal and Sign, 2026-10-22). Clipping sideways keeps the art from widening the page. */
.rma-ground { position: relative; overflow-x: clip; background: var(--rma-ui-ground); color: var(--rma-ui-ink);
  font-family: var(--rma-font-text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.rma-ground::before { content: ""; position: absolute; left: var(--rma-ui-art-left, -520px); top: -40px; width: var(--rma-ui-art-width, 1180px); height: var(--rma-ui-art-height, 760px);
  background: var(--rma-ui-art) left center / 100% 100% no-repeat; opacity: var(--rma-ui-art-opacity); pointer-events: none; }
.rma-ground > * { position: relative; }
.rma-ground :where(a) { color: inherit; }
.rma-ground :where(h1, h2, h3, h4) { color: var(--rma-ui-strong); }

/* ===== Panels (kept for older screens; new screens use .rma-card): solid, 12 px corners, the card edge, no shadow ===== */
.rma-panel { background: var(--rma-ui-panel); border: 1px solid var(--rma-ui-edge); border-radius: 12px; padding: 20px 22px; min-width: 0; }
.rma-panel-table { padding: 4px 20px 12px; overflow-x: auto; }
.rma-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rma-panel-head h2, .rma-panel-title { margin: 0; color: var(--rma-ui-strong); font-family: var(--rma-font-display); font-size: 19px; font-weight: 500; letter-spacing: 0; }

/* ===== Glass: floating chrome only (rail, top bar, menus, popovers, command bar, selection bar) ===== */
.rma-glass { background: var(--rma-ui-glass); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--rma-ui-glass-line); box-shadow: var(--rma-ui-glass-shadow); }
.rma-glass-strong { background: var(--rma-ui-glass-strong); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--rma-ui-glass-line); box-shadow: var(--rma-ui-float-shadow); }
/* The rail and the top bar are one tone with the ground: their glass is the ground itself, frosted, with no edge and
   no shadow, so at rest they read as the page and only what scrolls under the top bar is blurred. */
.rma-rail.rma-glass, .rma-topbar.rma-glass { background: color-mix(in srgb, var(--rma-ui-ground) 82%, transparent); border-color: transparent; box-shadow: none; }

/* ===== Shell: nav rail, sticky top bar, page title ===== */
.rma-shell { display: flex; flex-wrap: wrap; gap: 20px; padding: 16px; box-sizing: border-box; }
.rma-main { position: relative; flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.rma-rail { flex: 1 1 232px; max-width: 232px; box-sizing: border-box; border-radius: 16px; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 16px; align-self: flex-start; min-height: min(908px, calc(100vh - 32px)); }
.rma-rail-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; font-family: var(--rma-font-display); font-weight: 600; font-size: 18px; color: var(--rma-ui-strong); }
.rma-rail a:not(.rma-search) { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--rma-ui-muted); transition: background-color .12s, color .12s; }
.rma-rail a:not(.rma-search):hover { background: var(--rma-ui-hover); color: var(--rma-ui-strong); }
.rma-rail a[aria-current="page"], .rma-rail a.is-current { color: var(--rma-ui-accent-text); background: var(--rma-ui-accent-nav); font-weight: 600; }
.rma-rail a:not(.rma-search) > span:first-child { flex: 1; }
.rma-rail-count { font: 500 12px var(--rma-font-mono); color: var(--rma-ui-muted); }
.rma-rail-count.is-alert { color: var(--rma-ui-danger); }
.rma-rail-count.is-accent { color: var(--rma-ui-accent-text); }
.rma-rail-label { margin: 18px 10px 6px; font-size: 13px; color: var(--rma-ui-muted); }
.rma-rail-sub { font-size: 15px; }
.rma-rail-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 2px; border-top: 1px solid var(--rma-ui-line); font-size: 14px; line-height: 1.3; }
.rma-rail-foot small { display: block; color: var(--rma-ui-muted); font-size: inherit; }
.rma-topbar { position: sticky; top: 16px; z-index: 2; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-radius: 14px; font-size: 15px; }
.rma-topbar .rma-spacer, .rma-spacer { flex: 1; }
.rma-topbar-muted { color: var(--rma-ui-muted); }
.rma-topbar-sep { width: 1px; height: 20px; background: var(--rma-ui-edge); }
.rma-pagehead { padding: 18px 8px 0; }
.rma-title { margin: 0; font-family: var(--rma-font-display); font-size: 34px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; color: var(--rma-ui-strong); }
.rma-subtitle { margin: 4px 0 0; color: var(--rma-ui-muted); font-size: 17px; max-width: none; }
.rma-subtitle b { color: var(--rma-ui-strong); font-weight: 600; }

/* ===== Command search (a field; the app opens its palette on ⌘K) ===== */
.rma-search { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--rma-ui-edge);
  background: var(--rma-ui-field); color: var(--rma-ui-muted); font-size: 14px; text-decoration: none; box-sizing: border-box; }
.rma-rail .rma-search { margin: 0 4px 14px; }
.rma-search > span:not(.rma-glyph) { flex: 1; }
.rma-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--rma-ui-ink); outline: none; padding: 0; }
.rma-search:focus-within { outline: 2px solid var(--rma-ui-accent); outline-offset: 2px; }
/* The browser's own clear button is a blue glyph: gone from every search field (Esc still clears). */
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.rma-search kbd { font: 12px var(--rma-font-mono); border: 1px solid var(--rma-ui-edge); border-radius: 4px; padding: 0 5px; }

/* ===== Avatar: the photo (avatar.rma-net.eu/<user>.jpg) over the initials; drop the <img> on error ===== */
.rma-avatar { position: relative; flex: none; width: var(--rma-avatar-size, 30px); height: var(--rma-avatar-size, 30px); border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; background: var(--rma-ui-accent-tint); color: var(--rma-ui-accent-text);
  font: 600 calc(var(--rma-avatar-size, 30px) * .43) var(--rma-font-display); }
.rma-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== Work queue: the figure first, then the text, then the action ===== */
.rma-queue-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rma-ui-line); }
.rma-panel-head + .rma-queue-line { margin-top: 12px; }
.rma-queue-fig { font: 500 26px/1 var(--rma-font-display); letter-spacing: -.02em; text-align: right; }
.rma-queue-fig.is-alert { color: var(--rma-ui-danger); }
.rma-queue-text { min-width: 0; font-weight: 600; color: var(--rma-ui-strong); }
.rma-queue-text small { display: block; font-weight: 400; font-size: 14px; color: var(--rma-ui-muted); }
.rma-queue-meta { text-align: right; font-size: 13px; color: var(--rma-ui-muted); }
.rma-queue-meta b { display: block; font: 500 15px var(--rma-font-mono); color: var(--rma-ui-strong); }
.rma-queue-meta.is-alert, .rma-queue-meta.is-alert b { color: var(--rma-ui-danger); }

/* ===== Tables: for very large homogeneous lists only, inside one card (.rma-card.rma-panel-table); the figure strong,
   the rest quiet, soft dividers ===== */
.rma-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rma-table th { text-align: left; padding: 12px 12px 10px; font-size: 14px; font-weight: 600; color: var(--rma-ui-muted); }
.rma-table td { padding: 9px 12px; border-top: 1px solid var(--rma-ui-line); }
.rma-table .rma-col-check { width: 24px; padding-left: 0; padding-right: 8px; }
.rma-table .rma-num, .rma-table .rma-code { font-family: var(--rma-font-mono); font-size: 14px; }
.rma-table .rma-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rma-table .rma-code { white-space: nowrap; }
.rma-table .rma-num { text-align: right; white-space: nowrap; color: var(--rma-ui-strong); }
th.rma-num { font-family: inherit; font-size: 14px; }
.rma-table .rma-date { color: var(--rma-ui-muted); }
.rma-lei { display: block; font: 400 12px var(--rma-font-mono); color: var(--rma-ui-muted); }
.rma-table tr.rma-group-row td { padding: 18px 0 6px; }
.rma-group-row b { font: 500 15px var(--rma-font-display); color: var(--rma-ui-strong); }
.rma-group-sum { margin-left: 12px; color: var(--rma-ui-muted); font-size: 14px; }
.rma-table tr.rma-total-row td { font-weight: 600; color: var(--rma-ui-strong); }
.rma-table tr.is-selected, .rma-table tr[aria-selected="true"] { background: var(--rma-ui-accent-sel); }
.rma-table a, .rma-link { color: var(--rma-ui-accent-text); text-underline-offset: 2px; }
.rma-table a:hover, .rma-link:hover { text-decoration: underline; }
.rma-link { text-decoration: none; }

/* ===== Status: a 7 px dot and a word. Neutral by default; only exceptions take colour and weight ===== */
.rma-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--rma-ui-muted); --rma-ui-dot: var(--rma-ui-dot-quiet); }
.rma-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rma-ui-dot); flex: none; }
.rma-status.is-open { color: var(--rma-ui-strong); font-weight: 600; --rma-ui-dot: var(--rma-ui-chart-a); }
.rma-status.is-todo { color: var(--rma-ui-accent-text); font-weight: 600; --rma-ui-dot: var(--rma-ui-chart-a); }
.rma-status.is-success { color: var(--rma-ui-success); font-weight: 600; --rma-ui-dot: var(--rma-ui-success); }
.rma-status.is-warning { color: var(--rma-ui-warning); font-weight: 600; --rma-ui-dot: var(--rma-ui-warning); }
.rma-status.is-danger { color: var(--rma-ui-danger); font-weight: 600; --rma-ui-dot: var(--rma-ui-danger); }
.rma-status.is-info { color: var(--rma-ui-info); font-weight: 600; --rma-ui-dot: var(--rma-ui-info); }

/* ===== Drawn controls: real <input>s with appearance:none, 18 px, 5 px corners, the brand accent ===== */
.rma-check, .rma-radio { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; box-sizing: border-box; cursor: pointer;
  border: 1.5px solid var(--rma-ui-box); background: transparent center / 12px no-repeat; vertical-align: middle; border-radius: 5px; transition: background-color .12s, border-color .12s; }
.rma-radio { border-radius: 50%; }
.rma-check:checked { background-color: var(--rma-ui-accent); border-color: var(--rma-ui-accent); background-image: var(--rma-ui-tick-img); }
.rma-radio:checked { background-color: var(--rma-ui-accent); border-color: var(--rma-ui-accent); background-image: var(--rma-ui-radio-img); background-size: 8px; }
.rma-check:indeterminate { background-color: var(--rma-ui-accent); border-color: var(--rma-ui-accent); background-image: var(--rma-ui-dash-img); }
.rma-switch { appearance: none; -webkit-appearance: none; flex: none; width: 34px; height: 20px; margin: 0; box-sizing: border-box; cursor: pointer; vertical-align: middle;
  border: 1.5px solid var(--rma-ui-box); border-radius: 10px; background: var(--rma-ui-knob-off) 2px center / 14px no-repeat; transition: background-position .12s, background-color .12s, border-color .12s; }
.rma-switch:checked { background-color: var(--rma-ui-accent); border-color: var(--rma-ui-accent); background-image: var(--rma-ui-knob-on); background-position: calc(100% - 2px) center; }
.rma-check:disabled, .rma-radio:disabled, .rma-switch:disabled { opacity: .45; cursor: not-allowed; }
.rma-check:focus-visible, .rma-radio:focus-visible, .rma-switch:focus-visible, .rma-btn:focus-visible, .rma-link:focus-visible,
.rma-rail a:focus-visible, .rma-table a:focus-visible { outline: 2px solid var(--rma-ui-accent); outline-offset: 2px; }
.rma-field { font: 15px var(--rma-font-text); color: var(--rma-ui-ink); background: var(--rma-ui-panel); border: 1px solid var(--rma-ui-box); border-radius: 8px; padding: 7px 10px; }
.rma-field:focus-visible { outline: 2px solid var(--rma-ui-accent); outline-offset: 1px; border-color: var(--rma-ui-accent); }

/* ===== Buttons: primary (accent), secondary (hairline), quiet ===== */
.rma-btn { display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--rma-font-display); color: var(--rma-ui-strong); background: var(--rma-ui-panel); border: 1px solid var(--rma-ui-edge);
  border-radius: 8px; padding: 6px 12px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .12s, border-color .12s; }
.rma-btn:hover { background: var(--rma-ui-inset); }
.rma-btn-primary { background: var(--rma-ui-accent); border-color: var(--rma-ui-accent); color: var(--rma-ui-accent-ink); }
.rma-btn-primary:hover { background: var(--rma-ui-accent); border-color: var(--rma-ui-accent); filter: brightness(1.08); }
.rma-btn-quiet { border-color: transparent; background: transparent; color: var(--rma-ui-muted); }
.rma-btn[disabled], .rma-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.rma-btn-lg { font-size: 15px; padding: 7px 14px; }

/* ===== The card language (GUIDELINES.md 7): one card holds ONE thing you act on ===== */
/* Peers (orders, clients, documents) in a grid, equal heights per row; chronological things in one column. */
.rma-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; align-items: stretch; min-width: 0; }
.rma-cards-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* A white panel, 12 px corners, a 1 px edge, no shadow. No box inside it: no tiles, filled chips, nested borders or stripes. */
.rma-card { background: var(--rma-ui-panel); color: var(--rma-ui-ink); border: 1px solid var(--rma-ui-edge); border-radius: 12px; box-shadow: none;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-sizing: border-box; font-size: 15px; line-height: 1.45; }
.rma-card :where(a:not(.rma-btn)) { color: var(--rma-ui-accent-text); text-underline-offset: 2px; }
/* Header: the title and its meta on one line, at most one state on the right. */
.rma-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 16px; min-width: 0; }
.rma-card-head > :not(.rma-card-state) { grid-column: 1; min-width: 0; }
.rma-card-head > .rma-card-state { grid-column: 2; grid-row: 1; margin-left: 0; }
.rma-card-title { margin: 0; min-width: 0; font: 500 16px/1.35 var(--rma-font-display); letter-spacing: 0; color: var(--rma-ui-strong); overflow-wrap: break-word; }
.rma-card-meta { margin: 0; font: 400 14px/1.4 var(--rma-font-text); color: var(--rma-ui-muted); }
.rma-card-title .rma-card-meta { margin-left: 8px; }
.rma-card-state { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; white-space: nowrap; color: var(--rma-ui-muted); --rma-ui-dot: var(--rma-ui-box); }
.rma-card-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rma-ui-dot); flex: none; }
.rma-card-state.is-warn { color: var(--rma-ui-warning); font-weight: 600; --rma-ui-dot: var(--rma-ui-warning); }
.rma-card-state.is-danger { color: var(--rma-ui-danger); font-weight: 600; --rma-ui-dot: var(--rma-ui-danger); }
.rma-card-state.is-ok { color: var(--rma-ui-success); font-weight: 600; --rma-ui-dot: var(--rma-ui-success); }
.rma-card-state.is-info { color: var(--rma-ui-info); font-weight: 600; --rma-ui-dot: var(--rma-ui-info); }
/* Body: aligned lines, label left, figure right in JetBrains Mono, soft dividers. */
.rma-card-lines { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.rma-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; border-top: 1px solid var(--rma-ui-line); }
.rma-line:first-child { border-top: 0; padding-top: 0; }
.rma-line > :first-child { min-width: 0; overflow-wrap: anywhere; }
.rma-line small { margin-left: 6px; font-size: 13px; color: var(--rma-ui-muted); }
.rma-line-figure { margin-left: auto; font: 400 14px var(--rma-font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; color: var(--rma-ui-ink); }
.rma-line.is-quiet { font-size: 14px; color: var(--rma-ui-muted); }
.rma-line.is-quiet .rma-line-figure { color: var(--rma-ui-muted); }
.rma-line.is-void .rma-line-figure { text-decoration: line-through; }
/* Raw text (memos, notes, descriptions): small muted evidence at the bottom, never the title. */
.rma-card-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--rma-ui-muted); overflow-wrap: anywhere; }
/* Footer, only while work remains: the figure that matters left, the one primary action right. */
.rma-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--rma-ui-line); font-size: 14px; color: var(--rma-ui-muted); }
.rma-card-foot > .rma-btn:last-child { margin-left: auto; }
.rma-card-figure { font: 600 18px var(--rma-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--rma-ui-strong); }
.rma-card-foot .rma-card-figure { margin-left: 8px; }
.rma-card-figure.is-warn { color: var(--rma-ui-warning); }
.rma-card-figure.is-danger { color: var(--rma-ui-danger); }
.rma-card-figure.is-quiet { font-weight: 500; font-size: 15px; color: var(--rma-ui-muted); }
/* A very large homogeneous list (a price list, an audit log) may be a table inside one card. */
.rma-card.rma-panel-table { display: block; padding: 4px 20px 12px; overflow-x: auto; }
/* Sections: a heading row above a group of cards, the count or total muted on the right. */
.rma-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; margin: 10px 4px 0;
  font: 500 15px/1.35 var(--rma-font-display); color: var(--rma-ui-strong); }
.rma-section-head :where(h2, h3) { margin: 0; font: inherit; color: inherit; }
.rma-section-head > :not(:first-child) { font: 400 14px var(--rma-font-text); color: var(--rma-ui-muted); }
/* Filters: one search field and a few chips, outline only (never filled); the rest under "Mai multe filtre". */
.rma-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rma-filters .rma-search { flex: 1 1 280px; padding: 8px 12px; font-size: 15px; }
.rma-chip { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; min-height: 32px; padding: 5px 12px; border: 1px solid var(--rma-ui-edge);
  border-radius: 999px; background: transparent; color: var(--rma-ui-ink); font: 400 14px var(--rma-font-text); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: border-color .12s, color .12s; }
.rma-chip b { font-weight: 600; color: var(--rma-ui-strong); }
.rma-chip:hover { border-color: var(--rma-ui-box); }
.rma-chip[aria-pressed="true"], .rma-chip.is-on { border-color: var(--rma-ui-accent); color: var(--rma-ui-accent-text); }
.rma-chip:focus-visible, .rma-card a:focus-visible { outline: 2px solid var(--rma-ui-accent); outline-offset: 2px; }

/* ===== Floating selection bar (a little more opaque, a stronger shadow) ===== */
.rma-selbar { position: sticky; bottom: 24px; margin: 0 auto; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 9px 10px 9px 18px; border-radius: 14px; font-size: 15px; white-space: nowrap; }
.rma-selbar b { font-weight: 600; }
.rma-selbar span { color: var(--rma-ui-muted); }
.rma-selbar-sep { width: 1px; height: 20px; background: var(--rma-ui-edge); }

/* ===== Empty state: a sentence and an action, no icon ===== */
.rma-empty { text-align: center; padding: 40px 20px; }
.rma-empty p { margin: 0 auto 16px; max-width: 44ch; color: var(--rma-ui-muted); }

/* ===== Glyphs: the only three the apps may draw (2 px stroke, in the text colour) ===== */
.rma-glyph { display: inline-block; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--rma-glyph) center / contain no-repeat; mask: var(--rma-glyph) center / contain no-repeat; }
.rma-glyph-search { --rma-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E"); }
.rma-glyph-download { --rma-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 11l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.rma-glyph-more { --rma-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E"); }

@media (max-width: 860px) { .rma-rail { position: static; max-width: none; min-height: 0; flex-basis: 100%; } .rma-queue-line { grid-template-columns: 40px minmax(0, 1fr); } .rma-queue-line > :nth-child(n+3) { grid-column: 2; text-align: left; justify-self: start; } }
/* Phones: cards stack in one column, a little less padding. Touch: 44 px targets, 16 px inputs (no zoom on focus). */
@media (max-width: 639px) { .rma-cards { grid-template-columns: minmax(0, 1fr); } .rma-card { padding: 16px; } .rma-card.rma-panel-table { padding: 2px 12px 8px; } }
@media (pointer: coarse) { .rma-btn, .rma-chip { min-height: 44px; } .rma-field, .rma-search input, .rma-search { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .rma-ground * { transition: none !important; } }
