.text-highlighted { color: #7c3aed; }
.btn-gradient {
    background: linear-gradient(135deg, #3b82f6 50%, #8b5cf6 50%);
    color: white;
    transition: background 0.3s;
    border: none;
}
.btn-gradient:hover {
    background: linear-gradient(135deg, #2563eb 50%, #7c3aed 50%);
}
.btn-outline-gradient {
    color: #3b82f6;
    border-color: #3b82f6;
    background: white;
}
.btn-outline-gradient:hover {
    color: white;
    background: linear-gradient(135deg, #3b82f6 50%, #8b5cf6 50%);
    border-color: transparent;
}

.avatar-profile-edit {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
}
.avatar-profile {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-card {
    background: #f9fafb;
    border-radius: 15px;
    padding: 1.5rem;
}
.sidebar-menu .sidebar-item { margin-bottom: 1rem; }
.sidebar-link {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    color: #6B7280;
    display: block;
}
.sidebar-link:hover, .sidebar-link.active { color: #6b7280; text-decoration: none; }
.badge { font-size: 0.9rem; padding: 0.25rem 0.5rem; }

.profile-card, .additional-info-card, .rating-card {
    border-radius: 15px;
    background: white;
    padding: 1.5rem;
}

.profile-name { font-size: 1.75rem; font-weight: bold; }
.section-title { font-size: 1.375rem; font-weight: 600; }

.info-text {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}
.profile-info li, .additional-info p, .rating-card p, .course-card p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}
.profile-info li:last-child, .additional-info p:last-child { margin-bottom: 0; }

.calendar-card {
    margin-top: 20px;
    border-radius: 15px;
    background: white;
    padding: 15px;
    overflow: visible;
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    overflow: visible;
}
.calendar-nav {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: #7c3aed;
    cursor: pointer;
    padding: 0.1rem;
    transition: color 0.3s;
}
.calendar-nav:hover { color: #7c3aed; }
.calendar-title-container {
    position: relative;
    z-index: 20;
    overflow: visible;
}
#calendar-month, #calendar-month-mobile {
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.1rem 0.5rem;
}
.month-select {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #3b82f6;
    border-radius: 0.25rem;
    padding: 0.25rem;
    font-size: 0.9rem;
    display: none;
    z-index: 30;
}
.month-select.active {
    display: block;
}
.month-select option {
    padding: 0.25rem;
}

#calendar-days, #calendar-days-mobile {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    max-width: 280px;
    margin: 0 auto;
}

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6b7280;
    border-radius: 8%;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s, color 0.3s;
    padding: 0;
    position: relative;
}
.calendar-day.today {
    background-color: #3b82f6;
    color: white;
    font-weight: bold;
}
.calendar-day.registered {
    background-color: #e0e7ff;
    color: #3b82f6;
    font-weight: bold;
}
.calendar-day.registered::after {
    content: '✓';
    font-size: 0.6rem;
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #3b82f6;
}
.calendar-day:hover {
    background-color: #f9fafb;
    color: #3b82f6;
    transform: scale(1.05);
}

.profile-course-card {
    border-radius: 15px;
    background: white;
    padding: 1.5rem;
}
.course-timeline { position: relative; }
.timeline-item { margin-bottom: 2.5rem; }
.timeline-dot {
    position: absolute;
    left: -10px;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    top: 5px;
}
.timeline-content {
    padding: 30px;
    border-radius: 10px;
    font-size: 1.125rem;
}
.timeline-content a:hover { color: #2563eb; }
.bg-light-purple { background-color: #f3e8ff; }
.badge-success { background-color: #10b981; }
.badge-info { background-color: #3b82f6; }

.calendar-day-header {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0;
    cursor: default;
    transition: none;
    padding: 0;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
    min-height: 35px;
}

.profile-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 20px auto;
    max-width: 900px;
    flex-wrap: wrap;
}

.profile-avatar {
    flex: 0 0 180px;
    text-align: center;
}
.profile-avatar img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
}

.profile-card {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
}
.profile-table th {
    text-align: left;
    padding: 8px;
    width: 35%;
    color: #444;
    font-weight: 600;
}
.profile-table td {
    padding: 8px;
    color: #333;
}

/* Mobile Drawer Styles */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 27px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 50%, #8b5cf6 50%);
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 2001;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    visibility: hidden;
}

.mobile-drawer.open {
    left: 0;
    visibility: visible;
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}


.mobile-drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #3b82f6 50%, #8b5cf6 50%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-drawer-header h5 {
    margin: 0;
    font-size: 1.25rem;
}

.mobile-drawer-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.mobile-drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-drawer-content {
    padding: 1rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .col-lg-3.mb-4:first-child {
        display: none;
    }

    .col-lg-3, .col-lg-6, .col-lg-9, .col-lg-12 {
        width: 100% !important;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    .row { margin: 0 -1rem; }

    .sidebar-card {
        padding: 1rem;
        min-height: auto;
        margin-bottom: 1rem;
        background: #f9fafb;
    }

    .sidebar-menu .sidebar-item { margin-bottom: 0.75rem; }
    .sidebar-link {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        display: block;
        width: 100%;
        text-align: left;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        transition: all 0.3s;
    }
    .sidebar-link:hover, .sidebar-link.active {
        color: #3b82f6;
        background-color: #f0f9ff;
        padding-left: 1.25rem;
    }
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .profile-card {
        padding: 1rem;
        text-align: center;
    }
    .profile-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem;
    }
    .avatar-profile {
        width: 120px;
        height: 120px;
        margin: 0 auto 0.5rem;
    }
    .profile-name {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    .info-text {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 0.75rem;
        padding: 0 0.5rem;
    }
    .profile-info li {
        list-style: none;
        padding: 0.25rem 0;
    }

    .additional-info-card, .rating-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .additional-info p, .rating-card p {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    .calendar-card {
        padding: 1rem 0.5rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    .calendar-header {
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }
    .calendar-nav { font-size: 1rem; }
    #calendar-month, #calendar-month-mobile { font-size: 1rem; }
    #calendar-days, #calendar-days-mobile {
        max-width: 100% !important;
        gap: 2px;
        margin: 0 auto;
    }
    .calendar-day {
        font-size: 0.85rem;
        min-height: 35px;
    }
    .calendar-day-header {
        font-size: 0.65rem;
        font-weight: bold;
        background: #f9fafb;
        border-bottom: 2px solid #e5e7eb;
    }
    .month-select {
        font-size: 1rem;
        width: 120px;
        left: 50%;
        transform: translateX(-50%);
    }

    .course-card h5 { font-size: 1.25rem; }
    .badge { font-size: 0.8rem; padding: 0.3rem 0.6rem; }

    .section-title { font-size: 1.25rem; margin-bottom: 1rem; }

    .profile-container {
        flex-direction: column;
        align-items: center;
    }
    .profile-avatar {
        margin-bottom: 15px;
    }
    .profile-card {
        width: 100%;
    }
}
body.menu-open .mobile-menu-toggle {
    z-index: 500;
}
.active-day {
    background-color: rgba(255, 0, 0, 0.2) !important;
    color: red !important;
    font-weight: bold;
}

.active-day::after {
    content: '🔥';
    font-size: 0.8rem;
    position: absolute;
    bottom: 2px;
    right: 2px;
    animation: flicker 1.5s infinite alternate;
}
@keyframes flicker {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.frozen-day {
    background-color: rgba(0, 0, 255, 0.2) !important;
    color: blue !important;
    font-weight: bold;
}

.frozen-day::after {
    content: '🧊';
    font-size: 0.8rem;
    position: absolute;
    bottom: 2px;
    right: 2px;
    animation: snow 2s infinite;
}
@keyframes snow {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(2px); opacity: 0.7; }
    100% { transform: translateY(0); opacity: 1; }
}
.calendar-day.registered:not(.active-day):not(.frozen-day)::after {
    content: '✓';
    font-size: 0.6rem;
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #3b82f6;
}
.btn-freeze {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: white !important;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 255, 0.1);
}

.btn-freeze:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(124, 58, 237, 0.9) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 255, 0.2);
    color: white !important;
}

.btn-freeze:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.3);
}

/* ===== Блок достижений ===== */
.achievements-card {
    border-radius: 15px;
    overflow: hidden;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.achievement-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.achievement-item.earned {
    background-color: #fff4c2;
    border: 2px solid #fdd835;
}

.achievement-item.locked {
    filter: grayscale(100%);
    opacity: 0.6;
    background-color: #e9ecef;
    cursor: default;
}

.achievement-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.achievement-title {
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    font-weight: 500;
    color: #333;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* ===== Модальное окно ===== */
.modal-content {
    border-radius: 15px;
    padding: 10px;
}

.modal-icon {
    font-size: 3rem;
}

/* ===== Адаптив ===== */
@media (max-width: 991px) {
    .achievements-card {
        margin-top: 1rem;
        max-height: none;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .achievement-item {
        padding: 8px;
    }

    .achievement-title {
        font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    }
}

.certificates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-plate {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    border-radius: 18px;
    padding: 16px 20px;
    color: white;
    font-weight: 500;
    min-height: 72px;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
    transition: all 0.25s ease;
    overflow: hidden;
}

.cert-plate:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.35);
}

.cert-icon {
    font-size: 28px;
    margin-right: 16px;
}

.cert-text {
    overflow: hidden;
}

.cert-number {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-type {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-status {
    margin-left: 16px;
    white-space: nowrap;
}

.status-downloaded {
    color: #6be1b6;
    font-weight: 600;
    font-size: 15px;
}

.btn-download {
    background: white;
    color: #8b5cf6;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #f8f9fa;
    color: #7c3aed;
}

@media (max-width: 480px) {
    .cert-plate {
        padding: 14px 16px;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }
    .cert-icon { font-size: 24px; }
    .cert-number { font-size: 14px; }
    .cert-type { font-size: 12px; }
    .btn-download { padding: 7px 16px; font-size: 13px; }
}


.rating-button {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: white !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 255, 0.1);
    border: none;
}

.rating-button:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(124, 58, 237, 0.9) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 255, 0.2);
    color: white !important;
}

.rating-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.3);
}


@media (max-width: 768px) {
    #rating {
        padding: 1rem !important;
        margin-top: 1rem !important;
    }

    #rating .section-title {
        font-size: 1.2rem;
    }

    #rating i.fas.fa-trophy,
    #rating i.fas.fa-star {
        font-size: 2.2rem;
    }

    #rating h2 {
        font-size: 1.5rem;
    }
    #rating p {
        font-size: 0.9rem;
    }

    .rating-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    #rating .row.g-4 {
        gap: 1rem;
    }
    #rating .col-12.col-md-6 {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    #rating .col-12.col-md-6 .ms-3 {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    #rating .section-title {
        font-size: 1rem;
    }
    #rating h2 {
        font-size: 1.2rem;
    }
    #rating i.fas.fa-trophy,
    #rating i.fas.fa-star {
        font-size: 2rem;
    }
    .rating-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}