/* HotMic Manager visual system */
:root {
    --hotmic-bg: #080b12;
    --hotmic-bg-elevated: #0d111a;
    --hotmic-panel: #111827;
    --hotmic-panel-2: #172033;
    --hotmic-panel-3: #1d2738;
    --hotmic-border: #2a3547;
    --hotmic-border-strong: #3d4b63;
    --hotmic-text: #f4f7fb;
    --hotmic-muted: #a7b2c4;
    --hotmic-muted-2: #7f8ca3;
    --hotmic-cyan: #22d3ee;
    --hotmic-violet: #8b5cf6;
    --hotmic-green: #22c55e;
    --hotmic-amber: #f59e0b;
    --hotmic-rose: #fb7185;
    --hotmic-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    --elevenlabs-primary: var(--hotmic-cyan);
    --elevenlabs-secondary: var(--hotmic-violet);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(13, 17, 28, 0.94) 0%, rgba(8, 11, 18, 1) 42%),
        var(--hotmic-bg);
    color: var(--hotmic-text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--hotmic-cyan);
}

a:hover {
    color: #67e8f9;
}

.container {
    max-width: 1240px;
}

.navbar.bg-dark {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(9, 12, 20, 0.92) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.navbar-brand {
    color: var(--hotmic-text) !important;
    font-weight: 700;
}

.navbar-brand i {
    color: var(--hotmic-cyan);
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.55rem;
    color: var(--hotmic-muted) !important;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.1;
    padding: 0.55rem 0.65rem !important;
    white-space: nowrap;
}

.navbar-nav .nav-link i {
    margin-right: 0 !important;
}

.navbar-nav .nav-link:hover {
    color: var(--hotmic-text) !important;
    background: rgba(148, 163, 184, 0.09);
}

.navbar-nav .nav-link.active {
    color: var(--hotmic-text) !important;
    background: rgba(34, 211, 238, 0.13);
}

.dropdown-menu {
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid var(--hotmic-border);
    border-radius: 0.75rem;
    box-shadow: var(--hotmic-shadow);
    padding: 0.45rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    color: var(--hotmic-muted);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(34, 211, 238, 0.11);
    color: var(--hotmic-text);
}

.dropdown-item.active,
.dropdown-item:active {
    background: rgba(34, 211, 238, 0.18);
    color: var(--hotmic-text);
}

#main-content {
    padding-top: 0.35rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: 0;
}

h1 {
    font-weight: 750;
}

.text-secondary,
.text-muted {
    color: var(--hotmic-muted) !important;
}

.card {
    background: linear-gradient(180deg, rgba(23, 32, 51, 0.92), rgba(15, 22, 35, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.card-header,
.card-footer {
    background: rgba(8, 11, 18, 0.32);
    border-color: rgba(148, 163, 184, 0.16);
}

.card-title {
    color: var(--hotmic-text);
    font-weight: 700;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--hotmic-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--hotmic-border-strong);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hotmic-muted-2);
}

/* Code blocks styling */
pre {
    background-color: rgba(8, 11, 18, 0.82) !important;
    border: 1px solid var(--hotmic-border);
    border-radius: 0.75rem;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}

code {
    color: #9be7ff;
}

/* Card hover effects */
.card:hover {
    transform: translateY(-1px);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

/* API documentation */
.api-docs {
    --api-cyan-soft: rgba(34, 211, 238, 0.12);
    --api-cyan-border: rgba(34, 211, 238, 0.3);
    --api-green-soft: rgba(34, 197, 94, 0.12);
    --api-amber-soft: rgba(245, 158, 11, 0.12);
}

.api-docs-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    gap: 2rem;
    align-items: end;
    overflow: hidden;
    margin-bottom: 2rem;
    padding: clamp(1.5rem, 4vw, 3.2rem);
    border: 1px solid var(--api-cyan-border);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at 84% 12%, rgba(139, 92, 246, 0.2), transparent 36%),
        radial-gradient(circle at 10% 95%, rgba(34, 211, 238, 0.14), transparent 32%),
        linear-gradient(135deg, rgba(18, 27, 44, 0.98), rgba(9, 13, 23, 0.98));
    box-shadow: var(--hotmic-shadow);
}

.api-docs-hero::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to left, black, transparent 70%);
}

.api-docs-hero-copy,
.api-docs-origin {
    position: relative;
    z-index: 1;
}

.api-docs-hero h1 {
    max-width: 760px;
    margin: 0.45rem 0 0.85rem;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.api-docs-hero-copy > p {
    max-width: 720px;
    margin: 0;
    color: var(--hotmic-muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.api-docs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.api-docs-origin {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.85rem;
    background: rgba(8, 11, 18, 0.72);
}

.api-docs-origin > span {
    grid-column: 1 / -1;
    color: var(--hotmic-muted-2);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.api-docs-origin code {
    overflow: hidden;
    color: var(--hotmic-text);
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.api-docs-sidebar-inner {
    position: sticky;
    top: 5.2rem;
    padding: 1rem;
    border-left: 1px solid var(--hotmic-border);
}

.api-docs-sidebar-label {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--hotmic-muted-2);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.api-docs-sidebar nav {
    display: grid;
    gap: 0.12rem;
}

.api-docs-sidebar nav a {
    padding: 0.38rem 0.55rem;
    border-radius: 0.42rem;
    color: var(--hotmic-muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.api-docs-sidebar nav a:hover,
.api-docs-sidebar nav a:focus {
    color: var(--hotmic-text);
    background: var(--api-cyan-soft);
}

.api-docs-sidebar nav .api-docs-sidebar-subitem {
    padding-left: 1.2rem;
    color: var(--hotmic-muted-2);
    font-size: 0.78rem;
}

.api-docs-sidebar-note {
    display: flex;
    gap: 0.55rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hotmic-border);
    color: var(--hotmic-muted-2);
    font-size: 0.75rem;
    line-height: 1.4;
}

.api-docs-sidebar-note i {
    margin-top: 0.14rem;
    color: var(--hotmic-amber);
}

.api-docs-main {
    min-width: 0;
}

.api-docs-section {
    scroll-margin-top: 5.2rem;
    padding: 1.4rem 0 3.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.api-docs-section:first-child {
    padding-top: 0;
}

.api-docs-section-heading {
    max-width: 800px;
    margin-bottom: 1.4rem;
}

.api-docs-kicker,
.api-code-label {
    color: var(--hotmic-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.api-docs-section-heading h2,
.api-docs-finish h2 {
    margin: 0.35rem 0 0.55rem;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    letter-spacing: -0.025em;
}

.api-docs-section-heading p,
.api-docs-finish p {
    color: var(--hotmic-muted);
    line-height: 1.65;
}

.api-docs-callout {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin: 1rem 0 1.4rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--api-cyan-border);
    border-radius: 0.75rem;
    background: var(--api-cyan-soft);
}

.api-docs-callout > i {
    margin-top: 0.18rem;
    color: var(--hotmic-cyan);
}

.api-docs-callout div {
    display: grid;
    gap: 0.18rem;
}

.api-docs-callout span {
    color: var(--hotmic-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.api-docs-callout-warning {
    border-color: rgba(245, 158, 11, 0.32);
    background: var(--api-amber-soft);
}

.api-docs-callout-warning > i {
    color: var(--hotmic-amber);
}

.api-code-card {
    overflow: hidden;
    border: 1px solid var(--hotmic-border);
    border-radius: 0.85rem;
    background: rgba(8, 11, 18, 0.72);
}

.api-code-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    min-height: 3rem;
    padding: 0.65rem 0.8rem 0.65rem 1rem;
    border-bottom: 1px solid var(--hotmic-border);
}

.api-code-card-header > div {
    display: grid;
    gap: 0.15rem;
}

.api-code-card pre {
    max-height: 460px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
}

.api-code-card code {
    color: #d8e4f3;
}

.api-docs-rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.api-docs-rules article {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.75rem;
    background: rgba(17, 24, 39, 0.52);
}

.api-docs-rule-number {
    display: inline-flex;
    flex: 0 0 1.65rem;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--api-cyan-border);
    border-radius: 50%;
    color: var(--hotmic-cyan);
    font-size: 0.72rem;
    font-weight: 800;
}

.api-docs-rules h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.api-docs-rules p {
    margin: 0;
    color: var(--hotmic-muted);
    font-size: 0.83rem;
    line-height: 1.5;
}

.api-agent-handoff {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.15rem;
    border: 1px solid rgba(139, 92, 246, 0.36);
    border-radius: 0.85rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.11), rgba(34, 211, 238, 0.07));
}

.api-agent-handoff-copy p {
    margin: 0.45rem 0 0;
    color: #d8e4f3;
    line-height: 1.6;
}

.api-workflows .accordion-item {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    background: rgba(14, 20, 32, 0.72);
}

.api-workflows .accordion-button {
    background: rgba(17, 24, 39, 0.86);
    color: var(--hotmic-text);
    font-weight: 700;
}

.api-workflows .accordion-button:not(.collapsed) {
    background: var(--api-cyan-soft);
    color: #b7f5ff;
    box-shadow: inset 0 -1px 0 var(--api-cyan-border);
}

.api-workflows .accordion-button:focus {
    border-color: var(--hotmic-cyan);
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.14);
}

.api-workflows .accordion-body {
    color: var(--hotmic-muted);
    background: rgba(8, 11, 18, 0.35);
}

.api-docs-reference-heading {
    display: flex;
    max-width: none;
    justify-content: space-between;
    gap: 2rem;
    align-items: end;
}

.api-docs-reference-heading > div {
    max-width: 680px;
}

.api-docs-search {
    position: relative;
    display: block;
    width: min(100%, 310px);
}

.api-docs-search i {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    z-index: 1;
    color: var(--hotmic-muted-2);
    transform: translateY(-50%);
}

.api-docs-search input {
    padding-left: 2.4rem;
}

.api-docs-search-status {
    min-height: 1.45rem;
    margin: -0.65rem 0 0.5rem;
    color: var(--hotmic-muted);
    font-size: 0.82rem;
}

.api-manifest-fields {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.api-manifest-fields article {
    display: grid;
    grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.7rem;
    background: rgba(17, 24, 39, 0.5);
}

.api-manifest-fields article > div {
    display: grid;
    align-content: start;
    gap: 0.2rem;
}

.api-manifest-fields code {
    color: #c8eaf2;
    font-weight: 700;
}

.api-manifest-fields span {
    color: var(--hotmic-muted-2);
    font-size: 0.72rem;
}

.api-manifest-fields p {
    margin: 0;
    color: var(--hotmic-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.api-reference-group {
    scroll-margin-top: 5.2rem;
    margin-top: 2rem;
}

.api-reference-group-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 0.8rem;
}

.api-reference-group-heading h3 {
    margin: 0;
    font-size: 1.22rem;
}

.api-reference-group-heading p {
    max-width: 760px;
    margin: 0.25rem 0 0;
    color: var(--hotmic-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.api-reference-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--api-cyan-border);
    border-radius: 0.6rem;
    color: var(--hotmic-cyan);
    background: var(--api-cyan-soft);
}

.api-reference-count {
    padding: 0.2rem 0.45rem;
    border: 1px solid var(--hotmic-border);
    border-radius: 999px;
    color: var(--hotmic-muted-2);
    font-size: 0.7rem;
}

.api-endpoint-list {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 0.8rem;
    background: rgba(8, 11, 18, 0.28);
}

.api-endpoint + .api-endpoint {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.api-endpoint summary {
    display: grid;
    grid-template-columns: 4.5rem minmax(220px, 1.15fr) minmax(180px, 0.85fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem;
    cursor: pointer;
    list-style: none;
}

.api-endpoint summary::-webkit-details-marker {
    display: none;
}

.api-endpoint summary:hover {
    background: rgba(148, 163, 184, 0.055);
}

.api-endpoint[open] summary {
    background: rgba(34, 211, 238, 0.055);
}

.api-endpoint summary code {
    overflow-wrap: anywhere;
    color: #c8eaf2;
    font-size: 0.8rem;
}

.api-endpoint-summary {
    color: var(--hotmic-muted);
    font-size: 0.84rem;
}

.api-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid currentColor;
    border-radius: 0.35rem;
    font-family: var(--bs-font-monospace);
    font-size: 0.7rem;
    font-weight: 800;
}

.api-method-get {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.1);
}

.api-method-post {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
}

.api-method-put,
.api-method-patch {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
}

.api-method-delete {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.1);
}

.api-endpoint-chevron {
    color: var(--hotmic-muted-2);
    font-size: 0.72rem;
    transition: transform 0.16s ease;
}

.api-endpoint[open] .api-endpoint-chevron {
    transform: rotate(180deg);
}

.api-endpoint-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem 1.2rem;
    align-items: start;
    padding: 0.2rem 0.8rem 1rem 6.05rem;
}

.api-endpoint-content {
    display: grid;
    min-width: 0;
    gap: 0.85rem;
}

.api-endpoint-body p {
    margin: 0;
    color: var(--hotmic-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.api-endpoint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.api-endpoint-meta span {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    color: var(--hotmic-muted-2);
    font-size: 0.73rem;
}

.api-endpoint-meta i {
    color: var(--hotmic-cyan);
}

.api-endpoint-body > .btn {
    grid-column: 2;
    grid-row: 1;
}

.api-request-contract h4 {
    margin: 0 0 0.5rem;
    color: var(--hotmic-text);
    font-size: 0.82rem;
}

.api-request-fields {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.55rem;
}

.api-request-fields > div {
    display: grid;
    grid-template-columns: minmax(150px, 0.28fr) minmax(170px, 0.28fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.65rem 0.75rem;
    background: rgba(17, 24, 39, 0.44);
}

.api-request-fields > div + div {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.api-request-fields code {
    overflow-wrap: anywhere;
    color: #c8eaf2;
    font-size: 0.78rem;
}

.api-request-fields span {
    color: var(--hotmic-muted-2);
    font-size: 0.74rem;
}

.api-response-contract {
    padding: 0.7rem 0.8rem;
    border-left: 2px solid rgba(34, 211, 238, 0.48);
    background: rgba(34, 211, 238, 0.045);
}

.api-response-contract strong,
.api-endpoint-example-heading strong {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.78rem;
}

.api-endpoint-example {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.55rem;
    background: rgba(4, 7, 12, 0.62);
}

.api-endpoint-example-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.45rem 0.55rem 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.api-endpoint-example-heading strong {
    margin: 0;
}

.api-endpoint-example pre {
    max-height: 360px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
}

.api-endpoint-example code {
    color: #d8e4f3;
}

.api-docs-finish {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
    gap: 2rem;
    align-items: center;
    border-bottom: 0;
}

.api-copy-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1080;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--api-cyan-border);
    border-radius: 0.65rem;
    color: var(--hotmic-text);
    background: rgba(9, 13, 23, 0.96);
    box-shadow: var(--hotmic-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.7rem);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.api-copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.api-guide-viewer-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 1.2rem;
    padding: 1.4rem;
    border: 1px solid var(--hotmic-border);
    border-radius: 0.85rem;
    background:
        radial-gradient(circle at 92% 5%, rgba(139, 92, 246, 0.16), transparent 38%),
        rgba(17, 24, 39, 0.72);
}

.api-guide-viewer-header h1 {
    margin: 0.3rem 0;
}

.api-guide-viewer-header p {
    margin: 0;
    color: var(--hotmic-muted);
}

.api-guide-source {
    max-height: none;
    padding: clamp(1rem, 3vw, 2rem);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .api-docs-hero {
        grid-template-columns: 1fr;
    }

    .api-docs-layout {
        grid-template-columns: 1fr;
    }

    .api-docs-sidebar {
        display: none;
    }

    .api-docs-rules {
        grid-template-columns: 1fr;
    }

    .api-guide-viewer-header {
        display: grid;
        align-items: start;
    }
}

@media (max-width: 767.98px) {
    .api-docs-hero {
        padding: 1.35rem;
    }

    .api-docs-hero h1 {
        line-height: 1.03;
    }

    .api-docs-origin,
    .api-agent-handoff,
    .api-docs-finish {
        grid-template-columns: 1fr;
    }

    .api-docs-reference-heading {
        display: grid;
        gap: 0.6rem;
    }

    .api-docs-search {
        width: 100%;
    }

    .api-endpoint summary {
        grid-template-columns: 4.3rem minmax(0, 1fr) auto;
    }

    .api-endpoint-summary {
        display: none;
    }

    .api-endpoint-body {
        grid-template-columns: 1fr;
        padding-left: 0.8rem;
    }

    .api-endpoint-body > .btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .api-manifest-fields article,
    .api-request-fields > div {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 650;
    letter-spacing: 0;
}

.bg-info {
    background-color: var(--hotmic-cyan) !important;
}

.bg-success {
    background-color: var(--hotmic-green) !important;
}

.bg-secondary {
    background-color: rgba(148, 163, 184, 0.18) !important;
    color: var(--hotmic-text) !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Form validation styles for dark theme */
.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: var(--bs-success);
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: var(--bs-danger);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.btn {
    border-radius: 0.55rem;
    font-weight: 650;
    letter-spacing: 0;
}

.btn-primary,
.btn-elevenlabs {
    background: linear-gradient(180deg, #22d3ee, #0891b2);
    border-color: rgba(103, 232, 249, 0.45);
    color: #061016;
}

.btn-primary:hover,
.btn-elevenlabs:hover {
    background: linear-gradient(180deg, #67e8f9, #06b6d4);
    border-color: rgba(103, 232, 249, 0.62);
    color: #061016;
}

.btn-success {
    background: linear-gradient(180deg, #34d399, #16a34a);
    border-color: rgba(74, 222, 128, 0.48);
    color: #04130a;
}

.btn-success:hover {
    color: #04130a;
}

.btn-info {
    background: linear-gradient(180deg, #38bdf8, #0284c7);
    border-color: rgba(125, 211, 252, 0.5);
    color: #05121a;
}

.btn-outline-primary,
.btn-outline-info,
.btn-outline-success,
.btn-outline-light,
.btn-outline-secondary,
.btn-outline-warning,
.btn-outline-danger {
    background: rgba(8, 11, 18, 0.18);
}

.btn-outline-primary,
.btn-outline-info {
    border-color: rgba(34, 211, 238, 0.5);
    color: #9be7ff;
}

.btn-outline-primary:hover,
.btn-outline-info:hover {
    background: rgba(34, 211, 238, 0.16);
    border-color: #67e8f9;
    color: var(--hotmic-text);
}

.btn-outline-success {
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.btn-outline-success:hover {
    background: rgba(34, 197, 94, 0.16);
    border-color: #86efac;
}

.btn-outline-light,
.btn-outline-secondary {
    border-color: rgba(148, 163, 184, 0.34);
    color: var(--hotmic-muted);
}

.btn-outline-light:hover,
.btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(226, 232, 240, 0.55);
    color: var(--hotmic-text);
}

.form-control,
.form-select {
    background-color: rgba(8, 11, 18, 0.48);
    border-color: var(--hotmic-border);
    color: var(--hotmic-text);
    border-radius: 0.6rem;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(8, 11, 18, 0.7);
    border-color: var(--hotmic-cyan);
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.18);
    color: var(--hotmic-text);
}

.form-control::placeholder {
    color: var(--hotmic-muted-2);
}

.form-label {
    color: var(--hotmic-muted);
    font-weight: 650;
}

.table-responsive {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.75rem;
    background: rgba(8, 11, 18, 0.18);
}

.card .table-responsive {
    border: 0;
    background: transparent;
}

.table {
    --bs-table-color: var(--hotmic-text);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(148, 163, 184, 0.13);
    --bs-table-striped-bg: rgba(148, 163, 184, 0.05);
    --bs-table-hover-bg: rgba(34, 211, 238, 0.08);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.95rem 1rem;
    vertical-align: middle;
}

.table thead th {
    color: var(--hotmic-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    border-bottom-color: rgba(148, 163, 184, 0.24);
}

.alert {
    border-radius: 0.75rem;
    border-width: 1px;
}

.alert-danger {
    background: rgba(127, 29, 29, 0.42);
    border-color: rgba(248, 113, 113, 0.36);
    color: #fecaca;
}

.alert-warning {
    background: rgba(120, 53, 15, 0.38);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

.alert-success {
    background: rgba(20, 83, 45, 0.38);
    border-color: rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
}

.alert-info {
    background: rgba(8, 47, 73, 0.42);
    border-color: rgba(34, 211, 238, 0.34);
    color: #bae6fd;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }

    /* Mobile-optimized form controls */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Touch-friendly height */
    }

    /* Mobile-optimized buttons */
    .btn {
        min-height: 44px;
        padding: 0.625rem 1rem;
    }

    /* Stack cards on mobile */
    .card {
        margin-bottom: 1rem;
    }

    /* Better table scrolling on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile navigation improvements */
    .navbar-nav {
        margin-top: 0.5rem;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.25rem;
    }

    /* Mobile modal improvements */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* Better spacing on mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Custom button variants */
.btn-elevenlabs {
    background: linear-gradient(180deg, #22d3ee, #0891b2);
    border-color: rgba(103, 232, 249, 0.45);
    color: #061016;
}

.btn-elevenlabs:hover {
    background: linear-gradient(180deg, #67e8f9, #06b6d4);
    border-color: rgba(103, 232, 249, 0.62);
    color: #061016;
}

/* Text truncation utility */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Conversation summary truncation */
.summary-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.summary-toggle {
    display: inline-block;
    margin-top: 0.25rem;
    color: var(--elevenlabs-primary);
    text-decoration: none;
    cursor: pointer;
}

.summary-toggle:hover {
    text-decoration: underline;
    color: var(--elevenlabs-secondary);
}

/* Custom alert styles */
.alert-api-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--bs-danger);
    color: var(--bs-danger);
}

/* Navigation active states */
.navbar-nav .nav-link.active {
    color: var(--hotmic-text) !important;
}

/* Footer styling */
footer {
    margin-top: auto;
}

footer.bg-dark {
    background: rgba(8, 11, 18, 0.9) !important;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--hotmic-muted) !important;
}

/* Custom modal styles */
.modal-content {
    background-color: var(--hotmic-panel);
    border: 1px solid var(--hotmic-border);
    border-radius: 0.85rem;
}

/* File upload styling */
.form-control[type="file"] {
    cursor: pointer;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background-color: var(--hotmic-panel-3);
    border: none;
    color: var(--hotmic-text);
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

/* Pagination styling */
.pagination .page-link {
    background-color: rgba(8, 11, 18, 0.48);
    border-color: var(--hotmic-border);
    color: var(--hotmic-text);
}

.pagination .page-link:hover {
    background-color: rgba(34, 211, 238, 0.14);
    border-color: var(--hotmic-cyan);
    color: var(--hotmic-text);
}

/* Table styling for dark theme */
.table-dark {
    --bs-table-bg: rgba(8, 11, 18, 0.48);
    --bs-table-striped-bg: rgba(148, 163, 184, 0.06);
    --bs-table-hover-bg: rgba(34, 211, 238, 0.08);
}

/* Copy button animation */
.copy-success {
    animation: copyFeedback 2s ease-out;
}

@keyframes copyFeedback {
    0% { background-color: var(--bs-success); }
    100% { background-color: var(--hotmic-panel-3); }
}

/* ========================================
   SKELETON LOADING SCREENS
   ======================================== */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.skeleton-card {
    height: 150px;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* ========================================
   ENHANCED LOADING STATES
   ======================================== */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

/* Dashboard control center */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 0 0.4rem;
}

.dashboard-hero h1 {
    margin: 0.15rem 0 0.35rem;
    font-size: 2.65rem;
    line-height: 1.02;
}

.dashboard-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--hotmic-muted);
    font-size: 1.05rem;
}

.dashboard-hero-actions,
.dashboard-default-session-actions,
.dashboard-role-actions,
.dashboard-flow-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dashboard-hero-actions {
    justify-content: flex-end;
    min-width: 260px;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hotmic-cyan);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-section {
    padding-top: 0.35rem;
}

.dashboard-section-heading {
    margin-bottom: 1rem;
}

.dashboard-section-heading h2 {
    margin: 0.2rem 0 0;
    font-size: 1.35rem;
}

.dashboard-section-heading .dashboard-eyebrow {
    display: block;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-stat-card {
    background: linear-gradient(180deg, rgba(29, 39, 56, 0.92), rgba(17, 24, 39, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dashboard-stat-card:hover {
    border-color: rgba(34, 211, 238, 0.46);
    color: inherit;
}

.dashboard-stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--hotmic-muted);
}

.dashboard-stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-quick-actions {
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-default-session {
    background: linear-gradient(180deg, rgba(23, 32, 51, 0.82), rgba(13, 17, 26, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.7rem;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.dashboard-role-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-role-card,
.dashboard-map-item {
    background: linear-gradient(180deg, rgba(23, 32, 51, 0.9), rgba(13, 17, 26, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.dashboard-role-card {
    min-height: 245px;
    padding: 1.05rem;
    display: flex;
    flex-direction: column;
}

.dashboard-role-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.65rem;
    background: rgba(8, 11, 18, 0.32);
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
}

.dashboard-role-card h3,
.dashboard-flow h3,
.dashboard-map-item h3 {
    font-size: 1rem;
    margin: 0 0 0.45rem;
}

.dashboard-role-card p,
.dashboard-flow p,
.dashboard-map-item p {
    color: var(--hotmic-muted);
    margin: 0;
}

.dashboard-role-card p {
    flex: 1;
}

.dashboard-role-actions {
    margin-top: 1rem;
}

.dashboard-flow-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-flow {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.75rem;
    background: rgba(13, 17, 26, 0.58);
}

.dashboard-flow-number {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #a5f3fc;
    font-weight: 800;
}

.dashboard-flow-links {
    margin-top: 0.65rem;
}

.dashboard-flow-links a {
    color: #a5f3fc;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.dashboard-flow-links a:hover {
    color: var(--hotmic-text);
    text-decoration: underline;
}

.dashboard-map-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-map-item {
    padding: 1rem;
}

@media (max-width: 991px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-hero-actions {
        justify-content: flex-start;
        min-width: 0;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-role-grid,
    .dashboard-map-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .dashboard-hero h1 {
        font-size: 2.15rem;
    }

    .dashboard-stats,
    .dashboard-role-grid,
    .dashboard-map-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-default-session {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-default-session-actions,
    .dashboard-hero-actions,
    .dashboard-role-actions {
        width: 100%;
    }

    .dashboard-default-session-actions .btn,
    .dashboard-hero-actions .btn,
    .dashboard-role-actions .btn {
        flex: 1 1 100%;
    }
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Progress bar for operations */
.progress-slim {
    height: 4px;
    border-radius: 0;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--elevenlabs-primary);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--elevenlabs-primary);
    color: #061016;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-main:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }

    .card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   ENHANCED DATA DISPLAY
   ======================================== */
/* JSON Viewer with syntax highlighting */
.json-viewer {
    background-color: rgba(8, 11, 18, 0.82);
    border: 1px solid var(--hotmic-border);
    border-radius: 0.75rem;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    max-height: 500px;
    position: relative;
}

.json-viewer .json-key {
    color: #9cdcfe;
}

.json-viewer .json-string {
    color: #ce9178;
}

.json-viewer .json-number {
    color: #b5cea8;
}

.json-viewer .json-boolean {
    color: #569cd6;
}

.json-viewer .json-null {
    color: #808080;
}

/* Copy button for code blocks */
.code-block-wrapper {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.code-copy-btn:hover {
    opacity: 1;
}

/* Sortable table headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem !important;
}

.sortable-header::after {
    content: '⇅';
    position: absolute;
    right: 0.5rem;
    opacity: 0.3;
}

.sortable-header.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.sortable-header.sort-desc::after {
    content: '↓';
    opacity: 1;
}

.sortable-header:hover::after {
    opacity: 0.7;
}

/* Better empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--hotmic-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    margin-bottom: 1.5rem;
}

/* ========================================
   FORM ENHANCEMENTS
   ======================================== */
/* Inline validation feedback */
.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--bs-success);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--bs-danger);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback,
.valid-feedback {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-control.is-valid ~ .valid-feedback,
.form-select.is-valid ~ .valid-feedback {
    display: block;
}

/* Field help text */
.form-help {
    font-size: 0.875rem;
    color: var(--hotmic-muted);
    margin-top: 0.25rem;
}

/* Date picker styling */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper input[type="date"],
.date-input-wrapper input[type="datetime-local"] {
    cursor: pointer;
}

/* ========================================
   NAVIGATION ENHANCEMENTS
   ======================================== */
/* Active page indicator */
.nav-link.active,
.navbar-nav .nav-link.active {
    color: var(--hotmic-text) !important;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: none;
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background-color: var(--elevenlabs-primary);
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    color: var(--hotmic-muted-2);
}

.breadcrumb-item.active {
    color: var(--bs-body-color);
}

/* ========================================
   ENHANCED INTERACTIONS
   ======================================== */
/* Smooth transitions */
.card,
.btn,
.form-control,
.form-select,
.nav-link {
    transition: all 0.2s ease-in-out;
}

/* Better hover states */
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

/* Interactive feedback */
.clickable {
    cursor: pointer;
    user-select: none;
}

.clickable:active {
    transform: scale(0.98);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Tooltip improvements */
.tooltip {
    font-size: 0.875rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
/* Relative time display */
.relative-time {
    color: var(--hotmic-muted);
    font-size: 0.875rem;
}

/* ID display with monospace font */
.id-display {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: rgba(148, 163, 184, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-success {
    background-color: var(--bs-success);
}

.status-warning {
    background-color: var(--bs-warning);
}

.status-error {
    background-color: var(--bs-danger);
}

.status-info {
    background-color: var(--bs-info);
}

/* ========================================
   BACKEND ACTIVITY LOG
   ======================================== */
.activity-log-container {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.activity-log-container::-webkit-scrollbar {
    width: 6px;
}

.activity-log-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.activity-log-entry {
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--bs-info);
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 0 0.25rem 0.25rem 0;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.activity-log-entry:hover {
    background: rgba(255,255,255,0.06);
}

.activity-log-entry.level-warning {
    border-left-color: var(--bs-warning);
}

.activity-log-entry.level-error {
    border-left-color: var(--bs-danger);
}

.activity-log-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15em 0.5em;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.activity-log-badge.badge-connection_start,
.activity-log-badge.badge-connection_end {
    background-color: rgba(25, 135, 84, 0.25);
    color: #75b798;
}

.activity-log-badge.badge-voice_command {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffda6a;
}

.activity-log-badge.badge-command_result {
    background-color: rgba(13, 202, 240, 0.2);
    color: #6edff6;
}

.activity-log-badge.badge-agent_transition {
    background-color: rgba(111, 66, 193, 0.25);
    color: #a98eda;
}

.activity-log-badge.badge-recording_change {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ea868f;
}

.activity-log-badge.badge-handler_change {
    background-color: rgba(108, 117, 125, 0.25);
    color: #adb5bd;
}

.activity-log-badge.badge-error {
    background-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

.activity-log-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #198754;
    margin-right: 0.5rem;
    animation: activityPulse 2s ease-in-out infinite;
}

.activity-log-pulse.paused {
    background-color: var(--hotmic-muted-2);
    animation: none;
}

@keyframes activityPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.activity-log-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--hotmic-muted);
}

.activity-log-time {
    color: var(--hotmic-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.activity-log-stream {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--hotmic-muted);
    opacity: 0.7;
}

/* ========================================
   CONTEXT AGENTS STATUS TABLE + EDITOR
   ======================================== */
.context-status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #198754;
    margin-right: 0.5rem;
    animation: activityPulse 2s ease-in-out infinite;
}

.context-in-call-pulse {
    background-color: #198754 !important;
    animation: activityPulse 1.5s ease-in-out infinite;
}

/* Editor Overlay */
.context-editor-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 800px;
    background: var(--hotmic-panel);
    border-left: 1px solid var(--hotmic-border);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.context-editor-overlay.open {
    transform: translateX(0);
}

.context-editor-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.context-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hotmic-border);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.context-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.context-editor-textarea {
    min-height: 60vh;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    flex: 1;
}

.context-token-bar-wrapper {
    flex-shrink: 0;
}

/* Token fill progress in table rows */
.context-agent-link {
    cursor: pointer;
}

.context-agent-link:hover {
    text-decoration: underline !important;
}

@media (max-width: 768px) {
    .context-editor-overlay {
        max-width: 100%;
    }

    .context-editor-header {
        padding: 0.75rem 1rem;
    }

    .context-editor-body {
        padding: 1rem;
    }

    .context-editor-textarea {
        min-height: 40vh;
    }
}
