/* Стили для главной страницы панели администратора */

/* Контейнер дашборда */
.dashboard-container {
    width: 100%;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Приветственный блок */
.dashboard-welcome {
    margin-bottom: 30px;
    background-color: #f5f7ff;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #4a6cf7;
}

.dashboard-welcome h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.dashboard-welcome p {
    color: #666;
    margin-bottom: 0;
}

/* Сетка карточек */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Стили карточек */
.dashboard-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover, .dashboard-card.card-hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(74, 108, 247, 0.1);
}

.dashboard-card .card-icon svg {
    color: #4a6cf7;
}

.dashboard-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-card .card-content p,
.dashboard-card .card-content .card-cta-hint {
    flex: 1;
}

.dashboard-card h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

.dashboard-card .card-stat {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
    color: #4a6cf7;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.dashboard-card .card-link {
    display: inline-block;
    text-align: center;
    background-color: #4a6cf7;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s;
    margin-top: auto;
}

.dashboard-card .card-link:hover {
    background-color: #3655d8;
    text-decoration: none;
    color: #fff;
}

.dashboard-card .card-link-primary {
    background-color: #16a34a;
}

.dashboard-card .card-link-primary:hover {
    background-color: #15803d;
}

/* Цветовая схема для разных карточек */
#courses-card .card-icon {
    background-color: rgba(74, 108, 247, 0.1);
}

#courses-card .card-icon svg {
    color: #4a6cf7;
}

#courses-card .card-stat {
    color: #4a6cf7;
}

#slides-card .card-icon {
    background-color: rgba(255, 107, 0, 0.1);
}

#slides-card .card-icon svg {
    color: #ff6b00;
}

#slides-card .card-stat {
    color: #ff6b00;
}

#students-card .card-icon {
    background-color: rgba(38, 166, 91, 0.1);
}

#students-card .card-icon svg {
    color: #26a65b;
}

#students-card .card-stat {
    color: #26a65b;
}

#stats-card .card-icon {
    background-color: rgba(142, 68, 173, 0.1);
}

#stats-card .card-icon svg {
    color: #8e44ad;
}

#stats-card .card-stat {
    color: #8e44ad;
}

/* Блок недавней активности */
.dashboard-recent {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.dashboard-recent h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.recent-activity-placeholder {
    padding: 20px;
    background-color: #f5f7ff;
    border-radius: 6px;
    text-align: center;
}

.recent-activity-placeholder p {
    color: #666;
    margin: 0;
}

/* Таблица активности */
.recent-activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    max-width: 1000px;
    margin: 0 auto;
}

.recent-activity-table th {
    text-align: left;
    padding: 12px 10px;
    background-color: #f5f7ff;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #e0e5f2;
}

.recent-activity-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e5f2;
    color: #555;
}

.recent-activity-table tr:hover {
    background-color: #f9faff;
}

.recent-activity-table .status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.recent-activity-table .status.published {
    background-color: rgba(38, 166, 91, 0.1);
    color: #26a65b;
}

.recent-activity-table .status.draft {
    background-color: rgba(142, 142, 142, 0.1);
    color: #666;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    color: #4a6cf7;
    background-color: rgba(74, 108, 247, 0.1);
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: rgba(74, 108, 247, 0.2);
}

.action-btn.edit {
    color: #4a6cf7;
    background-color: rgba(74, 108, 247, 0.1);
}

.action-btn.edit:hover {
    background-color: rgba(74, 108, 247, 0.2);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .dashboard-welcome h2 {
        font-size: 20px;
    }

    .dashboard-card {
        padding: 15px;
    }
}

/* Бейджи карточки курсов */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px;
    min-height: 52px;
    align-items: center;
}

.card-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    background-color: rgba(74, 108, 247, 0.12);
    color: #4a6cf7;
}

.card-badge-secondary {
    background-color: rgba(100, 100, 100, 0.12);
    color: #444;
    font-weight: 600;
}

.card-cta-hint {
    font-size: 13px;
    color: #4a6cf7;
    margin: 0 0 12px;
    font-style: italic;
}

/* Баннер импорта курса */
.import-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #dce6ff;
    color: #333;
    border-radius: 10px;
    border-left: 4px solid #4a6cf7;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.15);
    position: relative;
}

.import-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(74, 108, 247, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-banner-icon svg {
    color: #4a6cf7;
}

.import-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.import-banner-text strong {
    font-size: 15px;
    font-weight: 700;
    color: #1a2f6e;
}

.import-banner-text span {
    font-size: 13px;
    color: #3a4a7a;
}

.import-banner-btn {
    flex-shrink: 0;
    display: inline-block;
    background: #4a6cf7;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 20px;
    border-radius: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.import-banner-btn:hover {
    background: #3655d8;
    color: #fff;
    text-decoration: none;
}

.import-banner-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #7a8cc0;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.import-banner-close:hover {
    color: #1a2f6e;
    background: rgba(74, 108, 247, 0.15);
}

@media (max-width: 768px) {
    .import-banner {
        flex-wrap: wrap;
    }

    .import-banner-text {
        flex-basis: calc(100% - 64px);
    }

    .import-banner-btn {
        width: 100%;
        text-align: center;
        order: 4;
    }
}
