:root {
    --deep: #062f2f;
    --deep-2: #08443d;
    --ink: #082f2f;
    --muted: #64746f;
    --line: #d9e4df;
    --soft: #f5f8f7;
    --lime: #cce216;
    --blue: #0b96f3;
    --orange: #ff6b00;
    --shadow: 0 24px 70px rgba(8, 47, 47, .12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f7faf8; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.student-shell { min-height: 100vh; display: grid; grid-template-columns: 292px 1fr; }
.student-sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: 292px; height: 100vh; height: 100dvh; max-height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 24px 18px calc(110px + env(safe-area-inset-bottom, 0px)); background: #062f20; color: #fff; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.30) transparent; }
.student-sidebar::-webkit-scrollbar { width: 7px; }
.student-sidebar::-webkit-scrollbar-track { background: transparent; }
.student-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.25); }
.student-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.40); }
.student-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 20px; }
.student-brand img { width: 56px; height: 56px; object-fit: contain; }
.student-brand strong { display: block; color: #139cf3; font-size: 20px; font-weight: 800; }
.student-brand small { display: block; margin-top: 4px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-card { margin: 8px 0 22px; padding: 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.08); display: grid; gap: 8px; }
.profile-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #fff; }
.profile-card strong { font-size: 17px; font-weight: 750; }
.profile-card small { color: rgba(255,255,255,.68); overflow-wrap: anywhere; }
.student-nav { display: grid; gap: 8px; }
.student-nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-radius: 10px; color: rgba(255,255,255,.76); font-size: 14px; font-weight: 650; transition: .2s ease; }
.student-nav a:hover, .student-nav a.active { color: #fff; background: rgba(255,255,255,.12); }
.student-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.student-nav a .nav-badge {
    flex: 0 0 auto !important;
    min-width: 20px !important;
    width: auto !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    padding: 0 6px !important;
    border: 2px solid rgba(255,255,255,.22) !important;
    border-radius: 999px !important;
    background: #e74c3c !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 8px 18px rgba(231,76,60,.28) !important;
}
.student-nav a .nav-badge[hidden] { display: none !important; }

.student-main { min-width: 0; grid-column: 2; }
.student-topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.student-topbar strong { display: block; font-size: 16px; font-weight: 750; }
.student-topbar span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.topbar-actions a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; }
.topbar-actions .logout { background: var(--deep); color: #fff; border-color: var(--deep); }
.student-content { padding: 38px; }
.page-title { margin-bottom: 28px; }
.kicker { display: inline-flex; color: var(--lime); font-size: 13px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.page-title h1 { margin: 10px 0 0; max-width: 850px; font-size: clamp(28px, 3vw, 42px); line-height: 1.02; letter-spacing: 0; }
.page-title p { margin: 10px 0 0; max-width: 760px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.hero-card { display: grid; grid-template-columns: 1.35fr .65fr; gap: 26px; align-items: stretch; margin-bottom: 26px; }
.hero-card.has-motivation { grid-template-columns: 1fr; }
.hero-card.has-motivation .quick-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; padding: 18px 22px; }
.hero-card.has-motivation .quick-card strong { margin: 0; white-space: nowrap; }
.hero-card.has-motivation .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.welcome-card { padding: 34px; border-radius: 18px; background: linear-gradient(135deg, #063a2a, #073d4d); color: #fff; box-shadow: var(--shadow); }
.welcome-card h2 { margin: 0; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; }
.welcome-card p { margin: 14px 0 0; color: rgba(255,255,255,.82); line-height: 1.8; }
.motivation-hero-card { position: relative; min-height: 280px; height: clamp(260px, 32vw, 340px); overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #062f20, #073d4d); color: #fff; box-shadow: var(--shadow); }
.motivation-slide { position: absolute; inset: 0; display: grid; grid-template-areas: "stack"; opacity: 0; pointer-events: none; transition: opacity .65s ease; }
.motivation-slide.active { opacity: 1; pointer-events: auto; }
.motivation-slide-bg,
.motivation-slide-overlay,
.motivation-slide-content { grid-area: stack; }
.motivation-slide-bg { background-color: #052b24; background-size: cover; background-position: center center; background-repeat: no-repeat; min-height: 100%; width: 100%; }
.motivation-slide-bg.is-fallback { background-image: radial-gradient(circle at 24% 18%, rgba(204,226,22,.22), transparent 34%), linear-gradient(135deg, #062f20 0%, #073d4d 55%, #052b24 100%) !important; }
.motivation-slide-overlay { z-index: 1; background: linear-gradient(120deg, rgba(0,0,0,.38) 0%, rgba(0,0,0,.22) 52%, rgba(0,0,0,.34) 100%); pointer-events: none; }
.motivation-slide-content { z-index: 2; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; min-height: 100%; padding: clamp(28px, 5vw, 48px); box-sizing: border-box; text-align: center; }
.motivation-slide-content::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.24) 45%, rgba(0,0,0,.12) 100%); pointer-events: none; z-index: -1; }
.motivation-words { position: relative; min-height: 56px; width: 100%; max-width: 860px; display: grid; align-items: center; justify-items: center; }
.motivation-words strong { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(12px); color: #fff; font-size: clamp(24px, 3.2vw, 42px); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; text-shadow: 0 3px 24px rgba(0,0,0,.7); transition: opacity .45s ease, transform .45s ease, visibility .45s ease; }
.motivation-words strong.active { opacity: 1; visibility: visible; transform: translateY(0); color: var(--lime); }
.motivation-words strong:only-child,
.motivation-words strong:first-child:last-child { opacity: 1; visibility: visible; transform: none; }
.quick-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.quick-card strong { display: block; margin-bottom: 12px; font-size: 18px; }
.quick-links { display: grid; gap: 10px; }
.quick-links a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-radius: 10px; background: var(--soft); font-weight: 700; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card, .panel-card, .item-card, .video-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.stat-card { padding: 22px; }
.stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin-top: 8px; font-size: 28px; font-weight: 750; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; align-items: stretch; margin-bottom: 26px; }
.dashboard-card { min-width: 0; min-height: 300px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.dashboard-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-shrink: 0; }
.dashboard-card-head h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.05; }
.today-card { background: linear-gradient(135deg, #ffffff, #f7fbf8); }
.today-lesson-list,
.compact-list { display: grid; gap: 10px; flex: 1; align-content: start; }
.today-lesson-list { gap: 12px; }
.today-lesson { padding: 15px; border: 1px solid #dbe8e2; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(8,47,47,.06); }
.today-lesson span { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: rgba(204,226,22,.24); color: var(--deep); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.today-lesson p { margin: 10px 0 0; color: var(--ink); line-height: 1.55; }
.today-lesson small { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }
.compact-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #dbe8e2; border-radius: 14px; background: #f9fcfb; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.compact-row:hover { transform: translateY(-1px); border-color: rgba(0,168,132,.35); box-shadow: 0 14px 28px rgba(8,47,47,.08); }
.compact-row .row-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--deep); color: var(--lime); font-weight: 900; flex-shrink: 0; }
.compact-row > div { min-width: 0; }
.compact-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.compact-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.compact-row em { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--lime); color: var(--deep); font-style: normal; font-size: 12px; font-weight: 850; flex-shrink: 0; }
.overview-empty.mini { display: grid; gap: 6px; flex: 1; align-content: center; min-height: 180px; padding: 22px; border: 1px dashed #cdded8; border-radius: 14px; background: #f8fbfa; color: var(--muted); text-align: center; }
.overview-empty.mini strong { color: var(--deep); font-size: 15px; }
.overview-empty.mini span { line-height: 1.55; }
.upcoming-programs-card { margin-bottom: 26px; }
.upcoming-programs-card .panel-head { align-items: flex-start; }
.program-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.program-summary-grid.is-empty { grid-template-columns: 1fr; }
.program-summary-grid .empty-state,
.program-summary-grid .overview-empty.mini { grid-column: 1 / -1; min-height: 160px; }
.program-summary-card { position: relative; min-height: 210px; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 18px 22px; overflow: hidden; border: 1px solid #dbe8e2; border-radius: 16px; background: linear-gradient(180deg, #fff, #f7fbf9); box-shadow: 0 12px 28px rgba(8,47,47,.05); }
.program-summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: #dbe8e2; }
.program-summary-card.is-current { border-color: rgba(204,226,22,.75); background: linear-gradient(180deg, #fffffb, #f6fbe3); }
.program-summary-card.is-current::before { background: var(--lime); }
.program-summary-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 750; }
.program-summary-top strong { color: var(--deep); }
.program-summary-card h3 { margin: 2px 0 0; font-size: 18px; }
.program-summary-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.program-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.program-tags em { padding: 5px 8px; border-radius: 999px; background: #eef4f1; color: var(--deep); font-style: normal; font-size: 11px; font-weight: 800; }
.program-summary-card a { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; min-height: 38px; padding: 0 12px; border-radius: 10px; background: var(--deep); color: #fff; font-weight: 800; text-decoration: none; }
.panel-card { padding: 24px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 4px 0 0; font-size: 22px; line-height: 1.1; }
.pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: #eef4f1; color: var(--deep); font-size: 12px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.pill:hover { background: #e3ede8; color: var(--deep); }

.item-list { display: grid; gap: 12px; }
.filter-row {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.filter-row > span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.filter-chip .chip-badge {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(231, 76, 60, .24);
}
.filter-chip .chip-badge[hidden] { display: none !important; }
.filter-chip .chip-count {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
}
.filter-chip .chip-badge-topic { margin-left: 2px; }
.item-card.is-new-note {
    border-color: rgba(231, 76, 60, .35);
    background: linear-gradient(180deg, #fff, #fff8f7);
}
.note-new-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fdecea;
    color: #c62828;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}
.filter-chip em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
}
.filter-chip.active,
.filter-chip:hover {
    border-color: #9fc7b8;
    background: #eef7f2;
}
.item-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 18px; align-items: center; }
.item-card.stacked { grid-template-columns: 1fr; }
.item-card h3 { margin: 0; font-size: 18px; }
.item-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.item-meta span { padding: 6px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.action-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 750; border: 0; cursor: pointer; white-space: nowrap; }
.action-btn.secondary { background: var(--lime); color: #071f19; }
.action-btn.ghost { background: #fff; color: var(--deep); border: 1px solid var(--line); }
.task-form { margin-top: 14px; display: grid; gap: 10px; }
.task-form textarea { min-height: 86px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical; }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.video-card { overflow: hidden; text-align: left; }
.student-videos-card {
    padding: 0;
    overflow: hidden;
    border: 1px solid #cfe1da;
    background: linear-gradient(180deg, #fff 0%, #f7fbf9 100%);
    box-shadow: 0 22px 56px rgba(8, 47, 47, .08);
}
.student-videos-card .panel-head {
    margin: 0;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(135deg, #063a2a 0%, #0a5a4a 52%, #073d4d 100%);
    color: #fff;
}
.student-videos-card .panel-head h2 {
    margin-bottom: 6px;
    color: #fff;
    font-size: 24px;
}
.student-videos-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
}
.student-videos-card .panel-head .pill {
    background: rgba(204, 226, 22, .16);
    border: 1px solid rgba(204, 226, 22, .34);
    color: var(--lime);
}
.student-videos-card .video-tab-row,
.student-videos-card .student-video-grid,
.student-videos-card .empty-state {
    margin-left: 24px;
    margin-right: 24px;
}
.student-videos-card .video-tab-row {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #dbe8e2;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #f3f9f6);
}
.student-videos-card .empty-state {
    margin-bottom: 24px;
}
.video-tab-row { margin-bottom: 20px; }
.video-tabs .filter-chip {
    border-color: #c8d9d3;
    background: #fff;
    box-shadow: 0 4px 14px rgba(8, 47, 47, .04);
}
.video-tabs .filter-chip.active {
    background: linear-gradient(135deg, #063a2a, #0a5a4a);
    border-color: #063a2a;
    color: #fff;
    box-shadow: 0 10px 24px rgba(6, 58, 42, .18);
}
.video-tabs .filter-chip.active .chip-count { color: rgba(255, 255, 255, .78); }
.student-video-grid {
    margin-top: 4px;
    margin-bottom: 24px;
    padding-bottom: 4px;
}

.video-card-btn {
    width: 100%;
    padding: 0;
    border: 1px solid #d3e4dd;
    background: #fff;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 10px 24px rgba(8, 47, 47, .05);
}
.video-card-btn:hover,
.video-card-btn:focus-visible {
    transform: translateY(-3px);
    border-color: #9fc5b7;
    box-shadow: 0 18px 36px rgba(8, 47, 47, .12);
    outline: none;
}
.video-card.is-new-video {
    border-color: rgba(231, 76, 60, .42);
    background: linear-gradient(180deg, #fff, #fff7f6);
    box-shadow: 0 14px 30px rgba(231, 76, 60, .08);
}
.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #063a2a, #073d4d);
    overflow: hidden;
}
.video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .28));
    pointer-events: none;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .28s ease;
}
.video-card-btn:hover .video-thumb img,
.video-card-btn:focus-visible .video-thumb img { transform: scale(1.05); }
.video-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .78);
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #063a2a, #073d4d);
}
.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #d7f20f, #cce216);
    color: var(--deep);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .24);
}
.video-topic-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1;
    max-width: calc(100% - 24px);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(6, 47, 38, .88);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-card .body,
.video-card-body {
    display: grid;
    gap: 10px;
    padding: 16px 18px 18px;
    background: linear-gradient(180deg, #fff 0%, #f6fbf8 100%);
    border-top: 1px solid #e6efeb;
}
.video-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.video-card-course {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8f7f1, #dff1ea);
    border: 1px solid #c5e0d4;
    color: #0a4f3f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.video-card-new {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #fdecea;
    border: 1px solid #f5c6c2;
    color: #c62828;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.video-card-title,
.video-card h3 {
    margin: 0;
    color: #0b2f28;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card-topic {
    margin: 0;
    color: #6a7d77;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px dashed #dbe8e2;
}
.video-card-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7b8b86;
    font-size: 12px;
    font-weight: 650;
}
.video-card-date svg {
    flex: 0 0 auto;
    opacity: .85;
}
.video-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #edf4f0;
    color: #0a4f3f;
    font-size: 12px;
    font-weight: 800;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.video-card-action svg {
    transition: transform .2s ease;
}
.video-card-btn:hover .video-card-action,
.video-card-btn:focus-visible .video-card-action {
    background: linear-gradient(135deg, #d7f20f, #cce216);
    color: #062f26;
    transform: translateX(2px);
}
.video-card-btn:hover .video-card-action svg,
.video-card-btn:focus-visible .video-card-action svg {
    transform: translateX(2px);
}
.video-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}
.video-card-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf7f2, #e4f0ea);
    color: var(--deep);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding:
        max(12px, env(safe-area-inset-top, 0px))
        max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.video-modal[hidden] { display: none !important; }
.video-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 24, 20, .78);
    backdrop-filter: blur(6px);
}
.video-modal-dialog {
    position: relative;
    width: min(960px, 100%);
    max-height: none;
    margin: auto;
    display: flex;
    flex-direction: column;
    container-type: inline-size;
    border-radius: 22px;
    overflow-x: hidden;
    overflow-y: visible;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
    border: 1px solid rgba(255, 255, 255, .12);
    flex-shrink: 0;
}
.video-modal-close {
    position: fixed;
    top: max(14px, env(safe-area-inset-top, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    z-index: 1201;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(6, 47, 38, .88);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}
.video-modal-player-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 56.25cqw;
    min-height: 0;
    background: #000;
    overflow: hidden;
}
.video-modal-player-wrap iframe {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}
.video-modal-player-wrap iframe[hidden],
.video-modal-fallback[hidden],
.video-modal-loader[hidden] {
    display: none !important;
}
.video-modal-loader {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    background: linear-gradient(135deg, rgba(6, 58, 42, .92), rgba(7, 61, 77, .92));
}
.video-modal-loader-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .18);
    border-top-color: var(--lime);
    animation: videoLoaderSpin .8s linear infinite;
}
.video-modal-loader small {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}
@keyframes videoLoaderSpin {
    to { transform: rotate(360deg); }
}
.video-modal-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 24px;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, #063a2a, #073d4d);
}
.video-modal-fallback-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(204, 226, 22, .18);
    color: var(--lime);
    font-size: 28px;
    font-weight: 900;
}
.video-modal-fallback p {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}
.video-modal-fallback small {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}
.video-modal-open-btn {
    margin-top: 6px;
    min-width: 160px;
    background: linear-gradient(135deg, #0b96f3, #0877c5);
}
.video-modal-meta,
.video-modal-body {
    display: grid;
    gap: 10px;
    flex: 0 0 auto;
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, #fff 0%, #f6fbf8 100%);
    border-top: 1px solid #e6efeb;
}
.video-modal-body .video-card-title {
    font-size: clamp(18px, 4.5vw, 24px);
}
.video-modal-body .video-card-topic {
    font-size: 14px;
}
.video-modal-foot {
    margin-top: 4px;
}
.video-modal-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d7f20f, #cce216);
    color: #062f26;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(204, 226, 22, .22);
}
.video-modal-course {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf7f2, #e4f0ea);
    color: var(--deep);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.video-modal-meta h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    color: var(--ink);
}
.video-modal-meta p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
body.video-modal-open {
    overflow: hidden;
}
body.video-modal-open .video-modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
    .video-modal {
        padding:
            max(8px, env(safe-area-inset-top, 0px))
            max(8px, env(safe-area-inset-right, 0px))
            max(8px, env(safe-area-inset-bottom, 0px))
            max(8px, env(safe-area-inset-left, 0px));
    }
    .video-modal-dialog {
        width: 100%;
        border-radius: 18px;
    }
    .video-modal-meta,
    .video-modal-body {
        padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    }
    .video-modal-foot {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .video-modal {
        padding: 0;
    }
    .video-modal-dialog {
        width: 100%;
        border-radius: 0;
        border: 0;
    }
    .video-modal-player-wrap {
        height: 56.25vw;
        border-radius: 0;
    }
    .video-modal-close {
        top: max(8px, env(safe-area-inset-top, 0px));
        right: max(8px, env(safe-area-inset-right, 0px));
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
    .video-modal-body .video-card-title {
        font-size: 18px;
    }
    .video-modal-status {
        margin-left: auto;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .video-modal-dialog {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
    }
    .video-modal-player-wrap {
        flex: 1 1 62%;
        width: 100%;
        max-width: none;
        height: min(56.25cqw, 70dvh);
        min-height: 0;
    }
    .video-modal-meta,
    .video-modal-body {
        flex: 0 0 38%;
        max-width: 38%;
        overflow-y: auto;
        border-top: 0;
        border-left: 1px solid #e6efeb;
    }
}

.page-videolar .student-content {
    background:
        radial-gradient(circle at top right, rgba(204, 226, 22, .08), transparent 28%),
        radial-gradient(circle at top left, rgba(11, 150, 243, .06), transparent 24%),
        #f7faf8;
}

.progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.progress-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.progress-line { height: 12px; overflow: hidden; border-radius: 999px; background: #e8efeb; margin: 12px 0 8px; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime), var(--blue)); }

.message-thread { display: grid; gap: 12px; }
.message { max-width: 76%; padding: 14px 16px; border-radius: 14px; background: #edf4f0; }
.message.me { justify-self: end; background: #dff0ff; }
.message small { display: block; margin-top: 8px; color: var(--muted); }
.message-form { display: grid; gap: 12px; margin-top: 18px; }
.message-form textarea { min-height: 110px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; resize: vertical; }
.wa-chat { height: min(720px, calc(100vh - 210px)); min-height: 520px; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 18px; background: #efeae2; }
.wa-chat-header { min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #075e54; color: #fff; }
.wa-chat-header > div { min-width: 0; }
.wa-chat-header strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.wa-chat-header small { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: rgba(255,255,255,.75); }
.wa-avatar { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #d9fdd3; color: #075e54; font-size: 20px; font-weight: 850; }
.wa-online-dot { width: 7px; height: 7px; border-radius: 50%; background: #25d366; }
.wa-message-count { margin-left: auto; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 11px; }
.wa-thread { flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 20px 6%; overflow-y: auto; background-color: #efeae2; background-image: radial-gradient(rgba(7,94,84,.045) 1px, transparent 1px); background-size: 18px 18px; scrollbar-width: thin; scrollbar-color: rgba(7,94,84,.28) transparent; }
.wa-thread::-webkit-scrollbar { width: 7px; }
.wa-thread::-webkit-scrollbar-track { background: transparent; }
.wa-thread::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(7,94,84,.25); }
.wa-date-separator { align-self: center; margin: 8px 0; }
.wa-date-separator span { display: inline-block; padding: 6px 10px; border-radius: 8px; background: #fff; color: #667781; font-size: 11px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.wa-bubble { position: relative; width: fit-content; max-width: min(76%, 620px); margin: 2px 0; padding: 8px 10px 6px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); line-height: 1.45; }
.wa-bubble.incoming { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-bubble.me { align-self: flex-end; justify-self: auto; background: #d9fdd3; border-top-right-radius: 2px; }
.wa-bubble small { margin-top: 3px; text-align: right; color: #667781; font-size: 10px; line-height: 1; }
.wa-check { color: #53bdeb; font-weight: 800; letter-spacing: -2px; }
.wa-message-text { overflow-wrap: anywhere; }
.wa-bubble .message-attachment { display: inline-flex; margin-top: 6px; padding: 7px 9px; border-radius: 7px; background: rgba(7,94,84,.08); color: #075e54; font-size: 12px; font-weight: 750; }
.wa-chat { position: relative; }
.wa-composer { position: relative; grid-template-columns: 46px minmax(0, 1fr) 48px; align-items: end; gap: 9px; margin: 0; padding: 10px 12px; border-top: 1px solid rgba(0,0,0,.06); background: #f0f2f5; }
.wa-composer textarea { width: 100%; min-height: 46px; max-height: 120px; margin: 0; padding: 12px 15px; border: 0; border-radius: 22px; background: #fff; resize: none; box-sizing: border-box; outline: none; }
.wa-attach-button { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #54656f; cursor: pointer; transition: background-color .2s, color .2s; }
.wa-attach-button svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-6deg); }
.wa-attach-button:hover { background: #e1e5e7; color: #26343b; }
.wa-attach-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wa-drag-overlay { position: absolute; inset: 12px; z-index: 50; display: none; place-items: center; border: 2px dashed #00a884; border-radius: 16px; background: rgba(217,253,211,.96); color: #075e54; text-align: center; }
.wa-drag-overlay.show { display: grid; }
.wa-drag-overlay span, .wa-drag-overlay strong, .wa-drag-overlay small { display: block; }
.wa-drag-overlay span { font-size: 48px; line-height: 1; }
.wa-drag-overlay strong { margin-top: 14px; font-size: 24px; }
.wa-drag-overlay small { margin-top: 8px; color: #55746a; }
.wa-attachment-preview { display: none; grid-column: 1 / -1; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.wa-attachment-preview.show { display: grid; grid-template-columns: 48px minmax(0,1fr) 30px; }
.wa-preview-media { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #edf3f0; font-size: 24px; }
.wa-preview-media img { width: 100%; height: 100%; object-fit: cover; }
.wa-attachment-preview > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.wa-attachment-preview button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: #edf0f1; color: #54656f; font-size: 20px; cursor: pointer; }
.wa-send-button { width: 46px; height: 46px; display: grid; place-items: center; padding: 0 3px 0 0; border: 0; border-radius: 50%; background: #00a884; color: #fff; font-size: 21px; cursor: pointer; }
.wa-send-button:hover { background: #008f72; }
@media (max-width: 860px) {
    .wa-chat { height: calc(100vh - 155px); min-height: 520px; }
    .wa-bubble { max-width: 88%; }
    .wa-composer { grid-template-columns: 42px minmax(0, 1fr) 44px; padding: 8px; }
    .wa-attach-button { width: 42px; height: 42px; }
    .wa-send-button { width: 42px; height: 42px; }
}

@media (min-width: 861px) {
    .page-mesajlar .student-content { height: calc(100vh - 64px); padding: 20px 28px; overflow: hidden; }
    .page-mesajlar .page-title { display: none; }
    .page-mesajlar .wa-chat { height: 100%; min-height: 0; margin: 0; }
}

.empty-state { grid-column: 1 / -1; padding: 36px 24px; border: 1px dashed var(--line); border-radius: 14px; background: #f8fbfa; color: var(--muted); text-align: center; font-weight: 650; line-height: 1.6; }
.item-list .empty-state { min-height: 120px; display: grid; place-items: center; }

.student-schedule-list { display: grid; gap: 16px; }
.student-schedule-card { padding: 0; overflow: hidden; }
.student-schedule-card summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; cursor: pointer; list-style: none; }
.student-schedule-card summary::-webkit-details-marker { display: none; }
.student-schedule-card[open] summary { border-bottom: 1px solid var(--line); background: #f8fbfa; }
.student-schedule-card summary h2 { margin: 5px 0 2px; color: var(--ink); font-size: 21px; }
.student-schedule-card summary p { margin: 0; color: var(--muted); font-size: 13px; }
.student-schedule-wrap { width: 100%; overflow-x: auto; }
.student-schedule-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.student-schedule-table th, .student-schedule-table td { padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; line-height: 1.5; overflow-wrap: anywhere; }
.student-schedule-table tr:last-child > * { border-bottom: 0; }
.student-schedule-table tr > *:last-child { border-right: 0; }
.student-schedule-table thead th { background: var(--deep); color: #fff; text-align: center; }
.student-schedule-table thead th span { display: block; font-weight: 850; }
.student-schedule-table thead th small { display: inline-flex; align-items: center; justify-content: center; margin-top: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; font-size: 11px; font-weight: 800; }
.student-schedule-table thead th:first-child, .student-schedule-table tbody th { width: 160px; }
.student-schedule-table tbody th { background: #f0f5f3; color: var(--ink); font-weight: 800; }
.student-schedule-table td { min-width: 210px; color: var(--ink); }
.student-schedule-empty { color: #a6b5b0; }
.student-schedule-table .schedule-day-color-0 { background: linear-gradient(135deg, #00483f, #078066); }
.student-schedule-table .schedule-day-color-1 { background: linear-gradient(135deg, #105a95, #1f9ed8); }
.student-schedule-table .schedule-day-color-2 { background: linear-gradient(135deg, #6a3fa0, #a96ee8); }
.student-schedule-table .schedule-day-color-3 { background: linear-gradient(135deg, #b35a00, #f29b21); }
.student-schedule-table .schedule-day-color-4 { background: linear-gradient(135deg, #a51f3f, #ee5d73); }
.student-schedule-table .schedule-day-color-5 { background: linear-gradient(135deg, #4f6f00, #b9db18); }
.student-schedule-table .schedule-day-color-6 { background: linear-gradient(135deg, #25334e, #6078ad); }
.student-schedule-table thead th.is-today { position: relative; box-shadow: inset 0 0 0 4px #cce216, 0 0 0 2px rgba(204,226,22,.35); }
.student-schedule-table thead th.is-today::after { content: "Bugün"; display: inline-flex; margin-top: 7px; padding: 3px 10px; border-radius: 999px; background: #cce216; color: var(--deep); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.student-schedule-table td.is-today-cell { background: rgba(204,226,22,.12); box-shadow: inset 3px 0 0 #cce216; }
.student-schedule-table .is-passive-day { background: #f2f6f4 !important; color: #9aaba4 !important; opacity: .82; }
.student-schedule-table thead th.is-passive-day { background: linear-gradient(135deg, #75847e, #9aa9a4) !important; color: rgba(255,255,255,.8) !important; }
.student-schedule-table td.is-passive-day { box-shadow: inset 3px 0 0 #c8d5d0; }
.student-work-row th { background: #e6f1ee; color: var(--deep); }
.student-work-row textarea { width: 100%; min-height: 112px; padding: 11px 12px; border: 1px solid #cdded8; border-radius: 12px; background: #fff; color: var(--ink); resize: vertical; box-sizing: border-box; outline: none; line-height: 1.45; }
.student-work-row textarea:focus { border-color: #00a884; box-shadow: 0 0 0 3px rgba(0,168,132,.14); }
.student-work-locked { min-height: 112px; display: grid; align-content: center; gap: 7px; padding: 12px; border: 1px dashed #cdded8; border-radius: 12px; background: #f6faf8; color: var(--muted); box-sizing: border-box; }
.student-work-locked strong { color: var(--ink); font-size: 13px; }
.student-work-locked span { font-size: 12px; line-height: 1.45; }
.student-schedule-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); background: #f8fbfa; }
.student-schedule-actions span { color: var(--muted); font-size: 13px; }
.student-schedule-actions button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: #cce216; color: var(--deep); font-weight: 850; cursor: pointer; }
.student-schedule-actions button:hover { filter: brightness(.96); transform: translateY(-1px); }
.notice { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.notice.success { border: 1px solid rgba(204,226,22,.45); background: rgba(204,226,22,.16); color: var(--deep); }
.notice.error { border: 1px solid rgba(210,57,57,.2); background: #fff0f0; color: #9b1c1c; }

@media (max-width: 1180px) {
    .stats-grid, .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-grid { grid-template-columns: 1fr; }
    .program-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-card { grid-template-columns: 1fr; }
    .motivation-hero-card { min-height: 260px; height: clamp(240px, 38vw, 300px); }
}

@media (max-width: 840px) {
    .student-shell { grid-template-columns: 1fr; }
    .student-sidebar { position: relative; height: auto; max-height: none; padding-bottom: 22px; }
    .student-topbar { position: relative; padding: 16px; flex-wrap: wrap; }
    .student-content { padding: 24px 16px; }
    .stats-grid, .video-grid, .progress-grid { grid-template-columns: 1fr; }
    .item-card { grid-template-columns: 1fr; }
    .message { max-width: 100%; }
}

/* Mobile polish for student pages */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 1180px) {
    .student-shell {
        grid-template-columns: 252px 1fr;
    }

    .student-sidebar { width: 252px; }

    .student-content {
        padding: 30px 24px;
    }

    .hero-card,
    .stats-grid,
    .video-grid,
    .progress-grid {
        gap: 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .student-shell {
        display: block;
    }

    .student-sidebar {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        z-index: auto;
        width: auto;
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 14px;
        border-radius: 0 0 22px 22px;
    }

    .student-brand {
        padding: 0;
        margin-bottom: 12px;
    }

    .student-brand img {
        width: 46px;
        height: 46px;
    }

    .student-brand strong {
        font-size: 18px;
    }

    .profile-card {
        grid-template-columns: 48px 1fr;
        align-items: center;
        margin: 0 0 12px;
        padding: 12px;
    }

    .profile-card img {
        width: 48px;
        height: 48px;
        grid-row: span 2;
    }

    .profile-card strong,
    .profile-card small {
        min-width: 0;
    }

    .student-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .student-nav a {
        min-height: 42px;
        padding: 0 10px;
        gap: 8px;
        border-radius: 10px;
        font-size: 13px;
    }

    .student-nav svg {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
    }

    .student-main {
        width: 100%;
        grid-column: auto;
    }

    .student-topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: auto;
        padding: 13px 14px;
        gap: 12px;
        align-items: flex-start;
        background: rgba(255, 255, 255, .94);
    }

    .student-topbar > div:first-child {
        min-width: 0;
    }

    .student-topbar strong {
        font-size: 15px;
    }

    .topbar-actions {
        margin-left: auto;
        gap: 8px;
    }

    .topbar-actions a {
        min-height: 38px;
        padding: 0 12px;
        border-radius: 9px;
        font-size: 13px;
        white-space: nowrap;
    }

    .student-content {
        padding: 22px 14px 34px;
    }

    .page-title {
        margin-bottom: 20px;
    }

    .page-title h1 {
        font-size: clamp(30px, 10vw, 42px);
        line-height: 1.05;
    }

    .page-title p {
        font-size: 15px;
        line-height: 1.6;
    }

    .hero-card,
    .stats-grid,
    .video-grid,
    .progress-grid,
    .overview-grid,
    .program-summary-grid {
        grid-template-columns: 1fr;
    }
    .motivation-hero-card {
        min-height: 300px;
        height: auto;
        aspect-ratio: 16 / 10;
        max-height: 380px;
    }
    .motivation-slide-content {
        padding: 22px 18px;
    }
    .motivation-words strong {
        font-size: clamp(22px, 6.5vw, 34px);
    }
    .hero-card.has-motivation .quick-card {
        grid-template-columns: 1fr;
    }
    .hero-card.has-motivation .quick-links {
        grid-template-columns: 1fr;
    }

    .welcome-card,
    .quick-card,
    .panel-card,
    .stat-card,
    .item-card,
    .progress-card {
        border-radius: 14px;
    }

    .welcome-card {
        padding: 24px;
    }

    .welcome-card h2 {
        font-size: clamp(28px, 8vw, 38px);
    }

    .quick-card,
    .panel-card {
        padding: 18px;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-card { min-height: 0; }
    .overview-empty.mini { min-height: 140px; }

    .dashboard-card,
    .program-summary-card {
        border-radius: 14px;
    }

    .dashboard-card-head {
        flex-direction: column;
        gap: 8px;
    }

    .compact-row {
        grid-template-columns: 38px 1fr;
    }

    .compact-row em {
        grid-column: 2;
        justify-self: start;
    }

    .panel-head h2 {
        font-size: 20px;
    }

    .item-card {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .item-card h3 {
        font-size: 17px;
    }

    .item-meta {
        gap: 6px;
    }

    .action-btn {
        width: 100%;
        min-height: 44px;
    }

    .message {
        max-width: 100%;
    }

    .message-form textarea,
    .task-form textarea,
    input,
    textarea,
    select {
        font-size: 16px;
    }
}

@media (max-width: 560px) {
    .student-sidebar {
        padding: 12px 12px 22px;
    }

    .profile-card {
        grid-template-columns: 44px 1fr;
    }

    .profile-card img {
        width: 44px;
        height: 44px;
    }

    .student-nav {
        grid-template-columns: 1fr;
    }

    .student-nav a {
        min-height: 40px;
    }

    .student-topbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .topbar-actions {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .topbar-actions a {
        justify-content: center;
        width: 100%;
    }

    .student-content {
        padding-inline: 12px;
    }

    .kicker {
        font-size: 11px;
    }

    .page-title h1 {
        font-size: clamp(28px, 12vw, 38px);
    }

    .stat-card strong {
        font-size: 24px;
    }

    .video-card .body {
        padding: 14px;
    }

    .empty-state {
        padding: 24px 18px;
    }

    .student-schedule-card summary {
        align-items: flex-start;
        padding: 17px;
    }

    .student-schedule-actions button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .student-schedule-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .student-schedule-actions span {
        text-align: center;
    }

    .item-card > .action-btn,
    .item-card > a.action-btn,
    .item-card > span.action-btn {
        width: 100%;
        justify-self: stretch;
    }

    .compact-row.exam-row {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
    }

    .compact-row.exam-row em {
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: center;
    }

    .page-mesajlar .wa-chat {
        height: calc(100dvh - 148px);
        min-height: 420px;
    }

    .panel-head {
        align-items: flex-start;
    }

    .item-meta {
        flex-wrap: wrap;
    }

    .action-btn.exam-locked {
        min-width: 0;
        width: 100%;
    }
}

.tk-message-snackbar-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10050;
    display: grid;
    gap: 10px;
    max-width: min(360px, calc(100vw - 40px));
    pointer-events: none;
}
.tk-message-snackbar {
    pointer-events: auto;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f322f, #1a6b52);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(15, 50, 47, .28);
    transform: translateY(14px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}
.tk-message-snackbar.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.tk-message-snackbar strong {
    font-size: 14px;
    line-height: 1.35;
}
.tk-message-snackbar span {
    font-size: 12px;
    color: rgba(255, 255, 255, .84);
}

body.page-login {
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f8f5 0%, #eef6f2 45%, #f7faf8 100%);
}

.student-login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 24px;
}

.student-login-shell {
    width: min(1120px, 100%);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(8, 47, 47, .14);
    overflow: hidden;
}

.student-login-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    align-items: stretch;
    min-height: 600px;
}

.student-login-intro {
    display: flex;
    flex-direction: column;
    padding: 48px 44px;
    background: linear-gradient(135deg, #063a2a, #073d4d);
    color: #fff;
}

.student-login-intro .kicker {
    display: block;
    order: 2;
    margin: 0 0 20px;
    line-height: 1.45;
    letter-spacing: .08em;
}

.student-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    order: 1;
    margin-bottom: 20px;
    color: #fff;
    text-decoration: none;
}

.student-login-brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.student-login-brand strong {
    display: block;
    color: #139cf3;
    font-size: 20px;
    font-weight: 800;
}

.student-login-brand small {
    display: block;
    margin-top: 4px;
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.student-login-intro h1 {
    order: 3;
    margin: 0;
    font-size: clamp(30px, 3.2vw, 42px);
    line-height: 1.08;
}

.student-login-intro p {
    order: 4;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .82);
    line-height: 1.75;
}

.student-login-benefits {
    order: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.student-login-benefits span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    font-weight: 700;
}

.student-login-benefits svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--lime);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.student-login-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 42px 44px 40px;
    background: #fff;
}

.student-login-card-top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.student-login-card-head {
    flex: 1;
    min-width: 0;
}

.student-login-kicker,
.student-login-card-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.student-login-card-head strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(18px, 1.9vw, 24px);
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
}

.student-login-alert {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #f1c2bf;
    border-radius: 12px;
    background: #fff4f3;
    color: #b42318;
    font-weight: 650;
}

.student-login-form {
    display: grid;
    gap: 18px;
}

.student-login-field {
    display: grid;
    gap: 8px;
    font-weight: 750;
}

.student-login-field > span:first-child {
    color: var(--ink);
    font-size: 14px;
}

.student-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.student-login-input-wrap svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #7a8f88;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.student-login-input-wrap input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px 0 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcfb;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.student-login-input-wrap input:focus {
    outline: none;
    border-color: #8fd0fb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(11, 150, 243, .12);
}

.student-login-submit {
    min-height: 54px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--deep), var(--deep-2));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}

.student-login-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-login-submit:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.student-login-help {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.student-login-site-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px 0 16px;
    border-radius: 12px;
    background: #f3f8f6;
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.student-login-site-link:hover {
    background: #e8f3ef;
    box-shadow: 0 8px 22px rgba(8, 47, 47, .08);
    transform: translateY(-1px);
}

.student-login-site-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--blue);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .student-login-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .student-login-intro,
    .student-login-card {
        padding: 32px 24px;
    }

    .student-login-card-head strong {
        white-space: normal;
    }

    .student-login-site-link {
        font-size: 11px;
        padding: 0 10px 0 12px;
    }
}
