html, body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Layout */
.logo {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #001529;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
}

.logo-icon {
    font-size: 24px;
    font-weight: bold;
}

.site-layout-header {
    background: white;
    padding: 0 24px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.trigger {
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.trigger:hover {
    color: #1890ff;
}

.site-layout-content {
    margin: 24px;
    padding: 24px;
    background: white;
    min-height: calc(100vh - 64px - 70px - 48px);
    border-radius: 4px;
}

/* Dashboard */
.dashboard-container {
    padding: 0;
}

/* Chat */
.chat-list-sider {
    background: white !important;
    border-right: 1px solid #f0f0f0;
}

.chat-list-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.chat-list {
    height: calc(100vh - 300px);
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.chat-item:hover {
    background-color: #f5f5f5;
}

.chat-item.active {
    background-color: #e6f7ff;
}

.chat-item-info {
    margin-left: 12px;
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-item-name {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
}

.chat-item-time {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
}

.chat-item-preview {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.chat-item-tags {
    display: flex;
    gap: 4px;
}

.chat-content {
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-details {
    display: flex;
    flex-direction: column;
}

.chat-header-name {
    font-weight: 500;
    font-size: 16px;
}

.chat-header-phone {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}

.message.sent {
    align-self: flex-end;
    background: #dcf8c6;
}

.message.received {
    align-self: flex-start;
    background: white;
}

.message.bot {
    background: #e3f2fd;
}

.message-content {
    word-wrap: break-word;
}

.message-time {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
    text-align: right;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.chat-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.chat-input textarea {
    flex: 1;
}

.chat-input-actions {
    display: flex;
    align-items: center;
}

/* Status Selector */
.status-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.status-label {
    font-weight: 500;
}

/* Bot Config */
.bot-config-container {
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .site-layout-content {
        margin: 12px;
        padding: 12px;
    }

    .chat-list-sider {
        width: 100% !important;
        max-width: 100% !important;
    }
}
