.crm-header{
    padding:28px;
    border-radius:24px;
    background:white;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:24px;
    flex-wrap:wrap;
}

.crm-title{
    font-size:42px;
    font-weight:800;
    color:#111827;
    margin-bottom:6px;
}

.crm-subtitle{
    color:#94a3b8;
    font-size:15px;
}

.crm-header-actions{
    display:flex;
    gap:14px;
}

.crm-btn{
    height:auto;
    min-height:54px;
    padding:12px 24px;
    border:none;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    font-size:16px;
    font-weight:600;
    text-decoration:none;
    line-height:1.4;
    white-space:normal;
    text-align:center;
    transition:0.3s;
}

.crm-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.crm-btn:active {
    transform: translateY(1px);
}

.crm-btn-light{
    background:#f8fafc;
    color:#111827;
}

.crm-btn-primary{
    background:linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color:white;
}

.crm-filter-card{
    background:white;
    border-radius:24px;
    padding:24px;
    margin-bottom:24px;
}

.crm-filter-row{
    display:grid;
    grid-template-columns:1fr 1fr 1fr 250px;
    gap:20px;
    align-items:end;
}

.crm-filter-label{
    display:block;
    margin-bottom:10px;
    font-size:13px;
    font-weight:700;
    color:#64748b;
}

.crm-select-wrapper{
    position:relative;
}

.crm-select-wrapper i{
    position:absolute;
    right:18px;
    top:50%;
    transform:translateY(-50%);
    width:16px;
    height:16px;
    color:#94a3b8;
    pointer-events:none;
}

.crm-filter-select{
    width:100%;
    height:54px;
    border:none;
    outline:none;
    border-radius:14px;
    background:#f8fafc;
    padding:0 18px;
    font-size:14px;
    color:#111827;
    appearance:none;
}

.crm-filter-btn{
    width:100%;
    height:54px;
    border:none;
    border-radius:14px;
    background:linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color:white;
    font-size:16px;
    font-weight:700;
}

.crm-table-card{
    background:white;
    border-radius:24px;
    overflow:hidden;
}

.crm-table{
    margin:0;
    width:100%;
}

.crm-table thead th{
    padding:22px 20px;
    font-size:12px;
    font-weight:700;
    color:#94a3b8;
    background:white;
    border:none;
    white-space:nowrap;
}

.crm-table tbody td{
    padding:24px 20px;
    border-top:1px solid #f1f5f9;
    vertical-align:middle;
}

.crm-user-info{
    display:flex;
    align-items:center;
    gap:14px;
}

.crm-user-avatar{
    width:50px;
    height:50px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--secondary-color),var(--primary-color));
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-weight:700;
    font-size:16px;
}

.crm-user-name{
    font-size:15px;
    font-weight:700;
    color:#111827;
    margin-bottom:4px;
}

.crm-company-text{
    font-size:13px;
    color:#94a3b8;
}

.crm-phone{
    font-size:14px;
    font-weight:600;
    color:#111827;
    margin-bottom:4px;
}

.crm-email{
    font-size:13px;
    color:#94a3b8;
}

.crm-status-badge{
    padding:8px 14px;
    border-radius:30px;
    font-size:12px;
    font-weight:700;
}

.status-new{
    background:rgba(79, 70, 229, 0.1);
    color:var(--primary-color);
}

.status-contacted{
    background:rgba(14, 165, 233, 0.1);
    color:var(--secondary-color);
}

.status-followup{
    background:rgba(245, 158, 11, 0.1);
    color:var(--warning-color);
}

.status-converted{
    background:rgba(34, 197, 94, 0.1);
    color:var(--success-color);
}

.status-prebooking{
    background:rgba(139, 92, 246, 0.1);
    color:#8b5cf6;
}

.status-final-payment{
    background:rgba(16, 185, 129, 0.1);
    color:#10b981;
}

.status-closed{
    background:rgba(239, 68, 110, 0.1);
    color:var(--danger-color);
}

.status-cancelled{
    background:rgba(239, 68, 68, 0.12);
    color:#dc2626;
    border:1px solid rgba(239, 68, 68, 0.25);
}

.exp-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:3px 8px;
    border-radius:12px;
    font-size:11px;
    font-weight:700;
    text-decoration:none;
    vertical-align:middle;
}
.exp-badge-green{
    background:rgba(34, 197, 94, 0.15);
    color:#15803d;
    border:1px solid rgba(34, 197, 94, 0.3);
}
.exp-badge-yellow{
    background:rgba(245, 158, 11, 0.15);
    color:#b45309;
    border:1px solid rgba(245, 158, 11, 0.3);
}
.exp-badge-red{
    background:rgba(239, 68, 68, 0.15);
    color:#b91c1c;
    border:1px solid rgba(239, 68, 68, 0.35);
    animation:exp-pulse 2s infinite;
}
@keyframes exp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.crm-agent-box{
    display:flex;
    align-items:center;
    gap:10px;
}

.crm-agent-avatar{
    width:30px;
    height:30px;
    border-radius:50%;
    background:rgba(79, 70, 229, 0.1);
    color:var(--primary-color);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:700;
}

.crm-followup-date{
    font-size:14px;
    font-weight:600;
    color:#111827;
    margin-bottom:4px;
}

.crm-followup-status{
    font-size:12px;
    font-weight:700;
    color:#ef4444;
}

.crm-action-group{
    display:flex;
    gap:10px;
}

.crm-action-btn{
    width:38px;
    height:38px;
    border-radius:12px;
    background:#f8fafc;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#64748b;
    text-decoration:none;
    transition:0.3s;
}

.crm-action-btn:hover{
    background:var(--primary-color);
    color:white;
}

.crm-action-btn.delete:hover{
    background:#ef4444;
}

.crm-table-footer{
    padding:22px;
    border-top:1px solid #f1f5f9;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:20px;
}

.crm-pagination{
    display:flex;
    gap:10px;
}

.crm-page-btn{
    min-width:38px;
    height:38px;
    border:none;
    border-radius:10px;
    background:#f8fafc;
    color:#111827;
    font-weight:600;
}

.crm-page-btn.active{
    background:var(--primary-color);
    color:white;
}
/* =======================================================
   FIX FILTER UI
======================================================= */

.crm-filter-grid{
    display:grid !important;
    grid-template-columns:repeat(5,1fr) !important;
    gap:20px;
    align-items:end;
}

.crm-filter-grid > div{
    width:100%;
}

.crm-select{
    width:100% !important;
    height:52px !important;
    border:1px solid #e5e7eb !important;
    border-radius:14px !important;
    padding:0 16px !important;
    font-size:14px !important;
    background:#fff !important;
    outline:none !important;
    appearance:none;
    display:block;
}

.crm-label{
    display:block;
    margin-bottom:10px;
    font-size:13px;
    font-weight:700;
    color:#64748b;
}

.crm-filter-btn{
    width:100%;
    height:52px;
    border:none;
    border-radius:14px;
    background:linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color:white;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
}

.crm-filter-card{
    background:white;
    border-radius:24px;
    padding:24px;
    margin-bottom:24px;
}

/* =======================================================
   FIX HEADER BUTTONS
======================================================= */

.crm-header-actions{
    display:flex;
    gap:14px;
    align-items:center;
    margin-top:20px;
}

.crm-btn{
    height:auto;
    min-height:52px;
    padding:12px 24px;
    border:none;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    text-decoration:none;
    font-size:15px;
    font-weight:700;
    line-height:1.4;
    white-space:normal;
    text-align:center;
    transition:0.3s;
}

.crm-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.crm-btn:active {
    transform: translateY(1px);
}

.crm-btn-light{
    background:white;
    color:#111827;
}

.crm-btn-primary{
    background:linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color:white;
}

/* =======================================================
   FIX TABLE
======================================================= */

.crm-table{
    width:100%;
    border-collapse:collapse;
}

.crm-table thead th{
    padding:20px;
    font-size:12px;
    color:#94a3b8;
    font-weight:700;
    border-bottom:1px solid #f1f5f9;
    text-align:left;
}

.crm-table tbody td{
    padding:24px 20px;
    border-bottom:1px solid #f1f5f9;
    vertical-align:middle;
}

/* =======================================================
   RESPONSIVE
======================================================= */

@media(max-width:1200px){

.crm-filter-grid{
    grid-template-columns:1fr 1fr !important;
}

}

@media(max-width:768px){

.crm-filter-grid{
    grid-template-columns:1fr !important;
}

.crm-table{
    min-width:1200px;
}

.crm-header-actions{
    flex-direction:column;
    align-items:flex-start;
}

}
/* =======================================================
   FIX FOOTER + STATS CARD UI
======================================================= */

.crm-footer{
    padding:22px 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-top:1px solid #f1f5f9;
    flex-wrap:wrap;
    gap:20px;
}

.crm-footer-text{
    font-size:14px;
    color:#64748b;
    font-weight:500;
}

.crm-pagination{
    display:flex;
    align-items:center;
    gap:10px;
}

.page-btn{
    min-width:38px;
    height:38px;
    border:none;
    border-radius:10px;
    background:#f8fafc;
    color:#111827;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

.page-btn:hover{
    background:var(--primary-color);
    color:white;
}

.page-btn.active{
    background:var(--primary-color);
    color:white;
}

/* =======================================================
   STATS GRID FIX
======================================================= */

.crm-stats-grid{
    margin-top:24px;
    display:grid !important;
    grid-template-columns:repeat(4,1fr) !important;
    gap:20px;
}

.crm-stat-card{
    background:white;
    border-radius:22px;
    padding:24px;
    min-height:160px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    box-shadow:0 2px 10px rgba(0,0,0,0.03);
}

.crm-stat-top{
    margin-bottom:12px;
}

.green-text{
    color:#16a34a;
    font-size:14px;
    font-weight:700;
}

.red-text{
    color:#ef4444;
    font-size:14px;
    font-weight:700;
}

.crm-stat-label{
    font-size:14px;
    color:#94a3b8;
    margin-bottom:12px;
    font-weight:500;
}

.crm-stat-value{
    font-size:32px;
    font-weight:800;
    color:#111827;
    line-height:1;
}

/* =======================================================
   GOAL CARD
======================================================= */

.crm-goal-card{
    background:linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    border-radius:22px;
    padding:24px;
    min-height:160px;
    color:white;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.crm-goal-label{
    font-size:13px;
    font-weight:600;
    opacity:0.8;
    margin-bottom:14px;
}

.crm-goal-value{
    font-size:30px;
    font-weight:800;
    line-height:1.2;
}

.crm-progress{
    width:100%;
    height:8px;
    border-radius:20px;
    background:rgba(255,255,255,0.2);
    margin-top:20px;
    overflow:hidden;
}

.crm-progress-bar{
    width:74%;
    height:100%;
    background:white;
    border-radius:20px;
}

/* =======================================================
   COMPACT FILTER SECTION
======================================================= */

.crm-filter-card{
    background:white;
    border-radius:22px;
    padding:20px;
    margin-bottom:22px;
}

/* GRID */

.crm-filter-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(180px,1fr));
    gap:16px;
    align-items:end;
}

/* LABEL */

.crm-label{
    display:block;
    margin-bottom:8px;
    font-size:13px;
    font-weight:600;
    color:#64748b;
}

/* INPUT */

.crm-select{
    width:100%;
    height:46px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:0 14px;
    background:#fff;
    font-size:14px;
    color:#111827;
    outline:none;
    transition:0.3s;
}

.crm-select:focus{
    border-color:var(--primary-color);
    box-shadow:0 0 0 4px rgba(79,70,229,0.08);
}

/* CUSTOM DATE */

.custom-date-wrapper{
    margin-top:14px;
}

.custom-date-wrapper > div{
    width:220px;
}

/* BUTTON AREA */

.crm-filter-actions{
    margin-top:16px;
    display:flex;
    gap:12px;
    align-items:center;
}

/* APPLY BUTTON */

.crm-filter-btn{
    height:46px;
    min-width:180px;
    padding:0 22px;
    border:none;
    border-radius:12px;
    background:linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color:white;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

/* CLEAR BUTTON */

.crm-clear-btn{
    height:46px;
    min-width:150px;
    padding:0 18px;
    border-radius:12px;
    background:#f1f5f9;
    color:#111827;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:600;
    transition:0.3s;
}

.crm-clear-btn:hover{
    background:#e2e8f0;
}

/* RESPONSIVE */

@media(max-width:1200px){

.crm-filter-grid{
    grid-template-columns:1fr 1fr;
}

}

@media(max-width:768px){

.crm-filter-grid{
    grid-template-columns:1fr;
}

.crm-filter-actions{
    flex-direction:column;
    align-items:stretch;
}

.crm-filter-btn,
.crm-clear-btn{
    width:100%;
}

.custom-date-wrapper > div{
    width:100%;
}

}

/* =======================================================
   RESPONSIVE
======================================================= */

@media(max-width:1200px){

.crm-stats-grid{
    grid-template-columns:1fr 1fr !important;
}

}

@media(max-width:768px){

.crm-stats-grid{
    grid-template-columns:1fr !important;
}

.crm-footer{
    flex-direction:column;
    align-items:flex-start;
}

}

.custom-date-wrapper{
    margin-top:18px;
}

.custom-date-wrapper > div{
    width:280px;
}

.crm-avatar{
    width:48px;
    height:48px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--primary-color),var(--secondary-color));
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    font-weight:700;
    text-transform:uppercase;
    flex-shrink:0;
}

.crm-user-box{
    display:flex;
    align-items:center;
    gap:14px;
}

@media(max-width:1200px){

.crm-filter-grid{
    grid-template-columns:1fr 1fr;
}

}

@media(max-width:768px){

.crm-filter-grid{
    grid-template-columns:1fr;
}

.crm-filter-actions{
    flex-direction:column;
}

.custom-date-wrapper > div{
    width:100%;
}

}

/* =======================================================
   CRM HEADER
======================================================= */

.crm-top-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:22px 24px;
    margin-bottom:20px;
}

.crm-header-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.crm-title{
    font-size:22px;
    font-weight:800;
    color:#111827;
    margin-bottom:4px;
}

.crm-subtitle{
    font-size:14px;
    color:#6b7280;
}

/* =======================================================
   HEADER BUTTONS
======================================================= */

.crm-header-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.crm-btn{
    height:42px;
    padding:0 18px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    text-decoration:none;
    font-size:14px;
    font-weight:600;
    transition:0.3s;
    border:none;
}

.crm-btn-light{
    background:#fff;
    border:1px solid #d1d5db;
    color:var(--primary-color);
}

.crm-btn-primary{
    background:var(--primary-hover);
    color:white;
    box-shadow:0 4px 12px rgba(67,56,202,0.2);
}

/* =======================================================
   FILTER CARD
======================================================= */

.crm-filter-card{
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:10px;
    background:#fff;
}

/* FILTER GRID */

/* .crm-filter-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:14px;
    align-items:end;
} */

/* LABEL */

.crm-label{
    display:block;
    margin-bottom:7px;
    font-size:12px;
    font-weight:700;
    color:#6b7280;
}

/* INPUT */

.crm-select{
    width:100%;
    height:42px;
    border:1px solid #d1d5db;
    border-radius:8px;
    padding:0 14px;
    background:#f9fafb;
    font-size:14px;
    color:#111827;
    outline:none;
    transition:0.3s;
}

.crm-select:focus{
    border-color:var(--primary-color);
    background:#fff;
}

/* DATE BOX */

.custom-date-wrapper{
    margin-top:14px;
}

.custom-date-wrapper > div{
    width:240px;
}

/* BUTTONS */

.crm-filter-actions{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:16px;
}

/* APPLY */

.crm-filter-btn{
     border:none;
    border-radius:10px;
    background:var(--primary-hover);
    color:white;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

/* CLEAR */

.crm-clear-btn{
    height:42px;
    min-width:150px;
    border-radius:10px;
    background:#eef2ff;
    color:#374151;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:600;
}

/* =======================================================
   RESPONSIVE
======================================================= */

@media(max-width:1200px){

.crm-filter-grid{
    grid-template-columns:1fr 1fr;
}

}

@media(max-width:768px){

.crm-header-top{
    flex-direction:column;
    align-items:flex-start;
}

.crm-filter-grid{
    grid-template-columns:1fr;
}

.crm-filter-actions{
    flex-direction:column;
    align-items:stretch;
}

.crm-filter-btn,
.crm-clear-btn{
    width:100%;
}

.custom-date-wrapper > div{
    width:100%;
}

}

