:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: #20232b;
    background: #f6f7f9;
    --border: #dfe3ea;
    --muted: #5c6575;
    --accent: #5d3eb0;
    --accent-hover: #4b3192;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { border: 1px solid var(--border); border-radius: 5px; }
button {
    min-height: 34px;
    padding: 6px 12px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}
button:hover { background: #f1f2f6; border-color: #b9c0cc; }
button.primary { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; }
button.primary:hover { background: var(--accent-hover); }
button.quiet { border-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1520px, 100% - 64px); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 16px; }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 18px; color: inherit; text-decoration: none; }
.brand img { width: 146px; height: auto; display: block; }
.brand span { border-left: 1px solid var(--border); padding-left: 18px; color: var(--muted); }
main { padding-block: 32px 42px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
h1 { margin: 0; font-size: 27px; letter-spacing: -.025em; font-weight: 650; }
.sections { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-top: 14px; }
.sections a { padding: 12px 2px 10px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.sections a[aria-current] { color: var(--accent); border-color: var(--accent); font-weight: 650; }
.sections span { margin-left: 4px; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-block: 18px 12px; }
.filters select { min-width: 140px; font-weight: 500; }
@supports (appearance: base-select) {
    .filters select, .filters select::picker(select) { appearance: base-select; }
    .filters select::picker(select) {
        margin-block: 5px;
        padding: 4px;
        border: 1px solid var(--border);
        border-radius: 7px;
        background: #fff;
        color: #20232b;
        box-shadow: 0 5px 18px #22253626;
    }
    .filters select::picker-icon { color: var(--muted); }
    .filters option { min-height: 32px; padding: 5px 8px; border-radius: 4px; }
    .filters option:checked { background: #f1edf9; color: var(--accent); font-weight: 650; }
    .filters option:hover, .filters option:focus-visible { background: #eef0f4; }
}
label { display: grid; gap: 5px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.search { flex: 1 1 240px; }
input, select, textarea { min-width: 0; min-height: 34px; padding: 6px 9px; color: #20232b; background: #fff; }
textarea { resize: vertical; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 960px; text-align: left; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #eef0f4; color: #4b5464; font-size: .87rem; font-weight: 650; white-space: nowrap; }
.sort-heading { color: inherit; text-decoration: none; }
.sort-heading:hover, th[aria-sort] .sort-heading { color: var(--accent); }
.sort-heading span { margin-inline-start: 3px; }
.tag { color: var(--muted); white-space: nowrap; }
td { line-height: 1.45; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfbfd; }
.package { display: block; font-weight: 650; white-space: nowrap; }
.muted, .file { color: var(--muted); }
.file { display: block; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.version { white-space: nowrap; font-variant-numeric: tabular-nums; }
.description { width: 42%; color: #404856; overflow-wrap: anywhere; }
.description details summary { cursor: pointer; }
.description details:not([open]) .collapse-notes, .description details[open] .preview { display: none; }
.description p { white-space: pre-wrap; margin: 6px 0 0; }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: .92rem; white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-0 { color: #825b16; }
.state-1 { color: #176448; }
.state-2 { color: #4d4b76; }
.state-3 { color: var(--muted); }
.actions { display: flex; align-items: start; justify-content: space-between; gap: 6px; }
.actions button { min-height: 29px; padding: 4px 8px; font-size: .88rem; }
.actions .publish { color: var(--accent); font-weight: 650; }
.inline { display: inline-flex; margin: 0; }
.actions .more { margin-left: auto; width: 29px; color: var(--muted); font-weight: 750; font-size: 1rem; }
.menu {
    position: fixed;
    z-index: 3;
    display: grid;
    width: max-content;
    min-width: 180px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 18px #22253626;
}
.menu button, .menu a { width: 100%; padding: 7px 9px; text-align: left; border: 0; color: inherit; text-decoration: none; }
.menu a:hover { background: #f1f2f6; }
.danger-text, .menu .danger-text { color: #a62936; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.notice { margin: 12px 0; padding: 9px 12px; border: 1px solid #c5e2d4; border-radius: 5px; color: #19573e; background: #edf8f2; }
.notice.error { color: #982d3d; background: #fff3f4; border-color: #efcfd3; }
dialog { width: min(570px, 100% - 32px); max-height: 88vh; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: inherit; }
dialog::backdrop { background: #15182370; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-head .close { padding: 0; width: 34px; font-size: 22px; }
.dialog-body { padding: 16px 18px 18px; }
.fields { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; }
.settings-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.settings-tabs [aria-pressed=true] { background: #f1edf9; color: var(--accent); border-color: #dacff4; font-weight: 650; }
.channel-list { list-style: none; margin: 0 0 15px; padding: 0; }
.channel-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.add-channel { display: flex; gap: 10px; align-items: end; }
.add-channel label { flex: 1; }
.login-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.login-page .sign-in {
    display: grid;
    flex: 1;
    place-items: center;
    width: 100%;
    padding: 28px 14px;
    background: linear-gradient(#f7f7f9e6, #f7f7f9e6), #f7f7f9 url("helpdesk-pattern.png") repeat 0 0 / 800px auto;
}
.login-card { display: grid; gap: 14px; background: #fff; padding: 23px; border: 1px solid var(--border); border-radius: 8px; width: min(385px, 100%); }
.login-card h1 { font-size: 21px; }
.login-card input, .login-card .primary { min-height: 40px; }
.login-control, .password-control { display: grid; gap: 5px; }
.login-field { position: relative; }
.login-field input { width: 100%; padding-inline-start: 47px; }
.field-icon {
    position: absolute;
    inset-block: 1px;
    inset-inline-start: 1px;
    display: grid;
    place-items: center;
    width: 37px;
    border-start-start-radius: 4px;
    border-end-start-radius: 4px;
    background: #51466b;
    pointer-events: none;
}
.field-icon::before { content: ""; width: 18px; height: 18px; background: #fff; mask: var(--field-icon) center / contain no-repeat; }
.field-user { --field-icon: url("user-round.svg"); }
.field-lock { --field-icon: url("lock-keyhole.svg"); }
.password-field { position: relative; }
.password-field input { width: 100%; padding-inline-end: 43px; }
.password-field input::-ms-reveal { display: none; }
.password-field .password-toggle {
    position: absolute;
    inset-block: 1px;
    inset-inline-end: 1px;
    display: grid;
    place-items: center;
    width: 40px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.password-field .password-toggle:hover { background: #edf0f5; }
.password-toggle .eye-off, .password-toggle[data-visible] .eye { display: none; }
.password-toggle[data-visible] .eye-off { display: block; }
@media (max-width: 760px) {
    .shell { width: calc(100% - 28px); }
    .brand span { display: none; }
    main { padding-block: 21px; }
    .heading { align-items: start; }
    h1 { font-size: 23px; }
}
@media (max-width: 390px) {
    .brand img { width: 115px; }
    .topbar nav { gap: 0; }
    .heading { flex-direction: column; }
}

