.lc-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
}

.lc-chat-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.lc-chat-bubble .label {
    background: #0f2f65;
    color: #fff;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.lc-fab button {
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0f2f65, #1f63c5);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(17, 59, 123, 0.35);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lc-fab button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(17, 59, 123, 0.45);
}

.lc-panel {
    position: fixed;
    right: 18px;
    bottom: 86px;
    width: min(360px, calc(100vw - 20px));
    background: #f7f9fc;
    border-radius: 18px;
    box-shadow: 0 26px 60px rgba(8, 28, 73, 0.28);
    overflow: hidden;
    z-index: 1200;
    display: none;
    flex-direction: column;
}

.lc-panel.is-open {
    display: flex;
}

.lc-head {
    background: linear-gradient(135deg, #0f2f65, #1c4585);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-brand {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f2f65;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}
.lc-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 10px;
}

.lc-head-txt {
    flex: 1;
}

.lc-head-txt .lc-title {
    font-weight: 800;
    margin: 0;
    font-size: 15px;
    line-height: 1.1;
}

.lc-head-txt .lc-sub {
    font-size: 13px;
    margin: 2px 0 0 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: #9aa8c3;
    box-shadow: 0 0 0 4px rgba(154, 168, 195, 0.25);
}

.lc-status-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.lc-close {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lc-body {
    padding: 14px;
    display: grid;
    gap: 12px;
}

.lc-card {
    border: 1px solid #e2e8f3;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 10px 26px rgba(15, 47, 101, 0.08);
}

.lc-card h3 {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 800;
    color: #0f2f65;
}

.lc-card p {
    margin: 0 0 8px 0;
    color: #5c6c85;
    font-size: 13px;
}

.lc-form {
    display: grid;
    gap: 10px;
}

.lc-field {
    position: relative;
}

.lc-field i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8cab;
    font-size: 14px;
}

.lc-input {
    width: 100%;
    padding: 12px 12px 12px 38px;
    border: 1px solid #d7deea;
    border-radius: 12px;
    font-size: 14px;
    background: #f9fbff;
    color: #0f2f65;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.lc-input:focus {
    outline: none;
    border-color: #1f63c5;
    box-shadow: 0 0 0 3px rgba(31, 99, 197, 0.15);
}

.lc-helper {
    font-size: 12px;
    color: #5c6c85;
}

.lc-helper.is-error {
    color: #c0392b;
}

.lc-cta {
    background: linear-gradient(135deg, #123c7c, #1f63c5);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 12px 30px rgba(17, 59, 123, 0.28);
}

.lc-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(17, 59, 123, 0.36);
}

.lc-chat {
    display: grid;
    gap: 10px;
}

.lc-log {
    max-height: 300px;
    min-height: 220px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f5f7fb 0%, #eef3fb 100%);
    border: 1px solid #dfe6f4;
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.lc-msg {
    max-width: 90%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    background: #fff;
    border: 1px solid #e3e8f2;
}

.lc-msg.me {
    justify-self: end;
    background: #123c7c;
    color: #fff;
    border-color: #123c7c;
    box-shadow: 0 8px 20px rgba(18, 60, 124, 0.22);
}

.lc-meta {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    margin-top: 6px;
}

.lc-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lc-input-row textarea {
    flex: 1;
    resize: none;
    min-height: 50px;
    max-height: 180px;
    overflow-y: hidden;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d7deea;
    background: #fff;
    color: #0f2f65;
}
.lc-input-row textarea::-webkit-scrollbar {
    width: 0;
}
.lc-input-row textarea {
    scrollbar-width: none;
}

.lc-send {
    background: #123c7c;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.lc-note {
    font-size: 11px;
    color: #5c6c85;
    margin: 0;
}

.lc-session {
    display: none;
}

.lc-session.is-active {
    display: block;
}

.lc-start.is-hidden {
    display: none;
}

/* Admin page */
.lc-admin {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(99, 127, 255, 0.12), rgba(17, 31, 62, 0.85)), linear-gradient(180deg, #0c1831 0%, #0c152a 100%);
    color: #e8eef8;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    padding: 28px 12px 36px;
}

.lc-admin .shell {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.lc-admin .hero {
    background: linear-gradient(135deg, rgba(16, 29, 54, 0.9), rgba(13, 23, 44, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    display: grid;
    gap: 16px;
}

.lc-admin .hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.lc-hero-title {
    margin: 6px 0 8px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.lc-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #c9d7ff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lc-admin .metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.lc-metric {
    background: linear-gradient(135deg, rgba(18, 34, 64, 0.9), rgba(15, 27, 49, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.lc-stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #0c152a;
}

.lc-stat-icon.users { background: linear-gradient(135deg, #b0c8ff, #8cb2ff); }
.lc-stat-icon.chat { background: linear-gradient(135deg, #a5f1c6, #65db96); }
.lc-stat-icon.avg { background: linear-gradient(135deg, #d0b5ff, #a98aff); }
.lc-stat-icon.bolt { background: linear-gradient(135deg, #ffd79a, #ffb347); }

.lc-metric .k {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.25px;
}

.lc-helper.subtle {
    color: #9fb2d7;
    font-size: 12px;
}

.lc-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 14px;
}

.lc-pane {
    background: #111f3c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.lc-pane h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 800;
}

.lc-search {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    color: #e8eef8;
}

.lc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.lc-card-row {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    color: #f8fbff;
}

.lc-card-row.is-active {
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.05));
}

.lc-card-row .meta {
    font-size: 12px;
    color: #cfdffb;
}

.lc-card-row strong {
    color: #fff;
}

.lc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #22c55e;
    color: #0f1f39;
    font-weight: 800;
    font-size: 11px;
}

.lc-chatbox {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    min-height: 70vh;
}

.lc-chatbox .log {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    max-height: 60vh;
    scrollbar-width: none;
}
.lc-chatbox .log::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.log-wrap {
    position: relative;
}

.lc-scroll-bottom {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 22, 44, 0.75);
    color: #e8eef8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.lc-scroll-bottom.is-hidden {
    display: none;
}

.lc-chatbox .bubble {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.06);
    width: fit-content;
    max-width: 90%;
    align-self: flex-start;
    word-break: break-word;
    color: #e8eef8;
}

.lc-chatbox .bubble-line {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.lc-chatbox .msg-text {
    white-space: pre-wrap;
}

.lc-chatbox .msg-meta {
    font-size: 11px;
    color: #9fb2d7;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lc-chatbox .bubble.agent {
    background: #123c7c;
    color: #fff;
    align-self: flex-end;
}

.lc-ticks {
    margin-left: 6px;
    color: #9fb2d7;
    font-size: 11px;
}

.lc-ticks.is-seen {
    color: #1fb6ff;
}

.lc-day-divider {
    align-self: center;
    background: rgba(255, 255, 255, 0.08);
    color: #d5dcea;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.lc-chatbox .from {
    display: block;
    font-size: 11px;
    opacity: 0.72;
    margin-bottom: 4px;
}

.lc-chatbox textarea {
    width: 100%;
    min-height: 90px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px;
    background: rgba(0, 0, 0, 0.18);
    color: #e8eef8;
}

.lc-chatbox .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.lc-btn {
    background: #123c7c;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}

.lc-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e8eef8;
}
.lc-btn.secondary.online {
    background: #22c55e;
    color: #fff;
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.lc-btn.secondary.offline {
    background: #ef4444;
    color: #fff;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.lc-presence-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8eef8;
    font-weight: 700;
}

.lc-admin .lc-filters {
    margin-top: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.lc-filters-bar .lc-filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.lc-filter-form {
    width: 100%;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.lc-filter-form .lc-filter-col {
    display: grid;
    gap: 6px;
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 320px;
}

.lc-filter-form .lc-filter-meta {
    margin-left: auto;
}

.lc-filters-bar .lc-filter-col {
    display: grid;
    gap: 6px;
}

.lc-filters-bar .lc-filter-col + .lc-filter-col {
    margin-left: 0;
}

.lc-filters-bar .lc-filter-row > .lc-filter-meta {
    margin-left: auto;
}

.lc-filter-label {
    display: block;
    margin: 0;
    font-size: 12px;
    color: #9fb2d7;
    letter-spacing: 0.2px;
    font-weight: 800;
    text-transform: uppercase;
}

.lc-filter-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
    font-weight: 800;
    color: #dbe6ff;
    flex: 0 0 auto;
}

.lc-filter-input {
    position: relative;
    width: 100%;
}

.lc-filters {
    position: relative;
}

.lc-filter-date .lc-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8aa1c4;
    pointer-events: auto;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
    display: inline-flex;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.lc-filter-date input[type="date"].lc-chip-input {
    padding-right: 36px;
    position: relative;
    z-index: 1;
    appearance: textfield;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    background-image: none;
}

.lc-filter-date input[type="date"].lc-chip-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
    color: transparent;
    pointer-events: none;
    display: inline-block;
}

.lc-filter-date input[type="date"].lc-chip-input::-moz-focus-inner {
    border: 0;
}

.lc-filter-date input[type="date"].lc-chip-input::-moz-calendar-picker-indicator {
    opacity: 0;
    background: transparent;
    color: transparent;
    pointer-events: none;
    display: inline-block;
    width: auto;
    height: auto;
}

.lc-chip-input {
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.625rem 0.75rem;
    background: #fff;
    color: #0c152a;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lc-chip-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.lc-filter-input.with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8aa1c4;
    pointer-events: none;
}

.lc-filter-input select.lc-chip-input {
    padding-right: 34px;
    background: rgba(255, 255, 255, 0.96);
}

.lc-filter-input input[type="date"].lc-chip-input::-webkit-calendar-picker-indicator {
    opacity: 0;
}

.lc-filter-quick {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lc-admin .filter-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 991px) {
    .lc-filter-meta {
        justify-content: flex-start;
        text-align: left;
    }
}

.lc-admin .pill {
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #e8eef8;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.12s ease, transform 0.12s ease;
}

.lc-admin .pill:hover {
    transform: translateY(-1px);
}

.lc-admin .pill.is-active {
    background: #f7c948;
    color: #0c152a;
}

.lc-admin .pill-ghost {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: #e8eef8;
    padding: 8px 12px;
}

/* lightweight utility helpers (avoid pulling full bootstrap on admin) */
.d-flex {
    display: flex;
}
.justify-content-between {
    justify-content: space-between;
}
.align-items-center {
    align-items: center;
}
.flex-wrap {
    flex-wrap: wrap;
}
.gap-2 {
    gap: 0.5rem;
}
.mb-0 {
    margin-bottom: 0 !important;
}
.mb-1 {
    margin-bottom: 0.25rem !important;
}
.mb-2 {
    margin-bottom: 0.5rem !important;
}
.mb-3 {
    margin-bottom: 1rem !important;
}
.mb-4 {
    margin-bottom: 1.5rem !important;
}
.gap-1 {
    gap: 0.25rem;
}

@media (max-width: 991px) {
    .lc-grid {
        grid-template-columns: 1fr;
    }
    .lc-panel {
        right: 12px;
        bottom: 78px;
        width: calc(100vw - 24px);
    }
}
