/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #ff4d4d;
    --primary-light: #ff6b6b;
    --primary-dark: #cc0000;
    --primary-glow: rgba(255, 77, 77, 0.3);
    --gradient-primary: linear-gradient(135deg, #ff4d4d, #ff6b6b);
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 77, 77, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.35);
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 50px rgba(255, 77, 77, 0.1);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --day-today: #ff4d4d;
    --day-completed: #28a745;
    --day-future: #2a2a3e;
    --day-past: #1a1a2a;
    --day-empty: transparent;
    --color-video: #ff4d4d;
    --color-file: #17a2b8;
    --color-case: #34D399;
    --color-quiz: #ffc107;
    --color-rest: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #07080a;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== BACKGROUND ===== */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 77, 77, 0.06), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 77, 77, 0.04), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 77, 77, 0.02), transparent 60%);
    animation: rotateBg 60s linear infinite;
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 77, 77, 0.15);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1;
    pointer-events: none;
}

.main-content {
    position: relative;
    z-index: 2;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ===== NAVBAR ===== */
.navbar-modern {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 77, 77, 0.1);
    transition: var(--transition);
}

.navbar-modern.scrolled {
    background: rgba(0, 0, 0, 0.98);
    padding: 0.4rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand-modern {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-glow {
    height: 38px;
    filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.3));
}

.navbar-brand-modern .brand-highlight {
    color: var(--primary);
}

.nav-link-modern {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500;
    padding: 0.4rem 1rem !important;
    border-radius: 50px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.nav-link-modern:focus-visible,
.nav-link-modern.active {
    color: #fff !important;
    background: rgba(255, 77, 77, 0.1);
}

.btn-user-modern {
    background: var(--gradient-primary);
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-user-modern:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 77, 77, 0.3);
}

.dropdown-modern {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 77, 77, 0.15);
    border-radius: 14px;
    padding: 0.3rem;
}

.dropdown-item-modern {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.dropdown-item-modern:focus-visible {
    background: rgba(255, 77, 77, 0.1);
    color: var(--primary);
}

/* ===== DASHBOARD CONTAINER ===== */
.dashboard-container {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== HERO HEADER ===== */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.12), rgba(255, 77, 77, 0.03));
    border-radius: var(--radius-xl);
    padding: 2.5rem 3rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 77, 77, 0.12);
    position: relative;
    overflow: hidden;
}

.dashboard-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.dashboard-hero h1 .hero-icon {
    display: inline-block;
    background: var(--gradient-primary);
    padding: 10px 12px;
    border-radius: 16px;
    margin-right: 14px;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(255, 77, 77, 0.2);
}

.dashboard-hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.3rem;
    position: relative;
    padding-left: 52px;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    position: relative;
    padding-left: 52px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
}

.hero-stat i {
    color: var(--primary);
    font-size: 0.9rem;
}

.hero-stat .stat-value {
    color: #fff;
    font-weight: 700;
    margin-left: 0.2rem;
}

.hero-stat .stat-label {
    color: var(--text-muted);
}

/* ===== COURSE TABS ===== */
.course-tabs-wrapper {
    margin-bottom: 2rem;
}

.course-tabs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.3rem 0.2rem 1rem;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.course-tabs::-webkit-scrollbar {
    height: 3px;
}

.course-tabs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.course-tab {
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.course-tab .tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition);
}

.course-tab:focus-visible {
    background: rgba(255, 77, 77, 0.06);
    border-color: rgba(255, 77, 77, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.course-tab.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 25px rgba(255, 77, 77, 0.25);
}

.course-tab.active .tab-dot {
    background: #fff;
}

.course-tab .badge-progress {
    background: rgba(255, 255, 255, 0.12);
    padding: 0.05rem 0.6rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
}

/* ===== MONTHLY CALENDAR SECTION ===== */
.monthly-calendar {
    margin-top: 1.5rem;
}

/* ===== GRADIENT BACKGROUND FOR MONTH SECTION ===== */
.month-section {
    background: linear-gradient(145deg, rgba(255, 77, 77, 0.08), rgba(20, 20, 40, 0.4));
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 77, 77, 0.15);
    transition: var(--transition);
}

.month-section:focus-visible {
    border-color: rgba(255, 77, 77, 0.3);
}

.month-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.month-header .month-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.month-header .month-year {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.month-header .month-stats {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.8rem;
}

.month-header .month-stats .done {
    color: #28a745;
}

.month-header .month-stats .total {
    color: var(--text-muted);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.month-day-header {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    padding: 0.3rem 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== DAY CARD ===== */
.calendar-day {
    border-radius: 14px;
    padding: 0.6rem 0.3rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    background: linear-gradient(145deg, #1a1a2e, #0d0d1a);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== GRADIENT BACKGROUND FOR DAY TYPES ===== */
.calendar-day.today {
    background: linear-gradient(145deg, #3d0a0a, #1a0505);
    border-color: #ff4d4d;
    box-shadow: 0 0 30px rgba(255, 77, 77, 0.2), inset 0 0 30px rgba(255, 77, 77, 0.05);
}

.calendar-day.today .day-number {
    color: #ff4d4d;
    text-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

.calendar-day.today .day-lesson-badge {
    background: rgba(255, 77, 77, 0.3);
    color: #ff6b6b;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.calendar-day.completed {
    background: linear-gradient(145deg, #0d2a0d, #051005);
    border-color: rgba(40, 167, 69, 0.4);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.08);
}

.calendar-day.completed .day-number {
    color: #28a745;
}

.calendar-day.completed .day-lesson-badge {
    background: rgba(40, 167, 69, 0.2);
    color: #34D399;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.calendar-day.future {
    background: linear-gradient(145deg, #0d0d2a, #050510);
    border-color: rgba(23, 162, 184, 0.15);
}

.calendar-day.future .day-number {
    color: rgba(255, 255, 255, 0.4);
}

.calendar-day.future .day-lesson-badge {
    background: rgba(23, 162, 184, 0.1);
    color: rgba(23, 162, 184, 0.5);
    border: 1px solid rgba(23, 162, 184, 0.1);
}

.calendar-day.past {
    background: linear-gradient(145deg, #14141a, #08080a);
    border-color: rgba(255, 255, 255, 0.04);
}

.calendar-day.past .day-number {
    color: rgba(255, 255, 255, 0.2);
}

.calendar-day.past .day-lesson-badge {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.calendar-day.rest {
    background: linear-gradient(145deg, #1a0d2a, #0d0515);
    border-color: rgba(108, 117, 125, 0.15);
}

.calendar-day.rest .day-number {
    color: rgba(108, 117, 125, 0.5);
}

.calendar-day.rest .day-lesson-badge {
    background: rgba(108, 117, 125, 0.1);
    color: rgba(108, 117, 125, 0.4);
    border: 1px solid rgba(108, 117, 125, 0.1);
}

.calendar-day.has-quiz {
    border-color: rgba(255, 193, 7, 0.2);
}

.calendar-day.has-quiz .day-number {
    color: #ffc107;
}

.calendar-day .day-icon {
    font-size: 0.8rem;
    margin-right: 0.2rem;
}

.calendar-day:focus-visible:not(.empty) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.calendar-day.empty {
    background: transparent;
    border: 1px solid transparent;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
    min-height: 60px;
}

.calendar-day .day-number {
    font-size: 1.1rem;
    font-weight: 800;
    display: block;
    line-height: 1.2;
    transition: var(--transition);
}

.calendar-day .day-lesson-badge {
    font-size: 0.5rem;
    padding: 0.05rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
    margin-top: 2px;
    font-weight: 700;
    transition: var(--transition);
    font-family: monospace;
}

.calendar-day .day-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    font-size: 0.4rem;
    padding: 0.05rem 0.3rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.calendar-day .day-badge.today-badge {
    background: rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
    font-weight: 700;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

.calendar-day .day-badge.completed-badge {
    background: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.calendar-day .day-content {
    margin-top: 3px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    align-items: center;
}

.calendar-day .day-content .item {
    font-size: 0.45rem;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    max-width: 100%;
}

.day-stats-badges {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.day-stat-badge {
    font-size: 0.4rem;
    padding: 0.03rem 0.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.day-stat-badge .stat-icon {
    font-size: 0.35rem;
}

.day-stat-badge .stat-count {
    font-size: 0.4rem;
    font-weight: 700;
}

.day-stat-badge.video {
    border-color: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
}

.day-stat-badge.case {
    border-color: rgba(52, 211, 153, 0.15);
    color: #34D399;
}

.day-stat-badge.file {
    border-color: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.day-stat-badge.quiz {
    border-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

/* ===== ITEMS COUNTER BADGE ===== */
.items-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 77, 77, 0.18);
    border: 1px solid rgba(255, 77, 77, 0.25);
    padding: 0.12rem 0.7rem;
    border-radius: 20px;
    font-size: 0.55rem;
    font-weight: 600;
    color: #ff4d4d;
    margin-top: 3px;
    transition: var(--transition);
    cursor: help;
    position: relative;
    justify-content: center;
    width: auto;
    min-width: 70px;
    flex-wrap: wrap;
}

.items-counter-badge:focus-visible {
    background: rgba(255, 77, 77, 0.3);
    border-color: rgba(255, 77, 77, 0.5);
    transform: scale(1.05);
}

.items-counter-badge .counter-icon {
    font-size: 0.5rem;
    color: #ffc107;
}

.items-counter-badge .counter-number {
    color: #fff;
    background: rgba(255, 77, 77, 0.4);
    padding: 0.03rem 0.35rem;
    border-radius: 10px;
    font-size: 0.5rem;
}

.items-counter-badge .counter-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.5rem;
    font-weight: 500;
}

.items-counter-badge .items-desc {
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.items-counter-badge .separator {
    font-size: 0.4rem;
    color: rgba(255, 255, 255, 0.3);
}

.items-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    font-size: 0.55rem;
    color: var(--text-secondary);
    z-index: 50;
    min-width: 190px;
    text-align: left;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.items-tooltip .tooltip-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.55rem;
    margin-bottom: 0.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.2rem;
}

.items-tooltip .tooltip-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.1rem 0;
    font-size: 0.5rem;
}

.items-tooltip .tooltip-item .tt-icon {
    font-size: 0.45rem;
}

.items-tooltip .tooltip-item .tt-type.video {
    color: #ff4d4d;
}

.items-tooltip .tooltip-item .tt-type.file {
    color: #17a2b8;
}

.items-tooltip .tooltip-item .tt-type.case {
    color: #34D399;
}

.items-tooltip .tooltip-item .tt-type.quiz {
    color: #ffc107;
}

.items-counter-badge:focus-visible .items-tooltip {
    display: block;
}

.items-legend {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.2rem 0;
    margin-top: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: center;
}

.items-legend .legend-dot {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.45rem;
    color: var(--text-muted);
}

.items-legend .legend-dot .dot-icon.video {
    color: #ff4d4d;
}

.items-legend .legend-dot .dot-icon.file {
    color: #17a2b8;
}

.items-legend .legend-dot .dot-icon.case {
    color: #34D399;
}

.items-legend .legend-dot .dot-icon.quiz {
    color: #ffc107;
}

.items-legend .legend-dot .dot-icon.rest {
    color: #6c757d;
}

.calendar-day .check-mark {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 0.55rem;
    color: #28a745;
}

/* ===== COURSE STATS CARD ===== */
.course-stats-card {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.08), rgba(255, 77, 77, 0.02));
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0 2rem;
    border: 1px solid rgba(255, 77, 77, 0.08);
    transition: var(--transition);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.course-stats-card:focus-visible {
    border-color: rgba(255, 77, 77, 0.2);
}

.course-stat-item {
    text-align: center;
    padding: 0.7rem 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.course-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-stat-item:focus-visible::before {
    opacity: 1;
}

.course-stat-item:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(255, 77, 77, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.course-stat-item .stat-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.course-stat-item .stat-icon-wrapper.lessons {
    background: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
}

.course-stat-item:focus-visible .stat-icon-wrapper.lessons {
    background: #ff4d4d;
    color: #fff;
    transform: scale(1.1);
}

.course-stat-item .stat-icon-wrapper.videos {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.course-stat-item:focus-visible .stat-icon-wrapper.videos {
    background: #17a2b8;
    color: #fff;
    transform: scale(1.1);
}

.course-stat-item .stat-icon-wrapper.cases {
    background: rgba(52, 211, 153, 0.15);
    color: #34D399;
}

.course-stat-item:focus-visible .stat-icon-wrapper.cases {
    background: #34D399;
    color: #fff;
    transform: scale(1.1);
}

.course-stat-item .stat-icon-wrapper.files {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.course-stat-item:focus-visible .stat-icon-wrapper.files {
    background: #ffc107;
    color: #000;
    transform: scale(1.1);
}

.course-stat-item .stat-icon-wrapper.quizzes {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.course-stat-item:focus-visible .stat-icon-wrapper.quizzes {
    background: #ffc107;
    color: #000;
    transform: scale(1.1);
}

.course-stat-item .stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.course-stat-item .stat-number .completed-count {
    color: #28a745;
}

.course-stat-item .stat-number .total-count {
    color: var(--text-muted);
    font-weight: 600;
}

.course-stat-item .stat-number .divider-slash {
    color: var(--text-muted);
    font-weight: 300;
    margin: 0 0.1rem;
}

.course-stat-item .stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.1rem;
}

.course-stat-item .stat-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.course-stat-item .stat-progress-bar .stat-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.course-stat-item .stat-progress-bar .stat-progress-fill.lessons-fill {
    background: #ff4d4d;
}

.course-stat-item .stat-progress-bar .stat-progress-fill.videos-fill {
    background: #17a2b8;
}

.course-stat-item .stat-progress-bar .stat-progress-fill.cases-fill {
    background: #34D399;
}

.course-stat-item .stat-progress-bar .stat-progress-fill.files-fill {
    background: #ffc107;
}

.course-stat-item .stat-progress-bar .stat-progress-fill.quizzes-fill {
    background: #ffc107;
}

/* ===== PROGRESS SECTION ===== */
.progress-glass {
    background: linear-gradient(145deg, rgba(255, 77, 77, 0.06), rgba(10, 10, 20, 0.3));
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 77, 77, 0.06);
    transition: var(--transition);
}

.progress-glass:focus-visible {
    border-color: rgba(255, 77, 77, 0.15);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.progress-header .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-header .percentage {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.progress-stat {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 0.7rem 0.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.progress-stat .number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.progress-stat .label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.1rem;
}

/* ===== PLAN HEADER ===== */
.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.plan-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.plan-title i {
    color: var(--primary);
}

.plan-title .course-badge {
    background: rgba(255, 77, 77, 0.12);
    padding: 0.1rem 0.8rem;
    border-radius: 50px;
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 600;
}

/* ===== DURATION SELECTOR ===== */
.plan-duration-selector {
    display: flex;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
    justify-content: center;
}

.duration-btn {
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
}

.duration-btn:focus-visible {
    color: #fff;
}

.duration-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 15px rgba(255, 77, 77, 0.2);
}

.duration-btn .recommended-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    font-size: 0.45rem;
    font-weight: 700;
    padding: 0.05rem 0.3rem;
    border-radius: 10px;
    border: 1px solid #000;
    white-space: nowrap;
}

/* ===== DAY DETAILS MODAL ===== */
.day-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(24px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modalFadeIn 0.35s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(24px);
    }
}

.day-detail-modal.active {
    display: flex;
}

.day-detail-modal .modal-content {
    background: linear-gradient(145deg, #14141e, #0d0d14);
    border-radius: var(--radius-xl);
    max-width: 780px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0;
    border: 1px solid rgba(255, 77, 77, 0.15);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.day-detail-modal .modal-content::-webkit-scrollbar {
    width: 4px;
}

.day-detail-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.day-detail-modal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.day-detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 77, 77, 0.03);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.day-detail-modal .modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0;
}

.day-detail-modal .modal-header h3 .day-number-badge {
    background: var(--gradient-primary);
    padding: 0.2rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.25);
}

.day-detail-modal .modal-header h3 .lesson-number-badge {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    padding: 0.2rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 193, 7, 0.15);
}

.day-detail-modal .modal-header h3 .date-badge {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
    padding: 0.2rem 0.9rem;
    border-radius: 50px;
    font-size: 0.7rem;
    border: 1px solid rgba(23, 162, 184, 0.15);
}

.day-detail-modal .modal-header h3 .status-badge-modal {
    padding: 0.15rem 0.8rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
}

.day-detail-modal .modal-header h3 .status-badge-modal.completed {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.15);
}

.day-detail-modal .modal-header h3 .status-badge-modal.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.15);
}

.day-detail-modal .modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.day-detail-modal .modal-close:focus-visible {
    background: rgba(255, 77, 77, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

.day-detail-modal .modal-body {
    padding: 1.5rem 1.8rem 1.8rem;
}

.day-detail-modal .modal-body .summary-card {
    background: rgba(255, 77, 77, 0.04);
    border-radius: var(--radius);
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 77, 77, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-detail-modal .modal-body .summary-card .summary-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.day-detail-modal .modal-body .summary-card .summary-left .summary-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.day-detail-modal .modal-body .summary-card .summary-left .summary-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
}

.day-detail-modal .modal-body .summary-card .summary-left .summary-badge.quiz-day {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.1);
}

.day-detail-modal .modal-body .summary-card .summary-left .summary-badge.items-count {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.day-detail-modal .modal-body .summary-card .summary-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-detail-modal .modal-body .summary-card .summary-right .summary-status {
    font-size: 0.7rem;
    font-weight: 600;
}

.day-detail-modal .modal-body .summary-card .summary-right .summary-status.completed-text {
    color: #28a745;
}

.day-detail-modal .modal-body .summary-card .summary-right .summary-status.pending-text {
    color: #ffc107;
}

/* ===== DETAIL ITEMS ===== */
.detail-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
    padding: 0.9rem 1.2rem;
    margin-bottom: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-item:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.detail-item:focus-visible::before {
    opacity: 1;
}

.detail-item .item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.detail-item:focus-visible .item-icon {
    transform: scale(1.05);
}

.detail-item .item-icon.video {
    background: rgba(255, 77, 77, 0.12);
    color: #ff4d4d;
}

.detail-item:focus-visible .item-icon.video {
    background: #ff4d4d;
    color: #fff;
}

.detail-item .item-icon.subvideo {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.detail-item:focus-visible .item-icon.subvideo {
    background: #ff4d4d;
    color: #fff;
}

.detail-item .item-icon.case {
    background: rgba(52, 211, 153, 0.12);
    color: #34D399;
}

.detail-item:focus-visible .item-icon.case {
    background: #34D399;
    color: #fff;
}

.detail-item .item-icon.file {
    background: rgba(23, 162, 184, 0.12);
    color: #17a2b8;
}

.detail-item:focus-visible .item-icon.file {
    background: #17a2b8;
    color: #fff;
}

.detail-item .item-icon.quiz {
    background: rgba(255, 193, 7, 0.12);
    color: #ffc107;
}

.detail-item:focus-visible .item-icon.quiz {
    background: #ffc107;
    color: #000;
}

.detail-item .item-icon.rest {
    background: rgba(108, 117, 125, 0.12);
    color: #6c757d;
}

.detail-item:focus-visible .item-icon.rest {
    background: #6c757d;
    color: #fff;
}

.detail-item .item-icon.external {
    background: rgba(23, 162, 184, 0.12);
    color: #17a2b8;
}

.detail-item:focus-visible .item-icon.external {
    background: #17a2b8;
    color: #fff;
}

.detail-item .item-info {
    flex: 1;
    min-width: 0;
}

.detail-item .item-type-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.detail-item .item-type-label.video {
    color: #ff4d4d;
}

.detail-item .item-type-label.subvideo {
    color: #ff4d4d;
}

.detail-item .item-type-label.case {
    color: #34D399;
}

.detail-item .item-type-label.file {
    color: #17a2b8;
}

.detail-item .item-type-label.quiz {
    color: #ffc107;
}

.detail-item .item-type-label.rest {
    color: #6c757d;
}

.detail-item .item-type-label.external {
    color: #17a2b8;
}

.detail-item .item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.1rem 0 0.05rem;
    color: #fff;
}

.detail-item .item-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.detail-item .item-meta .meta-tag {
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.55rem;
    font-weight: 600;
}

.detail-item .item-meta .meta-tag.approved {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.detail-item .item-meta .meta-tag.pending {
    background: rgba(255, 193, 7, 0.12);
    color: #ffc107;
}

.detail-item .item-actions {
    margin-top: 0.3rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.detail-item .item-actions .btn-action-item {
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}

.detail-item .item-actions .btn-action-item.primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 77, 77, 0.15);
}

.detail-item .item-actions .btn-action-item.primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 77, 77, 0.25);
}

.detail-item .item-actions .btn-action-item.success {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.1);
}

.detail-item .item-actions .btn-action-item.success:focus-visible {
    background: #28a745;
    color: #fff;
    transform: translateY(-2px);
}

.detail-item .item-actions .btn-action-item.success.done {
    opacity: 0.5;
    cursor: default;
    transform: none !important;
}

.detail-item .item-actions .btn-action-item.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
}

.detail-item .item-actions .btn-action-item.outline:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.detail-item .item-actions .btn-action-item.info {
    background: rgba(23, 162, 184, 0.12);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.1);
}

.detail-item .item-actions .btn-action-item.info:focus-visible {
    background: #17a2b8;
    color: #fff;
    transform: translateY(-2px);
}

.detail-item .item-actions .btn-action-item.warning {
    background: rgba(255, 193, 7, 0.12);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.1);
}

.detail-item .item-actions .btn-action-item.warning:focus-visible {
    background: #ffc107;
    color: #000;
    transform: translateY(-2px);
}

.detail-item .item-actions .btn-action-item.danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.detail-item .item-actions .btn-action-item.danger:focus-visible {
    background: #dc3545;
    color: #fff;
    transform: translateY(-2px);
}

.detail-item .item-actions .btn-action-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.detail-item .item-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(40, 167, 69, 0.1);
}

.detail-item .item-uploaded-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(23, 162, 184, 0.1);
}

.detail-item .quiz-answer {
    display: none;
    margin-top: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 193, 7, 0.06);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #ffc107;
    border-left: 2px solid #ffc107;
}

.detail-item .quiz-answer.show {
    display: block;
}

.detail-item .upload-progress {
    margin-top: 0.3rem;
    font-size: 0.6rem;
    color: #28a745;
    padding: 0.2rem 0.5rem;
    background: rgba(40, 167, 69, 0.06);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================================
   UPLOADS SECTION - محسّن بالكامل
   ============================================================ */
.uploads-tab {
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.15));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.uploads-tab-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.uploads-tab-title i {
    color: #ffc107;
}

.uploads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.upload-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
    flex-wrap: wrap;
}

.upload-item:focus-visible {
    border-color: rgba(255, 77, 77, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.upload-item .upload-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.upload-item .upload-icon.case {
    background: rgba(52, 211, 153, 0.15);
    color: #34D399;
}

.upload-item .upload-icon.file {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.upload-item .upload-info {
    flex: 1;
    min-width: 0;
}

.upload-item .upload-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item .upload-meta {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
    margin-top: 0.1rem;
}

.upload-item .upload-meta .lesson-badge {
    background: rgba(255, 77, 77, 0.1);
    color: var(--primary);
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.5rem;
    font-weight: 600;
}

.upload-item .upload-delete {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.upload-item .upload-delete:focus-visible {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* ============================================================
   UPLOAD BUTTON STYLES (محسّن)
   ============================================================ */
.btn-upload-detail {
    position: relative;
    overflow: hidden;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(23, 162, 184, 0.12);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.15);
}

.btn-upload-detail:focus-visible {
    background: #17a2b8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-upload-detail:active {
    transform: scale(0.95);
}

/* Link-only upload buttons - no hidden file input overlay needed */
.btn-upload-detail .upload-icon-btn {
    font-size: 0.55rem;
}

/* ===== LEGEND ===== */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-color.today-color {
    background: linear-gradient(145deg, #3d0a0a, #1a0505);
    border-color: #ff4d4d;
}

.legend-color.completed-color {
    background: linear-gradient(145deg, #0d2a0d, #051005);
    border-color: rgba(40, 167, 69, 0.3);
}

.legend-color.future-color {
    background: linear-gradient(145deg, #0d0d2a, #050510);
    border-color: rgba(23, 162, 184, 0.1);
}

.legend-color.past-color {
    background: linear-gradient(145deg, #14141a, #08080a);
    border-color: rgba(255, 255, 255, 0.02);
}

.legend-color.rest-color {
    background: linear-gradient(145deg, #1a0d2a, #0d0515);
    border-color: rgba(108, 117, 125, 0.1);
}

/* ============================================================
   RESPONSIVE - TABLETS & MOBILE (محسّن بالكامل)
   ============================================================ */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 0.5rem;
    }

    .dashboard-hero {
        padding: 1rem 0.8rem;
        border-radius: var(--radius-lg);
        background: linear-gradient(145deg, rgba(255, 77, 77, 0.15), rgba(255, 77, 77, 0.02));
    }

    .dashboard-hero h1 {
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .dashboard-hero h1 .hero-icon {
        font-size: 1rem;
        padding: 6px 8px;
        border-radius: 10px;
    }

    .dashboard-hero p {
        padding-left: 0;
        font-size: 0.8rem;
        margin-top: 0.2rem;
    }

    .hero-stats {
        padding-left: 0;
        gap: 0.4rem;
        margin-top: 0.6rem;
    }

    .hero-stat {
        font-size: 0.65rem;
        padding: 0.15rem 0.6rem;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hero-stat .stat-value {
        font-weight: 800;
    }

    /* ===== TABS ===== */
    .course-tabs-wrapper {
        margin: 0 -0.5rem 0.8rem;
        padding: 0 0.5rem;
    }

    .course-tabs {
        gap: 0.3rem;
        padding: 0.2rem 0 0.4rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .course-tabs::-webkit-scrollbar {
        display: none;
    }

    .course-tab {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
        white-space: nowrap;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .course-tab .badge-progress {
        font-size: 0.45rem;
        padding: 0.05rem 0.3rem;
    }

    /* ===== STATS CARD (Grid) ===== */
    .course-stats-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
        padding: 0.6rem;
        background: linear-gradient(145deg, rgba(255, 77, 77, 0.08), rgba(255, 77, 77, 0.02));
        border-radius: var(--radius);
        border: 1px solid rgba(255, 77, 77, 0.08);
        margin: 0.6rem 0 1rem;
    }

    .course-stat-item {
        padding: 0.4rem 0.2rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .course-stat-item .stat-icon-wrapper {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
    }

    .course-stat-item .stat-number {
        font-size: 1rem;
        font-weight: 700;
    }

    .course-stat-item .stat-label {
        font-size: 0.5rem;
    }

    /* ===== CALENDAR ===== */
    .month-section {
        padding: 0.5rem 0.3rem;
        background: linear-gradient(145deg, rgba(255, 77, 77, 0.08), rgba(20, 20, 40, 0.4));
        border-radius: var(--radius);
        border: 1px solid rgba(255, 77, 77, 0.1);
        margin-bottom: 1rem;
    }

    .month-header {
        flex-wrap: wrap;
        gap: 0.2rem;
        margin-bottom: 0.4rem;
        padding-bottom: 0.2rem;
    }

    .month-header .month-name {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--primary);
    }

    .month-header .month-stats {
        font-size: 0.55rem;
        gap: 0.3rem;
        margin-left: auto;
    }

    .month-grid {
        gap: 3px;
    }

    .month-day-header {
        font-size: 0.45rem;
        padding: 0.1rem 0;
        color: rgba(255, 255, 255, 0.5);
        font-weight: 600;
    }

    /* ===== DAY CARD (Mobile Optimized) ===== */
    .calendar-day {
        min-height: 60px;
        padding: 0.2rem 0.05rem;
        border-radius: 10px;
        background: linear-gradient(145deg, #1a1a2e, #0d0d1a);
        border: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.05rem;
        transition: all 0.2s ease;
    }

    .calendar-day.today {
        background: linear-gradient(145deg, #3d0a0a, #1a0505);
        border-color: #ff4d4d;
        box-shadow: 0 0 20px rgba(255, 77, 77, 0.15);
    }

    .calendar-day.completed {
        background: linear-gradient(145deg, #0d2a0d, #051005);
        border-color: rgba(40, 167, 69, 0.3);
    }

    .calendar-day.future {
        background: linear-gradient(145deg, #0d0d2a, #050510);
        border-color: rgba(23, 162, 184, 0.1);
    }

    .calendar-day.past {
        background: linear-gradient(145deg, #14141a, #08080a);
        border-color: rgba(255, 255, 255, 0.03);
    }

    .calendar-day.rest {
        background: linear-gradient(145deg, #1a0d2a, #0d0515);
        border-color: rgba(108, 117, 125, 0.1);
    }

    .calendar-day .day-number {
        font-size: 0.8rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 0.1rem;
    }

    .calendar-day .day-number .day-icon {
        font-size: 0.5rem;
    }

    .calendar-day .day-lesson-badge {
        font-size: 0.4rem;
        padding: 0.05rem 0.3rem;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 6px;
    }

    .calendar-day .day-content .item {
        font-size: 0.4rem;
        padding: 0.05rem 0.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 95%;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 4px;
    }

    .day-stats-badges {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
        margin-top: 1px;
    }

    .day-stat-badge {
        font-size: 0.35rem;
        padding: 0.03rem 0.15rem;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .day-stat-badge .stat-icon {
        font-size: 0.3rem;
    }

    .day-stat-badge .stat-count {
        font-size: 0.35rem;
        font-weight: 600;
    }

    .items-counter-badge {
        font-size: 0.4rem;
        padding: 0.05rem 0.3rem;
        min-width: 45px;
        gap: 0.15rem;
        background: rgba(255, 77, 77, 0.15);
        border: 1px solid rgba(255, 77, 77, 0.2);
        border-radius: 10px;
        margin-top: 2px;
    }

    .items-counter-badge .counter-number {
        font-size: 0.4rem;
        padding: 0.02rem 0.15rem;
        background: rgba(255, 77, 77, 0.3);
        border-radius: 6px;
    }

    .calendar-day .day-badge {
        font-size: 0.3rem;
        padding: 0.05rem 0.2rem;
        top: 1px;
        right: 1px;
    }

    .calendar-day .check-mark {
        font-size: 0.4rem;
        bottom: 1px;
        right: 1px;
    }

    /* ===== LEGEND ===== */
    .calendar-legend {
        gap: 0.4rem;
        padding: 0.4rem 0.6rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 10px;
        margin-top: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .legend-item {
        font-size: 0.55rem;
        gap: 0.25rem;
    }

    .legend-color {
        width: 12px;
        height: 12px;
        border-radius: 4px;
    }

    /* ===== PROGRESS ===== */
    .progress-glass {
        padding: 0.8rem;
        background: linear-gradient(145deg, rgba(255, 77, 77, 0.06), rgba(10, 10, 20, 0.3));
        border: 1px solid rgba(255, 77, 77, 0.06);
        border-radius: var(--radius);
        margin-bottom: 1rem;
    }

    .progress-header .percentage {
        font-size: 0.9rem;
    }

    .progress-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
        margin-top: 0.6rem;
    }

    .progress-stat {
        padding: 0.3rem 0.2rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.04);
    }

    .progress-stat .number {
        font-size: 1rem;
    }

    /* ===== PLAN HEADER ===== */
    .plan-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        margin-bottom: 0.6rem;
    }

    .plan-title {
        font-size: 1rem;
        flex-wrap: wrap;
    }

    .plan-title .course-badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.4rem;
    }

    .plan-duration-selector {
        justify-content: center;
        padding: 0.1rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 50px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .duration-btn {
        font-size: 0.55rem;
        padding: 0.15rem 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .duration-btn .recommended-badge {
        font-size: 0.35rem;
        top: -5px;
        right: -3px;
        padding: 0.05rem 0.15rem;
    }

    /* ===== MODAL ===== */
    .day-detail-modal .modal-content {
        max-width: 100%;
        border-radius: var(--radius);
        margin: 0.3rem;
    }

    .day-detail-modal .modal-header {
        padding: 0.4rem 0.6rem;
        flex-wrap: wrap;
        gap: 0.2rem;
        background: rgba(255, 77, 77, 0.04);
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .day-detail-modal .modal-header h3 {
        font-size: 0.7rem;
        gap: 0.2rem;
        flex-wrap: wrap;
    }

    .day-detail-modal .modal-header h3 .day-number-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.4rem;
    }

    .day-detail-modal .modal-header h3 .date-badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.35rem;
    }

    .day-detail-modal .modal-body {
        padding: 0.6rem;
    }

    .day-detail-modal .modal-body .summary-card {
        padding: 0.4rem 0.6rem;
        flex-wrap: wrap;
        gap: 0.2rem;
        background: rgba(255, 77, 77, 0.04);
        border: 1px solid rgba(255, 77, 77, 0.08);
        border-radius: 10px;
    }

    .detail-item {
        padding: 0.5rem 0.4rem;
        flex-wrap: wrap;
        gap: 0.3rem;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .detail-item .item-icon {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
        border-radius: 6px;
    }

    .detail-item .item-title {
        font-size: 0.65rem;
        font-weight: 600;
    }

    .detail-item .item-meta {
        font-size: 0.5rem;
        gap: 0.2rem;
    }

    .detail-item .item-actions {
        gap: 0.2rem;
        margin-top: 0.15rem;
        width: 100%;
        flex-wrap: wrap;
    }

    .detail-item .item-actions .btn-action-item {
        font-size: 0.5rem;
        padding: 0.1rem 0.4rem;
    }

    /* ===== UPLOADS (Mobile) ===== */
    .uploads-tab {
        padding: 0.6rem;
        margin: 1rem 0;
    }

    .uploads-tab-title {
        font-size: 0.85rem;
    }

    .upload-item {
        padding: 0.5rem 0.6rem;
        gap: 0.5rem;
    }

    .upload-item .upload-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .upload-item .upload-name {
        font-size: 0.7rem;
    }

    .upload-item .upload-meta {
        font-size: 0.5rem;
        gap: 0.2rem 0.4rem;
    }

    .upload-item .upload-meta .lesson-badge {
        font-size: 0.45rem;
        padding: 0.05rem 0.3rem;
    }

    .btn-upload-detail {
        font-size: 0.5rem;
        padding: 0.15rem 0.5rem;
    }
}

/* ===== VERY SMALL SCREENS (<= 480px) ===== */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.2rem;
    }

    .dashboard-hero {
        padding: 0.6rem 0.4rem;
        border-radius: 12px;
    }

    .dashboard-hero h1 {
        font-size: 1rem;
    }

    .dashboard-hero h1 .hero-icon {
        font-size: 0.8rem;
        padding: 4px 6px;
        border-radius: 8px;
    }

    .dashboard-hero p {
        font-size: 0.7rem;
    }

    .course-tab {
        font-size: 0.55rem;
        padding: 0.2rem 0.4rem;
    }

    .month-grid {
        gap: 2px;
    }

    .calendar-day {
        min-height: 48px;
        padding: 0.1rem 0.03rem;
        border-radius: 6px;
    }

    .calendar-day .day-number {
        font-size: 0.6rem;
    }

    .calendar-day .day-number .day-icon {
        font-size: 0.35rem;
    }

    .calendar-day .day-lesson-badge {
        font-size: 0.3rem;
        padding: 0.03rem 0.15rem;
    }

    .calendar-day .day-content .item {
        font-size: 0.3rem;
        padding: 0.03rem 0.05rem;
    }

    .day-stat-badge {
        font-size: 0.25rem;
        padding: 0.02rem 0.08rem;
    }

    .day-stat-badge .stat-icon {
        font-size: 0.2rem;
    }

    .day-stat-badge .stat-count {
        font-size: 0.25rem;
    }

    .items-counter-badge {
        font-size: 0.3rem;
        padding: 0.03rem 0.2rem;
        min-width: 30px;
        gap: 0.05rem;
    }

    .items-counter-badge .counter-number {
        font-size: 0.3rem;
        padding: 0.02rem 0.08rem;
    }

    .items-counter-badge .counter-label {
        font-size: 0.3rem;
    }

    .course-stats-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.2rem;
        padding: 0.3rem;
    }

    .course-stat-item {
        padding: 0.25rem 0.1rem;
    }

    .course-stat-item .stat-number {
        font-size: 0.7rem;
    }

    .course-stat-item .stat-icon-wrapper {
        width: 18px;
        height: 18px;
        font-size: 0.5rem;
    }

    .progress-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem;
    }

    .progress-stat .number {
        font-size: 0.8rem;
    }

    .progress-stat .label {
        font-size: 0.5rem;
    }

    .plan-title {
        font-size: 0.8rem;
    }

    .duration-btn {
        font-size: 0.45rem;
        padding: 0.1rem 0.3rem;
    }

    .day-detail-modal .modal-header h3 {
        font-size: 0.6rem;
    }

    .day-detail-modal .modal-header h3 .day-number-badge {
        font-size: 0.45rem;
        padding: 0.05rem 0.25rem;
    }

    .detail-item .item-title {
        font-size: 0.55rem;
    }

    .detail-item .item-actions .btn-action-item {
        font-size: 0.4rem;
        padding: 0.05rem 0.3rem;
    }

    /* ===== UPLOADS (Very Small) ===== */
    .uploads-tab {
        padding: 0.4rem;
    }

    .uploads-tab-title {
        font-size: 0.7rem;
    }

    .upload-item {
        padding: 0.3rem 0.4rem;
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .upload-item .upload-icon {
        width: 22px;
        height: 22px;
        font-size: 0.6rem;
    }

    .upload-item .upload-name {
        font-size: 0.6rem;
    }

    .upload-item .upload-meta {
        font-size: 0.45rem;
    }

    .upload-item .upload-meta .lesson-badge {
        font-size: 0.4rem;
        padding: 0.03rem 0.25rem;
    }

    .btn-upload-detail {
        font-size: 0.45rem;
        padding: 0.1rem 0.4rem;
    }
}

/* ===== EXTRA SMALL (<= 375px) - تحسين إضافي ===== */
@media (max-width: 375px) {
    .dashboard-container {
        padding: 0.1rem;
    }

    .dashboard-hero {
        padding: 0.4rem 0.3rem;
        border-radius: 10px;
    }

    .dashboard-hero h1 {
        font-size: 0.85rem;
    }

    .dashboard-hero h1 .hero-icon {
        font-size: 0.65rem;
        padding: 3px 5px;
        border-radius: 6px;
    }

    .dashboard-hero p {
        font-size: 0.6rem;
    }

    .hero-stat {
        font-size: 0.5rem;
        padding: 0.1rem 0.4rem;
    }

    .course-tab {
        font-size: 0.5rem;
        padding: 0.15rem 0.3rem;
    }

    .course-tab .badge-progress {
        font-size: 0.35rem;
        padding: 0.02rem 0.2rem;
    }

    .month-grid {
        gap: 1px;
    }

    .calendar-day {
        min-height: 40px;
        padding: 0.05rem 0.02rem;
        border-radius: 4px;
        border-width: 1px;
    }

    .calendar-day .day-number {
        font-size: 0.5rem;
    }

    .calendar-day .day-number .day-icon {
        font-size: 0.3rem;
    }

    .calendar-day .day-lesson-badge {
        font-size: 0.25rem;
        padding: 0.02rem 0.1rem;
    }

    .calendar-day .day-content .item {
        font-size: 0.25rem;
        padding: 0.02rem 0.05rem;
    }

    .day-stat-badge {
        font-size: 0.2rem;
        padding: 0.01rem 0.05rem;
        border-radius: 2px;
    }

    .day-stat-badge .stat-icon {
        font-size: 0.18rem;
    }

    .day-stat-badge .stat-count {
        font-size: 0.2rem;
    }

    .items-counter-badge {
        font-size: 0.25rem;
        padding: 0.02rem 0.15rem;
        min-width: 25px;
        border-radius: 6px;
    }

    .items-counter-badge .counter-number {
        font-size: 0.25rem;
        padding: 0.01rem 0.06rem;
    }

    .items-counter-badge .counter-label {
        font-size: 0.25rem;
    }

    .items-counter-badge .items-desc {
        font-size: 0.2rem;
    }

    .calendar-day .day-badge {
        font-size: 0.2rem;
        padding: 0.02rem 0.1rem;
        top: 0px;
        right: 0px;
    }

    .calendar-day .check-mark {
        font-size: 0.3rem;
        bottom: 0px;
        right: 0px;
    }

    .course-stats-card {
        gap: 0.15rem;
        padding: 0.2rem;
        border-radius: 8px;
    }

    .course-stat-item {
        padding: 0.15rem 0.05rem;
        border-radius: 6px;
    }

    .course-stat-item .stat-number {
        font-size: 0.6rem;
    }

    .course-stat-item .stat-icon-wrapper {
        width: 14px;
        height: 14px;
        font-size: 0.4rem;
        margin-bottom: 0.05rem;
    }

    .course-stat-item .stat-label {
        font-size: 0.4rem;
    }

    .progress-glass {
        padding: 0.4rem;
    }

    .progress-header .percentage {
        font-size: 0.7rem;
    }

    .progress-grid {
        gap: 0.15rem;
    }

    .progress-stat .number {
        font-size: 0.7rem;
    }

    .progress-stat .label {
        font-size: 0.4rem;
    }

    .month-section {
        padding: 0.3rem 0.2rem;
        border-radius: 8px;
        margin-bottom: 0.6rem;
    }

    .month-header .month-name {
        font-size: 0.7rem;
    }

    .month-header .month-stats {
        font-size: 0.4rem;
        gap: 0.2rem;
    }

    .month-day-header {
        font-size: 0.35rem;
        padding: 0.05rem 0;
    }

    .calendar-legend {
        gap: 0.2rem;
        padding: 0.2rem 0.3rem;
    }

    .legend-item {
        font-size: 0.45rem;
        gap: 0.15rem;
    }

    .legend-color {
        width: 8px;
        height: 8px;
        border-radius: 2px;
    }

    .plan-title {
        font-size: 0.7rem;
    }

    .plan-title .course-badge {
        font-size: 0.4rem;
        padding: 0.05rem 0.3rem;
    }

    .duration-btn {
        font-size: 0.4rem;
        padding: 0.08rem 0.3rem;
    }

    .day-detail-modal .modal-content {
        margin: 0.1rem;
        border-radius: 8px;
    }

    .day-detail-modal .modal-header {
        padding: 0.2rem 0.3rem;
    }

    .day-detail-modal .modal-header h3 {
        font-size: 0.5rem;
    }

    .day-detail-modal .modal-header h3 .day-number-badge {
        font-size: 0.4rem;
        padding: 0.05rem 0.2rem;
    }

    .day-detail-modal .modal-body {
        padding: 0.3rem;
    }

    .detail-item {
        padding: 0.3rem 0.3rem;
        border-radius: 6px;
    }

    .detail-item .item-icon {
        width: 18px;
        height: 18px;
        font-size: 0.45rem;
        border-radius: 4px;
    }

    .detail-item .item-title {
        font-size: 0.5rem;
    }

    .detail-item .item-meta {
        font-size: 0.4rem;
    }

    .detail-item .item-actions .btn-action-item {
        font-size: 0.35rem;
        padding: 0.05rem 0.25rem;
    }

    /* ===== UPLOADS (Extra Small) ===== */
    .uploads-tab {
        padding: 0.2rem;
        margin: 0.5rem 0;
    }

    .uploads-tab-title {
        font-size: 0.6rem;
    }

    .upload-item {
        padding: 0.2rem 0.3rem;
        gap: 0.2rem;
        border-radius: 6px;
    }

    .upload-item .upload-icon {
        width: 18px;
        height: 18px;
        font-size: 0.45rem;
        border-radius: 4px;
    }

    .upload-item .upload-name {
        font-size: 0.5rem;
    }

    .upload-item .upload-meta {
        font-size: 0.4rem;
    }

    .upload-item .upload-meta .lesson-badge {
        font-size: 0.35rem;
        padding: 0.02rem 0.2rem;
    }

    .btn-upload-detail {
        font-size: 0.4rem;
        padding: 0.08rem 0.3rem;
        border-radius: 30px;
    }

    .btn-upload-detail .upload-icon-btn {
        font-size: 0.35rem;
    }
}

/* ===== DURATION MODAL ===== */
.duration-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.duration-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.duration-modal {
    background: #1a1a2a;
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.duration-modal-overlay.active .duration-modal {
    transform: translateY(0);
}

.duration-modal h3 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.duration-modal p {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.duration-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.duration-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.duration-option:focus-visible {
    background: rgba(255, 77, 77, 0.05);
    border-color: rgba(255, 77, 77, 0.2);
}

.duration-option.selected {
    background: rgba(255, 77, 77, 0.1);
    border-color: #ff4d4d;
}

.duration-option .option-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.duration-option i {
    color: #ff4d4d;
    font-size: 1.2rem;
}

.duration-option .option-label {
    font-weight: 600;
    color: #fff;
}

.duration-option .option-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.duration-option.selected .option-check {
    background: #ff4d4d;
    border-color: #ff4d4d;
}

.duration-option.selected .option-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #fff;
}

.duration-modal-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff4d4d, #ff6b6b);
    border: none;
    padding: 0.8rem;
    border-radius: 50px;
    color: #fff;
    font-weight: 700;
    transition: all 0.3s ease;
}

.duration-modal-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 77, 77, 0.3);
}

.duration-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.course-duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.course-duration-badge:focus-visible {
    background: rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.3);
    color: #fff;
}

.course-duration-badge i {
    font-size: 0.6rem;
    color: #ff4d4d;
}


/* ============================================================
   DASHBOARD POLISH — tactile cards, smoother navigation, clearer rhythm
   ============================================================ */
.dashboard-container {
    width: min(100%, 1500px);
    padding: clamp(1.15rem, 2.5vw, 2.75rem) clamp(0.8rem, 3vw, 2.8rem) 3rem;
}

.dashboard-experience-grid {
    gap: 1rem;
    margin-bottom: 2rem;
}

.experience-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.experience-card::after {
    content: "";
    position: absolute;
    inset: auto 12% -54% 12%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 77, 0.12), transparent 67%);
    filter: blur(12px);
    pointer-events: none;
}

.experience-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(255, 112, 112, 0.27);
    box-shadow: 0 25px 52px rgba(0, 0, 0, 0.26), 0 0 26px rgba(255, 77, 77, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.course-tabs-wrapper {
    position: relative;
    margin-bottom: 1.8rem;
    padding: 0.35rem 0.35rem 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.course-tabs {
    gap: 0.55rem;
    padding: 0.25rem 0.2rem 0.7rem;
    border-bottom: 0;
}

.course-tab {
    min-height: 42px;
    padding: 0.62rem 1.05rem;
    border-radius: 13px;
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.78rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.course-tab:focus-visible {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(255, 104, 104, 0.32);
    background: rgba(255, 77, 77, 0.1);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.course-tab.active {
    border-color: rgba(255, 117, 117, 0.42);
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.23), rgba(255, 77, 77, 0.08));
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 77, 77, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.course-tab:focus-visible,
.dashboard-view-btn:focus-visible,
.duration-btn:focus-visible,
.calendar-day:focus-visible {
    outline: 2px solid rgba(255, 135, 135, 0.85);
    outline-offset: 3px;
}

.course-stats-card,
.progress-glass {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.course-stats-card {
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.105), rgba(255, 255, 255, 0.025) 48%, rgba(10, 10, 20, 0.35));
}

.course-stat-item {
    padding: 0.85rem 0.65rem;
    border-color: rgba(255, 255, 255, 0.065);
    background: rgba(0, 0, 0, 0.14);
}

.course-stat-item:focus-visible {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 112, 112, 0.25);
    background: rgba(255, 255, 255, 0.055);
}

.progress-glass {
    padding: 1.45rem 1.55rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.1), rgba(20, 15, 24, 0.42) 58%, rgba(5, 9, 15, 0.5));
}

.progress-track {
    height: 9px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    box-shadow: 0 0 16px rgba(255, 77, 77, 0.35);
}

.progress-stat {
    border-color: rgba(255, 255, 255, 0.065);
    background: rgba(255, 255, 255, 0.035);
}

.progress-stat:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 110, 110, 0.24);
    background: rgba(255, 77, 77, 0.07);
}

.plan-header {
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.plan-title {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.plan-title .course-badge {
    border: 1px solid rgba(255, 111, 111, 0.16);
    background: rgba(255, 77, 77, 0.11);
}

.monthly-calendar {
    padding: clamp(1rem, 2vw, 1.7rem);
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(8, 11, 18, 0.47));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.dashboard-plan-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: -0.1rem 0 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.dashboard-plan-heading {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.dashboard-plan-kicker {
    color: #ff8d8d;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-plan-kicker i {
    margin-right: 0.35rem;
    filter: drop-shadow(0 0 7px rgba(255, 77, 77, 0.45));
}

.dashboard-plan-hint {
    color: rgba(255, 255, 255, 0.43);
    font-size: 0.76rem;
}

.dashboard-view-switcher {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.24rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.22);
}

.dashboard-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.52);
    background: transparent;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.dashboard-view-btn:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.dashboard-view-btn[aria-pressed="true"] {
    color: #fff;
    border-color: rgba(255, 111, 111, 0.28);
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.25), rgba(255, 77, 77, 0.08));
    box-shadow: 0 5px 14px rgba(255, 77, 77, 0.12);
}

.dashboard-view-panel {
    animation: dashboardPanelIn 330ms ease both;
}

@keyframes dashboardPanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-day:not(.empty),
.task-list-day {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.calendar-day:not(.empty):focus-visible,
.task-list-day:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(255, 112, 112, 0.34) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), 0 0 18px rgba(255, 77, 77, 0.055);
}

@media (max-width: 640px) {
    .dashboard-container {
        padding: 0.8rem 0.65rem 2rem;
    }

    .course-tabs-wrapper {
        margin-bottom: 1rem;
        border-radius: 15px;
    }

    .course-tab {
        min-height: 36px;
        padding: 0.48rem 0.72rem;
        font-size: 0.68rem;
    }

    .course-stats-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0.55rem;
    }

    .progress-glass {
        padding: 1rem;
        border-radius: 18px;
    }

    .monthly-calendar {
        padding: 0.8rem;
        border-radius: 18px;
    }

    .dashboard-plan-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-view-switcher {
        width: 100%;
    }

    .dashboard-view-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .experience-card,
    .course-tab,
    .course-stat-item,
    .progress-stat,
    .dashboard-view-panel,
    .calendar-day:not(.empty),
    .task-list-day {
        animation: none;
        transition: none;
    }
}