/* ==========================================================
   WHATSAPP EXTRACTOR PRO - LIGHT / WHITE THEME DESIGN SYSTEM
   Modern, Clean, Corporate SaaS Style
   ========================================================== */

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --brand-emerald: #10b981;
    --brand-emerald-hover: #059669;
    --brand-emerald-light: #ecfdf5;
    --brand-emerald-border: #a7f3d0;

    --brand-blue: #3b82f6;
    --brand-blue-light: #eff6ff;

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;

    --warning: #f59e0b;
    --warning-light: #fffbeb;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   LAYOUT PRINCIPAL
   ========================================================== */

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================
   BARRA DE NAVEGACIÓN SUPERIOR
   ========================================================== */

.app-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-emerald-hover);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-pill svg {
    color: var(--brand-emerald);
}

.stat-pill strong {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================
   BOTONES
   ========================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background-color: var(--brand-emerald);
    color: #ffffff;
    border-color: var(--brand-emerald);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    background-color: var(--brand-emerald-hover);
    border-color: var(--brand-emerald-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
}

.btn-emerald {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
    background: linear-gradient(135deg, #059669 0%, #065f46 100%);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: #ffffff;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-main);
    color: var(--text-primary);
    border-color: #cbd5e1;
}

.btn-danger-outline {
    background-color: #ffffff;
    color: var(--danger);
    border-color: var(--danger-border);
}

.btn-danger-outline:hover {
    background-color: var(--danger-light);
    border-color: var(--danger);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================
   SECCIÓN DE EMPRESAS (CARRUSEL / LISTA CON FOTOS)
   ========================================================== */

.companies-section {
    padding: 16px 24px 8px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.title-with-icon h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.title-with-icon svg {
    color: var(--brand-emerald);
}

.section-title-row .subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.companies-scroll-container {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}

.companies-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.companies-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: var(--radius-full);
}

/* Tarjeta individual de Empresa */
.company-card {
    min-width: 240px;
    max-width: 260px;
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    user-select: none;
}

.company-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.company-card.active {
    border-color: var(--brand-emerald);
    background-color: #f0fdf4;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.company-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.company-card-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
}

.company-card-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-card-person {
    font-size: 0.76rem;
    color: var(--brand-emerald-hover);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.company-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.company-card-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: #cbd5e1;
}

.company-card.connected .company-card-status .status-dot {
    background-color: var(--brand-emerald);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.company-card.waiting .company-card-status .status-dot {
    background-color: var(--warning);
    animation: pulse 1.5s infinite;
}

/* Tarjeta especial para crear nueva empresa */
.company-card.create-card {
    border-style: dashed;
    border-color: #cbd5e1;
    background-color: #fafafa;
    min-width: 200px;
    justify-content: center;
    text-align: center;
}

.company-card.create-card:hover {
    border-color: var(--brand-emerald);
    background-color: #f0fdf4;
}

.create-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.create-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-emerald);
}

.create-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.create-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================================
   WORKSPACE DE LA EMPRESA SELECCIONADA
   ========================================================== */

.app-content {
    padding: 20px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Empty State cuando no hay empresa */
.empty-state-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    max-width: 580px;
    margin: 40px auto;
    box-shadow: var(--shadow-sm);
}

.empty-icon-box {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background-color: var(--brand-emerald-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.empty-state-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.empty-state-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Header de la Empresa Activa */
.company-header-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.company-profile-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-full);
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    background-color: var(--bg-main);
    flex-shrink: 0;
}

.company-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: #ffffff;
}

.company-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-title-row h1 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.company-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 4px;
}

.company-person-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.person-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    color: #1e293b;
    background-color: #f8fafc;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.person-badge svg {
    color: var(--brand-emerald);
}

.person-tag-label {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    color: var(--brand-emerald-hover);
    background-color: var(--brand-emerald-light);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-weight: 600;
}

.success-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.company-meta-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background-color: var(--bg-main);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.meta-tag svg {
    color: var(--brand-emerald);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-status.disconnected {
    background-color: #f1f5f9;
    color: var(--text-muted);
}

.badge-status.waiting {
    background-color: var(--warning-light);
    color: #b45309;
}

.badge-status.connected {
    background-color: var(--brand-emerald-light);
    color: var(--brand-emerald-hover);
}

.badge-status .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: currentColor;
}

.company-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Banner de conectar WhatsApp */
.connect-prompt-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid var(--brand-emerald-border);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.prompt-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.prompt-content {
    flex-grow: 1;
}

.prompt-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 4px;
}

.prompt-content p {
    font-size: 0.9rem;
    color: #047857;
}

/* Hero card de extracción en 1 solo clic */
.hero-extract-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 2px solid #10b981;
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 28px;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.15), 0 8px 10px -6px rgba(16, 185, 129, 0.1);
}

.hero-extract-left {
    flex: 1;
}

.hero-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-extract-left h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #064e3b;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.hero-extract-left p {
    font-size: 0.92rem;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 12px;
}

.hero-stats-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-item {
    font-size: 0.78rem;
    font-weight: 600;
    color: #065f46;
    background-color: #ffffff;
    border: 1px solid #d1fae5;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.hero-extract-right {
    flex-shrink: 0;
}

.btn-hero-lg {
    padding: 16px 28px;
    border-radius: var(--radius-xl);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-lg:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #065f46 100%);
}

.btn-hero-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-hero-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.btn-hero-subtitle {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.9;
}

.btn-hero-export {
    background: #ffffff !important;
    color: #065f46 !important;
    border: 2px solid #10b981 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}

.btn-hero-export:hover {
    background: #ecfdf5 !important;
    border-color: #059669 !important;
    color: #047857 !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25) !important;
}

/* ==========================================================
   EXPLORADOR DE CHATS (SPLIT VIEW)
   ========================================================== */

.chats-explorer-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    grid-template-rows: 100%;
    gap: 0;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    height: 720px;
    max-height: calc(100vh - 220px);
    min-height: 520px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Sidebar de Chats */
.chats-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.search-box {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-tabs {
    display: flex;
    padding: 8px 14px;
    gap: 6px;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-btn.active {
    background-color: #ffffff;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.chats-list-wrapper {
    flex: 1 1 0px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.chat-item:hover {
    background-color: var(--bg-main);
}

.chat-item.active {
    background-color: #f0fdf4;
    border-left: 3px solid var(--brand-emerald);
}

.chat-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background-color: #e2e8f0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-item.group .chat-item-avatar {
    background-color: #e0f2fe;
    color: #0284c7;
}

.chat-item-content {
    flex-grow: 1;
    overflow: hidden;
}

.chat-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.chat-item-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.chat-item-tag {
    font-size: 0.75rem;
    color: var(--brand-emerald-hover);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-item-badge {
    padding: 2px 6px;
    background-color: #f1f5f9;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Panel de Mensajes */
.messages-panel {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.no-chat-placeholder {
    margin: auto;
    text-align: center;
    padding: 40px;
    max-width: 420px;
}

.placeholder-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.no-chat-placeholder h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.no-chat-placeholder p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.active-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.chat-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-title {
    font-weight: 800;
    font-size: 0.98rem;
}

.chat-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.chat-sub-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.chat-sub-row .divider {
    color: var(--text-muted);
}

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

.timeline-date-separator {
    display: flex;
    justify-content: center;
    margin: 14px 0 6px;
    flex-shrink: 0;
}

.timeline-date-separator span {
    background-color: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-emerald-outline {
    background-color: transparent;
    border: 1px solid #10b981;
    color: #059669;
}

.btn-emerald-outline:hover {
    background-color: #ecfdf5;
    color: #047857;
}

/* Timeline de Mensajes */
.messages-timeline {
    flex: 1 1 0px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8fafc;
}

.message-bubble {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.message-bubble.incoming {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.message-bubble.outgoing {
    align-self: flex-end;
    background-color: #ecfdf5;
    border: 1px solid var(--brand-emerald-border);
    color: #064e3b;
    border-bottom-right-radius: 2px;
}

.msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.msg-sender-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.msg-sender-username {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--brand-emerald);
}

.msg-sender-number {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.msg-body {
    word-break: break-word;
    white-space: pre-wrap;
}

.media-tag {
    display: inline-block;
    padding: 2px 6px;
    background-color: #f1f5f9;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 4px;
}

.msg-footer {
    display: flex;
    justify-content: flex-end;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================
   MODALES
   ========================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-title h3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.modal-close-btn {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group .label-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease;
}

.form-group input[type="text"]:focus {
    border-color: var(--brand-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Upload de Logo */
.logo-upload-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-preview-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    border: 2px dashed var(--border-color);
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-select-btn:hover {
    border-color: var(--brand-emerald);
    color: var(--brand-emerald-hover);
    background-color: #f0fdf4;
}

.file-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.avatar-presets {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.preset-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background-color: var(--bg-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-btn:hover {
    transform: scale(1.08);
}

.preset-btn.active {
    border-color: var(--brand-emerald);
    background-color: #f0fdf4;
    transform: scale(1.1);
}

/* Modal QR */
.qr-modal-body {
    text-align: center;
    padding: 24px 32px;
}

.qr-instructions-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.qr-display-box {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    padding: 10px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.qr-display-box img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: var(--radius-md);
}

.qr-spinner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.qr-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    background-color: var(--bg-main);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-num {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background-color: var(--brand-emerald);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qr-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--warning);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--warning);
    animation: pulse 1.5s infinite;
}

/* Modal Live Sync */
.sync-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #f1f5f9;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.sync-details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sync-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background-color: #f0fdf4;
    border: 1px solid var(--brand-emerald-border);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: #065f46;
}

.success-box {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-full);
    background-color: var(--brand-emerald-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.success-box h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.success-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Modal Descargas */
.downloads-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    background-color: #ffffff;
}

.download-card:hover {
    border-color: var(--brand-emerald);
    background-color: #f0fdf4;
    transform: translateY(-1px);
}

.download-card.highlight-card {
    border-color: var(--brand-emerald-border);
    background-color: #f0fdf4;
}

.download-card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.download-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.download-card-info strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.download-card-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================
   SELECTOR DE VISTAS (CHATS VS CONTACTOS POR EMPRESA)
   ========================================================== */

.company-view-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.view-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.view-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.18s ease;
}

.view-tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-main);
}

.view-tab-btn.active {
    background-color: var(--brand-emerald-light);
    color: var(--brand-emerald-hover);
}

.count-pill {
    padding: 2px 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.view-active-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.view-active-title strong {
    color: var(--text-primary);
}

/* Libreta de Contactos por Empresa */
.contacts-explorer-container {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 720px;
    max-height: calc(100vh - 220px);
    min-height: 520px;
    overflow: hidden;
}

.contacts-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
    flex-shrink: 0;
}

.contacts-search {
    max-width: 450px;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.contacts-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.contacts-grid-wrapper {
    flex: 1 1 0px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
    align-content: start;
    padding-right: 6px;
    padding-bottom: 20px;
}

/* Scrollbars modernos y fluidos para Chats, Mensajes y Contactos */
.chats-list-wrapper,
.messages-timeline,
.contacts-grid-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.chats-list-wrapper::-webkit-scrollbar,
.messages-timeline::-webkit-scrollbar,
.contacts-grid-wrapper::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.chats-list-wrapper::-webkit-scrollbar-track,
.messages-timeline::-webkit-scrollbar-track,
.contacts-grid-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.chats-list-wrapper::-webkit-scrollbar-thumb,
.messages-timeline::-webkit-scrollbar-thumb,
.contacts-grid-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

.chats-list-wrapper::-webkit-scrollbar-thumb:hover,
.messages-timeline::-webkit-scrollbar-thumb:hover,
.contacts-grid-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.contact-card-item {
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.18s ease;
}

.contact-card-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.contact-card-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.contact-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-card-number {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.contact-card-username {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-emerald-hover);
    margin-top: 2px;
}

.contact-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.contact-badge {
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ==========================================================
   ANIMACIONES Y UTILIDADES
   ========================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--brand-emerald);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================
   TARJETA DE IMPORTACIÓN DIRECTA DE CHAT DESDE EL CELULAR
   ========================================================= */
.card-import-phone {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.card-import-phone:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.card-import-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.card-import-icon {
    width: 48px;
    height: 48px;
    background-color: var(--brand-emerald-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-import-info {
    flex: 1;
    min-width: 260px;
}

.card-import-info h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.card-import-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.card-import-action {
    flex-shrink: 0;
}

.btn-import-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.88rem;
}

.import-phone-status {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.4;
}

.import-phone-status.loading {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.import-phone-status.success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.import-phone-status.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ==========================================================
   PANTALLA DE INICIO DE SESIÓN CON SEGURIDAD (ADMIN)
   ========================================================== */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.auth-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
    padding: 36px 32px;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-logo-badge {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.auth-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-input-group {
    margin-bottom: 18px;
}

.auth-input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper svg.input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.auth-input-wrapper input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s ease;
}

.auth-input-wrapper input:focus {
    border-color: var(--brand-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.btn-toggle-password:hover {
    color: var(--text-primary);
}

.btn-auth-submit {
    width: 100%;
    padding: 13px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 0px;
}

/* User Profile Badge en el Navbar */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 6px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.user-avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details-mini {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name-mini {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.user-email-mini {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.btn-logout {
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-logout:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}
