/* Course Box Admin Styles */
.course-box-admin {
    /*max-width: 1200px;*/
}

.course-box-admin h1 {
    color: #1e3a8a;
    margin-bottom: 30px;
}


.wrap.course-box-admin {
    display: flex;
    flex-direction: column;
}

.pagination-controls {
    order: 3;
    margin-top: 30px;
}

.import-controls {
    order: 1;
}

div#courses-container {
    order: 2;
}


/* Dashboard Styles */
.course-box-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.dashboard-card h2 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 20px;
}

.dashboard-card p {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.6;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.dashboard-actions .button {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dashboard-actions .button-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
}

.dashboard-actions .button-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
}

/* Status Items */
.status-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
}

.status-label {
    font-weight: 500;
    color: #374151;
}

.status-value {
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Settings Page */
.settings-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.settings-section h2 {
    color: #1e3a8a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.form-table th {
    color: #374151;
    font-weight: 600;
    padding: 20px 0;
}

.form-table td {
    padding: 20px 0;
}

.form-table input[type="text"],
.form-table input[type="url"],
.form-table input[type="password"],
.form-table select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-table input[type="text"]:focus,
.form-table input[type="url"]:focus,
.form-table input[type="password"]:focus,
.form-table select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-table .description {
    color: #6b7280;
    font-style: italic;
    margin-top: 8px;
}

/* Import Page */
.import-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    min-width: 300px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.bulk-actions {
    display: flex;
    gap: 15px;
}

.bulk-actions .button {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

.bulk-actions .button-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
}

.bulk-actions .button-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.pagination-controls .button {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.pagination-controls .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-weight: 500;
    color: #374151;
}

.page-info span {
    color: #3b82f6;
    font-weight: 600;
}

/* Courses Container */
#courses-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-height: 400px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 30px;
}

.course-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.course-card .course-image {
    height: 200px;
    margin: -25px -25px 20px -25px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.course-card .course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-card h3 {
    color: #1e3a8a;
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.4;
    min-height: 51px;
}

.course-card .course-description {
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card .course-duration,
.course-card .course-instructor {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
}

.course-card .course-duration strong,
.course-card .course-instructor strong {
    color: #374151;
}

.course-card .course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.course-price {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
}

.course-card .import-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-card .import-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
}

.course-card .import-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.course-card .import-btn.importing {
    background: #fbbf24;
}

.course-card .import-btn.imported {
    background: #10b981;
}

.course-card .import-btn.reimport {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.course-card .import-btn.reimport:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
.course-description p {
    margin-top: 0;
}

.course-description p:empty {
    margin: 0;
}
.course-description p {
    margin-top: 0;
}

.course-description p:empty {
    margin: 0;
}
.course-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.course-actions > button {
    flex: 1;
}
.course-actions > a {
    flex: 1;
    display: block;
    text-align: center;
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.course-actions > a:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #6b7280;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-box-dashboard {
        grid-template-columns: 1fr;
    }
    
    .import-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        min-width: auto;
        flex: 1;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    .dashboard-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.course-card {
    animation: fadeIn 0.6s ease-out;
}

.course-card:nth-child(even) {
    animation-delay: 0.1s;
}

.course-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Success/Error Messages */
.notice {
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

.notice-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notice-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* Button Improvements */
.button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.wrap.course-box-admin a.button.button-primary {
 vertical-align: middle;
}