/* Shared density and actions. See docs/DESIGNRICHTLINIEN.txt. */
:root{--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--control-size:32px;--row-size:34px}
body{font-size:13px;line-height:1.45}h2{font-size:17px;margin-bottom:12px}h3{font-size:14px;margin-bottom:8px}p{margin-bottom:10px}hr{margin:16px 0}
.sidebar{width:216px;padding:16px 12px}.sidebar nav{margin-top:20px;gap:4px}.sidebar nav a{padding:8px 10px;font-size:13px}.sidebar-bottom{padding:12px 8px 0;gap:8px}.brand-logo{width:40px;height:40px;flex-basis:40px}.brand{font-size:12px;gap:8px}
.app-body{margin-left:216px}.topbar{height:52px;padding:0 20px}.content{max-width:none;padding:18px 20px 28px}.page-heading{margin-bottom:12px}.page-heading h1{font-size:23px}.card{padding:14px}.card>h2{font-size:17px}.grid,.stack{gap:12px}.toolbar{gap:8px;margin-bottom:10px}.toolbar:last-child{margin-bottom:0}
.button,button,.button.small,button.small{min-height:var(--control-size);padding:5px 10px;font-size:12px}.action{display:inline-flex;align-items:center;justify-content:center;gap:6px}.action::before{content:"";display:inline-block;width:16px;height:16px;flex:0 0 16px;background:currentColor;mask-image:var(--action-icon);mask-repeat:no-repeat;mask-position:center;mask-size:contain;pointer-events:none}.action.action-compact{width:var(--control-size);min-width:var(--control-size);height:var(--control-size);padding:6px;font-size:0;gap:0}.action-compact>*{display:none}.action-compact::before{width:16px;height:16px}.button:disabled,button:disabled{opacity:.5;cursor:not-allowed}
.field{gap:4px;font-size:12px}.field input,.field select,.field textarea,input:not([type=checkbox]):not([type=radio]),select,textarea{min-height:var(--control-size);padding:6px 8px;font-size:13px}.field textarea,textarea{line-height:1.45}input[type=checkbox]{width:16px;height:16px}.field small{font-size:11px}
.management-top{gap:10px;margin-bottom:10px}.management-top h2{font-size:18px}.management-tools{gap:8px;margin-bottom:10px}.management-fields{gap:10px 14px}.management-dialog,dialog{padding:18px}.management-dialog-heading{margin-bottom:12px}.management-dialog-actions{margin-top:14px}.management-import-mapping{gap:10px 14px}.management-help{padding:8px 10px;margin-bottom:10px;font-size:12px}.management-caption{font-size:11px;color:var(--muted);margin:0 0 6px}.management-empty{padding:20px 12px}.management-sub{font-size:11px}
.management-table th,.management-table td,th,td{padding:6px 8px;font-size:12px;vertical-align:middle}.management-row-actions{gap:4px;flex-wrap:nowrap}.management-row-actions .button{min-height:var(--control-size)}.management-table td>.button+.button{margin-left:4px}.response-status{font-size:11px;padding:2px 5px}.response-filter{margin:10px 0;gap:4px}
.management-stats{gap:8px}.management-stat{padding:10px 12px;border-top-width:2px}.management-stat a{display:flex;align-items:center;justify-content:space-between;gap:10px}.management-stat strong{font-size:24px;margin:0}.overview-list{margin-top:16px}.overview-access{margin-top:10px}.overview-access .toolbar{margin-bottom:6px}.link-code{font-size:12px}
.settings-tabs{gap:18px;margin-bottom:16px}.settings-tabs a{padding-bottom:8px}.management-form-header{padding:8px 0}.management-form-row{padding:10px;gap:10px}.management-form-row .button{min-height:var(--control-size)}.management-form-options summary{padding:4px 0}.management-form-options label{margin-top:6px}
.documents-columns{gap:12px;margin-bottom:12px}.documents-page .field{margin-bottom:10px}.documents-page hr{margin:16px 0}.recipient-list{margin-top:8px}.recipient-row{padding:7px 2px;gap:8px}.recipient-row small{margin-top:0}.rich-toolbar{padding:4px;gap:4px}.rich-editor{min-height:210px;padding:10px}.document-job{margin:8px 0}.registration-wrap>.card{margin:14px 0}.registration-wrap .field{gap:4px;padding:0}.registration-wrap [data-semantic=response_status],.registration-wrap [data-semantic=donation]{padding-top:14px;margin-top:8px}.public-header{padding-top:12px;padding-bottom:12px}.public-content{margin-top:20px}.login-card{margin:28px auto;padding:24px}.login-card>p{margin-bottom:16px}
.sheet-card{padding:0;overflow:hidden}.sheet-scroll{max-height:calc(100vh - 230px);overflow:auto;isolation:isolate;border:1px solid var(--line);border-radius:4px}.sheet-card .sheet-scroll{border:0}.sheet-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}.sheet-table th,.sheet-table td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap;height:var(--row-size);padding:5px 8px}.sheet-table th{position:sticky;top:0;z-index:3;background:#edf0f5;font-weight:600}.sheet-table td{background:white}.sheet-table tr:nth-child(even) td{background:#fafbfc}.sheet-table tbody tr:hover td{background:#edf2fb}.sheet-table th:nth-child(2),.sheet-table td:nth-child(2){position:sticky;left:42px;z-index:1;min-width:180px;max-width:280px;white-space:normal;overflow-wrap:anywhere;border-right:2px solid #c8ceda}.sheet-table th:nth-child(2){z-index:4;background:#edf0f5}.sheet-table .sheet-number{position:sticky;left:0;z-index:2;width:42px;min-width:42px;max-width:42px;text-align:right;color:var(--muted);background:#edf0f5;font-variant-numeric:tabular-nums}.sheet-table th.sheet-number{z-index:5}.sheet-table .sheet-notes{min-width:200px;max-width:360px;white-space:pre-wrap;overflow-wrap:anywhere}.sheet-table .response-status{display:block;width:fit-content;margin-top:2px}.management-preview.sheet-scroll{max-height:46vh}.management-dialog:has(.sheet-table){width:min(1160px,calc(100vw - 32px))}
@media(max-width:1100px){.management-stat a{flex-wrap:wrap}.content{padding:16px}.topbar{padding:0 16px}}
@media(max-width:720px){.sidebar{width:auto;padding:12px;gap:10px}.sidebar nav{margin:0}.sidebar nav a{font-size:11px;padding:8px 3px}.sidebar-bottom{padding:0;gap:4px}.app-body{margin-left:0}.topbar{height:auto;padding:8px 12px}.content{padding:14px 12px 24px}.page-heading h1{font-size:21px}.card{padding:12px}.sheet-card{padding:0}.management-fields,.management-import-mapping{grid-template-columns:1fr}.sheet-scroll{max-height:65vh}.sheet-table th:nth-child(2),.sheet-table td:nth-child(2){min-width:140px;max-width:180px}.management-stats{gap:6px}.management-stat strong{font-size:22px}.public-content{padding:0 12px}.registration-wrap .card{padding:14px}}
@media(pointer:coarse){:root{--control-size:40px;--row-size:40px}.sidebar nav a{min-height:40px}input[type=checkbox]{width:20px;height:20px}}
/* Readability: retain compact spacing, use larger text and a full-width brand line. */
body{font-size:14px}body::before{content:"";position:fixed;inset:0 0 auto;height:4px;background:var(--blue);z-index:1000;pointer-events:none}.sidebar,.public-header{border-top:0}.sidebar{padding-top:20px}
.button,button,.button.small,button.small{font-size:13px}.action.action-compact{font-size:0}.management-table th,.management-table td,th,td{font-size:14px}.field{font-size:13px}.field input,.field select,.field textarea,input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:14px}.management-sub,.management-caption,.management-help,.management-email-warning,.management-mapping-sample{font-size:13px}.sidebar nav a{font-size:14px}.sheet-table td:nth-child(2) strong{font-weight:700}.stock-sort{display:flex;align-items:center;gap:6px;font-size:13px}.stock-sort select{max-width:180px}.management-tools{flex-wrap:wrap}
@media(max-width:720px){.sidebar nav a{font-size:12px}.stock-sort{flex:1 1 160px;flex-wrap:wrap;gap:4px}.stock-sort select{width:100%;max-width:none}.sidebar{padding-top:16px}}
.sheet-table td.sheet-actions,.sheet-table th.sheet-actions{position:sticky;right:0;z-index:6;border-left:1px solid #c8ceda;box-shadow:-4px 0 5px -4px #526575;background:white;width:1%;white-space:nowrap}.sheet-table th.sheet-actions{z-index:7;background:#edf0f5}
@media(max-width:600px){.sheet-table:has(.sheet-actions) td:nth-child(2),.sheet-table:has(.sheet-actions) th:nth-child(2){position:static}}
.sheet-table th:has(.sheet-sort){padding:0}.sheet-table .sheet-sort{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:5px 8px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-weight:600;text-align:left;white-space:nowrap;cursor:pointer}.sheet-sort::after{content:"↕";opacity:.45}.sheet-table th[aria-sort=ascending] .sheet-sort::after{content:"↑";opacity:1}.sheet-table th[aria-sort=descending] .sheet-sort::after{content:"↓";opacity:1}.sheet-table th[aria-sort=ascending],.sheet-table th[aria-sort=descending]{color:var(--blue)}.sheet-table .sheet-sort:hover{background:var(--tint)}.sheet-table .sheet-sort:focus-visible{outline-offset:-3px}

/* Busy controls keep their label and replace the action icon with a spinner. */
button.is-busy,a.is-busy{display:inline-flex;align-items:center;justify-content:center;gap:6px;opacity:.55;cursor:wait;pointer-events:none}
button.is-busy::before,a.is-busy::before,.inline-spinner::before{content:"";display:inline-block;box-sizing:border-box;width:16px;height:16px;flex:0 0 16px;background:none;mask:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:action-spin .75s linear infinite;pointer-events:none}
.inline-spinner{display:inline-flex;align-items:center;gap:8px}
@keyframes action-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){button.is-busy::before,a.is-busy::before,.inline-spinner::before{animation-duration:1.8s}}
