:root {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #203b33;
  background: #f5f7f6;
  font-synthesis: none;
  --nav: #162f2b;
  --blue: #0d7668;
  --teal: #0d7668;
  --line: #e3e9e7;
  --muted: #697c74;
  --danger: #bd3d43;
  --warn: #a56a08;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #70bcae; outline-offset: 2px; }
.hidden, [hidden] { display: none !important; }
.span-all, .span-2 { grid-column: 1 / -1; }
.muted { color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 550;
  color: #24374b;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: #b8cbc4; background: #f7faf8; }
.btn.primary:hover, .btn.teal:hover { background: #095e53; }
.btn:disabled { cursor: not-allowed; opacity: .58; }
.btn.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.btn.teal { border-color: var(--teal); background: var(--teal); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #efc9cc; color: var(--danger); }
.btn.small { min-height: 31px; padding: 0 10px; font-size: 13px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-weight: 750;
  letter-spacing: .02em;
  text-decoration: none;
}
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.brand-mark .icon { width: 23px; height: 23px; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
}
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 0; }

/* Public store */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.nav-actions, .row-actions, .detail-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.public-main { width: min(1230px, 100%); margin: auto; padding: 32px 24px 64px; }
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 31px 34px;
  border-radius: 20px;
  background: #173e32;
  color: #fff;
}
.intro h1 { margin: 7px 0 8px; font-size: clamp(28px, 3.4vw, 42px); }
.intro p { margin: 0; color: #bad0dd; line-height: 1.7; }
.eyebrow { color: #a7d2b5; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.eyebrow.blue { color: var(--blue); }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 32px 0 17px; }
.catalog-head h2 { margin: 4px 0 0; font-size: 22px; }
.catalog-filters { display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tabs button { height: 33px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.tabs button.active { background: #e7f2ee; color: #0d7668; font-weight: 700; }
.search { width: min(270px, 42vw); height: 41px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.app-card { display: flex; min-width: 0; min-height: 270px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.app-card:hover { border-color: #b9cfc4; box-shadow: 0 8px 26px #234c3710; }
.app-head { display: flex; align-items: center; gap: 13px; }
.app-icon { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border: 1px solid #dce7e2; border-radius: 13px; background: #edf3ef; color: #246e56; }
.app-icon .icon { width: 26px; height: 26px; }
.app-head > div { min-width: 0; }
.meta { color: var(--muted); font-size: 12px; }
.app-icon.plugin { background: #edf2fb; color: #5877bb; border-color: #e1e7f2; }
.app-icon.large { width: 76px; height: 76px; border-radius: 20px; }
.app-icon.large .icon { width: 36px; height: 36px; }
.app-icon.app-art { position: relative; overflow: hidden; background: var(--art-bg, #eef3f5); color: var(--art-fg, #4e6475); border-color: var(--art-line, #e0e7eb); box-shadow: inset 0 1px 0 #ffffff80; }
.app-art--brand { --art-bg: #edf8f1; --art-fg: #167659; --art-line: #d1e8dc; }
.app-art--blue { --art-bg: #edf5ff; --art-fg: #1677e8; --art-line: #dceaff; }
.app-art--green { --art-bg: #edfaef; --art-fg: #19a956; --art-line: #d7efdd; }
.app-art--ink { --art-bg: #20252b; --art-fg: #fff; --art-line: #20252b; }
.app-art--rainbow { --art-bg: #f4f0ff; --art-fg: #7d5bda; --art-line: #eae1fd; }
.app-art--orange { --art-bg: #fff3e9; --art-fg: #ec791a; --art-line: #f8e5d4; }
.app-art--violet { --art-bg: #f2efff; --art-fg: #7e65ca; --art-line: #e6dff9; }
.app-art--gold { --art-bg: #fff8e7; --art-fg: #b58728; --art-line: #f2e8cf; }
.app-art--slate { --art-bg: #eff4f6; --art-fg: #507184; --art-line: #dde8ed; }
.app-icon .app-icon-vector { width: 68%; height: 68%; }
.app-icon.small { width: 38px; height: 38px; border-radius: 10px; }
.app-icon .app-icon-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.app-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-cell > div { min-width: 0; }
.app-cell b, .app-cell > span:not(.app-icon) { overflow-wrap: anywhere; }
.app-icon-control { display: flex; gap: 8px; align-items: center; }
.app-icon-field { display: grid; gap: 7px; margin-top: 20px; }
.app-icon-field > label { font-size: 13px; font-weight: 700; }
.app-icon-control input { min-width: 0; flex: 1; min-height: 42px; padding: 9px 11px; border: 1px solid #dce4df; border-radius: 8px; background: #fff; color: #203247; }
.app-icon-control .btn { flex-shrink: 0; }
.app-icon-preview { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.app-icon-preview small { display: block; color: var(--muted); line-height: 1.8; }
.app-card h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.app-card p { flex: 1; color: #536579; font-size: 14px; line-height: 1.65; }
.compat { display: block; margin-bottom: 14px; color: var(--muted); }
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid #edf1ee; }
.price { color: var(--nav); font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.price small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.back { display: inline-block; margin: 4px 0 18px; color: #3f617d; text-decoration: none; }
.back.center { display: block; margin-top: 18px; text-align: center; }
.detail-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.detail-hero h1 { margin: 8px 0; font-size: 27px; }
.detail-hero p { margin: 0; color: #536579; line-height: 1.7; }
.detail-meta { display: flex; gap: 22px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.detail-meta b { color: #26394d; }
.detail-panel { margin-top: 18px; }
.release-note { padding: 22px 26px; border-bottom: 1px solid #e8edf1; }
.release-note:last-child { border: 0; }
.release-note p { margin: 12px 0; color: var(--muted); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.release-note small { color: var(--muted); }

/* Authentication and result */
.auth-page { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 48%) 1fr; }
.auth-panel { display: grid; place-items: center; padding: 36px; background: #fff; }
.auth-box { width: min(400px, 100%); }
.auth-box h1 { margin: 48px 0 10px; font-size: 30px; letter-spacing: -.04em; }
.auth-box > p { margin: 0 0 27px; color: var(--muted); }
.auth-box > .btn { width: 100%; min-height: 45px; }
.form-link { margin: 18px 0 0 !important; text-align: center; font-size: 14px; }
.form-link.compact { margin-top: 9px !important; }
.form-link a { color: var(--blue); }
.auth-aside { position: relative; display: flex; overflow: hidden; align-items: center; padding: 8vw; background: #173e32; color: #fff; }
.auth-aside::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: radial-gradient(ellipse at 75% 15%, #83cba130, transparent 50%), linear-gradient(135deg, transparent 65%, #ffffff06 65%, #ffffff06 66%, transparent 66%); }
.auth-aside > div { position: relative; z-index: 1; }
.auth-aside h2 { max-width: 540px; margin: 8px 0; font-size: clamp(30px, 3vw, 46px); font-weight: 600; line-height: 1.45; letter-spacing: -.04em; }
.auth-aside p { max-width: 540px; color: #aec5d2; line-height: 1.8; }
.result-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #eef3f6; }
.result-card { width: min(520px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; }
.result-card h1 { margin: 14px 0 8px; }
.result-card p { color: var(--muted); line-height: 1.7; }
.result-card .btn { margin: 8px 4px 0; }
.result-icon { display: grid; width: 58px; height: 58px; margin: auto; place-items: center; border-radius: 50%; background: #e7f5f1; color: var(--teal); font-size: 25px; font-weight: 850; }
.result-card.error .result-icon { background: #f8e9ea; color: var(--danger); }
.result-order { display: grid; gap: 9px; margin: 22px 0; padding: 17px; border-radius: 8px; background: #f5f8fa; text-align: left; }
.result-order span { display: flex; justify-content: space-between; }
.splash { display: grid; min-height: 100vh; place-content: center; justify-items: center; gap: 9px; color: var(--nav); }
.splash small { color: var(--muted); }
.spinner { display: inline-block; width: 31px; height: 31px; border: 3px solid #d7e0e6; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Workspace */
.shell { display: grid; min-height: 100vh; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; height: 100dvh; flex-direction: column; overflow-y: auto; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: #fff; }
.sidebar .brand { display: flex; padding: 0 6px 28px; }
.nav-label { padding: 12px 12px 14px; color: #8a9991; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.menu { display: grid; gap: 6px; }
.menu a { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #62796d; font-size: 13px; text-decoration: none; }
.menu a:hover { background: #f5f8f6; color: var(--teal); }
.menu a.active { background: #eaf3ed; color: #176246; font-weight: 650; }
.menu-icon { display: flex; width: 21px; align-items: center; justify-content: center; }
.menu-icon .icon { width: 19px; height: 19px; }
.side-foot { display: grid; gap: 16px; margin-top: auto; padding: 22px 2px 0; }
.side-user { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 18px 4px 0; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 35px; height: 35px; flex-shrink: 0; place-items: center; border: 1px solid #dce8dc; border-radius: 50%; background: #eff3e7; color: #6c7854; font-size: 13px; font-weight: 700; }
.side-user > div { min-width: 0; }
.side-user b, .side-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user b { font-size: 12px; font-weight: 600; }
.side-user small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.side-foot .btn { width: 100%; color: var(--muted); font-size: 12px; }
.side-foot .icon { width: 16px; height: 16px; }
.workspace-frame { display: flex; min-width: 0; flex-direction: column; }
.workspace-bar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 36px; border-bottom: 1px solid var(--line); background: #ffffffb3; color: #466253; font-size: 12px; }
.workspace-bar > span, .workspace-bar a { display: inline-flex; align-items: center; gap: 9px; }
.workspace-bar .icon { width: 16px; height: 16px; }
.workspace-bar a { color: var(--muted); text-decoration: none; }
.breadcrumb { color: #91a198; }
.workspace { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 32px 36px 48px; }
.workspace-foot { padding: 0 36px 24px; color: #93a298; font-size: 11px; text-align: right; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.page-head h1 { margin: 0 0 9px; font-size: 26px; font-weight: 650; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.metric small { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 14px; color: var(--nav); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.panel-title { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.panel-title h2 { margin: 0; font-size: 15px; font-weight: 650; }
.panel-title > .btn { font-size: 12px; }
.panel-content { padding: 22px; }
.run-state { display: flex; align-items: center; gap: 16px; padding: 24px; }
.run-state p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.live-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: #328163; box-shadow: 0 0 0 5px #e9f4ed; }
.live-dot.warn, .live-dot.error { background: #c78d36; box-shadow: 0 0 0 5px #f9f0df; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; margin-bottom: 22px; }
.section-kicker { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.task-list { display: grid; }
.task-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); text-decoration: none; }
.task-link:last-child { border-bottom: 0; }
.task-link:hover { background: #f7faf8; }
.task-link b { font-size: 13px; font-weight: 600; }
.task-link small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.task-link strong { color: var(--teal); font-size: 23px; font-weight: 600; }
.check-list { padding: 0 22px 12px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 750px; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid #edf1ee; font-size: 12px; text-align: left; vertical-align: middle; }
th { background: #fafbf9; color: #7c8e81; font-size: 11px; font-weight: 500; white-space: nowrap; }
tbody tr:hover { background: #fcfdfb; }
tr:last-child td { border-bottom: 0; }
.cell-value { min-width: 0; overflow-wrap: anywhere; }
.cell-value > b { font-weight: 600; }
.cell-sub { display: block; max-width: 290px; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.danger-text { color: var(--danger); }
.status { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 8px; border: 1px solid #dbece0; border-radius: 6px; background: #edf7ef; color: #39784e; font-size: 11px; white-space: nowrap; }
.status.program, .status.plugin { background: #f4f7f5; border-color: var(--line); color: #6d7e73; }
.status.draft, .status.unverified, .status.pending_payment, .status.paying, .status.paid_pending_delivery, .status.beta, .status.pay-pending, .status.pay-paying, .status.deliv-pending { background: #fcf4e7; border-color: #f2e4c8; color: var(--warn); }
.status.disabled, .status.withdrawn, .status.failed, .status.cancelled, .status.bad, .status.pay-failed, .status.pay-expired, .status.deliv-failed { background: #fcf0f0; border-color: #efdada; color: var(--danger); }
.status.deliv-none { background: #f3f5f3; border-color: var(--line); color: var(--muted); }
.list-tools { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.list-tools .field { flex: 1; min-width: 110px; margin: 0; }
.list-tools .field.compact { flex: 0 1 160px; }
.list-tools .field > span { color: var(--muted); font-size: 11px; font-weight: 500; }
.pager { display: flex; min-height: 62px; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pager > span { margin-right: auto; }
.pager label { display: flex; align-items: center; gap: 7px; }
.pager select { height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; }
.order-states { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { padding: 64px 24px; color: var(--muted); font-size: 13px; text-align: center; }
.empty.compact { padding: 28px; }
.empty h2 { margin: 12px 0 10px; color: var(--nav); font-size: 18px; }
.empty p { max-width: 450px; margin: 0 auto 22px; line-height: 1.85; }

/* Forms, dialogs and data cards */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > span, .field > label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #dce4df; border-radius: 8px; background: #fff; color: #203247; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #71aa97; outline: 2px solid #e4f2e9; }
.field input:disabled, .field select:disabled { background: #f1f4f6; color: var(--muted); }
.field small, .hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.field.check { display: flex; align-items: center; gap: 9px; padding-top: 23px; }
.field.check input { width: 17px; min-height: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 13px; }
dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #ffffff50; border-radius: 16px; background: #fff; color: #203b33; box-shadow: 0 24px 100px #11291d33; }
dialog::backdrop { background: #182d2580; backdrop-filter: blur(3px); }
dialog header, dialog footer { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
dialog footer { justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); border-bottom: 0; }
dialog h2 { margin: 3px 0 0; font-size: 19px; }
dialog small { color: var(--muted); }
.icon-btn { border: 0; background: transparent; color: #647689; font-size: 26px; }
.modal-body { max-height: 64vh; overflow: auto; padding: 26px; }
dialog[data-type="program"] .type-fields.plugin, dialog[data-type="plugin"] .type-fields.program { display: none; }
.notice, .order-summary, .secret-box { margin-bottom: 18px; padding: 14px; border-radius: 7px; background: #f0f6f1; color: #526c5c; font-size: 13px; line-height: 1.8; }
.page-notice { border: 1px solid #d6e4ef; }
.order-summary { display: flex; align-items: center; justify-content: space-between; }
.order-summary b { font-size: 21px; color: #172b3e; }
.pay-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; border: 0; }
.pay-types legend { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.pay-types label { display: flex; min-height: 46px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; }
.secret-box { display: grid; gap: 8px; background: #163e32; color: #fff; }
.secret-box small { color: #9dc1d2; }
.secret-box code { overflow: auto; padding: 5px 0; font-size: 15px; white-space: nowrap; }
.instance { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.instance:last-child { border: 0; }
.instance b, .instance small { display: block; }
.instance small { margin-top: 4px; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; }
.settings-form { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.settings-form h2 { margin: 0 0 22px; font-size: 18px; }

/* Releases and downloads */
.download-tools { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin-bottom: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.download-tools .field { margin: 0; }
.release-list { display: grid; gap: 18px; }
.download-card, .release-admin { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.download-card h3 { margin: 9px 0 5px; }
.download-card p, .release-admin p { margin: 6px 0; color: #536579; line-height: 1.6; }
.download-card small { color: var(--muted); }
.hash { display: block; margin-top: 8px; color: #687b8f; font-size: 11px; overflow-wrap: anywhere; }
.release-admin { display: block; }
.release-admin header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.release-admin header small { display: flex; gap: 6px; margin-top: 7px; }
.artifact-list { margin-top: 13px; border-top: 1px solid var(--line); }
.artifact-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f4; font-size: 13px; }
.artifact-meta { min-width: 0; flex: 1; }
.artifact-meta span, .artifact-meta small { display: block; }
.artifact-list small { color: var(--muted); overflow-wrap: anywhere; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(430px, calc(100vw - 48px)); padding: 13px 17px; border-radius: 7px; background: #163e32; color: #fff; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #a53a40; }

/* Feedback and details */
dialog #modal-kicker:empty { display: none; }
.form-error { margin: 16px 0 0; padding: 12px 14px; border: 1px solid #edced1; border-radius: 8px; background: #fff4f4; color: var(--danger); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.settings-form p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.upload-progress { margin: 16px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f5f9f5; }
.upload-progress progress { width: 100%; height: 8px; margin: 10px 0; accent-color: var(--teal); }
.upload-progress small, .upload-progress span { display: block; color: var(--muted); font-size: 12px; }
.release-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.release-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; line-height: 1.7; }
.pay-types label:has(input:checked) { border-color: #71aa97; background: #f0f7f2; }
.pay-types input, .field.check input { accent-color: var(--teal); }

/* Searchable entitlement selection */
.license-fields { min-width: 0; padding: 0; margin: 0; border: 0; }
.license-load-error { margin-bottom: 16px; }
.license-load-error .btn, .rights-error .btn { margin-top: 10px; }
.rights-select { border: 1px solid #dce4df; border-radius: 8px; background: #fff; overflow: hidden; }
.rights-select summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 11px 13px; cursor: pointer; color: #203247; font-size: 13px; list-style: none; }
.rights-select summary::-webkit-details-marker { display: none; }
.rights-select summary:focus-visible { outline: 2px solid #71aa97; outline-offset: -3px; }
.rights-select[open] summary { border-bottom: 1px solid var(--line); background: #f5f9f6; }
.rights-select[open] summary > :last-child { transform: rotate(180deg); }
.rights-menu { padding: 12px; }
.rights-menu .field { margin-bottom: 10px; }
.rights-options { display: grid; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; gap: 5px; }
.right-option { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 9px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; }
.right-option:hover, .right-option:has(input:checked) { background: #f0f7f2; }
.right-option:has(input:focus-visible) { border-color: #71aa97; }
.right-option:has(input:disabled) { cursor: default; }
.right-option input[type="checkbox"] { width: 17px; min-height: 17px; height: 17px; margin: 0; flex: 0 0 17px; padding: 0; accent-color: var(--teal); }
.right-option > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.right-option b { font-size: 13px; font-weight: 600; }
.right-option small { display: block; font-size: 11px; }
.right-option em { margin-left: 7px; color: #337251; font-size: 10px; font-style: normal; white-space: nowrap; }
.right-option .right-code { color: #72847b; font-size: 10px; }
.rights-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rights-chips:empty { display: none; }
.rights-chips > span { max-width: 100%; padding: 5px 8px; border: 1px solid #dce9de; border-radius: 6px; background: #f2f7f2; font-size: 12px; overflow-wrap: anywhere; }
.rights-chips small { margin-left: 6px; color: #337251; font-size: 10px; }
[data-rights-picker] > small { display: block; margin-top: 8px; }

/* Single-license plugin rights */
.plugin-picker-tools { display: flex; align-items: end; gap: 8px; margin: 18px 0; }
.plugin-picker-tools .field { flex: 1; min-width: 0; margin: 0; }
.plugin-picker-tools .btn { flex-shrink: 0; }
.plugin-picker { display: grid; gap: 10px; }
.plugin-option { display: flex; align-items: start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.plugin-option:hover { border-color: #91b6a4; }
.plugin-option:has(input:checked) { border-color: var(--teal); background: #f0f7f2; }
.plugin-option:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.plugin-option input { flex-shrink: 0; margin: 4px 0 0; accent-color: var(--teal); }
.plugin-option > div { min-width: 0; overflow-wrap: anywhere; }
.plugin-option b { font-size: 13px; line-height: 1.8; }
.plugin-option .status { font-size: 10px; }
.plugin-option-meta { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.plugin-confirm { display: grid; gap: 18px; }
#plugin-license-summary { overflow-wrap: anywhere; }
#plugin-license-summary p { margin: 7px 0; }
#plugin-pager { padding-inline: 0; }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace, .workspace-bar { padding-inline: 24px; }
  .list-tools { flex-wrap: wrap; }
  .download-tools { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 202px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar .brand { font-size: 14px; }
  .brand small { font-size: 9px; }
  .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-panel { min-height: 100vh; }
  .detail-hero { grid-template-columns: auto 1fr; }
  .detail-hero > .btn { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: relative; height: auto; overflow: visible; padding: 16px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { width: max-content; padding: 0 0 16px; font-size: 15px; }
  .nav-label, .side-user { display: none; }
  .side-foot { position: absolute; top: 20px; right: 16px; margin: 0; padding: 0; }
  .side-foot .btn { min-height: 32px; padding: 0 10px; }
  .menu { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: thin; }
  .menu a { flex-shrink: 0; gap: 7px; min-height: 38px; padding: 9px 11px; font-size: 12px; }
  .menu-icon .icon { width: 16px; height: 16px; }
  .workspace-bar { min-height: 48px; padding: 0 18px; font-size: 11px; }
  .workspace-bar .breadcrumb { display: none; }
  .workspace { padding: 26px 16px 40px; }
  .workspace-foot { padding: 0 18px 22px; text-align: left; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric { padding: 18px; }
  .metric strong { font-size: 27px; }
  .page-head { align-items: start; flex-wrap: wrap; gap: 14px; }
  .page-head h1 { font-size: 23px; }
  .page-head p { font-size: 12px; }
  .list-tools { padding: 16px; gap: 12px; }
  .list-tools .field { flex: 1 1 100%; }
  .list-tools .field.compact { flex: 1 1 calc(50% - 12px); }
  .list-tools > .btn { flex: 1; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: block; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 8px 0; border: 0; font-size: 12px; }
  td::before { content: attr(data-label); padding-top: 2px; color: #7c8e81; font-size: 11px; }
  .cell-sub { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .pager { justify-content: start; padding-inline: 18px; }
  .pager > span { flex: 1 1 100%; }
  .pager .btn { margin-left: auto; }
  .pager .btn + .btn { margin-left: 0; }
  .settings-form { padding: 22px; }
  .download-card, .release-admin header, .artifact-list > div { align-items: stretch; flex-direction: column; }
  .download-card, .release-admin { padding: 20px; }
  .download-card > .btn { width: 100%; }
  .download-tools { padding: 18px; }
  .topbar { min-height: 68px; padding: 12px 16px; }
  .topbar .nav-actions { gap: 5px; }
  .topbar .btn { min-height: 34px; padding: 0 11px; font-size: 12px; }
  .admin-link { display: none; }
  .public-main { padding: 22px 16px 48px; }
  .intro { align-items: start; flex-direction: column; padding: 26px; }
  .catalog-head { align-items: stretch; flex-direction: column; }
  .catalog-filters { align-items: stretch; flex-wrap: wrap; }
  .search { width: 100%; }
  .app-grid { grid-template-columns: 1fr; gap: 16px; }
  .app-card { min-height: 250px; }
  .detail-hero { display: block; padding: 26px; }
  .detail-hero .app-icon { margin-bottom: 22px; }
  .detail-hero h1 { font-size: 26px; }
  .detail-hero > .btn { width: 100%; margin-top: 24px; }
  .detail-meta { flex-direction: column; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.check { padding-top: 0; }
  .modal-body { padding: 22px; }
  .app-icon-control { flex-wrap: wrap; }
  .app-icon-control input { flex-basis: 100%; }
  .plugin-option .app-icon.small { width: 30px; height: 30px; border-radius: 8px; }
  .plugin-picker-tools { flex-wrap: wrap; }
  .plugin-picker-tools .field { flex-basis: 100%; }
  .plugin-picker-tools .btn { flex: 1; }
  .plugin-option { padding: 13px; }
  dialog header { padding: 20px 22px; }
  dialog footer { padding-inline: 22px; }
}
@media (max-width: 400px) {
  .brand small { font-size: 8px; }
  .brand { gap: 8px; font-size: 14px; }
  .brand-mark { width: 32px; height: 32px; }
  .download-tools, .pay-types { grid-template-columns: 1fr; }
  .side-foot .btn .icon { display: none; }
  .row-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .spinner { animation-duration: 2s; }
}
:root { --settings-width: 760px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.selection-tools { display: flex; gap: 16px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.selection-tools label { display: flex; align-items: center; gap: 6px; }
.selection-tools input, input[data-record-select] { width: 18px; height: 18px; accent-color: #0d7668; }
.settings-tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.system-settings { max-width: var(--settings-width); }
.system-settings .settings-form[hidden] { display: none; }
.logo-editor { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-logo-preview { width: 56px; height: 56px; object-fit: contain; border: 1px solid #dbe4e2; border-radius: 8px; }
