/* Academia Admin Panel Styles */

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.admin-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 800;
}

.btn-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Course Grid Layout */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.course-card-admin {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.course-card-admin:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.course-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-thumbnail i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
}

.status-badge-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-badge-overlay.status-published {
    background: rgba(198, 246, 213, 0.95);
    color: #22543d;
}

.status-badge-overlay.status-draft {
    background: rgba(254, 215, 215, 0.95);
    color: #742a2a;
}

.course-content-admin {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.course-title-admin {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
}

.course-description-admin {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s;
}

.btn-read-more:hover {
    color: #764ba2;
}

.btn-read-more i {
    font-size: 0.75rem;
}

.description-full {
    white-space: pre-line;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
    padding: 10px 0;
    word-wrap: break-word;
}

.course-meta-admin {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.lesson-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #edf2f7;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 600;
}

.lesson-count-badge i {
    color: #667eea;
}

.course-actions-admin {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.btn-action {
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

.btn-edit-action {
    background: #bee3f8;
    color: #2c5282;
}

.btn-edit-action:hover {
    background: #90cdf4;
}

.btn-lessons-action {
    background: #d6bcfa;
    color: #44337a;
}

.btn-lessons-action:hover {
    background: #c084fc;
}

.btn-delete-action {
    background: #fed7d7;
    color: #742a2a;
}

.btn-delete-action:hover {
    background: #fc8181;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-submit:hover {
    opacity: 0.9;
}

/* Icon Buttons in Modals */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-icon.btn-edit {
    background: #bee3f8;
    color: #2c5282;
}

.btn-icon.btn-edit:hover {
    background: #90cdf4;
}

.btn-icon.btn-delete {
    background: #fed7d7;
    color: #742a2a;
}

.btn-icon.btn-delete:hover {
    background: #fc8181;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .admin-header-container {
        flex-direction: column;
        gap: 20px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-actions-admin {
        grid-template-columns: 1fr;
    }

    .btn-action span {
        display: inline;
    }
}