@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-latin-ext-500.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #121212;
  --side: #1d1d1d;
  --panel: #1d1d1d;
  --panel2: #292929;
  --line: rgba(255, 255, 255, .12);
  --text: #ffffff;
  --dim: rgba(255, 255, 255, .7);
  --mute: #9e9e9e;
  --accent: #2196f3;
  --ok: #4caf50;
  --warn: #ffa726;
  --bad: #f44336;
  --info: #29b6f6;
}

:root[data-theme="light"] {
  --bg: #f5f5f5;
  --side: #ffffff;
  --panel: #ffffff;
  --panel2: #f0f0f0;
  --line: #e0e0e0;
  --text: #1f1f1f;
  --dim: #616161;
  --accent: #1976d2;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 14px; }
h2.sec { font-size: 19px; margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
h2.sec:first-child { margin-top: 0; }
h3 { font-size: 17px; margin: 0 0 10px; }
.sec-link { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.lead { color: var(--dim); margin: 0 0 18px; max-width: 760px; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; }

.side {
  position: fixed; z-index: 20; inset: 0 auto 0 0; width: 220px; background: var(--side);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; z-index: 20;
}
.me { padding: 22px 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.me .av { margin: 0 auto 8px; }
.me-name { font-weight: 700; margin-bottom: 6px; }
.nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--text);
  border-right: 3px solid transparent;
}
.nav-item:hover { background: var(--panel2); text-decoration: none; }
.nav-item.active { background: #2a2a2a; border-right-color: var(--accent); }
:root[data-theme="light"] .nav-item.active { background: var(--panel2); }
.nav-item .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12.5px; }
.logout { border-top: 1px solid var(--line); }
.ic { width: 18px; height: 18px; flex-shrink: 0; }

.page { min-height: 100vh; }
.has-side .page { margin-left: 220px; }
.top {
  display: flex; align-items: center; gap: 14px; padding: 10px 28px; height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-arma { width: 30px; height: auto; display: block; }
.auth-arma { display: block; width: 120px; height: auto; margin: 0 auto 10px; }
.brand-badge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.brand-badge .ic { width: 20px; height: 20px; }
.brand b { display: block; font-size: 19px; letter-spacing: .06em; line-height: 1; }
.brand small { display: block; font-size: 12.5px; letter-spacing: .2em; color: var(--dim); font-weight: 700; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn, .menu-btn { background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; padding: 4px 8px; }
.menu-btn { display: none; }
main { padding: 10px 28px 48px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.empty { color: var(--dim); text-align: center; padding: 24px; font-style: italic; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1, .page-head h3 { margin: 0; }
.back { display: inline-block; margin-bottom: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border: 0;
  border-radius: 6px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:disabled { background: var(--panel2); color: var(--dim); cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn-danger { background: var(--bad); }
.btn-sm { padding: 4px 10px; font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 14px; padding: 2px 4px; }
.link-btn.danger { color: var(--bad); }

.pill {
  display: inline-flex; align-items: center; background: var(--c); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 2px 9px 2px 6px; border-radius: 10px; white-space: nowrap; vertical-align: middle;
}
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 4px; }
.tag-ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.tag-bad { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.tag-warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }

.av { border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0; }
.av-empty { display: grid; place-items: center; background: var(--panel2); color: var(--dim); font-weight: 700; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid; }
.flash-ok { border-color: var(--ok); color: var(--ok); }
.flash-error { border-color: var(--bad); color: var(--bad); }
.flash-info { border-color: var(--info); color: var(--info); }

.grid-dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.shout-form { display: flex; gap: 10px; margin-bottom: 14px; }
.shout-form input { flex: 1; }
.shouts { max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.shout { display: flex; gap: 12px; padding: 10px; border-radius: 6px; }
.shout.pinned { background: var(--panel2); }
.shout-main { flex: 1; min-width: 0; }
.shout-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shout-text { margin-top: 2px; overflow-wrap: anywhere; }
.shout-mod { display: flex; flex-direction: column; align-items: flex-end; }
.pin { color: var(--warn); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: flex; gap: 14px; margin-bottom: 16px; position: relative; }
.dot { width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.tl-body { flex: 1; min-width: 0; }
.tl-text { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.tl-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dim); margin-top: 4px; font-weight: 600; }
.tl-meta a { text-transform: uppercase; }

.announcement h3 { font-size: 19px; }
.ann-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.ann-body { overflow-wrap: anywhere; }
.ann-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; font-size: 14px; color: var(--dim); }

input, select, textarea, button {
  font-family: inherit;
}
input, select, textarea {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input:disabled, select:disabled { opacity: .55; }
.form label { display: block; margin-bottom: 12px; font-size: 14px; color: var(--dim); font-weight: 600; }
.form label input, .form label select, .form label textarea { margin-top: 4px; color: var(--text); font-weight: 400; font-size: 16px; }
.form h3 { margin-top: 8px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.check, .radio { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 16px !important; font-weight: 400 !important; }
.check input, .radio input { width: auto; margin: 0 !important; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.inline-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-bottom: 14px; }
form.inline { display: inline-flex; gap: 6px; }
.search { display: flex; gap: 10px; margin-bottom: 14px; max-width: 640px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 14px; color: var(--dim); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.expired td { opacity: .5; }
.person { display: inline-flex; align-items: center; gap: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.profile-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; }
.profile-card { display: flex; align-items: center; gap: 18px; }
.profile-card h1 { margin: 0 0 6px; }
.about p { margin: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--dim); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 18px; }
.details small { display: block; color: var(--dim); font-size: 14px; }
.details b { font-weight: 600; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.sub { border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.ribbons { display: flex; flex-wrap: wrap; gap: 6px; }
.ribbon { display: inline-flex; height: 16px; width: 54px; border: 1px solid rgba(0,0,0,.4); }
.ribbon i { flex: 1; }
.award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.award { text-align: center; }
.award .ribbon { width: 90px; height: 26px; margin-bottom: 8px; }
.award p { font-style: italic; overflow-wrap: anywhere; }

.career-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 26px 22px; align-items: start; }
.career { background: var(--panel); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.career-status { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 16px; }
.st-ic { width: 22px; height: 22px; flex-shrink: 0; }
.st-ok { background: #0f1f10; color: #a5d6a7; }
.st-ok .st-ic { color: var(--ok); }
.st-warn { background: #241a0a; color: #ffe0b2; }
.st-warn .st-ic { color: var(--warn); }
.st-bad { background: #24090c; color: #f8bbd0; }
.st-bad .st-ic { color: var(--bad); }
.st-info { background: #0a1b26; color: #b3e5fc; }
.st-info .st-ic { color: var(--info); }
:root[data-theme="light"] .st-ok { background: #e8f5e9; color: #1b5e20; }
:root[data-theme="light"] .st-warn { background: #fff3e0; color: #8a4b00; }
:root[data-theme="light"] .st-bad { background: #ffebee; color: #b71c1c; }
:root[data-theme="light"] .st-info { background: #e1f5fe; color: #01579b; }
.career-body { padding: 18px 18px 20px; }
.career-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.career-emblem { width: 76px; flex-shrink: 0; }
.career-emblem .emblem { width: 76px; margin: 0; filter: none; }
.career-head h3 { font-size: 22px; font-weight: 600; margin: 0 0 2px; }
.career-div { color: var(--dim); font-size: 16px; }
.career-desc { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; padding-bottom: 12px; border-bottom: 2px solid var(--text); margin-bottom: 10px; }
.checks { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.checks li { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.checks li .st-ic { width: 18px; height: 18px; }
.checks li.ok .st-ic { color: var(--ok); }
.checks li.no .st-ic { color: var(--bad); }
.btn-apply { display: flex; width: 100%; justify-content: center; margin-top: 14px; padding: 9px; background: var(--ok); color: #0b130b; font-weight: 600; letter-spacing: .04em; border-radius: 4px; }
.btn-apply:disabled { background: #3a3a3a; color: #7a7a7a; }
:root[data-theme="light"] .btn-apply:disabled { background: #e0e0e0; color: #9e9e9e; }
.career-edit { display: inline-block; margin-top: 10px; font-size: 15px; }
.exam fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 14px; padding: 12px 14px; }
.exam legend { font-weight: 600; padding: 0 6px; }
.exam .radio { margin: 6px 0 !important; }
.answer { padding: 10px 0; border-bottom: 1px solid var(--line); }
.answer .q { font-weight: 600; margin-bottom: 4px; }
.answer .a { overflow-wrap: anywhere; }
.answer .a.right { color: var(--ok); }
.answer .a.wrong { color: var(--bad); }

@media (max-width: 1000px) {
  .grid-dash, .profile-top { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  .has-side .page { margin-left: 0; }
  .menu-btn { display: block; }
  .top { padding: 10px 16px; }
  main { padding: 10px 16px 40px; }
  .inline-form { grid-template-columns: 1fr; }
  .shout-form { flex-direction: column; }
  .career-grid, .award-grid { grid-template-columns: 1fr; }
}

.rank-ic { flex-shrink: 0; vertical-align: -2px; object-fit: contain; }
.pill .rank-ic { margin-right: 4px; }
.dot .rank-ic { vertical-align: middle; }
.av-wrap { position: relative; display: inline-block; flex-shrink: 0; line-height: 0; }
.av-wrap.online::before, .av-wrap.online::after {
  content: ""; position: absolute; right: calc(var(--s) * .07); bottom: calc(var(--s) * .07); width: clamp(8px, calc(var(--s) * .11), 14px);
  aspect-ratio: 1; border-radius: 50%; background: #4cd137; transform: translate(35%, 35%);
}
.av-wrap.online::after { border: 2px solid var(--panel); }
.av-wrap.online::before { animation: online-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; opacity: .7; }
@keyframes online-ping {
  0% { transform: translate(35%, 35%) scale(1); opacity: .7; }
  80%, 100% { transform: translate(35%, 35%) scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .av-wrap.online::before { animation: none; display: none; } }
.me .av-wrap { margin: 0 auto 8px; }
.online-text { color: var(--ok); }
.online-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.online-item { display: flex; align-items: center; gap: 10px; color: var(--text); }
.online-item:hover { text-decoration: none; background: var(--panel2); }
.online-item > span:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.online-item b { font-weight: 600; }
.online-item { padding: 4px; border-radius: 6px; }

.profile-card { gap: 24px; }
.profile-name { font-size: 26px; font-weight: 500; line-height: 1.2; }
.profile-rank { display: flex; align-items: center; gap: 6px; font-size: 17px; margin: 4px 0 10px; }
.profile-actions { display: flex; align-items: center; gap: 12px; }
.profile-actions a, .profile-actions button { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; }
.profile-actions .ic { width: 20px; height: 20px; }
.profile-actions form { display: inline-flex; }
.about h3 { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.card-title { font-size: 19px; margin: 0 0 18px; }
.details { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-bottom: 26px; }
.detail { display: flex; align-items: center; gap: 16px; padding-left: 16px; }
.detail-ic .ic { width: 22px; height: 22px; }
.detail b { display: block; font-weight: 500; font-size: 16px; }
.detail small { display: block; color: var(--dim); font-size: 14px; }
.info-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.info-boxes .sub { padding: 22px 26px; }
.info-boxes h3 { font-size: 19px; margin-bottom: 4px; }
.info-boxes h3 { color: var(--text); font-weight: 600; }
.info-boxes .two-col > div > div, .info-boxes .sub > div:not(.ribbons) { color: var(--dim); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-outline-ok { background: transparent; color: var(--ok); border: 1px solid var(--ok); justify-content: center; font-size: 14px; letter-spacing: .03em; }
.btn-block { width: 100%; }
@media (max-width: 760px) {
  .info-boxes, .two-col { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; text-align: center; }
  .profile-rank, .profile-actions { justify-content: center; }
}

.bare .brand { visibility: hidden; }
.bare main { max-width: none; }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 20px 0; }
.auth-card {
  width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 6vw, 64px); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.emblem { width: clamp(130px, 22vw, 190px); height: auto; display: block; margin: 0 auto 18px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.auth-title { font-size: 30px; margin: 6px 0 6px; letter-spacing: .02em; }
.auth-sub { color: var(--dim); margin: 0 0 26px; }
.btn-lg { padding: 12px 18px; font-size: 16px; letter-spacing: .05em; justify-content: center; }
.auth-link { display: inline-block; margin-top: 18px; text-decoration: underline; }
.side-terms { display: block; padding: 8px 18px; font-size: 14px; color: var(--dim); }
.terms { max-width: 920px; margin: 0 auto; }
.terms-tabs { justify-content: center; }
.terms-body { padding: clamp(20px, 4vw, 40px); }
.terms-body h1 { margin-bottom: 18px; }
.terms-body h3 { margin: 22px 0 6px; }
.terms-body p { color: var(--dim); margin: 0; line-height: 1.7; }
.center { text-align: center; }

@media (max-width: 1200px) {
  .details { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .info-boxes { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .profile-top { gap: 0; }
  .table th, .table td { padding: 8px 6px; font-size: 15px; }
  .page-head { align-items: flex-start; }
  .search { flex-direction: column; }
  .detail { padding-left: 0; }
  .tabs a { padding: 10px 12px; }
  h1 { font-size: 22px; }
}

/* layout metrics matched to plpd.online */
body { font-size: 16px; line-height: 1.5; }
.side { width: 240px; background: var(--side); border-right: 1px solid var(--line); }
.has-side .page { margin-left: 240px; }
.top { height: 64px; padding: 0 24px; position: sticky; top: 0; z-index: 10; background: var(--bg); }
main { padding: 8px 32px 48px; }
.me { padding: 20px 14px 14px; border-bottom: 1px solid var(--line); }
.me-name { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.nav { padding: 0; }
.nav-item { min-height: 48px; padding: 8px 16px; gap: 0; font-size: 16px; border-right: 0; cursor: pointer; }
.nav-item .ic { width: 22px; height: 22px; margin-right: 34px; }
.nav-item:hover { background: rgba(255, 255, 255, .08); }
.nav-item.active { background: rgba(255, 255, 255, .16); box-shadow: inset -2px 0 0 var(--accent); }
:root[data-theme="light"] .nav-item:hover { background: rgba(0, 0, 0, .05); }
:root[data-theme="light"] .nav-item.active { background: rgba(0, 0, 0, .09); }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group .chev { margin-left: auto; display: inline-flex; transition: transform .2s; }
.nav-group .chev .ic { margin: 0; width: 20px; height: 20px; }
.nav-group[open] .chev { transform: rotate(180deg); }
.nav-group[open] > summary { color: var(--accent); }
.nav-sub { display: flex; align-items: center; min-height: 44px; padding: 8px 16px 8px 72px; color: var(--text); font-size: 15px; }
.nav-sub:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.nav-sub.active { background: rgba(255, 255, 255, .16); }
.nav .count { margin-left: auto; margin-right: 8px; }
.side-terms { margin-top: auto; padding: 12px 16px; font-size: 13px; }
.top-actions { gap: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text); padding: 0; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn .badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.brand b { font-size: 20px; }
.brand small { font-size: 11px; }
.card { padding: 16px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 24px; }
h2.sec { font-size: 20px; font-weight: 500; margin: 24px 0 12px; }
h1 { font-size: 24px; font-weight: 500; }
.shout { background: var(--panel); border-radius: 4px; padding: 8px; }
.shout.pinned { background: var(--panel2); }
.shout-form { border: 1px solid var(--line); border-radius: 4px; padding: 0 0 0 14px; align-items: center; }
.shout-form input { border: 0; background: transparent; height: 54px; padding: 0; }
.shout-form input:focus { outline: 0; }
.shout-form .btn { background: transparent; color: var(--accent); }
.side-scrim { display: none; }
.table th { font-size: 14px; color: var(--text); font-weight: 500; }
.table td { font-size: 14px; }
.btn { border-radius: 4px; font-weight: 500; letter-spacing: .03em; }
.tabs a { font-size: 14px; font-weight: 500; }

@media (max-width: 1100px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
  .has-side .page { margin-left: 0; }
  .menu-btn { display: block; }
  .side.open + .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 15; }
}
@media (max-width: 760px) {
  main { padding: 8px 16px 40px; }
  .top { padding: 0 12px; }
  .icon-btn { width: 36px; height: 36px; }
}

/* shared list / chip / tag helpers */
.tag-info { background: color-mix(in srgb, var(--info) 20%, transparent); color: var(--info); }
.tag-mute { background: rgba(255, 255, 255, .08); color: var(--dim); }
.link-btn.ok { color: var(--ok); font-weight: 600; letter-spacing: .03em; display: inline-block; margin-top: 10px; }
.click-row { cursor: pointer; }
.click-row:hover td { background: rgba(255, 255, 255, .03); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 16px; background: var(--panel2); color: var(--text); font-size: 14px; }
.chip.on { background: var(--accent); color: #fff; }
a.chip:hover { text-decoration: none; filter: brightness(1.15); }
.list-card { padding: 0; overflow: hidden; }
.note-row, .conv-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.note-row:last-child, .conv-row:last-child { border-bottom: 0; }
.note-row:hover, .conv-row:hover { background: rgba(255, 255, 255, .04); text-decoration: none; }
.note-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.note-row.unread .note-dot { background: var(--accent); }
.note-row.unread .note-text, .conv-row.unread b { font-weight: 600; }
.note-text { flex: 1; min-width: 0; }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-main .dim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row.unread { box-shadow: inset 3px 0 0 var(--accent); }
.pick-list { display: flex; flex-direction: column; gap: 4px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 4px; color: var(--text); }
.pick:hover { background: var(--panel2); text-decoration: none; }
.pick.on { background: var(--panel2); margin-bottom: 14px; }
.pick > span:nth-child(2) { flex: 1; }

.chat { display: flex; flex-direction: column; padding: 0; height: calc(100vh - 170px); min-height: 420px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: min(70%, 640px); background: var(--panel2); padding: 8px 12px; border-radius: 12px 12px 12px 4px; align-self: flex-start; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: #1565c0; border-radius: 12px 12px 4px 12px; color: #fff; }
.bubble span { display: block; font-size: 11px; opacity: .65; margin-top: 2px; text-align: right; }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; }

.res-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.res-filter { padding: 8px 0; display: flex; flex-direction: column; }
.res-filter-title { padding: 6px 16px; letter-spacing: .06em; }
.res-filter a { padding: 10px 16px; color: var(--text); font-size: 15px; }
.res-filter a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.res-filter a.active { background: rgba(255, 255, 255, .14); }
.res-kinds { margin-bottom: 12px; }
.res-row { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 8px; color: var(--text); }
.res-row:hover { background: #242424; text-decoration: none; }
.res-kind { background: var(--c); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 3px 8px; border-radius: 3px; min-width: 76px; text-align: center; }
.res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-main .ic { width: 14px; height: 14px; vertical-align: -1px; }
.res-arrow { font-size: 24px; color: var(--dim); }
.doc-body { margin-top: 16px; line-height: 1.7; overflow-wrap: anywhere; }

.hd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.reply-body { overflow-wrap: anywhere; }
.reply.internal { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }

.center-sec { justify-content: center; text-align: center; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.contact-grid .card { margin-bottom: 0; }
.contact-head { display: flex; align-items: center; gap: 14px; }
.contact-head > div { flex: 1; min-width: 0; }
.contact p { margin: 12px 0 0; }

@media (max-width: 1000px) {
  .res-layout, .hd-layout { grid-template-columns: minmax(0, 1fr); }
}

/* fine details matched to plpd.online profile */
.pill { height: 24px; padding: 0 8px; border-radius: 16px; font-size: 13px; font-weight: 400; }
.av-wrap.ringed { border: 2px solid var(--rc); border-radius: 50%; padding: 0; }
.av-wrap.ringed > .av { width: calc(var(--s) - 4px) !important; height: calc(var(--s) - 4px) !important; }
.av-wrap.online::before, .av-wrap.online::after { all: unset; }
.av-wrap.online::after {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #44b700;
  right: 14.6%; bottom: 14.6%; transform: translate(50%, 50%); box-shadow: 0 0 0 2px var(--panel);
}
.av-wrap.online::before {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; border: 1px solid #44b700; box-sizing: border-box;
  right: 14.6%; bottom: 14.6%; transform: translate(50%, 50%) scale(.8); animation: online-ripple 1.2s ease-in-out infinite; z-index: 1;
}
@keyframes online-ripple {
  0% { transform: translate(50%, 50%) scale(.8); opacity: 1; }
  100% { transform: translate(50%, 50%) scale(2.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .av-wrap.online::before { animation: none; opacity: 0; } }
.me .av-wrap { margin: 0 auto; }
.me-name { margin: 4px 0 6px; }
.nav-item .ic { width: 24px; height: 24px; margin-right: 32px; }
.icon-btn .ic { width: 24px; height: 24px; }

.profile-top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.profile-card { padding: 15px; gap: 25px; align-items: center; }
.profile-name { font-size: 24px; font-weight: 400; line-height: 32px; }
.profile-rank { font-size: 16px; margin: 0 0 6px; gap: 4px; }
.profile-actions { gap: 0; margin-left: -5px; }
.profile-actions a, .profile-actions button { width: 34px; height: 34px; padding: 5px; border-radius: 50%; color: #29b6f6; justify-content: center; align-items: center; }
.profile-actions a:hover, .profile-actions button:hover { background: rgba(41, 182, 246, .08); }
.profile-actions .ic { width: 24px; height: 24px; }
.about { padding: 15px; }
.about h3 { font-size: 20px; font-weight: 500; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.about p { font-size: 14px; font-style: italic; color: var(--dim); }
.about p i { font-style: italic; color: var(--dim); }

.icon-tabs { display: flex; padding: 0; gap: 0; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.icon-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; padding: 9px 16px; color: var(--dim); font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid transparent; white-space: nowrap; }
.icon-tabs a .ic { width: 24px; height: 24px; }
.icon-tabs a:hover { text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .04); }
.icon-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

.card-title { font-size: 20px; font-weight: 500; margin: 0 0 24px; }
.profile-top + .icon-tabs + .card { padding: 25px; }
.details { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 8px; margin-bottom: 24px; }
.detail { gap: 32px; padding-left: 32px; }
.detail-ic .ic { width: 24px; height: 24px; }
.detail b { font-size: 16px; font-weight: 400; }
.detail small { font-size: 14px; color: var(--dim); }
.info-boxes { gap: 16px; }
.info-boxes .sub { padding: 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.info-boxes h3 { font-size: 20px; font-weight: 500; margin: 0; }
.info-boxes .two-col > div > div, .info-boxes .sub > div:not(.ribbons) { color: var(--dim); font-size: 16px; }
.info-boxes .sub:last-child { padding: 17px; }
@media (max-width: 760px) {
  .detail { padding-left: 0; gap: 16px; }
  .info-boxes .sub { padding: 20px; }
}
main { padding: 36px 36px 48px; }
.top + main, .page > main { padding-top: 36px; }
.profile-top .card { margin-bottom: 16px; }
.icon-tabs { margin-bottom: 16px; }
.info-boxes .sub:last-child { padding: 30px 17px 33px; }
.me .av-wrap { display: block; width: var(--s); height: var(--s); line-height: 0; }
.me { padding-top: 17px; }
@media (max-width: 760px) { main { padding: 16px 16px 40px; } }

/* admin panel */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-grid .card { margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
a.stat:hover { background: #242424; text-decoration: none; }
.stat-value { font-size: 32px; font-weight: 500; line-height: 1.1; }
.stat-value.ok { color: var(--ok); }
.stat-value.warn { color: var(--warn); }
.stat-value.bad { color: var(--bad); }
.stat-label { color: var(--dim); font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.admin-grid .card { margin: 0; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 40px; align-items: center; gap: 12px; margin-bottom: 8px; }
.bar-row b { text-align: right; font-weight: 500; }
.bar { height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.online-grid { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }
#pasif { margin-top: 16px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-bar label { margin: 0; min-width: 220px; flex: 1; }
.filter-bar .row-actions { margin: 0; }
.nowrap { white-space: nowrap; }
.table.audit td { vertical-align: top; line-height: 1.6; }
@media (max-width: 760px) {
  .bar-row { grid-template-columns: 1fr 60px 30px; }
}

/* question builder */
.qb { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.qb-summary { margin-bottom: 4px; }
.qb-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.qb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qb-badge { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: .04em; }
.qb-badge.choice { background: rgba(33, 150, 243, .18); color: #64b5f6; }
.qb-badge.text { background: rgba(171, 71, 188, .2); color: #ce93d8; }
.qb-points { display: flex !important; align-items: center; gap: 6px; margin: 0 !important; font-size: 13px !important; }
.qb-points input { width: 64px; margin: 0 !important; padding: 4px 8px; }
.qb-tools { margin-left: auto; display: flex; gap: 4px; }
.qb-icon { background: transparent; border: 1px solid var(--line); color: var(--text); width: 30px; height: 30px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.qb-icon:hover { background: rgba(255, 255, 255, .08); }
.qb-icon.danger { color: var(--bad); }
.qb-prompt { font-size: 16px; }
.qb-options { display: flex; flex-direction: column; gap: 6px; }
.qb-option { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 4px; border: 1px solid transparent; }
.qb-option.correct { border-color: color-mix(in srgb, var(--ok) 60%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.qb-option input[type=text] { flex: 1; }
.qb-radio { display: inline-flex !important; margin: 0 !important; cursor: pointer; }
.qb-radio input { width: 18px; height: 18px; accent-color: var(--ok); margin: 0; cursor: pointer; }
.qb-correct-tag { color: var(--ok); font-size: 12px; white-space: nowrap; }
.qb-add { display: flex; gap: 10px; flex-wrap: wrap; }

/* exam */
.exam-progress { padding: 16px 20px; }
.exam-progress-title { margin-bottom: 18px; }
.exam-steps { display: flex; align-items: flex-start; justify-content: space-between; gap: 0; padding: 0 8%; margin-bottom: 8px; }
.exam-step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 140px; color: var(--dim); font-size: 13px; }
.exam-step b { font-weight: 500; }
.exam-step-dot { width: 26px; height: 26px; border-radius: 50%; background: #616161; color: #fff; display: grid; place-items: center; font-size: 13px; }
.exam-step.active { color: var(--text); }
.exam-step.active .exam-step-dot { background: #7e57c2; }
.exam-line { flex: 1; height: 1px; background: #777; margin-top: 13px; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.exam-main { min-height: 280px; }
.exam-title { font-size: 30px; font-weight: 400; margin: 4px 0 14px; }
.exam-qhead { display: flex; justify-content: space-between; font-size: 20px; margin-bottom: 10px; }
.exam-prompt { font-weight: 500; margin: 0 0 18px; overflow-wrap: anywhere; }
.exam-options { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.exam-option { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 4px; cursor: pointer; }
.exam-option:hover { background: rgba(255, 255, 255, .04); }
.exam-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.exam-main textarea { margin-bottom: 18px; font-size: 15px; }
.exam-nav { display: flex; gap: 10px; }
.btn-ok { background: var(--ok); color: #0b130b; }
.exam-side { padding: 8px 10px 12px; display: flex; flex-direction: column; }
.exam-side-sec { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding: 10px 6px 4px; }
.exam-side-item { text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-size: 15px; padding: 6px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.exam-side-item::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--dim); flex-shrink: 0; }
.exam-side-item.done::before { background: var(--ok); border-color: var(--ok); }
.exam-side-item.current { font-weight: 600; background: rgba(255, 255, 255, .06); }
.exam-side-item:hover { background: rgba(255, 255, 255, .06); }
.exam-submit { margin-top: 12px; background: #29b6f6; }
.exam-js .exam-screen { display: none; }
.exam-js .exam-screen.on { display: block; }
.exam:not(.exam-js) .exam-screen { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) {
  .exam-layout { grid-template-columns: minmax(0, 1fr); }
  .exam-steps { padding: 0; }
  .exam-step { min-width: 0; }
}
.btn-block { display: flex; width: 100%; justify-content: center; }

/* shoutbox rows matched to plpd.online */
.shouts { gap: 8px; padding-right: 4px; }
.shout { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 4px; background: var(--panel); min-height: 72px; }
.shout.pinned { background: #292929; }
:root[data-theme="light"] .shout.pinned { background: var(--panel2); }
.shout > .av-wrap { flex-shrink: 0; }
.shout-main { flex: 1; min-width: 0; padding-top: 2px; }
.shout-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 24px; }
.shout-head a { font-size: 16px; }
.shout-date { font-size: 12px; color: var(--dim); }
.shout-text { margin-top: 4px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.shout-side { flex-shrink: 0; display: flex; align-items: flex-start; }
.shout-mod { display: flex; flex-direction: row; gap: 2px; margin: 0; }
.shout-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: none; border: 0; color: var(--dim); cursor: pointer; padding: 0; }
.shout-btn .ic { width: 20px; height: 20px; }
.shout-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.shout-btn.on { color: var(--text); }
.shout-btn.danger:hover { color: var(--bad); }
.shout-form .btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; letter-spacing: .4px; }
.shout-form .btn .ic { width: 20px; height: 20px; }

/* header popovers matched to plpd.online */
.pop-wrap { position: relative; display: inline-flex; }
.pop { position: absolute; top: calc(100% + 6px); right: -8px; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; z-index: 50; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.pop-title { font-size: 20px; font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pop-body { max-height: 360px; overflow-y: auto; }
.pop-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; color: var(--text); border-bottom: 1px solid var(--line); font-size: 14px; }
.pop-item:hover { background: rgba(255, 255, 255, .05); text-decoration: none; }
.pop-item:last-child { border-bottom: 0; }
.pop-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.pop-item.unread .pop-dot { background: var(--accent); }
.pop-item.unread .pop-text { font-weight: 500; }
.pop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.pop-text b { font-weight: 500; }
.pop-text small { color: var(--dim); font-size: 12px; margin-top: 2px; }
.pop-item.conv .pop-text { color: var(--dim); }
.pop-item.conv .pop-text b { color: var(--text); }
.pop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; color: var(--dim); font-size: 14px; }
.pop-empty .ic { width: 26px; height: 26px; }
.pop-empty.italic { font-style: italic; align-items: flex-start; }
.pop-foot { display: flex; justify-content: center; gap: 16px; padding: 10px 12px; border-top: 1px solid var(--line); }
.pop-foot a, .pop-foot button { background: none; border: 0; color: #29b6f6; font: inherit; font-size: 13px; font-weight: 500; letter-spacing: .4px; cursor: pointer; padding: 0; }
.pop-foot a:hover, .pop-foot button:hover { text-decoration: underline; }
.badge[hidden] { display: none; }
@media (max-width: 760px) {
  .pop { position: fixed; top: 60px; right: 8px; left: 8px; width: auto; }
}

.profile-rank .rank-ic { width: 48px; height: 48px; margin-right: 4px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.about { position: relative; }
.role-chip { position: absolute; top: 12px; right: 12px; background: #f57c00; color: #fff; font-size: 12px; line-height: 22px; padding: 0 10px; border-radius: 11px; cursor: default; }
.role-chip::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px 10px; border-radius: 4px; background: #616161; color: #fff; font-size: 12px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; }
.role-chip:hover::after { opacity: 1; }
.ribbons { gap: 14px 18px; }
.ribbon-item { margin: 0; display: flex; flex-direction: column; align-items: center; width: 130px; text-align: center; }
.ribbon-item figcaption { font-size: 12px; color: var(--text); margin-top: 6px; line-height: 1.3; }
.ribbon { position: relative; width: 84px; height: 24px; border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.5); }
.ribbon-item .ribbon { width: 84px; height: 24px; }
.award .ribbon { width: 105px; height: 30px; margin-bottom: 8px; }
.ribbon-emblem { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ribbon-emblem svg { height: 80%; }
.award { padding: 20px 24px; }
.award h3 { margin: 0 0 6px; }
.award p { margin: 0 0 12px; font-size: 13px; color: var(--dim); }
.award-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }

.emp-card { padding: 14px 18px; }
.emp-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.float-field { position: relative; flex: 1 1 320px; max-width: 660px; padding-top: 14px; }
.float-field span { position: absolute; left: 0; top: 20px; color: var(--dim); font-size: 14px; pointer-events: none; transition: all .15s; }
.float-field.filled span, .float-field.focus span { top: 0; font-size: 11px; color: var(--accent); }
.float-field input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 6px 0; color: var(--text); font-size: 14px; outline: none; }
.float-field.focus input { border-bottom: 2px solid var(--accent); }
.emp-pager { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.emp-pager select { background: transparent; border: 0; color: var(--text); font-size: 13px; padding: 2px; width: auto; }
.emp-pager .pg { font-size: 22px; line-height: 1; padding: 0 6px; color: var(--text); }
.emp-pager .pg.off { color: var(--mute); opacity: .5; }
.emp-table a { color: var(--accent); }
.table th a.sort { color: inherit; }
.alert { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid; border-radius: 4px; margin-bottom: 10px; font-size: 13px; }
.alert .ic { width: 18px; height: 18px; flex-shrink: 0; }
.alert-bad { border-color: var(--bad); color: #f4c7c3; }
.alert-bad .ic { color: var(--bad); }
.alert-info { border-color: var(--info); color: #b3e5fc; }
.alert-info .ic { color: var(--info); }
.ac { position: relative; }
.ac input { width: 100%; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 2px); background: var(--panel2); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.45); z-index: 20; max-height: 320px; overflow-y: auto; }
.ac-list:empty { display: none; }
.ac-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.ac-item:hover { background: rgba(255,255,255,.08); }
.ac-item img, .ac-item .av-empty { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--panel); }
.ac-item > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.ac-item small { color: var(--dim); font-size: 12px; }
.ac-empty { padding: 10px 12px; color: var(--dim); font-size: 14px; }
.form label.short { max-width: 280px; }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 400; }
.form label.check input { width: auto; margin: 0; }
.form-actions { display: flex; gap: 14px; align-items: center; }
.form-actions .link-btn { margin-top: 0; font-weight: 600; letter-spacing: .03em; }
.link-btn.warn { color: var(--warn); }
.right { text-align: right; }
.accent { color: var(--accent); }
.complaint-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(280px, 1fr); gap: 12px; align-items: start; }
.complaint-body p { margin: 0 0 14px; overflow-wrap: anywhere; font-size: 14px; }
.convo { padding: 0; }
.convo-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.convo-body { padding: 14px 12px; font-size: 14px; overflow-wrap: anywhere; }
.convo.internal { border-left: 3px solid var(--warn); }
.chip-tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; background: #616161; color: #fff; }
.chip-tag.blue { background: #2196f3; color: #fff; }
.chip-tag.teal { background: #26a69a; color: #fff; }
.side-list { padding: 6px 12px 12px; }
.side-list label { display: block; margin: 10px 0 0; font-size: 14px; }
.side-list label select, .side-list label input { margin-top: 6px; width: 100%; }
.side-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-list .link-btn.center { display: block; width: 100%; text-align: center; margin-top: 12px; }
.side-list h3 { font-size: 14px; font-weight: 500; margin: 8px 0; }
@media (max-width: 900px) { .complaint-grid { grid-template-columns: 1fr; } }

.role-chip { background: rgb(166, 71, 71); }
.role-chip::after { transform: translateY(-4px) scale(.96); transform-origin: top right; transition: opacity .15s, transform .15s; }
.role-chip:hover::after { transform: none; }
.hd-filter { padding: 14px 12px; }
.hd-filter h3 { font-size: 14px; font-weight: 500; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mui-field, .mui-select { position: relative; display: block; margin: 0 0 12px; }
.mui-field span, .mui-select span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 14px; pointer-events: none; transition: all .15s ease; background: var(--panel); padding: 0 4px; }
.mui-field input, .mui-select select { width: 100%; height: 40px; padding: 8px 12px; background: transparent; border: 1px solid rgba(255,255,255,.23); border-radius: 4px; color: var(--text); font-size: 14px; transition: border-color .15s; }
.mui-field input:hover, .mui-select select:hover { border-color: var(--text); }
.mui-field input:focus, .mui-select select:focus { outline: none; border: 2px solid var(--accent); padding: 7px 11px; }
.mui-field.filled span, .mui-field:focus-within span, .mui-select.filled span, .mui-select:focus-within span { top: 0; font-size: 11px; color: var(--dim); }
.mui-field:focus-within span, .mui-select:focus-within span { color: var(--accent); }
.mui-select select option { background: var(--panel2); }
.mui-line { position: relative; display: block; max-width: 280px; }
.mui-line input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.42); border-radius: 0; padding: 4px 0; color: var(--text); outline: none; }
.mui-line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s cubic-bezier(0, 0, .2, 1); }
.mui-line:focus-within::after { transform: scaleX(1); }
.hd-table .link-btn.ok { margin: 8px 6px 2px; }
button.link-btn:disabled { color: var(--mute); opacity: .55; cursor: default; }
.ripple-host { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .3; transform: scale(0); animation: ripple .55s cubic-bezier(.4, 0, .2, 1) forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
main .card, main .page-head, main h2.sec, main .alert { animation: rise .28s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
select { transition: border-color .15s, box-shadow .15s; }
.nav-item, .link-btn, .btn, .pg, .chip { transition: background-color .15s, color .15s; }
@media (prefers-reduced-motion: reduce) { main .card, main .page-head, main h2.sec, main .alert, .ripple { animation: none; } }
.decision.ok { border-left: 3px solid var(--ok); }
.decision.bad { border-left: 3px solid var(--bad); }
.decision.info { border-left: 3px solid var(--info); }
.tl-actions { display: inline-flex; gap: 12px; align-items: center; }
.tl-actions form { display: inline; }
.tl-actions .link-btn { margin: 0; padding: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.mod-bar { display: flex; gap: 8px; align-items: center; }
.mod-bar select { width: auto; height: 32px; padding: 4px 8px; }
form.inline { display: inline; }
form.inline .link-btn { margin: 0 0 0 8px; font-size: 12.5px; }

.act-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.act-head h3 { margin: 0; }
.btn-new { background: var(--ok); color: #0b130b; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 4px 8px; }
.act-form { display: none; margin-bottom: 12px; }
.act-form.open { display: grid; }
.act-sub { margin: 28px 0 8px; }
.act-tabs { margin-bottom: 20px; }
.act-pane { margin: 0 14px 4px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.act-table th { font-size: 13px; color: var(--text); }
.act-table td { padding: 5px 10px; font-size: 13px; }
.act-table tr:nth-child(even) td { background: rgba(255, 255, 255, .03); }
.act-table th:last-child, .act-table td:last-child { width: 33%; }

.tag-pill { border-radius: 10px; padding: 2px 8px; font-size: 11.5px; font-weight: 500; }
.tag-pill-open { background: #2e7d32; color: #fff; }
.tag-pill-progress { background: #ed6c02; color: #fff; }
.tag-pill-closed { background: #7b1fa2; color: #fff; }
.hd-view { text-align: right; white-space: nowrap; }
.hd-view a { color: var(--ok); font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.hd-chips { border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px 8px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.hd-chips legend { font-size: 11px; color: var(--dim); padding: 0 4px; }
.chip-check input { display: none; }
.chip-check span { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: rgba(255, 255, 255, .06); color: var(--dim); cursor: pointer; }
.chip-check input:checked + span { background: rgba(255, 255, 255, .16); color: var(--text); }
.hd-clear { display: block; text-align: center; color: #ff9800; font-size: 12px; font-weight: 600; letter-spacing: .04em; margin-top: 6px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 14px 0; }
.pager a, .pager span { min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; font-size: 13px; color: var(--dim); }
.pager a.on { background: var(--accent); color: #fff; }
.pager a:hover { text-decoration: none; color: var(--text); }
