:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #182b46;
  background: #f4f6f9;
  font-size: 14px;
  --bg: #f4f6f9;
  --panel: #fff;
  --text: #182b46;
  --muted: #748196;
  --border: #e3e8ef;
  --blue: #2457bc;
  --soft: #edf2fa;
  --green: #23825e;
  --orange: #a96c17;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
body.dark {
  --bg: #121c2b;
  --panel: #1b283b;
  --text: #e3eaf5;
  --muted: #a5b3c9;
  --border: #334158;
  --blue: #84adff;
  --soft: #293b55;
  --green: #7fd8b0;
  --orange: #edbd70;
  background: var(--bg);
  color: var(--text);
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  background: var(--panel);
  color: var(--text);
}
button:hover {
  background: var(--soft);
}
.primary {
  background: #2457bc;
  color: white;
  border-color: #2457bc;
}
.primary:hover {
  background: #1a479f;
}
.link {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: var(--blue);
  font-weight: 600;
}
.link:hover {
  text-decoration: underline;
  background: none;
}
aside {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #14243d;
  color: #f2f5fb;
  padding: 32px 18px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 20px;
  font-weight: 700;
  padding: 0 6px 40px;
}
.brand-mark {
  background: #3568ce;
  border-radius: 10px;
  display: grid;
  place-items: center;
  width: 37px;
  height: 39px;
}
small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}
.brand small {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #a3b1c6;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #7f93b0;
  padding: 10px 14px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b8c7db;
  padding: 14px;
  border-radius: 7px;
  margin: 4px 0;
}
nav a.active {
  background: #293e60;
  color: white;
}
nav a:hover {
  background: #223550;
}
.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-bottom button {
  background: transparent;
  border: 0;
  color: #c5d0e0;
  width: 100%;
  text-align: left;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #314159;
  margin-top: 16px;
  padding: 20px 8px 0;
  font-size: 12px;
}
.identity small {
  color: #8c9db6;
}
.avatar {
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--blue);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
}
.shell {
  margin-left: 232px;
}
header {
  height: 68px;
  padding: 0 36px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.local-badge {
  color: var(--muted);
  font-size: 11px;
}
main {
  padding: 32px 36px;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.6px;
  margin: 0 0 10px;
}
p {
  line-height: 1.6;
  margin: 0;
  color: var(--muted);
}
h2 {
  font-size: 16px;
  margin: 0;
}
h3 {
  font-size: 15px;
  margin: 0 0 16px;
}
.muted {
  color: var(--muted);
}
.notice {
  font-size: 12px;
  background: var(--soft);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 7px;
  color: var(--muted);
  margin-bottom: 22px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
input,
select,
textarea {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 6px;
  min-width: 0;
}
input[type="search"] {
  min-width: 215px;
}
.filters select {
  max-width: 210px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  padding: 21px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.stat strong {
  font-size: 32px;
  display: block;
  margin: 14px 0 7px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.panel-body {
  padding: 22px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.row:last-child {
  border-bottom: 0;
}
.row-left {
  display: flex;
  gap: 12px;
  align-items: center;
}
.badge {
  font-size: 11px;
  display: inline-block;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  white-space: nowrap;
}
.badge.work {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--panel));
}
.badge.personal {
  color: var(--blue);
  background: var(--soft);
}
.badge.unknown {
  color: var(--orange);
  background: color-mix(in srgb, var(--orange) 12%, var(--panel));
}
.social {
  font-size: 10px;
  border: 1px solid var(--border);
  background: var(--soft);
  border-radius: 5px;
  padding: 4px 5px;
  display: inline-block;
  margin: 2px;
  color: var(--text);
}
.social.instagram {
  color: #b05899;
}
.social.ok {
  color: var(--orange);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
th {
  background: var(--soft);
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  padding: 13px 16px;
  white-space: nowrap;
}
td {
  padding: 15px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:hover {
  background: color-mix(in srgb, var(--soft) 45%, var(--panel));
}
.calendar tbody tr:hover {
  background: transparent;
}
.calendar {
  table-layout: fixed;
  min-width: 1680px;
}
.calendar th,
.calendar td {
  padding: 0;
  text-align: center;
  width: 44px;
  height: 62px;
  border-right: 1px solid var(--border);
}
.calendar th {
  height: 45px;
}
.calendar .person-cell {
  width: 245px;
  text-align: left;
  padding: 12px 15px;
  position: sticky;
  left: 0;
  background: var(--panel);
  z-index: 2;
  border-right: 2px solid var(--border);
}
.calendar th.person-cell {
  background: var(--soft);
  z-index: 3;
}
.calendar .weekend {
  background: color-mix(in srgb, var(--soft) 55%, var(--panel));
}
.calendar .today {
  box-shadow: inset 0 0 0 1.5px var(--blue);
}
.day-button {
  border: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
  padding: 4px;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.day-button .social {
  margin: 0;
  padding: 3px;
  line-height: 12px;
}
.legend {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  padding: 16px 20px;
  flex-wrap: wrap;
}
.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  margin-right: 5px;
}
.dot.personal {
  background: var(--blue);
}
.dot.unknown {
  background: var(--orange);
}
.empty {
  text-align: center;
  padding: 65px 20px;
}
.empty h2 {
  margin-bottom: 12px;
}
.empty p {
  max-width: 540px;
  margin: 0 auto 20px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--muted);
}
.pagination button {
  padding: 6px 12px;
}
.post {
  padding: 22px;
  border-bottom: 1px solid var(--border);
}
.post:last-child {
  border: 0;
}
.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.post p {
  color: var(--text);
  white-space: pre-wrap;
  margin: 15px 0;
}
.post-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.post select {
  padding: 6px;
  font-size: 12px;
}
footer {
  padding: 0 36px 25px;
  color: var(--muted);
  font-size: 11px;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  width: min(740px, 95vw);
  max-height: 90vh;
}
dialog::backdrop {
  background: #0c183a80;
}
.dialog-head {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.dialog-head button {
  padding: 5px 10px;
}
.dialog-body {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
.wide {
  grid-column: 1/-1;
}
.checks {
  display: flex;
  gap: 22px;
  padding: 10px 0;
}
.checks label {
  flex-direction: row;
  align-items: center;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.error {
  color: #c74e4e;
  font-size: 12px;
  margin-top: 16px;
}
.progress {
  height: 5px;
  background: var(--soft);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--green);
}
.profile-accounts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #152741;
  color: white;
  padding: 13px 20px;
  border-radius: 8px;
  display: none;
  z-index: 100;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.audit-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: monospace;
  font-size: 12px;
  background: var(--soft);
  padding: 16px;
  border-radius: 6px;
}
.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  aside {
    width: 195px;
    padding: 25px 10px;
  }
  .shell {
    margin-left: 195px;
  }
  main {
    padding: 25px 20px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  header {
    padding: 0 20px;
  }
  .brand {
    font-size: 17px;
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: 100%;
    padding: 15px;
  }
  .brand {
    padding-bottom: 12px;
  }
  .nav-caption,
  .sidebar-bottom,
  .identity {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav a {
    white-space: nowrap;
    padding: 10px;
  }
  .shell {
    margin: 0;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 24px;
  }
  main {
    padding: 20px 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 14px;
  }
  .stat strong {
    font-size: 27px;
  }
  .local-badge {
    display: none;
  }
  .post-head {
    align-items: flex-start;
  }
  .filters > * {
    flex: 1;
  }
  .calendar .person-cell {
    width: 185px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
}
.day-platform {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
  white-space: nowrap;
}
.day-platform .dot {
  width: 5px;
  height: 5px;
  margin: 0 1px;
}
.day-platform b {
  font-size: 10px;
}
.calendar .day-button {
  min-width: 52px;
  gap: 4px;
}
.calendar td {
  min-width: 58px;
}
[hidden] {
  display: none !important;
}
[hidden] {
  display: none !important;
}
:root {
  --blue: #095abe;
  --ring: #087bff35;
  --red: #c84848;
  --shadow: 0 3px 16px #14243d06;
}
body.dark {
  --blue: #80b5ff;
  --ring: #80b5ff44;
  --red: #f19797;
  --shadow: 0 3px 16px #0002;
}
button,
a,
input,
select,
textarea {
  transition:
    background-color 0.17s ease,
    color 0.17s ease,
    border-color 0.17s ease,
    box-shadow 0.17s ease,
    transform 0.17s ease;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #8da6c6;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--ring);
}
aside {
  padding-top: 22px;
  background: linear-gradient(165deg, #142c4d, #122138);
  overflow-y: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 0 6px 24px;
}
.brand-logo {
  display: block;
  padding: 8px 7px;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 8px #0002;
  line-height: 0;
  width: 100%;
}
.brand-logo img {
  object-fit: contain;
  max-width: 100%;
  height: auto;
}
.brand-name {
  font-size: 19px;
  letter-spacing: -0.3px;
}
.brand-name small {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-top: 8px;
}
nav a {
  position: relative;
  margin: 3px 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}
nav a:hover {
  background: #294b76;
  color: #fff;
  transform: translateX(3px);
}
nav a.active {
  background: #234c80;
  border-color: #5083c347;
  color: #fff;
  box-shadow: 0 4px 10px #06132728;
}
nav a.active:before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: #70b9ff;
}
.sidebar-bottom {
  padding-top: 22px;
}
.identity {
  margin-top: 10px;
  padding-top: 14px;
}
.identity #logout {
  padding: 6px 0;
  font-size: 11px;
  opacity: 0.8;
}
.nav-caption {
  font-size: 8px;
}
.panel,
.stat {
  box-shadow: var(--shadow);
}
.stat {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 22px #14243d0b;
}
.primary {
  background: #095abe;
  border-color: #095abe;
  box-shadow: 0 2px 5px #095abe20;
}
.primary:hover {
  background: #074eaa;
  box-shadow: 0 4px 10px #095abe30;
}
#content {
  animation: section-enter 0.2s ease-out;
}
dialog[open] {
  animation: dialog-enter 0.17s ease-out;
}
dialog::backdrop {
  backdrop-filter: blur(3px);
}
@keyframes section-enter {
  from {
    opacity: 0.55;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dialog-enter {
  from {
    opacity: 0.5;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 25px;
  padding: 4px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  vertical-align: middle;
  box-shadow: 0 1px 3px #0001;
}
.social svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}
.social.vk {
  background: #0077ff;
  color: #fff;
}
.social.ok {
  background: #ee8208;
  color: #fff;
}
.social.instagram {
  background: linear-gradient(
    35deg,
    #ffc34b 3%,
    #f04b52 35%,
    #c53091 67%,
    #6458d3
  );
  color: #fff;
}
.profile-accounts .social {
  height: auto;
  padding: 9px 13px;
}
.day-button .social {
  width: 21px;
  min-width: 21px;
  height: 21px;
  border-radius: 5px;
}
.day-button .social svg {
  width: 15px;
  height: 15px;
}
.day-platform {
  gap: 4px;
}
.day-platform b {
  font-size: 11px;
  color: var(--text);
}
.calendar {
  min-width: 2040px;
}
.calendar .day-button {
  padding: 7px 3px;
  min-height: 62px;
}
.calendar td {
  height: auto;
}
.day-button:hover {
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.empty-day-button {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  font-size: 18px;
}
.empty-day-button:hover,
.empty-day-button:focus-visible {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
  box-shadow: inset 0 0 0 1px var(--blue);
}
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 20px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.state-pill:before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
.state-pill.on {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--panel));
}
.state-pill.off {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, var(--panel));
}
.monitor-switch {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.switch-track {
  width: 34px;
  height: 20px;
  border-radius: 12px;
  background: #adbac9;
  position: relative;
  transition: background 0.2s;
}
.switch-track:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px #0002;
  transition: transform 0.2s;
}
.monitor-switch[aria-checked="true"] .switch-track {
  background: #23956c;
}
.monitor-switch[aria-checked="true"] .switch-track:after {
  transform: translateX(14px);
}
.top-actions {
  flex-wrap: wrap;
}
.login-page {
  background:
    radial-gradient(ellipse at 50% 0, #e3edfc, transparent 70%), #f4f6f9;
  min-height: 100vh;
}
.login-main {
  max-width: 490px;
  padding: 5vh 20px 30px;
}
.login-brand {
  width: 220px;
  margin: 0 auto 24px;
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.login-brand img {
  width: 100%;
  height: auto;
  display: block;
}
.login-card {
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 16px 54px #123a6a0b;
}
.eyebrow {
  display: block;
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 15px;
}
.login-card h1 {
  font-size: 25px;
}
.login-card form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}
.login-card input {
  padding: 12px;
}
.login-footer {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.login-caption {
  text-align: center;
  font-size: 11px;
}
.login-card .error:empty {
  display: none;
}
@media (max-width: 700px) {
  .brand {
    flex-direction: row;
    align-items: center;
    padding-bottom: 10px;
  }
  .brand-logo {
    width: 90px;
    padding: 4px;
    flex: none;
  }
  .brand-name {
    font-size: 17px;
  }
  .brand-name small {
    font-size: 7px;
  }
  .sidebar-bottom {
    display: block;
    padding-top: 5px;
  }
  .sidebar-bottom .identity {
    display: none;
  }
  .sidebar-bottom button {
    width: auto;
    padding: 6px;
  }
  .brand-logo img {
    height: auto;
  }
  nav a:hover {
    transform: none;
  }
  .login-main {
    padding-top: 25px;
  }
  .login-card {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.brand-logo img {
  max-height: 58px;
  width: 100%;
  object-fit: contain;
}
.brand {
  padding-bottom: 17px;
  gap: 11px;
}
nav a {
  padding: 9px 12px;
}
.row-left {
  min-width: 0;
}
.row-left > div {
  min-width: 0;
}
.social {
  flex-shrink: 0;
}
.grid {
  align-items: start;
}
.grid > .panel {
  min-width: 0;
}
@media (max-width: 700px) {
  .sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .sidebar-bottom .identity {
    display: flex;
    padding: 0;
    margin: 0;
    border: 0;
  }
  .sidebar-bottom .identity .avatar,
  .sidebar-bottom .identity small {
    display: none;
  }
  .sidebar-bottom .identity > span {
    font-size: 10px;
    text-align: right;
  }
  .identity #logout {
    display: inline-block;
    width: auto;
    margin-left: 8px;
    padding: 7px;
  }
  .brand-logo img {
    max-height: 42px;
  }
}
/* Shared alignment rules: all toolbar controls use the same 40px rhythm. */
:root {
  --control-height: 40px;
}
button:not(.link):not(.day-button),
input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: var(--control-height);
  line-height: 20px;
}
input:not([type="checkbox"]):not([type="radio"]),
select {
  height: var(--control-height);
  padding: 9px 12px;
}
button:not(.link):not(.day-button) {
  padding-top: 9px;
  padding-bottom: 9px;
}
.filters {
  align-items: end;
  gap: 12px;
}
.filters > button {
  height: var(--control-height);
  align-self: end;
}
.filters > label {
  min-width: 0;
}
.filters > label > select {
  width: 100%;
}
.filters select {
  max-width: none;
}
.search-filters {
  display: grid;
  grid-template-columns:
    minmax(160px, 1.4fr) minmax(100px, 0.8fr) minmax(145px, 1.1fr)
    minmax(140px, 1.1fr) minmax(125px, 1fr) auto;
}
.search-filters.with-category {
  grid-template-columns:
    minmax(150px, 1.3fr) minmax(95px, 0.8fr) minmax(135px, 1fr)
    minmax(130px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
}
.search-filters > input[type="search"] {
  min-width: 0;
  width: 100%;
}
.search-filters > select {
  width: 100%;
  text-overflow: ellipsis;
}
.search-filters > button {
  white-space: nowrap;
}
.top-actions {
  align-items: center;
  gap: 10px;
}
.top-actions > button,
.top-actions > input {
  height: var(--control-height);
}
.top-actions > button[aria-label="Предыдущий месяц"],
.top-actions > button[aria-label="Следующий месяц"] {
  width: 40px;
  padding-left: 0;
  padding-right: 0;
  flex: none;
}
.page-heading {
  align-items: flex-start;
}
.page-heading > #actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
  flex-shrink: 0;
}
.panel-head {
  gap: 16px;
}
.panel-head > button {
  flex-shrink: 0;
}
.panel-head > div {
  min-width: 0;
}
.panel-head h2 {
  line-height: 1.4;
}
.panel-body {
  padding: 20px;
}
.form-grid {
  align-items: start;
}
.form-grid label > input,
.form-grid label > select,
.form-grid label > textarea {
  width: 100%;
}
.checks {
  flex-wrap: wrap;
  row-gap: 12px;
}
.post-bottom {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 160px;
  align-items: end;
  gap: 16px;
}
.post-bottom > label {
  width: 160px;
}
.post-bottom > a,
.post-bottom > span:last-child:not(:first-child) {
  grid-column: 1/-1;
}
.post-head .avatar {
  flex-shrink: 0;
}
.post-head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
  padding: 18px 24px;
}
.dialog-head > button {
  width: 36px;
  min-height: 36px;
  padding: 5px;
  flex: none;
}
.dialog-body {
  padding: 24px;
}
.form-actions {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.form-actions > button {
  min-width: 120px;
}
.post-entry {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
}
.post-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.post-entry-head h3 {
  margin: 0;
}
.post-entry-head button {
  min-height: 36px;
  padding: 7px 11px;
  color: var(--red);
}
#add-post-entry {
  width: 100%;
  border-style: dashed;
  color: var(--blue);
}
.pagination {
  gap: 12px;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.pagination button {
  width: 36px;
  min-height: 36px;
  padding: 6px;
}
.row {
  overflow-wrap: anywhere;
}
.post p {
  overflow-wrap: anywhere;
}
#toast {
  max-width: min(480px, calc(100vw - 32px));
  line-height: 1.5;
}
@media (max-width: 1200px) and (min-width: 701px) {
  .search-filters,
  .search-filters.with-category {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .search-filters.with-category > input {
    grid-column: span 2;
  }
  .page-heading > #actions {
    max-width: 45%;
  }
}
@media (max-width: 700px) {
  .search-filters,
  .search-filters.with-category {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-filters > input[type="search"] {
    grid-column: 1/-1;
  }
  .search-filters:not(.with-category) > button {
    grid-column: 1/-1;
  }
  .filters:not(.search-filters) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters:not(.search-filters) > button {
    grid-column: 1/-1;
  }
  .page-heading > #actions {
    width: 100%;
    padding-top: 0;
  }
  .page-heading > #actions > button {
    width: 100%;
  }
  .panel-head {
    flex-wrap: wrap;
    padding: 16px;
  }
  .panel-body {
    padding: 16px;
  }
  .panel-head .top-actions {
    gap: 8px;
  }
  .panel-head .top-actions > input[type="month"] {
    width: 168px;
  }
  .post {
    padding: 16px;
  }
  .post-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-bottom > label {
    width: 100%;
  }
  .post-head {
    gap: 10px;
    flex-wrap: wrap;
  }
  .dialog-head {
    padding: 16px;
  }
  .dialog-body {
    padding: 18px;
  }
  .form-grid {
    gap: 16px;
  }
  .form-actions > button {
    width: 100%;
  }
  .calendar .person-cell {
    width: 160px;
  }
  .calendar th.person-cell {
    white-space: normal;
  }
  .login-card input {
    font-size: 16px;
  }
  .search-filters input,
  .search-filters select {
    font-size: 14px;
  }
}
body:not(.dark) {
  --bg: #fff;
  --panel: #fff;
  --soft: #f0f5fc;
  --border: #e1e8f2;
  background: #fff;
  color: var(--text);
}
body:not(.dark) .shell {
  background: #fff;
}
body:not(.dark) .stat {
  background: #f8faff;
}
body:not(.dark) .notice {
  background: #f3f7fd;
}
body:not(.dark) header {
  background: #fff;
}
.date-filters {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
  margin-top: -6px;
}
.date-filters > label {
  flex: 0 1 185px;
}
.date-hint {
  align-self: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .filters.date-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
  .filters.date-filters > button {
    grid-column: auto;
  }
  .date-hint {
    grid-column: 1/-1;
    margin-top: 0;
  }
}
/* Brand without a plate; semantic result colours remain independent of post type. */
.brand-logo,
.login-brand {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.brand-logo img {
  max-height: 90px;
}
body.dark .brand-logo img {
  filter: brightness(1.5);
}
body:not(.dark) aside {
  background: #f5f8fd;
  color: var(--text);
  border-right: 1px solid var(--border);
}
body:not(.dark) .brand {
  color: var(--text);
}
body:not(.dark) .brand small,
body:not(.dark) .nav-caption {
  color: #596d88;
}
body:not(.dark) nav a {
  color: #415879;
}
body:not(.dark) nav a:hover {
  background: #e6effc;
  color: #095abe;
}
body:not(.dark) nav a.active {
  background: #dceafd;
  color: #084eaa;
  border-color: #bfd5f3;
  box-shadow: none;
}
body:not(.dark) .sidebar-bottom button {
  color: #415879;
}
body:not(.dark) .identity {
  border-color: var(--border);
}
body:not(.dark) .identity small {
  color: #596d88;
}
.profile-summary {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--soft);
  border-radius: 8px;
}
.profile-summary .row {
  padding: 12px 0;
}
.profile-summary strong {
  white-space: nowrap;
}
.post-platform {
  font-size: 12px;
  font-weight: 600;
}
.post-platform small {
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
.post p,
.post .link,
.row-left,
.profile-accounts {
  overflow-wrap: anywhere;
}
.result-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 6px;
  line-height: 1.5;
}
.result-status:before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}
.result-status.good {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--panel));
}
.result-status.bad {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--panel));
}
.result-status.pending {
  color: var(--orange);
  background: color-mix(in srgb, var(--orange) 10%, var(--panel));
}
.calendar td.has-publications {
  background: color-mix(in srgb, var(--green) 7%, var(--panel));
}
.search-filters > label {
  min-width: 0;
}
.search-filters > label > input,
.search-filters > label > select {
  width: 100%;
  min-width: 0;
  max-width: none;
}
@media (min-width: 701px) and (max-width: 1400px) {
  .search-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .search-filters.with-category {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .search-filters.with-category > .search-field {
    grid-column: span 2;
  }
}
@media (max-width: 700px) {
  .search-filters > .search-field {
    grid-column: 1 / -1;
  }
  .search-filters.with-category > button {
    grid-column: 1 / -1;
  }
}
@media (min-width: 701px) and (max-height: 820px) {
  aside {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .brand-logo img {
    max-height: 60px;
  }
  .brand {
    gap: 8px;
    padding-bottom: 10px;
  }
  .brand-name {
    font-size: 17px;
  }
  nav a {
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .sidebar-bottom {
    padding-top: 10px;
  }
  .identity {
    padding-top: 10px;
  }
}
button:disabled:hover {
  transform: none;
  box-shadow: none;
}
.monitor-switch[aria-checked="false"] .switch-track {
  background: var(--red);
}
@media (max-width: 700px) {
  .brand-logo img {
    max-height: 48px;
  }
  .post-platform {
    margin-left: 44px;
  }
  .post-head .row-left {
    width: 100%;
  }
  .result-status {
    white-space: normal;
  }
}
:root {
  min-height: 100%;
  background: var(--bg);
}
html:has(body.dark) {
  background: #121c2b;
  color-scheme: dark;
}
html:has(body:not(.dark)) {
  color-scheme: light;
  background: #fff;
}
body,
.shell {
  min-height: 100vh;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
main,
#content,
.panel,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.filters.primary-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
}
.primary-filters .search-field {
  flex: 1 1 230px;
}
.primary-filters label {
  flex: 0 1 170px;
  min-width: 0;
}
.primary-filters label input,
.primary-filters label select {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.filters.secondary-filters {
  display: flex;
  align-items: end;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.secondary-filters label {
  flex: 1 1 160px;
  min-width: 0;
}
.secondary-filters select {
  width: 100%;
  max-width: none;
}
.calendar .day-platform {
  width: 100%;
  justify-content: center;
}
.summary-list .row {
  align-items: flex-start;
}
.stack-form {
  display: grid;
  gap: 18px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
button:disabled {
  cursor: not-allowed;
}
.stack-form .form-actions {
  margin-top: 0;
}
.stack-form > label,
.stack-form input,
.stack-form select {
  min-width: 0;
  width: 100%;
}
.access-actions,
.identity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.access-heading {
  flex-wrap: wrap;
}
.access-heading > .access-actions {
  margin-left: auto;
}
.access-table {
  min-width: 650px;
}
.access-table td:first-child {
  min-width: 170px;
  max-width: 290px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.access-table td:nth-child(2) {
  max-width: 230px;
  overflow-wrap: anywhere;
}
.access-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  line-height: 1.4;
  font-size: 12px;
}
.access-status.good {
  color: #167250;
  background: #eaf7ef;
}
.access-status.pending {
  color: #8a5408;
  background: #fff3d9;
}
.dark .access-status.good {
  color: #88dfba;
  background: #183c35;
}
.dark .access-status.pending {
  color: #ffd18a;
  background: #443721;
}
.invitations-panel,
.section-title {
  margin-top: 24px;
}
.section-title {
  margin-bottom: 16px;
}
.connection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.connection-card {
  padding: 22px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.connection-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connection-heading h3 {
  margin: 0;
}
.connection-card small {
  margin-top: auto;
}
#invite-result:not(:empty) {
  display: grid;
  gap: 12px;
}
#invite-result button {
  justify-self: start;
}
.identity > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.identity-actions button {
  width: auto;
  padding: 4px 0;
  min-height: 30px;
}
.identity-actions {
  gap: 14px;
}
.login-page .login-main {
  color: var(--text);
}
.login-card [hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .connection-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .filters.primary-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters.primary-filters > button {
    grid-column: auto;
  }
  .filters.secondary-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
