/* ==========================================================
   MY Bharat — Dashboard Styles
========================================================== */

/* ==========================================================
   Dashboard — Container
========================================================== */

.dashboard-container{
    display:flex;
    flex-direction:column;
    gap:20px;
}

/* ==========================================================
   Dashboard — Summary Cards
========================================================== */

.dashboard-summary{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}

.summary-card{
    background:#ffffff;
    border-radius:12px;
    padding:20px 24px;
    border:1px solid #E5E7EB;
    box-shadow:0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    display:flex;
    align-items:center;
    gap:16px;
}

.summary-icon{
    width:48px;
    height:48px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    background:#EEF4FF;
    color:#003366;
}

.summary-card.card-active .summary-icon{
    background:#ECFDF5;
    color:#065F46;
}

.summary-card.card-inactive .summary-icon{
    background:#FEF2F2;
    color:#991B1B;
}

.summary-info{
    display:flex;
    flex-direction:column;
}

.summary-count{
    font-size:28px;
    font-weight:700;
    color:#111827;
    line-height:1.2;
}

.summary-label{
    font-size:13px;
    color:#6B7280;
    font-weight:500;
    margin-top:2px;
}

/* ==========================================================
   Dashboard — Controls / Filters
========================================================== */

.dashboard-controls{
    padding:24px 28px;
}

.dashboard-search-row{
    display:flex;
    gap:10px;
    margin-bottom:20px;
    align-items:center;
}

.dashboard-search-wrap{
    flex:1;
    position:relative;
}

.dashboard-search-icon{
    position:absolute;
    left:14px;
    top:50%;
    transform:translateY(-50%);
    color:#9CA3AF;
    pointer-events:none;
    z-index:2;
}

.dashboard-search{
    width:100%;
    border:1px solid #D1D5DB;
    border-radius:8px;
    padding:10px 14px 10px 42px !important;
    font-size:14px;
    background:#ffffff;
    font-family:inherit;
    line-height:1.5;
}

.dashboard-search:focus{
    outline:none;
    border-color:#2563EB;
    box-shadow:0 0 0 2px rgba(37,99,235,0.1);
}

.dashboard-filters{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
}

.dash-filter-field{
    display:flex;
    flex-direction:column;
}

.dash-filter-field label{
    font-weight:600;
    margin-bottom:6px;
    color:#374151;
    font-size:13px;
}

/* ==========================================================
   Dashboard — Buttons
========================================================== */

.dashboard-btn{
    background:#003366;
    color:#ffffff;
    border:none;
    border-radius:8px;
    padding:10px 20px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
    white-space:nowrap;
}

.dashboard-btn:hover{
    background:#002244;
}

.dashboard-btn.reset{
    background:#F3F4F6;
    color:#374151;
    border:1px solid #D1D5DB;
}

.dashboard-btn.reset:hover{
    background:#E5E7EB;
}

/* ==========================================================
   Dashboard — Table
========================================================== */

.dashboard-table-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
    flex-wrap:wrap;
    gap:12px;
}

.dashboard-table-title{
    font-size:16px;
    font-weight:600;
    color:#111827;
    margin:0;
}

.dashboard-table-count{
    font-size:13px;
    color:#6B7280;
    background:#F3F4F6;
    padding:6px 14px;
    border-radius:20px;
    font-weight:500;
}

.dashboard-table-wrap{
    overflow-x:auto;
    border:1px solid #E5E7EB;
    border-radius:8px;
}

.dashboard-table{
    width:100%;
    border-collapse:collapse;
    text-align:left;
    font-size:13px;
}

.dashboard-table th{
    background:#F9FAFB;
    color:#374151;
    font-weight:600;
    padding:12px 14px;
    border-bottom:1px solid #E5E7EB;
    white-space:nowrap;
    position:sticky;
    top:0;
    z-index:5;
}

.dashboard-table td{
    padding:12px 14px;
    border-bottom:1px solid #E5E7EB;
    color:#111827;
    vertical-align:middle;
}

.dashboard-table tbody tr:last-child td{
    border-bottom:none;
}

.dashboard-table tbody tr:hover{
    background:#F8FAFC;
}

/* Photo cell */

.photo-cell{
    width:50px;
}

.dash-photo{
    width:40px;
    height:40px;
    border-radius:8px;
    object-fit:cover;
    border:1px solid #E5E7EB;
    display:block;
}

.dash-photo-placeholder{
    width:40px;
    height:40px;
    border-radius:8px;
    background:#F3F4F6;
    border:1px solid #E5E7EB;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* Name cell */

.name-cell{
    font-weight:600;
    color:#111827;
    white-space:nowrap;
}

/* ==========================================================
   Dashboard — Status Badge
========================================================== */

.status-badge{
    display:inline-block;
    padding:4px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
    text-transform:capitalize;
}

.status-badge.active{
    background:#ECFDF5;
    color:#065F46;
}

.status-badge.inactive{
    background:#FEF2F2;
    color:#991B1B;
}

/* ==========================================================
   Dashboard — Action Buttons
========================================================== */

.actions-cell{
    white-space:nowrap;
}

.action-btn{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:6px 12px;
    border-radius:6px;
    font-size:12px;
    font-weight:600;
    border:none;
    cursor:pointer;
    font-family:inherit;
}

.action-btn.edit{
    background:#EEF4FF;
    color:#003366;
    margin-right:6px;
}

.action-btn.edit:hover{
    background:#DBEAFE;
}

.action-btn.delete{
    background:#FEF2F2;
    color:#991B1B;
}

.action-btn.delete:hover{
    background:#FEE2E2;
}

/* ==========================================================
   Dashboard — Pagination
========================================================== */

.dashboard-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:6px;
    padding:16px 0;
    flex-wrap:wrap;
}

.page-btn{
    padding:8px 14px;
    border:1px solid #D1D5DB;
    border-radius:6px;
    background:#ffffff;
    color:#374151;
    font-size:13px;
    font-weight:500;
    cursor:pointer;
    font-family:inherit;
}

.page-btn:hover:not(.disabled):not(.active){
    background:#F3F4F6;
    border-color:#9CA3AF;
}

.page-btn.active{
    background:#003366;
    color:#ffffff;
    border-color:#003366;
}

.page-btn.disabled{
    opacity:0.4;
    cursor:not-allowed;
}

.page-ellipsis{
    padding:8px 6px;
    color:#9CA3AF;
    font-size:14px;
}

/* ==========================================================
   Dashboard — Loading State
========================================================== */

.dashboard-loading{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:60px 20px;
    gap:16px;
    color:#6B7280;
}

.loading-spinner{
    width:36px;
    height:36px;
    border:3px solid #E5E7EB;
    border-top-color:#003366;
    border-radius:50%;
    animation:dashSpin 0.8s linear infinite;
}

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

/* ==========================================================
   Dashboard — Empty State
========================================================== */

.dashboard-empty{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:60px 20px;
    gap:12px;
    text-align:center;
    color:#6B7280;
}

.dashboard-empty p{
    font-size:15px;
    margin:0;
    max-width:400px;
    line-height:1.6;
}

.dashboard-empty-sub{
    font-size:13px !important;
    color:#9CA3AF !important;
}

/* ==========================================================
   Dashboard — Delete Confirmation Modal
========================================================== */

.delete-modal-overlay{
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:rgba(0,0,0,0.5);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
    padding:20px;
}

.delete-modal{
    background:#ffffff;
    border-radius:12px;
    padding:28px 32px;
    max-width:440px;
    width:100%;
    box-shadow:0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.delete-modal-title{
    font-size:18px;
    font-weight:600;
    color:#111827;
    margin:0 0 12px;
}

.delete-modal-text{
    font-size:14px;
    color:#4B5563;
    line-height:1.6;
    margin:0 0 12px;
}

.delete-modal-notice{
    font-size:13px;
    color:#6B7280;
    background:#FEF3C7;
    border:1px solid #FDE68A;
    border-radius:6px;
    padding:10px 14px;
    margin:0 0 20px;
}

.delete-modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
}

.delete-confirm{
    background:#DC2626 !important;
    color:#ffffff !important;
    border:none !important;
    opacity:0.5;
    cursor:not-allowed !important;
}

/* ==========================================================
   Responsive
========================================================== */

@media(max-width:900px){
    .dashboard-summary{
        grid-template-columns:1fr;
    }
    .dashboard-filters{
        grid-template-columns:1fr;
    }
    .dashboard-search-row{
        flex-direction:column;
    }
    .dashboard-search-row .dashboard-btn{
        width:100%;
    }
    .dashboard-table-wrap{
        max-height:500px;
        overflow-y:auto;
    }
    .actions-cell{
        display:flex;
        flex-direction:column;
        gap:4px;
    }
    .action-btn.edit{
        margin-right:0;
    }
}
