/* Super Admin Panel Styles */

.superadmin-dashboard {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: white;
}

/* Override white text for content cards */
.superadmin-dashboard .stats-card,
.superadmin-dashboard .institution-card,
.superadmin-dashboard .activity-item,
.superadmin-dashboard .stats-card *,
.superadmin-dashboard .institution-card *,
.superadmin-dashboard .activity-item *,
.superadmin-dashboard .stat-value,
.superadmin-dashboard .stat-label,
.superadmin-dashboard .institution-name,
.superadmin-dashboard .institution-details,
.superadmin-dashboard .premium-status,
.superadmin-dashboard .activity-content h4,
.superadmin-dashboard .activity-content p,
.superadmin-dashboard .activity-time,
.superadmin-dashboard .basic-admin-panel h2,
.superadmin-dashboard .basic-admin-panel p,
.superadmin-dashboard .debug-section h3,
.superadmin-dashboard .debug-section p,
.superadmin-dashboard .quick-actions .action-btn,
.superadmin-dashboard .quick-actions .action-btn *,
.superadmin-dashboard table,
.superadmin-dashboard table *,
.superadmin-dashboard th,
.superadmin-dashboard td,
.superadmin-dashboard .action-btn {
    color: #333 !important;
}

/* Make all text dark for better readability */
.superadmin-dashboard .header-content h1,
.superadmin-dashboard .header-content p,
.superadmin-dashboard .stats-section h2,
.superadmin-dashboard .institutions-section h2,
.superadmin-dashboard .activities-section h2 {
    color: #333 !important;
    text-shadow: none !important;
}

/* Premium Date Modal Styles */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.modal.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-header .close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.modal-header .close:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.superadmin-dashboard .admin-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
}

.superadmin-dashboard .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Stats Section */
.stats-section {
    margin: 3rem 0;
}

.stats-section h2 {
    margin: 0 0 2rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.stat-card.premium {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.2));
    border-color: rgba(255, 215, 0, 0.4);
}

.stat-card.active {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(25, 135, 84, 0.2));
    border-color: rgba(40, 167, 69, 0.4);
}

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

.stat-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.stat-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Institutions Section */
.institutions-section {
    margin: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.institutions-table-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto;
}

.institutions-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

.institutions-table th,
.institutions-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.institutions-table th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.institutions-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.institution-info strong {
    color: white;
    font-weight: 600;
}

.premium-badge {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.free-badge {
    background: rgba(108, 117, 125, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Activities Section */
.activities-section {
    margin: 3rem 0;
}

.activities-section h2 {
    margin: 0 0 2rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.activities-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.activity-icon {
    font-size: 1.5rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: white;
    font-weight: 500;
}

.activity-content small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.large {
    max-width: 900px;
}

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

.modal-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    color: #333;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 16px 16px;
    background: #f8f9fa;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.institution-checkboxes {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
}

.institution-checkboxes label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.institution-checkboxes label:hover {
    background: #e9ecef;
}

.institution-checkboxes input[type="checkbox"] {
    margin-right: 0.75rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #000;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Institution Details */
.institution-details {
    display: grid;
    gap: 2rem;
}

.detail-section h4 {
    margin: 0 0 1rem 0;
    color: #1e3c72;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.list-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item span {
    font-weight: 600;
    color: #333;
}

.list-item small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .superadmin-dashboard .container {
        padding: 0 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .institutions-table-container {
        padding: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column-reverse;
    }
}
