/* Личный кабинет слушателя ДПО СПбГМТУ. Фирменный стиль по логотипу ДПО: фиолетово-синий #3f3a60, бирюзовый #20b097,
   мотив штурвала. Шрифт Manrope — свой файл (CSP страницы запрещает внешние шрифты). Без inline-стилей (style-src 'self'). */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink-950: #1c1932; --ink-900: #24203f; --ink-800: #2f2a50; --ink-700: #3f3a60; --ink-500: #5b5492;
  --teal: #20b097; --teal-600: #168a76; --teal-300: #6fdcc6; --lilac: #b8b2df; --on-dark: #f3f1fb;
  --bg: #f5f4fa; --card: #ffffff; --text: #1d1a33; --muted: #686385; --line: #e6e3f1; --soft: #f0eef8;
  --brand: #3f3a60; --brand-ink: #3f3a60; --brand-soft: #ecebf6; --accent: #168a76; --accent-soft: #e2f6f1;
  --ok: #138a63; --okbg: #e2f6ee; --warn: #b4610b; --warnbg: #fff0dc; --bad: #cf3a3a; --badbg: #fdeaea;
  --r: 18px;
  --shadow: 0 1px 2px rgba(28, 25, 50, .05), 0 8px 24px rgba(28, 25, 50, .06);
  --shadow-lg: 0 22px 60px rgba(28, 25, 50, .22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14122a; --card: #1d1a36; --text: #eeecf8; --muted: #a29dc4; --line: #2e2a4e; --soft: #252146;
    --brand: #b8b2df; --brand-ink: #d9d5f2; --brand-soft: #2c2852; --accent: #3cc9ad; --accent-soft: #143a35;
    --ok: #4fd6a3; --okbg: #12332a; --warn: #f2b45e; --warnbg: #35260f; --bad: #ff8080; --badbg: #3d1a1f;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; font-weight: 600; } a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.noscript, .boot { padding: 60px 16px; text-align: center; color: var(--muted); }

/* ---------- логотип ---------- */
.logo { display: block; height: 46px; width: auto; align-self: flex-start; }
.logo-wrap { display: flex; flex-direction: column; gap: 6px; }
.logo-wrap small { color: var(--lilac); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }

/* ---------- фирменный тёмный фон: панель, герой, вход ---------- */
.brandbg { position: relative; color: var(--on-dark); background: radial-gradient(130% 120% at 100% 0%, var(--ink-500) 0%, var(--ink-700) 42%, var(--ink-900) 100%); overflow: hidden; }
.brandbg::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: radial-gradient(#fff 1.2px, transparent 1.2px); background-size: 22px 22px; }
.brandbg > * { position: relative; }
svg.wheel { position: absolute; pointer-events: none; fill: none; stroke: var(--teal); stroke-linecap: round; }

/* ---------- вход и первый вход ---------- */
.auth { display: grid; grid-template-columns: minmax(380px, 1.1fr) minmax(400px, 1fr); min-height: 100vh; }
.auth-hero { padding: 44px 56px 36px; display: flex; flex-direction: column; }
.auth-hero .logo { height: 104px; margin-left: -6px; }
.auth-hero h1 { font-size: 46px; line-height: 1.06; margin: auto 0 18px; padding-top: 60px; font-weight: 800; letter-spacing: -.02em; max-width: 520px; }
.auth-hero h1 em { font-style: normal; color: var(--teal-300); }
.auth-hero p.lead { color: var(--lilac); font-size: 17px; max-width: 470px; margin: 0; }
.auth-hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 470px; }
.auth-hero li { display: flex; gap: 14px; align-items: center; color: var(--on-dark); font-weight: 600; }
.auth-hero li .ico { width: 38px; height: 38px; border-radius: 12px; background: rgba(32,176,151,.18); color: var(--teal-300); display: grid; place-items: center; flex: none; }
.auth-hero .foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--lilac); font-size: 13px; border-top: 1px solid rgba(184,178,223,.22); padding-top: 16px; margin-top: 48px; }
.auth-hero svg.wheel { right: -150px; bottom: -150px; width: 560px; height: 560px; opacity: .2; stroke-width: 4; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 30px; margin: 0 0 6px; font-weight: 800; letter-spacing: -.02em; }
.auth-card .sub { margin-bottom: 24px; }
.auth-card .note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- каркас кабинета ---------- */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 14px 16px; }
.side .logo-wrap { padding: 0 10px 26px; } .side .logo { height: 70px; margin-left: -4px; }
.side svg.wheel { left: -120px; bottom: -120px; width: 320px; height: 320px; opacity: .14; stroke-width: 5; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #d7d3ef; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.nav a.on svg.i { color: var(--teal-300); }
.nav .badge { margin-left: auto; background: var(--teal); color: #fff; border-radius: 999px; font-size: 11.5px; padding: 0 8px; font-weight: 800; line-height: 20px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(184,178,223,.2); padding: 14px 8px 0; display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none; }
.side-foot .who { min-width: 0; flex: 1; } .side-foot .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .side-foot .who small { color: var(--lilac); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { background: transparent; border: 0; color: #d7d3ef; padding: 8px; border-radius: 10px; display: grid; place-items: center; } .iconbtn:hover { background: rgba(255,255,255,.1); color: #fff; }

main { padding: 34px 42px 72px; max-width: 1200px; width: 100%; min-width: 0; }
.pagehead { margin-bottom: 24px; }
h1 { font-size: 30px; margin: 0 0 4px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 800; } h3 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
.sub { color: var(--muted); margin: 0 0 18px; } .sub.tight { margin: 0; } .small { font-size: 12.5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.flat { padding: 4px 10px; } .card.warnbox { background: var(--warnbg); border-color: transparent; box-shadow: none; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .card-h h2 { margin: 0; } .card-h .ci { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; } .card-h .ci svg.i { width: 18px; height: 18px; }
.grid2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.profile-grid { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .sp { flex: 1; } .mt { margin-top: 16px; } .mt-s { margin-top: 8px; }

/* ---------- герой на главной ---------- */
.hero { border-radius: 24px; padding: 28px 30px 26px; margin-bottom: 20px; box-shadow: var(--shadow-lg); }
.hero .eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); font-weight: 700; }
.hero h2 { font-size: 25px; line-height: 1.25; margin: 8px 0 10px; max-width: 640px; color: #fff; letter-spacing: -.01em; }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero .tag { border: 1px solid rgba(184,178,223,.35); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; color: var(--on-dark); font-weight: 600; }
.hero svg.wheel { right: -90px; top: -90px; width: 360px; height: 360px; opacity: .22; stroke-width: 5; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.journey { display: grid; grid-template-columns: repeat(5, 1fr); margin: 26px 0 4px; }
.journey .st { position: relative; text-align: center; font-size: 12.5px; color: var(--lilac); font-weight: 700; }
.journey .st::before { content: ''; position: absolute; top: 14px; left: -50%; right: 50%; height: 3px; border-radius: 3px; background: rgba(184,178,223,.25); }
.journey .st:first-child::before { display: none; }
.journey .st.done::before, .journey .st.cur::before { background: var(--teal); }
.journey .dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 7px; display: grid; place-items: center; border: 2px solid rgba(184,178,223,.45); background: var(--ink-800); color: var(--lilac); font-size: 12px; font-weight: 800; }
.journey .st.done .dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.journey .st.cur .dot { border-color: var(--teal-300); color: #fff; box-shadow: 0 0 0 6px rgba(32,176,151,.22); }
.journey .st.cur { color: #fff; }
.journey .dot svg.i { width: 15px; height: 15px; stroke-width: 3; }

/* ---------- элементы ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.ok { background: var(--okbg); color: var(--ok); } .chip.warn { background: var(--warnbg); color: var(--warn); } .chip.bad { background: var(--badbg); color: var(--bad); } .chip.grey { background: var(--soft); color: var(--muted); }
.hero .chip { background: rgba(255,255,255,.14); color: #fff; } .hero .chip.ok { background: rgba(32,176,151,.25); color: var(--teal-300); } .hero .chip.warn { background: rgba(242,180,94,.2); color: #f8c886; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 18px; background: var(--teal); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.06); text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn.ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(184,178,223,.35); }
.btn.sec { background: var(--card); color: var(--text); border: 1px solid var(--line); } .btn.danger { background: var(--card); color: var(--bad); border: 1px solid var(--badbg); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 10px; } .btn.block { width: 100%; justify-content: center; padding: 13px 18px; font-size: 15.5px; }
.btn[disabled] { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; }
.task { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); } .task:last-child { border-bottom: 0; padding-bottom: 2px; }
.task .ico { width: 42px; height: 42px; border-radius: 13px; background: var(--warnbg); color: var(--warn); display: grid; place-items: center; flex: none; }
.task .txt { flex: 1; font-weight: 600; }
.allclear { display: flex; gap: 14px; align-items: center; color: var(--muted); font-weight: 600; } .allclear .ico { width: 42px; height: 42px; border-radius: 13px; background: var(--okbg); color: var(--ok); display: grid; place-items: center; flex: none; }
.access-big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; } .access-big small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
progress { width: 100%; height: 8px; border: 0; border-radius: 8px; overflow: hidden; background: var(--soft); appearance: none; display: block; }
progress::-webkit-progress-bar { background: var(--soft); } progress::-webkit-progress-value { background: linear-gradient(90deg, var(--ink-500), var(--teal)); border-radius: 8px; } progress::-moz-progress-bar { background: var(--teal); }
.timeline { margin: 2px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 24px; } .timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.new::before { background: var(--teal); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li::after { content: ''; position: absolute; left: 8.5px; top: 21px; bottom: 0; width: 1px; background: var(--line); } .timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; } th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; } tr:last-child td { border-bottom: 0; } td.right { text-align: right; } td.nowrap { white-space: nowrap; }
.doc { display: flex; gap: 12px; align-items: center; } .doc .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; } .doc b { font-weight: 700; }
.tabs { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 8px 14px; color: var(--muted); font-weight: 700; border-radius: 10px; font-size: 14px; }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 700; }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 14px; } label.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); flex: none; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(32,176,151,.15); }
input[type=file] { padding: 8px; } input.bad, select.bad { border-color: var(--bad); }
.ferr { color: var(--bad); font-size: 12.5px; margin-top: 4px; font-weight: 600; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .fgrid .wide { grid-column: 1 / -1; }
.narrow { max-width: 260px; } .wfile { max-width: 340px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.mono { font-family: Consolas, 'Cascadia Mono', monospace; background: var(--soft); border-radius: 8px; padding: 5px 11px; overflow-wrap: anywhere; font-size: 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; } .kv .k { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.answer { margin-top: 8px; background: var(--accent-soft); border-radius: 12px; padding: 9px 13px; }
.files-list { margin: 8px 0 0; padding: 0; list-style: none; } .files-list li { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
details.consent { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0 4px; background: var(--card); } details.consent summary { cursor: pointer; font-weight: 700; font-size: 14px; }
details.consent .ctext { white-space: pre-line; color: var(--muted); font-size: 13.5px; margin-top: 8px; max-height: 240px; overflow: auto; }
.msg { border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-weight: 600; font-size: 14px; } .msg.err { background: var(--badbg); color: var(--bad); } .msg.ok { background: var(--okbg); color: var(--ok); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink-800); color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 99; display: none; max-width: calc(100vw - 40px); box-shadow: var(--shadow-lg); font-weight: 600; } .toast.on { display: block; }
.pnav { padding: 8px; } .pnav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 600; font-size: 14px; } .pnav a:hover { background: var(--soft); text-decoration: none; }
.pnav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.pnav .m { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.pnav .m.ok { background: var(--okbg); color: var(--ok); } .pnav .m.no { background: var(--warnbg); color: var(--warn); }
.pnav .m svg.i { width: 13px; height: 13px; stroke-width: 3; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; } .faq details:last-child { border-bottom: 0; } .faq summary { cursor: pointer; font-weight: 700; } .faq p { color: var(--muted); margin: 8px 0 0; }
.stepcard h3 { display: flex; align-items: center; gap: 8px; } .stepcard .num { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; }

/* ---------- телефон ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; } .auth-hero { padding: 22px 20px 28px; } .auth-hero .logo { height: 68px; } .auth-hero h1 { font-size: 28px; padding-top: 22px; margin-top: 0; } .auth-hero ul, .auth-hero .foot { display: none; }
  .auth-hero svg.wheel { width: 300px; height: 300px; right: -110px; bottom: -120px; }
  .auth-form { padding: 24px 16px 40px; align-items: flex-start; }
  .shell { grid-template-columns: 1fr; } .side { position: sticky; top: 0; z-index: 10; height: auto; padding: 10px 12px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .side .logo-wrap { padding: 0; flex: 1; } .side .logo { height: 42px; } .side .logo-wrap small { display: none; } .side svg.wheel { display: none; }
  .side-foot { border: 0; padding: 0; margin: 0; order: 1; } .side-foot .who, .side-foot .avatar { display: none; } .side .logo-wrap { order: 0; } .nav { order: 2; }
  .task { flex-wrap: wrap; } .task .txt { min-width: calc(100% - 60px); } .task .btn { margin-left: 56px; }
  .nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; width: 100%; gap: 4px; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 12px; font-size: 13.5px; }
  main { padding: 18px 16px 48px; } h1 { font-size: 24px; }
  .grid2, .grid3, .fgrid, .profile-grid, .kv { grid-template-columns: 1fr; }
  .hero { padding: 22px 18px; border-radius: 20px; } .hero h2 { font-size: 19px; } .journey .st { font-size: 10.5px; }
  table, tbody, tr, td { display: block; width: 100%; } thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 10px 0; } tr:last-child { border-bottom: 0; } td { border: 0; padding: 3px 4px; } td.right { text-align: left; padding-top: 8px; }
}
