/*
 * IPPBX panel theme. Plain CSS on top of Filament's stylesheet (no Tailwind
 * build needed); registered in AppServiceProvider and published with
 * `php artisan filament:assets`.
 */

:root {
    --ippbx-sidebar-bg: #0b1220;
    --ippbx-sidebar-bg-2: #111a2e;
    --ippbx-sidebar-text: #c7d0e0;
    --ippbx-sidebar-muted: #6b7a93;
    --ippbx-sidebar-hover: rgba(255, 255, 255, 0.06);
    --ippbx-sidebar-active: rgba(99, 102, 241, 0.18);
    --ippbx-accent: #6366f1;
    --ippbx-accent-2: #06b6d4;
    --ippbx-page-bg: #f4f6fb;
    --ippbx-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.05);
}

.dark {
    --ippbx-sidebar-bg: #080d18;
    --ippbx-sidebar-bg-2: #0d1424;
    --ippbx-page-bg: #0b1120;
    --ippbx-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---------- Logo ---------- */

.ippbx-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 100%;
}

.ippbx-logo-mark {
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(99, 102, 241, 0.35));
}

.ippbx-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.ippbx-logo-accent {
    background: linear-gradient(90deg, var(--ippbx-accent), var(--ippbx-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Page ---------- */

.fi-body {
    background-color: var(--ippbx-page-bg);
}

.fi-header-heading {
    letter-spacing: -0.02em;
}

/* ---------- Sidebar: dark navy in both themes ---------- */

.fi-sidebar {
    background: linear-gradient(180deg, var(--ippbx-sidebar-bg) 0%, var(--ippbx-sidebar-bg-2) 100%) !important;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.04);
}

.fi-sidebar-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
}

.fi-sidebar .fi-logo {
    color: #fff;
}

.fi-sidebar-group-label {
    color: var(--ippbx-sidebar-muted) !important;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-sidebar-group-collapse-btn,
.fi-sidebar-group-btn .fi-icon {
    color: var(--ippbx-sidebar-muted) !important;
}

.fi-sidebar-item-btn {
    border-radius: 0.6rem;
    transition: background-color 0.15s ease;
}

.fi-sidebar-item-btn:hover,
.fi-sidebar-item-btn:focus-visible {
    background-color: var(--ippbx-sidebar-hover) !important;
}

.fi-sidebar-item-label,
.fi-sidebar-item-icon {
    color: var(--ippbx-sidebar-text) !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background: var(--ippbx-sidebar-active) !important;
    box-shadow: inset 3px 0 0 var(--ippbx-accent);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #fff !important;
}

/* ---------- Topbar ---------- */

.fi-topbar {
    backdrop-filter: saturate(180%) blur(8px);
}

.fi-topbar > nav,
.fi-topbar-ctn > nav {
    box-shadow: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.dark .fi-topbar > nav,
.dark .fi-topbar-ctn > nav {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

/*
 * Desktop: the topbar's left block (logo + collapse button) sits on the dark
 * sidebar colour and is exactly as wide as the sidebar, so the collapse
 * arrow lines up with the menu's right edge. Collapsed, only the logo mark
 * stays; hovering it reveals the expand arrow in its place. Before Alpine
 * starts (sidebar still [x-cloak]) the saved state on <html> decides.
 */
@media (min-width: 64rem) {
    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar {
        padding-inline-start: 0;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-start {
        position: relative;
        align-self: stretch;
        flex-shrink: 0;
        width: var(--sidebar-width);
        margin-inline-end: 1rem;
        padding-inline: 1rem 0.75rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        background: var(--ippbx-sidebar-bg);
        border-inline-end: 1px solid rgba(255, 255, 255, 0.04);
    }

    /* Animate only when the user toggles, not while the page starts. */
    body:has(.fi-main-sidebar:not([x-cloak])) .fi-topbar-start {
        transition: width 0.2s ease;
    }

    /* Until Alpine starts both arrows are in the DOM; show only the right one. */
    body:has(.fi-main-sidebar[x-cloak]) .fi-topbar-open-collapse-sidebar-btn,
    html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]) .fi-topbar-close-collapse-sidebar-btn {
        display: none;
    }

    html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]) .fi-topbar-open-collapse-sidebar-btn {
        display: flex;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-start > a {
        order: 1;
        min-width: 0;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-collapse-sidebar-btn-ctn {
        order: 2;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-start .fi-logo {
        color: #fff;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-start .fi-icon-btn {
        color: var(--ippbx-sidebar-muted);
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-start .fi-icon-btn:hover,
    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-start .fi-icon-btn:focus-visible {
        color: #fff;
        background-color: var(--ippbx-sidebar-hover);
    }

    /* Collapsed: icon-only, centred over the icon-only menu. */
    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start {
        width: var(--collapsed-sidebar-width);
        padding-inline: 0;
        justify-content: center;
    }

    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start .ippbx-logo-text {
        display: none;
    }

    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-collapse-sidebar-btn-ctn {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    /* The whole icon area expands the menu, not just the 36px arrow. */
    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-open-collapse-sidebar-btn {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start > a {
        transition: opacity 0.15s ease;
    }

    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start:hover .fi-topbar-collapse-sidebar-btn-ctn,
    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start:focus-within .fi-topbar-collapse-sidebar-btn-ctn {
        opacity: 1;
    }

    /*
     * Global search sits on the left, right after the logo block; the
     * tenant switcher and the user menu stay on the right. The end block
     * is flattened so its items can be ordered against the logo block.
     */
    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-end {
        display: contents;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-end > * {
        order: 2;
        margin-inline-start: 1rem;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-end > .fi-global-search-ctn {
        order: 1;
        margin-inline: 0 auto;
    }

    .fi-body-has-sidebar-collapsible-on-desktop .fi-topbar-end > .fi-global-search-ctn .fi-global-search-field {
        width: 22rem;
    }

    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start:hover > a,
    :is(html.ippbx-sidebar-collapsed body:has(.fi-main-sidebar[x-cloak]), body:has(.fi-main-sidebar:not([x-cloak]):not(.fi-sidebar-open))) .fi-topbar-start:focus-within > a {
        opacity: 0;
    }
}

/* ---------- Cards, sections, tables ---------- */

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-chart .fi-section {
    border-radius: 1rem !important;
    box-shadow: var(--ippbx-card-shadow) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.dark .fi-section:not(.fi-section-not-contained),
.dark .fi-ta-ctn,
.dark .fi-wi-stats-overview-stat {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Stat cards get a thin accent bar so the dashboard reads at a glance. */
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
}

.fi-wi-stats-overview-stat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ippbx-accent), var(--ippbx-accent-2));
    opacity: 0.85;
}

.fi-wi-stats-overview-stat-value {
    letter-spacing: -0.02em;
}

.fi-ta-header-cell {
    text-transform: uppercase;
    font-size: 0.7rem !important;
    letter-spacing: 0.06em;
}

/* ---------- Login ---------- */

.fi-simple-layout {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.35), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(6, 182, 212, 0.30), transparent 60%),
        linear-gradient(160deg, #0b1220 0%, #111a2e 100%);
}

.fi-simple-main {
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fi-simple-header .fi-logo {
    color: #0f172a;
}

.dark .fi-simple-header .fi-logo {
    color: #fff;
}

.fi-simple-header-heading {
    letter-spacing: -0.02em;
}

.ippbx-login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

.ippbx-login-aside {
    display: none;
}

/*
 * Desktop: split screen. The brand side (login-aside view) is dark navy
 * with the gradient glow; the form sits on a calm light side.
 */
@media (min-width: 64rem) {
    .fi-simple-layout:has(> .ippbx-login-aside) {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        align-items: stretch;
        min-height: 100dvh;
        padding: 0;
        background: var(--ippbx-page-bg);
    }

    .fi-simple-layout:has(> .ippbx-login-aside) .fi-simple-main-ctn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 3rem 2rem;
        width: 100%;
    }

    .fi-simple-layout:has(> .ippbx-login-aside) .fi-simple-main {
        width: 100%;
        max-width: 27rem;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 20px 50px -20px rgba(15, 23, 42, 0.18) !important;
        border: 1px solid rgba(15, 23, 42, 0.06);
    }

    .dark .fi-simple-layout:has(> .ippbx-login-aside) .fi-simple-main {
        border-color: rgba(255, 255, 255, 0.06);
    }

    /* The brand side already shows the logo and the footer line. */
    .fi-simple-layout:has(> .ippbx-login-aside) .fi-simple-header .fi-logo,
    .fi-simple-layout:has(> .ippbx-login-aside) .ippbx-login-footer {
        display: none;
    }

    .ippbx-login-aside {
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 2rem;
        padding: 2.75rem 3.5rem;
        color: #fff;
        background:
            radial-gradient(900px 500px at -10% -10%, rgba(99, 102, 241, 0.55), transparent 65%),
            radial-gradient(700px 420px at 110% 110%, rgba(6, 182, 212, 0.42), transparent 60%),
            linear-gradient(160deg, #0b1220 0%, #111a2e 100%);
    }

    /* Faint concentric rings behind the text, like a call going out. */
    .ippbx-login-aside::before {
        content: "";
        position: absolute;
        width: 46rem;
        height: 46rem;
        right: -18rem;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 9999px;
        background: repeating-radial-gradient(circle, transparent 0 3.5rem, rgba(255, 255, 255, 0.045) 3.5rem calc(3.5rem + 1px));
        pointer-events: none;
    }

    .ippbx-login-aside > * {
        position: relative;
    }

    .ippbx-login-aside .ippbx-logo-mark {
        height: 2.5rem;
        width: 2.5rem;
    }

    .ippbx-login-aside .ippbx-logo-text {
        font-size: 1.6rem;
    }

    .ippbx-login-aside-body {
        max-width: 30rem;
    }

    .ippbx-login-aside-heading {
        font-size: clamp(2rem, 3vw, 2.75rem);
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: -0.03em;
    }

    .ippbx-login-aside-text {
        margin-top: 1rem;
        font-size: 1.05rem;
        line-height: 1.6;
        color: var(--ippbx-sidebar-text);
    }

    .ippbx-login-features {
        margin-top: 2.25rem;
        display: grid;
        gap: 0.9rem;
        font-size: 0.95rem;
        font-weight: 500;
    }

    .ippbx-login-features li {
        display: flex;
        align-items: center;
        gap: 0.85rem;
    }

    .ippbx-login-feature-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        flex-shrink: 0;
        border-radius: 0.7rem;
        color: #a5b4fc;
        background: rgba(99, 102, 241, 0.16);
        border: 1px solid rgba(165, 180, 252, 0.18);
    }

    .ippbx-login-feature-icon .fi-icon {
        width: 1.2rem;
        height: 1.2rem;
    }

    .ippbx-login-aside-bottom {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        font-size: 0.75rem;
        color: var(--ippbx-sidebar-muted);
    }

    .ippbx-login-wave {
        width: 15rem;
        height: 2.5rem;
    }

    .ippbx-login-wave rect {
        fill: #818cf8;
        opacity: 0.55;
        transform-box: fill-box;
        transform-origin: center;
        animation: ippbx-wave 1.6s ease-in-out infinite;
    }

    @keyframes ippbx-wave {
        0%, 100% { transform: scaleY(1); }
        50% { transform: scaleY(0.45); }
    }

    @media (prefers-reduced-motion: reduce) {
        .ippbx-login-wave rect {
            animation: none;
        }
    }
}

/* ---------- Sidebar footer status ---------- */

.ippbx-sidebar-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--ippbx-sidebar-text);
}

.ippbx-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.ippbx-dot-on {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.ippbx-dot-off {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.fi-sidebar-collapsed .ippbx-sidebar-status-text,
.fi-main-sidebar:not(.fi-sidebar-open) .ippbx-sidebar-status-text {
    display: none;
}

/* ---------- Page header ---------- */

.fi-header-subheading {
    max-width: 60rem;
    color: rgb(100 116 139);
}

/* ---------- Tables ---------- */

.fi-ta-ctn {
    overflow: hidden;
}

.fi-ta-header-ctn,
.fi-ta-header-toolbar {
    background: rgba(248, 250, 252, 0.7);
}

.dark .fi-ta-header-ctn,
.dark .fi-ta-header-toolbar {
    background: rgba(255, 255, 255, 0.02);
}

.fi-ta-table thead tr {
    background: rgb(248 250 252);
}

.dark .fi-ta-table thead tr {
    background: rgba(255, 255, 255, 0.03);
}

.fi-ta-header-cell {
    color: rgb(100 116 139) !important;
}

.fi-ta-row {
    transition: background-color 0.12s ease;
}

.fi-ta-row:hover {
    background: rgba(99, 102, 241, 0.045) !important;
}

.dark .fi-ta-row:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

.fi-ta-empty-state-icon-bg {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(6, 182, 212, 0.14)) !important;
}

/* ---------- Forms and detail pages ---------- */

.fi-section-header {
    padding-bottom: 0.9rem;
}

.fi-section-header .fi-section-header-heading {
    font-weight: 650;
    letter-spacing: -0.01em;
}

.fi-section-header-icon {
    color: var(--ippbx-accent) !important;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.6rem;
    padding: 0.35rem;
    width: 2rem !important;
    height: 2rem !important;
}

.fi-section-content-ctn {
    border-top-color: rgba(15, 23, 42, 0.06) !important;
}

.fi-fo-repeater-item {
    border-radius: 0.8rem !important;
}

.fi-in-entry-label,
.fi-fo-field-label-content {
    font-weight: 550;
}

.fi-badge {
    border-radius: 9999px !important;
}

/* ---------- Recording player ---------- */

.ippbx-player {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.ippbx-player audio {
    height: 2rem;
    width: 15rem;
    /* Tables squeeze cells; below this the native play button disappears. */
    min-width: 13rem;
}

.ippbx-player-wide {
    display: flex;
    width: 100%;
}

.ippbx-player-wide audio {
    flex: 1;
    width: auto;
    height: 2.5rem;
}

.ippbx-player-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    color: rgb(71 85 105);
    background: rgb(241 245 249);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ippbx-player-download:hover {
    color: #fff;
    background: var(--ippbx-accent);
}

.ippbx-player-download-label {
    width: auto;
    padding: 0 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.dark .ippbx-player-download {
    color: rgb(203 213 225);
    background: rgba(255, 255, 255, 0.08);
}

.ippbx-muted {
    color: rgb(148 163 184);
}

/* ---------- Tenant switcher (topbar, super admins) ---------- */

.ippbx-tenant-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.25rem;
    padding: 0 0.4rem 0 0.7rem;
    margin-inline-end: 0.5rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
}

.dark .ippbx-tenant-switcher {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.ippbx-tenant-switcher-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: rgb(100 116 139);
    flex-shrink: 0;
}

.ippbx-tenant-switcher select {
    border: 0;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 1.8rem 0 0;
    max-width: 14rem;
    color: inherit;
    cursor: pointer;
}

.ippbx-tenant-switcher select:focus {
    outline: none;
    box-shadow: none;
}

/* A picked tenant is highlighted so it is obvious the panel is narrowed down. */
.ippbx-tenant-switcher-active {
    border-color: var(--ippbx-accent);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ippbx-tenant-switcher-active .ippbx-tenant-switcher-icon {
    color: var(--ippbx-accent);
}

.dark .ippbx-tenant-switcher-active {
    background: rgba(99, 102, 241, 0.16);
}

/* ---------- Sidebar scrollbar: thin and dark, brighter on hover ---------- */

.fi-sidebar,
.fi-sidebar * {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.fi-sidebar:hover,
.fi-sidebar:hover * {
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.fi-sidebar ::-webkit-scrollbar,
.fi-sidebar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fi-sidebar ::-webkit-scrollbar-track,
.fi-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.fi-sidebar ::-webkit-scrollbar-thumb,
.fi-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
}

.fi-sidebar:hover ::-webkit-scrollbar-thumb,
.fi-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
}

/* ---------- Güvenlik page: suspicious attempts list ---------- */

.ippbx-security-table-wrap {
    overflow-x: auto;
}

.ippbx-security-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ippbx-security-table th {
    text-align: start;
    font-weight: 600;
    color: rgb(100 116 139);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    white-space: nowrap;
}

.ippbx-security-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    vertical-align: middle;
    white-space: nowrap;
}

.dark .ippbx-security-table th {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .ippbx-security-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.ippbx-security-table tbody tr:last-child td {
    border-bottom: 0;
}

.ippbx-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ippbx-security-user {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ippbx-security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ippbx-security-badges .fi-badge {
    flex-shrink: 0;
}

.ippbx-security-action {
    text-align: end;
    white-space: nowrap;
}

.ippbx-security-empty {
    font-size: 0.875rem;
    color: rgb(100 116 139);
}

/* ------------------------------------------------------------------ web phone (extension panel) */

.ippbx-wp {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: .75rem;
    font-size: .875rem;
}

.ippbx-wp-fab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 3.25rem;
    min-width: 3.25rem;
    padding: 0 1rem;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: #4f46e5;
    box-shadow: 0 10px 25px -5px rgb(15 23 42 / .35);
    position: relative;
}

.ippbx-wp-fab svg { width: 1.35rem; height: 1.35rem; }
.ippbx-wp-fab-call { background: #16a34a; }
.ippbx-wp-fab-time { font-weight: 600; font-variant-numeric: tabular-nums; }

.ippbx-wp-fab::after {
    content: "";
    position: absolute;
    top: .2rem;
    right: .2rem;
    width: .7rem;
    height: .7rem;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #94a3b8;
}

.ippbx-wp-fab.ippbx-wp-ok::after { background: #22c55e; }
.ippbx-wp-fab.ippbx-wp-bad::after { background: #ef4444; }
.ippbx-wp-fab.ippbx-wp-wait::after { background: #f59e0b; }

.ippbx-wp-panel {
    width: 18rem;
    border-radius: .9rem;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px -12px rgb(15 23 42 / .35);
    overflow: hidden;
}

.dark .ippbx-wp-panel { background: #0f172a; color: #e2e8f0; border-color: #1e293b; }

.ippbx-wp-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .9rem;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.dark .ippbx-wp-head { border-color: #1e293b; }

.ippbx-wp-status { margin-left: auto; font-weight: 400; font-size: .75rem; color: #64748b; }
.ippbx-wp-close { font-size: 1.25rem; line-height: 1; color: #94a3b8; padding: 0 .15rem; }

.ippbx-wp-dot { width: .55rem; height: .55rem; border-radius: 999px; background: #94a3b8; flex: none; }
.ippbx-wp-dot.ippbx-wp-ok { background: #22c55e; }
.ippbx-wp-dot.ippbx-wp-bad { background: #ef4444; }
.ippbx-wp-dot.ippbx-wp-wait { background: #f59e0b; }

.ippbx-wp-note { margin: .7rem .9rem 0; font-size: .75rem; color: #64748b; }

.ippbx-wp-dial, .ippbx-wp-call { padding: .9rem; display: flex; flex-direction: column; gap: .7rem; }

.ippbx-wp-input {
    width: 100%;
    padding: .55rem .7rem;
    border-radius: .55rem;
    border: 1px solid #cbd5e1;
    background: transparent;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: .04em;
}

.dark .ippbx-wp-input { border-color: #334155; }

.ippbx-wp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }

.ippbx-wp-key {
    padding: .55rem 0;
    border-radius: .55rem;
    background: #f1f5f9;
    font-size: 1.05rem;
    font-weight: 600;
}

.dark .ippbx-wp-key { background: #1e293b; }
.ippbx-wp-key:hover { background: #e2e8f0; }
.dark .ippbx-wp-key:hover { background: #334155; }

.ippbx-wp-row { display: flex; gap: .45rem; }

.ippbx-wp-btn {
    flex: 1;
    padding: .55rem .5rem;
    border-radius: .55rem;
    background: #f1f5f9;
    font-weight: 600;
}

.dark .ippbx-wp-btn { background: #1e293b; }
.ippbx-wp-btn[disabled] { opacity: .5; cursor: not-allowed; }
.ippbx-wp-btn.ippbx-wp-on { background: #e0e7ff; color: #3730a3; }
.dark .ippbx-wp-btn.ippbx-wp-on { background: #312e81; color: #e0e7ff; }
.ippbx-wp-green { background: #16a34a !important; color: #fff !important; }
.ippbx-wp-red { background: #dc2626 !important; color: #fff !important; }
.ippbx-wp-wide { width: 100%; }

.ippbx-wp-peer { font-size: 1.15rem; font-weight: 700; text-align: center; }
.ippbx-wp-sub { text-align: center; font-size: .8rem; color: #64748b; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
    .ippbx-wp { right: .75rem; bottom: .75rem; }
    .ippbx-wp-panel { width: calc(100vw - 1.5rem); }
}
.ippbx-wp-warn { color: #b45309; }
.dark .ippbx-wp-warn { color: #fbbf24; }

/* ------------------------------------------------------------------ call center: agent status (extension panel) */

.ippbx-agent-status { margin-inline-end: .75rem; }

.ippbx-agent-status-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
}

.dark .ippbx-agent-status-button { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }

.ippbx-agent-dot { width: .55rem; height: .55rem; border-radius: 999px; background: #94a3b8; }
.ippbx-agent-available .ippbx-agent-dot { background: #22c55e; }
.ippbx-agent-break .ippbx-agent-dot { background: #f59e0b; }
.ippbx-agent-available { border-color: #bbf7d0; }
.ippbx-agent-break { border-color: #fde68a; }
.ippbx-agent-timer { font-weight: 400; color: #64748b; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
    .ippbx-agent-timer { display: none; }
}

/* ------------------------------------------------------------------ call center: supervisor cards */

.ippbx-cc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; }

.ippbx-cc-card {
    border-radius: .75rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #94a3b8;
}

.dark .ippbx-cc-card { background: #0f172a; border-color: #1e293b; }
.ippbx-cc-card-label { font-size: .75rem; color: #64748b; }
.ippbx-cc-card-value { font-size: 1.5rem; font-weight: 700; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.ippbx-cc-success { border-top-color: #22c55e; }
.ippbx-cc-info { border-top-color: #3b82f6; }
.ippbx-cc-warning { border-top-color: #f59e0b; }
.ippbx-cc-danger { border-top-color: #ef4444; }
.ippbx-cc-danger .ippbx-cc-card-value { color: #dc2626; }

/* ------------------------------------------------------------------ topbar user menu */

.ippbx-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .25rem .6rem .25rem .25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease;
}

.ippbx-user-trigger:hover,
.ippbx-user-trigger[aria-expanded="true"] {
    background: rgba(15, 23, 42, .04);
    border-color: rgba(15, 23, 42, .08);
}

.dark .ippbx-user-trigger:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .08);
}

.ippbx-user-trigger .fi-avatar {
    width: 2.1rem;
    height: 2.1rem;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(99, 102, 241, .35);
}

.dark .ippbx-user-trigger .fi-avatar {
    box-shadow: 0 0 0 2px #0b1120, 0 0 0 3px rgba(99, 102, 241, .45);
}

.ippbx-user-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: start;
    max-width: 12rem;
}

.ippbx-user-trigger-name {
    font-size: .8125rem;
    font-weight: 600;
    color: rgb(15 23 42);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .ippbx-user-trigger-name { color: #fff; }

.ippbx-user-trigger-role {
    font-size: .7rem;
    color: rgb(100 116 139);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ippbx-user-trigger-chevron {
    width: 1rem;
    height: 1rem;
    color: rgb(148 163 184);
}

@media (max-width: 640px) {
    .ippbx-user-trigger { padding: 0; border: 0; }
    .ippbx-user-trigger-text,
    .ippbx-user-trigger-chevron { display: none; }
}

.ippbx-user-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(6, 182, 212, .06));
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.dark .ippbx-user-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(6, 182, 212, .08));
    border-bottom-color: rgba(255, 255, 255, .06);
}

.ippbx-user-card .fi-avatar {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
}

.ippbx-user-card-text { min-width: 0; }

.ippbx-user-card-name {
    font-size: .9rem;
    font-weight: 650;
    color: rgb(15 23 42);
}

.dark .ippbx-user-card-name { color: #fff; }

.ippbx-user-card-identity {
    font-size: .75rem;
    color: rgb(100 116 139);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ippbx-user-card-role {
    display: inline-block;
    margin-top: .35rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
    color: #4338ca;
    background: rgba(99, 102, 241, .12);
}

.dark .ippbx-user-card-role { color: #c7d2fe; background: rgba(99, 102, 241, .25); }

/* ------------------------------------------------------------------ page trail: Dahililer / 1001 / Düzenle */

.ippbx-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .1rem;
    margin: 0 0 .6rem -.5rem;
    font-size: .875rem;
}

.ippbx-crumb-sep {
    color: rgb(203 213 225);
    padding: 0 .25rem;
    user-select: none;
}

.dark .ippbx-crumb-sep { color: rgb(71 85 105); }

.ippbx-crumb {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 2rem;
    padding: 0 .5rem;
    border-radius: .55rem;
    color: rgb(100 116 139);
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

a.ippbx-crumb:hover,
button.ippbx-crumb:hover {
    color: rgb(15 23 42);
    background: rgba(15, 23, 42, .05);
}

.dark .ippbx-crumb { color: rgb(148 163 184); }

.dark a.ippbx-crumb:hover,
.dark button.ippbx-crumb:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.ippbx-crumb-current { color: rgb(15 23 42); font-weight: 600; }
.dark .ippbx-crumb-current { color: #fff; }

.ippbx-crumb-split { display: inline-flex; align-items: center; }
.ippbx-crumb-more { padding: 0 .3rem; margin-inline-start: -.2rem; }

.ippbx-crumb-icon { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.ippbx-crumb-chevron { width: .9rem; height: .9rem; color: rgb(148 163 184); flex-shrink: 0; }


/* ------------------------------------------------------------------ flow designer (public/js/ippbx-flow.js, Drawflow) */

.ippbx-flow {
    --flow-head: 64px;
    --flow-row: 28px;
    --flow-dot: 12px;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow: var(--ippbx-card-shadow);
    overflow: hidden;
}

.dark .ippbx-flow { background: #0f172a; border-color: rgba(255, 255, 255, .06); }

.ippbx-flow-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.dark .ippbx-flow-toolbar { border-bottom-color: rgba(255, 255, 255, .06); }

.ippbx-flow-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .75rem; color: rgb(100 116 139); }
.ippbx-flow-legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.ippbx-flow-swatch { width: .7rem; height: .7rem; border-radius: .2rem; background: var(--flow-color); }

.ippbx-flow-zoom { display: inline-flex; border: 1px solid rgba(15, 23, 42, .12); border-radius: .55rem; overflow: hidden; }
.ippbx-flow-zoom button { padding: .3rem .7rem; font-size: .85rem; font-weight: 600; color: rgb(51 65 85); }
.ippbx-flow-zoom button + button { border-inline-start: 1px solid rgba(15, 23, 42, .12); }
.ippbx-flow-zoom button:hover { background: rgba(15, 23, 42, .05); }
.dark .ippbx-flow-zoom { border-color: rgba(255, 255, 255, .12); }
.dark .ippbx-flow-zoom button { color: rgb(203 213 225); }
.dark .ippbx-flow-zoom button + button { border-color: rgba(255, 255, 255, .12); }

.ippbx-flow-actions { display: flex; align-items: center; gap: .5rem; }

.ippbx-flow-body { display: flex; }

.ippbx-flow-canvas {
    flex: 1;
    min-width: 0;
    height: calc(100vh - 17rem);
    min-height: 28rem;
    background-color: #f8fafc;
    background-image: radial-gradient(rgba(15, 23, 42, .09) 1px, transparent 1px);
    background-size: 18px 18px;
    cursor: grab;
}

.dark .ippbx-flow-canvas { background-color: #0b1120; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); }

/* Box colours by type. */
.ippbx-flow-did { --flow-color: #0f172a; }
.ippbx-flow-time { --flow-color: #f59e0b; }
.ippbx-flow-ivr { --flow-color: #6366f1; }
.ippbx-flow-ring { --flow-color: #14b8a6; }
.ippbx-flow-queue { --flow-color: #0ea5e9; }
.ippbx-flow-ann { --flow-color: #a855f7; }
.ippbx-flow-api { --flow-color: #65a30d; }
.ippbx-flow-cond { --flow-color: #d946ef; }
.ippbx-flow-conf { --flow-color: #0891b2; }
.ippbx-flow-ai { --flow-color: #7c3aed; }
.ippbx-flow-fax { --flow-color: #78716c; }
.ippbx-flow-ext { --flow-color: #22c55e; }
.ippbx-flow-vm { --flow-color: #64748b; }
.ippbx-flow-out { --flow-color: #ec4899; }
.ippbx-flow-unknown { --flow-color: #ef4444; }
.dark .ippbx-flow-did { --flow-color: #94a3b8; }

.drawflow .drawflow-node.ippbx-flow-node {
    width: 250px;
    min-height: 0;
    padding: 0;
    align-items: stretch;
    background: #fff;
    color: rgb(15 23 42);
    border: 1px solid rgba(15, 23, 42, .12);
    border-top: 4px solid var(--flow-color);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px -8px rgba(15, 23, 42, .18);
    cursor: pointer;
}

.dark .drawflow .drawflow-node.ippbx-flow-node { background: #111a2e; color: #e2e8f0; border-color: rgba(255, 255, 255, .1); border-top-color: var(--flow-color); }
.drawflow .drawflow-node.ippbx-flow-node:hover { box-shadow: 0 0 0 3px rgba(99, 102, 241, .25), 0 6px 16px -8px rgba(15, 23, 42, .18); }
.drawflow .drawflow-node.ippbx-flow-node.selected { background: #fff; }
.dark .drawflow .drawflow-node.ippbx-flow-node.selected { background: #111a2e; }
.drawflow .drawflow-node.ippbx-flow-disabled { opacity: .55; }
.drawflow .drawflow-node.ippbx-flow-unknown { background: #fef2f2; }

.ippbx-flow-box { display: block; color: inherit; text-decoration: none; }

.ippbx-flow-head {
    height: var(--flow-head);
    padding: .55rem .8rem 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.ippbx-flow-type { font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--flow-color); }
.ippbx-flow-title { font-size: .85rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.ippbx-flow-row {
    height: var(--flow-row);
    padding: 0 1.1rem 0 .8rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: .78rem;
    font-weight: 500;
    color: rgb(51 65 85);
}

.dark .ippbx-flow-row { color: rgb(203 213 225); }
.ippbx-flow-row + .ippbx-flow-row { border-top: 1px dashed rgba(15, 23, 42, .06); }
.ippbx-flow-row-empty { color: rgb(148 163 184); font-style: italic; }

.ippbx-flow-detail {
    padding: .35rem .8rem;
    font-size: .72rem;
    color: rgb(100 116 139);
    border-top: 1px solid rgba(15, 23, 42, .06);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Input dot at the header, one output dot per row, lined up with its label. */
.drawflow .drawflow-node.ippbx-flow-node .inputs,
.drawflow .drawflow-node.ippbx-flow-node .outputs {
    display: flex;
    flex-direction: column;
    padding-top: var(--flow-head);
}

.drawflow .drawflow-node.ippbx-flow-node .inputs { padding-top: calc(var(--flow-head) / 2 - var(--flow-dot) / 2); }

.drawflow .drawflow-node.ippbx-flow-node .input,
.drawflow .drawflow-node.ippbx-flow-node .output {
    width: var(--flow-dot);
    height: var(--flow-dot);
    margin: 0;
    top: 0;
    border: 2px solid #fff;
    background: var(--flow-color);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .2);
    cursor: default;
}

.drawflow .drawflow-node.ippbx-flow-node .input { left: calc(var(--flow-dot) / -2 - 1px); background: #94a3b8; }

.drawflow .drawflow-node.ippbx-flow-node .output {
    right: calc(var(--flow-dot) / 2 + 1px);
    margin-block: calc((var(--flow-row) - var(--flow-dot)) / 2);
}

.ippbx-flow .drawflow .connection .main-path {
    stroke: #94a3b8;
    stroke-width: 2px;
    pointer-events: none;
}

.dark .ippbx-flow .drawflow .connection .main-path { stroke: #475569; }

/* ---------- editing ---------- */

.ippbx-flow:not(.ippbx-flow-editing) .ippbx-flow-editing-only { display: none; }
.ippbx-flow-editing [data-flow="edit"] { display: none; }
.ippbx-flow-saving { opacity: .6; pointer-events: none; }

.ippbx-flow-editing .ippbx-flow-canvas { background-color: #f5f7ff; }
.dark .ippbx-flow-editing .ippbx-flow-canvas { background-color: #0d1326; }
.ippbx-flow-editing .drawflow .drawflow-node.ippbx-flow-node { cursor: move; }

.ippbx-flow-editing .drawflow .drawflow-node.ippbx-flow-node .output {
    cursor: crosshair;
    transform: scale(1.25);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .25);
}

.ippbx-flow-editing .drawflow .drawflow-node.ippbx-flow-node .input { background: var(--ippbx-accent); transform: scale(1.25); }
.ippbx-flow-editing .drawflow .drawflow-node.ippbx-flow-node.selected { box-shadow: 0 0 0 3px rgba(99, 102, 241, .45); }
.ippbx-flow-editing .drawflow .connection .main-path { pointer-events: all; stroke-width: 3px; cursor: pointer; }
.ippbx-flow-editing .drawflow .connection .main-path:hover { stroke: var(--ippbx-accent); }
.ippbx-flow .drawflow .connection .main-path.selected { stroke: #ef4444; }

.ippbx-flow .drawflow-delete {
    width: 24px;
    height: 24px;
    line-height: 20px;
    font-size: 14px;
    background: #ef4444;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .3);
}

.ippbx-flow-panel {
    width: 19rem;
    flex-shrink: 0;
    height: calc(100vh - 17rem);
    min-height: 28rem;
    overflow-y: auto;
    padding: 1rem;
    border-inline-start: 1px solid rgba(15, 23, 42, .06);
    font-size: .8rem;
}

.dark .ippbx-flow-panel { border-color: rgba(255, 255, 255, .06); }

.ippbx-flow-hint { color: rgb(100 116 139); line-height: 1.5; }
.ippbx-flow-panel-section { margin-top: 1.1rem; }
.ippbx-flow-panel-title { font-weight: 650; margin-bottom: .45rem; }

.ippbx-flow-panel select,
.ippbx-flow-panel input {
    width: 100%;
    height: 2.1rem;
    padding: 0 .6rem;
    border-radius: .5rem;
    border: 1px solid rgba(15, 23, 42, .14);
    background: transparent;
    font-size: .8rem;
}

.dark .ippbx-flow-panel select,
.dark .ippbx-flow-panel input { border-color: rgba(255, 255, 255, .14); }

.ippbx-flow-outside { display: flex; gap: .4rem; margin-top: .45rem; }
.ippbx-flow-outside button { padding: 0 .8rem; border-radius: .5rem; font-weight: 600; background: rgba(99, 102, 241, .1); color: #4338ca; }
.dark .ippbx-flow-outside button { color: #c7d2fe; background: rgba(99, 102, 241, .2); }

.ippbx-flow-changes { display: grid; gap: .5rem; list-style: decimal; padding-inline-start: 1.1rem; }
.ippbx-flow-changes li { line-height: 1.45; }
.ippbx-flow-from { color: rgb(148 163 184); text-decoration: line-through; }
.ippbx-flow-to { color: #4338ca; font-weight: 600; }
.dark .ippbx-flow-to { color: #a5b4fc; }
.ippbx-flow-none { color: rgb(148 163 184); }

@media (max-width: 900px) {
    .ippbx-flow-body { flex-direction: column; }
    .ippbx-flow-panel { width: auto; height: auto; min-height: 0; border-inline-start: 0; border-top: 1px solid rgba(15, 23, 42, .06); }
}

/* ------------------------------------------------------------------ Seslendirme (TTS) page */

.ippbx-tts-try { display: grid; gap: .75rem; justify-items: start; }

.ippbx-tts-try textarea {
    width: 100%;
    padding: .6rem .75rem;
    border-radius: .6rem;
    border: 1px solid rgba(15, 23, 42, .14);
    background: transparent;
    font-size: .9rem;
}

.dark .ippbx-tts-try textarea { border-color: rgba(255, 255, 255, .14); }
.ippbx-tts-player { width: 100%; margin-top: 1rem; }

/* ------------------------------------------------------------------ API query: integration guide */

.ippbx-api-guide { font-size: .85rem; line-height: 1.55; color: rgb(51 65 85); }
.dark .ippbx-api-guide { color: rgb(203 213 225); }
.ippbx-api-guide h4 { margin: 1.1rem 0 .4rem; font-weight: 650; color: rgb(15 23 42); }
.dark .ippbx-api-guide h4 { color: #fff; }
.ippbx-api-guide ul { list-style: disc; padding-inline-start: 1.2rem; display: grid; gap: .25rem; }
.ippbx-api-guide code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; padding: .05rem .3rem; border-radius: .3rem; background: rgba(15, 23, 42, .06); }
.dark .ippbx-api-guide code { background: rgba(255, 255, 255, .08); }

.ippbx-api-guide pre {
    margin: .3rem 0;
    padding: .75rem .9rem;
    border-radius: .6rem;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .76rem;
    line-height: 1.5;
    color: #e2e8f0;
    background: #0f172a;
}

.ippbx-api-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .75rem; }
.ippbx-api-guide-label { font-weight: 600; font-size: .78rem; color: rgb(100 116 139); }

/* ------------------------------------------------------------------ API query: "Sorguyu dene" answer */

.ippbx-api-test { display: grid; gap: .75rem; font-size: .85rem; }

.ippbx-api-test-outcome {
    display: grid;
    gap: .3rem;
    padding: .75rem .9rem;
    border-radius: .7rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-inline-start: 4px solid #94a3b8;
    background: rgba(15, 23, 42, .02);
}

.ippbx-api-test-success, .ippbx-api-test-rule { border-inline-start-color: #22c55e; }
.ippbx-api-test-ask { border-inline-start-color: #f59e0b; }
.ippbx-api-test-failed { border-inline-start-color: #ef4444; }
.ippbx-api-test-head { display: flex; justify-content: space-between; gap: 1rem; }
.ippbx-api-test-head span { color: rgb(100 116 139); font-size: .78rem; }
.ippbx-api-test-title { font-weight: 650; }
.ippbx-api-test-title span { font-weight: 400; color: rgb(100 116 139); font-size: .78rem; margin-inline-start: .4rem; }

.ippbx-api-test-fields { width: 100%; border-collapse: collapse; }
.ippbx-api-test-fields td { padding: .35rem .5rem; border-bottom: 1px solid rgba(15, 23, 42, .06); vertical-align: top; }
.ippbx-api-test-fields td:first-child { width: 45%; white-space: nowrap; }
.dark .ippbx-api-test-fields td { border-bottom-color: rgba(255, 255, 255, .06); }
.ippbx-api-test code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; padding: .05rem .3rem; border-radius: .3rem; background: rgba(15, 23, 42, .06); }
.dark .ippbx-api-test code { background: rgba(255, 255, 255, .08); }

/* ---------- flow designer: warnings, palette, quick settings ---------- */

.ippbx-flow-warnings {
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    font-size: .8rem;
}

.dark .ippbx-flow-warnings { border-bottom-color: rgba(255, 255, 255, .06); }

.ippbx-flow-warnings summary {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1rem;
    cursor: pointer;
    font-weight: 600;
    color: #b45309;
    list-style: none;
}

.ippbx-flow-warnings summary::-webkit-details-marker { display: none; }
.ippbx-flow-warnings summary span { font-weight: 400; color: rgb(148 163 184); }
.ippbx-flow-warnings-icon { width: 1rem; height: 1rem; }
.ippbx-flow-warnings ul { display: grid; gap: .2rem; padding: 0 1rem .7rem; max-height: 9rem; overflow-y: auto; }

.ippbx-flow-warning {
    width: 100%;
    text-align: start;
    padding: .3rem .55rem;
    border-radius: .45rem;
    border-inline-start: 3px solid #94a3b8;
    background: rgba(15, 23, 42, .03);
}

.ippbx-flow-warning:hover { background: rgba(99, 102, 241, .08); }
.ippbx-flow-warning-error { border-inline-start-color: #ef4444; }
.ippbx-flow-warning-warning { border-inline-start-color: #f59e0b; }
.dark .ippbx-flow-warning { background: rgba(255, 255, 255, .03); }

.ippbx-flow-palette { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }

.ippbx-flow-palette button,
.ippbx-flow-quick button,
.ippbx-flow-quick a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .55rem;
    border-radius: .5rem;
    border: 1px solid rgba(15, 23, 42, .1);
    font-size: .78rem;
    font-weight: 550;
    text-align: start;
}

.ippbx-flow-palette button:hover,
.ippbx-flow-quick button:hover,
.ippbx-flow-quick a:hover { border-color: var(--ippbx-accent); background: rgba(99, 102, 241, .06); }

.dark .ippbx-flow-palette button,
.dark .ippbx-flow-quick button,
.dark .ippbx-flow-quick a { border-color: rgba(255, 255, 255, .12); }

.ippbx-flow-quick { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.ippbx-flow-selected { padding: .7rem; border-radius: .7rem; background: rgba(99, 102, 241, .06); border: 1px solid rgba(99, 102, 241, .2); }

.ippbx-flow-keys { display: grid; gap: .2rem; }
.ippbx-flow-keys li { display: flex; justify-content: space-between; align-items: center; padding: .2rem .4rem; border-radius: .4rem; background: rgba(255, 255, 255, .6); }
.dark .ippbx-flow-keys li { background: rgba(255, 255, 255, .05); }
.ippbx-flow-keys button { color: #ef4444; font-size: 1rem; line-height: 1; padding: 0 .3rem; }

@keyframes ippbx-flow-focus {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    30%, 70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, .55); }
}

.drawflow .drawflow-node.ippbx-flow-node.ippbx-flow-focus { animation: ippbx-flow-focus 1.4s ease 2; }

/* API query guide: PDF and Postman downloads. */
.ippbx-api-guide-downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem; margin: .6rem 0 .2rem; }
.ippbx-api-guide-downloads a { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border: 1px solid rgb(226 232 240); border-radius: .6rem; background: #fff; transition: border-color .15s, background .15s; }
.ippbx-api-guide-downloads a:hover { border-color: var(--primary-400); background: rgb(248 250 252); }
.ippbx-api-guide-downloads svg { width: 1.6rem; height: 1.6rem; flex: none; color: var(--primary-600); }
.ippbx-api-guide-downloads span { display: grid; line-height: 1.3; }
.ippbx-api-guide-downloads b { color: rgb(15 23 42); font-weight: 600; }
.ippbx-api-guide-downloads small { color: rgb(100 116 139); font-size: .75rem; }
.dark .ippbx-api-guide-downloads a { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); }
.dark .ippbx-api-guide-downloads a:hover { background: rgba(255, 255, 255, .06); }
.dark .ippbx-api-guide-downloads b { color: #fff; }

/* ------------------------------------------------------------------ API query flow designer (public/js/ippbx-api-flow.js) */

.ippbx-apiflow-start { --flow-color: #0f172a; }
.ippbx-apiflow-request { --flow-color: #65a30d; }
.ippbx-apiflow-count { --flow-color: #0ea5e9; }
.ippbx-apiflow-choose { --flow-color: #6366f1; }
.ippbx-apiflow-ask { --flow-color: #f59e0b; }
.ippbx-apiflow-condition { --flow-color: #d946ef; }
.ippbx-apiflow-say { --flow-color: #a855f7; }
.ippbx-apiflow-amount { --flow-color: #14b8a6; }
.ippbx-apiflow-sound { --flow-color: #8b5cf6; }
.ippbx-apiflow-transfer { --flow-color: #22c55e; }
.ippbx-apiflow-hangup { --flow-color: #ef4444; }
.dark .ippbx-apiflow-start { --flow-color: #94a3b8; }

.ippbx-apiflow-palette { display: flex; flex-wrap: wrap; gap: .35rem; }
.ippbx-apiflow-palette button {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .6rem; border-radius: .5rem; font-size: .75rem; font-weight: 600;
    border: 1px solid rgba(15, 23, 42, .12); color: rgb(51 65 85); background: #fff;
}
.ippbx-apiflow-palette button:hover { border-color: var(--flow-color, #6366f1); background: rgba(99, 102, 241, .05); }
.dark .ippbx-apiflow-palette button { background: transparent; color: rgb(203 213 225); border-color: rgba(255, 255, 255, .14); }

.ippbx-apiflow-panel { width: 22rem; }
.ippbx-apiflow-panel .ippbx-flow-panel-section:first-child { margin-top: 0; }
.ippbx-apiflow-panel .ippbx-flow-panel-title span { font-weight: 400; color: rgb(148 163 184); margin-inline-start: .3rem; }

.ippbx-apiflow-inspect { display: grid; gap: .55rem; padding: .7rem; border-radius: .7rem; border: 1px solid rgba(15, 23, 42, .1); border-top: 3px solid var(--flow-color); }
.dark .ippbx-apiflow-inspect { border-color: rgba(255, 255, 255, .1); border-top-color: var(--flow-color); }
.ippbx-apiflow-inspect > b { color: var(--flow-color); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.ippbx-apiflow-field { display: grid; gap: .25rem; font-weight: 500; color: rgb(51 65 85); }
.dark .ippbx-apiflow-field { color: rgb(203 213 225); }
.ippbx-apiflow-panel textarea {
    width: 100%; padding: .45rem .6rem; border-radius: .5rem; border: 1px solid rgba(15, 23, 42, .14);
    background: transparent; font-size: .8rem; line-height: 1.4; resize: vertical;
}
.dark .ippbx-apiflow-panel textarea { border-color: rgba(255, 255, 255, .14); }
.ippbx-apiflow-help { color: rgb(100 116 139); font-size: .72rem; line-height: 1.45; margin-top: -.25rem; }
.ippbx-apiflow-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ippbx-apiflow-check { display: flex; align-items: center; gap: .45rem; }
.ippbx-apiflow-panel .ippbx-apiflow-check input { width: auto; height: auto; }
.ippbx-apiflow-remove { justify-self: start; font-size: .75rem; font-weight: 600; color: #dc2626; }

.ippbx-apiflow-try { display: grid; gap: .5rem; }
.ippbx-apiflow-try label { display: grid; gap: .25rem; font-weight: 500; }

.ippbx-apiflow-steps { display: grid; gap: .3rem; margin-top: .7rem; list-style: none; padding: 0; }
.ippbx-apiflow-steps li { padding: .35rem .55rem; border-radius: .45rem; line-height: 1.4; background: rgba(15, 23, 42, .04); border-inline-start: 3px solid #94a3b8; }
.dark .ippbx-apiflow-steps li { background: rgba(255, 255, 255, .05); }
.ippbx-apiflow-step-say { border-color: #a855f7 !important; }
.ippbx-apiflow-step-caller { border-color: #f59e0b !important; }
.ippbx-apiflow-step-error { border-color: #ef4444 !important; color: #b91c1c; }
.ippbx-apiflow-step-end { border-color: #22c55e !important; font-weight: 600; }

.ippbx-apiflow-wait { display: grid; gap: .45rem; margin-top: .6rem; padding: .6rem; border-radius: .6rem; background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .35); }
.ippbx-apiflow-wait label { display: grid; gap: .25rem; font-weight: 600; }
.ippbx-apiflow-wait div { display: flex; gap: .4rem; }
.ippbx-apiflow-wait button { padding: .3rem .7rem; border-radius: .5rem; font-weight: 600; background: rgba(99, 102, 241, .12); color: #4338ca; }
.dark .ippbx-apiflow-wait button { color: #c7d2fe; }

.ippbx-apiflow-fields { display: grid; max-height: 22rem; overflow-y: auto; border: 1px solid rgba(15, 23, 42, .08); border-radius: .55rem; }
.ippbx-apiflow-fields button { display: grid; gap: .05rem; padding: .35rem .55rem; text-align: start; border-bottom: 1px solid rgba(15, 23, 42, .06); }
.ippbx-apiflow-fields button:hover { background: rgba(99, 102, 241, .07); }
.ippbx-apiflow-fields code { font-size: .72rem; color: #4338ca; }
.dark .ippbx-apiflow-fields code { color: #a5b4fc; }
.ippbx-apiflow-fields span { font-size: .72rem; color: rgb(100 116 139); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The path of the last try. */
.drawflow .drawflow-node.ippbx-flow-node.ippbx-apiflow-hit { box-shadow: 0 0 0 3px rgba(34, 197, 94, .55), 0 6px 16px -8px rgba(15, 23, 42, .18); }
.ippbx-flow .drawflow .connection.ippbx-apiflow-hit .main-path { stroke: #22c55e; stroke-width: 3.5px; }
.drawflow .drawflow-node.ippbx-flow-node .output.ippbx-apiflow-hit { background: #22c55e; }
.ippbx-apiflow .drawflow .connection .main-path { pointer-events: auto; cursor: pointer; }

@media (max-width: 900px) {
    .ippbx-apiflow-panel { width: auto; }
}

/* "Tam ekran": the designer over the whole browser window. */
.ippbx-apiflow.ippbx-apiflow-full { position: fixed; inset: 0; z-index: 50; border-radius: 0; border: 0; }
.ippbx-apiflow .ippbx-flow-canvas,
.ippbx-apiflow .ippbx-apiflow-panel { min-height: 0; }

.ippbx-apiflow-menu { --flow-color: #ea580c; }
.ippbx-apiflow-note { --flow-color: #ca8a04; }
.drawflow .drawflow-node.ippbx-flow-node.ippbx-apiflow-note { background: #fefce8; border-color: #fde68a; border-top-color: #ca8a04; }
.dark .drawflow .drawflow-node.ippbx-flow-node.ippbx-apiflow-note { background: #2a2410; border-color: #713f12; }
.ippbx-apiflow-note-text { padding: .7rem .85rem; font-size: .8rem; font-weight: 600; line-height: 1.4; white-space: pre-wrap; color: #713f12; }
.dark .ippbx-apiflow-note-text { color: #fde68a; }
.ippbx-apiflow-row { display: grid; grid-template-columns: 6.5rem 1fr 1.8rem; gap: .35rem; margin-bottom: .35rem; }
.ippbx-apiflow-row button { border-radius: .45rem; color: #dc2626; font-weight: 700; }
.ippbx-apiflow-row button:hover { background: rgba(220, 38, 38, .08); }
.ippbx-apiflow-add { justify-self: start; font-size: .75rem; font-weight: 600; color: #4338ca; }
.dark .ippbx-apiflow-add { color: #a5b4fc; }

/* ------------------------------------------------------------------ server status (ServerStatus page) */

.ippbx-server { display: grid; gap: 1rem; }
.ippbx-server-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.ippbx-server-card {
    --level: #6366f1;
    padding: 1rem 1.1rem; border-radius: 1rem; background: #fff;
    border: 1px solid rgba(15, 23, 42, .08); box-shadow: var(--ippbx-card-shadow);
}
.dark .ippbx-server-card { background: #0f172a; border-color: rgba(255, 255, 255, .06); }
.ippbx-server-ok { --level: #16a34a; }
.ippbx-server-warn { --level: #f59e0b; }
.ippbx-server-bad { --level: #dc2626; }
.ippbx-server-none { --level: #94a3b8; }
.ippbx-server-label { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgb(100 116 139); }
.ippbx-server-value { font-size: 1.6rem; font-weight: 700; margin-top: .2rem; }
.ippbx-server-bar { height: .4rem; border-radius: 999px; background: rgba(15, 23, 42, .07); margin: .5rem 0 .45rem; overflow: hidden; }
.dark .ippbx-server-bar { background: rgba(255, 255, 255, .08); }
.ippbx-server-bar span { display: block; height: 100%; background: var(--level); border-radius: inherit; transition: width .4s; }
.ippbx-server-detail { font-size: .78rem; color: rgb(100 116 139); }
.ippbx-server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }
.ippbx-server-list { display: grid; gap: .45rem; font-size: .85rem; }
.ippbx-server-list li { display: grid; grid-template-columns: .7rem 1fr auto; align-items: center; gap: .55rem; }
.ippbx-server-list span:last-child { color: rgb(100 116 139); font-size: .8rem; text-align: end; }
.ippbx-server-dot { width: .6rem; height: .6rem; border-radius: 999px; background: #94a3b8; }
.ippbx-server-state-active { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.ippbx-server-state-failed { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.ippbx-server-state-inactive, .ippbx-server-state-deactivating { background: #f59e0b; }
.ippbx-server-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .8rem 1rem; }
.ippbx-server-facts dt { font-size: .75rem; color: rgb(100 116 139); }
.ippbx-server-facts dd { font-size: 1.05rem; font-weight: 650; }
.ippbx-server-subtitle { margin: 1rem 0 .5rem; font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: rgb(100 116 139); }
.ippbx-server-note { margin-top: .9rem; font-size: .78rem; color: rgb(100 116 139); }
.ippbx-server-alert { padding: .7rem .85rem; border-radius: .6rem; background: rgba(220, 38, 38, .08); color: #b91c1c; font-weight: 600; }

/* ------------------------------------------------------------------ "Kısa kodlar" (feature code guide) */

.ippbx-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }
.ippbx-codes-list { display: grid; gap: .85rem; }
.ippbx-codes-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: .8rem; align-items: start; }
.ippbx-codes-row kbd {
    justify-self: start; padding: .3rem .55rem; border-radius: .5rem; font: 600 .85rem/1.2 ui-monospace, Menlo, monospace;
    background: rgba(99, 102, 241, .08); color: #4338ca; border: 1px solid rgba(99, 102, 241, .25); white-space: nowrap;
}
.dark .ippbx-codes-row kbd { background: rgba(99, 102, 241, .18); color: #c7d2fe; border-color: rgba(99, 102, 241, .35); }
.ippbx-codes-row b { font-size: .88rem; }
.ippbx-codes-row p { font-size: .8rem; color: rgb(100 116 139); line-height: 1.45; margin-top: .1rem; }
@media (max-width: 640px) { .ippbx-codes { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ conference room: live members */

.ippbx-conf-members { display: grid; gap: .5rem; }
.ippbx-conf-members li { display: grid; grid-template-columns: .7rem 1fr auto auto; gap: .6rem; align-items: center; padding: .45rem .6rem; border-radius: .6rem; background: rgba(15, 23, 42, .03); }
.dark .ippbx-conf-members li { background: rgba(255, 255, 255, .04); }
.ippbx-conf-dot { width: .6rem; height: .6rem; border-radius: 999px; background: #94a3b8; }
.ippbx-conf-talking .ippbx-conf-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .2); }
.ippbx-conf-who { display: grid; }
.ippbx-conf-who small { color: rgb(100 116 139); font-size: .75rem; }

/* ---------- Dashboard ---------- */

.ippbx-status-pill {
    border-radius: 999px !important;
    background: rgba(34, 197, 94, 0.1) !important;
}

.ippbx-status-pill.fi-color-danger {
    background: rgba(239, 68, 68, 0.1) !important;
}

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

@media (min-width: 640px) {
    .ippbx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .ippbx-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.ippbx-kpi,
.ippbx-panel {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1rem;
    box-shadow: var(--ippbx-card-shadow);
}

.dark .ippbx-kpi,
.dark .ippbx-panel {
    background: var(--gray-900);
    border-color: rgba(255, 255, 255, 0.06);
}

.ippbx-kpi {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-height: 7.5rem;
    padding: 1.15rem 1.15rem 1rem;
}

.ippbx-kpi-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.9rem;
    color: var(--tone);
    background: var(--tone-soft);
}

.ippbx-kpi-icon svg {
    width: 1.6rem;
    height: 1.6rem;
}

.ippbx-kpi-body {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.ippbx-kpi-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-500);
}

.ippbx-kpi-value {
    margin-top: 0.15rem;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--gray-950);
}

.ippbx-tone-indigo .ippbx-kpi-value,
.ippbx-tone-violet .ippbx-kpi-value {
    color: var(--tone);
}

.dark .ippbx-kpi-value {
    color: #fff;
}

.ippbx-kpi-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
    margin-top: 0.35rem;
    padding-right: 36%;
    font-size: 0.75rem;
}

.ippbx-kpi-trend {
    font-weight: 600;
}

.ippbx-kpi-trend.is-up { color: #16a34a; }
.ippbx-kpi-trend.is-down { color: #dc2626; }

.ippbx-kpi-note {
    color: var(--gray-400);
}

.ippbx-kpi-curve {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    width: 34%;
    max-width: 8rem;
    height: 2.5rem;
    color: var(--tone);
    opacity: 0.9;
}

.ippbx-tone-indigo { --tone: #6366f1; --tone-soft: rgba(99, 102, 241, 0.12); }
.ippbx-tone-green { --tone: #22c55e; --tone-soft: rgba(34, 197, 94, 0.12); }
.ippbx-tone-violet { --tone: #8b5cf6; --tone-soft: rgba(139, 92, 246, 0.12); }
.ippbx-tone-rose { --tone: #f43f5e; --tone-soft: rgba(244, 63, 94, 0.12); }

.ippbx-ext-status-widget,
.ippbx-ext-status-widget .ippbx-panel {
    height: 100%;
}

.ippbx-panel {
    padding: 1.25rem;
}

.ippbx-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--gray-950);
}

.dark .ippbx-panel-head {
    color: #fff;
}

.ippbx-panel-head svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--gray-400);
}

.ippbx-panel-title {
    font-size: 1rem;
    font-weight: 600;
}

.ippbx-ext-rows {
    display: grid;
    gap: 0.6rem;
}

.ippbx-ext-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.dark .ippbx-ext-row {
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--gray-200);
}

.ippbx-ext-row svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--ext);
}

.ippbx-ext-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--ext);
}

.ippbx-ext-label {
    flex: 1;
}

.ippbx-ext-count {
    font-weight: 700;
    color: var(--gray-950);
}

.dark .ippbx-ext-count {
    color: #fff;
}

.ippbx-ext-free { --ext: #22c55e; }
.ippbx-ext-busy { --ext: #ef4444; }
.ippbx-ext-offline { --ext: #94a3b8; }
