

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
}

button,
input {
    font: inherit;
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
    padding: 28px 22px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-link{
    cursor: pointer;
}
.sidebar-link > span{
    display: flex;
    align-items: center;
}
.sidebar-link > span > svg{
    margin-right: 5px;
}
.sidebar-link path{
    fill:none;
    stroke: var(--svg-stroke);
}
.sidebar-link circle{
    stroke: var(--svg-stroke);
}
.sidebar-link rect{
    stroke: var(--svg-stroke);
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
}

.logo-icon {
    margin-top: -20px;
    height: 64px;
}


.logo-icon path{
   fill: var(--text-primary);
}
.logo-icon span {
    background: #315a3b;
    border-radius: 10px 10px 4px 10px;
}

.profile {
    padding: 22px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--card-bg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(134, 224, 153, 0.35);
}

.profile-name {
    margin: 12px 0 8px;
    font-weight: 700;
    font-size: 15px;
}

.profile-days {
    color: var(--text-secondary);
    font-size: 13px;
}

.nav {
    display: grid;
    gap: 10px;
}

.nav a,
.pro {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
}

.nav a.active {
    background: var(--card-bg);
    font-weight: 700;
}

.pro {
    margin-top: auto;
    border: 0;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.main {
    padding: 30px clamp(18px, 4vw, 56px);
}
.binary-toggle {
    width: 100%;
    height: 54px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

.binary-toggle.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: 0;
}

.actions {
    display: flex;
    gap: 14px;
}

.icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(65, 79, 60, 0.1);
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 20px;
    position: relative;
}

.icon-btn.alert::after {
    content: "";
    width: 8px;
    height: 8px;
    position: absolute;
    top: 11px;
    right: 12px;
    border-radius: 50%;
    background: #ef4d55;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

h2 {
    margin: 0;
    font-size: 24px;
}

.search {
    width: min(310px, 100%);
    height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(69, 83, 64, 0.16);
    border-radius: 28px;
    background: var(--card-bg);
    color: #293227;
    outline: none;
}

.habits {
    display: grid;
    grid-template-columns: repeat(4, minmax(145px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}


.habit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 155px;
    padding: 26px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: var(--card-bg);
    box-shadow: 0 12px 30px rgba(50, 70, 47, 0.04);
}

.habit-card-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.habit-main {
    min-width: 0;
    flex: 1;
}

.habit-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.habit-action-btn {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(51, 87, 70, 0.08);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.habit-action-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(41, 197, 110, 0.42);
    color: #1f7a45;
    transform: translateY(-1px);
}

.habit-action-done.done {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.habit-title {
    margin-top: 22px;
}

.habit-meta {
    margin-top: 18px;
}

.habit-card .progress {
    width: 100%;
}
.habit-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.habit-emoji {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--border-color);
    font-size: 24px;
}

.status {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid rgba(64, 76, 59, 0.16);
    color: white;
    font-size: 13px;
    transition: 0.3s;
    cursor: pointer;
}

.status.done {
    border: 0;
    background: #52d981;
}

.habit-title {
    margin: 14px 0 12px;
    font-weight: 700;
}

.habit-meta {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.progress {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(78, 82, 71, 0.08);
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transition: 0.3s;
}
.habit-grow-enter-active {
    animation: habit-grow-in 0.38s cubic-bezier(0.2, 0.9, 0.25, 1.15);
    transform-origin: center;
}

.habit-grow-leave-active {
    animation: habit-shrink-out 0.22s ease-in forwards;
    transform-origin: center;
}

.habit-grow-move {
    transition: transform 0.28s ease;
}

@keyframes habit-grow-in {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    72% {
        opacity: 1;
        transform: scale(1.08);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes habit-shrink-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.82);
    }
}

.assistant-strip {
    min-height: 96px;
    padding: 18px 22px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 18px;
}

.bot {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--border-color);
    font-size: 28px;
}

.assistant-strip p {
    margin: 0;
    flex: 1;
    color: #465244;
    line-height: 1.45;
}

.primary {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 26px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px var(--light-btn);
}

.chat {
    min-height: 360px;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: 28px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
}

.chat-title {
    margin-bottom: 22px;
    text-align: center;
    font-weight: 800;
}

.messages {
    display: grid;
    align-content: start;
    gap: 22px;
    height: 400px;
    overflow-y: auto;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.message-row.user {
    justify-content: flex-end;
}

.mini-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover, #eee);
    font-size: 18px;
    border: 1px solid var(--border-color, #ddd);
}

.bubble {
    max-width: min(480px, 78%);
    padding: 17px 20px;
    border-radius: 20px;
    background: var(--border-color);
    line-height: 1.45;
    color: var(--text-primary);
}

.user .bubble {
    border-bottom-right-radius: 8px;
}

.inputbar {
    min-height: 64px;
    margin-top: 24px;
    padding: 8px 8px 8px 18px;
    border: 1px solid var(--border-color);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.58);
    display: flex;
    align-items: center;
    gap: 12px;
}

.attach {
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.inputbar input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #283226;
}

.send {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.mobile-bottom {
    display: none;
}

@media (max-width: 980px) {
    .app {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }

    .main {
        padding-bottom: 110px;
    }

    .habits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-bottom {
        display: block;
    }
}

@media (max-width: 680px) {
    .main {
        padding: 22px 14px 90px;
    }

    .topbar {
        align-items: flex-start;
    }

    .actions {
        gap: 8px;
    }

    .icon-btn {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .section-head {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .search {
        width: 100%;
    }

    .habits {
        grid-template-columns: 1fr;
    }

    .habit-card {
        min-height: 150px;
    }

    .assistant-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .primary {
        width: 100%;
    }

    .chat {
        min-height: 430px;
        padding: 18px 14px;
        border-radius: 22px;
    }

    .bubble {
        max-width: 86%;
        padding: 14px 16px;
        font-size: 14px;
    }

    .inputbar {
        min-height: 58px;
        padding-left: 12px;
    }

    .send {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 390px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 21px;
    }

    .bubble {
        max-width: 90%;
    }
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.add-habit-btn {
    white-space: nowrap;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(24, 36, 28, 0.38);
    backdrop-filter: blur(6px);
}

.habit-modal {
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid rgba(50, 88, 63, 0.14);
    border-radius: 28px;
    background: var(--card-bg);
    box-shadow: 0 28px 80px rgba(22, 43, 30, 0.22);
}

.habit-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.habit-modal-head h2 {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
    color: #1f2d24;
}

.modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.modal-field {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.modal-field span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-field input,
.modal-field select {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text-primary);
    outline: none;
}

.modal-field input:focus,
.modal-field select:focus {
    border-color: rgba(48, 204, 118, 0.62);
    box-shadow: 0 0 0 4px rgba(48, 204, 118, 0.12);
}

.period-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.period-option {
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
}

.period-option.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.progress-editor button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 26px;
    cursor: pointer;
}

.progress-slider-wrap input[type='range'] {
    width: 100%;
    accent-color: var(--accent);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal-secondary {
    height: 48px;
    padding: 0 22px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 640px) {
    .modal-grid,
    .period-options {
        grid-template-columns: 1fr;
    }

    .habit-modal {
        padding: 22px;
        border-radius: 22px;
    }

    .habit-modal-head h2 {
        font-size: 24px;
    }

    .section-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
}
.habit-modal {
    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 22px;
}

.habit-modal-head {
    margin-bottom: 18px;
}

.habit-modal-head h2 {
    font-size: 26px;
}

.emoji-dropdown {
    position: relative;
}

.emoji-current {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.emoji-current span {
    font-size: 28px;
}

.emoji-current small {
    color: #66736b;
    font-size: 14px;
}

.emoji-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    width: 100%;
    max-width: 360px;
    border: 1px solid rgba(37, 58, 44, 0.14);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 46px rgba(22, 43, 30, 0.18);
}

.emoji-panel emoji-picker {
    width: 100%;
    height: 330px;
}

.progress-focus {
    margin: 22px 0;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-bg);
}

.progress-focus-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.progress-focus-head span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.progress-focus-head strong {
    color: var(--text-primary);
    font-size: 34px;
    line-height: 1;
}

.progress-complete {
    height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.progress-range {
    width: 100%;
    height: 34px;
    padding: 0;
    accent-color: var(--accent);
}


.custom-period-input {
    margin-top: 10px;
}
.progress-value-row {
    display: grid;
    grid-template-columns: 46px minmax(90px, 130px) 46px 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.progress-value-row button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.progress-value-input {
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    text-align: center;
}

.progress-value-row span {
    color: #526459;
    font-size: 15px;
}
@media (max-width: 640px) {


    .emoji-panel {
        max-width: none;
    }
}
.thinking-message {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-left: 10px;
}

.thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: thinking-dot 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes thinking-dot {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.achievements-page {
    width: 100%;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-head h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 30px;
    font-weight: 700;
}

.page-head p {
    margin: 8px 0 0;
    color: #6d7a70;
    font-size: 15px;
}.achievements-page {
     width: 100%;
     color: var(--text-primary);
 }

.achievements-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.achievements-top h1,
.completed-achievements-section h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0;
}

.achievements-search {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(480px, 100%);
    height: 58px;
    padding: 0 24px;
    border: 1px solid rgba(42, 49, 40, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 248, 0.74);
}

.achievements-search span {
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
}

.achievements-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 20px;
}

.achievements-search input::placeholder {
    color: rgba(32, 37, 31, 0.32);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.achievement-card {
    position: relative;
    min-height: 218px;
    padding: 22px;
    border: 1px solid rgba(42, 49, 40, 0.16);
    border-radius: 22px;
    background: var(--card-bg);
}

.achievement-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: #fff;
    font-size: 28px;
}

.achievement-icon img{
    mix-blend-mode: darken;
}

.achievement-card h3 {
    margin: 0 0 18px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: 0;
}

.achievement-card p {
    margin: 12px 0 0;
    color: #777b72;
    font-size: 18px;
    line-height: 1.2;
}

.achievement-progress {
    width: 100%;
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e3e3dd;
}

.achievement-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.completed-achievements-section {
    margin-top: 48px;
}

.completed-achievements-section h2 {
    margin-bottom: 32px;
}

.achievement-card.completed {
    min-height: 210px;
}

.achievement-card.completed h3 {
    margin-bottom: 10px;
}

.achievement-check {
    position: absolute;
    top: 28px;
    right: 22px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #43c96f;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 1320px) {
    .achievements-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .achievements-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .achievements-top {
        align-items: stretch;
        flex-direction: column;
    }

    .achievements-top h1,
    .completed-achievements-section h2 {
        font-size: 28px;
        line-height: 32px;
    }

    .achievements-search {
        width: 100%;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card {
        min-height: auto;
    }

    .progress-focus-head{
        flex-direction: column;
        text-align: center;
    }
}

/* === Floating Chat === */

.chat-fab-wrapper {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.chat-fab-bubble {
    opacity: 0.6;
    max-width: 260px;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    background: var(--card-bg, #fff);
    color: var(--text-primary, #222);
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    animation: chat-bubble-in 0.3s ease-out;
    transition: transform 0.15s;
}

.chat-fab-bubble:hover {
    opacity: 1;
    transform: translateY(-2px);
}


.chat-fab {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 24px var(--light-from), 0 0 0 0 var(--light-to);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fab-pulse 2.5s ease-in-out infinite;
    transition: transform 0.2s;
}

.chat-fab:hover {
    animation: none;
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

.chat-fab-img {
    width: 80%;
    height: 80%;
}

.chat-fab-icon {
    font-size: 30px;
    line-height: 1;
}

.chat-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

@keyframes fab-pulse {
    0%, 100% {
        box-shadow: 0 6px 24px var(--light-from), 0 0 0 0 var(--light-to);
    }
    50% {
        box-shadow: 0 6px 24px var(--light-from), 0 0 0 14px var(--light-none);
    }
}

@keyframes chat-bubble-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fab-highlight .chat-fab {
    animation: fab-highlight-glow 1s ease-in-out infinite;
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3), 0 0 30px rgba(99, 102, 241, 0.5);
}

@keyframes fab-highlight-glow {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3), 0 0 24px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(99, 102, 241, 0), 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

.item-highlight {
    animation: item-glow 0.7s ease-in-out 3;
    border-color: var(--accent) !important;
}

@keyframes item-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--accent);
        border-color: var(--border-color);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.15);
        border-color: var(--accent);
    }
}

.chat-overlay {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 460px;
    max-height: calc(100vh - 130px);
    z-index: 950;
    border-radius: 16px;
    background: var(--card-bg, #fff);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color, #eee);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.chat-overlay-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.chat-overlay-close:hover {
    background: var(--bg-hover, #eee);
}

.chat-overlay .chat {
    border: 0;
    border-radius: 0;
    background: transparent;
    flex: 1;
    min-height: 300px;
    max-height: calc(100vh - 200px);
}

.chat-overlay .messages {
    max-height: calc(100vh - 340px);
}

.chat-slide-enter-active {
    animation: chat-slide-up 0.25s ease-out;
}

.chat-slide-leave-active {
    animation: chat-slide-down 0.2s ease-in;
}

@keyframes chat-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chat-slide-down {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

@media (max-width: 980px) {

    .chat-fab-wrapper{

        bottom: 100px;
    }
}

@media (max-width: 480px) {
    .chat-overlay {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 80px;
    }

    .chat-fab-wrapper {
        bottom: 80px;
        right: 16px;
    }

    .chat-fab {
        width: 56px;
        height: 56px;
    }

    .chat-fab-icon {
        font-size: 26px;
    }

    .chat-fab-bubble {
        max-width: 220px;
        font-size: 12px;
    }
}
