:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #162333;
  background: #f3f5f8;
  font-synthesis: none;
  font-size: 16px;
  --accent: #155dcc;
  --muted: #526174;
  --line: #d8e0eb;
  --surface: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  padding: 11px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
button:hover {
  background: #104da9;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.secondary {
  background: #e9eff8;
  color: #184982;
}
button.danger {
  color: #a22736;
  background: #fbecef;
}
a {
  color: #155dcc;
  text-underline-offset: 3px;
}
h1 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
  margin: 8px 0 14px;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.875rem;
}
.brand {
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark {
  background: #155dcc;
  color: white;
  padding: 5px 10px;
  border-radius: 7px;
  letter-spacing: -0.06em;
}
header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 42px 24px 80px;
}
.page.narrow {
  max-width: 680px;
}
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px #17365d04;
}
.card.featured {
  border-top: 4px solid #155dcc;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.price {
  font-size: 2.15rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin: 20px 0;
}
.badge {
  display: inline-block;
  border-radius: 6px;
  background: #edf2fa;
  color: #244568;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 9px;
}
.badge.warn {
  background: #fff1d8;
  color: #785016;
}
.badge.good {
  background: #e2f4ec;
  color: #1a6247;
}
.notice {
  padding: 16px 20px;
  border: 1px solid #dfc080;
  background: #fff8ea;
  color: #684d1d;
  border-radius: 10px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.error {
  background: #fff0f1;
  border-color: #eac2c6;
  color: #902837;
}
.success {
  background: #e8f5ef;
  border-color: #bcdacc;
  color: #216648;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.tabs button {
  background: transparent;
  color: #536477;
  border: 1px solid transparent;
}
.tabs button.active {
  background: white;
  border-color: var(--line);
  color: #155dcc;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
label {
  font-size: 0.9rem;
  font-weight: 600;
}
input,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #bdc9d8;
  background: #fff;
  color: #162333;
  border-radius: 8px;
  min-height: 44px;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex-shrink: 0;
  accent-color: #155dcc;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  line-height: 1.5;
  margin: 20px 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.wide {
  width: 100%;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin-top: 9px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 28px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: start;
  position: sticky;
  top: 20px;
}
.sidebar button {
  background: transparent;
  color: #526174;
  text-align: left;
  font-weight: 500;
}
.sidebar button.active {
  background: #e2ebfa;
  color: #174f9f;
  font-weight: 650;
}
.table-wrap {
  overflow: auto;
  max-height: 540px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  background: white;
}
th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid #e4e9f0;
  max-width: 320px;
  overflow-wrap: anywhere;
}
th {
  background: #eef2f7;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
td button {
  font-size: 0.8rem;
  padding: 6px 10px;
  min-height: 36px;
}
.editor {
  margin-top: 24px;
}
.editor summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.body-text {
  white-space: pre-wrap;
  line-height: 1.7;
}
.loading {
  padding: 80px;
  text-align: center;
}
.hidden {
  display: none !important;
}
.footer {
  font-size: 0.875rem;
  margin-top: 32px;
  color: var(--muted);
}
.login {
  max-width: 420px;
  margin: 50px auto;
}
#message:empty {
  display: none;
}
video,
audio,
iframe {
  max-width: 100%;
  width: 100%;
  border: 0;
}
video {
  background: #0f1724;
  border-radius: 10px;
}
iframe {
  min-height: 65vh;
}
pre {
  white-space: pre-wrap;
  font-size: 0.85rem;
}
@media (max-width: 760px) {
  .page {
    padding: 28px 16px 60px;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    overflow: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
  }
  .sidebar button {
    white-space: nowrap;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .card {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  header {
    padding: 16px;
  }
  .topline {
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.15s;
  }
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(640px, calc(100vw - 24px));
  max-height: 90dvh;
  padding: 24px;
  box-shadow: 0 24px 90px #12244440;
  color: #162333;
}
dialog::backdrop {
  background: #13243d77;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: -24px;
  background: white;
  z-index: 1;
  padding: 12px 0;
  margin-top: -12px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head button {
  font-size: 1.25rem;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filters input {
  flex: 1;
  min-width: 160px;
}
.filters select {
  width: auto;
  max-width: 100%;
}
.filters button {
  flex-shrink: 0;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  font-size: 0.9rem;
}
.result-count {
  font-size: 0.9rem;
  margin: 14px 0;
}
.details {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0 26px;
  font-size: 0.9rem;
}
.details dt {
  color: var(--muted);
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.admin-stats strong {
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  overflow-wrap: anywhere;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
}
.recent-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.recent-order:last-child {
  border-bottom: 0;
}
.recent-order small {
  display: block;
  margin-top: 6px;
}
.topline select {
  width: auto;
  max-width: 100%;
}
progress {
  width: 100%;
  height: 18px;
  accent-color: var(--accent);
}
.skeleton {
  min-height: 180px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.form-error {
  margin-top: 16px;
}
#settings-form textarea {
  min-height: 170px;
}
.player-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1050px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .table-wrap {
    border: 0;
    overflow: visible;
    max-height: none;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: white;
  }
  td {
    max-width: none;
    border: 0;
    display: grid;
    grid-template-columns: 40% minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    line-height: 1.45;
  }
  td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }
  .provider-grid {
    grid-template-columns: 1fr;
  }
  .recent-order {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .filters input {
    flex-basis: 100%;
  }
  .filters select {
    flex: 1;
  }
  .details {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .details dd {
    margin-bottom: 12px;
  }
  dialog {
    padding: 20px;
  }
  .dialog-head {
    top: -20px;
  }
  .pagination {
    font-size: 0.8rem;
  }
  .admin-stats .stat {
    padding: 15px;
  }
  .admin-stats strong {
    font-size: 1.4rem;
  }
}
