/* =====================================================
   ADMIN PANEL STYLES
   ===================================================== */

/* Admin Modal */
.admin-modal-content {
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
}

/* Admin Statistics */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.admin-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.admin-search input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

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

.admin-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-filters select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-filters select:focus {
    outline: none;
    border-color: #667eea;
}

/* Admin Buttons */
.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-btn i {
    font-size: 0.9rem;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.admin-btn-edit {
    background: #2196f3;
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.admin-btn-edit:hover {
    background: #1976d2;
}

.admin-btn-delete {
    background: #f44336;
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.admin-btn-delete:hover {
    background: #d32f2f;
}

.admin-btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.admin-btn-cancel:hover {
    background: #ccc;
}

/* Admin Table */
.admin-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
}

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

.admin-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-table tbody td {
    padding: 15px;
    font-size: 0.9rem;
}

.admin-table tbody td:first-child {
    font-weight: 500;
    color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Role Badges */
.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.role-badge.role-project_developer {
    background: #e3f2fd;
    color: #1976d2;
}

.role-badge.role-verifier {
    background: #f3e5f5;
    color: #7b1fa2;
}

.role-badge.role-financier {
    background: #e8f5e9;
    color: #388e3c;
}

.role-badge.role-gov_stakeholder {
    background: #fff3e0;
    color: #f57c00;
}

.role-badge.role-guest {
    background: #f5f5f5;
    color: #757575;
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-badge.active {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-badge.inactive {
    background: #ffcdd2;
    color: #c62828;
}

/* User Form Modal */
.user-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

.user-form-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease;
}

.user-form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.user-form-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-form-body {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

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

.form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-modal-content {
        width: 98%;
        margin: 10px;
    }

    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .admin-controls {
        flex-direction: column;
    }

    .admin-search {
        min-width: 100%;
    }

    .admin-filters {
        width: 100%;
        flex-direction: column;
    }

    .admin-filters select,
    .admin-filters button {
        width: 100%;
    }

    .admin-table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 800px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .user-form-content {
        width: 95%;
    }

    .action-buttons {
        flex-direction: column;
    }
    
    .admin-btn-edit,
    .admin-btn-delete {
        width: 100%;
        justify-content: center;
    }
}
