:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --card: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Login Screen  V3*/
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-card {
    background: var(--card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border);
}

.login-card h1 {
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 14px;
}

.login-card input {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.login-card input:focus {
    border-color: var(--primary);
}

.warning {
    text-align: center;
    color: var(--warning);
    font-size: 13px;
    margin-top: 20px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    padding: 10px 16px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-warning {
    padding: 10px 16px;
    background: var(--warning);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-warning:hover {
    opacity: 0.9;
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Dashboard Layout */
#adminDashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.logo h2 {
    font-size: 18px;
    font-weight: 700;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--text);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
}

.header {
    background: var(--card);
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
}

.user-info {
    color: var(--text-muted);
    font-size: 14px;
}

/* Sections */
.section {
    display: none;
    padding: 32px;
}

.section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Recent Activity */
.recent-activity {
    background: var(--card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.recent-activity h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Section Header */
.section-header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Search button optimization */
.section-header .btn-primary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.section-header .btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Table Container */
.table-container {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-light);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

.text-center {
    text-align: center;
    color: var(--text-muted);
}

/* User Detail Card */
.user-detail-card {
    background: var(--card);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.user-detail-card h3 {
    font-size: 22px;
    margin-bottom: 24px;
    color: var(--text);
    font-weight: 700;
}

.user-detail-card h4 {
    font-size: 18px;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
}

.detail-row .value {
    color: var(--text);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.course-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.course-item {
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Toast - Removed duplicate definition, using the one at end of file */

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 20px;
    }
    
    .section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .certificate-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .cert-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-download,
    .btn-regenerate {
        width: 100%;
    }
    
    .verify-url {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .verify-link {
        font-size: 11px;
    }
    
    .btn-copy {
        align-self: flex-start;
    }
}

/* ================================================
   CONTENT MANAGEMENT STYLES
   ================================================ */

.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #2563eb;
    background: #f0f7ff;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.content-tab {
    display: none;
}

.content-tab.active {
    display: block;
}

.import-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm {
    padding: 8px 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.btn-sm:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger-sm {
    padding: 6px 12px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-danger-sm:hover {
    background: #b91c1c;
}

.import-result {
    margin-top: 20px;
}

.success-message {
    background: #d1fae5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 20px;
}

.success-message h3 {
    color: #065f46;
    margin-bottom: 10px;
}

.error-list {
    margin-top: 15px;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 4px;
    padding: 15px;
}

.error-list h4 {
    color: #991b1b;
    margin-bottom: 10px;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    color: #991b1b;
    margin-bottom: 5px;
}

.form-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.form-card h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}

.resource-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.video-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.video-preview iframe {
    max-width: 100%;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

.error {
    color: #dc2626;
    text-align: center;
    padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .resource-item {
        grid-template-columns: 1fr;
    }
    
    .content-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-box p {
    margin: 5px 0;
    color: #1e40af;
}

.info-box ul {
    margin: 10px 0 5px 20px;
    color: #1e40af;
}

.info-box li {
    margin: 5px 0;
}

/* Success List */
.success-list {
    margin-top: 15px;
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 4px;
    padding: 15px;
}

.success-list h4 {
    color: #166534;
    margin-bottom: 10px;
}

.success-list ul {
    margin: 0;
    padding-left: 20px;
}

.success-list li {
    color: #166534;
    margin-bottom: 10px;
}

.success-list code {
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #15803d;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content.modern {
    padding: 0;
    border-radius: 16px;
    max-width: 560px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.info-badge {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.info-badge strong {
    color: var(--text);
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.info-text {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.form-control.modern {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
}

.form-control.modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.btn-cancel {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-regenerate-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-regenerate-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-regenerate-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 18px;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text);
}

.modal-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-group label:hover {
    background: #f3f4f6;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.radio-label:hover {
    border-color: #2563eb;
    background: #f0f7ff;
}

.radio-label input[type="radio"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + .radio-content {
    color: #2563eb;
}

.radio-label:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-content strong {
    font-size: 15px;
    color: #333;
}

.radio-content small {
    font-size: 13px;
    color: #666;
}

/* Profiles List */
.profiles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.profile-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.profile-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.profile-details strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-details small {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact Profile Item (No Avatar) */
.profile-item-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.profile-item-compact:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.profile-details-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-details-compact strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-details-compact small {
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-primary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    white-space: nowrap;
}

/* Certificate Items */
.certificates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certificate-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.certificate-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.cert-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.cert-info strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.cert-info small {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.cert-info small strong {
    font-size: 13px;
    color: var(--text);
}

.verify-url {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.verify-link {
    color: var(--primary);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

.verify-link:hover {
    text-decoration: underline;
}

.btn-copy {
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.cert-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-download {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    white-space: nowrap;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-regenerate {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.btn-regenerate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.course-item {
    padding: 10px;
    background: #f3f4f6;
    border-radius: 4px;
    margin-bottom: 8px;
}

code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #1f2937;
}

/* User Info Grid */
.user-info-grid {
    display: grid;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    min-width: 120px;
}

.info-value {
    color: var(--text);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
}

.info-value code {
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text);
    border: 1px solid var(--border);
}

/* Warning button styling */
.btn-compact.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-compact.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Compact Centered Sections (like login page) */
.compact-section-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.compact-section {
    background: var(--card);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border);
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.compact-header h4,
.compact-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.compact-header .btn-compact {
    flex: 0 0 auto;
    max-width: 40%;
    min-width: 120px;
}

.compact-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.compact-content {
    min-height: 60px;
}

/* Compact Buttons */
.btn-compact {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-compact.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-compact.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-compact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon-compact {
    padding: 10px 12px;
    font-size: 13px;
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-compact:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-icon-compact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Compact Select */
.select-compact {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.select-compact:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.select-compact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg);
}

/* Compact Profiles List */
.compact-content .profile-item-compact {
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.compact-content .profile-item-compact:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.compact-content .profile-details-compact strong {
    font-size: 15px;
    color: var(--text);
}

.compact-content .profile-details-compact small {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.compact-content .btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-content .btn-sm:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Compact Certificates List */
.compact-content .certificate-item {
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.compact-content .certificate-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.compact-content .cert-info {
    margin-bottom: 12px;
}

.compact-content .cert-info strong {
    font-size: 16px;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
}

.compact-content .cert-info small {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.compact-content .cert-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.compact-content .btn-download,
.compact-content .btn-regenerate {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.compact-content .btn-download {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
}

.compact-content .btn-regenerate {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.compact-content .btn-download:hover,
.compact-content .btn-regenerate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.compact-content .verify-url {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.compact-content .verify-url strong {
    display: block;
    color: var(--text);
    font-size: 12px;
    margin-bottom: 8px;
}

.verify-url-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.compact-content .verify-link {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.compact-content .btn-copy {
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.compact-content .btn-copy:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Placeholder Text */
.placeholder-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 30px 20px;
    font-style: italic;
}

.placeholder-text.error {
    color: var(--danger);
}

.loading {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-style: italic;
}

/* Email Edit Button */
.btn-warning {
    background: #f59e0b !important;
    color: white !important;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

#userEmailInput:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

#userEmailInput:not(:disabled) {
    background: #fff;
    border-color: #3b82f6;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Email Change Confirmation Modal Styling */
#emailChangeConfirmModal .modal-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Modal Spinner */
.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#progressModal .modal-content {
    padding: 40px;
}

#progressMessage {
    color: #374151;
    font-weight: 500;
}

/* Icon Button */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

/* Groups Management Styles - Dark Theme */
#section-groups {
    background: linear-gradient(135deg, #081726 0%, #050f18 100%);
    min-height: 100vh;
    color: #eaf2ff;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(234, 242, 255, 0.12);
}

.section-header h2 {
    margin: 0;
    color: #eaf2ff;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header .btn-primary {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border: none;
    color: white;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.section-header .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(56, 189, 248, 0.35);
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 28px;
    margin-top: 32px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 12px;
}

.groups-container::-webkit-scrollbar {
    width: 8px;
}

.groups-container::-webkit-scrollbar-track {
    background: rgba(234, 242, 255, 0.05);
    border-radius: 4px;
}

.groups-container::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

.groups-container::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

.group-card {
    background: rgba(4, 16, 24, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(234, 242, 255, 0.12);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.4s ease;
    position: relative;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-color: rgba(56, 189, 248, 0.3);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-bottom: 1px solid rgba(234, 242, 255, 0.12);
    position: relative;
}

.group-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.group-header h3 {
    margin: 0;
    color: #eaf2ff;
    font-size: 22px;
    font-weight: 700;
    text-transform: capitalize;
    position: relative;
    z-index: 1;
}

.group-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.group-actions .btn-sm {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(234, 242, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: #eaf2ff;
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
}

.group-actions .btn-sm:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.group-actions .btn-sm:first-child {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.group-actions .btn-sm:first-child:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.2) 100%);
}

.group-actions .btn-sm:last-child {
    background: linear-gradient(135deg, rgba(255, 75, 92, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(255, 75, 92, 0.3);
}

.group-actions .btn-sm:last-child:hover {
    background: linear-gradient(135deg, rgba(255, 75, 92, 0.3) 0%, rgba(220, 38, 38, 0.2) 100%);
}

.group-courses {
    padding: 16px 20px;
}

.group-courses h4 {
    margin: 0 0 20px 0;
    color: #9eb3d1;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-courses h4::before {
    content: "📚";
    font-size: 20px;
    filter: brightness(1.2);
}

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 8px;
}

.courses-list::-webkit-scrollbar {
    width: 4px;
}

.courses-list::-webkit-scrollbar-track {
    background: rgba(234, 242, 255, 0.05);
    border-radius: 2px;
}

.courses-list::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 2px;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 3px; /*updated padding */
    background: rgba(234, 242, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(234, 242, 255, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.course-item:hover {
    background: rgba(234, 242, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateX(6px);
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.course-title {
    font-size: 15px;
    font-weight: 700;
    color: #eaf2ff;
    line-height: 1.3;
    margin-bottom: 2px;
}

.course-id {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    background: rgba(234, 242, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 2px;
}

.access-level {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: fit-content;
}

.badge-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.course-item .btn-sm {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    background: linear-gradient(135deg, rgba(255, 75, 92, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(255, 75, 92, 0.3);
    color: #ff4b5c;
    transition: all 0.3s ease;
}

.course-item .btn-sm:hover {
    background: linear-gradient(135deg, rgba(255, 75, 92, 0.3) 0%, rgba(220, 38, 38, 0.2) 100%);
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    padding: 100px 40px;
    color: #64748b;
    background: rgba(4, 16, 24, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 22px;
    border: 2px dashed rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.empty-state h3 {
    margin-bottom: 16px;
    color: #eaf2ff;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.empty-state p {
    margin-bottom: 32px;
    font-size: 18px;
    color: #9eb3d1;
    position: relative;
    z-index: 1;
}

.empty-state .btn-primary {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border: none;
    color: white;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.empty-state .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(56, 189, 248, 0.35);
}

@media (max-width: 768px) {
    .groups-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .group-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        padding: 20px 24px;
    }
    
    .course-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}
/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-secondary {
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(234, 242, 255, 0.1);
    border: 1px solid rgba(234, 242, 255, 0.2);
    color: #9eb3d1;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(234, 242, 255, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.2);
}

/* Modern Modal Styles */
.modern-modal {
    background: var(--card);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    animation: slideUp 0.3s ease;
}

.modern-modal .modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-radius: 16px 16px 0 0;
}

.modern-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-modal .modal-body {
    padding: 28px;
}

.modern-modal .modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: rgba(4, 16, 24, 0.3);
    border-radius: 0 0 16px 16px;
}

.modern-modal .form-group {
    margin-bottom: 24px;
}

.modern-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.modern-modal .form-control.modern {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
}

.modern-modal .form-control.modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.modern-modal .form-control.modern:disabled {
    background: rgba(234, 242, 255, 0.05);
    border-color: rgba(234, 242, 255, 0.2);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.modern-modal .form-control.modern option {
    background: var(--bg);
    color: var(--text);
    padding: 10px;
}

.modern-modal .form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.modern-modal .btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.modern-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.modern-modal .btn-cancel {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modern-modal .btn-cancel:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .btn-secondary,
    .section-header .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .modern-modal {
        margin: 20px;
        max-width: calc(100vw - 40px) !important;
    }
    
    .modern-modal .modal-header,
    .modern-modal .modal-body,
    .modern-modal .modal-footer {
        padding: 20px;
    }
    
    .modern-modal .modal-footer {
        flex-direction: column;
    }
    
    .modern-modal .btn-primary,
    .modern-modal .btn-cancel {
        width: 100%;
    }
}
/* Course Management Styles */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.course-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

.course-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    margin-right: 15px;
}

.course-actions {
    display: flex;
    gap: 8px;
}

.course-info {
    padding: 20px;
}

.course-id {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.course-description {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.course-order,
.course-thumbnail {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Course Details Modal */
.course-details {
    background: rgba(37, 99, 235, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.detail-row strong {
    min-width: 120px;
    color: var(--text);
}

.lessons-section {
    margin-top: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.section-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.lessons-list,
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lesson-item,
.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: rgba(37, 99, 235, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.lesson-item:hover,
.topic-item:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--primary);
    transform: translateX(5px);
}

.lesson-info,
.topic-info {
    flex: 1;
}

.lesson-info h5,
.topic-info h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.lesson-id,
.topic-id {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(37, 99, 235, 0.1);
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 8px;
}

.lesson-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.topic-count,
.topic-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.topic-duration,
.topic-order,
.topic-video,
.topic-resources {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 3px 8px;
    border-radius: 4px;
}

.lesson-actions,
.topic-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Resource Management */
.resource-item {
    padding: 15px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
}

.resource-item:last-child {
    margin-bottom: 0;
}

/* Lesson Info in Topic Modal */
.lesson-info {
    background: rgba(16, 185, 129, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Topics Section */
.topics-section {
    margin-top: 20px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-muted);
    background: rgba(37, 99, 235, 0.03);
    border: 2px dashed var(--border);
    border-radius: 12px;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 24px;
}

.empty-state p {
    margin-bottom: 25px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .course-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .course-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .lesson-item,
    .topic-item {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .lesson-actions,
    .topic-actions {
        justify-content: flex-end;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Single User Import Styles */
.single-user-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control.modern {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control.modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-control.modern:disabled {
    background: rgba(234, 242, 255, 0.05);
    border-color: rgba(234, 242, 255, 0.2);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.btn-icon {
    margin-right: 8px;
}

.btn-secondary {
    padding: 14px 24px;
    background: rgba(234, 242, 255, 0.1);
    border: 1px solid rgba(234, 242, 255, 0.2);
    color: #9eb3d1;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(234, 242, 255, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.2);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Import Result Styles */
.import-result {
    margin-top: 24px;
    padding: 0;
}

.success-message {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 24px;
    color: var(--text);
}

.success-message h3 {
    color: var(--success);
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.user-details {
    background: rgba(16, 185, 129, 0.05);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid var(--success);
}

.user-details p {
    margin-bottom: 8px;
    font-size: 14px;
}

.user-details code {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.success-note {
    color: var(--success);
    font-weight: 500;
    margin-top: 16px;
    font-size: 14px;
}

.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 24px;
    color: var(--text);
}

.error-message h3 {
    color: var(--danger);
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.credentials-sent {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.credentials-sent .success-note {
    color: var(--primary);
    margin: 0;
}

/* Content Tabs */
.content-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
    background: rgba(37, 99, 235, 0.05);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.tab-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--text);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.content-tab {
    display: none;
}

.content-tab.active {
    display: block;
}

/* Responsive Design for Single User Form */
@media (max-width: 768px) {
    .single-user-form {
        padding: 24px;
        margin-top: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .form-actions button {
        width: 100%;
        text-align: center;
    }
    
    .content-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .single-user-form {
        padding: 20px;
        border-radius: 12px;
    }
    
    .form-control.modern {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .user-details {
        padding: 12px;
    }
    
    .success-message,
    .error-message {
        padding: 20px;
    }
}
/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    transform: translateX(0);
}

.toast.hidden {
    transform: translateX(400px);
    opacity: 0;
}

.toast.info {
    background: var(--primary);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
}

@media (max-width: 480px) {
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .toast.hidden {
        transform: translateY(-100px);
    }
}
/* Payment Info Guide - Simplified */
.payment-info {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.payment-info h4 {
    color: var(--success);
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.guide-note {
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px;
    background: rgba(16, 185, 129, 0.03);
    border-radius: 6px;
    margin-bottom: 12px;
}

.guide-note:last-child {
    margin-bottom: 0;
}

.guide-note strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .payment-info {
        padding: 20px;
        margin-top: 20px;
    }
}
/* Access Level Badge */
.access-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-badge.full {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.access-badge.emi1 {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Error Details */
.error-details {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.error-details p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.error-details strong {
    color: var(--danger);
}
/* Section Header Inline */
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.section-header-inline h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Profiles and Certificates Sections */
.profiles-section,
.certificates-section {
    margin-top: 24px;
}

.profiles-section .profiles-list {
    margin-top: 16px;
}

.certificates-section .certificate-section {
    margin-top: 16px;
}

/* Profile Selector Updates */
.profile-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.profile-selector label {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.profile-dropdown {
    flex: 1;
    min-width: 200px;
}

.profile-dropdown:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button States */
.btn-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

/* Compact styling for profile and certificate section buttons */
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.section-header-inline .btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 8px;
    min-width: auto;
    flex-shrink: 0;
}

.profile-selector .btn-sm {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
    margin-left: 8px;
}

/* Make Get Certificates button more compact */
#getCertificatesBtn {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Error Text */
.text-center.error {
    color: var(--danger);
    font-weight: 500;
}

@media (max-width: 768px) {
    .section-header-inline {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .section-header-inline .btn-sm {
        width: 100%;
        text-align: center;
    }
    
    .profile-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .profile-selector label {
        text-align: left;
    }
}

/* Date Input with Custom Calendar Icon - Using existing calendar.svg */
#singleUserPaymentDate {
    padding: 14px 50px 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    width: 100%;
    cursor: pointer;
    position: relative;
    
    /* Hide the default calendar icon */
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

#singleUserPaymentDate::-webkit-calendar-picker-indicator {
    display: none;
}

#singleUserPaymentDate::-webkit-inner-spin-button,
#singleUserPaymentDate::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#singleUserPaymentDate:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Custom calendar icon using existing SVG */
.form-group:has(#singleUserPaymentDate) {
    position: relative;
}

.form-group:has(#singleUserPaymentDate)::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('assets/calendar.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    
    /* Make the black SVG visible on dark background */
    filter: brightness(0) invert(1) opacity(0.7);
    transition: all 0.2s ease;
}

.form-group:has(#singleUserPaymentDate):hover::after {
    filter: brightness(0) invert(1) opacity(1);
    transform: translateY(-50%) scale(1.1);
}

/* Style the date text for better visibility */
#singleUserPaymentDate::-webkit-datetime-edit {
    color: var(--text);
    padding: 2px 4px;
}

#singleUserPaymentDate::-webkit-datetime-edit-fields-wrapper {
    color: var(--text);
}

#singleUserPaymentDate::-webkit-datetime-edit-text {
    color: var(--text-muted);
}

#singleUserPaymentDate::-webkit-datetime-edit-month-field,
#singleUserPaymentDate::-webkit-datetime-edit-day-field,
#singleUserPaymentDate::-webkit-datetime-edit-year-field {
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
}

/* Ensure the entire date field is clickable */
#singleUserPaymentDate {
    cursor: pointer;
}

/* Make sure clicking anywhere in the field opens the calendar */
.form-group:has(#singleUserPaymentDate) {
    cursor: pointer;
}

.form-group:has(#singleUserPaymentDate) label {
    cursor: pointer;
}

/* Style the calendar popup for dark theme */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("assets/calendar.svg") !important;
    background-size: 16px 16px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* CSV Import Styles - Dark Theme */
.csv-import-container {
    display: grid;
    gap: 2rem;
}

.csv-instructions {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.csv-instructions h3 {
    margin-top: 0;
    color: var(--text);
    font-size: 1.1rem;
}

.csv-instructions ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.csv-instructions li {
    margin: 0.5rem 0;
    color: var(--text-muted);
}

.csv-upload-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.file-upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--text);
    margin: 0.5rem 0;
}

.upload-subtext {
    color: var(--text-muted);
    margin: 0.5rem 0 1rem;
}

.csv-preview {
    margin-top: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.csv-preview h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

#csvPreviewContent {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    max-height: 300px;
    overflow: auto;
    margin-bottom: 1rem;
}

.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.csv-preview-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--primary-dark);
}

.csv-preview-table td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--bg);
}

.csv-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.import-progress {
    margin-top: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.import-progress h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--bg);
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

#progressText {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0.5rem 0 1rem;
}

.import-logs {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.log-entry {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-success {
    color: var(--success);
}

.log-error {
    color: var(--danger);
}

.log-info {
    color: var(--text-muted);
}

.import-results {
    margin-top: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.import-results h3 {
    margin-bottom: 1rem;
    color: var(--success);
}

.import-summary {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-success .stat-value {
    color: var(--success);
}

.stat-error .stat-value {
    color: var(--danger);
}

.stat-total .stat-value {
    color: var(--primary);
}

.import-details {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1rem;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-list li {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}

.detail-list li:last-child {
    border-bottom: none;
}

.detail-list small {
    color: var(--text-muted);
}

/* CSV Error Styles */
.csv-error-container {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 1.5rem;
}

.csv-error-container h3 {
    margin-top: 0;
    color: var(--danger);
}

.csv-error-container p {
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.error-list {
    background: var(--bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.error-item {
    padding: 0.5rem;
    color: #fca5a5;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.error-item:last-child {
    border-bottom: none;
}

.error-note {
    background: rgba(239, 68, 68, 0.05);
    padding: 0.75rem;
    border-left: 3px solid var(--danger);
    margin: 1rem 0;
    font-weight: 500;
    color: var(--text-muted);
}
/* Import Actions */
.import-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.import-actions .btn-primary,
.import-actions .btn-secondary {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .import-actions {
        flex-direction: column;
    }
    
    .import-actions .btn-primary,
    .import-actions .btn-secondary {
        width: 100%;
    }
}
/* Download Info */
.download-info {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.download-info p {
    margin: 0;
    color: var(--text);
    font-size: 0.9rem;
}

.download-info strong {
    color: var(--primary);
}

/* Payment Items Styles */
.payment-item {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.payment-header strong {
    color: var(--text);
    font-size: 14px;
}

.payment-details {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.payment-details span {
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.payment-refund-info {
    background: var(--bg);
    border: 1px solid var(--danger);
    border-radius: 6px;
    padding: 8px;
    margin: 8px 0;
}

.payment-refund-info small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 2px;
}

.payment-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.payment-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-actions .btn-warning {
    background: var(--warning);
    color: white;
}

.payment-actions .btn-warning:hover {
    background: #d97706;
}

.payment-actions .btn-danger {
    background: var(--danger);
    color: white;
}

.payment-actions .btn-danger:hover {
    background: #dc2626;
}

/* Badge Styles for Payment Status */
.badge-danger {
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: var(--success);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* Enhanced Group Badges with Payment Info */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-primary {
    background: var(--primary);
    color: white;
}