@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --color-primary-500: #0ea5e9;
    --color-primary-400: #38bdf8;
    --color-avatar-bg: #3b82f6; 
    --color-avatar-border: #6366f1; 
    --color-border: #0ea5e9;
    --color-primary-glow: rgba(14, 165, 233, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background-color: #000000 !important;
    transition: background 0.5s ease, color 0.3s ease;
}
.custom-scroll::-webkit-scrollbar {
    width: 8px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background-color: var(--color-primary-500);
    border: 2px solid transparent;
    border-radius: 4px;
}

.custom-scroll {
    scrollbar-color: var(--color-primary-500) transparent;
    scrollbar-width: thin;
}

.glass-card {
    background: #000000 !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    transition: all 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
    border-color: var(--color-border);
}
.action-buttons{
    margin: 10px;
}
.notification {
    position: fixed; 
    bottom: 15px;
    right: 15px;
    padding: 12px 20px; 
    background: rgba(15, 23, 42, 0.9);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.4s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.modal-open {
    overflow: hidden;
}

.modal-open main,
.modal-open footer,
.modal-open nav {
    display: none !important;
}

#auth-modal {
    display: none;
}

#auth-modal.flex {
    display: flex;
}
.chat-container {
    /* Altura ajustada dinámicamente por JS */
    overflow-y: auto;
    scrollbar-width: thin;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.delete-option {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.delete-option:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.delete-option input[type="radio"]:checked + div {
    color: #ef4444;
}

.delete-option input[type="radio"]:checked ~ div .font-medium {
    color: #ef4444;
}
.message-in {
    background: rgba(32, 44, 51, 0.8);
    border-radius: 8px 8px 8px 0;
    max-width: 70%;
}

.message-out {
    background: rgba(5, 97, 98, 0.6);
    border-radius: 8px 8px 0 8px;
    max-width: 70%;
}

.message-timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
}

.message-menu {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-container:hover .message-menu {
    opacity: 1;
}


.tab-button {
    position: relative;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--color-primary-500);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px; 
    background: var(--color-primary-500);
    border-radius: 3px 3px 0 0;
}

.rule-item {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.rule-item:hover {
    border-left-color: var(--color-primary-500);
    background: color-mix(in srgb, var(--color-primary-500) 5%, transparent);
}
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: #000000;
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 70;
    overflow-y: auto;
    padding-top: 40px;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    gap: 16px;
    font-size: 0.95rem;
}

.mobile-nav-link:hover {
    background: rgba(14, 165, 233, 0.2);
    transform: translateX(5px);
}

.mobile-nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

#mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 65;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#mobile-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: -12px; 
    left: 0.5rem; 
    font-size: 0.85rem;
    color: var(--color-primary-500);
    background: #0f172a;
    padding: 0 0.5rem;
}

.error-message {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 4px;
    display: none;
}

.input-error {
    border-color: #f87171 !important;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.background-effect {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: none !important;
    pointer-events: none;
    z-index: -1;
    animation: pulse 8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

.ranking-bar {
    height: 24px;
    background: color-mix(in srgb, var(--color-primary-500) 20%, transparent);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.ranking-fill {
    height: 100%; 
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-400));
    border-radius: 4px;
    transition: width 1s ease;
}

.ranking-text {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: calc(100% - 80px);
}

.ranking-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.contact-list-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-list-item:hover {
    background: color-mix(in srgb, var(--color-primary-500) 10%, transparent);
    transform: translateX(5px);
}

.contact-list-item.active {
    background: color-mix(in srgb, var(--color-primary-500) 20%, transparent);
    border-left: 3px solid var(--color-primary-500);
}

.chatbot-config-card {
    transition: all 0.3s ease;
}

.chatbot-config-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.chatbot-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.chatbot-status.active {
    background-color: #10b981;
}

.chatbot-status.inactive {
    background-color: #ef4444;
}

.premium-badge {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.payment-plan {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.payment-plan:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary-500);
}

.payment-plan.selected {
    border-color: var(--color-primary-500);
    background: color-mix(in srgb, var(--color-primary-500) 10%, transparent);
}

.chat-list-item {
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.chat-list-item.active {
    background: color-mix(in srgb, var(--color-primary-500) 15%, transparent);
}

.chat-notification-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

@media (max-width: 767px) {
    .chat-view-active #chat-list-panel {
        display: none;
    }
    .chat-view-active #chat-window-panel {
        display: flex;
        width: 100%;
        height: 100%;
    }
    #chat-window-panel {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 10;
    }
}

.body.offline nav.glass-card {
    bottom: 36px; 
}

.body.offline main {
    padding-top: calc(7rem + 36px); 
}
.typing-cursor {
    display: inline-block;
}

.chat-link {
    color: #7dd3fc; 
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}
.chat-link:hover {
    color: #38bdf8; 
}


.feedback-btn {
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8; 
    transition: all 0.2s ease-in-out;
}

.feedback-btn:not(:disabled):hover.positive { color: #34d399; background: rgba(16, 185, 129, 0.1); border-color: #34d399; }
.feedback-btn:not(:disabled):hover.negative { color: #f87171; background: rgba(239, 68, 68, 0.1); border-color: #f87171; }

.feedback-btn.selected.positive { color: #34d399; background: rgba(16, 185, 129, 0.2); border-color: #34d399; }
.feedback-btn.selected.negative { color: #f87171; background: rgba(239, 68, 68, 0.2); border-color: #f87171; }

.feedback-container.feedback-given .feedback-btn:not(.selected) {
    opacity: 0.5;
    filter: grayscale(80%);
}
