/* Frontend Styles - Monitor Salur DD 2026 */

.msdd-frontend-container {
    max-width: 2000px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Header */
.msdd-header {
    margin-bottom: 30px;
    text-align: center;
}

.msdd-main-title {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 40px;
    border-radius: 60px;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.msdd-main-title .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
}

/* Colorful Statistics Cards */
.msdd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.msdd-stat-card {
    position: relative;
    border-radius: 20px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 140px;
}

.msdd-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stat-card-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.msdd-stat-icon {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border-radius: 18px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.msdd-stat-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: white;
}

.msdd-stat-content {
    flex: 1;
    z-index: 2;
}

.msdd-stat-label {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.msdd-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.msdd-stat-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 100px;
    opacity: 0.1;
    z-index: 1;
}

/* Status Summary */
.msdd-status-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.msdd-status-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 40px;
}

.msdd-status-summary-item .msdd-status-badge {
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.msdd-status-summary-count {
    font-weight: 600;
    color: #333;
}

.msdd-status-summary-percentage {
    color: #666;
    font-size: 13px;
}

/* Search and Filter */
.msdd-search-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.msdd-search-box {
    flex: 2;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.msdd-search-box .dashicons {
    position: absolute;
    left: 15px;
    color: #999;
    font-size: 20px;
    width: 20px;
    height: 20px;
    z-index: 1;
}

.msdd-search-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.msdd-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.msdd-filter-box {
    flex: 1;
    min-width: 180px;
}

.msdd-filter-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

.msdd-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Table */
.msdd-table-responsive {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.msdd-data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
    white-space: nowrap;
}

.msdd-data-table thead tr {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.msdd-data-table th {
    color: white;
    font-weight: 600;
    padding: 18px 12px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msdd-data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.msdd-data-table tbody tr {
    transition: all 0.3s;
}

.msdd-data-table tbody tr:hover {
    background: linear-gradient(135deg, #f5f7ff, #f0f3ff);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.msdd-no {
    font-weight: 600;
    color: #999;
}

.msdd-kode {
    font-family: monospace;
    font-weight: 600;
    color: #667eea;
}

.msdd-desa {
    font-weight: 600;
}

.msdd-kecamatan {
    color: #666;
}

.msdd-number {
    text-align: right;
    font-family: monospace;
}

.msdd-total {
    font-weight: 700;
    color: #4CAF50;
}

/* Status Badges */
.msdd-status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.msdd-status-badge.maju {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.msdd-status-badge.mandiri {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.msdd-status-badge.berkembang {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

/* Progress Bar */
.msdd-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.msdd-percentage {
    min-width: 50px;
    font-weight: 600;
    color: #333;
}

.msdd-progress-bar-bg {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.msdd-progress-fill {
    height: 100%;
    transition: width 0.3s;
    border-radius: 4px;
}

.msdd-progress-fill.success {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.msdd-progress-fill.warning {
    background: linear-gradient(90deg, #FFC107, #FFB300);
}

.msdd-progress-fill.danger {
    background: linear-gradient(90deg, #F44336, #D32F2F);
}

/* Table Footer */
.msdd-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.msdd-summary {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.msdd-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.msdd-summary-label {
    font-weight: 500;
    color: #666;
}

.msdd-summary-value {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}

/* Pagination */
.msdd-pagination {
    display: flex;
    gap: 10px;
    align-items: center;
}

.msdd-pagination-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.msdd-pagination-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.msdd-pagination-btn:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}

.msdd-pagination-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.msdd-page-info {
    font-size: 14px;
    color: #666;
    min-width: 120px;
    text-align: center;
    font-weight: 500;
}

/* No Data */
.msdd-no-data-container {
    text-align: center;
    padding: 80px;
    background: linear-gradient(135deg, #f5f7ff, #f0f3ff);
    border-radius: 20px;
    color: #666;
}

.msdd-no-data-container .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #667eea;
    margin-bottom: 20px;
}

.msdd-no-data-container p {
    font-size: 18px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .msdd-frontend-container {
        padding: 15px;
    }
    
    .msdd-main-title {
        font-size: 24px;
        padding: 15px 25px;
    }
    
    .msdd-main-title .dashicons {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
    
    .msdd-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .msdd-search-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .msdd-search-box,
    .msdd-filter-box {
        width: 100%;
    }
    
    .msdd-data-table {
        font-size: 12px;
    }
    
    .msdd-data-table th,
    .msdd-data-table td {
        padding: 10px 8px;
    }
    
    .msdd-progress-container {
        min-width: 100px;
    }
    
    .msdd-table-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .msdd-summary {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .msdd-frontend-container {
        box-shadow: none;
        padding: 0;
        background: none;
    }
    
    .msdd-search-wrapper,
    .msdd-pagination,
    .msdd-stat-bg-icon {
        display: none;
    }
    
    .msdd-stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .msdd-data-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}