.it-chat-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.it-chat-fab:hover {
    background: #1d4ed8;
}

.it-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 92px;
    width: 360px;
    min-width: 300px;
    min-height: 320px;
    max-width: min(92vw, 560px);
    max-height: 72vh;
    height: 500px;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22);
    z-index: 1200;
    display: none;
    resize: both;
    overflow: hidden;
}

.it-chat-panel.open {
    display: flex;
    flex-direction: column;
}

.it-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.it-chat-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.it-chat-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.it-chat-subtitle {
    font-size: 11px;
    color: #475569;
}

.it-chat-header-actions {
    display: flex;
    gap: 8px;
}

.it-chat-icon-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
}

.it-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
}

.it-chat-msg {
    max-width: 92%;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.it-chat-msg.user {
    align-self: flex-end;
    background: #dbeafe;
    color: #0f172a;
}

.it-chat-msg.bot {
    align-self: flex-start;
    background: #f1f5f9;
    color: #0f172a;
}

.it-chat-msg.system {
    align-self: center;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
}

.it-chat-confirm-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.it-chat-confirm-btn {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    color: #0f172a;
}

.it-chat-confirm-btn.primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.it-chat-footer {
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    background: #f8fafc;
}

.it-chat-input-row {
    display: flex;
    gap: 8px;
}

.it-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.it-chat-send {
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.it-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.dark-theme .it-chat-panel {
    background: #0b1220;
    border-color: #334155;
}

body.dark-theme .it-chat-header,
body.dark-theme .it-chat-footer {
    background: #111827;
    border-color: #334155;
}

body.dark-theme .it-chat-title {
    color: #e5e7eb;
}

body.dark-theme .it-chat-subtitle {
    color: #94a3b8;
}

body.dark-theme .it-chat-icon-btn {
    border-color: #475569;
    color: #e5e7eb;
}

body.dark-theme .it-chat-body {
    background: #0b1220;
}

body.dark-theme .it-chat-msg.bot {
    background: #1f2937;
    color: #e5e7eb;
}

body.dark-theme .it-chat-msg.user {
    background: #1d4ed8;
    color: #fff;
}

body.dark-theme .it-chat-msg.system {
    background: #312e81;
    color: #e0e7ff;
}

body.dark-theme .it-chat-input {
    background: #0f172a;
    border-color: #475569;
    color: #e5e7eb;
}

