/* Кабинет и рабочие разделы администратора. */
.cab {
  --cab-selected: color-mix(in srgb, var(--brand) 11%, var(--surface));
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 40px;
  padding: 32px 24px 56px;
}

.cnav { display: grid; gap: 4px; }
.cnav a { min-height: 42px; height: auto; margin: 0; padding: 8px 12px; }
.cnav a.on { color: var(--brand); background: var(--cab-selected); }
.chelp { margin-top: 24px; padding-inline: 12px; }
.ctitle h1 { overflow-wrap: anywhere; }
.cab .ctitle { margin-bottom: 24px; }
.cab .chead, .adm .chead { margin-top: 28px; }
.cab .chead h2, .adm .chead h2 { font-size: 20px; }
.cab :is(a, button, summary):hover, .adm :is(a, button, summary):hover { text-decoration: none; }
.cab summary:focus-visible, .adm summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.cab .subr {
  grid-template-columns: 36px minmax(0, 1fr) minmax(114px, 26%) auto;
  gap: 14px;
  padding: 16px 18px;
  background: var(--cab-selected);
  border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
}
.cab .subr img { width: 36px; height: 36px; }
.cab .subr.warn { background: var(--warnbg); border-color: color-mix(in srgb, var(--warn) 22%, var(--line)); }
.cab .subr.bad { background: var(--badbg); border-color: color-mix(in srgb, var(--bad) 22%, var(--line)); }
.cab .subr .when b { font-size: 15px; margin-bottom: 4px; }
.cab .steps3 { background: none; border: 0; border-radius: 0; gap: 14px; }
.cab .steps3 > div { padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); }

.cab .apps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 150px) max-content 206px;
  gap: 0 12px;
  border-top: 1px solid var(--line);
}
.cab .ap {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 150px 105px 206px;
  grid-template-columns: subgrid;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
.cab .ap .top img { width: 36px; height: 36px; }
.cab .ap .top div { overflow-wrap: anywhere; }
.cab .ap .linkbtn { grid-column: 2; align-self: center; justify-self: start; text-align: left; }
.cab .ap > .tag { grid-column: 3; justify-self: start; }
.cab .ap .bot {
  grid-column: 4;
  flex-flow: row wrap;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  gap: 8px;
}
.cab .cab-macos { flex-basis: 100%; color: var(--soft); font-size: 13px; }

.cab-pricing { margin-bottom: 20px; }
.cab-paid { margin-bottom: 14px; }
.cab-paid b, .cab-summary b, .cab-devices-head b { color: var(--ink); }
.cab-pricing-top, .cab-devices-head, .cab-device-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cab-pricing-top { margin-bottom: 16px; }
.cab-pricing-top h2, .cab-availability :is(h2, h3) { font-size: 20px; }
.cab-pricing-top p { margin-top: 4px; color: var(--soft); font-size: 14px; }
.cab-buyers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-inline-size: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.cab-buyers label, .cab-plan { position: relative; cursor: pointer; }
.cab-buyers input, .cab-plan input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cab-buyers label span {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
}
.cab-buyers label:hover span { background: var(--tint); }
.cab-buyers input:checked + span { background: var(--cab-selected); color: var(--brand); }
.cab-buyers label:has(input:focus-visible), .cab-plan:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
  z-index: 1;
}
.cab-buyer-org, .cab-pricing:has(.cab-buyers input[value="organization"]:checked) .cab-plan-layout { display: none; }
.cab-pricing:has(.cab-buyers input[value="organization"]:checked) .cab-buyer-org { display: block; }

.cab-plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 33%); gap: 20px; align-items: start; }
.cab-plans { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cab-plan-head, .cab-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, auto) minmax(79px, auto) 22px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  font-size: 14px;
}
.cab-plan-head { color: var(--soft); font-size: 12.5px; }
.cab-plan-head span:nth-child(2), .cab-plan-head span:nth-child(3), .cab-plan-cost, .cab-plan-month { text-align: right; }
.cab-plan { min-height: 61px; border-top: 1px solid var(--line); color: var(--ink); }
.cab-plan:last-child { border-radius: 0 0 9px 9px; }
.cab-plan:hover { background: var(--tint); }
.cab-plan:has(input:checked) { background: var(--cab-selected); box-shadow: inset 0 0 0 1px var(--brand); }
.cab-plan:has(input:focus-visible):last-child { border-radius: 0 0 9px 9px; }
.cab-plan-term > *, .cab-plan-cost > * { display: block; }
.cab-plan-term small, .cab-plan-cost s { color: var(--soft); font-size: 12px; }
.cab-plan-cost, .cab-plan-month { white-space: nowrap; }
.cab-plan-month { color: var(--soft); font-size: 13px; }
.cab-plan-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--mute);
  border-radius: 6px;
  background: var(--surface);
}
.cab-plan-check svg { width: 16px; height: 16px; visibility: hidden; }
.cab-plan input:checked ~ .cab-plan-check { color: #fff; background: #2678e0; border-color: #2678e0; }
.cab-plan input:checked ~ .cab-plan-check svg { visibility: visible; }

.cab-summary { padding: 18px; font-size: 14px; }
.cab-summary p, .cab-summary-row { color: var(--soft); }
.cab-total { display: block; margin: 6px 0; color: var(--ink); font-size: 32px; line-height: 1.2; }
.cab-summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cab-summary-row b { white-space: nowrap; }
.cab-summary-row + p { margin-top: 12px; }
.cab-summary .btn { width: 100%; margin-top: 14px; }
.cab-summary .cab-pay-note { margin-top: 10px; font-size: 12.5px; }
.cab-availability { padding: 20px; }
.cab-availability :is(h2, h3) { margin-top: 8px; }
.cab-availability p { margin: 4px 0 16px; color: var(--soft); }
.cab-availability p:last-child { margin-bottom: 0; }
.cab .promo { margin: 12px 0 0; }
.cab .promo summary { justify-content: flex-start; flex-wrap: wrap; }
.cab .promo summary::after, .cab .faq summary::after {
  content: "+";
  width: auto;
  height: auto;
  margin-left: auto;
  background: none;
  color: var(--soft);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: none;
}
.cab .promo[open]:not(.closing) summary::after, .cab .faq details[open]:not(.closing) summary::after { content: "−"; transform: none; }
.cab .promof { min-width: min(100%, 240px); flex-wrap: wrap; }
.cab .tblw, .adm .tblw { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
:is(.cab, .adm) .tbl tbody tr:last-child td { border-bottom: 0; }
.cab .tbl :is(td.r, th.r) { white-space: nowrap; }

.cab .cab-devices-head { margin-top: 0; }
.cab-device-actions { justify-content: flex-start; }
.cab-devices { display: grid; gap: 12px; }
.cab-device { padding: 18px; }
.cab-device-main { display: flex; gap: 12px; align-items: flex-start; }
.cab-device-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 8px; color: var(--soft); background: var(--tint); }
.cab-device-info { min-width: 0; flex: 1; }
.cab-device-info p, .cab-device-meta { font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.cab .rn summary { min-height: 30px; }
.cab .rn summary b { overflow-wrap: anywhere; white-space: normal; }
.cab-pencil { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 5px; }
.cab .rn summary:hover .cab-pencil, .cab .rn[open] .cab-pencil { background: var(--tint); }
.cab-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cab-device-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.cab-device-bottom { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cab .help summary { padding-block: 16px; font-size: 16px; }
.cab .helpnext { padding: 0; background: none; border-radius: 0; }
.cab .helpnext span { flex: 0 1 auto; min-width: 0; }
.cab .rel { padding: 14px 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.cab .sec2, .adm .sec2 { gap: 18px 36px; padding-block: 22px; }

.adm { padding-top: 28px; padding-bottom: 56px; }
.adm .admtabs { display: flex; gap: 4px; padding: 0 0 10px; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.adm .admtabs a, .adm .chips a { min-height: 36px; }
.adm .chips a.on { background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: var(--brand); box-shadow: none; }
.adm .chead > .hrow { min-width: 0; max-width: 100%; }
.adm .chead .chips { flex-wrap: wrap; }
.adm .kpis { gap: 8px; }
.adm .kpi { padding: 12px 16px; }
.adm .kpi b { font-size: 25px; }
.adm .card { padding: 18px; }
.adm .card.empty { padding: 24px 18px; }
.adm .bkline i { display: none; }
.adm .bkline span { min-width: min(100%, 220px); }
.adm .reptext { margin-top: 10px; }

@media (min-width: 901px) and (max-width: 1040px) {
  .cab .cside { position: sticky; }
  .cab .chelp { display: block; }
  .cab .mhelp { display: none; }
  .cab .subr .when, .cab .subr .act { grid-column: auto; }
}
@media (max-width: 900px) {
  .cab { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 16px 48px; }
  .cab .cnav { display: flex; padding: 3px; }
  .cab .subr .when, .cab .subr .act { grid-column: auto; }
}
@media (max-width: 660px) {
  .cab .apps { display: block; }
  .cab .ap { grid-template-columns: minmax(0, 1fr) auto; }
  .cab .ap > .tag { grid-area: 1 / 2; }
  .cab .ap .linkbtn, .cab .ap .bot { grid-column: 1 / -1; }
  .cab-plan-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cab .subr { grid-template-columns: 36px minmax(0, 1fr); }
  .cab .subr .when, .cab .subr .act { grid-column: 2; }
  .cab .rnf { flex-wrap: wrap; }
  .cab .rnf .inp { min-width: min(100%, 150px); }
}
@media (max-width: 420px) {
  .cab .ctitle h1, .adm .ctitle h1 { font-size: 28px; }
  .cab .ap { gap: 8px; }
  .cab .ap > .tag { max-width: 110px; height: auto; white-space: normal; }
  .cab-plan-head, .cab-plan { grid-template-columns: minmax(0, 1fr) minmax(58px, auto) minmax(70px, auto) 22px; gap: 6px; padding-inline: 8px; }
  .cab-plan-head { font-size: 11.5px; }
  .cab .cab-devices-head .btn { width: 100%; white-space: normal; text-align: center; }
  .cab .cab-device-actions, .cab .cab-device-actions form { width: 100%; }
  .cab-summary .btn, .cab-availability .btn { padding-inline: 10px; white-space: normal; text-align: center; }
  .adm .admtabs { display: grid; }
}
