/* /attendance/css/my-progress.css */

/* Исправление прозрачного фона меню - добавляем fallback */
.header-buttons {
    background-color: var(--bg-primary, #ffffff) !important;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 8px;
    padding-bottom: 80px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    margin-bottom: 16px;
}

.app-header h1 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-color, #333);
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-color, #333);
    text-decoration: none;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

/* Секции */
.attendance-section,
.techniques-section {
    background: var(--bg-card, #fff);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-color, #333);
}

/* Навигация по месяцам */
.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-color, #333);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:active {
    background: var(--border-color, #e0e0e0);
}

.month-year {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color, #333);
}

/* Статистика посещаемости */
.attendance-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-secondary, #f5f5f5);
}

.stat-item.attended {
    background: rgba(76, 175, 80, 0.1);
}

.stat-item.missed {
    background: rgba(244, 67, 54, 0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-item.attended .stat-value {
    color: #4caf50;
}

.stat-item.missed .stat-value {
    color: #f44336;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    margin-top: 4px;
}

/* Календарь */
.calendar {
    background: var(--bg-secondary, #f9f9f9);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--primary-color, #1976d2);
    color: white;
}

.calendar-header div {
    padding: 6px 2px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 2px;
}

.calendar-day {
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2px 0;
    border-radius: 6px;
    font-size: 0.8rem;
    position: relative;
    background: white;
    min-width: 0;
    overflow: hidden;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.today {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px var(--primary-color, #1976d2);
}

.calendar-day .day-number {
    font-size: 0.75rem;
}

.calendar-day .day-events {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 100%;
}

.calendar-day .day-event-label {
    font-size: 0.5rem;
    font-weight: 600;
    line-height: 1.1;
    padding: 1px 2px;
    border-radius: 3px;
    color: white;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.calendar-day .day-event-label.attended {
    background: #4caf50;
}

.calendar-day .day-event-label.missed {
    background: #f44336;
}

.calendar-day .day-event-label.no-training {
    background: #9e9e9e;
}

/* Обратная совместимость для точек */
.calendar-day .day-event {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.calendar-day .day-event.attended {
    background: #4caf50;
}

.calendar-day .day-event.missed {
    background: #f44336;
}

.calendar-day .day-event.no-training {
    background: #9e9e9e;
}

/* Легенда */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.attended {
    background: #4caf50;
}

.legend-dot.missed {
    background: #f44336;
}

.legend-dot.no-training {
    background: #9e9e9e;
}

/* Сортировка техник */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.sort-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-color, #333);
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color, #1976d2);
}

/* Панель озвучки */
.speech-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.speech-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}

.speech-btn:active {
    transform: scale(0.9);
}

.speech-play-btn {
    background: #4caf50;
    color: white;
}

.speech-play-btn:hover {
    background: #43a047;
}

.speech-stop-btn {
    background: #f44336;
    color: white;
}

.speech-stop-btn:hover {
    background: #e53935;
}

.speech-btn svg {
    width: 18px;
    height: 18px;
}

.speech-pause-control {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
}

.speech-pause-select {
    padding: 4px 6px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    font-size: 0.8rem;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-color, #333);
}

.speech-status {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color, #1976d2);
    margin-left: auto;
    white-space: nowrap;
}

/* Подсветка озвучиваемой техники */
.technique-item.speaking {
    background: rgba(25, 118, 210, 0.12) !important;
    box-shadow: inset 3px 0 0 var(--primary-color, #1976d2);
    transition: background 0.3s;
}

/* Техники */
.techniques-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rank-block {
    background: var(--bg-secondary, #f9f9f9);
    border-radius: 8px;
    overflow: hidden;
}

.rank-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--primary-color, #1976d2);
    color: white;
}

.rank-header.target {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.rank-header.advanced {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.rank-name {
    font-weight: 600;
    font-size: 1rem;
}

.rank-badge {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.techniques-list {
    padding: 6px;
}

.technique-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 3px;
}

.technique-item:last-child {
    margin-bottom: 0;
}

/* Звезда/Песочные часы освоения */
.mastery-icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mastery-icon svg {
    width: 14px;
    height: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mastery-icon .star-bg {
    fill: #e0e0e0;
}

.mastery-icon .star-fill {
    fill: #ffc107;
}

.mastery-icon.empty .star-fill {
    display: none;
}

.mastery-icon.full .star-fill {
    clip-path: none !important;
}

.mastery-icon.stale {
    color: #ff9800;
}

.mastery-icon.stale svg {
    position: static;
    transform: none;
}

.mastery-icon.clickable {
    cursor: pointer;
    transition: transform 0.15s;
}

.mastery-icon.clickable:hover {
    transform: scale(1.2);
}

.mastery-icon.clickable:active {
    transform: scale(0.95);
}

/* Процент освоения */
.mastery-percent {
    width: 28px;
    min-width: 28px;
    font-size: 0.6rem;
    color: var(--text-secondary, #888);
    text-align: center;
}

.mastery-percent.stale {
    color: #ff9800;
}

.technique-name {
    flex: 1;
    min-width: 0;
    font-size: 0.72rem;
    color: var(--text-color, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Развёрнутое состояние - название на несколько строк */
.technique-item.expanded .technique-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.technique-item {
    cursor: pointer;
}

/* Цветовое выделение по типу положения */
.technique-item.position-tachi {
    border-left: 2px solid #2196f3;
    background: rgba(33, 150, 243, 0.03);
}

.technique-item.position-suwari {
    border-left: 2px solid #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.technique-item.position-hanmi {
    border-left: 2px solid #9c27b0;
    background: rgba(156, 39, 176, 0.03);
}

/* Выделение техник целевого ранга */
.target-technique .technique-name {
    font-weight: 600;
}

/* Правый блок с процентами, рангом и счётчиком */
.technique-right-block {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.technique-rank-badge {
    font-size: 0.55rem;
    color: var(--text-secondary, #888);
    background: var(--bg-secondary, #f0f0f0);
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Разделитель положений (Тачи/Сувари/Ханми-хандачи) */
.position-divider {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 5px 8px 3px;
    margin-top: 3px;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

.position-divider:first-child {
    border-top: none;
    margin-top: 0;
}

.technique-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    min-width: 26px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 0;
    border-radius: 8px;
    background: var(--bg-secondary, #f5f5f5);
}

.technique-count.zero {
    color: #9e9e9e;
}

.technique-count.low {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.technique-count.medium {
    color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

.technique-count.high {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary, #666);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #666);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Селектор пользователя */
.user-selector-section {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-selector-wrapper label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color, #333);
}

.user-search-container {
    position: relative;
}

.user-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-color, #333);
    box-sizing: border-box;
}

.user-search-input:focus {
    outline: none;
    border-color: var(--primary-color, #1976d2);
    background: white;
}

.user-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-search-results.show {
    display: block;
}

.user-search-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.user-search-item:last-child {
    border-bottom: none;
}

.user-search-item:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.user-search-item .user-name {
    font-size: 0.9rem;
    color: var(--text-color, #333);
}

.user-search-item .user-rank {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    background: var(--bg-secondary, #f0f0f0);
    padding: 2px 8px;
    border-radius: 10px;
}

.selected-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(25, 118, 210, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--primary-color, #1976d2);
}

.selected-user-info:empty {
    display: none;
}

.selected-user-info .reset-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--primary-color, #1976d2);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.selected-user-info .reset-btn:hover {
    background: rgba(25, 118, 210, 0.1);
}

/* Кликабельные дни с тренировками */
.calendar-day.has-training {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.calendar-day.has-training:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.calendar-day.has-training:active {
    transform: scale(0.98);
}

/* Модальное окно тренировки */
.training-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.training-modal.hidden {
    display: none;
}

.training-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.training-modal-content {
    position: relative;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.training-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--primary-color, #1976d2);
    color: white;
}

.training-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.training-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.training-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.training-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.training-info {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.training-time,
.training-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.training-info .info-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.training-info #trainingTime {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color, #333);
}

.training-info #trainingStatus {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Статусы посещения */
.status-attended {
    color: #4caf50;
}

.status-missed {
    color: #f44336;
}

.status-planned {
    color: #2196f3;
}

/* Техники в модальном окне */
.training-techniques h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #333);
}

.training-modal .techniques-list {
    padding: 0;
    background: var(--bg-secondary, #f9f9f9);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.training-modal .technique-item {
    padding: 10px 12px;
    margin: 0;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    border-radius: 0;
}

.training-modal .technique-item:last-child {
    border-bottom: none;
}

.training-modal .technique-item:first-child {
    border-radius: 8px 8px 0 0;
}

.training-modal .technique-item:last-child {
    border-radius: 0 0 8px 8px;
}

.training-modal .technique-item:only-child {
    border-radius: 8px;
}

.training-modal .technique-name {
    flex: 1;
}

.training-modal .empty-state {
    padding: 24px;
    background: var(--bg-secondary, #f9f9f9);
    border-radius: 8px;
}

.training-modal .empty-state.small {
    padding: 12px;
    font-size: 0.85rem;
}

/* Заголовок тренировки (когда несколько в день) */
.training-session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin: 0 -4px 8px -4px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.training-session-header.attended {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

.training-session-header.missed {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

.training-session-header .session-time {
    font-size: 1rem;
}

.training-session-header .session-status {
    font-size: 1.1rem;
}

/* Разделитель между тренировками */
.training-session-divider {
    height: 1px;
    background: var(--border-color, #e0e0e0);
    margin: 16px 0;
}

/* Заголовок индивидуальных техник */
.individual-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    margin: 12px 0 6px 0;
    padding-left: 4px;
}

/* Компактный разделитель позиций */
.position-divider.compact {
    font-size: 0.55rem;
    padding: 4px 8px;
    margin: 4px 0;
}

/* Кнопка добавления техники (только для admin) */
.add-technique-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color, #1976d2);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    transition: background 0.2s, transform 0.15s;
}

.add-technique-btn:hover {
    background: #1565c0;
    transform: scale(1.1);
}

.add-technique-btn:active {
    transform: scale(0.95);
}

/* Модальное окно добавления техники */
.add-technique-header {
    background: linear-gradient(135deg, #43a047, #2e7d32);
}

.add-technique-info {
    padding: 12px 16px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    margin-bottom: 16px;
}

.add-technique-info span {
    font-weight: 600;
    color: var(--text-color, #333);
}

.date-selector-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.date-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.attended-trainings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.training-date-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.training-date-item:hover {
    border-color: var(--primary-color, #1976d2);
    background: rgba(25, 118, 210, 0.05);
}

.training-date-item.selected {
    border-color: #43a047;
    background: rgba(67, 160, 71, 0.1);
}

.training-date-item .date-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.training-date-item .date-text {
    font-weight: 600;
    color: var(--text-color, #333);
}

.training-date-item .time-text {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
}

.training-date-item .add-btn {
    background: #43a047;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.training-date-item .add-btn:hover {
    background: #388e3c;
}

.training-date-item .add-btn:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
}

/* Индивидуальные техники в модальном окне тренировки */
.individual-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed var(--border-color, #e0e0e0);
}

.individual-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #7b1fa2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.individual-section .techniques-list {
    background: rgba(156, 39, 176, 0.05);
}

.individual-section .technique-item {
    border-left: 3px solid #9c27b0;
}

/* Модальное окно изменения mastery */
.mastery-header {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.mastery-modal-content {
    max-width: 340px;
}

.mastery-technique-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #333);
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    margin-bottom: 16px;
}

.mastery-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mastery-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
}

.mastery-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffc107;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mastery-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffc107;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mastery-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff9800;
    min-width: 50px;
    text-align: center;
}

.mastery-presets {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.preset-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    background: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.preset-btn:hover {
    background: var(--bg-secondary, #f5f5f5);
    border-color: #ffc107;
}

.preset-btn:active {
    background: #ffc107;
    color: white;
}

.save-mastery-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #ffc107;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.save-mastery-btn:hover {
    background: #ffca28;
}

.save-mastery-btn:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}

/* Адаптивность */
@media (max-width: 360px) {
    .calendar-day .day-number {
        font-size: 0.7rem;
    }

    .calendar-day .day-event-label {
        font-size: 0.45rem;
    }

    .calendar-day {
        min-height: 40px;
        padding: 1px 0;
    }

    .calendar-days {
        gap: 1px;
        padding: 1px;
    }

    .attendance-stats {
        gap: 8px;
    }

    .stat-item {
        padding: 8px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .training-modal-content {
        max-height: 85vh;
    }

    .training-modal-body {
        padding: 12px 16px;
    }

    .technique-name {
        font-size: 0.75rem;
    }

    .mastery-icon {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }

    .mastery-icon svg {
        width: 16px;
        height: 16px;
    }

    .mastery-percent {
        width: 28px;
        min-width: 28px;
        font-size: 0.6rem;
    }

    .technique-count {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .add-technique-btn {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 1rem;
    }
}

/* Индикатор оценки среза знаний */
.assessment-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.assessment-dot.rating-red {
    background: #f44336;
    box-shadow: 0 0 4px rgba(244, 67, 54, 0.4);
}

.assessment-dot.rating-orange {
    background: #ff9800;
    box-shadow: 0 0 4px rgba(255, 152, 0, 0.4);
}

.assessment-dot.rating-green {
    background: #4CAF50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
}
