/* ─── No outer scroll ───────────────────────────────────────────── */
/* Lock html/body so the page itself can't scroll. Filament's main
   content area provides its own scroll if needed. */
html, body {
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

/* ─── Edge-to-edge panel layout ─────────────────────────────────── */
.fi-main {
    padding: 0 !important;
    max-width: 100% !important;
    height: 100vh;
    overflow: hidden;
}

.fi-page,
.fi-page-main,
.fi-page-content {
    padding: 0 !important;
    gap: 0 !important;
}

.fi-ta {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
}

/* ─── Filament tables: bound the row area only ──────────────────── */
/* The table's header (search/filters/columns toggle) stays above and
   the pagination stays below. Only rows scroll, inside this box. */
.fi-ta-content-ctn {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    scrollbar-gutter: stable;
}

/* Pin column headers to the top of the row scroll container. */
.fi-ta-content-ctn thead {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgb(255 255 255);
    box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.06);
}
.dark .fi-ta-content-ctn thead {
    background: rgb(24 24 27);
    box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.06);
}

/* ─── Dashboard ─────────────────────────────────────────────────── */
.lc-dash-widgets {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-height: 100vh;
    overflow-y: auto;
}

/* Live status indicator */
.lc-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(34 197 94);
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgb(34 197 94 / 0.6);
    animation: lc-pulse 1.6s infinite;
}

@keyframes lc-pulse {
    0%   { box-shadow: 0 0 0 0 rgb(34 197 94 / 0.55); }
    70%  { box-shadow: 0 0 0 8px rgb(34 197 94 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); }
}

/* Live-accounts widget rows */
.lc-live-accounts {
    display: flex;
    flex-direction: column;
}

.lc-live-row-wrap {
    border-bottom: 1px solid rgb(0 0 0 / 0.05);
}
.lc-live-row-wrap:last-child { border-bottom: none; }
.dark .lc-live-row-wrap { border-bottom-color: rgb(255 255 255 / 0.05); }

.lc-live-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 4px;
    background: transparent;
    border: none;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: background 0.1s;
}
.lc-live-row:hover { background: rgb(0 0 0 / 0.025); }
.dark .lc-live-row:hover { background: rgb(255 255 255 / 0.03); }

.lc-live-chevron {
    color: rgb(156 163 175);
    transition: transform 0.15s;
    flex-shrink: 0;
    margin-left: 2px;
}
.lc-live-chevron-open { transform: rotate(180deg); }

.lc-live-convs {
    padding: 6px 0 10px 22px;
    background: rgb(0 0 0 / 0.015);
    border-top: 1px dashed rgb(0 0 0 / 0.06);
}
.dark .lc-live-convs {
    background: rgb(255 255 255 / 0.02);
    border-top-color: rgb(255 255 255 / 0.06);
}

.lc-live-conv-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
}
.lc-live-conv-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: rgb(75 85 99);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 70px;
}
.dark .lc-live-conv-id { color: rgb(209 213 219); }
.lc-live-conv-meta {
    color: rgb(107 114 128);
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.lc-live-conv-sep { opacity: 0.5; }
.lc-live-conv-elapsed {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: rgb(59 130 246);
    font-weight: 500;
}
.dark .lc-live-conv-elapsed { color: rgb(147 197 253); }

.lc-live-convs-footer {
    padding: 4px 8px;
    margin-top: 4px;
}
.lc-live-convs-link {
    font-size: 11px;
    color: rgb(59 130 246);
    text-decoration: none;
    font-weight: 500;
}
.lc-live-convs-link:hover { text-decoration: underline; }

.lc-live-row-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.lc-live-row-name {
    font-weight: 500;
    font-size: 13px;
    color: rgb(17 24 39);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .lc-live-row-name { color: rgb(244 244 245); }
.lc-live-row-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: rgb(156 163 175);
}
.lc-live-row-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lc-account-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.lc-account-badge-live  { background: rgb(34 197 94 / 0.15);  color: rgb(21 128 61); }
.lc-account-badge-open  { background: rgb(245 158 11 / 0.15); color: rgb(180 83 9); }
.lc-account-badge-today { background: rgb(59 130 246 / 0.12); color: rgb(29 78 216); }
.dark .lc-account-badge-live  { background: rgb(34 197 94 / 0.2);  color: rgb(134 239 172); }
.dark .lc-account-badge-open  { background: rgb(245 158 11 / 0.25); color: rgb(252 211 77); }
.dark .lc-account-badge-today { background: rgb(59 130 246 / 0.25); color: rgb(147 197 253); }

/* Idle dot: same shape, no pulse, gray instead of green */
.lc-live-dot-idle {
    background: rgb(156 163 175);
    animation: none;
    box-shadow: none;
}

.lc-account-row-time {
    font-size: 10px;
    color: rgb(156 163 175);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lc-live-empty {
    padding: 24px;
    text-align: center;
    color: rgb(156 163 175);
    font-size: 13px;
}
