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

body{
background:#f1f5f9;
overflow-x:hidden;
}

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

.sidebar{
width:260px;
background:white;
padding:20px;
border-right:1px solid #ddd;
display:flex;
flex-direction:column;
gap:15px;
}

.logo{
font-size:38px;
color:#2563eb;
margin-bottom:20px;
}

.sidebar button{
padding:18px;
border:none;
border-radius:14px;
background:#e2e8f0;
cursor:pointer;
font-size:20px;
font-weight:bold;
text-align:left;
}

.sidebar button:hover{
background:#2563eb;
color:white;
}

.main-content{
flex:1;
padding:30px;
overflow:hidden;
position: relative; /* لضمان ثبات الهيدر المطلق فوق الصفحات */
padding-top: 110px; /* حجز مساحة علوية لمنع تداخل كروت الصفحات */
}

.sidebar-btn.active{
    background:#2563eb;
    color:white;
}

.login-page{
display:flex;
justify-content:center;
align-items:center;
height:100vh;
background:#f1f5f9;
}

.login-card{
width:420px;
background:white;
padding:40px;
border-radius:24px;
box-shadow:0 5px 20px rgba(0,0,0,0.08);
display:flex;
flex-direction:column;
gap:18px;
}

.login-title{
font-size:42px;
color:#2563eb;
margin:0;
text-align:center;
}

.login-subtitle{
text-align:center;
color:#64748b;
margin-bottom:10px;
}

.login-card input{
padding:16px;
border:1px solid #dbe1ea;
border-radius:14px;
font-size:16px;
outline:none;
}

.login-card button{
background:#2563eb;
color:white;
border:none;
padding:16px;
border-radius:14px;
font-size:16px;
font-weight:bold;
cursor:pointer;
}

/* ACCOUNTS */
.accounts-page{
padding:30px;
}

.accounts-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:25px;
}

.accounts-title{
font-size:34px;
font-weight:700;
color:#2563eb;
margin:0;
}

.add-user-btn{
background:#2563eb;
color:white;
border:none;
padding:14px 20px;
border-radius:14px;
font-weight:600;
cursor:pointer;
}

.accounts-card{
background:white;
padding:25px;
border-radius:24px;
box-shadow:0 4px 15px rgba(0,0,0,0.05);
}

.accounts-table{
width:100%;
border-collapse:collapse;
}

.accounts-table th{
text-align:left;
padding:16px;
font-size:14px;
color:#64748b;
border-bottom:1px solid #e2e8f0;
}

.accounts-table td{
padding:18px 16px;
border-bottom:1px solid #f1f5f9;
font-size:15px;
}

.user-role{
background:#eff6ff;
color:#2563eb;
padding:6px 12px;
border-radius:999px;
font-size:13px;
font-weight:600;
display:inline-block;
}

.user-status{
background:#dcfce7;
color:#166534;
padding:6px 12px;
border-radius:999px;
font-size:13px;
font-weight:600;
display:inline-block;
}

.table-actions{
display:flex;
gap:10px;
}

.edit-user-btn{
background:#0f172a;
color:white;
border:none;
padding:10px 14px;
border-radius:10px;
cursor:pointer;
}

.delete-user-btn{
background:#ef4444;
color:white;
border:none;
padding:10px 14px;
border-radius:10px;
cursor:pointer;
}

/* 🌟 TOP BRAND BAR - البار العلوي الموحد والمعدل بشكل جذري منعا للتداخل */
.top-brand-bar {
    position: absolute !important;
    top: 30px !important;
    left: 30px !important;
    right: 30px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important; /* اسم النظام يسار وزر طلال يمين */
    box-sizing: border-box !important;
    z-index: 1000 !important;
}

/* اسم البرنامج (أقصى اليسار) */
#topSystemName {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* حاوية القائمة المنسدلة للمستخدم */
.user-dropdown {
    position: relative !important;
}

/* التنسيق المعدل للزر ليبقى ثابتا في أقصى اليمين باللون الأزرق المعتمد لديك */
.user-btn {
    background: #2563eb !important;
    color: white !important;
    border: none !important;
    padding: 14px 24px !important;
    border-radius: 14px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
    white-space: nowrap !important;
}

.user-btn:hover {
    background: #1d4ed8 !important;
}

.user-menu {
    position: absolute !important;
    top: 55px !important;
    right: 0 !important;
    background: white !important;
    width: 220px !important;
    border-radius: 18px !important;
    padding: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
    z-index: 9999 !important;
}

.user-menu.hidden {
    display: none !important;
}

.user-menu-role {
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 10px;
}

.user-menu button {
    width: 100%;
    border: none;
    background:#f8fafc;
    padding:14px;
    margin-bottom:8px;
    border-radius:12px;
    cursor:pointer;
    font-size:14px;
    text-align:left;
}

.user-menu button:hover {
    background:#eff6ff;
}

/* SIDEBAR LOGO - سنترة اللوغو في القائمة الجانبية بالكامل */
.sidebar-logo-wrapper {
    width: 100% !important;
    height: 140px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#sidebarLogo {
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    transition: width 0.1s ease !important;
}

/* MODAL */
.modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(15,23,42,0.45);
display:flex;
align-items:center;
justify-content:center;
z-index:9999;
}

.modal.hidden{
display:none;
}

.modal-content{
background:white;
width:420px;
padding:30px;
border-radius:24px;
box-shadow:0 20px 60px rgba(0,0,0,0.18);
display:flex;
flex-direction:column;
gap:16px;
}

.modal-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:10px;
}

.close-modal-btn{
border:none;
background:#f1f5f9;
width:38px;
height:38px;
border-radius:10px;
cursor:pointer;
font-size:18px;
}

.modal-content input,
.modal-content select,
.dropdown-toggle{
width:100%;
height:56px;
padding:0 18px;
border-radius:18px;
border:1px solid #dbe1ea;
font-size:16px;
outline:none;
background:white;
}

.save-user-btn{
background:#2563eb;
color:white;
border:none;
padding:14px;
border-radius:14px;
font-size:15px;
font-weight:600;
cursor:pointer;
}

/* PERMISSIONS */
.permissions-box{
background:#f8fafc;
padding:16px;
border-radius:16px;
display:flex;
flex-direction:column;
gap:12px;
}

.permissions-box label{
display:flex;
align-items:center;
gap:10px;
font-size:14px;
cursor:pointer;
}

.permissions-box input{
width:18px;
height:18px;
}

#toastContainer{
position:fixed;
top:20px;
right:20px;
z-index:999999;
display:flex;
flex-direction:column;
gap:12px;
}

.toast{
min-width:280px;
padding:16px 20px;
border-radius:14px;
color:#fff;
font-size:15px;
font-weight:600;
box-shadow:0 10px 25px rgba(0,0,0,0.15);
animation:toastSlide 0.3s ease;
}

.toast-success{
background:#16a34a;
}

.toast-error{
background:#dc2626;
}

.toast-warning{
background:#f59e0b;
}

@keyframes toastSlide{
from{
opacity:0;
transform:translateX(100px);
}
to{
opacity:1;
transform:translateX(0);
}
}

.dropdown-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown-item:hover{
    background: #f3f6fc;
}

.check-icon{
    color: #2d63ea;
    font-size: 18px;
    font-weight: bold;
}

.hidden{
    display: none;
}

.dropdown-toggle{
cursor:pointer;
display:flex;
align-items:center;
justify-content:space-between;
transition:0.2s;
color:#222;
font-weight:500;
}

.dropdown-toggle:hover{
    border-color: #2d63ea;
}

/* =========================================================================
   GLOBAL STATUS BADGES — CONSOLIDATED CLEAN V7
   ========================================================================= */

/* Keep the status badge identical to the current production theme. */
.status.active,
.smtp-status.smtp-active,
.smtp-active,
.warmup-status.active,
.account-status-active{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:70px !important;
    padding:7px 14px !important;
    border-radius:999px !important;
    background:#dcfce7 !important;
    color:#15803d !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1 !important;
    text-transform:none !important;
}

.status.inactive,
.account-status-inactive{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:70px !important;
    padding:7px 14px !important;
    border-radius:999px !important;
    background:#fee2e2 !important;
    color:#b91c1c !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1 !important;
    text-transform:none !important;
}



/* Fixed sidebar and fixed top header - 3.0.168-sticky-layout-no-compression-v1
   The left menu is fixed without shrinking the logo or buttons. If the viewport is short,
   the left menu scrolls internally instead of compressing its content. */
:root{
    --conex-sidebar-width: 280px;
    --conex-topbar-height: 118px;
}
html{
    scroll-behavior:auto !important;
}
body{
    overflow-x:hidden !important;
    background:#f1f5f9 !important;
}
.layout{
    display:block !important;
    min-height:100vh !important;
}
.sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:var(--conex-sidebar-width) !important;
    min-width:var(--conex-sidebar-width) !important;
    max-width:var(--conex-sidebar-width) !important;
    height:100vh !important;
    max-height:none !important;
    padding:20px !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    gap:15px !important;
    background:#fff !important;
    border-right:1px solid #ddd !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    z-index:1400 !important;
}
.sidebar-logo-wrapper{
    flex:0 0 150px !important;
    height:150px !important;
    min-height:150px !important;
    max-height:150px !important;
    width:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:10px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
}
#sidebarLogo{
    flex:0 0 auto !important;
    height:auto !important;
    max-width:220px !important;
    max-height:130px !important;
    object-fit:contain !important;
    display:block !important;
}
.sidebar button{
    flex:0 0 auto !important;
    width:100% !important;
    min-height:64px !important;
    padding:18px 20px !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
}
.main-content{
    margin-left:var(--conex-sidebar-width) !important;
    width:calc(100% - var(--conex-sidebar-width)) !important;
    min-height:100vh !important;
    padding:calc(var(--conex-topbar-height) + 24px) 30px 30px 30px !important;
    overflow:visible !important;
    position:relative !important;
    box-sizing:border-box !important;
}
.top-brand-bar{
    position:fixed !important;
    top:0 !important;
    left:var(--conex-sidebar-width) !important;
    right:0 !important;
    width:auto !important;
    height:var(--conex-topbar-height) !important;
    margin:0 !important;
    padding:30px 30px 18px 30px !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    background:#f1f5f9 !important;
    border-bottom:1px solid rgba(203,213,225,.75) !important;
    z-index:1300 !important;
}
.top-brand-bar::before{
    content:none !important;
}
#topSystemName{
    margin:0 !important;
    white-space:nowrap !important;
}
.user-dropdown{
    position:relative !important;
    z-index:1500 !important;
}
.user-menu{
    z-index:1600 !important;
}
@media (max-width:900px){
    :root{
        --conex-sidebar-width: 0px;
        --conex-topbar-height: 92px;
    }
    .layout{
        display:block !important;
    }
    .sidebar{
        position:relative !important;
        top:auto !important;
        left:auto !important;
        bottom:auto !important;
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
    }
    .top-brand-bar{
        left:0 !important;
        height:auto !important;
        min-height:var(--conex-topbar-height) !important;
        padding:20px !important;
        gap:12px !important;
    }
    #topSystemName{
        white-space:normal !important;
        font-size:28px !important;
    }
    .main-content{
        margin-left:0 !important;
        width:100% !important;
        padding:calc(var(--conex-topbar-height) + 16px) 20px 20px 20px !important;
    }
}

/* =========================================================================
   Conex Mailer Mobile Responsive Layout - 3.0.173-mobile-leads-and-recipient-modals-v1
   Frontend-only responsive layer. Desktop layout remains unchanged.
   ========================================================================= */
.mobile-menu-toggle,
.mobile-sidebar-overlay{
    display:none;
}

@media (max-width: 900px){
    :root{
        --conex-sidebar-width: 0px !important;
        --conex-mobile-topbar-height: 76px;
    }

    html,
    body{
        width:100% !important;
        max-width:100% !important;
        overflow-x:hidden !important;
        -webkit-text-size-adjust:100%;
    }

    body.mobile-sidebar-open{
        overflow:hidden !important;
    }

    .layout{
        display:block !important;
        min-height:100vh !important;
        width:100% !important;
    }

    .mobile-menu-toggle{
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        flex:0 0 44px !important;
        width:44px !important;
        height:44px !important;
        border:0 !important;
        border-radius:12px !important;
        background:#2563eb !important;
        color:#fff !important;
        font-size:22px !important;
        font-weight:900 !important;
        line-height:1 !important;
        cursor:pointer !important;
        box-shadow:0 6px 16px rgba(37,99,235,.20) !important;
    }

    .mobile-sidebar-overlay{
        display:block !important;
        position:fixed !important;
        inset:0 !important;
        background:rgba(15,23,42,.48) !important;
        opacity:0 !important;
        visibility:hidden !important;
        pointer-events:none !important;
        z-index:1850 !important;
        transition:opacity .2s ease, visibility .2s ease !important;
    }

    body.mobile-sidebar-open .mobile-sidebar-overlay{
        opacity:1 !important;
        visibility:visible !important;
        pointer-events:auto !important;
    }

    .sidebar{
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        bottom:0 !important;
        width:min(320px, 88vw) !important;
        min-width:0 !important;
        max-width:min(320px, 88vw) !important;
        height:100dvh !important;
        max-height:100dvh !important;
        padding:18px 16px 24px !important;
        gap:12px !important;
        background:#fff !important;
        border-right:1px solid #dbe4f0 !important;
        box-shadow:18px 0 45px rgba(15,23,42,.20) !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        overscroll-behavior:contain !important;
        z-index:2000 !important;
        transform:translateX(-105%) !important;
        transition:transform .24s ease !important;
        -webkit-overflow-scrolling:touch !important;
    }

    body.mobile-sidebar-open .sidebar{
        transform:translateX(0) !important;
    }

    .sidebar-logo-wrapper{
        flex:0 0 128px !important;
        height:128px !important;
        min-height:128px !important;
        max-height:128px !important;
        padding:8px !important;
        margin-bottom:4px !important;
    }

    #sidebarLogo{
        width:auto !important;
        max-width:220px !important;
        max-height:116px !important;
        object-fit:contain !important;
    }

    .sidebar button,
    .sidebar-btn{
        flex:0 0 auto !important;
        width:100% !important;
        min-height:54px !important;
        padding:14px 18px !important;
        border-radius:14px !important;
        font-size:18px !important;
        line-height:1.15 !important;
        white-space:normal !important;
        text-align:left !important;
    }

    .main-content{
        margin-left:0 !important;
        width:100% !important;
        min-width:0 !important;
        max-width:100% !important;
        padding:calc(var(--conex-mobile-topbar-height) + 14px) 12px 20px !important;
        overflow:visible !important;
        box-sizing:border-box !important;
    }

    .top-brand-bar{
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        right:0 !important;
        width:100% !important;
        min-height:var(--conex-mobile-topbar-height) !important;
        height:var(--conex-mobile-topbar-height) !important;
        padding:12px 12px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:flex-start !important;
        gap:10px !important;
        background:#f1f5f9 !important;
        border-bottom:1px solid rgba(203,213,225,.85) !important;
        box-shadow:0 8px 20px rgba(15,23,42,.05) !important;
        z-index:1800 !important;
    }

    #topSystemName{
        flex:1 1 auto !important;
        min-width:0 !important;
        margin:0 !important;
        font-size:clamp(20px, 5vw, 28px) !important;
        line-height:1.05 !important;
        white-space:nowrap !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
    }

    .user-dropdown{
        flex:0 0 auto !important;
        margin-left:auto !important;
    }

    .user-btn{
        min-height:44px !important;
        padding:10px 13px !important;
        border-radius:12px !important;
        font-size:14px !important;
        max-width:112px !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
        white-space:nowrap !important;
    }

    .user-menu{
        position:fixed !important;
        top:calc(var(--conex-mobile-topbar-height) - 2px) !important;
        right:10px !important;
        width:min(260px, calc(100vw - 20px)) !important;
        max-width:calc(100vw - 20px) !important;
        z-index:2050 !important;
    }

    #content{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        overflow:visible !important;
    }

    .dashboard-wrapper,
    .campaigns-page,
    .leads-container,
    .smtp-page,
    .warmup-page,
    .settings-page,
    .accounts-page{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        padding:14px !important;
        overflow:visible !important;
        box-sizing:border-box !important;
    }

    .dashboard-header,
    .campaigns-header,
    .leads-header,
    .smtp-header,
    .warmup-header,
    .accounts-header,
    .backup-center-heading{
        flex-direction:column !important;
        align-items:stretch !important;
        gap:12px !important;
    }

    .dashboard-title,
    .campaigns-title,
    .leads-title,
    .smtp-title,
    .warmup-header h1,
    .accounts-title,
    .settings-header h1{
        font-size:clamp(26px, 8vw, 36px) !important;
        line-height:1.08 !important;
        overflow-wrap:anywhere !important;
        word-break:break-word !important;
    }

    .create-campaign-btn,
    .add-smtp-btn,
    .add-leads-btn,
    .import-btn,
    .start-warmup-btn,
    .stop-all-warmup-btn,
    .add-user-btn,
    .save-settings-btn,
    .backup-primary-btn,
    .backup-secondary-btn{
        width:100% !important;
        min-height:48px !important;
        justify-content:center !important;
        text-align:center !important;
        white-space:normal !important;
    }

    .stats-grid,
    .smtp-stats-grid,
    .leads-stats,
    .warmup-stats,
    .backup-summary-grid{
        grid-template-columns:1fr !important;
        gap:12px !important;
    }

    .stat-card,
    .smtp-stat-card,
    .warmup-page .warmup-card{
        min-height:0 !important;
        height:auto !important;
        padding:18px !important;
    }

    .dashboard-analytics-grid,
    .dashboard-main-grid,
    .dashboard-lower-grid,
    .dashboard-secondary-grid,
    .settings-grid,
    .backup-layout,
    .backup-history-grid{
        grid-template-columns:1fr !important;
        gap:14px !important;
    }

    .dashboard-card,
    .chart-section,
    .recent-campaigns-card,
    .activity-card,
    .warmup-card,
    .campaigns-card,
    .leads-card,
    .smtp-card,
    .settings-card,
    .accounts-card,
    .backup-recovery-center{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        padding:16px !important;
        border-radius:18px !important;
        box-sizing:border-box !important;
        overflow:visible !important;
    }

    .dashboard-card-header-split,
    .dashboard-rate-summary,
    .dashboard-card-header,
    .chart-header{
        flex-direction:column !important;
        align-items:stretch !important;
        justify-content:flex-start !important;
        gap:10px !important;
    }

    .dashboard-engagement-chart,
    .dashboard-stat-chart,
    .chart-container,
    .warmup-chart-container{
        height:220px !important;
        min-height:220px !important;
        max-width:100% !important;
        overflow:hidden !important;
    }

    canvas{
        max-width:100% !important;
    }

    .campaign-row{
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:14px !important;
        padding:18px !important;
        border-radius:18px !important;
        align-items:stretch !important;
    }

    .campaign-row-name{
        font-size:20px !important;
        line-height:1.15 !important;
    }

    .campaign-actions,
    .campaign-secondary-actions,
    .campaign-summary-actions,
    .warmup-header-actions,
    .leads-actions,
    .table-actions,
    .modal-actions{
        width:100% !important;
        display:flex !important;
        flex-direction:column !important;
        align-items:stretch !important;
        justify-content:flex-start !important;
        gap:8px !important;
    }

    .campaign-actions button,
    .campaign-secondary-actions button,
    .campaign-summary-actions button,
    .table-actions button,
    .modal-actions button{
        width:100% !important;
        min-height:44px !important;
        white-space:normal !important;
    }

    .progress-wrapper,
    .progress-modern{
        width:100% !important;
        min-width:0 !important;
    }

    .campaign-details-grid,
    .campaign-metrics-grid,
    .campaign-summary-grid,
    .campaign-recovery-grid,
    .modal-grid,
    .permissions-grid,
    .permissions-box{
        grid-template-columns:1fr !important;
        gap:12px !important;
    }

    .campaign-recovery-grid{
        display:grid !important;
    }

    .campaign-recipients-summary,
    .campaign-logs-header-actions{
        flex-direction:column !important;
        align-items:stretch !important;
        gap:10px !important;
    }

    .campaign-recipient-pagination{
        width:100% !important;
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:8px !important;
    }

    .campaign-recipient-pagination button{
        min-height:40px !important;
    }

    .modal,
    .campaign-modal{
        align-items:flex-start !important;
        justify-content:center !important;
        padding:12px !important;
        overflow-y:auto !important;
        -webkit-overflow-scrolling:touch !important;
    }

    .modal-content,
    .campaign-modal-content,
    .accounts-modal-content,
    .rename-leads-modal-content,
    #smtpModal .modal-content,
    #createCampaignModal .modal-content,
    #passwordModal > div{
        width:100% !important;
        max-width:calc(100vw - 24px) !important;
        min-width:0 !important;
        max-height:calc(100dvh - 24px) !important;
        padding:18px !important;
        border-radius:18px !important;
        overflow-y:auto !important;
        box-sizing:border-box !important;
    }

    .modal-header{
        gap:10px !important;
    }

    .modal-header h2,
    .campaign-builder-title{
        font-size:clamp(22px, 6vw, 30px) !important;
        line-height:1.15 !important;
        overflow-wrap:anywhere !important;
    }

    .modal-content input,
    .modal-content select,
    .modal-content textarea,
    .dropdown-toggle{
        width:100% !important;
        min-height:48px !important;
        height:auto !important;
        font-size:16px !important;
        box-sizing:border-box !important;
    }

    .conex-mobile-card-table,
    .conex-mobile-card-table thead,
    .conex-mobile-card-table tbody,
    .conex-mobile-card-table tr,
    .conex-mobile-card-table th,
    .conex-mobile-card-table td{
        display:block !important;
        width:100% !important;
        min-width:0 !important;
        box-sizing:border-box !important;
    }

    .conex-mobile-card-table{
        border-collapse:separate !important;
        border-spacing:0 !important;
        overflow:visible !important;
    }

    .conex-mobile-card-table thead{
        display:none !important;
    }

    .conex-mobile-card-table tbody tr{
        margin:0 0 12px !important;
        padding:14px !important;
        border:1px solid #e2e8f0 !important;
        border-radius:16px !important;
        background:#fff !important;
        box-shadow:0 4px 12px rgba(15,23,42,.04) !important;
    }

    .conex-mobile-card-table tbody td{
        display:grid !important;
        grid-template-columns:minmax(96px, 38%) minmax(0, 1fr) !important;
        gap:10px !important;
        align-items:start !important;
        padding:9px 0 !important;
        border:0 !important;
        border-bottom:1px solid #f1f5f9 !important;
        text-align:left !important;
        font-size:14px !important;
        line-height:1.35 !important;
        white-space:normal !important;
        overflow-wrap:anywhere !important;
        word-break:break-word !important;
    }

    .conex-mobile-card-table tbody td:last-child{
        border-bottom:0 !important;
        padding-bottom:0 !important;
    }

    .conex-mobile-card-table tbody td::before{
        content:attr(data-label) !important;
        color:#64748b !important;
        font-size:12px !important;
        font-weight:900 !important;
        text-transform:none !important;
        line-height:1.35 !important;
    }

    .conex-mobile-card-table tbody td:empty::after{
        content:"-";
        color:#94a3b8;
    }

    .smtp-card,
    .warmup-table-container,
    .campaign-recovery-table-wrap,
    .campaign-recipients-table-wrap,
    .campaign-logs-table-wrap,
    .leads-card,
    .accounts-card,
    .recent-campaigns-card{
        overflow:visible !important;
        max-height:none !important;
    }

    .smtp-table,
    .warmup-table,
    .leads-table,
    .accounts-table,
    .campaign-recovery-table,
    .campaign-recipients-table,
    .campaign-logs-table,
    .recent-campaigns-table{
        min-width:0 !important;
        width:100% !important;
    }

    #toastContainer{
        top:calc(var(--conex-mobile-topbar-height) + 8px) !important;
        left:12px !important;
        right:12px !important;
        width:auto !important;
    }

    .toast{
        min-width:0 !important;
        width:100% !important;
        box-sizing:border-box !important;
    }
}

@media (min-width: 901px){
    .mobile-menu-toggle,
    .mobile-sidebar-overlay{
        display:none !important;
    }
}


/* Mobile overlay/modal table cards - 3.0.173-mobile-leads-and-recipient-modals-v1 */
@media (max-width: 900px){
    .campaign-recipients-modal .conex-mobile-card-table,
    .campaign-recipients-modal .conex-mobile-card-table thead,
    .campaign-recipients-modal .conex-mobile-card-table tbody,
    .campaign-recipients-modal .conex-mobile-card-table tr,
    .campaign-recipients-modal .conex-mobile-card-table th,
    .campaign-recipients-modal .conex-mobile-card-table td{
        display:block !important;
        width:100% !important;
        min-width:0 !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    .campaign-recipients-modal .conex-mobile-card-table thead{
        display:none !important;
    }

    .campaign-recipients-modal .conex-mobile-card-table tbody tr{
        margin:0 0 12px !important;
        padding:14px !important;
        border:1px solid #e2e8f0 !important;
        border-radius:16px !important;
        background:#fff !important;
        box-shadow:0 4px 12px rgba(15,23,42,.04) !important;
    }

    .campaign-recipients-modal .conex-mobile-card-table tbody td{
        display:grid !important;
        grid-template-columns:minmax(92px,34%) minmax(0,1fr) !important;
        gap:10px !important;
        align-items:start !important;
        padding:9px 0 !important;
        border:0 !important;
        border-bottom:1px solid #f1f5f9 !important;
        color:#475569 !important;
        font-size:14px !important;
        line-height:1.35 !important;
        white-space:normal !important;
        overflow-wrap:anywhere !important;
        word-break:break-word !important;
    }

    .campaign-recipients-modal .conex-mobile-card-table tbody td::before{
        content:attr(data-label) !important;
        color:#64748b !important;
        font-size:12px !important;
        font-weight:900 !important;
        line-height:1.35 !important;
    }

    .campaign-recipients-modal .conex-mobile-card-table tbody td:last-child{
        border-bottom:0 !important;
        padding-bottom:0 !important;
    }

    .campaign-recipients-modal .campaign-reply-view-btn{
        width:100% !important;
        min-height:44px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
    }
}


/* About System modal - 3.0.182-about-system-menu-v1 */
.about-system-modal{
    z-index:10020;
}

.about-system-content{
    width:min(720px, calc(100vw - 32px));
    max-height:calc(100vh - 48px);
    overflow-y:auto;
    gap:18px;
}

.about-system-header{
    align-items:flex-start;
    gap:18px;
}

.about-system-kicker{
    margin:0 0 6px;
    color:#2563eb;
    font-weight:800;
    font-size:13px;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.about-system-header h2{
    margin:0;
    color:#0f172a;
    font-size:28px;
    line-height:1.15;
}

.about-system-subtitle{
    margin:8px 0 0;
    color:#64748b;
    font-size:15px;
}

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

.about-system-card{
    border:1px solid #dbeafe;
    background:#f8fbff;
    border-radius:18px;
    padding:16px;
    min-width:0;
}

.about-system-card span{
    display:block;
    color:#64748b;
    font-size:13px;
    font-weight:700;
    margin-bottom:8px;
}

.about-system-card strong{
    display:block;
    color:#0f172a;
    font-size:15px;
    line-height:1.35;
    overflow-wrap:anywhere;
}

.about-system-section{
    border:1px solid #e2e8f0;
    border-radius:18px;
    padding:16px;
    background:#fff;
}

.about-system-section h3{
    margin:0 0 10px;
    color:#0f172a;
    font-size:16px;
}

.about-system-section p{
    margin:6px 0;
    color:#334155;
    line-height:1.55;
    overflow-wrap:anywhere;
}

.about-system-section a{
    color:#2563eb;
    font-weight:700;
    text-decoration:none;
}

.about-system-section a:hover{
    text-decoration:underline;
}

.about-system-footer{
    padding:14px 16px;
    border-radius:16px;
    background:#0f172a;
    color:#fff;
    font-weight:700;
    text-align:center;
}

@media (max-width: 640px){
    .about-system-content{
        width:calc(100vw - 24px);
        padding:22px;
        border-radius:22px;
    }
    .about-system-header h2{
        font-size:24px;
    }
    .about-system-grid{
        grid-template-columns:1fr;
    }
}


/* =========================================================================
   Conex Mailer Sidebar Fixed Logo - 3.0.189-sidebar-fixed-logo-v1
   Logo stays pinned at the top. Only the navigation buttons scroll.
   ========================================================================= */
.sidebar{
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
}
.sidebar-logo-wrapper{
    flex:0 0 150px !important;
    height:150px !important;
    min-height:150px !important;
    max-height:150px !important;
    width:100% !important;
    position:relative !important;
    z-index:2 !important;
    background:#fff !important;
}
.sidebar-menu{
    flex:1 1 auto !important;
    min-height:0 !important;
    width:100% !important;
    display:flex !important;
    flex-direction:column !important;
    gap:15px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important;
    padding:0 0 12px 0 !important;
}
.sidebar-menu .sidebar-btn,
.sidebar-menu button{
    flex:0 0 auto !important;
}
.sidebar-menu::-webkit-scrollbar{
    width:8px;
}
.sidebar-menu::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:999px;
}
.sidebar-menu::-webkit-scrollbar-track{
    background:transparent;
}
@media (max-width:900px){
    .sidebar{
        overflow:hidden !important;
    }
    .sidebar-logo-wrapper{
        flex:0 0 128px !important;
        height:128px !important;
        min-height:128px !important;
        max-height:128px !important;
    }
    .sidebar-menu{
        gap:12px !important;
        padding-bottom:18px !important;
    }
}
