/* ORCH-COLLAB Styles */

/* === ORCH Design-System: Design-Tokens (Mission 2.0, Finding U-10) === */
:root {
    /* --- Brand --- */
    --orch-deep-blue: #2b4c8c;          /* Primaer / Marke (Buttons, CTAs, M-Akteure) */
    --orch-deep-blue-hover: #1e3a6e;    /* Primaer Hover */
    --orch-deep-blue-rgb: 43, 76, 140;  /* fuer rgba()-Fills */
    --orch-accent-blue: #4a7cc9;        /* Links, interaktive Elemente, K-Akteure */
    --orch-accent-blue-rgb: 74, 124, 201;

    /* --- Neutrals --- */
    --orch-white: #ffffff;
    --orch-neutral-100: #f4f5f8;        /* Seiten-Hintergrund */
    --orch-neutral-150: #e6e8ec;        /* abgeleitet: helle Control-Flaeche */
    --orch-neutral-200: #d0d2d6;        /* Border */
    --orch-neutral-300: #c9ccd2;        /* abgeleitet: Control-Hover / staerkerer Rand */
    --orch-neutral-500: #8a8a9a;        /* Subtext */
    --orch-neutral-900: #3a3a4a;        /* Body-Text */

    /* --- Semantisch --- */
    --orch-green: #2d8c6f;              /* Erfolg / Done */
    --orch-green-rgb: 45, 140, 111;
    --orch-green-dark: #24705a;         /* abgeleitet: dunkler Text / Rand */
    --orch-green-bg: #e4f2ec;           /* abgeleitet: heller Erfolg-Hintergrund */
    --orch-amber: #c4782a;              /* Warnung / In Arbeit */
    --orch-amber-rgb: 196, 120, 42;
    --orch-amber-bg: #fdf0e0;           /* Fragen-Zonen Hintergrund */
    --orch-amber-bg-rgb: 253, 240, 224;
    --orch-amber-text: #6b4115;         /* Fragen-Zonen Text */
    --orch-amber-text-soft: #9a5e1f;    /* Fragen-Zonen Text (weicher) */
    --orch-red: #c45c5c;                /* Fehler / Blocker */
    --orch-red-rgb: 196, 92, 92;
    --orch-red-dark: #9a3b3b;           /* abgeleitet: dunkler Text / Rand */
    --orch-red-bg: #f7e3e3;             /* abgeleitet: heller Fehler-Hintergrund */
    --orch-plum: #8c5a9e;               /* Innovation / Highlight (NICHT fuer K-Akteure) */

    /* --- Semantische Aliase --- */
    --orch-primary: var(--orch-deep-blue);
    --orch-primary-hover: var(--orch-deep-blue-hover);
    --orch-primary-rgb: var(--orch-deep-blue-rgb);
    --orch-bg: var(--orch-neutral-100);
    --orch-surface: var(--orch-white);
    --orch-surface-muted: var(--orch-neutral-100);
    --orch-text: var(--orch-neutral-900);
    --orch-subtext: var(--orch-neutral-500);
    --orch-border: var(--orch-neutral-200);
    --orch-heading: var(--orch-neutral-900);
    --orch-link: var(--orch-accent-blue);
    --orch-k-akteur: var(--orch-accent-blue);
    --orch-k-akteur-rgb: var(--orch-accent-blue-rgb);
    --orch-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);

    /* --- Typografie --- */
    --orch-font-body: 'Source Sans 3', system-ui, sans-serif;
    --orch-font-heading: 'Bitter', Georgia, serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--orch-font-body);
    background: var(--orch-bg);
    color: var(--orch-text);
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--orch-font-heading);
    color: var(--orch-heading);
}

/* Landing Page */
.landing {
    max-width: 780px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.landing h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--orch-subtext);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.landing-card {
    background: var(--orch-surface);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--orch-shadow-card);
    text-align: left;
}

.landing-card h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.landing-card input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--orch-border);
    border-radius: 8px;
    font-size: 1rem;
}

.landing-card button {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--orch-primary);
    color: var(--orch-white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.landing-card button:hover {
    background: var(--orch-primary-hover);
}

/* Board Header */
.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--orch-surface);
    border-bottom: 1px solid var(--orch-border);
    z-index: 100;
}

.board-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.board-id-display {
    font-size: 0.85rem;
    color: var(--orch-subtext);
    background: var(--orch-surface-muted);
    padding: 4px 10px;
    border-radius: 6px;
}

.participants-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.participants-label {
    color: var(--orch-subtext);
}

#participants-list {
    list-style: none;
    display: flex;
    gap: 6px;
}

#participants-list li {
    background: var(--orch-green-bg);
    color: var(--orch-green-dark);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;          /* U-4: Controls brechen um statt am Beamer/Tablet abgeschnitten zu werden */
    gap: 12px;
    padding: 10px 20px;
    background: var(--orch-surface-muted);
    border-bottom: 1px solid var(--orch-border);
}

.toolbar-label {
    font-size: 0.9rem;
    color: var(--orch-subtext);
}

.color-palette {
    display: flex;
    gap: 6px;
}

.color-btn {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.selected {
    border-color: var(--orch-text);
}

.btn-primary {
    padding: 8px 18px;
    background: var(--orch-primary);
    color: var(--orch-white);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
}

.btn-primary:hover {
    background: var(--orch-primary-hover);
}

/* Canvas — large scrollable area */
.canvas {
    position: relative;
    width: 4000px;
    min-height: 3000px;
    overflow: visible;
    background:
        radial-gradient(circle, var(--orch-border) 1px, transparent 1px);
    background-size: 24px 24px;
}

.canvas-wrapper {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 300px;
    overflow: auto;
}

/* Cards */
.card {
    position: absolute;
    width: 180px;
    min-height: 80px;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: box-shadow 0.15s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.card.dragging {
    cursor: grabbing;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    z-index: 999;
    opacity: 0.92;
}

.card-text {
    flex: 1;
    min-height: 40px;
    word-wrap: break-word;
    outline: none;
    cursor: text;
}

.card-text:empty::before {
    content: "Doppelklick zum Schreiben...";
    color: var(--orch-subtext);
    font-style: italic;
    pointer-events: none;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--orch-subtext);
}

.card-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--orch-subtext);
    padding: 0 2px;
    line-height: 1;
}

.card-delete:hover {
    color: var(--orch-red);
}

.card-text[contenteditable="true"] {
    background: rgba(255,255,255,0.6);
    border-radius: 4px;
    padding: 2px 4px;
    cursor: text;
}

/* Secondary Button */
.btn-secondary {
    padding: 8px 18px;
    background: var(--orch-neutral-150);
    color: var(--orch-text);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
}

.btn-secondary:hover {
    background: var(--orch-neutral-300);
}

.btn-question {
    background: var(--orch-amber-bg);
    color: var(--orch-amber-text);
}

.btn-question:hover {
    background: rgba(var(--orch-amber-rgb), 0.22);
}

/* Questions (zone-based) */
.question-zone {
    position: absolute;
    border: 2px dashed rgba(var(--orch-amber-rgb), 0.5);
    border-radius: 16px;
    background: rgba(var(--orch-amber-bg-rgb), 0.5);
    min-width: 400px;
    min-height: 300px;
    z-index: 1;
    pointer-events: auto;
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 14px 14px 0 0;
    background: rgba(var(--orch-amber-bg-rgb), 0.75);
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.question-text {
    font-family: var(--orch-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--orch-amber-text);
    outline: none;
    min-width: 100px;
}

.question-text:empty::before {
    content: "Fragestellung eingeben...";
    color: var(--orch-amber-text-soft);
    font-style: italic;
}

.question-actions {
    display: flex;
    gap: 4px;
}

.question-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--orch-amber-text-soft);
    padding: 0 4px;
    line-height: 1;
}

.question-delete:hover {
    color: var(--orch-red);
}

.question-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(var(--orch-amber-rgb), 0.3) 50%);
    border-radius: 0 0 14px 0;
}

.question-zone.dragging {
    cursor: grabbing;
    opacity: 0.85;
}

/* Clusters */
.cluster {
    position: absolute;
    border: 2px dashed rgba(var(--orch-primary-rgb), 0.4);
    border-radius: 12px;
    min-width: 200px;
    min-height: 150px;
    z-index: 5;
    pointer-events: auto;
}

.cluster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 10px 10px 0 0;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.cluster-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--orch-primary);
    outline: none;
    min-width: 60px;
}

.cluster-name:empty::before {
    content: "Cluster-Name...";
    color: var(--orch-accent-blue);
    font-style: italic;
}

.cluster-actions {
    display: flex;
    gap: 4px;
}

.cluster-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--orch-accent-blue);
    padding: 0 2px;
    line-height: 1;
}

.cluster-delete:hover {
    color: var(--orch-red);
}

.cluster-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(var(--orch-primary-rgb),0.3) 50%);
    border-radius: 0 0 10px 0;
}

.cluster.dragging {
    cursor: grabbing;
    opacity: 0.85;
}

.card {
    z-index: 10;
}

/* K-Akteur Styles */
.k-akteur-card {
    border-left: 3px dashed var(--orch-k-akteur);
}

.ki-badge {
    color: var(--orch-k-akteur);
    font-weight: 600;
    font-size: 0.7rem;
}

.ki-icon {
    display: inline-block;
    background: var(--orch-k-akteur);
    color: var(--orch-white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 2px;
    vertical-align: middle;
}

#participants-list li.k-akteur {
    background: rgba(var(--orch-k-akteur-rgb), 0.15);
    color: var(--orch-deep-blue);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kick-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--orch-k-akteur);
    padding: 0 2px;
    line-height: 1;
    margin-left: 2px;
}

.kick-btn:hover {
    color: var(--orch-red);
}

/* Phase Controls */
.toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--orch-neutral-300);
    margin: 0 4px;
}

.phase-controls {
    display: flex;
    flex-wrap: wrap;          /* U-4: Phasen-Buttons brechen um statt zu ueberlaufen */
    gap: 4px;
}

.phase-btn {
    padding: 6px 12px;
    background: var(--orch-neutral-150);
    color: var(--orch-text);
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.phase-btn:hover {
    background: var(--orch-neutral-300);
}

.phase-btn.active {
    background: var(--orch-primary);
    color: var(--orch-white);
}

.phase-btn[data-phase="blind"].active {
    background: var(--orch-amber);
    color: var(--orch-white);
}

.phase-btn[data-phase="pause"].active {
    background: var(--orch-red);
    color: var(--orch-white);
}

.phase-btn[data-phase="m-only"].active {
    background: var(--orch-green);
    color: var(--orch-white);
}

.phase-btn[data-phase="k-only"].active {
    background: var(--orch-k-akteur);
    color: var(--orch-white);
}

.timer-input {
    width: 50px;
    padding: 6px 8px;
    border: 1px solid var(--orch-border);
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}

.btn-timer {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    margin-left: 4px !important;
}

/* Phase Indicator Bar */
.phase-indicator {
    padding: 8px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.phase-indicator.blind {
    background: var(--orch-amber-bg);
    color: var(--orch-amber-text);
    border-bottom: 2px solid var(--orch-amber);
}

.phase-indicator.pause {
    background: var(--orch-red-bg);
    color: var(--orch-red-dark);
    border-bottom: 2px solid var(--orch-red);
}

.phase-indicator.m-only {
    background: var(--orch-green-bg);
    color: var(--orch-green-dark);
    border-bottom: 2px solid var(--orch-green);
}

.phase-indicator.k-only {
    background: rgba(var(--orch-k-akteur-rgb), 0.15);
    color: var(--orch-deep-blue);
    border-bottom: 2px solid var(--orch-k-akteur);
}

/* Timer Display */
.timer-display {
    padding: 6px 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(var(--orch-primary-rgb), 0.08);
    color: var(--orch-primary);
    border-bottom: 1px solid var(--orch-border);
}

.timer-display.warning {
    background: var(--orch-red-bg);
    color: var(--orch-red);
    animation: timer-blink 1s ease-in-out infinite;
}

@keyframes timer-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timer-display.expired {
    background: var(--orch-red-bg);
    color: var(--orch-red-dark);
    animation: none;
}

/* Participant badges */
.participant-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.participant-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--orch-white);
    flex-shrink: 0;
}

.participant-avatar.human {
    background: var(--orch-green);
}

.participant-avatar.k-akteur {
    background: var(--orch-k-akteur);
}

.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orch-green);
    display: inline-block;
    flex-shrink: 0;
}

/* Card filter */
.card-hidden {
    opacity: 0.1;
    pointer-events: none;
}

/* Full reveal animation */
.card-reveal {
    animation: card-fade-in 0.5s ease-out;
}

@keyframes card-fade-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Sprint 7: Connection-Status, Help, Multi-Select */
.connection-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
}
.connection-status.connected { background: var(--orch-green-bg); color: var(--orch-green-dark); }
.connection-status.connecting { background: var(--orch-amber-bg); color: var(--orch-amber-text-soft); }
.connection-status.offline { background: var(--orch-red-bg); color: var(--orch-red-dark); }

.help-toggle {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1px solid var(--orch-border);
    background: var(--orch-neutral-100);
    color: var(--orch-text);
    font-weight: 700;
    cursor: pointer;
    margin-right: 8px;
}
.help-toggle:hover { background: rgba(var(--orch-primary-rgb), 0.10); color: var(--orch-primary); }

.help-panel {
    position: absolute;
    top: 60px;
    right: 16px;
    width: 460px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--orch-surface);
    border: 1px solid var(--orch-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 0;
}
.help-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--orch-border);
    padding: 6px 8px 0 8px;
    background: var(--orch-neutral-100);
    border-radius: 8px 8px 0 0;
}
.help-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.85rem;
    color: var(--orch-subtext);
}
.help-tab.active { color: var(--orch-primary); border-bottom-color: var(--orch-primary); font-weight: 600; }
.help-close {
    margin-left: auto;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--orch-subtext);
    padding: 0 8px;
}
.help-content {
    display: none;
    padding: 14px 18px;
}
.help-content.active { display: block; }
.help-content h3 { margin-bottom: 10px; font-size: 1.05rem; }
.help-content ul { padding-left: 18px; font-size: 0.9rem; line-height: 1.6; }
.help-content li { margin-bottom: 4px; }
.help-content strong { color: var(--orch-primary); }

/* Multi-Select markers */
.card.selected {
    outline: 2px solid var(--orch-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(var(--orch-primary-rgb),0.15);
}

/* Sprint 8: Pfeile / Verbindungen */
.connections-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 5;
}
.connections-layer line.conn-line,
.connections-layer path.conn-line {
    pointer-events: stroke;
    cursor: pointer;
}
.connections-layer text.conn-label {
    font-size: 12px;
    fill: var(--orch-text);
    pointer-events: auto;
    cursor: pointer;
    paint-order: stroke;
    stroke: var(--orch-white);
    stroke-width: 3px;
    stroke-linejoin: round;
}
body.connect-mode { cursor: crosshair; }
body.connect-mode .card,
body.connect-mode .cluster { cursor: crosshair !important; }
.card.connect-source,
.cluster.connect-source {
    outline: 3px dashed var(--orch-green);
    outline-offset: 3px;
}
.connect-hint {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orch-amber-bg);
    border: 1px solid var(--orch-amber);
    color: var(--orch-amber-text);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.connect-hint a { color: var(--orch-amber-text-soft); margin-left: 8px; }
.connection-edit-popup {
    position: fixed;
    background: var(--orch-surface);
    border: 1px solid var(--orch-border);
    border-radius: 6px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1100;
    font-size: 0.85rem;
}
.connection-edit-popup label { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; color: var(--orch-text); }
.connection-edit-popup input,
.connection-edit-popup select { padding: 4px 6px; border: 1px solid var(--orch-border); border-radius: 4px; }
.connection-edit-popup button { padding: 4px 8px; }

/* Sprint 9: Mind-Map / Prozess */
.order-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--orch-primary);
    color: var(--orch-white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    pointer-events: none;
}
.card.parent-pick-child {
    outline: 3px dashed var(--orch-primary);
    outline-offset: 3px;
}
body[data-layout-mode="mindmap"] .card,
body[data-layout-mode="process"] .card {
    transition: top 0.3s ease, left 0.3s ease;
}

/* Sprint 10: Phase-Banner + Plan-Modal */
.phase-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: linear-gradient(90deg, var(--orch-primary-hover) 0%, var(--orch-primary) 100%);
    color: var(--orch-white);
    border-bottom: 2px solid var(--orch-primary-hover);
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.phase-banner-pos {
    background: rgba(255,255,255,0.18);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}
.phase-banner-main { flex: 1; min-width: 0; }
.phase-banner-title { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.phase-banner-method { font-size: 0.85rem; opacity: 0.9; margin-top: 2px; }
.phase-banner-frage { font-size: 0.9rem; margin-top: 4px; font-style: italic; opacity: 0.95; }
.phase-banner-right { display: flex; align-items: center; gap: 12px; }
.phase-banner-timer { font-family: monospace; font-size: 1.1rem; font-weight: 600; }
.phase-banner.phase-blind { background: linear-gradient(90deg, var(--orch-amber-text-soft) 0%, var(--orch-amber) 100%); border-bottom-color: var(--orch-amber-text); }
.phase-banner.phase-pause { background: linear-gradient(90deg, var(--orch-neutral-900) 0%, var(--orch-neutral-500) 100%); border-bottom-color: var(--orch-neutral-900); }
.phase-banner.phase-m-only { background: linear-gradient(90deg, var(--orch-green-dark) 0%, var(--orch-green) 100%); border-bottom-color: var(--orch-green-dark); }
.phase-banner.phase-k-only { background: linear-gradient(90deg, var(--orch-primary) 0%, var(--orch-accent-blue) 100%); border-bottom-color: var(--orch-primary); }

.plan-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plan-modal-inner {
    background: var(--orch-surface);
    width: min(820px, 92vw);
    max-height: 86vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.plan-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--orch-border);
}
.plan-modal-head h2 { flex: 1; margin: 0; font-size: 1.2rem; }
.plan-modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1;
}
.plan-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--orch-border);
}
.plan-phase-row {
    background: var(--orch-neutral-100);
    border: 1px solid var(--orch-border);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.plan-phase-row.active {
    background: rgba(var(--orch-primary-rgb), 0.12);
    border-color: var(--orch-primary);
    box-shadow: 0 0 0 2px rgba(var(--orch-primary-rgb),0.25);
}
.plan-phase-row .ph-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.plan-phase-row .ph-num { font-weight: 700; color: var(--orch-primary); min-width: 28px; }
.plan-phase-row .ph-title { font-weight: 600; flex: 1; }
.plan-phase-row .ph-meta { font-size: 0.8rem; color: var(--orch-subtext); }
.plan-phase-row .ph-method { font-size: 0.85rem; color: var(--orch-subtext); margin: 2px 0; }
.plan-phase-row .ph-fragen { margin-top: 4px; padding-left: 18px; }
.plan-phase-row .ph-fragen li { margin: 2px 0; }
.plan-phase-row .ph-actions { margin-top: 6px; display: flex; gap: 6px; }
.plan-phase-row .ph-actions button { padding: 3px 10px; font-size: 0.8rem; }
.plan-phase-row.editing input,
.plan-phase-row.editing textarea {
    width: 100%; box-sizing: border-box; padding: 5px 8px; margin: 2px 0;
    font-size: 0.9rem; border: 1px solid var(--orch-border); border-radius: 4px;
}
.plan-phase-row.editing textarea { min-height: 60px; resize: vertical; line-height: 1.4; }
.plan-phase-row.editing .ph-row-grid { display: grid; grid-template-columns: 1fr 120px 80px; gap: 6px; }

/* Sprint 13: Phase-Advance-Vorschlag Banner */
.phase-advance-hint {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orch-amber-bg);
    border: 2px solid var(--orch-amber);
    color: var(--orch-amber-text);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 1500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 12px;
}
.phase-advance-hint button { padding: 4px 12px; font-size: 0.85rem; }

/* Sprint 14: Cluster-Vorschlag (gestrichelter Rahmen) */
.cluster.proposal {
    border: 2px dashed var(--orch-amber) !important;
    background: repeating-linear-gradient(45deg, rgba(var(--orch-amber-rgb),0.06) 0 8px, transparent 8px 16px) !important;
}
.cluster .accept-proposal {
    background: var(--orch-amber);
    color: var(--orch-white);
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 6px;
}
.cluster .accept-proposal:hover { background: var(--orch-amber-text-soft); }
.cluster .proposal-badge {
    font-size: 0.75rem;
    color: var(--orch-amber-text);
    background: var(--orch-amber-bg);
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
}

/* U-3: Toast-Benachrichtigungen (Server-Fehler/Hinweise sichtbar machen) */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, 90vw);
}
.toast {
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--orch-white);
    font-size: 0.9rem;
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    word-break: break-word;
}
.toast-show {
    opacity: 1;
    transform: translateX(0);
}
.toast-error { background: var(--orch-red); }    /* ORCH Red 500 */
.toast-warn  { background: var(--orch-amber); }  /* ORCH Amber 500 */
.toast-info  { background: var(--orch-primary); }/* ORCH Deep Blue 500 */

/* E-1: Dot-Voting */
.vote-wrap { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; }
.vote-btn {
    display: none;              /* nur im Voting-Modus sichtbar (.voting-on) */
    width: 20px; height: 20px; line-height: 1; padding: 0;
    border: 1px solid var(--orch-blue-500, #2b4c8c);
    background: var(--orch-blue-100, #e8edf4);
    color: var(--orch-blue-500, #2b4c8c);
    border-radius: 4px; cursor: pointer; font-weight: 700; font-size: 0.9rem;
}
.vote-btn:hover { background: var(--orch-blue-200, #a8b8d8); }
.vote-badge {
    min-width: 20px; text-align: center; font-weight: 700;
    color: var(--orch-green-500, #2d8c6f); font-size: 0.9rem;
}
body.voting-on .vote-btn { display: inline-block; }
body.voting-on .card { outline: 1px dashed var(--orch-green-500, #2d8c6f); }
