:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #18212f;
  background: #f4f6f9;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
.hidden {
  display: none !important;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, #dbeafe, transparent 34%), #f4f6f9;
}
.card {
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 15px;
  box-shadow: 0 5px 22px rgba(23, 36, 56, 0.055);
}
.login-card {
  width: min(400px, 100%);
  padding: 36px;
}
.login-card h1 {
  margin: 18px 0 2px;
}
.muted {
  color: #6b7280;
  margin: 0 0 26px;
}
.muted-small {
  color: #748094;
  font-size: 12px;
  margin: 3px 0 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1769e0;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.brand-mark.small {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  margin-right: 10px;
  font-size: 13px;
}
.login-card label,
.form-grid label,
.dialog-card label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #445065;
}
.login-card input,
.form-grid input,
.filters input,
.filters select,
.dialog-card input {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #d5dbe5;
  border-radius: 9px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  color: #18212f;
}
.login-card button {
  width: 100%;
  margin-top: 24px;
}
.error {
  min-height: 20px;
  color: #b91c1c;
  font-size: 13px;
  margin: 12px 0 0;
}
button {
  border: 0;
  border-radius: 9px;
  padding: 11px 16px;
  background: #1769e0;
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.secondary {
  background: #fff;
  color: #344054;
  border: 1px solid #d7dce5;
}
.topbar {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
}
.topbar > div {
  display: flex;
  align-items: center;
}
.content {
  max-width: 1440px;
  margin: auto;
  padding: 34px 24px 60px;
}
.title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.title-row h1 {
  margin: 3px 0 0;
  font-size: 29px;
}
.subtitle {
  margin: 7px 0 0;
  color: #748094;
}
.eyebrow {
  color: #667085;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.13em;
  margin: 0;
}
.notice {
  position: fixed;
  z-index: 20;
  right: 24px;
  top: 78px;
  max-width: 500px;
  padding: 13px 17px;
  border-radius: 10px;
  background: #eaf2ff;
  color: #174d96;
  box-shadow: 0 8px 30px rgba(23, 36, 56, 0.14);
}
.notice.error-notice {
  background: #fee2e2;
  color: #991b1b;
}
.tabs {
  display: flex;
  gap: 6px;
}
.main-tabs {
  margin: 25px 0;
}
.tab {
  background: transparent;
  color: #667085;
  padding: 9px 14px;
}
.tab.active {
  background: #e8f1ff;
  color: #145abb;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 4px 0 13px;
}
.section-heading h2,
.panel-heading h2,
.settings-card h2 {
  margin: 3px 0 0;
  font-size: 19px;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
}
.platform-card {
  padding: 21px;
}
.platform-head,
.platform-head > div {
  display: flex;
  align-items: center;
}
.platform-head {
  justify-content: space-between;
}
.platform-head h3 {
  margin: 0;
  font-size: 18px;
}
.platform-logo {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  margin-right: 12px;
  font-weight: 900;
}
.platform-logo.dr {
  background: #e7f0ff;
  color: #1769e0;
}
.platform-logo.wv {
  background: #defaf4;
  color: #087f6a;
}
.platform-logo.nv {
  background: #f2eafe;
  color: #7144a8;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.success {
  background: #dcfce7;
  color: #166534;
}
.status-pill.danger {
  background: #fee2e2;
  color: #991b1b;
}
.status-pill.neutral {
  background: #eef1f5;
  color: #536174;
}
.platform-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 16px;
}
.platform-stats > div {
  background: #f7f9fc;
  border-radius: 10px;
  padding: 12px;
}
.platform-stats span,
.platform-last span,
.schedule-details span {
  display: block;
  color: #748094;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}
.platform-stats strong {
  font-size: 20px;
}
.on {
  color: #15803d;
}
.off {
  color: #b42318;
}
.platform-last {
  padding-top: 14px;
  border-top: 1px solid #edf0f4;
  min-height: 72px;
}
.platform-last strong {
  display: block;
  font-size: 13px;
}
.platform-last small {
  display: block;
  color: #748094;
  margin-top: 5px;
  line-height: 1.4;
}
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.button-row.end {
  justify-content: flex-end;
}
.platform-card .button-row button {
  flex: 1;
  min-width: 130px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.telegram-card {
  grid-column: 1/-1;
}
.platform-schedule {
  margin-top: 15px;
  padding: 13px;
  background: #f7f9fc;
  border: 1px solid #e8edf4;
  border-radius: 10px;
}
.schedule-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.schedule-controls {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.7fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}
.schedule-controls label {
  font-size: 10px;
  font-weight: 800;
  color: #667085;
}
.schedule-controls input {
  width: 100%;
  margin-top: 4px;
  border: 1px solid #d5dbe5;
  border-radius: 7px;
  padding: 8px;
  font: inherit;
  background: #fff;
}
.schedule-controls button {
  padding: 9px 12px;
}
.mini-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
}
.mini-toggle input {
  width: 16px;
  margin: 0;
}
.platform-schedule > small {
  display: block;
  color: #748094;
  line-height: 1.4;
  margin-top: 9px;
}
.settings-card {
  padding: 20px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e9edf3;
}
.panel-heading.no-border {
  padding: 0 0 18px;
  border: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.compact-form {
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
}
.toggle-label {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
}
.toggle-label input {
  width: 18px !important;
  margin: 0 !important;
}
.schedule-details {
  padding: 12px;
  background: #f7f9fc;
  border-radius: 9px;
}
.compact-form > button {
  align-self: end;
}
.form-help {
  color: #748094;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.panel {
  overflow: hidden;
}
.filters {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) 160px;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e9edf3;
}
.filters input,
.filters select {
  margin: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13px;
}
th {
  text-align: left;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid #edf0f4;
}
td:nth-child(2) {
  white-space: normal;
  min-width: 210px;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.badge.on {
  background: #dcfce7;
  color: #166534;
}
.badge.off {
  background: #fee2e2;
  color: #991b1b;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.logs {
  max-height: 650px;
  overflow: auto;
}
.log-row {
  display: grid;
  grid-template-columns: 170px 70px 190px 1fr;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #edf0f4;
  font:
    12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.log-level-error {
  color: #b42318;
}
.log-level-warn {
  color: #b45309;
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(520px, calc(100% - 30px));
  box-shadow: 0 25px 80px rgba(20, 31, 49, 0.25);
}
dialog::backdrop {
  background: rgba(16, 24, 40, 0.5);
  backdrop-filter: blur(2px);
}
.dialog-card {
  padding: 24px;
}
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 22px;
}
.dialog-heading h2 {
  margin: 4px 0 0;
}
.dialog-card label {
  margin-top: 15px;
}
.dialog-card .form-help {
  margin: 18px 0;
}
.icon-button {
  background: transparent;
  color: #667085;
  font-size: 26px;
  line-height: 1;
  padding: 2px 8px;
}
@media (max-width: 900px) {
  .platform-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .log-row {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 24px 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .form-grid,
  .compact-form {
    grid-template-columns: 1fr 1fr;
  }
  .toggle-label {
    margin-top: 0;
  }
  .form-grid .wide {
    grid-column: 1/-1;
  }
}
@media (max-width: 560px) {
  .filters,
  .form-grid,
  .compact-form {
    grid-template-columns: 1fr;
  }
  .schedule-controls {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .title-row {
    display: block;
  }
  .title-row > .status-pill {
    margin-top: 12px;
  }
  .platform-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .platform-card .button-row button {
    min-width: 100%;
  }
  .section-heading {
    display: block;
  }
  .section-heading > .muted-small {
    display: block;
    margin-top: 5px;
  }
  .notice {
    left: 14px;
    right: 14px;
    top: 70px;
  }
}
