* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #f9fafb;
    color: #1f2937;
}

.container {
    width: 1100px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}

.header {
    background: #1f2d3d;
    padding: 16px 0;
    margin-bottom: 30px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo,
nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
}

.logo {
    font-size: 22px;
    font-weight: 600;
    margin-left: 0;
}

.card,
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: white;
    padding: 12px 24px;
    border: 1px solid #2563eb;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-sizing: border-box;
    font: inherit;
    background: #fff;
}

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.danger {
    background: #fee2e2;
    color: #991b1b;
}

.flash.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.muted,
.text-muted {
    color: #9ca3af;
}

body.admin-body {
    background: #f8fafc;
    color: #1e293b;
}

body.admin-body .admin-app-shell {
    width: 100%;
}

body.admin-body .admin-flashes {
    margin: 0 0 24px 0;
    width: 100%;
    position: static;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: #0b1f38;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    border-right: 1px solid #172a45;
    flex-shrink: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
}

.admin-logo {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 28px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-logo-box {
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.admin-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}

.admin-brand-info {
    display: flex;
    flex-direction: column;
}

.admin-brand-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.admin-brand-sub {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 500;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    margin-bottom: 5px;
    border-radius: 10px;
    color: #94a3b8;
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.18s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 22px;
    margin-right: 10px;
    font-size: 15px;
    color: #64748b;
    transition: color 0.18s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-item:hover i {
    color: #93c5fd;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0.08) 100%);
    color: #ffffff;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.nav-item.active i {
    color: #60a5fa;
}

.nav-item.active-soft {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 18px 8px;
}

.admin-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar-footer {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-top: 14px;
    font-size: 11.5px;
    color: #93c5fd;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    background: #f8fafc;
}

/* Верхняя полоса страницы админки */
.admin-page-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    background: transparent;
    padding: 0;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.admin-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.page-title h1 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.page-title p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-profile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 14px 6px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(15, 34, 58, 0.04);
    transition: all 0.18s ease;
}

.admin-profile-pill:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 34, 58, 0.08);
}

.admin-profile-pill .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-profile-info {
    display: flex;
    flex-direction: column;
}

.admin-profile-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.admin-profile-role {
    font-size: 11px;
    color: #64748b;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-logout:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 10px;
    color: #9ca3af;
}

.breadcrumb span {
    color: #374151;
    font-weight: 500;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-row input[type="radio"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.option-row input[type="text"] {
    flex: 1;
    margin: 0;
}

.option-row .remove-option {
    padding: 8px 12px;
    flex-shrink: 0;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.02em;
    margin: 0;
}

.page-title p {
    color: #6b7280;
    margin-top: 4px;
    font-weight: 400;
    font-size: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 8px 16px 8px 20px;
    border-radius: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #e5e7eb;
}

.user-profile > i {
    color: #9ca3af;
}

.user-profile span {
    font-weight: 500;
    color: #374151;
}

.avatar {
    background: #3b82f6;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.btn-logout {
    color: #9ca3af;
    text-decoration: none;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.toolbar-filters {
    justify-content: flex-start;
}

.filters-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.filters-inline select {
    width: auto;
    min-width: 220px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    text-decoration: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.table-container,
.form-panel,
.overview-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f1f3;
}

.table-container {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 18px 24px;
    background: #fafbfc;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

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

.course-title {
    font-weight: 600;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-sub {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    text-decoration: none;
}

.course-sub i {
    font-size: 12px;
    margin-right: 4px;
    color: #9ca3af;
}

.badge {
    background: #fef3c7;
    color: #b45309;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.badge i {
    font-size: 10px;
    color: #d97706;
}

.badge-active {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-active i {
    color: #0284c7;
}

.badge-archived {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-archived i {
    color: #6b7280;
}

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

.action-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn i {
    color: #6b7280;
    font-size: 13px;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.action-btn-danger {
    color: #b42318;
    border-color: #f3d0d0;
    background: #fff6f5;
}

.action-btn-danger i {
    color: #b42318;
}

.action-btn-danger:hover {
    background: #fdecec;
}

.stats {
    font-weight: 500;
    color: #1f2937;
}

.stats small {
    font-weight: 400;
    color: #9ca3af;
    margin-left: 4px;
}

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

.forms-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.overview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 4px 14px rgba(15, 34, 58, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.2s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 34, 58, 0.08);
}

.overview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.overview-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overview-card strong {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.overview-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.icon-green {
    background: #ecfdf5;
    color: #10b981;
}

.icon-amber {
    background: #fffbeb;
    color: #f59e0b;
}

.icon-purple {
    background: #f5f3ff;
    color: #8b5cf6;
}

.icon-cyan {
    background: #ecfeff;
    color: #06b6d4;
}

.icon-emerald {
    background: #f0fdf4;
    color: #16a34a;
}

/* Интерактивная сетка разделов админки */
.admin-sections-title {
    margin-bottom: 16px;
}

.admin-sections-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-sections-title h3 i {
    color: #2563eb;
}

.admin-sections-title p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.admin-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-section-tile {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 34, 58, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.admin-section-tile:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.09);
    transform: translateY(-3px);
}

.section-tile-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.section-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.section-tile-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-tile-head h4 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.section-tile-badge {
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.section-tile-desc {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.section-tile-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #2563eb;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    transition: gap 0.15s ease;
}

.admin-section-tile:hover .section-tile-footer {
    gap: 12px;
    color: #1d4ed8;
}

.form-panel {
    padding: 24px;
}

.form-panel-wide {
    max-width: 960px;
}

.form-panel h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #111827;
}

.form-panel form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-stack label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}

.form-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.checkbox-row-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-weight: 500;
}

.checkbox-row-modern input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.empty-table-state {
    padding: 10px 0;
    color: #6b7280;
}

.admin-footer-hint {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.9rem;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-footer-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================================================
   АВТОРИЗАЦИЯ И ТИТУЛЬНАЯ СТРАНИЦА (AUTH & LOGIN)
   ========================================================================== */

.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(37, 99, 235, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 85%, rgba(30, 64, 175, 0.08) 0%, transparent 45%),
        linear-gradient(135deg, #f0f4f9 0%, #f8fafc 50%, #edf2f7 100%);
    background-attachment: fixed;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding: 24px 0 44px;
}

.auth-card-wrap {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    max-width: 1040px;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 45px -12px rgba(15, 34, 58, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

/* Левая брендированная сторона */
.auth-brand-side {
    background: linear-gradient(145deg, #0b1f38 0%, #13335e 50%, #1e4b85 100%);
    color: #ffffff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e2e8f0;
    backdrop-filter: blur(4px);
    margin-bottom: 22px;
}

.auth-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.auth-brand-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.auth-logo-box {
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 52px;
    flex-shrink: 0;
}

.auth-logo-img {
    height: 36px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
    display: block;
}

.auth-logo-fallback {
    font-size: 26px;
    color: #1e3a8a;
}

.auth-brand-title-wrap {
    display: flex;
    flex-direction: column;
}

.auth-brand-org {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    line-height: 1.25;
}

.auth-brand-sub {
    font-size: 12.5px;
    color: #93c5fd;
    font-weight: 500;
}

.auth-heading {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.auth-desc {
    font-size: 13.5px;
    line-height: 1.65;
    color: #cbd5e1;
    margin: 0 0 24px 0;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 11px 14px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.auth-feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-feature-text strong {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
}

.auth-feature-text span {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

.auth-support-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #93c5fd;
    background: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(147, 197, 253, 0.2);
    padding: 10px 14px;
    border-radius: 10px;
    line-height: 1.45;
}

.auth-support-pill i {
    font-size: 14px;
    flex-shrink: 0;
}

/* Правая сторона (Форма) */
.auth-form-side {
    background: #ffffff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-form-header {
    margin-bottom: 24px;
}

.auth-form-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 14px;
}

.auth-form-header h2 {
    font-size: 23px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.auth-form-desc {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.auth-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-field-label i {
    color: #64748b;
    font-size: 13px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14.5px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-wrapper .auth-input {
    padding-right: 48px;
}

.auth-pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    font-size: 15px;
}

.auth-pwd-toggle:hover {
    color: #1e293b;
    background: transparent;
}

.auth-submit-btn {
    width: 100%;
    margin-top: 6px;
    padding: 13px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-form-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-secure-note {
    font-size: 12px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.auth-help-hint {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Навигационный логотип и бренд */
.nav-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-box {
    background: #ffffff;
    padding: 3px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}

.nav-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.nav-brand-badge {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 7px;
    border-radius: 4px;
    color: #bfdbfe;
    font-weight: 600;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-logo-box {
    background: #ffffff;
    padding: 3px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
}

.admin-logo-img {
    height: 20px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Обратная совместимость для устаревших селекторов */
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.auth-panel {
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 16px 40px rgba(22, 34, 52, 0.08);
}
.auth-panel-dark {
    background: linear-gradient(145deg, #16283b 0%, #1f4365 48%, #2f6feb 100%);
    color: #fff;
}
.auth-card {
    border: 1px solid rgba(210, 220, 236, 0.9);
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 18px 40px rgba(27, 44, 73, 0.08);
}

@media (max-width: 1200px) {
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .forms-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .main {
        padding: 24px 20px;
    }

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

    .admin-page-top,
    .toolbar,
    .admin-footer-hint {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .container {
        max-width: calc(100% - 24px);
    }

    .filters-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .filters-inline select {
        width: 100%;
        min-width: 0;
    }

    .action-buttons,
    .admin-footer-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-panel,
    .auth-card {
        padding: 24px;
    }
}

/* ==========================================================================
   СТУДЕНЧЕСКИЙ КАБИНЕТ (STUDENT DASHBOARD)
   ========================================================================== */

.dashboard-page {
    margin-bottom: 40px;
}

.dashboard-top {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    border-radius: 16px;
    padding: 28px 32px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.dashboard-welcome-text {
    flex: 1;
    min-width: 280px;
}

.dashboard-label {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.dashboard-welcome h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff;
    line-height: 1.3;
}

.dashboard-welcome p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
}

.dashboard-highlight {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 18px 24px;
    text-align: center;
    min-width: 150px;
}

.dashboard-highlight-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    margin-bottom: 4px;
}

.dashboard-highlight-value {
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.dashboard-highlight-subtitle {
    font-size: 13px;
    opacity: 0.85;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr 260px;
    gap: 24px;
    align-items: flex-start;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-profile-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px auto;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.dashboard-profile-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.dashboard-profile-card p {
    font-size: 12.5px;
    color: #64748b;
    font-family: monospace;
    margin: 0 0 12px 0;
    word-break: break-all;
}

.dashboard-role {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #dbeafe;
}

.dashboard-menu-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.dashboard-menu-item {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.dashboard-menu-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dashboard-menu-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.dashboard-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dashboard-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 4px;
}

.dashboard-stat-label {
    font-size: 12.5px;
    color: #64748b;
}

.dashboard-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.dashboard-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.dashboard-section-head h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.dashboard-section-head p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.dashboard-courses {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-course-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #fafcff;
    transition: all 0.2s ease;
}

.dashboard-course-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dashboard-course-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-course-top h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.dashboard-course-top p {
    font-size: 13.5px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-completed {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-progress {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-not-started {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.dashboard-progress-block {
    margin-bottom: 16px;
}

.dashboard-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 6px;
}

.dashboard-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.dashboard-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dashboard-course-actions {
    display: flex;
    justify-content: flex-end;
}

.dashboard-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.dashboard-info-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.dashboard-info-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

@media (max-width: 1100px) {
    .dashboard-layout {
        grid-template-columns: 220px 1fr;
    }
    .dashboard-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-right {
        grid-template-columns: 1fr;
    }
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Стили страницы курса (course_detail) */
.course-detail-page {
    max-width: 1040px;
    margin: 0 auto 50px;
}

.course-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 36px 32px;
    color: #ffffff;
    margin-bottom: 28px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
    position: relative;
    overflow: hidden;
}

.course-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #93c5fd;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: color 0.15s ease;
}

.course-nav-back:hover {
    color: #ffffff;
}

.course-hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.course-hero-desc {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 0 20px 0;
    white-space: pre-line;
    max-width: 800px;
}

.course-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.course-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #f1f5f9;
}

.course-stat-pill i {
    color: #60a5fa;
}

.course-enrollment-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.course-enrollment-info {
    flex: 1;
    min-width: 240px;
}

.course-enrollment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13.5px;
}

.course-enrollment-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #ffffff;
}

.status-tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

.status-tag-completed {
    background: #22c55e;
    color: #ffffff;
}

.status-tag-progress {
    background: #3b82f6;
    color: #ffffff;
}

.status-tag-not-started {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.course-hero-progress-bar {
    height: 9px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.course-hero-progress-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.module-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.module-block:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.module-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.module-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.module-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.module-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.module-body {
    padding: 24px;
}

.topic-desc-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.topic-desc-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.topic-desc-text {
    font-size: 13.5px;
    line-height: 1.7;
    color: #334155;
    white-space: pre-line;
}

.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.lesson-row:hover {
    border-color: #93c5fd;
    background: #f8fafc;
    transform: translateX(3px);
}

.lesson-row-completed {
    background: #fcfdfc;
    border-color: #bbf7d0;
}

.module-tests-block {
    background: #fdfdfd;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 18px;
}

/* ==========================================================================
   КОНСТРУКТОР КУРСА (COURSE BUILDER)
   ========================================================================== */

/* Главный баннер курса */
.course-summary-banner {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(15, 34, 58, 0.04);
    margin-bottom: 28px;
}

.summary-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.summary-title-block {
    flex: 1;
    min-width: 280px;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2563eb;
    background: #eff6ff;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.summary-course-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.summary-course-desc {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    max-width: 820px;
}

.summary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.summary-meta-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    color: #475569;
}

.meta-pill i {
    color: #2563eb;
    font-size: 13px;
}

.meta-pill strong {
    color: #0f172a;
    font-weight: 700;
}

/* Заголовок секции программы */
.builder-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.builder-section-head h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-section-head p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Карточка модуля */
.module-builder-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(15, 34, 58, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.module-builder-card:hover {
    border-color: #cbd5e1;
}

.module-builder-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.module-title-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.module-num-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.module-builder-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.module-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.module-builder-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Блок темы внутри модуля */
.topic-builder-block {
    background: #fcfdfd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.topic-builder-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.topic-builder-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-builder-title i {
    color: #2563eb;
    font-size: 13px;
}

.lessons-builder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.lesson-builder-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    transition: all 0.15s ease;
}

.lesson-builder-row:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.lesson-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lesson-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.lesson-title-text {
    font-size: 13.5px;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.4;
}

.lesson-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Блок модульного тестирования */
.module-tests-section {
    background: #fdfdfd;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px;
}

.tests-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-builder-card {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.test-builder-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-builder-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.test-builder-name {
    font-size: 14px;
    font-weight: 600;
    color: #14532d;
}

.test-builder-meta {
    font-size: 12px;
    color: #166534;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Кнопки добавления элементов */
.builder-add-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.btn-add-topic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-add-topic:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.btn-add-test {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-add-test:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.btn-icon-sm {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-icon-sm:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

