:root {
    --smc-primary: #7dde38;
    --smc-lime: #8ee957;
    --smc-green: #67d336;
    --smc-deep: #102015;
    --smc-deep-2: #19351d;
    --smc-text: #172116;
    --smc-muted: #6d7d68;
    --smc-border: rgba(125, 222, 56, .22);
    --smc-shadow: 0 28px 75px rgba(42, 91, 34, .16);
    --smc-glow: 0 0 0 12px rgba(125, 222, 56, .10);
}

/* Chat button */
#smc-chat-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 24px;
    cursor: pointer;
    z-index: 99999;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.22), transparent 28%),
        linear-gradient(135deg, #132418, #1d3c21 48%, var(--smc-green));
    box-shadow:
        0 24px 55px rgba(72, 169, 44, .35),
        0 0 0 10px rgba(125, 222, 56, .10);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

#smc-chat-button:hover {
    transform: translateY(-4px) scale(1.04);
    filter: saturate(1.08);
    box-shadow:
        0 32px 75px rgba(72, 169, 44, .45),
        0 0 0 16px rgba(125, 222, 56, .14);
}

.smc-chat-button-icon {
    font-size: 34px;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,.20));
}

.smc-chat-button-dot {
    position: absolute;
    top: 11px;
    left: 11px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #42ec62;
    box-shadow:
        0 0 0 6px rgba(66, 236, 98, .18),
        0 0 22px rgba(66, 236, 98, .65);
}

.smc-floating-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--smc-lime), var(--smc-primary));
    color: var(--smc-deep);
    box-shadow: 0 12px 28px rgba(125, 222, 56, .42);
}

/* Chat window */
#smc-chat-box {
    display: none;
    position: fixed;
    right: max(24px, calc((100vw - 1320px) / 2 + 24px));
    bottom: 96px;
    width: 350px;
    max-width: calc(100vw - 32px);
    height: min(520px, calc(100vh - 120px));
    overflow: hidden;
    z-index: 99999;
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(125, 222, 56, .14), transparent 34%),
        linear-gradient(180deg, #fdfff9, #f4faef 72%, #eef8e8);
    border: 1px solid var(--smc-border);
    box-shadow:
        0 38px 90px rgba(33, 73, 29, .20),
        0 0 0 14px rgba(125, 222, 56, .07);
    backdrop-filter: blur(10px);
}

#smc-chat-box.smc-open {
    display: flex !important;
    flex-direction: column;
}

/* Header */
.smc-header {
    position: relative;
    color: #fff;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:
        radial-gradient(circle at 18% 0%, rgba(143, 233, 87, .32), transparent 34%),
        linear-gradient(135deg, #0e1b12, #19351d 54%, #285b25);
}

.smc-header::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}

.smc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.smc-avatar {
    width: 46px;
    height: 46px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.36), transparent 28%),
        linear-gradient(135deg, var(--smc-lime), var(--smc-green));
    color: var(--smc-deep);
    font-weight: 1000;
    box-shadow:
        0 16px 34px rgba(107, 217, 54, .34),
        inset 0 1px 0 rgba(255,255,255,.45);
}

.smc-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.smc-header-title {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.01em;
}

.smc-header-subtitle {
    font-size: 12px;
    opacity: .88;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.smc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #42ec62;
    box-shadow:
        0 0 0 4px rgba(66, 236, 98, .18),
        0 0 18px rgba(66, 236, 98, .65);
}

#smc-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

#smc-close:hover {
    background: rgba(255,255,255,.18);
    transform: rotate(4deg) scale(1.03);
}

/* Body */
.smc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background:
        radial-gradient(circle at 90% 8%, rgba(125, 222, 56, .17), transparent 34%),
        radial-gradient(circle at 0% 72%, rgba(103, 211, 54, .10), transparent 36%),
        linear-gradient(180deg, #fbfff8, #eff8ea);
}

.smc-body::-webkit-scrollbar,
#smc-admin-messages::-webkit-scrollbar {
    width: 8px;
}

.smc-body::-webkit-scrollbar-thumb,
#smc-admin-messages::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(99, 162, 72, .35);
}

.smc-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 12px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(125, 222, 56, .16);
    box-shadow: 0 14px 34px rgba(40, 83, 34, .07);
}

.smc-mode-btn {
    border: 1px solid rgba(125, 222, 56, .20) !important;
    background: rgba(255,255,255,.88) !important;
    color: #31512b !important;
    box-shadow: none !important;
    padding: 11px 12px !important;
    border-radius: 14px !important;
    font-weight: 900 !important;
    cursor: pointer;
    transition: .2s ease !important;
}

.smc-mode-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 222, 56, .42) !important;
}

.smc-mode-btn.active {
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.26), transparent 30%),
        linear-gradient(135deg, var(--smc-lime), var(--smc-green)) !important;
    color: var(--smc-deep) !important;
    border-color: transparent !important;
    box-shadow: 0 14px 32px rgba(107, 217, 54, .30) !important;
}

.smc-body-card,
.smc-welcome {
    padding: 13px 14px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(125, 222, 56, .20);
    border-radius: 18px;
    color: #3f5b39;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    box-shadow: 0 18px 44px rgba(37, 83, 32, .075);
}

/* Messages */
.smc-msg {
    max-width: 84%;
    padding: 13px 15px;
    border-radius: 21px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    margin-bottom: 12px;
    box-shadow: 0 16px 38px rgba(37, 83, 32, .08);
}

#smc-messages .smc-user {
    margin-left: auto;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,.24), transparent 28%),
        linear-gradient(135deg, var(--smc-lime), var(--smc-green));
    color: var(--smc-deep);
    border-bottom-right-radius: 8px;
    box-shadow: 0 18px 42px rgba(107, 217, 54, .28);
}

#smc-messages .smc-admin,
#smc-messages .smc-ai {
    margin-right: auto;
    background: rgba(255,255,255,.95);
    color: var(--smc-text);
    border: 1px solid rgba(125, 222, 56, .20);
    border-bottom-left-radius: 8px;
}

#smc-messages .smc-ai {
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,255,242,.96));
}

.smc-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.smc-role,
.smc-time {
    font-size: 11px;
    opacity: .72;
    font-weight: 700;
}

/* Footer input */
.smc-start,
.smc-input {
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(125, 222, 56, .18);
    background:
        radial-gradient(circle at bottom right, rgba(125, 222, 56, .12), transparent 34%),
        rgba(255,255,255,.94);
    flex: 0 0 auto;
}

.smc-input-toolbar {
    font-size: 12px;
    color: var(--smc-muted);
    margin-bottom: 10px;
    font-weight: 700;
}

#smc-chat-box input,
#smc-chat-box textarea {
    width: 100%;
    border: 1px solid rgba(125, 222, 56, .24);
    border-radius: 17px;
    padding: 14px 15px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 12px;
    background: rgba(255,255,255,.92);
    color: var(--smc-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 28px rgba(37, 83, 32, .045);
    transition: .2s ease;
}

#smc-chat-box input {
    height: 54px;
}

#smc-chat-box textarea {
    height: 90px;
}

#smc-chat-box input::placeholder,
#smc-chat-box textarea::placeholder {
    color: #8b9a86;
}

#smc-chat-box input:focus,
#smc-chat-box textarea:focus {
    border-color: var(--smc-green);
    box-shadow:
        0 0 0 4px rgba(125, 222, 56, .16),
        0 16px 36px rgba(37, 83, 32, .10);
}

#smc-chat-box button:not(#smc-close):not(.smc-mode-btn) {
    width: 100%;
    background:
        radial-gradient(circle at 30% 10%, rgba(255,255,255,.28), transparent 28%),
        linear-gradient(135deg, var(--smc-lime), var(--smc-green));
    color: var(--smc-deep);
    border: 0;
    padding: 14px;
    border-radius: 17px;
    cursor: pointer;
    font-weight: 1000;
    box-shadow: 0 18px 42px rgba(107, 217, 54, .30);
    transition: .2s ease;
}

#smc-chat-box button:not(#smc-close):not(.smc-mode-btn):hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 55px rgba(107, 217, 54, .40);
}

/* Admin green premium */
.smc-admin-wrap {
    max-width: 1240px;
}

.smc-settings-wrap {
    max-width: 980px;
}

.smc-empty-state,
.smc-export-box,
.smc-side-box {
    background:
        radial-gradient(circle at top left, rgba(125, 222, 56, .10), transparent 34%),
        #fff;
    border: 1px solid rgba(125, 222, 56, .20);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 18px 44px rgba(37, 83, 32, .08);
}

.smc-export-box {
    margin-bottom: 16px;
}

.smc-admin-toolbar {
    margin: 18px 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.smc-filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.smc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 10px 14px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(125, 222, 56, .20);
    border-radius: 15px;
    color: #1c351d;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(37, 83, 32, .05);
}

.smc-tab span {
    background: #ecfbe5;
    color: #285b25;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
}

.smc-tab.active {
    background: linear-gradient(135deg, var(--smc-deep), #275d25);
    color: #fff;
    border-color: transparent;
}

.smc-toolbar-search {
    display: flex;
    gap: 10px;
}

.smc-toolbar-search input[type="text"] {
    width: 320px;
    min-height: 42px;
    border: 1px solid rgba(125, 222, 56, .24);
    border-radius: 15px;
    padding: 0 14px;
}

.smc-admin-list {
    display: grid;
    gap: 14px;
}

.smc-admin-chat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background:
        radial-gradient(circle at top left, rgba(125, 222, 56, .10), transparent 36%),
        #fff;
    border: 1px solid rgba(125, 222, 56, .20);
    border-radius: 22px;
    text-decoration: none;
    color: var(--smc-text);
    box-shadow: 0 16px 40px rgba(37, 83, 32, .07);
}

.smc-admin-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.smc-admin-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--smc-lime), var(--smc-green));
    color: var(--smc-deep);
    font-size: 18px;
    font-weight: 1000;
    box-shadow: 0 14px 32px rgba(107, 217, 54, .28);
}

.smc-admin-card-main {
    min-width: 0;
    flex: 1;
}

.smc-admin-row-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.smc-admin-row-bottom {
    color: #52654c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}

.smc-admin-row-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: #6b7b67;
    font-size: 12px;
}

.smc-meta-attention {
    color: #348522;
    font-weight: 900;
}

.smc-status-pill,
.smc-lead-pill,
.smc-wait-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.smc-status-new {
    background: #eaffdf;
    color: #2d7c1e;
}

.smc-status-waiting {
    background: #fff6dc;
    color: #8a6410;
}

.smc-status-answered {
    background: #effee8;
    color: #2d7c1e;
}

.smc-status-closed {
    background: #f0f5ed;
    color: #5c6b57;
}

.smc-lead-important {
    background: #edffe5;
    color: #2d7c1e;
}

.smc-lead-hot {
    background: linear-gradient(135deg, #eaffdf, #d8ffc8);
    color: #215f18;
}

.smc-admin-unread {
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--smc-lime), var(--smc-green));
    color: var(--smc-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 1000;
    padding: 0 8px;
    box-shadow: 0 12px 28px rgba(107, 217, 54, .34);
}

.smc-admin-chat-wrap {
    max-width: 1160px;
    background:
        radial-gradient(circle at top left, rgba(125, 222, 56, .10), transparent 34%),
        #fff;
    border: 1px solid rgba(125, 222, 56, .20);
    border-radius: 26px;
    padding: 20px;
    box-shadow: 0 24px 60px rgba(37, 83, 32, .10);
}

.smc-admin-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 18px;
    flex-wrap: wrap;
}

.smc-admin-chat-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.smc-admin-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--smc-text);
}

.smc-admin-sub {
    color: #6b7b67;
    font-size: 13px;
    margin-top: 4px;
}

.smc-admin-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

#smc-admin-messages {
    height: 520px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top right, rgba(125, 222, 56, .12), transparent 34%),
        linear-gradient(180deg, #fbfff8, #eff8ea);
    border: 1px solid rgba(125, 222, 56, .20);
    border-radius: 22px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

#smc-admin-messages .smc-msg {
    margin-bottom: 0;
}

#smc-admin-messages .smc-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--smc-lime), var(--smc-green));
    color: var(--smc-deep);
    border-bottom-right-radius: 8px;
}

#smc-admin-messages .smc-admin,
#smc-admin-messages .smc-ai {
    align-self: flex-start;
    background: #fff;
    color: var(--smc-text);
    border: 1px solid rgba(125, 222, 56, .20);
    border-bottom-left-radius: 8px;
}

.smc-quick-replies {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.smc-admin-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
}

.smc-admin-input textarea,
#smc-admin-note {
    width: 100%;
    height: 120px;
    margin-bottom: 12px;
    border-radius: 17px;
    border: 1px solid rgba(125, 222, 56, .24);
    padding: 14px 15px;
    resize: vertical;
    box-sizing: border-box;
}

.smc-admin-tip {
    font-size: 12px;
    color: var(--smc-muted);
    margin-bottom: 10px;
    font-weight: 700;
}

.smc-note-status {
    font-size: 12px;
    color: #2d7c1e;
    min-height: 18px;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 980px) {
    .smc-admin-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .smc-toolbar-search {
        width: 100%;
    }

    .smc-toolbar-search input[type="text"] {
        width: 100%;
    }
}

@media (max-width: 640px) {
    #smc-chat-button {
        right: 16px;
        bottom: 70px;
        width: 66px;
        height: 66px;
        border-radius: 22px;
    }

    #smc-chat-box {
        left: 12px;
        right: 12px;
        bottom: 96px;
        width: auto;
        max-width: none;
        height: calc(100vh - 110px);
        border-radius: 24px;
    }

    .smc-header {
        padding: 16px;
    }

    .smc-msg {
        max-width: 90%;
    }
}

