/* Connect Admin Toolbox - Ergänzungen zum zentralen Capita Design-System. */

.hidden { display: none !important; }

code {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 2px 6px;
}

/* Anmeldung */
.at-center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.at-auth-card {
  width: min(500px, 100%); padding: 44px 48px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.at-auth-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -.025em; margin: 5px 0 12px; }
.at-auth-card p { color: var(--muted); line-height: 1.6; margin: 0 auto 26px; max-width: 390px; }
.at-kicker,.at-eyebrow { color: var(--accent); font-size: 10.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

/* Navigation */
.at-user { color: var(--muted); font-size: 13px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-upcoming-label { margin-top: 14px; }
.at-nav-planned {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  color: rgba(195,206,228,.47); font-size: 13px; border-radius: var(--r-sm);
}
.at-nav-planned svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; fill: none; flex: none; }
.at-nav-planned small { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.at-mobile-nav { display: none; }

/* Seitenkopf */
.at-page-head { align-items: center; }
.at-page-head .at-eyebrow { margin-bottom: 5px; }
.at-page-head > .cui-btn { flex: none; white-space: nowrap; }
.at-page-head .cui-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Übersicht */
.at-env-banner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  border: 1px solid color-mix(in srgb, var(--info) 28%, var(--border));
  background: color-mix(in srgb, var(--info-bg) 65%, var(--surface));
  border-radius: var(--radius); padding: 14px 17px; margin-bottom: 18px;
}
.at-env-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--info); background: var(--surface); border: 1px solid color-mix(in srgb, var(--info) 25%, var(--border)); border-radius: var(--r-sm); }
.at-env-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.at-env-banner strong { display: block; font-size: 13px; }
.at-env-banner span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.at-env-banner code { background: color-mix(in srgb, var(--surface) 72%, transparent); white-space: nowrap; }
.at-env-banner.at-env-production { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); background: color-mix(in srgb, var(--bad-bg) 70%, var(--surface)); }
.at-env-banner.at-env-production .at-env-icon { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }
.at-stats { margin-bottom: 27px; }
.at-stats .cui-stat span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-stats .at-format-stat { font-size: 23px; padding-top: 4px; }
.at-stats .at-date-stat { font-family: var(--mono); font-size: 16px; line-height: 1.7; padding-top: 4px; }
.at-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.at-tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.at-tool-card {
  position: relative; display: flex; align-items: flex-start; gap: 16px; padding: 21px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.at-tool-featured { grid-column: 1 / -1; align-items: center; border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--accent-soft) 55%, var(--surface))); }
.at-tool-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--accent); background: var(--accent-soft); }
.at-tool-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.at-tool-copy { flex: 1; min-width: 0; }
.at-card-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.at-card-title-row h3 { font-size: 15px; }
.at-tool-copy p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 7px; }
.at-tool-copy ul { display: flex; flex-wrap: wrap; gap: 15px; list-style: none; margin-top: 10px; }
.at-tool-copy li { position: relative; color: var(--ink-2); font-size: 11.5px; padding-left: 12px; }
.at-tool-copy li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.at-tool-planned { min-height: 145px; }
.at-tool-planned .at-tool-icon { color: var(--muted); background: var(--surface-3); }

/* Stepper */
.at-stepper {
  display: grid; grid-template-columns: repeat(4,1fr); list-style: none; margin: 0 0 18px;
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.at-stepper li { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--muted); }
.at-stepper li:not(:last-child)::after { content: ""; position: absolute; top: 0; right: 0; height: 100%; border-right: 1px solid var(--border); }
.at-stepper li > span { width: 25px; height: 25px; display: grid; place-items: center; flex: none; border: 1px solid var(--border); border-radius: 50%; font-family: var(--mono); font-size: 11px; font-weight: 700; }
.at-stepper strong { display: block; color: var(--ink-2); font-size: 12.5px; }
.at-stepper small { display: block; font-size: 10.5px; }
.at-stepper li.active { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.at-stepper li.active > span,.at-stepper li.complete > span { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
:root[data-theme="dark"] .at-stepper li.active > span,:root[data-theme="dark"] .at-stepper li.complete > span { color: var(--on-accent); }
.at-stepper li.active strong { color: var(--accent-dark); }
:root[data-theme="dark"] .at-stepper li.active strong { color: var(--accent); }

/* Studio */
.at-studio-layout { display: grid; grid-template-columns: minmax(0,1fr) 318px; gap: 18px; align-items: start; }
.at-studio-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.at-output-column { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 78px; }
.at-work-card { overflow: hidden; }
.at-work-card .cui-card-h > div { display: flex; align-items: center; gap: 9px; }
.at-card-index { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 6px; border-radius: var(--r-xs); }
.at-disabled-card { opacity: .56; }
.at-disabled-card > * { pointer-events: none; }
.at-disabled-card .cui-card-h { background: var(--surface-2); }
.at-mono-muted { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* Quelle */
.at-source-tabs {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; padding: 5px; margin-bottom: 15px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
}
.at-source-tabs button {
  min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px;
  border: 1px solid transparent; border-radius: var(--r-xs); color: var(--muted); background: transparent;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.at-source-tabs button:hover { color: var(--ink-2); }
.at-source-tabs button.active { color: var(--accent-dark); border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .at-source-tabs button.active { color: var(--accent); }
.at-source-tabs svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.at-source-panel { min-width: 0; }
.at-drop-zone {
  min-height: 174px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius); background: color-mix(in srgb, var(--accent-soft) 26%, var(--surface-2));
  cursor: pointer; outline: none; transition: border-color var(--dur), background var(--dur), transform var(--dur);
}
.at-drop-zone:hover,.at-drop-zone:focus,.at-drop-zone.dragging { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface)); }
.at-drop-zone.dragging { transform: scale(.997); }
.at-drop-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--accent); background: var(--surface); border: 1px solid var(--border); border-radius: 50%; box-shadow: var(--shadow-sm); margin-bottom: 11px; }
.at-drop-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.at-drop-zone strong { font-size: 14px; }
.at-drop-zone > span { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.at-record-panel {
  min-height: 174px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 18px;
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.at-record-panel > div:nth-child(2) strong,.at-record-panel > div:nth-child(2) span { display: block; }
.at-record-panel > div:nth-child(2) strong { font-size: 14px; }
.at-record-panel > div:nth-child(2) span { max-width: 430px; margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.at-record-panel .cui-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.at-record-visual { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; gap: 3px; color: var(--accent); border: 1px solid var(--border); border-radius: 50%; background: var(--surface); }
.at-record-visual span { width: 3px; border-radius: 3px; background: currentColor; }
.at-record-visual span:nth-child(1),.at-record-visual span:nth-child(5) { height: 10px; }
.at-record-visual span:nth-child(2),.at-record-visual span:nth-child(4) { height: 22px; }
.at-record-visual span:nth-child(3) { height: 32px; }
.at-polly-intro { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--info) 25%, var(--border)); border-radius: var(--r-sm); background: color-mix(in srgb, var(--info-bg) 55%, var(--surface)); }
.at-polly-intro > div:nth-child(2) { flex: 1; min-width: 0; }
.at-polly-intro strong,.at-polly-intro span { display: block; }
.at-polly-intro strong { font-size: 13px; }
.at-polly-intro > div:nth-child(2) span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.at-polly-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 25%, var(--border)); border-radius: var(--r-xs); background: var(--surface); }
.at-polly-mark svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.at-polly-grid { display: grid; grid-template-columns: .75fr 1.45fr 1fr 1fr; gap: 12px; margin-top: 15px; }
.at-polly-text-field { margin-top: 13px; }
.at-label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.at-label-row > span { color: var(--muted); font-family: var(--mono); font-size: 10px; }
#polly-text { width: 100%; min-height: 140px; height: auto; padding: 11px 12px; resize: vertical; line-height: 1.55; font-family: inherit; }
#polly-text.at-code-input { font-family: var(--mono); font-size: 12px; }
.at-polly-text-help { min-height: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.at-inline-error { display: block; min-height: 16px; margin-top: 2px; color: var(--bad); font-size: 10.5px; line-height: 1.35; }
.at-text-button { flex: none; border: 0; padding: 0; color: var(--accent-dark); background: none; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
:root[data-theme="dark"] .at-text-button { color: var(--accent); }
.at-polly-action-row { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; margin-top: 12px; }
.at-polly-action-row > .cui-btn { min-width: 210px; justify-content: center; }
.at-polly-action-row > .cui-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.at-cost-box { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.at-cost-box span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.at-cost-box strong { grid-row: 1 / span 2; grid-column: 2; color: var(--ink-2); font-family: var(--mono); font-size: 13px; }
.at-cost-box small { color: var(--muted); font-size: 10.5px; }
.at-polly-notice { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 6px 9px; margin-top: 12px; padding: 9px 11px; border-left: 3px solid var(--warn); border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--warn-bg); color: var(--warn-ink); font-size: 10.5px; line-height: 1.45; }
.at-polly-notice a { color: inherit; font-weight: 700; white-space: nowrap; }
#polly-status { display: block; min-height: 18px; margin-top: 7px; }
.at-source-details { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; margin-top: 13px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.at-source-details > div { display: flex; align-items: center; min-width: 0; gap: 10px; }
.at-source-details strong,.at-source-details span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-source-details strong { font-size: 12.5px; }
.at-source-details span { color: var(--muted); font-size: 11px; }
.at-file-icon { width: 32px; height: 32px; display: grid !important; place-items: center; color: var(--accent) !important; border-radius: var(--r-xs); background: var(--accent-soft); flex: none; }
.at-file-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.at-recording { color: var(--bad) !important; border-color: color-mix(in srgb, var(--bad) 35%, var(--border)) !important; }

/* Waveform und Optionen */
.at-wave-wrap { position: relative; height: 150px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); isolation: isolate; }
#waveform { position: relative; z-index: 1; display: block; width: 100%; height: 150px; }
.at-wave-excluded { position: absolute; z-index: 2; top: 0; bottom: 0; width: 0; pointer-events: none; background: rgba(5,12,25,.62); }
#wave-trim-before { left: 0; }
#wave-trim-after { right: 0; }
.at-wave-selection { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 100%; pointer-events: none; border-block: 2px solid color-mix(in srgb, var(--accent) 72%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.at-wave-handle { position: absolute; z-index: 4; top: 0; bottom: 0; width: 44px; margin-left: -22px; color: var(--accent); cursor: ew-resize; touch-action: none; outline: none; user-select: none; }
.at-wave-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: currentColor; box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 42%, transparent); }
.at-wave-grip { position: absolute; top: 50%; left: 50%; width: 20px; height: 43px; display: flex; align-items: center; justify-content: center; gap: 3px; transform: translate(-50%,-50%); border: 1px solid color-mix(in srgb, var(--accent) 75%, var(--border)); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-sm); }
.at-wave-grip i { width: 1px; height: 15px; display: block; border-radius: 1px; background: currentColor; }
.at-wave-time { position: absolute; top: 8px; min-width: 55px; padding: 3px 6px; color: var(--ink-2); border: 1px solid var(--border); border-radius: var(--r-xs); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow-sm); font-family: var(--mono); font-size: 9.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.at-wave-handle-start .at-wave-time { left: 27px; }
.at-wave-handle-end .at-wave-time { right: 27px; }
.at-wave-handle-start.is-near-end .at-wave-time { right: 27px; left: auto; }
.at-wave-handle-end.is-near-start .at-wave-time { right: auto; left: 27px; }
.at-wave-handle-start.is-tight .at-wave-time { right: 27px; left: auto; }
.at-wave-handle-end.is-tight .at-wave-time { right: auto; left: 27px; }
.at-wave-handle:hover .at-wave-grip,.at-wave-handle:focus-visible .at-wave-grip,.at-wave-wrap.is-dragging .at-wave-handle.is-active .at-wave-grip { color: var(--on-accent); border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.at-wave-handle:focus-visible { z-index: 5; }
.at-wave-wrap.is-dragging { cursor: ew-resize; }
.at-wave-wrap.is-dragging .at-wave-selection { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.at-wave-empty { position: absolute; z-index: 6; inset: 0; display: grid; place-items: center; color: var(--faint); background: var(--surface-2); font-size: 12px; }
.at-wave-help { margin: 7px 1px 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.at-play-row { display: flex; align-items: center; gap: 12px; margin: 11px 0 17px; min-height: 30px; }
.at-play-row svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.at-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.at-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 63px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.at-option > span:first-child { min-width: 0; }
.at-option strong,.at-option small { display: block; }
.at-option strong { color: var(--ink-2); font-size: 12.5px; }
.at-option small { color: var(--muted); font-size: 10.5px; line-height: 1.35; margin-top: 2px; }
.at-option-wide { min-height: 68px; }

/* Metadaten */
.at-mono-input { font-family: var(--mono); font-size: 12.5px; }
.at-field-help { color: var(--muted); font-size: 10.5px; }
#metadata-card { position: relative; z-index: 6; overflow: visible; }
.at-project-picker { position: relative; min-width: 0; }
.at-project-control { position: relative; }
.at-project-control .cui-input { width: 100%; padding-right: 38px; }
.at-project-toggle { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 36px; display: grid; place-items: center; border: 0; border-left: 1px solid transparent; border-radius: 0 var(--r-xs) var(--r-xs) 0; color: var(--muted); background: transparent; cursor: pointer; }
.at-project-toggle:hover,.at-project-picker.is-open .at-project-toggle { color: var(--accent-dark); background: var(--surface-2); }
:root[data-theme="dark"] .at-project-toggle:hover,:root[data-theme="dark"] .at-project-picker.is-open .at-project-toggle { color: var(--accent); }
.at-project-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform var(--dur); }
.at-project-picker.is-open .at-project-toggle svg { transform: rotate(180deg); }
.at-project-options { position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; right: 0; max-height: 292px; overflow-y: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-lg); }
.at-project-option { width: 100%; min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 0; border-radius: var(--r-xs); color: var(--ink-2); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.at-project-option span { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.at-project-option small { flex: none; min-width: 32px; padding: 2px 5px; border-radius: 4px; color: var(--muted); background: var(--surface-3); font-family: var(--mono); font-size: 8.5px; font-weight: 800; text-align: center; }
.at-project-option:hover,.at-project-option.is-active,.at-project-option[aria-selected="true"] { color: var(--accent-dark); background: var(--accent-soft); }
:root[data-theme="dark"] .at-project-option:hover,:root[data-theme="dark"] .at-project-option.is-active,:root[data-theme="dark"] .at-project-option[aria-selected="true"] { color: var(--accent); }
.at-project-empty { padding: 20px 12px; color: var(--muted); font-size: 11.5px; text-align: center; }
.at-name-preview,.at-target { display: flex; flex-direction: column; gap: 6px; margin-top: 17px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.at-name-preview > span,.at-target > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.at-name-preview code,.at-target code { border: 0; background: none; padding: 0; color: var(--accent-dark); overflow-wrap: anywhere; }
:root[data-theme="dark"] .at-name-preview code,:root[data-theme="dark"] .at-target code { color: var(--accent); }
.at-mapping-block { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.at-mapping-block .at-option { background: transparent; }
#mapping-fields { margin-top: 14px; }

/* Ausgabe und Publish */
.at-output-card,.at-publish-card { overflow: hidden; }
.at-output-placeholder { min-height: 175px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; color: var(--faint); }
.at-output-placeholder svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.45; }
.at-output-placeholder p { max-width: 210px; font-size: 11.5px; line-height: 1.5; }
.at-format-seal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; margin-bottom: 14px; color: var(--ok-ink); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--border)); border-radius: var(--r-sm); background: var(--ok-bg); }
.at-format-seal strong,.at-format-seal span { display: block; }
.at-format-seal strong { font-size: 12.5px; }
.at-format-seal span { font-size: 10px; opacity: .8; }
.at-format-seal svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.at-output-facts { margin: 0 0 14px; }
.at-output-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.at-output-facts dt { color: var(--muted); font-size: 11px; }
.at-output-facts dd { font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-align: right; }
.at-full-button { width: 100%; justify-content: center; margin-top: 8px; }
.at-full-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.at-target { margin-top: 0; }
.at-check-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 15px 0; }
.at-check-list li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.at-check-list li > span { width: 14px; height: 14px; border: 1px solid var(--border); border-radius: 50%; flex: none; }
.at-check-list li.ok { color: var(--ink-2); }
.at-check-list li.ok > span { position: relative; background: var(--ok); border-color: var(--ok); }
.at-check-list li.ok > span::after { content: ""; position: absolute; width: 5px; height: 2px; left: 3px; top: 4px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: rotate(-45deg); }
.at-safety-note { padding: 10px 11px; margin: 12px 0; border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.at-safety-note strong,.at-safety-note span { display: block; color: var(--warn-ink); font-size: 10.5px; }
.at-safety-note span { margin-top: 2px; opacity: .86; line-height: 1.4; }
.at-publish-status { display: block; min-height: 18px; color: var(--muted); font-size: 10.5px; text-align: center; margin-top: 8px; }
.at-publish-status.error { color: var(--bad); }

/* Library und Verlauf */
#section-library > .cui-card { overflow: visible; }
.at-library-head { flex-wrap: wrap; }
.at-table-tools { display: flex; gap: 8px; align-items: center; }
.at-project-picker-library { width: 285px; }
.at-table-tools .at-project-picker .cui-input { width: 100%; }
.at-library-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 13px; padding: 11px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11.5px; }
.at-library-summary strong { color: var(--ink); }
.at-summary-warn { color: var(--warn-ink); font-weight: 700; }
.at-summary-bad { color: var(--bad); font-weight: 700; }
.at-empty { text-align: center; color: var(--muted); padding: 34px !important; }
.at-file-name { display: block; max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.at-subline { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.at-library-table { min-width: 900px; }
.at-library-table td { vertical-align: top; }
.at-library-table th:nth-child(1) { width: 125px; }
.at-library-table th:nth-child(2),.at-library-table th:nth-child(3) { width: 85px; }
.at-library-table th:nth-child(5) { width: 175px; }
.at-library-table th:last-child { width: 92px; }
.at-announcement-number { color: var(--ink-2); font-weight: 750; }
.at-ssml-preview,.at-value-preview { display: -webkit-box; max-width: 520px; overflow: hidden; color: var(--ink-2); font-family: var(--mono); font-size: 10.5px; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.at-status-stack { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px; }
.at-status-stack .cui-badge { white-space: nowrap; }
.at-table-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Info und Hilfe */
.at-info-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.at-info-flow > div { min-width: 0; padding: 5px 7px; }
.at-info-flow span,.at-info-flow strong,.at-info-flow small { display: block; }
.at-info-flow span { color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; }
.at-info-flow strong { margin-top: 2px; font-size: 12.5px; }
.at-info-flow small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.at-info-flow > svg { width: 18px; height: 18px; fill: none; stroke: var(--border-strong); stroke-width: 1.6; }
.at-info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 18px; }
.at-info-card { min-width: 0; padding: 20px; }
.at-info-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 13px; color: var(--accent); border-radius: var(--r-sm); background: var(--accent-soft); }
.at-info-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.at-info-card h2 { font-size: 14px; }
.at-info-card p { margin-top: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.at-info-card p strong { color: var(--ink-2); }
.at-info-card code { overflow-wrap: anywhere; }
.at-guide-card { overflow: hidden; }
.at-guide-card .cui-card-h > div span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.at-guide-list details { border-bottom: 1px solid var(--line); }
.at-guide-list details:last-child { border-bottom: 0; }
.at-guide-list summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; cursor: pointer; list-style: none; }
.at-guide-list summary::-webkit-details-marker { display: none; }
.at-guide-list summary svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; transition: transform var(--dur); }
.at-guide-list details[open] summary svg { transform: rotate(180deg); }
.at-guide-list details > div { padding: 0 20px 17px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.at-guide-list pre { max-width: 100%; overflow-x: auto; margin-top: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface-2); }
.at-guide-list pre code { padding: 0; border: 0; background: none; white-space: pre; }
.at-doc-links { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 14px 2px 0; color: var(--muted); font-size: 11px; }
.at-doc-links span { margin-right: 4px; font-weight: 700; }
.at-doc-links a { color: var(--accent-dark); }
:root[data-theme="dark"] .at-doc-links a { color: var(--accent); }

/* Kollisionsdialog */
.at-collision-modal { width: min(620px, 94vw); }
.at-collision-modal > .cui-badge { margin-bottom: 10px; }
.at-diff { max-height: 310px; overflow: auto; display: grid; gap: 8px; margin: 15px 0; }
.at-diff-row { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface-2); }
.at-diff-row span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.at-diff-row code { overflow-wrap: anywhere; white-space: pre-wrap; }
.at-confirm-check { display: flex; gap: 9px; align-items: flex-start; margin: 16px 0; color: var(--ink-2); font-size: 12px; }
.at-confirm-check input { margin-top: 2px; accent-color: var(--accent); }

/* Toast */
.cui-toast.err { border-left-color: var(--bad); }
.cui-toast.warn { border-left-color: var(--warn); }

@media (max-width: 1100px) {
  .at-studio-layout { grid-template-columns: 1fr; }
  .at-output-column { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .at-stats { grid-template-columns: repeat(2,1fr); }
  .at-polly-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .at-mobile-nav { display: flex; position: sticky; top: 61px; z-index: 19; padding: 8px 16px; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface); }
  .at-mobile-nav button { border: 0; background: transparent; color: var(--muted); padding: 7px 10px; border-radius: var(--r-xs); font-family: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .at-mobile-nav button.active { background: var(--accent-soft); color: var(--accent-dark); }
  .at-tool-grid { grid-template-columns: 1fr; }
  .at-tool-featured { grid-column: auto; align-items: flex-start; flex-wrap: wrap; }
  .at-tool-featured > .cui-btn { margin-left: 60px; }
  .at-info-grid { grid-template-columns: 1fr; }
  .at-info-flow { grid-template-columns: 1fr 1fr; gap: 8px; }
  .at-info-flow > svg { display: none; }
}

@media (max-width: 720px) {
  .cui-content { padding: 20px 16px; }
  .cui-topbar { padding: 11px 16px; }
  .at-user,.cui-crumb { display: none; }
  .at-page-head { align-items: flex-start; flex-direction: column; }
  .at-page-head > .cui-btn { width: 100%; justify-content: center; }
  .at-env-banner { grid-template-columns: auto 1fr; }
  .at-env-banner code { grid-column: 1 / -1; }
  .at-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .at-stepper { grid-template-columns: repeat(4,auto); }
  .at-stepper li { justify-content: center; padding: 10px 6px; }
  .at-stepper li div { display: none; }
  .at-output-column { grid-template-columns: 1fr; }
  .at-edit-grid { grid-template-columns: 1fr; }
  .at-table-tools { width: 100%; }
  .at-project-picker-library { flex: 1; width: auto; min-width: 0; }
  .at-table-tools .cui-input { min-width: 0; }
  .at-record-panel { grid-template-columns: auto 1fr; }
  .at-record-panel > .cui-btn { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .at-polly-action-row { flex-direction: column; }
  .at-polly-action-row > .cui-btn { width: 100%; }
  .at-polly-notice { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .at-auth-card { padding: 34px 24px; }
  .at-stats { grid-template-columns: 1fr; }
  .at-tool-card { flex-direction: column; }
  .at-tool-featured > .cui-btn { margin-left: 0; width: 100%; justify-content: center; }
  .at-source-tabs button { gap: 5px; padding-inline: 5px; font-size: 10.5px; }
  .at-source-tabs svg { display: none; }
  .at-polly-grid { grid-template-columns: 1fr; }
  .at-cost-box { grid-template-columns: 1fr; }
  .at-cost-box strong { grid-row: auto; grid-column: auto; }
  .at-info-flow { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .at-drop-zone { transition: none; }
}
