/* ============================================= */
/* dashboard.css - Мобильно-адаптивная версия */
/* ============================================= */

/* --------------------------------------------- */
/* 1. ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И БАЗОВЫЕ СТИЛИ */
/* --------------------------------------------- */
:root {
    --primary-color: #2c3e50;
    --primary-dark: #1e2b37;
    --secondary-color: #3498db;
    --accent-color: #2980b9;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: 1000;
}

/* --------------------------------------------- */
/* 2. ДЕСКТОПНЫЙ КОНТЕЙНЕР (больше 992px) */
/* --------------------------------------------- */
.desktop-app {
    width: 98vw;
    height: 98vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    margin: 1vh auto;
}

/* --------------------------------------------- */
/* 3. ШАПКА (ДЕСКТОП) */
/* --------------------------------------------- */
.app-header {
    background: var(--primary-color);
    color: white;
    padding: 0 30px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: absolute;
    left: 320px;
    right: 0;
    top: 0;
    z-index: 11;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--primary-dark);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.mobile-menu-btn {
    display: none;
}

.header-left {
    display: none;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex: 1;
    margin: 0 20px;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 5px 0;
    position: relative;
}

.header-nav a:hover,
.header-nav a.active {
    color: white;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.header-nav a:hover::after,
.header-nav a.active::after {
    transform: scaleX(1);
}

.header-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-shrink: 0;
    margin-left: auto;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.login-header-btn {
    background: #27ae60;
    border: none;
    color: white;
    width: auto;
    padding: 8px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.login-header-btn:hover {
    background: #219653;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

.role-switch {
    display: flex;
    align-items: center;
    margin-right: 0;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-link i {
    font-size: 12px;
}

/* --------------------------------------------- */
/* 4. ЛЕВАЯ ПАНЕЛЬ (ДЕСКТОП) */
/* --------------------------------------------- */
.left-panel {
    width: 320px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.left-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    border-radius: 3px;
}

.welcome-block {
    padding: 0 20px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-avatar i {
    font-size: 24px;
    color: var(--secondary-color);
}

.welcome-text h2 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.3;
}

.welcome-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 0;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 10px 20px;
}

.user-info-block {
    padding: 10px 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.info-item i {
    color: var(--secondary-color);
    font-size: 14px;
    width: 20px;
}

.info-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 400;
}

.info-value {
    color: white;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.progress-block {
    padding: 15px 20px;
}

.block-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.block-title i {
    color: var(--secondary-color);
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.stat-value {
    color: white;
    font-size: 13px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0 5px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--success-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-align: right;
    display: block;
}

.nav-block {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.nav-btn i {
    font-size: 16px;
    color: var(--secondary-color);
    width: 20px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.nav-btn.active i {
    color: white;
}

.info-block {
    padding: 15px 20px;
    margin-top: auto;
}

.info-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.info-btn:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
    color: white;
}

.info-btn i {
    color: var(--secondary-color);
}

/* --------------------------------------------- */
/* 5. ОСНОВНОЕ СОДЕРЖИМОЕ (ДЕСКТОП) */
/* --------------------------------------------- */
.main-content {
    position: absolute;
    left: 320px;
    right: 0;
    top: var(--header-height);
    bottom: 0;
    padding: 25px;
    overflow-y: auto;
    background: var(--light-bg);
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    border-radius: 4px;
}

.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.content-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-tab:hover {
    background: rgba(52, 152, 219, 0.05);
    color: var(--secondary-color);
}

.content-tab.active {
    background: var(--secondary-color);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius);
    padding: 25px;
    color: white;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.welcome-card h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 5px;
}

.welcome-card p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.stat-card i {
    font-size: 32px;
    color: var(--secondary-color);
}

.stat-card-content {
    display: flex;
    flex-direction: column;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-light);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 15px;
}

.section-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.back-to-courses-btn {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #3498db;
    border-radius: 30px;
    color: #3498db;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.back-to-courses-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
}

/* Таблицы */
.tests-table,
.results-table {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px 15px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-progress {
    background: #cce5ff;
    color: #004085;
}

.test-btn,
.view-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.test-btn:hover,
.view-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.view-btn {
    background: var(--secondary-color);
}






/* --------------------------------------------- */
/* 6. СЕТКА КУРСОВ */
/* --------------------------------------------- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.course-card-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.course-card-header i {
    font-size: 32px;
    color: white;
}

.course-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-card-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px;
    line-height: 1.3;
}

.course-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 16px;
}

.course-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.course-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-card-top {
    flex: 1;
}

.course-card-footer {
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.meta-item i {
    color: var(--secondary-color);
    font-size: 12px;
}

.course-card-footer {
    margin-top: auto;
}

.course-period {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #e67e22;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #fff8e7;
    border-radius: 8px;
}

.course-progress {
    margin-bottom: 12px;
}

.progress-bar-container {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--success-color));
}

.progress-text-small {
    display: block;
    text-align: right;
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
}

.course-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.course-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

/* --------------------------------------------- */
/* 7. СЕТКА ТЕСТОВ */
/* --------------------------------------------- */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.test-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.test-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.test-card-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.test-card-header i {
    font-size: 32px;
    color: white;
}

.test-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.test-card-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px;
    line-height: 1.3;
}

.test-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 16px;
}

.test-meta-info {
    margin-bottom: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.test-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.test-meta-row:last-child {
    margin-bottom: 0;
}

.test-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.test-meta-item i {
    color: var(--secondary-color);
    font-size: 12px;
}

.test-card-footer {
    margin-top: auto;
}

.test-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.test-valid-until {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #e67e22;
    background: #fff8e7;
    padding: 6px 12px;
    border-radius: 8px;
}

.test-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.test-buttons {
    display: flex;
    gap: 12px;
}

.test-card-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.test-card-btn.disabled {
    background: #d4edda !important;
    color: #155724 !important;
    cursor: default;
}

.test-card-btn.exam-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.test-card-btn.exam-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.test-card-btn.training-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.test-card-btn.training-btn:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-expired {
    background: #e2e8f0;
    color: #718096;
}





/* --------------------------------------------- */
/* 8. ДЕТАЛЬНАЯ ИНФОРМАЦИЯ КУРСА */
/* --------------------------------------------- */

.content-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.content-item i {
    font-size: 16px;
    width: 24px;
}

.item-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
}

.item-title:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.item-link {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    border-radius: 4px;
    transition: all 0.2s;
}

.item-link:hover {
    background: var(--secondary-color);
    color: white;
}

.course-detail {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.course-detail-header {
    margin-bottom: 25px;
}

.course-detail-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 10px;
}

.course-detail-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Блок "Содержание курса" */
.course-content {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.course-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.course-content-header:hover {
    background: #f1f5f9;
}

.course-content-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-content-header i {
    color: var(--secondary-color);
    font-size: 14px;
    transition: transform 0.2s;
}

.content-count {
    font-size: 13px;
    color: var(--text-light);
}

.course-content-body {
    padding: 20px;
    background: white;
}

/* Темы курса */
.topic-item {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.topic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
}

.topic-header:hover {
    background: #f1f5f9;
}

.topic-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-chevron {
    color: var(--secondary-color);
    font-size: 12px;
    transition: transform 0.2s;
}

.topic-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.topic-header-right {
    font-size: 12px;
    color: var(--text-light);
}

.topic-content {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.topic-subsection {
    margin-bottom: 15px;
}

.topic-subsection:last-child {
    margin-bottom: 0;
}

.topic-subsection h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Блок "Нормативные правовые акты" */
.normative-wrapper {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.normative-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.normative-header:hover {
    background: #f1f5f9;
}

.normative-header i {
    color: var(--secondary-color);
    font-size: 14px;
    transition: transform 0.2s;
}

.normative-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.normative-content {
    padding: 20px;
    background: white;
}

.normative-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.normative-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.normative-item:hover {
    background: #f1f5f9;
}

.normative-item i {
    color: #9b59b6;
    font-size: 16px;
    width: 20px;
}

.normative-info {
    flex: 1;
}

.normative-title {
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.normative-title:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.normative-description {
    display: none;
}

.item-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    border-radius: 4px;
    transition: all 0.2s;
}

.item-link:hover {
    background: var(--secondary-color);
    color: white;
}

/* Блок "Тестирование по курсу" */
.course-testing {
    margin-top: 20px;
}

.course-testing h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-testing h4 i {
    color: var(--secondary-color);
}

.course-tests {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.test-info {
    flex: 1;
}

.test-info h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 8px;
}

.test-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.test-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-light);
}

.test-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.test-meta i {
    color: var(--secondary-color);
}

.test-status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
}

.test-status-badge.available {
    background: #d4edda;
    color: #155724;
}

.test-status-badge.completed {
    background: #cce5ff;
    color: #004085;
}

.test-status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

.test-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.test-btn:hover:not(.disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.test-btn.disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

/* Стили для иконки НПА при раскрытии */
.normative-header i {
    transition: transform 0.2s ease;
    color: var(--secondary-color);
    font-size: 14px;
    transition: transform 0.2s;
}

.normative-header i.fa-chevron-down {
    transform: rotate(0deg);
}

/* --------------------------------------------- */
/* 9. МОДАЛЬНЫЕ ОКНА */
/* --------------------------------------------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    width: 500px;
    max-width: 90vw;
    z-index: 10001;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.test-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
}

.test-info p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.test-info p strong {
    color: var(--primary-color);
    font-weight: 600;
    min-width: 140px;
    display: inline-block;
}

.test-rules h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 10px;
}

.test-rules ul {
    padding-left: 20px;
    margin: 0;
}

.test-rules li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.modal-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-btn.cancel {
    background: #e2e8f0;
    color: var(--text-primary);
}

.modal-btn.cancel:hover {
    background: #cbd5e0;
}

.modal-btn.confirm {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.modal-btn.confirm:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* --------------------------------------------- */
/* 10. УВЕДОМЛЕНИЯ */
/* --------------------------------------------- */
.app-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    min-width: 300px;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.app-message.closing {
    animation: slideOutRight 0.3s ease forwards;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid;
}

.message-success .message-content {
    border-left-color: var(--success-color);
}

.message-success i {
    color: var(--success-color);
}

.message-error .message-content {
    border-left-color: var(--danger-color);
}

.message-error i {
    color: var(--danger-color);
}

.message-info .message-content {
    border-left-color: var(--secondary-color);
}

.message-info i {
    color: var(--secondary-color);
}

.message-close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 5px;
}

.message-close:hover {
    color: var(--text-primary);
}

/* --------------------------------------------- */
/* 11. МОДАЛЬНОЕ ОКНО РЕЗУЛЬТАТОВ */
/* --------------------------------------------- */
#resultDetailModal .mistakes-section {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

#resultDetailModal .mistakes-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 12px;
}

#resultDetailModal .mistake-item {
    background: #fff8e7;
    border-left: 4px solid #f39c12;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
}

#resultDetailModal .mistake-question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
}

#resultDetailModal .mistake-comment {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    background: white;
    padding: 8px 10px;
    border-radius: 4px;
    margin-top: 5px;
}

#resultDetailModal .no-mistakes {
    text-align: center;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    color: #2e7d32;
    font-size: 14px;
}

/* --------------------------------------------- */
/* 12. МОДАЛЬНОЕ ОКНО ВХОДА */
/* --------------------------------------------- */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.login-modal-dialog {
    position: relative;
    width: 420px;
    max-width: 90vw;
    z-index: 20001;
    animation: modalSlideIn 0.3s ease;
}

.login-modal-content {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.login-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.login-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.login-modal-header p {
    font-size: 13px;
    opacity: 0.9;
    margin: 8px 0 0;
}

.login-modal-body {
    padding: 24px;
}

.login-modal-body p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-modal-body .email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f4f8;
    padding: 8px 16px;
    border-radius: 30px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.login-modal-body .email-link:hover {
    background: #e2e8f0;
}

.login-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-color);
}

.login-modal-btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.login-modal-btn.cancel {
    background: #e2e8f0;
    color: var(--text-secondary);
}

.login-modal-btn.cancel:hover {
    background: #cbd5e0;
}

.login-modal-btn.confirm {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.login-modal-btn.confirm:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* --------------------------------------------- */
/* 13. ВСПОМОГАТЕЛЬНЫЕ СТИЛИ */
/* --------------------------------------------- */
.loading-row {
    text-align: center;
    color: var(--text-light);
    padding: 30px !important;
}

.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 40px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.google-drive-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.google-drive-link a:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

/* Неактивные кнопки */
.test-btn.disabled,
.test-card-btn.disabled,
.course-btn.disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

span.test-btn.disabled {
    display: inline-block;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: default;
}

.loading-item {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}







/* ============= ВЫПАДАЮЩЕЕ МЕНЮ ПОЛЬЗОВАТЕЛЯ ============= */
.user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 30px;
    transition: background 0.2s;
}

.user-menu-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.user-menu-wrapper.open .user-menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.user-menu-wrapper.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    border-radius: 8px;
    margin: 4px 8px;
}

.user-dropdown-menu a:first-child {
    margin-top: 8px;
}

.user-dropdown-menu a:last-child {
    margin-bottom: 8px;
}

.user-dropdown-menu a:hover {
    background: #f0f4f8;
}

.user-dropdown-menu a i {
    width: 20px;
    color: var(--secondary-color);
}

/* ============= СТИЛИ ДЛЯ КАРТОЧЕК СТАТИСТИКИ ============= */
.stat-card {
    cursor: pointer;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

/* ============= ЕДИНЫЙ СТИЛЬ КНОПОК В ТАБЛИЦЕ ============= */
.action-cell {
    width: 120px;
    text-align: center;
}

.action-cell .test-btn,
.action-cell .disabled-btn {
    display: inline-block;
    min-width: 100px;
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.action-cell .test-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.action-cell .test-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.action-cell .disabled-btn {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: default;
}

/* ============= ФОРМА ПРОФИЛЯ ============= */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--secondary-color);
    width: 16px;
}

.form-group input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-note {
    font-size: 12px;
    color: var(--text-light);
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-dialog.modal-lg {
    width: 600px;
}

.modal-dialog.modal-sm {
    width: 400px;
}

/* ============= ПОЗДРАВИТЕЛЬНАЯ МОДАЛКА ============= */
.congrat-modal .modal-body h4 {
    margin-bottom: 10px;
    color: #27ae60;
}

/* ============= МОБИЛЬНАЯ АДАПТАЦИЯ ============= */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .test-buttons {
        flex-direction: column;
    }
    
    .modal-dialog.modal-lg {
        width: 95%;
    }
    
    .user-dropdown-menu {
        right: -10px;
    }
}

/* Стили для индикации загрузки после теста */
.status-badge.status-loading {
    background: #f0f4f8;
    color: #4a5568;
}

.status-badge.status-loading i,
.test-btn.disabled-btn i {
    margin-right: 6px;
}

.test-btn.disabled-btn {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: wait !important;
    opacity: 0.8;
    pointer-events: none;
}

.temp-result-row {
    background: #fff8e7;
    animation: pulseRow 1s ease-in-out infinite;
}

@keyframes pulseRow {
    0% { background: #fff8e7; }
    50% { background: #ffefc0; }
    100% { background: #fff8e7; }
}

.temp-result-row .loading-row {
    color: #e67e22;
    font-style: normal;
}

.temp-result-row .loading-row i {
    margin-right: 8px;
}

/* /sdo/dashboard/dashboard.css - ДОПОЛНЕНИЕ */

.course-test-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.course-test-buttons .test-btn {
    padding: 8px 16px;
    white-space: nowrap;
}

.course-test-buttons .exam-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.course-test-buttons .training-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.course-test-buttons .training-btn:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

@media (max-width: 768px) {
    .course-test-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    
    .course-test-buttons .test-btn {
        width: 100%;
        text-align: center;
    }
}

/* /sdo/dashboard/dashboard.css - СТИЛИ ДЛЯ ФОРМЫ ПРОФИЛЯ */

/* Простая форма (надпись слева, поле справа) */
.form-row-simple {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.form-label {
    width: 140px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex-shrink: 0;
}

.form-field {
    flex: 1;
    position: relative;
}

.form-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-field input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Поле с паролем и кнопкой показа */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 40px;
}

.password-toggle-field {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.password-toggle-field:hover {
    color: var(--secondary-color);
}

.form-note {
    font-size: 12px;
    color: var(--text-light);
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .form-row-simple {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .form-label {
        width: auto;
    }
    
    .form-field {
        width: 100%;
    }
}






/* --------------------------------------------- */
/* 14. МОБИЛЬНАЯ АДАПТАЦИЯ (до 992px) */
/* --------------------------------------------- */
@media (max-width: 992px) {
    .desktop-app {
        width: 100%;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }
    
    body {
        overflow-y: auto;
        height: auto;
        background: var(--light-bg);
    }
    
    body::before {
        position: fixed;
    }
    
    /* ШАПКА МОБИЛЬНАЯ */
    .app-header {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        padding: 0 15px;
        z-index: 100;
    }
    
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 6px;
        padding: 10px;
        cursor: pointer;
    }
    
    .mobile-menu-btn span {
        width: 18px;
        height: 2px;
        background: white;
        border-radius: 2px;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .header-logo-img {
        width: 28px;
        height: 28px;
    }
    
    .header-title-mobile {
        font-size: 14px;
        font-weight: 600;
        color: white;
    }
    
    .header-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 99;
    }
    
    .header-nav.show {
        display: flex;
    }
    
    .header-nav a {
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    
    .header-nav a::after {
        display: none;
    }
    
    /* ЛЕВАЯ ПАНЕЛЬ МОБИЛЬНАЯ */
    .left-panel {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 15px;
        margin-top: var(--header-height);
        box-shadow: none;
        border-right: none;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    }
    
    .welcome-block {
        padding: 0 0 15px;
    }
    
    .user-info-block {
        padding: 10px 0;
    }
    
    .progress-block {
        padding: 15px 0;
    }
    
    .nav-block {
        padding: 15px 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .nav-btn {
        justify-content: center;
        text-align: center;
        padding: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-btn i {
        margin-right: 8px;
    }
    
    .info-block {
        padding: 15px 0;
        margin-top: 0;
    }
    
    /* ОСНОВНОЕ СОДЕРЖИМОЕ МОБИЛЬНОЕ */
    .main-content {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        padding: 15px;
        margin-top: 0;
    }
    
    .content-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .content-tab {
        display: inline-block;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .welcome-card {
        padding: 20px;
    }
    
    .welcome-card h2 {
        font-size: 18px;
    }
    
    /* Статистика мобильная */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stat-card i {
        font-size: 28px;
    }
    
    .stat-card-value {
        font-size: 20px;
    }
    
    .stat-card-label {
        font-size: 11px;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin: 20px 0 15px;
    }
    
    .section-title h3 {
        font-size: 16px;
    }
    
    /* Таблицы мобильные */
    .tests-table,
    .results-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    /* Курсы мобильные */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .course-card-body h4 {
        font-size: 15px;
    }
    
    /* Тесты мобильные */
    .tests-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .test-card-header {
        height: 70px;
    }
    
    .test-card-header i {
        font-size: 32px;
    }
    
    .test-card-body {
        padding: 16px;
    }
    
    .test-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Детали курса мобильные */
    .course-detail {
        padding: 16px;
    }
    
    .course-detail-header h3 {
        font-size: 18px;
    }
    
    .course-content-header {
        padding: 12px 16px;
    }
    
    .course-content-header h4 {
        font-size: 14px;
    }
    
    .course-content-body {
        padding: 16px;
    }
    
    .test-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .test-btn {
        width: 100%;
        text-align: center;
    }
    
    .test-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .content-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .item-info {
        flex: 1;
        min-width: 200px;
    }
    
    /* Модальные окна мобильные */
    .modal-dialog {
        width: 95vw;
        max-width: 95vw;
        margin: 0 auto;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .test-info p {
        font-size: 13px;
    }
    
    .test-info p strong {
        min-width: 120px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column-reverse;
    }
    
    .modal-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Уведомления мобильные */
    .app-message {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
        max-width: none;
    }
    
    .message-content {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* --------------------------------------------- */
/* 15. МОБИЛЬНАЯ АДАПТАЦИЯ (до 480px) */
/* --------------------------------------------- */
@media (max-width: 480px) {
    .left-panel {
        padding: 12px;
    }
    
    .nav-block {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
        align-items: center;
        padding: 12px;
    }
    
    .stat-card i {
        font-size: 24px;
    }
    
    .welcome-card {
        padding: 15px;
    }
    
    .welcome-card h2 {
        font-size: 16px;
    }
    
    .welcome-card p {
        font-size: 12px;
    }
    
    .test-card-header {
        height: 60px;
    }
    
    .test-card-header i {
        font-size: 28px;
    }
    
    .test-card-body {
        padding: 12px;
    }
    
    .test-card-body h4 {
        font-size: 14px;
    }
    
    .test-card-body p {
        font-size: 12px;
    }
    
    .test-meta {
        gap: 10px;
        font-size: 11px;
    }
    
    .course-card-body {
        padding: 12px;
    }
    
    .course-card-body h4 {
        font-size: 14px;
    }
    
    .course-meta {
        gap: 10px;
        font-size: 11px;
    }
    
    .content-tabs {
        gap: 6px;
    }
    
    .content-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .header-user {
        gap: 8px;
    }
    
    .user-name {
        font-size: 12px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .login-header-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .logout-btn {
        width: 32px;
        height: 32px;
    }
    
    .admin-link {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-header h3 {
        font-size: 14px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .test-info p {
        font-size: 12px;
    }
    
    .test-info p strong {
        min-width: 100px;
    }
    
    .test-rules li {
        font-size: 12px;
    }
    
    .course-testing h4 {
        font-size: 16px;
    }
    
    .test-info h5 {
        font-size: 14px;
    }

}