/* LMS learner area. Builds on course.css (.cp, buttons) and shop.css (.sh-panel, .sh-field, .sh-empty).
   Prefixes: ld- page shell, lc- home, lm- other tabs. Radius scale: controls 10px, panels 14px, pills full. */

/* ─── page header + tab strip ─── */
.ld-top { padding: 28px 0 18px; }
.ld-top-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ld-top h1 { margin: 0; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.ld-hello { margin: 8px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--eh-muted); }
.ld-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: var(--eh-accent-soft); color: var(--eh-accent); }
.ld-pill--warn { background: #fff7ed; color: #c2410c; }
:root[data-theme="dark"] .ld-pill--warn { background: #2b1a0e; color: #fdba74; }
.ld-pill a { color: inherit; text-decoration: underline; margin-left: 4px; }

.ld-tabs { position: sticky; top: var(--eh-h); z-index: 20; background: var(--eh-bg); border-bottom: 1px solid var(--eh-border); }
.ld-tabs-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ld-tabs-in::-webkit-scrollbar { display: none; }
.ld-tabs a { display: inline-flex; align-items: center; height: 52px; padding: 0 14px; font-weight: 600; font-size: 15px; color: var(--eh-muted); white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s ease; }
.ld-tabs a:hover { color: var(--eh-text); }
.ld-tabs a.is-on { color: var(--eh-accent); border-bottom-color: var(--eh-accent); }
.ld-main { padding-bottom: 72px; }
.ld-section[hidden] { display: none; }

/* ─── shared headings ─── */
.lm-head { margin-top: 28px; }
.lm-head--next { margin-top: 36px; }
.lm-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.lm-head p { margin: 6px 0 0; color: var(--eh-muted); max-width: 64ch; }

/* ─── home ─── */
.lc-stats { margin: 24px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--eh-border); border-radius: 14px; overflow: hidden; }
.lc-stats li { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.lc-stats li + li { border-left: 1px solid var(--eh-border); }
.lc-stats i { font-size: 26px; color: var(--eh-accent); flex-shrink: 0; }
.lc-stats b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.lc-stats span { color: var(--eh-muted); font-size: 13.5px; }

.lc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-top: 24px; }
.lc-main { display: grid; gap: 8px; min-width: 0; }
.lc-head { margin-top: 20px; }
.lc-head:first-child { margin-top: 0; }
.lc-head h2, .lc-box h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }

.lc-continue { display: grid; grid-template-columns: 240px minmax(0, 1fr); border: 1px solid var(--eh-border); border-radius: 14px; overflow: hidden; background: var(--eh-bg); box-shadow: var(--eh-shadow); }
.lc-continue > img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; background: var(--eh-bg-soft); }
.lc-continue-body { padding: 22px 24px; display: grid; gap: 10px; align-content: center; justify-items: start; }
.lc-kicker { font-size: 12.5px; font-weight: 700; color: var(--eh-accent); }
.lc-continue h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.lc-next { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--eh-muted); font-size: 14.5px; }
.lc-next i { color: var(--eh-accent); font-size: 18px; flex-shrink: 0; }
.lc-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--eh-border); overflow: hidden; }
.lc-bar span { display: block; height: 100%; background: var(--eh-accent); border-radius: 999px; }
.lc-meta { margin: 0; color: var(--eh-muted); font-size: 13.5px; }
.lc-meta a { color: var(--eh-accent); font-weight: 600; }

.lc-courses { display: grid; gap: 14px; margin-top: 12px; }
.lc-course { border: 1px solid var(--eh-border); border-radius: 14px; background: var(--eh-bg); overflow: hidden; }
.lc-course-top { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.lc-course-info { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.lc-course-info h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.lc-ring { --p: 0; width: 56px; height: 56px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--eh-accent) calc(var(--p) * 1%), var(--eh-border) 0); position: relative; }
.lc-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 999px; background: var(--eh-bg); }
.lc-ring b { position: relative; font-size: 13px; }
.lc-ring--lg { width: 84px; height: 84px; }
.lc-ring--lg::before { inset: 8px; }
.lc-ring--lg b { font-size: 17px; }
.lc-badge { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--eh-bg-soft); color: var(--eh-muted); }
.lc-badge--progress { background: var(--eh-accent-soft); color: var(--eh-accent); }
.lc-badge--completed { background: #dcfce7; color: #166534; }
:root[data-theme="dark"] .lc-badge--completed { background: #14301f; color: #4ade80; }

.lc-lessons { border-top: 1px solid var(--eh-border); }
.lc-lessons summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-weight: 600; font-size: 14.5px; color: var(--eh-muted); background: var(--eh-bg-soft); }
.lc-lessons summary::-webkit-details-marker { display: none; }
.lc-lessons summary i { transition: transform .2s ease; }
.lc-lessons[open] summary i { transform: rotate(180deg); }
.lc-lessons ol { margin: 0; padding: 4px 20px 8px; list-style: none; max-height: 360px; overflow-y: auto; }
.lc-lessons li + li { border-top: 1px solid var(--eh-border); }
.lc-lessons li a { display: flex; align-items: center; gap: 10px; padding: 11px 0; font-size: 14.5px; }
.lc-lessons li a:hover span { color: var(--eh-accent); }
.lc-lessons li a span { flex: 1; min-width: 0; }
.lc-lessons li a i { font-size: 20px; color: var(--eh-muted); flex-shrink: 0; }
.lc-lessons li.is-done a i:first-child { color: var(--eh-accent); }
.lc-lessons li a .lc-mark { color: var(--eh-accent); font-size: 17px; }
.lc-lessons li small { color: var(--eh-muted); font-size: 12.5px; }

.lc-reco { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lc-reco-card { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--eh-border); border-radius: 14px; background: var(--eh-bg); transition: border-color .2s ease, transform .2s ease; }
.lc-reco-card:hover { border-color: var(--eh-accent); transform: translateY(-2px); }
.lc-reco-card i { font-size: 26px; color: var(--eh-accent); margin-bottom: 4px; }
.lc-reco-card span { color: var(--eh-muted); font-size: 14px; }

.lc-side { display: grid; gap: 16px; position: sticky; top: calc(var(--eh-h) + 68px); }
.lc-box { border: 1px solid var(--eh-border); border-radius: 14px; padding: 20px; background: var(--eh-bg); }
.lc-box h2 { margin-bottom: 14px; font-size: 17px; }
.lc-goal { display: flex; gap: 16px; align-items: center; }
.lc-goal p { margin: 0; color: var(--eh-muted); font-size: 14.5px; }
.lc-goal-set { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 14px; }
.lc-goal-set select { height: 40px; padding: 0 10px; border: 1px solid var(--eh-border); border-radius: 10px; background: var(--eh-bg); color: var(--eh-text); font: inherit; }
.lc-empty { margin: 0; color: var(--eh-muted); font-size: 14.5px; }
.lc-live, .lc-news { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.lc-live li { display: flex; gap: 12px; }
.lc-live time { flex-shrink: 0; width: 48px; height: 52px; border-radius: 10px; background: var(--eh-accent-soft); color: var(--eh-accent); display: grid; place-items: center; align-content: center; line-height: 1.1; }
.lc-live time b { font-size: 18px; }
.lc-live time span { font-size: 12px; font-weight: 700; }
.lc-live strong, .lc-news strong { display: block; font-size: 14.5px; line-height: 1.3; }
.lc-live small, .lc-news small { display: block; color: var(--eh-muted); font-size: 13px; }
.lc-live a { color: var(--eh-accent); font-weight: 700; font-size: 13.5px; }
.lc-news p { margin: 2px 0; color: var(--eh-muted); font-size: 14px; }

.lc-notes { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.lc-notes li { padding: 16px 18px; border: 1px solid var(--eh-border); border-radius: 14px; }
.lc-notes p { margin: 0 0 10px; }
.lc-notes li > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; }
.lc-notes li > div a { color: var(--eh-accent); font-weight: 600; }
.lc-spin { animation: lc-spin .8s linear infinite; }
@keyframes lc-spin { to { transform: rotate(360deg); } }

/* ─── certificates / bookmarks rows ─── */
.lm-rows { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.lm-rows li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--eh-border); border-radius: 14px; }
.lm-rows li > i { font-size: 30px; color: var(--eh-accent); flex-shrink: 0; }
.lm-rows li > div { flex: 1; min-width: 0; }
.lm-rows small { display: block; color: var(--eh-muted); font-size: 13px; overflow-wrap: anywhere; }

/* ─── mock tests + quizzes ─── */
.lm-list { margin-top: 16px; display: grid; gap: 14px; }
.lm-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border: 1px solid var(--eh-border); border-radius: 14px; background: var(--eh-bg); transition: border-color .2s ease; }
.lm-item:hover { border-color: var(--eh-accent); }
.lm-item-body { min-width: 0; }
.lm-item h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.lm-item p { margin: 4px 0 0; color: var(--eh-muted); font-size: 14.5px; }
.lm-chips { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.lm-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--eh-bg-soft); color: var(--eh-muted); font-size: 13px; font-weight: 600; }
.lm-chips i { color: var(--eh-accent); font-size: 15px; }
.lm-item .cp-btn { flex-shrink: 0; }

/* ─── resume + interview files ─── */
.lm-search { position: relative; display: block; margin-top: 16px; max-width: 420px; }
.lm-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--eh-muted); font-size: 19px; pointer-events: none; }
.lm-search input { width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--eh-border); border-radius: 10px; background: var(--eh-bg); color: var(--eh-text); font: inherit; }
.lm-search input:focus-visible { outline: 2px solid var(--eh-accent); outline-offset: 1px; }
.lm-files { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lm-files li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--eh-border); border-radius: 14px; background: var(--eh-bg); }
.lm-files li[hidden] { display: none; }
.lm-files li > i { font-size: 28px; color: var(--eh-accent); flex-shrink: 0; }
.lm-files li > strong { flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; }
.lm-files .cp-btn { height: 40px; padding: 0 14px; flex-shrink: 0; }

/* ─── consultation ─── */
.lm-consult { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.lm-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.lm-checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.lm-checks i { color: var(--eh-accent); font-size: 22px; margin-top: 1px; flex-shrink: 0; }
.lm-wide { grid-column: 1 / -1; }
.lm-submit { margin-top: 16px; }
.cp-phone select { min-width: 0; width: 100%; text-overflow: ellipsis; height: 46px; padding: 0 8px; border: 1px solid var(--eh-border); border-radius: 10px; background: var(--eh-bg); color: var(--eh-text); font: inherit; font-weight: 400; }
.cp-phone { grid-template-columns: 140px minmax(0, 1fr); }
.sh-panel textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--eh-border); border-radius: 10px; background: var(--eh-bg); color: var(--eh-text); font: inherit; font-weight: 400; resize: vertical; }
.sh-panel textarea:focus-visible { outline: 2px solid var(--eh-accent); outline-offset: 1px; }

/* ─── feedback ─── */
.lm-fb { margin-top: 20px; max-width: 640px; }
.lm-fb form { display: grid; gap: 16px; }
.ld-stars { display: flex; gap: 6px; }
.ld-star { background: none; border: 0; padding: 0; font-size: 36px; color: var(--eh-border); cursor: pointer; line-height: 1; transition: color .1s ease, transform .1s ease; }
.ld-star:hover, .ld-star:focus-visible { transform: scale(1.12); }
.ld-star.is-on { color: #ca8a04; }
:root[data-theme="dark"] .ld-star.is-on { color: #fbbf24; }
.lm-fb-list { margin-top: 14px; display: grid; gap: 14px; max-width: 640px; }
.ld-feedback-item { padding: 18px 20px; border: 1px solid var(--eh-border); border-radius: 14px; background: var(--eh-bg); }
.ld-feedback-stars { display: flex; gap: 3px; margin-bottom: 8px; font-size: 20px; }
.ld-feedback-star--on { color: #ca8a04; }
:root[data-theme="dark"] .ld-feedback-star--on { color: #fbbf24; }
.ld-feedback-star--off { color: var(--eh-border); }
.ld-feedback-text { margin: 0 0 12px; line-height: 1.6; }
.ld-feedback-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--eh-muted); font-size: 13.5px; }
.ld-feedback-edit { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--eh-accent); font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 1100px) {
  .lc-grid { grid-template-columns: minmax(0, 1fr); }
  .lc-side { position: static; }
  .lc-stats { grid-template-columns: 1fr 1fr; }
  .lc-stats li:nth-child(3) { border-left: 0; }
  .lc-stats li:nth-child(n + 3) { border-top: 1px solid var(--eh-border); }
  .lm-consult { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .lm-files { grid-template-columns: 1fr; }
  .lm-item { flex-direction: column; align-items: stretch; }
  .lm-item .cp-btn { width: 100%; }
}
@media (max-width: 640px) {
  .lc-continue { grid-template-columns: 1fr; }
  .lc-continue > img { min-height: 0; aspect-ratio: 16 / 9; }
  .lc-course-top { flex-wrap: wrap; }
  .lc-course-top .cp-btn { width: 100%; }
  .lc-reco { grid-template-columns: 1fr; }
  .ld-top-row .cp-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ld *, .lc-spin { transition: none !important; animation: none !important; } }

/* match the 1400px site header bar */
.ld .cp-wrap { max-width: 1400px; }

/* country picker (flag images, searchable) */
.cc { position: relative; }
.cc-btn { width: 100%; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--eh-border); border-radius: 10px; background: var(--eh-bg); color: var(--eh-text); font: inherit; font-weight: 400; cursor: pointer; }
.cc-btn:focus-visible { outline: 2px solid var(--eh-accent); outline-offset: 1px; }
.cc-btn img, .cc-pop li img { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; flex-shrink: 0; background: var(--eh-bg-soft); }
.cc-btn span { flex: 1; text-align: left; }
.cc-btn i { color: var(--eh-muted); }
.cc-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 300px; max-width: calc(100vw - 40px); background: var(--eh-bg); border: 1px solid var(--eh-border); border-radius: 14px; box-shadow: var(--eh-shadow); overflow: hidden; }
.cc-pop[hidden] { display: none; }
.cc-pop input { width: 100%; height: 44px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--eh-border); background: var(--eh-bg); color: var(--eh-text); font: inherit; font-weight: 400; }
.cc-pop input:focus-visible { outline: 2px solid var(--eh-accent); outline-offset: -2px; }
.cc-pop ul { margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto; }
.cc-pop li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 400; cursor: pointer; }
.cc-pop li:hover { background: var(--eh-bg-soft); }

/* progress page */
.lp-sec { margin-top: 32px; min-width: 0; }
.lp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.lp-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.lp-head a { color: var(--eh-accent); font-weight: 600; font-size: 14.5px; }
.lp-courses { margin: 0; padding: 0; list-style: none; border: 1px solid var(--eh-border); border-radius: 14px; overflow: hidden; }
.lp-courses li { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: center; padding: 16px 20px; }
.lp-courses li + li { border-top: 1px solid var(--eh-border); }
.lp-courses small, .lp-list small { display: block; color: var(--eh-muted); font-size: 13.5px; }
.lp-bar { display: flex; align-items: center; gap: 12px; }
.lp-bar .lc-bar { flex: 1; }
.lp-bar b { min-width: 40px; text-align: right; font-size: 14px; }
.lp-list { border: 1px solid var(--eh-border); border-radius: 14px; padding: 4px 20px; margin-bottom: 12px; }
.lp-sum b { font-size: 17px; }
.lp-none { margin: 0 0 12px; color: var(--eh-muted); }
.lp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 860px) { .lp-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .lp-courses li { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.lp-list li { align-items: center; }
.lp-list .lc-badge { flex-shrink: 0; line-height: 1.4; }
.lc-badge--fail { background: #fee2e2; color: #991b1b; }
:root[data-theme="dark"] .lc-badge--fail { background: #2a1517; color: #fca5a5; }

.lm-pager { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.lm-pager button { min-width: 40px; padding: 8px 12px; border: 1px solid var(--eh-border); border-radius: 10px; background: var(--eh-bg); color: inherit; font: inherit; cursor: pointer; }
.lm-pager button.on { background: var(--eh-text, #111); color: var(--eh-bg); border-color: transparent; }
.lm-pager button:disabled { opacity: .4; cursor: default; }
.lm-item[hidden] { display: none; }
.lm-cats { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.lm-cats button { padding: 7px 14px; border: 1px solid var(--eh-border); border-radius: 999px; background: var(--eh-bg); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.lm-cats button.on { background: var(--eh-text, #111); color: var(--eh-bg); border-color: transparent; }
.lm-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
