/* Shared working surfaces. Overrides the legacy decorative theme without changing domain widgets. */
:root, :root[data-theme="light"] {
    --bg: #f4f6f6;
    --surface: #ffffff;
    --surface-2: #edf1f1;
    --surface-3: #e1e7e7;
    --text: #20282a;
    --text-dim: #586568;
    --border: #c8d2d3;
    --hairline: #dbe2e2;
    --accent: #087e82;
    --accent-strong: #065d61;
    --accent-blue: #2767a3;
    --success: #187449;
    --warning: #986000;
    --danger: #bf3048;
    --pending: #71559e;
    --info: #2767a3;
    --neutral-status: #586568;
    --radius: 6px;
    --panel-radius: 8px;
    --sidebar-width: 224px;
    --card-shadow: none;
    --soft-shadow: none;
    --hover-shadow: none;
    --panel-glow: none;
    --panel-glow-hover: none;
    --page-on-galaxy: var(--text);
    --page-on-galaxy-muted: var(--text-dim);
    --page-on-galaxy-soft: var(--text-dim);
    --page-on-galaxy-link: var(--accent);
    --page-on-galaxy-link-hover: var(--accent-strong);
}
:root[data-theme="dark"] {
    --bg: #171c1d;
    --surface: #202728;
    --surface-2: #2a3233;
    --surface-3: #353e40;
    --text: #edf2f2;
    --text-dim: #b0bebe;
    --border: #4c5a5c;
    --hairline: #394446;
    --accent: #5acdc9;
    --accent-strong: #93e5df;
    --accent-blue: #8cb9ed;
    --success: #83d7a6;
    --warning: #e5bd65;
    --danger: #ff99a8;
    --pending: #c5a8ec;
    --info: #8cb9ed;
}
:root body { background: var(--bg) !important; background-image: none !important; color: var(--text); }
:root body::before, :root body::after, :root .sidebar::after,
:root .network-depth, :root .interaction-echo { display: none !important; }
:root body :is(h1,h2,h3,h4,.nav-section,.button,th,label) { letter-spacing: 0; }
:root[data-theme] body :is(.panel,.stat-card,.domain-toolbar,.friendly-fact,.onboarding-card,.quick-tile,.tool-tile,.module-tile,.empty-panel,.command-panel,.user-menu-panel,.dashboard-head,.auth-card) {
    background: var(--surface) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none;
    filter: none;
}
:root[data-theme] body :is(.panel,.domain-toolbar,.dashboard-head,.empty-panel) {
    padding: 16px 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--hairline) !important;
}
:root body :is(.panel,.stat-card,.quick-tile,.tool-tile,.module-tile,.auth-card,.domain-toolbar)::before,
:root body :is(.panel,.stat-card,.quick-tile,.tool-tile,.module-tile,.auth-card,.domain-toolbar)::after { display: none; }
:root body :is(.tool-tile,.quick-tile,.module-tile):hover { border-color: var(--accent) !important; }
:root .sidebar { background: var(--surface) !important; border-right: 1px solid var(--hairline); position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
:root .brand { padding: 20px 16px; min-height: 76px; }
:root .brand-mark { border-radius: 8px; background: #087e82; color: white; box-shadow: none; }
:root .brand-mark::before, :root .brand-mark::after { display: none; }
:root .app-shell { grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
:root .nav { flex-direction: column; overflow-x: visible; gap: 2px; padding: 4px 10px 16px; }
:root .nav-link { min-height: 38px; border-radius: 6px; padding: 8px; color: var(--text-dim); background: transparent; transform: none; box-shadow: none; }
:root .nav-link:hover { background: var(--surface-2); color: var(--text); }
:root .nav-link.is-active { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); color: var(--accent-strong); box-shadow: inset 3px 0 var(--accent); }
:root .nav-link::before, :root .nav-link::after { display: none; }
:root .nav-icon, :root .nav-link.is-active .nav-icon { background: transparent; color: inherit; box-shadow: none; }
:root .nav-section { font-size: 11px; margin: 16px 8px 5px; color: var(--text-dim); }
:root .topbar { min-height: 64px; padding: 10px 24px; gap: 12px; background: var(--surface); backdrop-filter: none; border-bottom: 1px solid var(--hairline); }
:root .topbar-actions { gap: 8px; }
:root .command-trigger { width: min(520px,100%); min-width: 0; border: 1px solid var(--hairline); border-radius: 6px; background: var(--surface-2); color: var(--text-dim); box-shadow: none; }
:root .command-trigger::before, :root .command-trigger::after { display: none; }
:root .command-trigger-icon { background: transparent; color: var(--text-dim); box-shadow: none; }
:root .icon-button, :root .user-menu summary { width: 36px; height: 36px; min-width: 36px; border: 1px solid var(--hairline); border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: none; }
:root .user-menu summary > span { background: var(--surface-2); color: var(--text); border-radius: 4px; }
:root .contextbar { position: relative; top: auto; padding: 10px 24px; gap: 10px 20px; flex-wrap: wrap; background: var(--surface); border-bottom: 1px solid var(--hairline); backdrop-filter: none; }
:root .domain-switcher { min-width: 0; max-width: 100%; gap: 10px; }
:root .domain-switcher select { width: min(300px,100%); min-width: 0; max-width: 100%; }
:root .context-actions { display: flex; flex-wrap: wrap; gap: 2px; }
:root .context-actions a { color: var(--text-dim); padding: 7px 9px; border-radius: 4px; }
:root .context-actions a:hover, :root .context-actions a[aria-current] { color: var(--accent-strong); background: var(--surface-2); }
:root .content { padding: 24px; min-width: 0; width: 100%; max-width: 1800px; margin: 0 auto; }
:root[data-theme] [data-crud-workspace] { --crud-bg: var(--bg); --crud-surface: var(--surface); --crud-ink: var(--text); --crud-muted: var(--text-dim); --crud-line: var(--hairline); --crud-accent: var(--accent); }
:root [data-crud-workspace]:not(dialog) { padding: 0; border: 0; background: transparent; }
:root .page-head { gap: 16px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
:root .page-head h1, :root .dashboard-head h1, :root .auth-card h1 { font-size: 24px; line-height: 1.25; background: none; color: var(--text) !important; text-shadow: none; overflow-wrap: anywhere; }
:root .page-head p { color: var(--text-dim); margin: 6px 0 0; }
:root .panel-head h2 { font-size: 17px; line-height: 1.4; }
:root body .button { min-height: 36px; border-radius: 6px; box-shadow: none; transform: none; text-shadow: none; white-space: normal; }
:root body .button::before, :root body .button::after { display: none; }
:root body .button-primary { color: #fff; background: #087e82; border-color: #087e82; }
:root body .button-primary:hover { background: #06666a; border-color: #06666a; }
:root body :is(.button-secondary,.button-ghost) { background: var(--surface); color: var(--text); border-color: var(--border); }
:root body .button-danger { background: #b42c40; border-color: #b42c40; color: #fff; }
:root body :is(input,select,textarea) { border-radius: 6px; box-shadow: none; background: var(--surface); color: var(--text); border-color: var(--border); }
:root body :is(input,select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { min-height: 36px; }
:root body :is(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:root .domain-overview-shell { grid-template-columns: minmax(0,1fr); gap: 20px; }
:root .domain-toolbar { display: grid; grid-template-columns: minmax(190px,2fr) repeat(4,minmax(105px,1fr)); gap: 12px; align-items: end; }
:root .domain-toolbar label { min-width: 0; }
:root .domain-toolbar .toolbar-search { grid-column: auto; }
:root .domain-side-panel { position: static; display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); }
:root .domain-table { min-width: 820px; width: 100%; }
:root table { border-collapse: collapse; border-spacing: 0; }
:root tbody td { background: var(--surface); border: 0; border-bottom: 1px solid var(--hairline); box-shadow: none; border-radius: 0; }
:root tbody tr:hover { transform: none; }
:root tbody tr:hover td { background: var(--surface-2); transform: none; box-shadow: none; }
:root thead th { background: var(--surface-2); color: var(--text-dim); border-radius: 0; font-size: 11px; padding: 10px 12px; }
:root .domain-table td { padding: 12px; }
:root .domain-table td:first-child { min-width: 235px; }
:root .table-wrap, :root .svc-table-wrap { max-width: 100%; overflow-x: auto; }
:root .table-sub { color: var(--text-dim); }
:root .row-action-strip { gap: 5px; }
:root[data-theme] .domain-action-button { background: var(--surface) !important; border: 1px solid var(--hairline) !important; color: var(--text); border-radius: 5px; box-shadow: none !important; transform: none; }
:root .domain-action-button:hover { border-color: var(--accent) !important; }
:root body .row-more-menu > div {
    isolation: isolate;
    background: #ffffff !important;
    border: 1px solid #aebabc;
    box-shadow: 0 12px 28px rgb(23 34 36 / 22%) !important;
    opacity: 1;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
:root[data-theme="dark"] body .row-more-menu > div {
    background: #202728 !important;
    border-color: #657477;
    box-shadow: 0 14px 32px rgb(0 0 0 / 48%) !important;
}
:root body .row-more-menu > div a { color: var(--text); }
:root body .row-more-menu > div a:hover,
:root body .row-more-menu > div a:focus-visible { background: var(--surface-2); }
:root body tr:has(.row-more-menu[open]),
:root body td:has(.row-more-menu[open]),
:root body .row-more-menu[open] { position: relative; z-index: 30; }
:root .badge { box-shadow: none; border-radius: 4px; font-weight: 600; }
:root .tool-tile { padding: 14px !important; }
:root .tool-tile h3, :root .tool-tile strong { font-size: 15px; }
:root .tool-icon { background: var(--surface-2) !important; border-radius: 6px !important; box-shadow: none !important; }
:root .command-palette { inset: 0; width: min(680px,calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); overflow: auto; }
:root .command-palette[hidden] { display: none; }
:root .command-palette[open] { display: block; }
:root .command-panel { width: 100%; max-height: none; margin: 0; }
:root #command-palette-title { background: none; color: var(--text) !important; font-size: 17px; text-shadow: none; }
:root .command-input-wrap { background: var(--surface); border-radius: 6px; }
:root .command-item { border-radius: 4px; box-shadow: none; }
:root .workspace-picker { width: min(460px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
:root .workspace-picker h2 { font-size: 18px; margin: 0 0 20px; }
:root .workspace-picker form { display: grid; gap: 10px; }
:root .workspace-picker-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
:root dialog::backdrop { background: rgb(10 20 22 / 48%); backdrop-filter: blur(3px); }
:root .navigation-toggle { display: none; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; background: var(--surface); padding: 10px 16px; }
.skip-link:focus { top: 12px; }
@media (max-width: 1100px) {
    :root .domain-toolbar { grid-template-columns: repeat(3,minmax(0,1fr)); }
    :root .domain-toolbar .toolbar-search { grid-column: span 2; }
}
@media (max-width: 760px) {
    :root .app-shell { display: flex; flex-direction: column; }
    :root .sidebar { position: static; height: auto; width: 100%; }
    :root .navigation-ready .sidebar { display: none; }
    :root .navigation-ready.navigation-open .sidebar { display: flex; position: fixed; inset: 64px auto 0 0; z-index: 60; width: min(320px,100%); height: calc(100dvh - 64px); border-right: 1px solid var(--border); overflow-y: auto; box-shadow: 8px 0 24px rgb(0 0 0 / 12%); }
    :root .navigation-toggle:not([hidden]) { display: inline-grid; place-items: center; }
    :root .topbar { padding: 10px 12px; flex-direction: row; align-items: center; flex-wrap: nowrap; }
    :root .topbar-actions { flex-shrink: 0; }
    :root .command-trigger { flex: 1; padding: 7px 10px; }
    :root .command-trigger-main { min-width: 0; gap: 6px; }
    :root .contextbar { padding: 10px 12px; }
    :root .domain-switcher { width: 100%; }
    :root .domain-switcher select { flex: 1; width: 0; }
    :root .content { padding: 20px 12px; }
    :root .page-head h1 { font-size: 22px; }
    :root .domain-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
    :root .page-head .button { max-width: 100%; }
    :root .panel-head { flex-wrap: wrap; gap: 10px; }
    :root .context-actions a { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    :root *, :root *::before, :root *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Oeffentliche Bestellseite: breiter als Login/Registrierung, Paketkarten nebeneinander. */
body.auth-page[data-route^="order"] .auth-shell { width: min(100%, 760px); }
.plan-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.plan-choice legend { font-weight: 700; margin-bottom: 8px; }
.plan-card { position: relative; display: grid; gap: 6px; padding: 16px 16px 16px 44px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
:root .form .plan-card input[type="radio"] { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; margin: 0; }
.plan-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-name { font-weight: 700; }
.plan-price { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.plan-desc { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.order-summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 18px; }
.order-summary dt { color: var(--text-dim); }
.order-summary dd { margin: 0; overflow-wrap: anywhere; }
/* Jahresabo (27.09.2026): beide Preise stehen immer als Text in der Karte
   (ohne JavaScript verstaendlich); CSS hebt nur den zur gewaehlten
   Zahlungsweise passenden Preis hervor. */
.plan-price-year { font-size: 15px; font-weight: 700; }
.plan-price-note { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.order-form:has(input[name="billing_interval"][value="year"]:checked) .plan-price-year { font-size: 22px; font-weight: 800; }
.order-form:has(input[name="billing_interval"][value="year"]:checked) .plan-price-month { font-size: 15px; font-weight: 700; }
.order-brand-note { margin: 0 0 6px; color: var(--text-dim); font-size: 13px; font-weight: 600; }
/* Hosting-Pakete (Admin): Monats- und Jahrespreis nebeneinander. */
.admin-form-row-head.plan-price-head { grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.6fr) minmax(110px, 0.6fr) auto; }
@media (max-width: 620px) {
    .admin-form-row-head.plan-price-head { grid-template-columns: 1fr; }
}

.assistant-answer { padding: 14px 16px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); line-height: 1.6; overflow-wrap: anywhere; }
