html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* —— App shell (dashboard home) —— */
.haiko-body {
    margin: 0;
    background: #fff;
}

.haiko-app {
    background: #fff;
}

.haiko-sidebar {
    width: 15rem;
    background: linear-gradient(180deg, #1a1f3c 0%, #252b4a 55%, #2d3355 100%);
    color: #e8eaf6;
}

.haiko-sidebar-brand {
    padding: 1.35rem 1.25rem 1rem;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.haiko-sidebar-nav {
    padding-top: 0.75rem;
}

.haiko-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    margin-right: 0.5rem;
    color: #c5cae9;
    text-decoration: none;
    border-radius: 0 0.375rem 0.375rem 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.haiko-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.haiko-nav-link.active {
    color: #fff;
    background: rgba(100, 181, 246, 0.28);
    font-weight: 500;
}

.haiko-nav-icon {
    display: flex;
    opacity: 0.92;
}

.haiko-topbar {
    flex-shrink: 0;
}

.haiko-lang-select {
    width: auto;
    min-width: 9rem;
}

.haiko-content {
    background: #fff;
}

.haiko-hero-title {
    letter-spacing: -0.02em;
}

.haiko-hero-notes li {
    margin-bottom: 0.35rem;
    max-width: 42rem;
}

.haiko-btn-open-call {
    font-weight: 600;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e51040;
}

.validation-message {
    color: #e51040;
}

.bl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NTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Remote / TTS audio is hidden but must not use display:none — some browsers throttle or skip playback. */
.call-remote-audio-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Call room: volume sliders (top), toolbar icons, accordion cues */
.call-page-title {
    letter-spacing: -0.02em;
}

.call-volume-bar {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

.call-toolbar {
    align-items: center;
}

.call-tb-btn {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
    border: none;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: filter 0.15s ease, transform 0.1s ease;
}

.call-tb-btn:hover {
    filter: brightness(1.06);
    color: #fff;
}

.call-tb-btn:active {
    transform: scale(0.97);
}

.call-tb-btn--exit {
    background: #fff;
    color: #c62828;
    border: 2px solid #c62828;
}

.call-tb-btn--exit:hover {
    color: #b71c1c;
    border-color: #b71c1c;
    background: #fff5f5;
}

.call-tb-btn--delete {
    background: #c62828;
}

.call-tb-btn--mic {
    background: #6d6d6d;
}

.call-tb-btn--mic.call-tb-btn--active {
    background: #5c5c5c;
}

.call-tb-btn--mic.call-tb-btn--muted {
    background: #9e9e9e;
    opacity: 0.85;
}

.call-tb-btn--test-voice {
    background: #00897b;
}

.call-tb-btn--chat {
    background: #c62828;
}

.call-tb-btn--bell {
    background: #1565c0;
}

.call-accordion .accordion-button:not(.collapsed) {
    box-shadow: none;
}

.call-acc-room > .accordion-header .accordion-button {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
}

.call-acc-room > .accordion-header .accordion-button:not(.collapsed) {
    background: linear-gradient(180deg, #e3f2fd 0%, #90caf9 100%);
}

.call-acc-video > .accordion-header .accordion-button {
    background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #1b5e20;
}

/* Видео сцена: пълна ширина, 16:9, PiP при режим self-main / peer-main */
.call-video-stage {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    background: #0d0d0d;
    box-sizing: border-box;
}

.call-video-el {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.call-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    padding: 1rem;
    text-align: center;
    z-index: 0;
}

.call-video-stage .call-video-el {
    position: absolute;
    z-index: 1;
}

/* Голям локален, малък отдалечен (PiP долу вдясно) */
.call-video-layout--self-main .call-video-el--local {
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.call-video-layout--self-main .call-video-el--remote {
    width: 28%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 16 / 9;
    right: 0.75rem;
    bottom: 0.75rem;
    left: auto;
    top: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.35);
    z-index: 2;
}

/* Голям отдалечен, малък локален */
.call-video-layout--peer-main .call-video-el--remote {
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.call-video-layout--peer-main .call-video-el--local {
    width: 28%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 16 / 9;
    right: 0.75rem;
    bottom: 0.75rem;
    left: auto;
    top: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.35);
    z-index: 2;
}

.call-video-layout--self-only .call-video-el--remote,
.call-video-layout--peer-only .call-video-el--local {
    display: none;
}

.call-video-layout--self-only .call-video-el--local,
.call-video-layout--peer-only .call-video-el--remote {
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.btn-video-cam.active .icon-cam-on,
.btn-video-cam:not(.active) .icon-cam-off {
    display: none !important;
}

.btn-video-cam.active .icon-cam-off,
.btn-video-cam:not(.active) .icon-cam-on {
    display: inline-block !important;
}

.btn-video-layout.active {
    background-color: var(--bs-secondary);
    color: #fff;
    border-color: var(--bs-secondary);
}

.call-video-el--remote.call-video-el--empty {
    opacity: 0;
    pointer-events: none;
}

.call-acc-log > .accordion-header .accordion-button {
    background: linear-gradient(180deg, #e3f2fd 0%, #dceefb 100%);
    color: #1565c0;
}

.translation-log {
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.5rem 0.65rem;
    border-radius: 0.35rem;
    background: var(--bs-secondary-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.translation-log__row {
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.translation-log__row:last-child {
    border-bottom: none;
}

.call-room-line {
    color: var(--bs-secondary-color);
}

/* Call page: participant profile cards (gender illustration + spoken language) */
.call-participant-profile {
    position: relative;
    width: 100%;
    max-width: 15.25rem;
    margin-inline: auto;
    min-height: 11.75rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.06);
    background: var(--bs-secondary-bg);
}

.call-participant-profile--waiting {
    opacity: 0.72;
    filter: saturate(0.85);
}

.call-participant-profile__art {
    position: absolute;
    inset: 0;
    /* Show full SVG (no crop); letterboxing uses area under the illustration */
    background-size: contain;
    background-position: center 8%;
    background-repeat: no-repeat;
}

.call-participant-profile__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.42) 38%,
        rgba(0, 0, 0, 0.12) 58%,
        rgba(0, 0, 0, 0.04) 100%
    );
    pointer-events: none;
}

.call-participant-profile__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.65rem 1rem 0.75rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.call-participant-profile__badge {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.92;
    margin-bottom: 0.15rem;
}

.call-participant-profile__name {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.2rem;
    word-break: break-word;
}

.call-participant-profile__lang {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.call-participant-profile__stt {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
    max-height: 4.75rem;
    overflow-y: auto;
    opacity: 0.96;
    word-break: break-word;
}

.call-participant-profile__stt-working {
    font-style: italic;
    opacity: 0.9;
}

.call-participant-profile__hint {
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.95;
    margin-top: 0.35rem;
    font-style: italic;
}
