/* Компоненты из макетов папки «диплом» */
.tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--pure-white);
    padding: 8px;
    border-radius: 60px;
    box-shadow: var(--shadow-sm);
}
.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--gray-text);
    font-family: inherit;
    transition: var(--transition);
}
.tab-btn.active {
    background: var(--dark-green);
    color: #fff;
}
.tab-btn:hover:not(.active) {
    background: var(--beige-medium);
}
.tab-content { display: none; }
.tab-content.active-content { display: block; }

.chart-container {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.tasks-table th,
.tasks-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--beige-dark);
}
.tasks-table th {
    color: var(--gray-text);
    font-weight: 600;
}
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--beige-light); }
.grade-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}
.grade-5 { background: #d4edda; color: #155724; }
.grade-4 { background: #fff3cd; color: #856404; }
.grade-3 { background: #f8d7da; color: #721c24; }

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-container {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--gray-text);
}

.schedule-section { margin-bottom: 24px; }
.schedule-item {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--beige-dark);
}
.chat-btn { margin-top: 16px; }

.library-layout {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.filters-panel {
    flex: 0 1 280px;
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.content-panel { flex: 1 1 400px; min-width: 280px; }
.filter-group { margin-bottom: 20px; }
.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-text);
    font-size: 0.9rem;
}
.theory-text { line-height: 1.7; margin: 16px 0; }
.theory-heading {
    margin: 18px 0 10px;
    color: var(--dark-green);
}
.theory-heading--lg { font-size: 1.25rem; }
.theory-heading--sm { font-size: 1rem; }
.theory-paragraph {
    margin: 0 0 12px;
    white-space: normal;
}
.theory-list {
    margin: 0 0 14px 1.2rem;
    padding: 0;
}
.theory-list li { margin-bottom: 6px; }
.theory-callout {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(61, 107, 79, 0.08);
    border-left: 4px solid var(--dark-green);
}
.theory-callout--important {
    background: rgba(212, 168, 71, 0.14);
    border-left-color: var(--accent-gold);
}
.theory-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.theory-media-card {
    background: var(--pure-white);
    border: 1px solid var(--border-soft, rgba(31, 71, 56, 0.1));
    border-radius: 20px;
    padding: 14px;
    box-shadow: var(--shadow-sm);
}
.theory-media-image {
    width: 100%;
    display: block;
    border-radius: 14px;
    object-fit: cover;
}
.example-item {
    background: var(--beige-light);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
}
.example-question { white-space: pre-wrap; }
.trainer-dot {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.85rem;
    background: var(--beige-light);
    color: inherit;
    border: 1px solid transparent;
}
.trainer-dot.is-current { border-color: var(--accent, #3d6b4f); font-weight: 700; }
.trainer-dot.is-ok { background: #d8edd4; }
.trainer-dot.is-bad { background: #f3d4d4; }
.ai-assistant {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--beige-dark);
}
.chat-messages {
    max-height: 200px;
    overflow-y: auto;
    background: var(--beige-light);
    border-radius: 20px;
    padding: 12px;
    margin-bottom: 12px;
}
.chat-message {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 16px;
    background: #fff;
    font-size: 0.9rem;
}
.chat-message.bot { background: var(--beige-medium); }
.ai-input-area { display: flex; gap: 10px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.welcome-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(145deg, #16362c 0%, var(--dark-green) 50%, var(--moss-green) 100%);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    color: #fff;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.welcome-banner h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2vw, 1.7rem);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.stats-badge {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 16px 24px;
    text-align: center;
}
.stats-badge .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--dark-green);
}
.subject-item { margin-bottom: 14px; }
.subject-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.progress-bar {
    height: 8px;
    background: var(--beige-medium);
    border-radius: 8px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 8px;
}
.lesson-item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--beige-dark);
}
.lesson-date {
    font-size: 0.85rem;
    color: var(--gray-text);
    min-width: 72px;
}
.lesson-title { font-weight: 600; }
.lesson-subject { font-size: 0.85rem; color: var(--gray-text); }
.lesson-status {
    margin-left: auto;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--beige-light);
}
.message-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--beige-dark);
}
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--beige-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
}
.message-time { font-size: 0.8rem; color: var(--gray-text); margin-top: 4px; }
.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-green);
    margin: 8px 0;
}
.btn-sm {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: var(--dark-green);
    color: #fff;
    text-decoration: none;
    display: inline-block;
}
.btn-outline-sm {
    background: transparent;
    border: 1.5px solid var(--dark-green);
    color: var(--dark-green);
}
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.assignment-card {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.assignment-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.assignment-subject {
    font-weight: 700;
    color: var(--dark-green);
    font-size: 1.1rem;
}
.assignment-status {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-submitted { background: #d4edda; color: #155724; }
.assignment-deadline { color: var(--gray-text); margin-bottom: 12px; font-size: 0.9rem; }
.assignment-task {
    background: var(--beige-light);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    line-height: 1.6;
}
.textarea-answer {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--beige-dark);
    border-radius: 16px;
    font-family: inherit;
    resize: vertical;
}
.submitted-info {
    background: var(--beige-light);
    border-radius: 16px;
    padding: 16px;
    color: var(--dark-green);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.quick-card-diploma {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.quick-card-diploma:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hero-landing {
    background: linear-gradient(145deg, var(--dark-green) 0%, #2d5a45 50%, var(--moss-green) 100%);
    color: #fff;
    padding: 80px 0 100px;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: -20px -32px 40px;
}
.hero-landing .hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero-landing .hero-description {
    max-width: 640px;
    margin: 0 auto 28px;
    opacity: 0.95;
    font-size: 1.05rem;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn-large { padding: 14px 32px; font-size: 1rem; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}
.feature-card {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--beige-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 16px;
}
.section-header { text-align: center; margin-bottom: 36px; }
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--dark-green);
    margin-bottom: 10px;
}
.section-subtitle { color: var(--gray-text); max-width: 600px; margin: 0 auto; }

.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark-green);
    color: #fff;
    padding: 14px 22px;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    z-index: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    pointer-events: none;
}
.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.topic-selector { margin-bottom: 16px; }
.topic-selector select { max-width: 320px; }
.recommendation-item {
    background: var(--beige-light);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
}

.list-item-diploma {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--beige-dark);
}

.mode-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--moss-green);
    color: #fff;
    padding: 0.85rem 1.6rem;
    border-radius: 60px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(16px);
    transition: var(--transition);
    z-index: 1100;
    pointer-events: none;
}
.mode-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.child-selector {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--pure-white);
    padding: 6px;
    border-radius: 40px;
    box-shadow: var(--shadow-sm);
}
.child-btn {
    padding: 8px 20px;
    border-radius: 32px;
    text-decoration: none;
    color: var(--gray-text);
    font-weight: 500;
}
.child-btn.active {
    background: var(--dark-green);
    color: #fff;
}

.payment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 900px) {
    .payment-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .tabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .tab-btn {
        flex: 0 0 auto;
        padding: 8px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .tasks-table,
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
.plan-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--beige-dark);
}

.chats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.chat-card {
    background: var(--beige-light);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
}
.chat-card i {
    font-size: 2rem;
    color: var(--moss-green);
    margin-bottom: 8px;
}

.preview-img-wrap {
    position: relative;
    display: inline-block;
}
.preview-img-wrap .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.list-plain {
    list-style: none;
    padding: 0;
}
.list-plain li {
    padding: 8px 0;
    border-bottom: 1px solid var(--beige-dark);
}
