
/* MDA Advanced Lead Tracker Premium Stylesheet */
.mda-wrapper {
    font-family: 'Poppins', sans-serif;
    max-width: 1200px;
    margin: 30px auto;
    background: #fdfdfd;
    border-radius: 20px;
    padding: 35px;
    color: #1e293b;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.mda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
}

.mda-header h2 {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mda-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    font-weight: 400;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* Dashboard Cards */
.mda-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.mda-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01), 0 2px 4px -1px rgba(0,0,0,0.01);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.mda-card:hover {
    transform: translateY(-3px);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.total-leads .card-icon { background: #eff6ff; color: #2563eb; }
.converted-leads .card-icon { background: #ecfdf5; color: #10b981; }
.followups .card-icon { background: #fff7ed; color: #f97316; }
.pipeline-value .card-icon { background: #faf5ff; color: #a855f7; }

.card-info h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.card-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Controls Grid */
.mda-controls {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 20px;
    margin-bottom: 25px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
    background: white;
}

.filter-groups {
    display: flex;
    gap: 12px;
}

.filter-groups select {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.search-box input:focus, .filter-groups select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Enhanced Premium Table */
.mda-table-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.mda-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.mda-table th {
    background: #f8fafc;
    padding: 18px 20px;
    font-size: 13px;
    text-transform: uppercase;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: 0.5px;
}

.mda-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.mda-table tr:hover {
    background: #f8fafc;
}

.lead-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lead-name { font-weight: 600; color: #0f172a; font-size: 15px; }
.lead-phone { color: #475569; font-size: 13px; font-weight: 500; }
.lead-course-tag { font-size: 12px; color: #2563eb; font-weight: 500; }

.source-loc { font-size: 13px; color: #475569; }
.lead-loc { font-size: 12px; color: #94a3b8; }

.status-badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}
.status-new { background: #eff6ff; color: #1e40af; }
.status-converted { background: #dcfce3; color: #166534; }
.status-not-interested { background: #fee2e2; color: #991b1b; }
.status-call-not-pic { background: #fef3c7; color: #92400e; }
.status-default { background: #f1f5f9; color: #334155; }

.prob-badge { font-weight: 700; font-size: 13px; }
.prob-High { color: #16a34a; }
.prob-Medium { color: #ca8a04; }
.prob-Low { color: #dc2626; }

.revenue-text { font-size: 14px; font-weight: 600; color: #334155; margin-top: 2px; }

.action-btn {
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #475569;
    transition: all 0.2s;
}
.action-btn:hover { background: #e2e8f0; color: #0f172a; }
.action-btn.delete:hover { background: #fee2e2; color: #ef4444; }

/* Modal Design */
.mda-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.mda-modal.active { display: flex; }

.mda-modal-content {
    background: white;
    width: 100%;
    max-width: 650px;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
}

.mda-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.mda-modal-header h3 { margin: 0; font-size: 22px; font-weight: 700; color: #0f172a; }
.close-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: #94a3b8; }
.close-btn:hover { color: #1e293b; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: span 2; }
.form-group label { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 768px) {
    .mda-controls { grid-template-columns: 1fr; }
    .filter-groups { flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }
}
