/* 2026-11-17: Chat ohne Seitentitel (mehr Höhe, kleinere Schrift) und kompaktere Automatic-Seite. */

/* --- Chat --- */
.portal-shell:not(.admin-shell):has(.customer-orders) .content { grid-template-rows: minmax(0, 1fr); max-width: 1160px; }
.portal-shell:not(.admin-shell) .customer-orders .whatsapp-chat-header { min-height: 52px; padding: 10px 18px; }
.portal-shell:not(.admin-shell) .customer-orders .whatsapp-chat-header h2 { font-size: 15px; }
.portal-shell:not(.admin-shell) .customer-orders .whatsapp-chat-header p { font-size: 11.5px; }
.portal-shell:not(.admin-shell) .whatsapp-chat .chat-message { padding: 9px 12px; }
.portal-shell:not(.admin-shell) .whatsapp-chat .chat-message p { font-size: 13px; line-height: 1.55; }
.portal-shell:not(.admin-shell) .whatsapp-chat .chat-message-meta { font-size: 10px; margin-bottom: 3px; }
.portal-shell:not(.admin-shell) .is-chat-composer.customer-command textarea { font-size: 13.5px; }

/* Vorschau-Hinweis hatte im Chat/Automatic kein Innenabstand -> Text wurde am Rand abgeschnitten. */
.portal-shell .whatsapp-chat .preview-write-notice,
.portal-shell .automatic-guided .preview-write-notice { margin: 0; padding: 14px 18px; gap: 18px; }
.portal-shell .automatic-guided .preview-write-notice { border-radius: 14px; }
.portal-shell :is(.whatsapp-chat, .automatic-guided) .preview-write-notice h2 { margin: 2px 0 4px; font-size: 15px; }
.portal-shell :is(.whatsapp-chat, .automatic-guided) .preview-write-notice p:last-child { font-size: 12.5px; line-height: 1.5; }
.portal-shell :is(.whatsapp-chat, .automatic-guided) .preview-write-notice .eyebrow { font-size: 10px; }
.portal-shell :is(.whatsapp-chat, .automatic-guided) .preview-write-notice .primary-button { min-height: 40px; padding: 9px 16px; font-size: 13px; }

@media (max-width: 780px) {
  .portal-shell:not(.admin-shell) .whatsapp-chat .chat-message p { font-size: 14px; line-height: 1.55; }
  .portal-shell:not(.admin-shell) .is-chat-composer.customer-command textarea { font-size: 16px; }
}

/* --- Automatic --- */
.portal-shell:has(.automatic-guided) .page-heading { margin-bottom: 16px; }
.portal-shell:has(.automatic-guided) .page-heading h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); }
.portal-shell:has(.automatic-guided) .page-heading p { margin-top: 4px; font-size: .9rem; }
.automatic-guided { gap: 14px; }
.automatic-guided > .workspace { padding: 18px 20px; }

.automatic-guided .automatic-use-cases > .section-header { margin-bottom: 12px; }
.automatic-guided .automatic-use-cases > .section-header h2 { font-size: 16px; }
.automatic-guided .automatic-use-cases > .section-header p { font-size: 12.5px; }
.automatic-guided .automatic-use-case-grid { gap: 10px; }
.automatic-guided .automatic-use-case { gap: 8px; padding: 14px; border-radius: 13px; }
.automatic-guided .automatic-use-case h3 { font-size: 15px; }
.automatic-guided .automatic-use-case > p { font-size: 12px; line-height: 1.5; }
.automatic-guided .automatic-use-case .automatic-use-case-result { padding-top: 8px; font-size: 12px; }
.automatic-guided .automatic-use-case-action > button { min-height: 38px; }

.automatic-guided .automatic-history .section-header h2 { font-size: 16px; }
.automatic-guided .automatic-history .section-header p { font-size: 12.5px; }
.automatic-guided .automatic-workflow-list { margin-top: 12px; gap: 10px; }
.automatic-guided .automatic-workflow-head { padding: 14px 16px 8px; }
.automatic-guided .automatic-workflow-head h3 { font-size: 14px; }
.automatic-guided .automatic-command { padding: 0 16px 10px; }
.automatic-run-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-width: 0; padding: 0 16px 10px; }
.automatic-run-row .quiet-button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.automatic-guided .automatic-provider-row { padding: 0 16px 10px; }
.automatic-guided .automatic-plan { margin: 0 16px; }
.automatic-guided .automatic-plan summary { padding: 9px 0; }
.automatic-guided .automatic-engine-note { margin: 10px 16px 0; }
.automatic-guided .automatic-card-footer { margin-top: 10px; padding: 10px 16px; }
.automatic-guided .automatic-card-footer .primary-button { min-height: 38px; padding: 8px 16px; font-size: 13px; }

.automatic-guided .automatic-step-heading { gap: 12px; margin-bottom: 14px; align-items: center; }
.automatic-guided .automatic-step-heading > span { flex-basis: 30px; height: 30px; font-size: 12px; }
.automatic-guided .automatic-step-heading h2 { margin: 0 0 4px; font-size: 16px; }
.automatic-guided .automatic-step-heading p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.automatic-guided .automatic-app-step .automatic-step-heading > div > p:first-child { margin-bottom: 2px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.automatic-guided .automatic-step-heading > strong { font-size: 18px; text-align: right; }
.automatic-guided .automatic-step-heading strong small { font-size: 10px; }
.automatic-guided .automatic-case-grid { gap: 10px; margin-bottom: 14px; }
.automatic-guided .automatic-case-card { padding: 14px; }
.automatic-guided .automatic-case-card small { margin: 6px 0; font-size: 12px; }
.automatic-guided .automatic-app-grid { gap: 10px; }
.automatic-guided .automatic-app-card { padding: 12px; gap: 10px; }
.automatic-guided .automatic-app-setup > summary { min-height: 40px; }
.automatic-guided .automatic-customer-requests h2 { font-size: 16px; }
.automatic-guided .automatic-customer-requests p { font-size: 12.5px; }

@media (max-width: 600px) {
  .automatic-guided > .workspace { padding: 14px; }
  .automatic-guided .automatic-step-heading > strong { margin-left: 42px; text-align: left; }
  .portal-shell .automatic-guided .preview-write-notice, .portal-shell .whatsapp-chat .preview-write-notice { padding: 12px 14px; }
}
.automatic-guided .automatic-history > .section-header { padding: 0 0 12px; margin: 0; }
.automatic-guided .automatic-app-setup > summary { font-size: 14px; padding-block: 9px; }
.automatic-guided .automatic-workflow-head h3 { max-width: none; }

/* 2026-11-18: Runde 2 – einheitliche Größen, Übersicht, schlankere Bereiche. */

/* Vorschau-Hinweis überall mit Innenabstand (vorher nur Chat/Automatic). */
.portal-shell .preview-write-notice { padding: 14px 18px; gap: 18px; border-radius: 16px; }
.portal-shell .preview-write-notice h2 { margin: 2px 0 4px; font-size: 15px; }
.portal-shell .preview-write-notice p:last-child { font-size: 12.5px; line-height: 1.5; }
.portal-shell .preview-write-notice .eyebrow { font-size: 10px; }
.portal-shell .preview-write-notice .primary-button { min-height: 40px; padding: 9px 16px; font-size: 13px; }

/* Einheitliche Typo-Skala im Kundenportal */
.portal-shell:not(.admin-shell) .page-heading { margin-bottom: 16px; }
.portal-shell:not(.admin-shell) .page-heading h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); }
.portal-shell:not(.admin-shell) .page-heading p { margin-top: 4px; font-size: .9rem; }
.portal-shell:not(.admin-shell) .content .workspace > .section-header h2 { font-size: 16px; }
.portal-shell:not(.admin-shell) .content .workspace > .section-header p { font-size: 12.5px; line-height: 1.5; }
.portal-shell:not(.admin-shell) .content details.workspace > summary { font-size: 14px; font-weight: 650; cursor: pointer; }
.portal-shell:not(.admin-shell) .marketing-event-card h3 { font-size: 15px; }
.portal-shell:not(.admin-shell) .marketing-event-card > p { font-size: 13px; line-height: 1.55; }
.portal-shell:not(.admin-shell) .marketing-event-actions { align-items: center; gap: 8px; }
.portal-shell:not(.admin-shell) .marketing-event-actions button { font-size: 12.5px; min-height: 38px; padding: 8px 14px; }
.portal-shell:not(.admin-shell) .connection-card p { font-size: 12.5px; line-height: 1.5; }
.portal-shell:not(.admin-shell) .connection-card-action .secondary-button,
.portal-shell:not(.admin-shell) .connection-card-action .quiet-button { font-size: 12px; }
.portal-shell:not(.admin-shell) .more-link-list strong { font-size: 14px; }

/* Übersicht */
.customer-overview { display: grid; gap: 14px; }
.customer-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.customer-overview-tile { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 16px 18px; border: 1px solid rgba(237, 225, 255, .12); border-radius: 16px; background: rgba(37, 29, 49, .72); color: #faf8ff; font: inherit; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.customer-overview-tile:hover { border-color: rgba(203, 168, 237, .5); background: rgba(52, 40, 68, .8); }
.customer-overview-tile:focus-visible { outline: 2px solid #cba8ed; outline-offset: 2px; }
.customer-overview-label { display: flex; align-items: center; gap: 8px; color: #c3bcce; font-size: 12px; font-weight: 600; }
.customer-overview-label svg { width: 16px; height: 16px; }
.customer-overview-tile strong { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.customer-overview-tile small { color: #c3bcce; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.customer-overview-tile.needs-attention { border-color: rgba(203, 168, 237, .55); background: rgba(73, 46, 103, .7); }
.customer-overview-tile.needs-attention strong { color: #e0c4ff; }
.customer-overview-care { display: flex; align-items: center; gap: 8px; margin: 0; color: #c3bcce; font-size: 12.5px; }
.customer-overview-care strong { color: #faf8ff; }
@media (max-width: 900px) { .customer-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .customer-overview-tile { padding: 14px; } .customer-overview-tile strong { font-size: 22px; } }

/* Verbindungen: nicht verfügbare Anbieter kompakt */
.connection-unavailable { color: #a99fb6; font-size: 12px; }
.connection-later { margin-top: 10px; border-top: 1px solid rgba(237, 225, 255, .1); }
.connection-later > summary { padding: 10px 2px; color: #c3bcce; font-size: 13px; font-weight: 600; cursor: pointer; }
.connection-later ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; margin: 0 0 6px; padding: 0; list-style: none; }
.connection-later li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 2px 10px; padding: 8px 10px; border: 1px solid rgba(237, 225, 255, .09); border-radius: 12px; }
.connection-later li .connection-logo { grid-row: 1 / 3; width: 26px; height: 26px; }
.connection-later li .connection-logo :is(img, svg) { width: 16px; height: 16px; }
.connection-later li strong { font-size: 12.5px; }
.connection-later li small { color: #a99fb6; font-size: 11px; }
/* Dunkle Markenlogos (z. B. OpenAI) auf dunklem Grund sichtbar machen */
.portal-shell .connection-logo:has(> img) { background: #f6f2fb; }

/* Motion: Beispiele eingeklappt */
.motion-showcase-toggle { margin-top: 14px; border: 1px solid rgba(237, 225, 255, .12); border-radius: 16px; }
.motion-showcase-toggle > summary { padding: 14px 18px; color: #e0c4ff; font-size: 14px; font-weight: 650; cursor: pointer; }
.motion-showcase-toggle[open] > summary { border-bottom: 1px solid rgba(237, 225, 255, .1); }

/* Socialme: Pakete eingeklappt, leerer Medienbereich ohne schwarze Fläche */
.socialme-plans-toggle { border: 1px solid rgba(237, 225, 255, .12); border-radius: 16px; background: rgba(37, 29, 49, .55); }
.socialme-plans-toggle > summary { padding: 14px 18px; color: #e0c4ff; font-size: 14px; font-weight: 650; cursor: pointer; }
.socialme-plans-toggle[open] > summary { border-bottom: 1px solid rgba(237, 225, 255, .1); }
.portal-shell .socialme-platform-composer:has(.sm-tabs:empty):has(.sm-media-list:empty) { padding: 0; border: 0; background: transparent; min-height: 0; gap: 4px; }
.portal-shell .socialme-platform-composer:has(.sm-tabs:empty):has(.sm-media-list:empty) .sm-note { margin: 0; color: #a99fb6; font-size: 11.5px; }
#client-push-toggle[hidden] { display: none !important; }
.portal-shell:not(.admin-shell) .connection-note { padding: 12px 18px 16px; margin: 0; font-size: 12px; color: #a99fb6; }

/* Automatic Agent */
.automatic-agent .section-header { padding: 0 0 12px; margin: 0; border: 0; }
.automatic-agent-form { display: grid; gap: 12px; }
.automatic-agent-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.automatic-agent-app { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(237, 225, 255, .14); border-radius: 12px; cursor: pointer; }
.automatic-agent-app input { accent-color: #9b5de5; }
.automatic-agent-app strong { display: block; font-size: 13.5px; }
.automatic-agent-app small { display: block; color: #c3bcce; font-size: 11.5px; }
.automatic-agent-app:has(input:checked) { border-color: #cba8ed; background: rgba(73, 46, 103, .55); }
.automatic-agent-app.is-off { opacity: .7; cursor: default; flex-direction: column; align-items: flex-start; gap: 2px; }
.automatic-agent-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.automatic-agent-examples[hidden] { display: none; }
.automatic-agent-examples .quiet-button { min-height: 32px; padding: 6px 10px; font-size: 12px; border: 1px solid rgba(237, 225, 255, .12); border-radius: 999px; }
.automatic-agent-submit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.automatic-agent-submit small, .automatic-agent-soon, .automatic-agent-safety { color: #a99fb6; font-size: 12px; }
.automatic-agent-soon { margin: 12px 0 0; }
.automatic-agent-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; font-size: 13px; }
.automatic-agent-list { display: grid; gap: 12px; margin-top: 16px; }
.automatic-agent-card { display: grid; gap: 10px; padding: 16px; border: 1px solid rgba(237, 225, 255, .12); border-radius: 16px; background: rgba(37, 29, 49, .6); }
.automatic-agent-card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.automatic-agent-card > header time { color: #a99fb6; font-size: 11px; }
.automatic-agent-card h3 { margin: 0; font-size: 15px; }
.automatic-agent-goal { margin: 0; color: #c3bcce; font-size: 12.5px; }
.automatic-agent-summary { margin: 0; font-size: 13px; line-height: 1.55; }
.automatic-agent-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.automatic-agent-facts dt { color: #a99fb6; font-size: 11px; }
.automatic-agent-facts dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.automatic-agent-preview > summary { cursor: pointer; color: #e0c4ff; font-size: 13px; font-weight: 650; padding: 4px 0; }
.automatic-agent-mail { width: 100%; height: 560px; margin-top: 8px; border: 0; border-radius: 12px; background: #fff; }
.automatic-agent-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.automatic-agent-revise { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.automatic-agent-revise .field { flex: 1 1 260px; margin: 0; }
@media (max-width: 620px) { .automatic-agent-facts { grid-template-columns: 1fr; } .automatic-agent-mail { height: 460px; } }

/* Automatic: Einstieg + Gruppen (2026-11-19) */
.automatic-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 18px; border: 1px solid rgba(237, 225, 255, .12); border-radius: 16px; background: rgba(37, 29, 49, .55); }
.automatic-intro-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.automatic-intro-steps li { display: flex; align-items: center; gap: 10px; }
.automatic-intro-steps b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(203, 168, 237, .18); color: #e0c4ff; font-size: 12px; }
.automatic-intro-steps strong { display: block; color: #faf8ff; font-size: 13px; }
.automatic-intro-steps small { display: block; color: #a99fb6; font-size: 11px; }
.automatic-intro-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: #c3bcce; font-size: 12.5px; }
.automatic-intro-plan strong { color: #faf8ff; }
.automatic-intro-plan .quiet-button { min-height: 32px; padding: 6px 12px; font-size: 12px; border: 1px solid rgba(237, 225, 255, .16); border-radius: 999px; }
.automatic-group-title { margin: 10px 2px 0; color: #faf8ff; font-size: 16px; }
.automatic-group-title small { display: block; margin-top: 2px; color: #a99fb6; font-size: 12px; font-weight: 400; }
.automatic-more-services { padding: 0 !important; }
.automatic-more-services > summary { display: grid; gap: 2px; padding: 14px 18px; cursor: pointer; }
.automatic-more-services > summary strong { color: #faf8ff; font-size: 14px; }
.automatic-more-services > summary small { color: #a99fb6; font-size: 12px; }
.automatic-more-services[open] > summary { border-bottom: 1px solid rgba(237, 225, 255, .1); }
.automatic-more-services > .workspace { margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.automatic-paywall-head h2 { margin: 0 0 4px; font-size: 18px; }
.automatic-paywall-head p { margin: 0 0 10px; color: #c3bcce; font-size: 13px; line-height: 1.55; }
