/* SMP AI voice UI — Deepgram streaming; footer dock + off-screen canvas/transcript for the pipeline */

/* Root wraps dock + off-screen aux; visibility controlled by logged-in UI (d-none on #smp-ai-voice-ui) */
.smp-ai-voice-root {
    position: relative;
    z-index: 1040;
    pointer-events: none;
}

.smp-ai-voice-root > * {
    pointer-events: auto;
}

/* ——— Footer “always-on” dock (rectangle, far right inside #footer-container) ——— */
/* Pin Ovie dock to the far right of the footer (module footers are position:absolute full-width) */
#footer-container {
    position: relative;
    padding: 0 152px 0 6px; /* right: Ovie dock + mute btn over absolute module footers */
    box-sizing: border-box;
}

#footer-container #smp-ai-voice-ui.smp-ai-voice-root {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    margin-left: 0;
    align-self: auto;
    pointer-events: auto;
    width: max-content;
    max-width: min(100vw - 24px, 420px);
}

.smp-ai-voice-dock-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 50; /* above .module-footer (z-index 0–1) so the dock receives clicks */
    width: max-content;
}

/* Dark rectangular bar: wave + mic in one row (grid keeps mute on the right inside the bar) */
.smp-ai-voice-dock-shell {
    display: grid;
    grid-template-columns: auto 30px;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 4px;
    position: relative;
    z-index: 1042;
    min-height: 34px;
    padding: 2px 5px 2px 6px;
    border-radius: 4px;
    background: linear-gradient(145deg, #2b3035 0%, #1a1d21 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: max-content;
    max-width: 100%;
}

.smp-ai-voice-dock-shell:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(13, 110, 253, 0.35);
}

.smp-ai-voice-dock-shell:focus-within {
    outline: 2px solid rgba(13, 110, 253, 0.8);
    outline-offset: 2px;
}

/* Let clicks hit the <button>, not the canvas/dot (avoids dead zones in some browsers). */
.smp-ai-voice-dock__wave,
.smp-ai-voice-dock__dot {
    pointer-events: none;
}

.smp-ai-voice-dock-mute {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #dee2e6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    flex-shrink: 0;
    touch-action: manipulation;
}

.smp-ai-voice-dock-mute:hover:not(:disabled) {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.smp-ai-voice-dock-mute:focus-visible {
    outline: none;
}

/* Before mic starts: inactive (not broken-looking); after live, see .smp-ai-voice-root--live rule below */
.smp-ai-voice-dock-mute:disabled {
    opacity: 0.65;
    cursor: default;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.45);
}

.smp-ai-voice-root--live .smp-ai-voice-dock-mute:not(:disabled):not(.smp-ai-voice-dock-mute--muted) {
    opacity: 1;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.smp-ai-voice-dock-mute--muted {
    color: #fff;
    background: #c82333;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.smp-ai-voice-dock-mute--muted:hover:not(:disabled) {
    background: #dc3545;
    color: #fff;
}

.smp-ai-voice-root--live.smp-ai-voice-root--mic-muted .smp-ai-voice-dock__wave {
    opacity: 0.45;
    box-shadow: 0 0 0 1px rgba(248, 173, 28, 0.35);
}

/* Wave + notification dot: opens Ovie chat; shell provides the outer frame */
.smp-ai-voice-dock {
    grid-column: 1;
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 1;
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    flex-shrink: 0;
}

.smp-ai-voice-dock:hover {
    transform: none;
    box-shadow: none;
}

.smp-ai-voice-dock:focus-visible {
    outline: none;
}

.smp-ai-voice-dock__wave {
    display: block;
    width: 104px;
    height: 26px;
    border-radius: 4px;
    background: #111;
}

@media screen and (max-width: 600px) {
    .smp-ai-voice-dock {
        width: 52px;
        min-width: 52px;
        max-width: 52px;
    }
    .smp-ai-voice-dock__wave {
        width: 52px;
        height: 26px;
    }
}

/* Idle: subtle heartbeat on dock (when not live / not thinking — driven by JS classes) */
.smp-ai-voice-dock--heartbeat .smp-ai-voice-dock__wave {
    animation: smp-ai-voice-dock-heart 2.4s ease-in-out infinite;
}

@keyframes smp-ai-voice-dock-heart {
    0%,
    100% {
        opacity: 0.55;
        filter: brightness(0.95);
    }
    50% {
        opacity: 0.95;
        filter: brightness(1.08);
    }
}

/* Live mic stream */
.smp-ai-voice-dock--live .smp-ai-voice-dock__wave {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.45);
    animation: none;
}

/* Ovie “thinking” (completion in flight) */
.smp-ai-voice-root--thinking .smp-ai-voice-dock__wave {
    animation: smp-ai-voice-dock-think 0.9s ease-in-out infinite;
    opacity: 1;
}

@keyframes smp-ai-voice-dock-think {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.5);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 193, 7, 0);
    }
}

/* Subtle amber dot: Ovie completion in flight (paired with root--thinking) */
.smp-ai-voice-dock__think {
    position: absolute;
    bottom: 3px;
    left: calc(50% - 3px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.smp-ai-voice-dock--thinking .smp-ai-voice-dock__think {
    opacity: 1;
    animation: smp-ai-voice-dock-think-dot 1.1s ease-in-out infinite;
}

@keyframes smp-ai-voice-dock-think-dot {
    0%,
    100% {
        transform: scale(0.88);
        opacity: 0.55;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.45);
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
        box-shadow: 0 0 0 5px rgba(255, 193, 7, 0);
    }
}

/* New reply while minimized */
.smp-ai-voice-dock__dot {
    position: absolute;
    top: 3px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc3545;
    border: 2px solid #1a1d21;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.smp-ai-voice-dock--notify .smp-ai-voice-dock__dot {
    opacity: 1;
    transform: scale(1);
    animation: smp-ai-voice-notify-pulse 1.5s ease-in-out infinite;
}

@keyframes smp-ai-voice-notify-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.6);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0);
    }
}

/* Off-screen only: canvas + transcript/status for the audio graph and dispatchOvieActions (replies also go to chat). */
#smp-ai-voice-ui .smp-ai-voice-aux-screen {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.smp-ai-voice-ui__wave {
    display: block;
    width: 100%;
    height: 56px;
    border-radius: 6px;
    background: #111;
    margin-bottom: 8px;
}

.smp-ai-voice-ui__status {
    min-height: 1.25rem;
    color: #adb5bd;
    font-size: 0.8125rem;
    margin-bottom: 8px;
    word-break: break-word;
}

.smp-ai-voice-ui__transcript {
    max-height: 120px;
    overflow: auto;
    overflow-anchor: auto;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    font-size: 0.8125rem;
    line-height: 1.35;
    margin-bottom: 8px;
}

.smp-ai-voice-root--idle .smp-ai-voice-ui__wave {
    opacity: 0.45;
}

.smp-ai-voice-root--live .smp-ai-voice-ui__wave {
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.5);
}

/* ——— AI Studio: Ovie chat in right dock (#ai-chat-sidebar-filters) ——— */
.smp-ai-submenu-indent {
    display: inline-block;
    padding-left: 1.35rem;
    font-size: 0.95em;
}

.ai-app-filters-chat {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Fill the chat column: log grows between banner and composer. */
#ai-chat-sidebar-filters {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding-bottom: 0;
    margin-bottom: 0;
}

#ai-chat-sidebar-filters .ai-app-filters-chat {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* Global .ai-app-filters-chat adds border-bottom + padding — looks like a rule under Send; adds dead space */
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

#ai-chat-sidebar-filters .ai-app-filters-chat__brand {
    flex-shrink: 0;
}

#ai-chat-sidebar-filters .ai-app-filters-chat > .d-flex {
    flex-shrink: 0;
}

/* Full box border so the textarea bottom edge stays visible (was lost with border-bottom: none) */
#ai-chat-sidebar-filters .ai-app-chat-input.form-control {
    margin-bottom: 0;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: none;
}

.ai-app-chat-compose-actions {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
    margin-top: 10px;
    margin-bottom: 0;
    padding: 0 0 10px;
    border: none;
    box-shadow: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Compact: smaller than default `.buttons` profile header hit targets; matches small pencil affordance */
.ai-app-chat-compose-actions .ai-app-chat-icon-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 1px 3px;
    margin-right: 0.04em;
    margin-left: 0.04em;
    margin-bottom: 0 !important;
    line-height: 0;
    box-shadow: none;
}

.ai-app-chat-compose-actions .ai-app-chat-icon-btn:before {
    content: none !important;
    display: none !important;
}

.ai-app-chat-compose-actions .ai-app-chat-icon-btn img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.ai-app-chat-compose-actions #ai-app-chat-send {
    flex: 0 0 auto;
    min-width: 4.25rem;
    margin-left: auto;
}

/* Hidden controls kept for voice pipeline (disabled state); toggle is the visible control */
.smp-ai-voice-chat-hidden {
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

/* Pill switch: default (e.g. future reuse); chat row uses smaller variant below */
.smp-ai-voice-toggle {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    padding: 2px 0;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
}

.smp-ai-voice-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.smp-ai-voice-toggle:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.55);
    outline-offset: 2px;
    border-radius: 999px;
}

.smp-ai-voice-toggle__track {
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #adb5bd;
    position: relative;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.smp-ai-voice-toggle--on .smp-ai-voice-toggle__track {
    background: #0d6efd;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.smp-ai-voice-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease;
}

.smp-ai-voice-toggle--on .smp-ai-voice-toggle__thumb {
    transform: translateX(18px);
}

/* Mini toggle: height ~matches 18px icons + light chrome */
.ai-app-chat-compose-actions .smp-ai-voice-toggle {
    padding: 0;
    margin-right: 2px;
}

.ai-app-chat-compose-actions .smp-ai-voice-toggle__track {
    width: 30px;
    height: 17px;
}

.ai-app-chat-compose-actions .smp-ai-voice-toggle__thumb {
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.ai-app-chat-compose-actions .smp-ai-voice-toggle--on .smp-ai-voice-toggle__thumb {
    transform: translateX(13px);
}

.ai-app-filters-chat__brand {
    margin-bottom: 8px;
    line-height: 0;
}

.ai-app-filters-chat__brand-img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 52px;
    height: auto;
    object-fit: contain;
    object-position: left center;
    border-radius: 6px;
}

.ai-app-chat-dropzone {
    border-radius: 8px;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.ai-app-chat-dropzone--active {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.45);
    background: rgba(13, 110, 253, 0.06);
}

.ai-app-chat-dropzone__hint {
    margin-bottom: 6px;
    line-height: 1.35;
}

/* Dark sidebar: logo has its own background; no extra border needed */

#ai-app-chat-log {
    max-height: 200px;
    overflow: auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 8px;
}

#ai-chat-sidebar-filters #ai-app-chat-log {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    margin-bottom: 8px;
}

/* In-menu “thinking” row — same amber cue as .smp-ai-voice-dock__think / wave pulse */
.ai-app-chat-thinking-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 193, 7, 0.35);
    font-size: 0.8125rem;
    color: #856404;
}

.ai-app-chat-thinking-line__text {
    font-style: italic;
}

.ai-app-chat-thinking-line__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.88);
    animation: smp-ai-chat-thinking-dot 1.1s ease-in-out infinite;
}

@keyframes smp-ai-chat-thinking-dot {
    0%,
    100% {
        transform: scale(0.88);
        opacity: 0.55;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.45);
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
        box-shadow: 0 0 0 5px rgba(255, 193, 7, 0);
    }
}

.ai-app-chat-line {
    margin-bottom: 10px;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ai-app-chat-line:last-child {
    margin-bottom: 0;
}

.ai-app-chat-line__head {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.ai-app-chat-line--user .ai-app-chat-line__head {
    color: #0a58ca;
}

.ai-app-chat-line--ovie .ai-app-chat-line__head {
    color: #495057;
}

.ai-app-chat-line__body--rich {
    font-size: 0.875rem;
    line-height: 1.45;
    color: #212529;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__p {
    margin: 0 0 0.5rem;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__p:last-child {
    margin-bottom: 0;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__h {
    margin: 0.35rem 0 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0d47a1;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__ul,
.ai-app-chat-line__body--rich .ai-app-chat-md__ol {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.25rem;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__ul,
.ai-app-chat-line__body--rich .ai-app-chat-md__ol {
    line-height: 1.45;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__ul li,
.ai-app-chat-line__body--rich .ai-app-chat-md__ol li {
    margin-bottom: 0.2rem;
}

.ai-app-chat-line__body--rich .ai-app-chat-md__code {
    font-size: 0.8125rem;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(13, 110, 253, 0.08);
    color: #084298;
}

.ai-app-chat-line__body--plain {
    font-size: 0.875rem;
    line-height: 1.45;
}

.ai-app-chat-line__body--system {
    font-size: 0.78rem;
    line-height: 1.4;
}

.ai-app-chat-line--user {
    color: #0d6efd;
}

.ai-app-chat-line--ovie {
    color: #212529;
}

.ai-app-chat-line--system {
    color: #6c757d;
    font-size: 0.78rem;
}

.ai-app-filters-chat .form-control {
    font-size: 0.875rem;
}

/* AI Studio: Ovie HTML fragment (Tailwind utilities; #smp-ai-studio-root has important in tailwind.config) */
#smp-ai-studio-root .smp-ai-studio-html {
    font-size: 0.875rem;
    line-height: 1.45;
}

/* AI Studio: rendered markdown (marked GFM) — hierarchy and spacing */
#smp-ai-studio-root .smp-ai-studio-md {
    color: #212529;
}

#smp-ai-studio-root .smp-ai-studio-md h1,
#smp-ai-studio-root .smp-ai-studio-md h2,
#smp-ai-studio-root .smp-ai-studio-md h3,
#smp-ai-studio-root .smp-ai-studio-md h4,
#smp-ai-studio-root .smp-ai-studio-md h5,
#smp-ai-studio-root .smp-ai-studio-md h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0d47a1;
}

#smp-ai-studio-root .smp-ai-studio-md h1:first-child,
#smp-ai-studio-root .smp-ai-studio-md h2:first-child,
#smp-ai-studio-root .smp-ai-studio-md h3:first-child,
#smp-ai-studio-root .smp-ai-studio-md h4:first-child {
    margin-top: 0;
}

#smp-ai-studio-root .smp-ai-studio-md p {
    margin-bottom: 0.65rem;
}

#smp-ai-studio-root .smp-ai-studio-md ul,
#smp-ai-studio-root .smp-ai-studio-md ol {
    margin-bottom: 0.75rem;
    padding-left: 1.35rem;
}

#smp-ai-studio-root .smp-ai-studio-md li {
    margin-bottom: 0.35rem;
}

#smp-ai-studio-root .smp-ai-studio-md li > p {
    margin-bottom: 0.25rem;
}

#smp-ai-studio-root .smp-ai-studio-md table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    font-size: 0.8125rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    overflow: hidden;
}

#smp-ai-studio-root .smp-ai-studio-md th,
#smp-ai-studio-root .smp-ai-studio-md td {
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.55rem;
    vertical-align: top;
}

#smp-ai-studio-root .smp-ai-studio-md th {
    background: #e9ecef;
    font-weight: 600;
    text-align: left;
}

#smp-ai-studio-root .smp-ai-studio-md blockquote {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.85rem;
    border-left: 4px solid #0d6efd;
    background: rgba(13, 110, 253, 0.06);
    font-size: 0.84rem;
}

#smp-ai-studio-root .smp-ai-studio-md code {
    font-size: 0.84em;
    padding: 0.1em 0.35em;
    border-radius: 0.2rem;
    background: rgba(0, 0, 0, 0.06);
}

#smp-ai-studio-root .smp-ai-studio-md pre {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.25rem;
    background: #f1f3f5;
    font-size: 0.8rem;
    overflow-x: auto;
}

#smp-ai-studio-root .smp-ai-studio-md pre code {
    padding: 0;
    background: transparent;
}

#smp-ai-studio-root .smp-ai-studio-md hr {
    margin: 1rem 0;
    opacity: 0.35;
}

/* ——— AI Studio: dev Ovie MySQL log ——— */
.ai-app-view-toggle .btn {
    flex: 1 1 auto;
}

.smp-ai-ovie-log-body {
    max-height: 70vh;
    overflow: auto;
}

.smp-ai-ovie-log-entry .smp-ai-ovie-log-q,
.smp-ai-ovie-log-entry .smp-ai-ovie-log-a {
    white-space: pre-wrap;
    word-break: break-word;
}

.smp-ai-ovie-log-ctx {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 12rem;
    overflow: auto;
    font-size: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 6px 8px;
}

/* ——— AI Studio: rich KPI + grouped charts + ranking (Ovie dashboards) ——— */
.ovie-kpi-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid #adb5bd;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.ovie-kpi-trend--up {
    color: #c62828;
    font-size: 0.65rem;
}

.ovie-kpi-trend--down {
    color: #2e7d32;
    font-size: 0.65rem;
}

.ovie-kpi-trend--flat {
    color: #6c757d;
    font-size: 0.65rem;
}

.ovie-kpi-spark {
    display: block;
    max-height: 36px;
}

.ovie-kpi-minibars {
    min-height: 40px;
}

.ovie-kpi-minibar {
    background: linear-gradient(180deg, #42a5f5 0%, #1565c0 100%);
    border-radius: 2px 2px 0 0;
    min-width: 4px;
}

.ovie-grouped-chart__bar {
    width: 10px;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    transition: height 0.2s ease;
}

.ovie-grouped-chart__swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.ovie-dash-tab {
    padding: 0.15rem 0.35rem;
    border-bottom: 2px solid transparent;
    cursor: default;
    color: #6c757d;
}

.ovie-dash-tab--active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    font-weight: 600;
}

.ovie-dash-period {
    padding: 0.1rem 0.3rem;
    color: #6c757d;
    cursor: default;
}

.ovie-dash-period--active {
    color: #0d6efd;
    font-weight: 600;
}

.ovie-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ovie-rank-badge--top {
    background: #263238;
    color: #fff;
}

.ovie-rank-badge--rest {
    background: #e9ecef;
    color: #495057;
}

/* Dark mode for Ovie / AI Studio: /css/smp-theme.css */
