:root {
    --bg-color: #d1d7db;
    --app-bg: #efeae2;
    --sidebar-bg: #ffffff;
    --header-bg: #f0f2f5;
    --search-bg: #f0f2f5;
    --msg-in: #ffffff;
    --msg-out: #d9fdd3;
    --primary-color: #00a884;
    --text-primary: #111b21;
    --text-secondary: #667781;
    --border-color: #e9edef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 1600px;
    height: 100%;
    background-color: var(--app-bg);
    display: flex;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.06), 0 2px 5px 0 rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
}

@media (min-width: 1024px) {
    .app-container {
        height: 95%;
        border-radius: 8px;
    }
}

.hidden {
    display: none !important;
}

/* Sidebar */
.sidebar {
    width: 30%;
    min-width: 350px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    height: 60px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    padding: 10px 16px;
    justify-content: space-between;
    box-sizing: border-box;
}

.chat-header {
    height: 64px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    z-index: 100;
    position: relative;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.header-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    min-width: 0;
    flex: 1;
    transition: opacity 0.2s;
}

.header-profile-trigger:hover {
    opacity: 0.8;
}

.chat-header-right {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #dfe5e7;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

/* Redesign of header buttons */
.header-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.header-action-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 0 10px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.header-desktop-actions {
    gap: 8px;
    align-items: center;
}

.header-btn-more {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: 0.2s;
}

.header-btn-more:hover {
    background: #f1f5f9;
}

.sidebar-actions button, .chat-input-area button, .sidebar-icon-btn {
    background: none;
    border: none;
    color: #54656f;
    font-size: 20px;
    margin-left: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-icon-btn {
    margin-left: 0;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.sidebar-icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--primary-color); }

#mic-btn {
    font-size: 26px !important;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color) !important;
    transition: transform 0.2s ease, background-color 0.2s;
    border-radius: 50%;
}

#mic-btn:hover {
    background-color: rgba(0, 168, 132, 0.1);
    transform: scale(1.15);
}

.search-bar {
    padding: 8px 12px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
}

.search-input {
    background-color: var(--search-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 35px;
}

.search-input i {
    color: var(--text-secondary);
    font-size: 14px;
}

.search-input input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    margin-left: 15px;
    font-size: 15px;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    padding: 12px 15px;
    cursor: pointer;
    background-color: var(--sidebar-bg);
    transition: background 0.2s;
}

.contact-item:hover {
    background-color: var(--search-bg);
}

.contact-item.active {
    background-color: var(--search-bg);
}

.contact-item .avatar {
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    overflow: hidden;
}

.contact-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.contact-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.contact-name {
    font-size: 16px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.contact-status-icons {
    display: flex;
    gap: 5px;
    font-size: 12px;
}

.contact-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-msg {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--app-bg);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.chat-area.chat-as-slideout {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 450px;
    max-width: 100%;
    z-index: 600;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    border-left: 1px solid #e2e8f0;
}

.chat-area::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h10v10H10zM50 50h10v10H50z' fill='%23000' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: 0;
    pointer-events: none;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--header-bg);
    z-index: 1;
}

.empty-state h1 {
    color: #41525d;
    font-weight: 300;
    margin: 0 0 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

.active-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
    height: 100%;
}

.chat-header {
    justify-content: flex-start;
}

.chat-header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.back-btn {
    display: none;
    cursor: pointer;
    color: #54656f;
    font-size: 20px;
    margin-right: 15px;
}

.chat-header .avatar {
    margin-right: 15px;
}

.chat-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.chat-info-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-info h2 {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.chat-info-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
}

.contact-phone-sub {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.info-divider {
    font-size: 10px;
    color: #cbd5e1;
}

.attendant-info {
    font-size: 11px;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.header-tags-container {
    display: flex;
    gap: 6px;
    overflow: hidden;
    padding: 0 10px;
}

.desktop-only-flex {
    display: none;
}

@media (min-width: 992px) {
    .desktop-only-flex {
        display: flex;
    }
}

.header-tags-container .tag-badge {
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .chat-header { height: 60px; padding: 0 12px; }
    .chat-info h2 { font-size: 14px; }
    .chat-info-bottom { display: flex; } 
    .contact-phone-sub { display: none; } /* Hide phone on mobile header to save horizontal space */
    .attendant-info { font-size: 10px; max-width: 80px; }
    .header-tags-container { display: none !important; }
    .chat-header-left { gap: 8px; }
    .header-profile-trigger { gap: 8px; }
    .avatar { width: 36px; height: 36px; }
    .ia-badge { font-size: 8px; padding: 1px 4px; }
    
    .active-chat { height: 100%; position: relative; }
}

/* Contact Details Drawer Styling */
.contact-drawer {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 320px;
    max-width: 85%;
    background: #fff;
    z-index: 1000;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header h3 { font-size: 16px; font-weight: 600; color: #1e293b; }
.drawer-header button { background: none; border: none; font-size: 20px; color: #94a3b8; cursor: pointer; }

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.drawer-profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

.drawer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #fff;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.drawer-profile-section h2 { font-size: 20px; color: #1e293b; margin-bottom: 4px; }

.drawer-phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #dcfce7;
    color: #166534;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.drawer-phone-link:hover { transform: scale(1.05); }

.drawer-info-group {
    margin-bottom: 24px;
}

.drawer-info-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.drawer-status-pill {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.drawer-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drawer-kanban-info {
    background: #eff6ff;
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid #3b82f6;
}

.drawer-notes-mini-list {
    background: #fffcf0;
    border: 1px solid #fef08a;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: #854d0e;
    max-height: 150px;
    overflow-y: auto;
}

.drawer-actions-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.messages-container {
    flex: 1;
    padding: 20px 5%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 85%;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 7.5px;
    position: relative;
    font-size: 14px;
    line-height: 19px;
    color: var(--text-primary);
    box-shadow: 0 1px 0.5px rgba(11,20,26,.13);
    word-wrap: break-word;
}
@media (min-width: 768px) {
    .message { max-width: 65%; }
}

.message.in {
    align-self: flex-start;
    background-color: var(--msg-in);
    border-top-left-radius: 0;
}

.message.in::before {
    content: '';
    position: absolute;
    top: 0; left: -8px;
    width: 0; height: 0;
    border-top: 8px solid var(--msg-in);
    border-left: 8px solid transparent;
}

.message.out {
    align-self: flex-end;
    background-color: var(--msg-out);
    border-top-right-radius: 0;
}

.message.out::before {
    content: '';
    position: absolute;
    top: 0; right: -8px;
    width: 0; height: 0;
    border-top: 8px solid var(--msg-out);
    border-right: 8px solid transparent;
}

.msg-time {
    font-size: 11px;
    color: var(--text-secondary);
    float: right;
    margin: 8px 0 -5px 10px;
}

.chat-input-area {
    height: 62px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    padding: 10px 16px;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .chat-input-area {
        padding: 8px;
    }
}

.chat-input-area input {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    margin: 0 10px;
    font-size: 15px;
    background-color: #fff;
    outline: none;
    min-width: 0; /* Prevents input from pushing buttons out */
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .app-container {
        height: 100%;
        width: 100%;
        border-radius: 0;
    }
    
    .sidebar {
        width: 100%;
        min-width: 100%;
        display: flex;
    }
    
    .chat-area {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 10;
    }
    
    .chat-area.mobile-active {
        transform: translateX(0);
    }
    
    .back-btn { display: block; }
}

.chat-as-slideout .back-btn { display: block; }

/* Tools Panel Styles */
.tools-btn {
    position: absolute;
    right: 20px;
    bottom: 80px;
    top: auto;
    width: 50px;
    height: 50px;
    background-color: var(--sidebar-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 50;
    color: var(--primary-color);
    font-size: 22px;
    transition: background 0.2s, transform 0.2s;
}
@media (max-width: 768px) {
    .tools-btn {
        right: 15px;
        bottom: 75px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
.tools-btn:hover { background-color: #f0f2f5; transform: scale(1.05); }

.tools-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 350px;
    background-color: var(--sidebar-bg);
    border-left: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
}
.tools-panel.open {
    transform: translateX(0);
}
.tools-header {
    height: 60px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}
.tools-header h2 { font-size: 16px; color: var(--text-primary); font-weight: 500; }
.tools-header button { background: none; border: none; font-size: 20px; color: #54656f; cursor: pointer; transition: 0.2s; }
.tools-header button:hover { color: #111; }

.tools-tabs { display: flex; border-bottom: 1px solid var(--border-color); background: var(--sidebar-bg); overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.tools-tabs::-webkit-scrollbar { display: none; }
.tool-tab { flex: 1; min-width: max-content; text-align: center; padding: 12px 10px; font-size: 13px; font-weight: 500; color: var(--primary-color); border-bottom: 3px solid transparent; cursor: pointer; }
.tool-tab.active { border-bottom: 3px solid var(--primary-color); }

.tools-content { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; background: var(--app-bg); }

.add-seq-btn { width: 100%; padding: 12px; background: #fff; border: 1px dashed #ccc; border-radius: 8px; cursor: pointer; color: var(--primary-color); font-weight: 600; margin-bottom: 15px; font-size: 15px; transition: 0.2s; }
.add-seq-btn:hover { background: #f0f2f5; border-color: var(--primary-color); }

.sequences-list { display: flex; flex-direction: column; gap: 10px; }
.sequence-card { background: #fff; padding: 12px 15px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
.seq-info h4 { font-size: 15px; color: var(--text-primary); margin-bottom: 4px; font-weight: 500; }
.seq-info span { font-size: 12px; color: var(--text-secondary); }

.seq-actions-card { display: flex; gap: 6px; align-items: center; }
.btn-edit-seq, .btn-delete-seq { background: #f0f2f5; color: #54656f; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.2s; font-size: 14px; }
.btn-edit-seq:hover { background: #e0e5e9; color: #111; }
.btn-delete-seq:hover { background: #fee2e2; color: #ef4444; }

.btn-send-seq { background: var(--primary-color); color: #fff; border: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.2s; font-size: 16px; margin-left: 5px; }
.btn-send-seq:hover { background: #008f6f; transform: scale(1.05); }
.btn-send-seq:disabled { background: #ccc; cursor: not-allowed; transform: none; }

.seq-input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 15px; font-size: 15px; outline: none; }
.seq-input:focus { border-color: var(--primary-color); }

.seq-items-container { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; flex: 1; overflow-y: auto; }
.seq-item { background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); position: relative; border-left: 4px solid var(--primary-color); }
.seq-item-remove { position: absolute; top: -8px; right: -8px; background: #ff4a4a; color: white; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.seq-item-remove:hover { background: #e00000; }
.seq-item-text { width: 100%; min-height: 80px; padding: 10px; border: 1px solid #eee; border-radius: 6px; resize: vertical; font-size: 14px; outline: none; background: #fafafa; }
.seq-item-text:focus { border-color: #ccc; background: #fff; }
.seq-item-media { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-secondary); }
.seq-item-media img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }

.seq-actions { display: flex; gap: 15px; margin-bottom: 15px; justify-content: center; flex-wrap: wrap; }
.seq-actions button, .seq-actions label { background: #fff; border: 1px solid #ddd; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; color: #54656f; font-size: 18px; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.seq-actions button:hover, .seq-actions label:hover { background: #f0f2f5; border-color: #ccc; color: var(--primary-color); }

.seq-footer { display: flex; gap: 10px; margin-top: auto; }
.btn-cancel, .btn-save { flex: 1; padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 15px; transition: 0.2s; }
.btn-cancel { background: #fff; border: 1px solid #ccc; color: #54656f; }
.btn-cancel:hover { background: #f0f2f5; }
.btn-save { background: var(--primary-color); color: #fff; }
.btn-save:hover { background: #008f6f; }
.btn-save:disabled { opacity: 0.7; cursor: not-allowed; }

@media (max-width: 768px) {
    .tools-panel { width: 100%; }
    
    /* Header specific responsive cleanup */
    .header-btn-desktop {
        display: none !important;
    }
    
    .chat-header {
        padding: 10px 8px;
    }
    
    .chat-header .avatar {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .chat-info h2 {
        font-size: 14px;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .dropdown-menu {
        width: 200px;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* Auth / Login & Settings */
.login-screen { position: fixed; top:0; left:0; width:100%; height:100%; background: linear-gradient(135deg, #f5f7fb 0%, #e5eaf0 100%); display:flex; justify-content:center; align-items:center; z-index: 1000; }

.auth-container { display: flex; width: 900px; max-width: 95%; height: 550px; background: #fff; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); overflow: hidden; }
.auth-left { flex: 1; background: linear-gradient(135deg, var(--primary-color) 0%, #008f6f 100%); color: white; padding: 50px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.auth-left::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity: 0.5; pointer-events: none; }
.auth-left-content { position: relative; z-index: 1; }
.auth-left h1 { font-size: 32px; margin-bottom: 15px; font-weight: 700; }
.auth-left p { font-size: 16px; opacity: 0.9; margin-bottom: 40px; line-height: 1.5; }
.auth-features { display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; align-items: center; font-size: 16px; font-weight: 500; }
.feature-item i { background: rgba(255,255,255,0.2); width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 50%; margin-right: 15px; font-size: 18px; }
.auth-right { flex: 1; display: flex; justify-content: center; align-items: center; padding: 40px; background: #fff; }
.auth-box { width: 100%; max-width: 320px; }
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h2 { font-size: 24px; color: var(--text-primary); margin-bottom: 5px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-header p { color: var(--text-secondary); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.input-group { position: relative; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a0aeb7; font-size: 16px; }
.input-group input { width: 100%; padding: 14px 15px 14px 45px; border: 1px solid #e0e5e9; border-radius: 10px; font-size: 15px; outline: none; transition: 0.3s; background: #f9fbfd; }
.input-group input:focus { border-color: var(--primary-color); background: #fff; box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1); }
.btn-auth { width: 100%; padding: 14px; background: var(--primary-color); color: #fff; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 16px; transition: 0.3s; margin-top: 10px; box-shadow: 0 4px 10px rgba(0, 168, 132, 0.2); }
.btn-auth:hover { background: #008f6f; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 168, 132, 0.3); }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 15px; }
.auth-switch a { color: var(--primary-color); text-decoration: none; font-weight: 600; transition: 0.2s; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error { color: #ef4444; font-size: 13px; margin-top: 15px; text-align: center; background: #fee2e2; padding: 10px; border-radius: 8px; display: none; }

@media (max-width: 768px) {
    .auth-container { flex-direction: column; height: auto; max-height: 95vh; overflow-y: auto; }
    .auth-left { padding: 20px; text-align: center; }
    .auth-features { display: none; }
    .auth-left p { margin-bottom: 0; display: none; }
    .auth-left h1 { font-size: 24px; margin-bottom: 0; }
    .auth-right { padding: 20px; }
    .auth-header { margin-bottom: 20px; }
}

/* Settings Layout Redesign */
.settings-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); z-index: 200; display:flex; justify-content:center; align-items:center; }
.settings-box { background: #fff; width: 850px; height: 600px; max-width: 95%; max-height: 90%; border-radius: 12px; display:flex; flex-direction:row; overflow:hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.settings-sidebar { width: 260px; background: #f8f9fa; border-right: 1px solid #e9ecef; display: flex; flex-direction: column; }
.settings-sidebar-header { padding: 20px; font-weight: 700; font-size: 18px; border-bottom: 1px solid #e9ecef; display: flex; justify-content: space-between; align-items: center; color: var(--primary-color); }
.settings-sidebar-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #adb5bd; transition: 0.2s; }
.settings-sidebar-close:hover { color: #dc3545; }
.settings-tabs { flex-direction: column; border-bottom: none; overflow-y: auto; flex: 1; padding: 10px 0; }
.setting-tab { text-align: left; padding: 15px 20px; border-bottom: none; border-left: 4px solid transparent; cursor: pointer; font-weight: 500; color: #495057; display: flex; align-items: center; gap: 12px; transition: 0.2s; }
.setting-tab:hover { background: #e9ecef; }
.setting-tab.active { border-left: 4px solid var(--primary-color); background: #e6f6f3; color: var(--primary-color); font-weight: 600; }
.settings-content-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #fff; min-height: 0; }
.settings-content { padding: 30px; overflow-y: auto; flex: 1; min-height: 0; }
@media (max-width: 768px) {
    .settings-box { flex-direction: column; max-height: 95%; }
    .settings-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e9ecef; flex: none; max-height: 40%; }
    .settings-tabs { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 0; }
    .setting-tab { padding: 10px; font-size: 13px; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; flex: 0 0 auto; }
    .setting-tab.active { border-left: none; border-bottom: 3px solid var(--primary-color); }
    .settings-content-wrapper { flex: 1; min-height: 0; overflow: hidden; }
}

.settings-content .hidden { display: none !important; }
.settings-content label { display:block; font-size:13px; color:#555; margin-bottom:5px; font-weight:500; }
.settings-content input { width:100%; padding:10px; margin-bottom:15px; border:1px solid #ddd; border-radius:5px; outline:none; }
.btn-primary { background: var(--primary-color); color:#fff; border:none; padding:10px 15px; border-radius:5px; cursor:pointer; font-weight:500; width:100%; }
.btn-secondary { background: #f0f2f5; color:#555; border:1px solid #ddd; padding:10px 15px; border-radius:5px; cursor:pointer; font-weight:500; width:100%; }
.btn-small { padding: 5px 10px; border-radius:3px; border:none; cursor:pointer; font-size:12px; }

/* Animations */
.animate-enter {
    animation: slideInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* IA Badge & Toggle */
.ia-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.ia-badge.active {
    background: #dcfce7;
    color: #15803d;
}

.header-ia-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-left: 6px !important;
    transition: all 0.2s ease;
    color: #64748b !important;
    font-size: 14px !important;
}

.header-ia-toggle:hover {
    background: #f1f5f9 !important;
    color: var(--text-primary) !important;
    transform: translateY(-1px);
}

.header-ia-toggle.active {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bcf6d6 !important;
}

.resumo-btn { color: #856404 !important; background: #fef9c3 !important; border-color: #fef08a !important; }
.resumo-btn:hover { background: #fef08a !important; }

.agenda-btn { color: #15803d !important; background: #dcfce7 !important; border-color: #bbf7d0 !important; }
.agenda-btn:hover { background: #bbf7d0 !important; }

.header-btn-more {
    background: none;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    margin-left: 6px;
    transition: 0.2s;
}

.header-btn-more:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.header-more-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Header Switch Button */
.header-action-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 0 8px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-left: 6px;
}

.switch-btn {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 16px;
}

.switch-btn input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 18px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider-round {
    background-color: #00796b;
}

input:focus + .slider-round {
    box-shadow: 0 0 1px #00796b;
}

input:checked + .slider-round:before {
    transform: translateX(12px);
}

/* Premium Kanban Styles */
.kanban-premium-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    background: #f4f7f6;
    z-index: 500;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.kanban-header-premium {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    z-index: 10;
}

.kanban-header-left { display: flex; align-items: center; gap: 16px; }
.kanban-header-left h2 { font-size: 18px; font-weight: 600; color: #1e293b; margin: 0; }

.kanban-filters-premium { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }
.search-input-premium {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex; align-items: center;
    padding: 0 12px;
    height: 38px;
    width: 300px;
    transition: all 0.2s;
}
.search-input-premium:focus-within { background: #fff; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0,168,132,0.1); }
.search-input-premium i { color: #64748b; font-size: 14px; }
.search-input-premium input { border: none; background: transparent; outline: none; margin-left: 8px; font-size: 14px; width: 100%; color: #334155; }

.btn-icon-premium {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    color: #64748b; cursor: pointer; transition: all 0.2s; font-size: 15px;
}
.btn-icon-premium:hover { background: #f8fafc; color: var(--primary-color); border-color: #cbd5e1; }

.kanban-header-right { display: flex; align-items: center; gap: 12px; }
.btn-premium {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 0 16px; height: 38px; display: flex; align-items: center; gap: 8px;
    color: #475569; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.btn-premium:hover { background: #f8fafc; }
.btn-premium.primary { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.btn-premium.primary:hover { background: #008f6f; }

.kanban-board-wrapper {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 24px;
}

.kanban-board-premium {
    display: flex;
    gap: 20px;
    height: 100%;
    align-items: stretch;
}

.kanban-column-premium {
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 12px;
}

.kanban-col-header-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}
.kanban-col-title-wrap { display: flex; align-items: center; gap: 8px; }
.kanban-col-dot { width: 10px; height: 10px; border-radius: 50%; }
.kanban-col-name { font-weight: 600; color: #1e293b; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.kanban-col-count { background: #e2e8f0; color: #475569; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }

.kanban-items-premium {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 24px;
    padding-right: 4px;
}
.kanban-items-premium::-webkit-scrollbar { width: 4px; }
.kanban-items-premium::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.kanban-card-premium {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.kanban-card-premium:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.kanban-card-premium.sortable-ghost { opacity: 0.4; background: #f8fafc; border: 2px dashed #cbd5e1; }
.kanban-card-premium.sortable-drag { cursor: grabbing !important; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); transform: rotate(2deg); }

.k-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.k-card-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.k-card-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.k-card-name-wrap { display: flex; flex-direction: column; min-width: 0; }
.k-card-name { font-weight: 600; color: #1e293b; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-card-phone { font-size: 12px; color: #64748b; }

.k-card-actions-btn { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px; border-radius: 4px; transition: 0.2s; opacity: 0; }
.kanban-card-premium:hover .k-card-actions-btn { opacity: 1; }
.k-card-actions-btn:hover { background: #f1f5f9; color: #334155; }

.k-card-body { margin-bottom: 12px; }
.k-card-msg { font-size: 13px; color: #475569; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }

.k-card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.k-card-tags { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.k-card-tag { padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.3px; }
.k-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; }
.k-card-unread { background: #ef4444; color: #fff; padding: 2px 6px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.k-card-time { display: flex; align-items: center; gap: 4px; }

/* Quick actions inside card hover */
.k-card-quick-actions {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: 0.2s;
}
.kanban-card-premium:hover .k-card-quick-actions { opacity: 1; }
.k-btn-quick {
    width: 28px; height: 28px; border-radius: 6px; border: none; background: #f1f5f9; color: #475569;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s;
}
.k-btn-quick:hover { background: var(--primary-color); color: #fff; }

.kanban-col-manage-item {
    display: flex; gap: 10px; align-items: center; padding: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; cursor: grab;
}
.kanban-col-manage-item input[type="text"] { flex: 1; border: 1px solid #cbd5e1; padding: 6px 10px; border-radius: 4px; font-size: 14px; }
.kanban-col-manage-item input[type="color"] { width: 30px; height: 30px; padding: 0; border: none; border-radius: 4px; cursor: pointer; }
.kanban-col-manage-item .btn-remove { background: #fee2e2; color: #ef4444; border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; }

.tag-badge {
    font-size: 9px; font-weight: bold; padding: 2px 6px; border-radius: 4px; color: white; text-transform: uppercase;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    background: transparent;
}

.calendar-day-header {
    background: #fff;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: 6px;
    text-transform: uppercase;
}

.calendar-day {
    background: #fff;
    min-height: 90px;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.calendar-day.empty {
    background: rgba(255,255,255,0.4);
    pointer-events: none;
    box-shadow: none;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
    background: #f0fff4;
}

.calendar-day-number {
    font-weight: bold;
    font-size: 14px;
    color: #444;
}

.calendar-day.today .calendar-day-number {
    color: var(--primary-color);
}

.calendar-day-events {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    padding: 3px 6px;
    border-radius: 4px;
    background: #e9ecef;
    color: #666;
}

.calendar-day.has-events {
    background: #fff;
}

.calendar-day.has-events .calendar-day-events {
    background: var(--primary-color);
    color: #fff;
}

#agenda-toggle-container button {
    border: none;
    background: transparent;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
}

#agenda-toggle-container button.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Unread Badge */
.contact-msg-wrapper {
    display: flex; justify-content: space-between; align-items: center; gap: 5px;
}

.contact-msg-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.tag-dots-container {
    display: flex;
    gap: 3px;
    margin-bottom: 2px;
}

.tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.unread-badge {
    background-color: #25D366; color: #fff; font-size: 12px; font-weight: bold;
    border-radius: 50%; min-width: 20px; height: 20px; display: flex;
    justify-content: center; align-items: center; padding: 0 6px;
    margin-left: 10px;
}

/* Chat Actions Dropdown */
.dropdown-menu {
    position: absolute; right: 0; top: 100%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px; overflow: hidden; z-index: 100; min-width: 150px;
}
.dropdown-menu a {
    display: block; padding: 12px 16px; text-decoration: none; color: var(--text-primary); font-size: 14px; transition: 0.2s;
}
.dropdown-menu a:hover { background: #f0f2f5; }
.dropdown-menu a i { margin-right: 8px; width: 16px; text-align: center; }

/* Custom Audio Player */
.custom-audio-player-wrapper {
    display: flex; flex-direction: column; gap: 5px; max-width: 100%;
}
.custom-audio-player {
    display: flex; align-items: center; background: #f0f2f5; border-radius: 20px; padding: 5px 10px; width: 220px; max-width: 100%; gap: 8px; box-sizing: border-box;
}
.audio-actions {
    display: flex; gap: 5px; margin-top: 4px;
}
.btn-transcribe-audio {
    background: transparent; 
    border: none; 
    font-size: 10px; 
    color: var(--text-secondary); 
    cursor: pointer; 
    padding: 2px 4px; 
    border-radius: 4px; 
    transition: 0.2s; 
    display: flex; 
    align-items: center; 
    gap: 3px;
    text-transform: lowercase;
    opacity: 0.7;
}
.btn-transcribe-audio:hover { background: rgba(0,0,0,0.05); opacity: 1; color: var(--primary-color); }
.transcription-box {
    background: rgba(0,0,0,0.03); border-radius: 8px; padding: 8px; font-size: 12px; color: #54656f; border-left: 2px solid var(--primary-color); margin-top: 5px;
}
.transcription-actions { margin-top: 5px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 5px; }
.transcription-actions button { background: none; border: none; color: var(--primary-color); font-weight: 600; font-size: 10px; cursor: pointer; text-transform: uppercase; }

.clickable-msg { cursor: pointer; transition: background 0.2s; }
.clickable-msg:hover { background-color: rgba(0, 168, 132, 0.05) !important; }
.play-pause-btn { background: var(--primary-color) !important; color: white !important; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-left:0 !important; transition: 0.2s; }
.progress-wrapper { flex: 1; height: 6px; background: #ddd; border-radius: 3px; cursor: pointer; position: relative; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--primary-color); }
.time-display { font-size: 11px; color: var(--text-secondary); min-width: 35px; text-align: right; }

/* Translation label */
.msg-original-btn {
    display: block;
    font-size: 10px;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 4px;
    font-weight: 600;
}
.msg-original-btn:hover { color: #008f6f; }

@media (max-width: 768px) {
    #emoji-picker-container emoji-picker { width: 100vw; height: 300px; }
}

/* Image tweaks */
.msg-image { max-width: 100%; max-height: 250px; border-radius: 6px; margin-bottom: 8px; display: block; cursor: pointer; transition: transform 0.2s; }
.msg-image:hover { transform: scale(1.02); }

/* Image Modal */
.image-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; animation: fadeIn 0.3s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.image-modal-content { position: relative; max-width: 90%; max-height: 90%; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.image-modal-content img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }

/* Language Selection Modal Tweaks */
.btn-lang {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9edef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: 0.2s;
    font-weight: 500;
    text-align: center;
}
.btn-lang:hover { background: #f0f2f5; border-color: #ccd0d5; }
.btn-lang.selected { background: #00796b; color: white; border-color: #00796b; }
.close-image-modal { position: absolute; top: -40px; right: 0; background: none; border: none; color: white; font-size: 30px; cursor: pointer; }
.download-btn { background: var(--primary-color); color: white; padding: 10px 20px; border-radius: 20px; text-decoration: none; font-weight: 500; font-size: 14px; transition: 0.2s; }
.download-btn:hover { background: #008f6f; }

/* Multi atendimento */
.multi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.multi-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}
.multi-card h4 { margin-bottom: 10px; color: var(--text-primary); }
.multi-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.multi-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    max-height: 280px;
    overflow: auto;
}
.multi-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #f8fafb;
    border: 1px solid #edf1f2;
    border-radius: 8px;
}
.muted { color: var(--text-secondary); font-size: 12px; margin-top: 3px; }
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    background: #e9edef;
    color: #54656f;
}
.status-pill.online { background: #d9fdd3; color: #176b38; }
.status-pill.ausente { background: #fff3cd; color: #856404; }
.status-pill.pausa { background: #fde2e1; color: #842029; }
.status-pill.offline { background: #e9edef; color: #54656f; }
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: 13px;
}
.modal-form-box {
    width: 620px !important;
    height: auto !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    overflow: auto;
    flex-direction: column !important;
    padding: 20px !important;
    background: #fff;
}
.attendant-info {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}
.btn-small.danger { background: #fee2e2 !important; color: #b91c1c !important; }
.report-kpis { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.report-kpis span { background:#eef6f4; color:#05634f; border-radius:6px; padding:4px 6px; font-size:11px; }

@media (max-width: 768px) {
    .multi-grid, .multi-inline, .permissions-grid { grid-template-columns: 1fr; }
    .multi-row { align-items: flex-start; flex-direction: column; }
}
