/* =====================================================
   Central de Atendimento WhatsApp — Design SaaS Premium
   Bootstrap 5 Dark Theme + Glassmorphism
   ===================================================== */

:root {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-glow-strong: rgba(99, 102, 241, 0.3);
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    --bg-body: #0b0d14;
    --bg-card: rgba(22, 25, 42, 0.7);
    --bg-card-solid: #16192a;
    --bg-card-hover: rgba(34, 38, 64, 0.8);
    --bg-sidebar: rgba(15, 18, 32, 0.95);
    --bg-input: rgba(26, 30, 50, 0.8);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(99, 102, 241, 0.2);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo i {
    font-size: 1.5rem;
    -webkit-text-fill-color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    opacity: 0;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: var(--text-primary);
}

.sidebar-link:hover::before {
    opacity: 1;
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.sidebar-link.active::before {
    display: none;
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.sidebar-link span {
    position: relative;
    z-index: 1;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    margin-bottom: 8px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    padding: 32px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    margin: -32px -32px 24px;
}

.topbar-title {
    font-weight: 600;
    font-size: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* ===== CARDS — GLASSMORPHISM ===== */
.card-saas {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    animation: slideUp 0.4s ease forwards;
}

.card-saas:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ===== STAT CARDS — PREMIUM ===== */
.stat-card {
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 28px 20px 24px;
    cursor: default;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--radius);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card:hover .stat-icon {
    opacity: 0.15;
    transform: scale(1.1);
}

.stat-card.stat-total::before {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-card.stat-total::after {
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
}

.stat-card.stat-novos::before {
    background: linear-gradient(90deg, var(--accent), #06b6d4);
}

.stat-card.stat-novos::after {
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
}

.stat-card.stat-atendimento::before {
    background: linear-gradient(90deg, var(--warning), #f97316);
}

.stat-card.stat-atendimento::after {
    background: radial-gradient(circle at center, var(--warning-glow) 0%, transparent 70%);
}

.stat-card.stat-fechados::before {
    background: linear-gradient(90deg, var(--success), #059669);
}

.stat-card.stat-fechados::after {
    background: radial-gradient(circle at center, var(--success-glow) 0%, transparent 70%);
}

.stat-card.stat-perdidos::before {
    background: linear-gradient(90deg, var(--danger), #dc2626);
}

.stat-card.stat-perdidos::after {
    background: radial-gradient(circle at center, var(--danger-glow) 0%, transparent 70%);
}

.stat-card.stat-comissao::before {
    background: linear-gradient(90deg, var(--success), var(--accent));
}

.stat-card.stat-comissao::after {
    background: radial-gradient(circle at center, var(--success-glow) 0%, transparent 70%);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stat-icon {
    font-size: 3rem;
    position: absolute;
    right: 16px;
    bottom: 12px;
    opacity: 0.06;
    transition: var(--transition);
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== BUTTONS ===== */
.btn-primary-saas {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary-saas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    opacity: 0;
    transition: var(--transition);
}

.btn-primary-saas:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

.btn-primary-saas:hover::before {
    opacity: 1;
}

.btn-primary-saas i,
.btn-primary-saas span {
    position: relative;
    z-index: 1;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-glow);
    background: var(--primary-glow);
}

.btn-danger-saas {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger-saas:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-warning-saas {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-warning-saas:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

/* ===== TABLE ===== */
.table-saas {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-saas thead th {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table-saas tbody td {
    padding: 16px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table-saas tbody tr {
    transition: var(--transition);
}

.table-saas tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.table-saas tbody tr:last-child td {
    border-bottom: none;
}

/* ===== STATUS BADGES ===== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulseGlow 2s ease infinite;
}

.badge-novo {
    background: var(--accent-glow);
    color: var(--accent);
}

.badge-novo::before {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.badge-em_atendimento {
    background: var(--warning-glow);
    color: var(--warning);
}

.badge-em_atendimento::before {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.badge-proposta {
    background: var(--primary-glow);
    color: var(--primary-hover);
}

.badge-proposta::before {
    background: var(--primary-hover);
    box-shadow: 0 0 8px var(--primary-hover);
}

.badge-fechado {
    background: var(--success-glow);
    color: var(--success);
}

.badge-fechado::before {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.badge-perdido {
    background: var(--danger-glow);
    color: var(--danger);
}

.badge-perdido::before {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

/* ===== FORM INPUTS ===== */
.form-control-saas {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.875rem;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.form-control-saas:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 20px rgba(99, 102, 241, 0.1);
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
}

.form-control-saas::placeholder {
    color: var(--text-muted);
}

.form-label-saas {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

select.form-control-saas {
    cursor: pointer;
}

/* ===== CHAT ===== */
.chat-container {
    display: flex;
    height: calc(100vh - 96px);
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.chat-sidebar {
    width: 340px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.chat-sidebar-search {
    position: relative;
}

.chat-sidebar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chat-sidebar-search input {
    padding-left: 36px;
    width: 100%;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.chat-item:hover,
.chat-item.active {
    background: var(--primary-glow);
    color: inherit;
}

.chat-item.active {
    border-left: 3px solid var(--primary);
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-preview {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-item-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.chat-item-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-name {
    font-weight: 600;
    font-size: 1rem;
}

.chat-header-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Message Bubbles */
.msg-bubble {
    max-width: 65%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    animation: fadeInMsg 0.25s ease;
}

.msg-cliente {
    align-self: flex-start;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.msg-vendedor {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.2);
}

.msg-sistema {
    align-self: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 20px;
}

.msg-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 4px;
    display: block;
}

.msg-vendedor .msg-time {
    text-align: right;
}

/* Message Attachments */
.msg-image {
    max-width: 280px;
    border-radius: 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.msg-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.msg-audio {
    width: 100%;
    min-width: 220px;
    height: 40px;
    border-radius: 20px;
    margin-bottom: 4px;
}

.msg-audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.1);
}

.msg-document {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    margin-bottom: 4px;
}

.msg-document:hover {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

.msg-document i {
    font-size: 1.5rem;
    color: var(--accent);
}

.msg-document-info {
    flex: 1;
    min-width: 0;
}

.msg-document-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-document-size {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Chat Input */
.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
}

.chat-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrap textarea {
    flex: 1;
    resize: none;
    min-height: 44px;
    max-height: 120px;
}

.chat-attach-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.chat-attach-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
}

.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* File Preview */
.chat-file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.chat-file-preview i {
    color: var(--accent);
    font-size: 1.2rem;
}

.chat-file-preview span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-file-preview .remove-file {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
}

/* ===== INLINE EDIT ===== */
.inline-edit-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-edit-group input {
    flex: 1;
    font-size: 0.9rem;
}

.inline-edit-group .btn-save-inline {
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.inline-edit-group .btn-save-inline:hover {
    background: #059669;
}

/* ===== ARCHIVE BADGE ===== */
.badge-archived {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== FIRST CONTACT WARNING ===== */
.first-contact-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    background: var(--warning-glow);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--warning);
}

/* ===== LOGIN ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    padding: 20px;
    background-image:
        radial-gradient(ellipse at 30% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(34, 211, 238, 0.04) 0%, transparent 50%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.login-logo p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0;
}

/* ===== MODAL ===== */
.modal-content {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* ===== ALERTS ===== */
.alert-saas {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.85rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

/* ===== PAGINATION ===== */
.pagination-saas .page-link {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: var(--transition);
}

.pagination-saas .page-link:hover {
    background: var(--primary-glow);
    color: var(--text-primary);
    border-color: var(--border-glow);
}

.pagination-saas .active .page-link {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border-color: var(--primary);
    color: #fff;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.2;
    display: block;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== TOAST ===== */
.toast {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

/* ===== DASHBOARD SPECIFIC ===== */
.dash-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-section-title i {
    font-size: 1.1rem;
}

.protection-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.protection-item:last-child {
    border-bottom: none;
}

.protection-item i {
    color: var(--success);
    font-size: 0.9rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.quick-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-glow);
    background: var(--primary-glow);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.quick-action-btn.primary-action {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border: none;
}

.quick-action-btn.primary-action:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: 0;
        padding: 0 16px 16px;
    }

    .chat-container {
        flex-direction: column;
        height: auto;
        border-radius: var(--radius);
    }

    .chat-sidebar {
        width: 100%;
        max-height: 300px;
    }

    .chat-messages {
        min-height: 400px;
    }

    .sidebar-toggle {
        display: block;
    }
}

@media (min-width: 992px) {
    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .stat-value {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .msg-bubble {
        max-width: 85%;
    }

    .login-card {
        padding: 32px 24px;
    }
}