/* === Strategy Lab Premium Design === */

/* Step indicator bar */
.step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}
.step-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.step.active {
    background: rgba(251,191,36,0.12);
    border-color: rgba(251,191,36,0.4);
    box-shadow: 0 0 20px rgba(251,191,36,0.15);
}
.step.active .step-num { background: linear-gradient(135deg,#fbbf24,#d97706); color: #030712; }
.step.active .step-label { color: #fbbf24; }
.step.done .step-num { background: #22c55e; color: white; }
.step.done .step-label { color: rgba(255,255,255,0.7); }
.step-line {
    flex: 0 0 30px;
    height: 1px;
    background: rgba(255,255,255,0.1);
}
@media (max-width: 768px) {
    .step-line { display: none; }
    .step-label { display: none; }
}

/* Panels */
.lab-panel {
    display: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: panel-in 0.4s ease;
}
.lab-panel.active { display: block; }
@keyframes panel-in {
    from { opacity:0; transform: translateY(12px); }
    to   { opacity:1; transform: translateY(0); }
}

.lab-h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.lab-h2-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg,#fbbf24,#d97706);
    color: #030712;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
}

/* Inputs */
.lab-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.4rem;
}
.lab-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.lab-input:focus {
    border-color: rgba(251,191,36,0.5);
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
}
.lab-input::placeholder { color: rgba(255,255,255,0.25); }
.lab-textarea {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 140px;
}

/* Provider Cards */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.provider-card {
    position: relative;
    display: block;
    padding: 1.25rem;
    border-radius: 0.875rem;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.provider-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(251,191,36,0.3);
}
.provider-card input:checked + .provider-icon,
.provider-card:has(input:checked) {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(217,119,6,0.05));
    box-shadow: 0 0 24px rgba(251,191,36,0.2);
}
.provider-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.provider-name { font-weight: 700; }
.provider-model { font-size: 0.7rem; color: rgba(255,255,255,0.4); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.provider-tag {
    position: absolute;
    top: 6px; right: 6px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Action Buttons */
.lab-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.lab-btn-primary {
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #030712;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}
.lab-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(251,191,36,0.4);
}
.lab-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.lab-btn-secondary {
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.05);
    color: white;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}
.lab-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}
.lab-btn-mini {
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.lab-btn-mini:hover { background: rgba(251,191,36,0.15); color: #fbbf24; border-color: rgba(251,191,36,0.3); }

.lab-preset {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.lab-preset:hover { background: rgba(251,191,36,0.1); color: #fbbf24; border-color: rgba(251,191,36,0.3); }

/* Verify result */
.verify-msg {
    padding: 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.5rem;
}
.verify-msg.ok { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.verify-msg.err { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.verify-msg.pending { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }

/* Progress Log */
.progress-log {
    background: #000;
    border-radius: 0.75rem;
    padding: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #86efac;
    max-height: 380px;
    overflow-y: auto;
    line-height: 1.65;
    border: 1px solid rgba(255,255,255,0.05);
}
.progress-log .log-line {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0.75rem;
    padding: 2px 0;
}
.progress-log .log-time { color: rgba(255,255,255,0.3); }
.progress-log .log-line.warn { color: #fcd34d; }
.progress-log .log-line.err  { color: #fca5a5; }
.progress-log .log-line.info { color: #93c5fd; }

.lab-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}
.lab-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #22c55e 100%);
    transition: width 0.4s ease;
    box-shadow: 0 0 12px rgba(251,191,36,0.4);
}

/* Report */
.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
}
.rstat {
    padding: 1rem;
    border-radius: 0.625rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}
.rstat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.25rem;
    font-weight: 700;
}
.rstat-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
}
.rstat-value.green { color: #22c55e; text-shadow: 0 0 12px rgba(34,197,94,0.3); }
.rstat-value.red   { color: #ef4444; text-shadow: 0 0 12px rgba(239,68,68,0.3); }
.rstat-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.375rem;
    font-family: 'JetBrains Mono', monospace;
}
.rstat-sub.green { color: rgba(34,197,94,0.7); }
.rstat-sub.red   { color: rgba(239,68,68,0.7); }

.report-card {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.875rem;
    overflow: hidden;
}
.report-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.6);
}

#equity-canvas {
    width: 100%;
    height: 280px;
    display: block;
}

/* Returns Table */
.returns-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}
.returns-table th,
.returns-table td {
    padding: 0.5rem 1rem;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.returns-table th { text-align: right; font-weight: 700; color: rgba(255,255,255,0.4); font-size: 0.65rem; text-transform: uppercase; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.returns-table td:first-child,
.returns-table th:first-child { text-align: left; color: rgba(255,255,255,0.5); font-weight: 600; }
.returns-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Profit bars */
.profit-bars { padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.profit-bar-row { display: grid; grid-template-columns: 110px 1fr 100px; gap: 0.75rem; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
.pb-label { color: rgba(255,255,255,0.6); font-weight: 600; }
.pb-bar { height: 14px; background: rgba(255,255,255,0.04); border-radius: 7px; overflow: hidden; }
.pb-fill { display: block; height: 100%; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); border-radius: 7px; }
.pb-fill.green { background: linear-gradient(90deg,#16a34a,#22c55e); box-shadow: 0 0 12px rgba(34,197,94,0.3); }
.pb-fill.red   { background: linear-gradient(90deg,#b91c1c,#ef4444); box-shadow: 0 0 12px rgba(239,68,68,0.3); }
.pb-fill.blue  { background: linear-gradient(90deg,#1d4ed8,#3b82f6); box-shadow: 0 0 12px rgba(59,130,246,0.3); }
.pb-value { text-align: right; font-weight: 800; }
.pb-value.green { color: #22c55e; }
.pb-value.red   { color: #ef4444; }
.pb-value.blue  { color: #60a5fa; }

/* === Contest Banner === */
.contest-banner {
    position: relative;
    margin-bottom: 2rem;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(251,191,36,0.12) 0%, rgba(217,119,6,0.06) 50%, rgba(168,85,247,0.08) 100%);
    border: 1px solid rgba(251,191,36,0.35);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 12px 48px -8px rgba(251,191,36,0.25), 0 0 0 1px rgba(251,191,36,0.1) inset;
}
.contest-bg-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(251,191,36,0.2), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168,85,247,0.15), transparent 50%);
    pointer-events: none;
    animation: contest-glow 6s ease-in-out infinite;
}
@keyframes contest-glow {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}
.contest-banner > * { position: relative; z-index: 1; }

.contest-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #030712;
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    box-shadow: 0 6px 18px rgba(251,191,36,0.4);
    animation: contest-pulse 2s ease-in-out infinite;
}
@keyframes contest-pulse {
    0%, 100% { box-shadow: 0 6px 18px rgba(251,191,36,0.4); transform: translateY(0); }
    50%      { box-shadow: 0 10px 28px rgba(251,191,36,0.6); transform: translateY(-2px); }
}

.contest-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: white;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}
.contest-gradient {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.contest-sub {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contest-prizes {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.contest-prize {
    padding: 1rem 1.25rem;
    border-radius: 0.875rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(251,191,36,0.3);
    min-width: 130px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contest-prize:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(251,191,36,0.4);
}
.contest-prize-medal { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.contest-prize-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 1.6rem;
    color: #22c55e;
    text-shadow: 0 0 16px rgba(34,197,94,0.5);
    line-height: 1;
}
.contest-prize-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-top: 4px;
}

.contest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    text-align: left;
}
.contest-info {
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.06);
}
.contest-info-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.5);
    font-weight: 700;
    margin-bottom: 4px;
}
.contest-info-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1rem;
    color: #fbbf24;
}
.contest-criterion {
    color: rgba(255,255,255,0.75);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.contest-rules {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 1.25rem;
}
.contest-rules strong { color: rgba(255,255,255,0.65); }

/* === Quality-Gate Requirements Box === */
.qg-box {
    margin: 1.5rem 0 0;
    padding: 1.25rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
    border: 1px solid rgba(255,255,255,0.08);
    text-align: left;
}
.qg-head {
    margin-bottom: 1rem;
    text-align: center;
}
.qg-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}
.qg-sub {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    margin-top: 3px;
}
.qg-floors {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.2);
    margin-bottom: 1rem;
}
.qg-floor-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fca5a5;
    font-weight: 700;
    margin-bottom: 8px;
}
.qg-floor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.qg-chip {
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.qg-paths {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.qg-path {
    padding: 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}
.qg-path:hover {
    transform: translateY(-2px);
    border-color: rgba(34,197,94,0.4);
    box-shadow: 0 8px 24px -8px rgba(34,197,94,0.3);
}
.qg-path-a:hover { border-color: rgba(251,191,36,0.5); box-shadow: 0 8px 24px -8px rgba(251,191,36,0.3); }
.qg-path-b:hover { border-color: rgba(168,85,247,0.5); box-shadow: 0 8px 24px -8px rgba(168,85,247,0.3); }
.qg-path-c:hover { border-color: rgba(6,182,212,0.5); box-shadow: 0 8px 24px -8px rgba(6,182,212,0.3); }
.qg-path-medal {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 6px;
}
.qg-path-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
}
.qg-path-desc {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
}
.qg-path-req {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.qg-path-req li {
    padding: 4px 8px;
    background: rgba(0,0,0,0.35);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.3;
}
.qg-path-req li::before {
    content: '✓ ';
    color: #22c55e;
    font-weight: 800;
    margin-right: 2px;
}
.qg-path-req strong {
    color: #fbbf24;
    font-weight: 800;
}

.qg-rank-info {
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(251,191,36,0.02));
    border: 1px solid rgba(251,191,36,0.2);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    text-align: center;
}

/* === Live Top 10 Leaderboard in Lab (between contest + steps) === */
.lab-top10-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.25));
    border: 1px solid rgba(251,191,36,0.18);
}
.lab-top10-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.lab-top10-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}
.lab-top10-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}
.lab-top10-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 9999px;
}
.lab-top10-tab {
    padding: 5px 12px;
    border-radius: 9999px;
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: none;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lab-top10-tab:hover { color: white; }
.lab-top10-tab.active {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #030712;
}

.lab-top10-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.625rem;
}
.lab-top10-loading {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}
.lab-top10-empty {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(34,197,94,0.06), rgba(34,197,94,0.02));
    border: 1px dashed rgba(34,197,94,0.3);
    border-radius: 0.75rem;
    color: rgba(255,255,255,0.7);
}
.lab-top10-empty .empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.lab-top10-empty .empty-title { font-weight: 800; font-size: 1.1rem; color: #86efac; margin-bottom: 0.4rem; }
.lab-top10-empty .empty-sub { font-size: 0.85rem; color: rgba(255,255,255,0.55); }

.lab-top10-card {
    position: relative;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.25s ease;
}
.lab-top10-card:hover {
    background: rgba(251,191,36,0.06);
    border-color: rgba(251,191,36,0.3);
    transform: translateY(-2px);
}
.lab-top10-card.rank-1 { border-color: rgba(251,191,36,0.5); background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(255,255,255,0.02)); }
.lab-top10-card.rank-2 { border-color: rgba(229,231,235,0.3); }
.lab-top10-card.rank-3 { border-color: rgba(251,146,60,0.35); }

.lab-top10-rank {
    position: absolute;
    top: -8px;
    right: 10px;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 0.75rem;
    color: white;
    background: linear-gradient(135deg, #6b7280, #374151);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.lab-top10-card.rank-1 .lab-top10-rank { background: linear-gradient(135deg, #fde68a, #d97706); color: #422006; font-size: 1.1rem; }
.lab-top10-card.rank-2 .lab-top10-rank { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; font-size: 1.1rem; }
.lab-top10-card.rank-3 .lab-top10-rank { background: linear-gradient(135deg, #fb923c, #92400e); font-size: 1.1rem; }

.lab-top10-name {
    font-weight: 700;
    color: white;
    font-size: 0.88rem;
    line-height: 1.25;
    padding-right: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lab-top10-meta {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 3px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.lab-top10-meta .sym { color: #fbbf24; font-weight: 700; }
.lab-top10-stats {
    margin-top: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}
.lab-top10-stats .st {
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    text-align: center;
}
.lab-top10-stats .st-label {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}
.lab-top10-stats .st-value {
    font-weight: 800;
    font-size: 0.8rem;
    margin-top: 1px;
}
.lab-top10-stats .green { color: #22c55e; }
.lab-top10-stats .red { color: #ef4444; }
.lab-top10-stats .gold { color: #fbbf24; }
.lab-top10-handle {
    margin-top: 6px;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
}

/* Top 10 Inspiration in Step 3 */
.top-inspire-box {
    margin-top: 1rem;
    padding: 0.875rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(251,191,36,0.02));
    border: 1px solid rgba(251,191,36,0.2);
}
.top-inspire-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.top-inspire-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
@media (max-width: 640px) {
    .top-inspire-list { grid-template-columns: 1fr; }
}
.top-inspire-loading {
    grid-column: 1 / -1;
    padding: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
}
.ti-item {
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
}
.ti-item:hover {
    background: rgba(251,191,36,0.1);
    border-color: rgba(251,191,36,0.35);
    transform: translateY(-1px);
}
.ti-item.added { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); animation: bk-pulse 0.4s ease; }
.ti-rank {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 10px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}
.ti-item:nth-child(1) .ti-rank { background: linear-gradient(135deg,#fde68a,#d97706); color:#422006; }
.ti-item:nth-child(2) .ti-rank { background: linear-gradient(135deg,#e5e7eb,#9ca3af); color:#1f2937; }
.ti-item:nth-child(3) .ti-rank { background: linear-gradient(135deg,#fb923c,#92400e); color:white; }
.ti-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ti-stats {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.55);
    display: flex;
    gap: 6px;
    align-items: center;
}
.ti-pf { color: #fbbf24; font-weight: 700; }
.ti-pl-pos { color: #22c55e; font-weight: 700; }
.ti-pl-neg { color: #ef4444; font-weight: 700; }

/* Ranking comparison in Step 5 */
.ranking-compare {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(59,130,246,0.05));
    border: 1px solid rgba(168,85,247,0.25);
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}
.ranking-medal {
    font-size: 2.5rem;
    line-height: 1;
}
.ranking-text-main {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}
.ranking-text-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-top: 4px;
}

/* AI Refinement Chat */
.refine-messages {
    max-height: 380px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    background: rgba(0,0,0,0.25);
}
.refine-messages::-webkit-scrollbar { width: 6px; }
.refine-messages::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.3); border-radius: 3px; }

.refine-msg {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    max-width: 88%;
    font-size: 0.88rem;
    line-height: 1.55;
    animation: refine-in 0.35s ease;
}
@keyframes refine-in {
    from { opacity:0; transform: translateY(8px); }
    to   { opacity:1; transform: translateY(0); }
}
.refine-msg-role {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    margin-bottom: 4px;
    opacity: 0.7;
}
.refine-msg-text { color: rgba(255,255,255,0.85); }
.refine-msg-text em { color: #fbbf24; font-style: normal; background: rgba(251,191,36,0.1); padding: 1px 5px; border-radius: 3px; font-size: 0.8rem; }
.refine-msg-text strong { color: white; }
.refine-msg-text ul { margin: 4px 0 4px 1.2rem; padding-left: 0; }
.refine-msg-text li { margin-bottom: 3px; }

.refine-msg-ai {
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(59,130,246,0.05));
    border: 1px solid rgba(168,85,247,0.2);
    align-self: flex-start;
}
.refine-msg-ai .refine-msg-role { color: #c4b5fd; }

.refine-msg-user {
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(217,119,6,0.05));
    border: 1px solid rgba(251,191,36,0.2);
    align-self: flex-end;
}
.refine-msg-user .refine-msg-role { color: #fbbf24; }

.refine-msg-system {
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.2);
    align-self: center;
    text-align: center;
    max-width: 95%;
    font-size: 0.82rem;
}
.refine-msg-system .refine-msg-role { color: #86efac; }

.refine-msg-thinking {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    align-self: flex-start;
}
.refine-msg-thinking .refine-msg-text::after {
    content: '...';
    display: inline-block;
    animation: dots 1.4s steps(4) infinite;
}
@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.refine-input-wrap {
    display: flex;
    gap: 8px;
    padding: 1rem;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.refine-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border-radius: 0.625rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(168,85,247,0.25);
    color: white;
    font-size: 0.88rem;
    resize: vertical;
    outline: none;
    min-height: 44px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.refine-input:focus { border-color: rgba(168,85,247,0.6); box-shadow: 0 0 0 3px rgba(168,85,247,0.15); }
.refine-input::placeholder { color: rgba(255,255,255,0.3); }

.refine-send-btn { flex-shrink: 0; padding: 0.625rem 1.25rem !important; }

.refine-rerun-wrap {
    padding: 1rem;
    border-top: 1px solid rgba(34,197,94,0.2);
    background: linear-gradient(180deg, rgba(34,197,94,0.05), rgba(34,197,94,0.02));
    text-align: center;
    animation: refine-in 0.4s ease;
}
.refine-rerun-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
    box-shadow: 0 0 24px rgba(34,197,94,0.4) !important;
    animation: btn-pulse-green 2s ease-in-out infinite;
}
@keyframes btn-pulse-green {
    0%, 100% { box-shadow: 0 0 24px rgba(34,197,94,0.4); }
    50%      { box-shadow: 0 0 36px rgba(34,197,94,0.6); }
}

/* AI Strategy Code Summary */
.strat-code-summary {
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,0.25);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.55;
}
.strat-code-summary .ssum-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.75rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.strat-code-summary .ssum-row:last-child { border-bottom: none; }
.strat-code-summary .ssum-label { color: rgba(255,255,255,0.45); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; align-self: center; }
.strat-code-summary .ssum-val { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; color: white; }
.strat-code-summary .ssum-val.warn { color: #fcd34d; }
.strat-code-summary .ssum-val.ok { color: #86efac; }
.strat-code-summary .complex-bar {
    display: inline-block;
    width: 200px;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin-left: 8px;
}
.strat-code-summary .complex-fill {
    display: block;
    height: 100%;
    transition: width 0.6s ease;
    border-radius: 4px;
}

/* EA Placeholder & Generate Status */
.ea-placeholder {
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(251,191,36,0.04), rgba(0,0,0,0.2));
}
.ea-placeholder-icon { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.6; }
.ea-placeholder-title { font-size: 1rem; font-weight: 700; color: rgba(255,255,255,0.85); margin-bottom: 0.5rem; }
.ea-placeholder-text { font-size: 0.85rem; color: rgba(255,255,255,0.5); max-width: 480px; margin: 0 auto; line-height: 1.5; }
.ea-gen-status { margin-top: 1rem; font-size: 0.85rem; color: #fbbf24; font-family: 'JetBrains Mono', monospace; }

/* Glow on important button */
.lab-btn-mini.btn-primary-glow {
    background: linear-gradient(135deg, #fbbf24, #d97706) !important;
    color: #030712 !important;
    border-color: transparent !important;
    box-shadow: 0 0 16px rgba(251,191,36,0.5), 0 4px 12px -2px rgba(251,191,36,0.4) !important;
    animation: btn-pulse 2s ease-in-out infinite;
}
@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 0 16px rgba(251,191,36,0.5), 0 4px 12px -2px rgba(251,191,36,0.4); }
    50%      { box-shadow: 0 0 24px rgba(251,191,36,0.7), 0 6px 18px -2px rgba(251,191,36,0.5); }
}

.ea-card--ready .ea-placeholder { display: none !important; }

/* EA Code */
.ea-code {
    background: #000;
    padding: 1.25rem;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    max-height: 480px;
    overflow: auto;
    margin: 0;
    white-space: pre;
}
.ea-code::-webkit-scrollbar { width: 8px; height: 8px; }
.ea-code::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 4px; }

/* Trades Table */
.trades-table-wrap { max-height: 380px; overflow-y: auto; }
.trades-table { width: 100%; border-collapse: collapse; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; }
.trades-table thead { position: sticky; top: 0; background: #111827; z-index: 1; }
.trades-table th { text-align: left; padding: 0.5rem 0.75rem; color: rgba(255,255,255,0.4); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.08); }
.trades-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.04); color: rgba(255,255,255,0.7); }
.trades-table .pl-pos { color: #22c55e; font-weight: 700; }
.trades-table .pl-neg { color: #ef4444; font-weight: 700; }
.trades-table .ttype-buy { color: #22c55e; font-weight: 700; }
.trades-table .ttype-sell { color: #ef4444; font-weight: 700; }

/* === Strategy Layout (Prompt + Sidebar) === */
.strategy-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.25rem;
}
@media (max-width: 1024px) {
    .strategy-layout { grid-template-columns: 1fr; }
}

.strategy-prompt-col { min-width: 0; }

.strategy-side-col {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
    position: sticky;
    top: 16px;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 32px);
}

/* History Card */
.account-history {
    background: linear-gradient(180deg, rgba(34,197,94,0.05), rgba(34,197,94,0.02));
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 0.875rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    max-height: 240px;
    flex-shrink: 0;
}
.ah-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0.5rem;
}
.ah-clear-btn {
    width: 22px; height: 22px;
    border-radius: 4px;
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.2);
    font-size: 11px;
    cursor: pointer;
}
.ah-clear-btn:hover { background: rgba(239,68,68,0.2); }
.ah-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.ah-list::-webkit-scrollbar { width: 6px; }
.ah-list::-webkit-scrollbar-thumb { background: rgba(34,197,94,0.3); border-radius: 3px; }
.ah-item {
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: all 0.18s ease;
}
.ah-item:hover {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.3);
}
.ah-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2px;
}
.ah-item-sym { color: rgba(251,191,36,0.9); font-weight: 700; }
.ah-item-pl { font-weight: 800; }
.ah-item-pl.green { color: #22c55e; }
.ah-item-pl.red { color: #ef4444; }
.ah-item-prompt {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ah-item-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 3px;
    font-size: 0.58rem;
    color: rgba(255,255,255,0.35);
    font-family: 'JetBrains Mono', monospace;
}
.ah-saved-badge { background: rgba(34,197,94,0.2); color: #86efac; padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.ah-empty { padding: 1rem; text-align: center; color: rgba(255,255,255,0.3); font-size: 0.75rem; }

/* === Baukasten - Compact Pill Layout === */
.strategy-baukasten {
    background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2)) !important;
    border: 1px solid rgba(251,191,36,0.15) !important;
    border-radius: 0.875rem !important;
    padding: 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0;
    max-height: 480px;
    overflow: hidden;
}
.baukasten-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0.5rem;
}
.bk-search {
    width: 100%;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    font-size: 0.78rem;
    outline: none;
    margin-bottom: 0.5rem;
}
.bk-search:focus { border-color: rgba(251,191,36,0.5); }

.bk-tabs {
    display: flex !important;
    gap: 4px !important;
    overflow-x: auto !important;
    padding: 0 0.75rem 0.5rem !important;
    margin: 0 -0.75rem 0.5rem !important;
    scrollbar-width: thin !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    flex-shrink: 0 !important;
}
.bk-tab {
    display: inline-flex !important;
    align-items: center !important;
}
.bk-tabs::-webkit-scrollbar { height: 4px; }
.bk-tabs::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 2px; }
.bk-tab {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem;
    border-radius: 0.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.55);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.bk-tab:hover { color: white; border-color: rgba(255,255,255,0.15); }
.bk-tab.active {
    background: rgba(251,191,36,0.15);
    border-color: rgba(251,191,36,0.4);
    color: #fbbf24;
}
.bk-tab-count {
    margin-left: 4px;
    opacity: 0.6;
    font-size: 0.58rem;
}

/* Pill-grid statt vertical list */
.bk-list {
    flex: 1 1 auto !important;
    min-height: 200px !important;
    overflow-y: auto !important;
    padding: 4px 4px 4px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-content: flex-start !important;
}
.bk-list::-webkit-scrollbar { width: 5px; }
.bk-list::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 3px; }
.bk-loading { padding: 1rem; text-align: center; color: rgba(255,255,255,0.3); font-size: 0.75rem; width: 100%; }

.bk-item {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 9999px !important;
    padding: 5px 12px 5px 10px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.85) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    position: relative !important;
    flex: 0 0 auto !important;
}
.bk-item::before {
    content: '+';
    color: rgba(251,191,36,0.7);
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1;
}
.bk-item:hover {
    background: rgba(251,191,36,0.12);
    border-color: rgba(251,191,36,0.4);
    color: white;
    transform: translateY(-1px);
}
.bk-item.added {
    background: rgba(34,197,94,0.18);
    border-color: rgba(34,197,94,0.5);
    animation: bk-pulse 0.5s ease;
}
.bk-item.bk-source-user {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.25);
}
.bk-item.bk-source-user::before { color: rgba(134,239,172,0.8); }
.bk-item.bk-source-user:hover { background: rgba(34,197,94,0.2); border-color: rgba(34,197,94,0.5); }
.bk-item .bk-pop {
    color: rgba(255,255,255,0.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    margin-left: 2px;
}

@keyframes bk-pulse {
    0%   { background: rgba(34,197,94,0.4); transform: scale(1.05); }
    100% { background: rgba(34,197,94,0.18); transform: scale(1); }
}

/* Tooltip on hover - shows description */
.bk-item[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 6px);
    background: #030712;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(251,191,36,0.3);
    font-size: 0.7rem;
    font-weight: 400;
    white-space: normal;
    max-width: 280px;
    min-width: 180px;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    line-height: 1.4;
    text-align: left;
}
.bk-item { position: relative; }

/* AI Tips Box */
.ai-tips-box {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(59,130,246,0.06));
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: 0.625rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
    animation: tips-in 0.4s ease;
}
.ai-tips-box .tips-h {
    font-weight: 800;
    color: #c4b5fd;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ai-tips-box ul { padding-left: 1.2rem; }
.ai-tips-box li { margin-bottom: 4px; }
.ai-tips-box .tips-loading { color: rgba(255,255,255,0.5); }
@keyframes tips-in {
    from { opacity:0; transform: translateY(-8px); }
    to   { opacity:1; transform: translateY(0); }
}

.naming-box {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(251,191,36,0.02));
    border: 1px solid rgba(251,191,36,0.2);
}

/* Quality Banner */
.quality-banner {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.quality-banner.ok {
    background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.05));
    border: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
}
.quality-banner.fail {
    background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(239,68,68,0.05));
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}
