/* rockinPDF – Design wie rockinCRM (DESIGN.md): warmes Papier, Graphit-Leiste, Bordeaux nur Fokus/Marke, tonale Aktionen, keine Rahmen */
@font-face { font-family: Lobster; src: url(assets/Lobster-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --page: #f3f1ed; --card: #ffffff; --ink: #232326; --ink-muted: #686970;
  --side: #1b1b1e; --side-text: #a9abb3; --side-hover: rgba(255,255,255,.06); --side-active: rgba(255,255,255,.10);
  --accent: #8f2a2a; --accent-dark: #6f1f1f; --logo-red: #ff3131;
  --taupe: #dcd7cf; --taupe-hover: #cdc8bf;
  --tone: rgba(35,35,38,.045); --tone-hover: rgba(35,35,38,.075); --tone-press: rgba(35,35,38,.11);
  --hair: rgba(35,35,38,.07);
  --ok: #2f7a54; --err: #a8372c; --err-bg: #f6e9e7; --ok-bg: #e9f1ec;
  --shadow: 0 1px 2px rgba(35,35,38,.04), 0 8px 24px -12px rgba(35,35,38,.10);
  --page-shadow: 0 1px 2px rgba(35,35,38,.06), 0 10px 28px -10px rgba(35,35,38,.22);
  --focus: 0 0 0 3px rgba(143,42,42,.18);
  --r-sm: 6px; --r-md: 8px; --r-xl: 12px;
  --rail-w: 248px; --insp-w: 264px; --bar-h: 52px;
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: .9rem; line-height: 1.4; color: var(--ink); background: var(--page); overflow: hidden; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(143,42,42,.22); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
.muted { color: var(--ink-muted); }
.label { font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.xl { width: 40px; height: 40px; stroke-width: 1.5; }

/* Gerüst */
.app { display: grid; height: 100vh; height: 100dvh;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) 0;
  grid-template-rows: var(--bar-h) auto minmax(0, 1fr);
  grid-template-areas: "rail bar bar" "rail find find" "rail stage insp";
  transition: grid-template-columns .22s var(--ease); }
.app[data-rail="closed"] { grid-template-columns: 0 minmax(0, 1fr) 0; }
.app[data-insp="open"] { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--insp-w); }
.app[data-insp="open"][data-rail="closed"] { grid-template-columns: 0 minmax(0, 1fr) var(--insp-w); }

/* Seitenleiste */
.rail { grid-area: rail; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.app[data-rail="closed"] .rail { visibility: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; height: var(--bar-h); flex: none; }
.brand-icon { flex: none; width: 32px; height: 32px; }
.brand-word { height: 24px; width: auto; display: block; }
.empty-card img.pdf-file { width: 112px; height: 112px; object-fit: contain; margin-bottom: 4px; }
.wordmark { font-family: Lobster, cursive; font-size: 28px; line-height: 1; color: #fff; white-space: nowrap; }
.wordmark b { font-weight: 400; color: var(--logo-red); }
.rail-tabs { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 8px; flex: none; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 12px; border-radius: var(--r-md); color: var(--side-text); text-align: left; transition: background .15s, color .15s; }
.nav:hover { background: var(--side-hover); color: #e4e5ea; }
.nav[aria-selected="true"] { background: var(--side-active); color: #fff; }
.nav:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.rail-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rail-panel[hidden] { display: none; }
.rail-foot { padding: 8px 10px 12px; flex: none; }

.page-actions { display: flex; gap: 2px; padding: 4px 10px 8px; flex: none; flex-wrap: wrap; }
.mini { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--side-text); transition: background .15s, color .15s, transform .12s; }
.mini:hover:not(:disabled) { background: var(--side-hover); color: #fff; }
.mini:active:not(:disabled) { transform: scale(.94); }
.mini.danger:hover:not(:disabled) { color: #f0a49c; }
.mini:disabled { opacity: .35; cursor: default; }
.mini:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

.thumbs { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 20px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.thumb { position: relative; display: block; width: 100%; padding: 8px 0 6px; text-align: center; border-radius: var(--r-md); transition: background .15s; }
.thumb:hover { background: var(--side-hover); }
.thumb .pg { display: block; margin: 0 auto; background: #fff; border-radius: 3px; box-shadow: 0 2px 10px -2px rgba(0,0,0,.5); overflow: hidden; transition: box-shadow .15s; }
.thumb canvas { display: block; width: 100%; height: 100%; }
.thumb .n { display: block; margin-top: 6px; font-size: .75rem; color: var(--side-text); font-variant-numeric: tabular-nums; }
.thumb[aria-current="true"] { background: var(--side-active); }
.thumb[aria-current="true"] .n { color: #fff; }
.outline, .comments { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.outline ul { list-style: none; margin: 0; padding-left: 12px; }
.outline > ul { padding-left: 0; }
.outline a, .comment { display: block; padding: 6px 10px; border-radius: var(--r-sm); color: var(--side-text); text-decoration: none; cursor: pointer; font-size: .85rem; }
.outline a:hover, .comment:hover { background: var(--side-hover); color: #fff; }
.comment .k { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.panel-empty { padding: 14px 12px; color: var(--side-text); opacity: .75; font-size: .85rem; }

/* Werkzeugleiste */
.bar { grid-area: bar; container-type: inline-size; display: flex; align-items: center; gap: 14px; padding: 0 14px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar::-webkit-scrollbar { display: none; }
.grp { display: flex; align-items: center; gap: 4px; flex: none; }
.grp.grow { flex: 1; min-width: 0; }
.btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-md); background: var(--tone); color: var(--ink); white-space: nowrap; transition: background .15s, transform .12s; }
.btn:hover:not(:disabled) { background: var(--tone-hover); }
.btn:active:not(:disabled) { transform: scale(.97); background: var(--tone-press); }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn.primary { background: var(--taupe); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--taupe-hover); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.btn.tool[aria-pressed="true"]:hover { background: #333338; }
.pager { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-variant-numeric: tabular-nums; color: var(--ink-muted); white-space: nowrap; }
.pager input { width: 44px; height: 30px; text-align: center; border: 0; border-radius: var(--r-sm); background: var(--tone); }
select { height: 34px; padding: 0 8px; border: 0; border-radius: var(--r-md); background: var(--tone); appearance: none; -webkit-appearance: none; text-align: center; min-width: 104px; cursor: pointer; }
select:disabled { opacity: .4; }
.field, .findbar input { height: 34px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: var(--tone); width: 100%; }
.field:focus, .findbar input:focus, .pager input:focus { outline: none; box-shadow: var(--focus); }

.findbar { grid-area: find; display: flex; align-items: center; gap: 6px; padding: 0 14px 8px; }
.findbar input { max-width: 340px; }

/* Bühne */
.stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; }
.viewer-container { position: absolute; inset: 0; overflow: auto; background: var(--page); scrollbar-width: thin; scrollbar-color: rgba(35,35,38,.25) transparent; }
.app[data-leer="1"] .viewer-container { display: none; }
#viewer.pdfViewer { --scale-factor: 1; padding: 6px 0 40px; }
/* PDF-Seiten sind immer weiß, tragen den weichen Schatten und keinen Rahmen */
.pdfViewer .page { margin: 14px auto; border: 0; background: #fff; box-shadow: var(--page-shadow); border-image: none; }
.pdfViewer .page .canvasWrapper { background: #fff; }
.pdfViewer.removePageBorders .page { margin: 14px auto; }
.pdfViewer .page .loadingIcon { background: #fff; }
.viewer-container.hand { cursor: grab; }
.viewer-container.hand:active { cursor: grabbing; user-select: none; }
/* Formularfelder im Designton (kein Blau), Fokus in Bordeaux */
.annotationLayer { --annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(160,130,80,0.16);'/></svg>"); --annotation-unfocused-field-filter: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='rockinFillableField' x='0%' y='0%' width='100%' height='100%' color-interpolation-filters='sRGB'><feFlood flood-color='rgb(160,130,80)' flood-opacity='0.16' result='f'/><feComposite in='f' in2='SourceGraphic' operator='over'/></filter></svg>#rockinFillableField"); --input-focus-border-color: #8f2a2a; --input-hover-border-color: #232326; }
.annotationLayer .buttonWidgetAnnotation input { accent-color: #232326; }
.annotationLayer .buttonWidgetAnnotation.checkBox input, .annotationLayer .buttonWidgetAnnotation.radioButton input { background-image: none !important; background-color: #f0ebe3; }
.textLayer ::selection { background: rgba(143,42,42,.28); }
.textLayer .highlight { background-color: rgba(220,170,60,.4); border-radius: 3px; }
.textLayer .highlight.selected { background-color: rgba(143,42,42,.4); }

.empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; }
.app:not([data-leer="1"]) .empty { display: none; }
.empty.drag .empty-card { box-shadow: 0 0 0 3px rgba(143,42,42,.25), var(--shadow); }
.empty-card { background: #f9f8f5; border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 36px 40px; max-width: 460px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: box-shadow .2s; }
.empty-card .ic { color: var(--ink-muted); }
.empty-card h1 { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -.015em; }
.empty-card p { margin: 0; text-wrap: pretty; }
.empty-card .hint { font-size: .8rem; margin-top: 6px; }

.toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: var(--r-md); box-shadow: var(--shadow); max-width: min(560px, 90%); z-index: 20; animation: toast-in .2s var(--ease); }
.toast.err { background: var(--err); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Eigenschaften */
.insp h2.label { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--ink); }
.insp { grid-area: insp; overflow: hidden auto; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.app[data-insp="closed"] .insp { visibility: hidden; padding: 0; }
#inspBody { display: flex; flex-direction: column; gap: 18px; }
.insp-row { display: flex; flex-direction: column; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(35,35,38,.14); transition: transform .12s; }
.sw:hover { transform: scale(1.1); }
.sw[style*="#ffffff"], .sw[style*="rgb(255, 255, 255)"] { box-shadow: inset 0 0 0 1.5px rgba(35,35,38,.28); }
.sw[style*="rgb(255, 255, 255)"][aria-pressed="true"] { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--ink); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--ink); }
.range { display: flex; align-items: center; gap: 10px; }
.range input { flex: 1; accent-color: var(--ink); }
.range output { min-width: 3.6em; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.kv { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.kv div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kv dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.insp p { margin: 0; text-wrap: pretty; }
.sig-list { display: flex; flex-direction: column; gap: 8px; }
.sig-item { display: flex; align-items: center; gap: 8px; }
.sig-item .use { flex: 1; height: 54px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; padding: 4px; }
.sig-item .use img { max-width: 100%; max-height: 100%; }
.sig-item .use:hover { box-shadow: 0 0 0 2px var(--taupe-hover); }

/* Dialog */
.dlg { border: 0; padding: 0; background: transparent; max-width: 100vw; }
.dlg::backdrop { background: rgba(27,27,30,.45); }
.dlg-card { width: min(700px, 94vw); background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dlg-card h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--tone); border-radius: var(--r-md); align-self: flex-start; }
.seg-b { height: 30px; padding: 0 14px; border-radius: var(--r-sm); color: var(--ink-muted); }
.seg-b[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sig-pane { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sig-pane canvas { width: 100%; height: auto; aspect-ratio: 640 / 220; background: var(--tone); border-radius: var(--r-md); touch-action: none; cursor: crosshair; }
.sig-saved { display: flex; gap: 8px; flex-wrap: wrap; }
.sig-saved .sig-item .use { width: 120px; flex: none; }

/* Schmal: nur das aktive Werkzeug trägt seine Beschriftung, damit die rechte Gruppe sichtbar bleibt */
@container (max-width: 1360px) { .btn.tool span { display: none; } .btn.tool { width: 34px; padding: 0; justify-content: center; } .btn.tool[aria-pressed="true"] { width: auto; padding: 0 12px; } .btn.tool[aria-pressed="true"] span { display: inline; } }
@media (max-width: 760px) { :root { --rail-w: 0px; } .app { grid-template-columns: 0 minmax(0,1fr) 0 !important; } .app[data-insp="open"] .insp { position: fixed; right: 0; top: var(--bar-h); bottom: 0; width: min(var(--insp-w), 90vw); background: var(--page); box-shadow: var(--shadow); z-index: 30; visibility: visible; } .rail { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Text ändern: Kästen über den Textobjekten, Eingabe an Ort und Stelle */
.tedit-layer { position: absolute; inset: 0; z-index: 6; }
.tbox { position: absolute; padding: 0; border-radius: 3px; background: transparent; cursor: text; transition: background .12s; }
.tbox:hover, .tbox:focus-visible { background: rgba(160,130,80,.2); }
.tbox:focus-visible { box-shadow: var(--focus); }
.tedit-input { position: absolute; z-index: 8; background: #fff; border-radius: 4px; box-shadow: var(--focus), 0 8px 24px -10px rgba(35,35,38,.35); display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 0 0 0 2px; }
.tedit-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 2px 4px; font-family: Helvetica, Arial, sans-serif; color: #000; }
.tedit-bar { display: flex; gap: 2px; padding: 2px; }
.tedit-bar .btn { height: 28px; width: 28px; }
.tedit-note { flex-basis: 100%; padding: 2px 8px 6px; font-size: .75rem; color: var(--ink-muted); }
body.tedit-busy .viewer-container { opacity: .6; pointer-events: none; transition: opacity .15s; }
.field-select { width: 100%; }

/* Werkzeuge */
.tool-list { flex: 1; overflow-y: auto; padding: 2px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.tool-group { padding: 14px 10px 6px; color: var(--side-text); opacity: .75; }
.tool-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 12px; border-radius: var(--r-md); color: var(--side-text); text-align: left; transition: background .15s, color .15s; }
.tool-item:hover { background: var(--side-hover); color: #fff; }
.tool-item:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.tool-dlg { width: min(560px, 94vw); max-height: 90vh; overflow-y: auto; }
.tool-dlg p { margin: 0; text-wrap: pretty; }
.tool-body { display: flex; flex-direction: column; gap: 12px; }
.check-row .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.field-select, .tool-body .field { width: 100%; }
input.color { padding: 2px; width: 64px; height: 34px; }
#toolDlg.busy .tool-body { opacity: .55; pointer-events: none; }
#toolMsg { white-space: pre-line; }
.diff { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow: auto; }
.diff-row { padding: 8px 12px; border-radius: var(--r-md); background: var(--tone); font-size: .85rem; }
.diff .add { color: var(--ok); } .diff .del { color: var(--err); }
.redact-layer { position: absolute; inset: 0; z-index: 7; cursor: crosshair; touch-action: none; }
.redact-box { position: absolute; background: rgba(35,35,38,.82); border-radius: 2px; }
.redact-box.ghost { background: rgba(143,42,42,.25); box-shadow: 0 0 0 1.5px rgba(143,42,42,.6); }
.redact-del { position: absolute; top: -10px; right: -10px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.redact-del .ic { width: 12px; height: 12px; }

/* Gegenzeichnung */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sign-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; }
.sign-row { padding: 10px 12px; border-radius: var(--r-md); background: var(--tone); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sign-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--tone-hover); color: var(--ink); }
.chip.completed { background: #dfe9e1; color: #25583f; } .chip.pending { background: #efe8d2; color: #6d5a17; } .chip.expired, .chip.declined { background: #efdad7; color: #7d2b22; }

/* Anmeldung, Konto, Über */
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: var(--page); }
.login-card { width: min(380px, 100%); background: #f9f8f5; border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 32px 32px 26px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.login-card > img:first-child { align-self: center; }
.login-word { height: 30px; width: auto; align-self: center; display: block; }
.login-card .btn { justify-content: center; height: 38px; }
.field-row { display: flex; flex-direction: column; gap: 6px; }
.form-msg { min-height: 1.2em; font-size: .85rem; }
.form-msg.err { color: var(--err); } .form-msg.ok { color: var(--ok); }
.small { font-size: .78rem; margin: 0; text-align: center; }
.pw-form { display: flex; flex-direction: column; gap: 8px; }
.about-head { display: flex; align-items: center; gap: 16px; }
.about-head p { margin: 4px 0 0; }
.licenses { margin: 0; padding-left: 18px; color: var(--ink-muted); font-size: .85rem; display: flex; flex-direction: column; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: 10px; }
.menu-item[aria-checked="true"] { background: var(--tone); font-weight: 600; }

/* Druckeingang */
.inbox { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.inbox-item { display: flex; align-items: center; gap: 4px; border-radius: var(--r-md); }
.inbox-item:hover { background: var(--side-hover); }
.inbox-open { flex: 1; min-width: 0; text-align: left; padding: 7px 10px; color: var(--side-text); }
.inbox-open:hover { color: #fff; }
.inbox-open .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.inbox-open .meta { display: block; font-size: .72rem; opacity: .7; font-variant-numeric: tabular-nums; }
.count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--logo-red); color: #fff; font-size: .72rem; text-align: center; line-height: 18px; }

/* Exportmenü */
.menu { margin: 0; padding: 6px; border: 0; border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow); min-width: 220px; position: fixed; inset: auto; }
.menu:popover-open { display: flex; flex-direction: column; gap: 2px; }
.menu-item { text-align: left; padding: 8px 12px; border-radius: var(--r-md); }
.menu-item:hover { background: var(--tone-hover); }

/* Digitale Signatur */
.ds-body { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { accent-color: var(--ink); }
.sub { margin: 6px 0 0; font-size: .9rem; font-weight: 600; }
.cert-list { display: flex; flex-direction: column; gap: 6px; }
.cert-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--tone); }
.cert-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cert-form .field { flex: 1 1 160px; width: auto; }
.sig-status { display: flex; flex-direction: column; gap: 8px; }
.sig-line { padding: 8px 12px; border-radius: var(--r-md); }
.sig-line.ok { background: var(--ok-bg); } .sig-line.bad { background: var(--err-bg); }
.sig-line strong { display: block; }

input[type=file]::file-selector-button { height: 34px; padding: 0 12px; margin-right: 10px; border: 0; border-radius: var(--r-md); background: var(--tone); color: var(--ink); cursor: pointer; font: inherit; }
input[type=file]::file-selector-button:hover { background: var(--tone-hover); }
