/* ==========================================================================
   Orb Shell — Full-screen orb-based UI shell
   No sidebar, no cards/boxes — pure animation space with compact top bar
   ========================================================================== */

/* -- Body: fill viewport, no scroll ---------------------------------------- */
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-deepest);
}

/* -- Compact Top Bar ------------------------------------------------------- */
.orb-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    background: color-mix(in srgb, var(--bg-deepest) 88%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: var(--z-header, 100);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.orb-topbar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.orb-topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.orb-brand {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    letter-spacing: 1.5px;
}

.orb-nav-sep {
    width: 1px;
    height: 22px;
    background: linear-gradient(180deg, transparent, var(--border-subtle), transparent);
    margin: 0 2px;
}

.orb-mo-agent-left {
    width: auto;
    min-width: 62px;
    height: 44px;
    gap: 7px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--accent-teal) 38%, var(--border-subtle));
    background: color-mix(in srgb, var(--accent-teal) 9%, transparent);
}

.orb-mo-svg {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--accent-teal);
    display: inline-grid;
    place-items: center;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-teal) 12%, transparent);
    animation: mo-orb-breathe 2.8s ease-in-out infinite;
}

.orb-mo-svg span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-teal);
    box-shadow: 0 0 10px var(--accent-teal);
}

.orb-mo-label {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 900;
    color: var(--accent-teal);
    letter-spacing: -0.4px;
}

@keyframes mo-orb-breathe {
    0%, 100% { transform: scale(1); opacity: .86; }
    50% { transform: scale(1.08); opacity: 1; }
}

.mo-agent-mini-card {
    position: fixed;
    width: 260px;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-card) 92%, transparent);
    box-shadow: var(--shadow-lg);
    z-index: calc(var(--z-modal, 1000) + 5);
    cursor: pointer;
}

.mo-agent-mini-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal);
    font-family: var(--font-mono, monospace);
    font-weight: 900;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-teal) 16%, transparent);
}

.mo-agent-mini-info { min-width: 0; flex: 1; }
.mo-agent-mini-title { font-weight: 800; color: var(--text-primary); }
.mo-agent-mini-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-agent-mini-actions { display: flex; gap: 4px; }
.mo-agent-mini-actions button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border-subtle); background: transparent; color: var(--text-muted); cursor: pointer; }
.mo-agent-mini-actions button:hover { color: var(--accent-teal); border-color: var(--accent-teal); }

.orb-env-badge {
    font-size: 10px;
    font-weight: var(--weight-semibold);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--accent-teal-dim);
    color: var(--accent-teal);
    text-transform: uppercase;
}

.orb-env-badge.demo {
    background: var(--accent-amber-dim);
    color: var(--accent-amber);
}

.orb-topbar-center {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.orb-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-loss);
    transition: background 0.3s;
}

.orb-status-dot.connected {
    background: var(--color-profit);
    box-shadow: 0 0 8px var(--color-profit);
}

.orb-status-dot.trading {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: orb-pulse 1.5s infinite;
}

.orb-status-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.orb-topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.orb-nav-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.orb-nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.orb-nav-btn.active {
    color: var(--accent-teal);
    background: var(--accent-teal-dim);
}

/* -- Dropdown Menu --------------------------------------------------------- */
.orb-menu-dropdown {
    position: absolute;
    top: var(--header-height);
    right: var(--space-lg);
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm);
    z-index: 200;
}

.orb-menu-section {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.orb-menu-section:last-child {
    border-bottom: none;
}

.orb-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.orb-menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.orb-menu-logout {
    color: var(--color-loss);
}

.orb-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

.orb-toggle-slider {
    position: relative;
    width: 32px;
    height: 18px;
    background: var(--bg-elevated);
    border-radius: 9px;
    transition: background 0.2s;
}

.orb-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.2s, background 0.2s;
}

.orb-menu-toggle input {
    display: none;
}

.orb-menu-toggle input:checked + .orb-toggle-slider {
    background: var(--accent-amber-dim);
}

.orb-menu-toggle input:checked + .orb-toggle-slider::after {
    transform: translateX(14px);
    background: var(--accent-amber);
}

/* -- Main Canvas (orb space) ---------------------------------------------- */
.orb-canvas {
    flex: 1;
    margin-top: var(--header-height);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When showing non-dashboard pages, switch to scrollable content mode */
.orb-canvas.page-mode {
    display: block;
    overflow-y: auto;
    padding: var(--space-xl);
}

/* -- Orb Dashboard Canvas ------------------------------------------------- */
.orb-dashboard {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Background ambient layer */
.orb-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--accent-teal);
    opacity: 0;
    animation: ambient-drift ease-in-out infinite;
}

@keyframes ambient-drift {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 0.2; transform: translateY(-30px) scale(1); }
}

/* Orb metrics overlay (bottom-left) */
.orb-metrics {
    position: absolute;
    bottom: var(--space-lg);
    left: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    z-index: 10;
}

.orb-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--bg-deepest) 80%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
}

.orb-metric i { font-size: 12px; color: var(--text-muted); }
.orb-metric.positive span { color: var(--color-profit); }
.orb-metric.negative span { color: var(--color-loss); }

/* The main orb area where bot orbs live */
.orb-stage {
    position: relative;
    width: min(600px, 85vw);
    height: min(600px, 70vh);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Individual bot orb */
.bot-orb {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, left 0.5s ease, top 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transform: translate(-50%, -50%);
}

.bot-orb:hover { transform: translate(-50%, -50%) scale(1.15); }
.bot-orb.selected { transform: translate(-50%, -50%) scale(1.2); }

.orb-glow {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--orb-color) 0%, transparent 68%);
    opacity: 0.35;
    animation: orb-breathe 3.5s ease-in-out infinite;
}

.orb-core {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--orb-color), color-mix(in srgb, var(--orb-color) 30%, var(--bg-deepest)));
    border: 2px solid color-mix(in srgb, var(--orb-color) 60%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.orb-core i {
    font-size: 18px;
    color: var(--text-primary);
    opacity: 0.9;
}

.orb-label {
    position: absolute;
    bottom: -18px;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: center;
    z-index: 2;
}

.orb-pnl {
    position: absolute;
    top: -14px;
    font-size: 10px;
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    z-index: 2;
    white-space: nowrap;
}

.orb-pnl.positive { color: var(--color-profit); }
.orb-pnl.negative { color: var(--color-loss); }

/* Bot orb states */
.bot-orb.idle .orb-glow { opacity: 0.15; }
.bot-orb.trading .orb-glow {
    opacity: 0.5;
    animation: orb-pulse 1.5s ease-in-out infinite;
}

.bot-orb.orb-exit {
    animation: orb-exit 0.3s ease-out forwards;
}

@keyframes orb-exit {
    to { opacity: 0; transform: translate(-50%, -50%) scale(0); }
}

/* FATHER connection SVG */
.father-connections-svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Empty state — single breathing orb */
.orb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

.empty-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--accent-teal), color-mix(in srgb, var(--accent-teal) 20%, var(--bg-deepest)));
    border: 2px solid color-mix(in srgb, var(--accent-teal) 44%, transparent);
    box-shadow: 0 0 48px color-mix(in srgb, var(--accent-teal) 24%, transparent);
    animation: orb-breathe 4.5s ease-in-out infinite;
}

.orb-empty-state p {
    font-size: var(--text-md);
    color: var(--text-secondary);
    margin: 0;
}

.orb-empty-state span {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* -- Orb Detail Panel ----------------------------------------------------- */
.orb-detail-panel {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 320px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: color-mix(in srgb, var(--bg-card) 96%, transparent);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    z-index: 20;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0,0,0,0.3);
    animation: panel-slide-in 0.25s ease-out;
}

@keyframes panel-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.orb-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.orb-detail-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.orb-detail-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.orb-detail-close:hover { color: var(--text-primary); }

.orb-chart-link {
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.5;
    transition: opacity 0.2s;
    text-decoration: none;
}

.orb-chart-link:hover { opacity: 1; color: var(--accent-amber); }

.orb-detail-state {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-teal);
}

.orb-detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.orb-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.orb-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.orb-stat-value {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.orb-stat-value.text-profit { color: var(--color-profit); }
.orb-stat-value.text-loss { color: var(--color-loss); }

.orb-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-subtle);
}

.orb-action-btn {
    font-size: var(--text-xs) !important;
}

/* Legacy BotJump shell overrides were removed with the retired BotJump surface.
   Keep orb-shell focused on the active Luna world + FATHER overlay surfaces. */

/* -- FATHER orbit widget inside orb dashboard ----------------------------- */
.orb-dashboard .father-orbit-container {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 160px;
    height: 160px;
    min-height: unset;
    z-index: 5;
    background: none;
    border: none;
    border-radius: 0;
    overflow: visible;
}

/* Compact FATHER internals in orb dashboard */
.orb-dashboard .fo-sky {
    border-radius: var(--radius-lg);
}

.orb-dashboard .fo-brain-wrap {
    width: 52px;
    height: 52px;
    margin-left: -26px;
    margin-top: -26px;
}

.orb-dashboard .fo-brain {
    width: 52px;
    height: 52px;
}

.orb-dashboard .fo-brain i {
    font-size: 1rem;
}

.orb-dashboard .fo-orbit-ring {
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
}

.orb-dashboard .fo-orbit-ring-inner {
    width: 55px;
    height: 55px;
    margin-left: -27px;
    margin-top: -27px;
}

.orb-dashboard .fo-orbit-dots {
    width: 120px;
    height: 120px;
    margin-left: -60px;
    margin-top: -60px;
}

.orb-dashboard .fo-orbit-dot {
    width: 20px;
    height: 20px;
    font-size: 7px;
}

.orb-dashboard .fo-hud {
    bottom: 4px;
    left: 4px;
    right: 4px;
    gap: 2px;
}

.orb-dashboard .fo-hud-label {
    font-size: 0.45rem;
}

.orb-dashboard .fo-hud-value {
    font-size: 0.6rem;
}

.orb-dashboard .fo-title-badge {
    font-size: 0.55rem;
    padding: 1px 6px;
    top: 4px;
    left: 4px;
}

.orb-dashboard .fo-signal-bars {
    top: 4px;
    right: 4px;
}

.orb-dashboard .fo-idle-msg span {
    font-size: 0.6rem;
}

/* Compact BotJump internals in orb dashboard */
.orb-dashboard .luna-sky {
    border-radius: 50%;
}

.orb-dashboard .luna-moon-wrap {
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
}

.orb-dashboard .luna-moon {
    width: 80px;
    height: 80px;
}

.orb-dashboard .luna-hud {
    bottom: 2px;
    left: 4px;
    right: 4px;
    gap: 1px;
}

.orb-dashboard .luna-hud-label {
    font-size: 0.45rem;
}

.orb-dashboard .luna-hud-value {
    font-size: 0.6rem;
}

.orb-dashboard .luna-strategy-badge {
    font-size: 0.5rem;
    padding: 1px 5px;
}

/* -- Animations ----------------------------------------------------------- */
@keyframes orb-breathe {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.06); opacity: 0.52; }
}

@keyframes orb-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.72; transform: scale(1.10); }
}

@keyframes orb-float {
    0% { transform: translateY(100vh); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-20px); opacity: 0; }
}

@keyframes orb-dash {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 16; }
}

/* -- Responsive ----------------------------------------------------------- */
@media (max-width: 768px) {
    .orb-topbar { padding: 0 var(--space-md); }
    .orb-stage { width: 90vw; height: 60vh; }
    .orb-metrics { bottom: var(--space-md); left: var(--space-md); gap: var(--space-sm); }
    .orb-metric { font-size: var(--text-xs); padding: 4px 8px; }
    .orb-detail-panel { width: calc(100vw - var(--space-lg) * 2); right: var(--space-md); bottom: var(--space-md); }
    .orb-dashboard .father-orbit-container { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
    .orb-brand { font-size: var(--text-md); }
    .orb-env-badge { display: none; }
    .orb-metrics { flex-direction: column; }
    .orb-detail-panel { width: calc(100vw - 24px); right: 12px; bottom: 12px; max-height: 60vh; }
}

/* -- MO-AI dashboard orb: independent overlay, separate from LunaWorld ------- */
.mo-ai-orb-dock {
    position: fixed;
    right: clamp(18px, 2.8vw, 42px);
    bottom: clamp(20px, 4vh, 42px);
    z-index: 86;
    display: grid;
    justify-items: end;
    gap: 12px;
    pointer-events: none;
}

.mo-ai-orb,
.mo-ai-card,
.mo-ai-card button {
    pointer-events: auto;
}

.mo-ai-orb {
    position: relative;
    width: 118px;
    height: 118px;
    border: 1px solid color-mix(in srgb, var(--accent-teal) 48%, transparent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    gap: 0;
    background:
        radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--accent-teal) 40%, transparent), transparent 28%),
        radial-gradient(circle at 60% 70%, color-mix(in srgb, var(--accent-cyan) 20%, transparent), transparent 36%),
        color-mix(in srgb, var(--bg-card) 78%, transparent);
    color: var(--text-primary);
    box-shadow: 0 0 24px color-mix(in srgb, var(--accent-teal) 18%, transparent), var(--shadow-lg);
    cursor: pointer;
    isolation: isolate;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mo-ai-orb:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: var(--accent-teal);
    box-shadow: 0 0 34px color-mix(in srgb, var(--accent-teal) 30%, transparent), var(--shadow-lg);
}

.mo-ai-orb.running {
    border-color: var(--color-profit);
    box-shadow: 0 0 40px color-mix(in srgb, var(--color-profit) 30%, transparent), var(--shadow-lg);
}

.mo-ai-orb.busy .mo-ai-orb-ring,
.mo-ai-orb.running .mo-ai-orb-ring {
    animation-duration: 1.4s;
}

.mo-ai-orb-core {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-mono, monospace);
    font-weight: 950;
    letter-spacing: -1px;
    color: var(--accent-teal);
    background: color-mix(in srgb, var(--bg-deepest) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-teal) 60%, transparent);
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent-teal) 16%, transparent);
}

.mo-ai-orb-ring {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--accent-teal) 42%, transparent);
    animation: mo-ai-spin 7s linear infinite;
    z-index: -1;
}

.mo-ai-orb-label {
    margin-top: -6px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.1px;
}

.mo-ai-orb small {
    margin-top: -8px;
    font-size: 10px;
    color: var(--text-muted);
    max-width: 94px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mo-ai-card {
    width: min(360px, calc(100vw - 34px));
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--accent-teal) 28%, var(--border-subtle));
    border-radius: 20px;
    background: color-mix(in srgb, var(--bg-card) 94%, transparent);
    box-shadow: var(--shadow-lg), 0 0 30px color-mix(in srgb, var(--accent-teal) 12%, transparent);
    color: var(--text-primary);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.mo-ai-card-head,
.mo-ai-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mo-ai-card-head strong {
    display: block;
    font-size: 15px;
    letter-spacing: .08em;
}

.mo-ai-card-head span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.mo-ai-icon-btn,
.mo-ai-actions button {
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-surface) 80%, transparent);
    color: var(--text-secondary);
    cursor: pointer;
}

.mo-ai-icon-btn {
    width: 30px;
    height: 30px;
}

.mo-ai-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.mo-ai-grid div {
    min-width: 0;
    padding: 8px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-surface) 72%, transparent);
    border: 1px solid var(--border-subtle);
}

.mo-ai-grid label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.mo-ai-grid b {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mo-ai-note {
    margin: 10px 0 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.35;
}

.mo-ai-actions button {
    flex: 1;
    min-height: 34px;
    font-size: 12px;
    font-weight: 800;
}

.mo-ai-actions button:hover:not(:disabled) {
    color: var(--accent-teal);
    border-color: var(--accent-teal);
}

.mo-ai-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.mo-ai-run { color: var(--color-profit) !important; }
.mo-ai-stop { color: var(--color-loss) !important; }

@keyframes mo-ai-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
    .mo-ai-orb-dock {
        right: 14px;
        bottom: 14px;
    }
    .mo-ai-orb {
        width: 92px;
        height: 92px;
    }
    .mo-ai-orb-core {
        width: 42px;
        height: 42px;
    }
    .mo-ai-grid {
        grid-template-columns: 1fr;
    }
}

.mo-ai-config-row {
    margin-top: 12px;
    padding: 9px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-surface) 68%, transparent);
}

.mo-ai-config-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.mo-ai-config-row select {
    width: 100%;
    min-height: 34px;
    border: 1px solid color-mix(in srgb, var(--accent-teal) 26%, var(--border-subtle));
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-deepest) 76%, transparent);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    outline: none;
}

.mo-ai-config-row select:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-teal) 18%, transparent);
}

.mo-ai-thinking {
    margin-top: 10px;
    padding: 9px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-surface) 60%, transparent);
}

.mo-ai-thinking label {
    display: block;
    margin-bottom: 5px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.mo-ai-thinking p {
    margin: 3px 0;
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-secondary);
}
