:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  color: #142554;
  background: #f7f9ff;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: #2549d7;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #5b79ff;
  outline-offset: 2px;
}
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #dfe6f6;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 42px;
}
.brand {
  font-size: 27px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand-icon {
  color: #2549ec;
  width: 38px;
  height: 38px;
  flex: none;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav-link,
.nav-button {
  border: 0;
  background: transparent;
  color: #142554;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border-radius: 14px;
  font-weight: 500;
  min-height: 50px;
  text-align: left;
}
.nav-link svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.nav-link:hover,
.nav-link.active,
.nav-button:hover {
  background: #eaf0ff;
  text-decoration: none;
  color: #1638d8;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #dfe6f6;
  padding-top: 18px;
  display: grid;
  gap: 8px;
}
.content {
  padding: 28px 34px 54px;
  min-width: 0;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
.content header h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.content header p {
  margin: 0 0 24px;
  color: #617092;
}
.content > header {
  margin-bottom: 25px;
}
.card,
.metric,
.plan-card {
  background: #fff;
  border: 1px solid #dfe6f6;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(31, 61, 138, 0.025);
}
.card {
  padding: 24px;
  margin: 0 0 22px;
}
.card h2 {
  font-size: 22px;
  margin: 0 0 18px;
}
.card p:last-child {
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 155px;
}
.metric > strong {
  font-size: 34px;
}
.round-icon {
  display: grid;
  place-items: center;
  background: #eaf0ff;
  color: #2751dd;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 25px;
}
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.columns > .card {
  min-width: 0;
}
.muted {
  color: #617092;
}
.key-values > div {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #e8edf8;
}
.key-values > div:last-child {
  border-bottom: 0;
}
.text-link {
  display: inline-block;
  margin-top: 17px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 670px;
  text-align: left;
}
th {
  color: #617092;
  background: #f4f7ff;
  font-weight: 500;
  padding: 15px 13px;
  white-space: nowrap;
}
th:first-child {
  border-radius: 8px 0 0 8px;
}
th:last-child {
  border-radius: 0 8px 8px 0;
}
td {
  border-bottom: 1px solid #e0e7f7;
  padding: 17px 13px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
tr:last-child td {
  border-bottom: 0;
}
.pill {
  display: inline-block;
  background: #edf1fa;
  color: #60708e;
  border-radius: 20px;
  padding: 7px 10px;
  white-space: nowrap;
}
.pill.good {
  background: #e4faf5;
  color: #078772;
}
.pill.danger {
  background: #ffebef;
  color: #cb3151;
}
.search-label {
  max-width: 560px;
  display: block;
  margin: 0 0 18px;
}
label {
  display: grid;
  gap: 7px;
  color: #253a70;
}
input:not([type='checkbox']) {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cbd8f5;
  border-radius: 9px;
  color: #142554;
  background: #fff;
  width: 100%;
}
select {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cbd8f5;
  border-radius: 9px;
  color: #142554;
  background: #fff;
  width: 100%;
}
.filters {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) repeat(2, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.filters button {
  min-height: 48px;
}
.pager,
.pager > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pager {
  justify-content: space-between;
  color: #617092;
  margin-top: 18px;
}
.pager button {
  min-width: 42px;
  min-height: 42px;
}
input:disabled {
  background: #f5f7fa;
  color: #6e7b94;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: #2d4fe6;
}
.empty {
  padding: 30px;
  text-align: center;
  color: #617092;
}
.info-box,
.notice {
  background: #edf3ff;
  border: 1px solid #d7e3ff;
  padding: 17px 19px;
  border-radius: 12px;
  margin: 18px 0;
  color: #315187;
}
.notice.bad,
.form-error {
  background: #fff0f3;
  color: #b32746;
  border-color: #f1c9d3;
}
.notice {
  margin: 0 0 20px;
}
.back {
  display: inline-block;
  margin: 0 0 20px;
}
.user-overview {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(330px, 1.7fr) minmax(
      200px,
      0.85fr
    );
  gap: 26px;
}
.user-identity,
.user-facts,
.user-actions {
  min-width: 0;
}
.user-identity,
.user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.user-identity,
.user-facts {
  border-right: 1px solid #e0e7f7;
  padding-right: 26px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eaf0ff;
  color: #2550dd;
  margin-bottom: 16px;
}
.profile-avatar svg {
  width: 37px;
  height: 37px;
}
.field-label {
  display: block;
  color: #617092;
  font-size: 14px;
  margin-bottom: 5px;
}
.user-identity strong {
  display: block;
  font-size: 19px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.user-identity .identity-id {
  font-size: 16px;
}
.user-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  align-content: start;
}
.user-facts strong {
  display: block;
  overflow-wrap: anywhere;
}
.text-good {
  color: #078772;
}
.text-danger {
  color: #cb3151;
}
.quota-track {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 10px;
  border-radius: 10px;
  background: #e8edf8;
  overflow: hidden;
}
.quota-track span {
  display: block;
  height: 100%;
  background: #27c79f;
}
.user-actions p {
  line-height: 1.5;
  margin: 12px 0;
}
.payment-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 0.8fr);
  gap: 20px;
}
.payment-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.payment-status {
  display: inline-flex;
  border-radius: 20px;
  padding: 7px 12px;
  background: #edf1fa;
  color: #60708e;
  font-weight: 700;
}
.payment-status.good {
  background: #e4faf5;
  color: #078772;
}
.payment-status.danger {
  background: #ffebef;
  color: #cb3151;
}
.payment-hero .big-money {
  margin: 12px 0 2px;
}
.payment-hero-facts {
  border-top: 1px solid #e0e7f7;
  margin-top: 22px;
  padding-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}
.payment-hero-facts strong,
.payment-hero-facts a {
  display: block;
  overflow-wrap: anywhere;
}
.refund-card p {
  line-height: 1.55;
  margin: 0 0 22px;
}
.payment-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.payment-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(0, 2fr);
  gap: 12px;
  padding: 6px 0 22px 32px;
  border-left: 2px solid #dfe6f6;
  margin-left: 10px;
}
.payment-timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.payment-timeline li::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -13px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe6f6;
  color: #078772;
  font-weight: 700;
}
.payment-timeline li.done::before {
  content: '✓';
  background: #def8ef;
}
.payment-timeline li.done {
  border-left-color: #c9efe4;
}
.payment-timeline li span {
  color: #617092;
}
.payment-details {
  grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr);
}
.payment-details dt,
.payment-details dd {
  padding: 9px 0;
  border-bottom: 1px solid #e0e7f7;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 54px;
}
.password-field button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #617092;
  min-width: 40px;
  min-height: 40px;
}
.password-field button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.notification-editor {
  padding: 30px;
}
.notification-editor .editor-intro {
  margin: -7px 0 22px;
}
.editor-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  max-width: 790px;
  margin-bottom: 22px;
  color: #142554;
}
.editor-row > span,
.editor-row > label:first-child {
  padding-top: 12px;
}
.editor-readonly {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid #cbd8f5;
  border-radius: 9px;
  padding: 10px 14px;
  background: #f8faff;
}
.editor-control select {
  max-width: 240px;
}
.editor-help {
  margin: 7px 0 0;
  color: #617092;
}
.editor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  min-height: 48px;
  cursor: pointer;
}
.editor-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.editor-track {
  width: 54px;
  height: 30px;
  border-radius: 20px;
  background: #a8b4c7;
  position: relative;
  transition: background 0.15s ease;
}
.editor-track::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.editor-toggle input:checked + .editor-track {
  background: #26be98;
}
.editor-toggle input:checked + .editor-track::after {
  transform: translateX(24px);
}
.editor-toggle input:focus-visible + .editor-track {
  outline: 3px solid #5b79ff;
  outline-offset: 3px;
}
.editor-divider {
  border-top: 1px solid #e0e7f7;
  margin: 28px 0 24px;
}
.editor-heading {
  margin: 0;
  font-size: 20px;
}
.notification-preview {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 22px;
  border-radius: 16px;
  background: #f0f4ff;
  min-height: 110px;
}
.notification-preview strong {
  display: block;
  margin-bottom: 8px;
}
.notification-preview p {
  margin: 0;
  color: #617092;
  line-height: 1.5;
}
.preview-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 14px;
  background: #dce7ff;
  color: #2550dd;
}
.preview-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}
.action-link:hover {
  text-decoration: none;
}
dl {
  display: grid;
  grid-template-columns: minmax(100px, 140px) minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}
dt {
  color: #617092;
}
dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.big-money {
  font-size: 40px;
  font-weight: 800;
}
.primary,
.secondary,
.danger-button {
  border-radius: 10px;
  padding: 12px 19px;
  min-height: 48px;
  font-weight: 650;
}
.primary {
  background: #3155e9;
  color: #fff;
  border: 1px solid #3155e9;
}
.primary:hover {
  background: #193ccc;
}
.secondary {
  background: #fff;
  color: #2550dd;
  border: 1px solid #b8caf9;
}
.secondary:hover {
  background: #f1f5ff;
}
.danger-button {
  background: #fff;
  color: #d2294a;
  border: 1px solid #f0aebd;
}
.danger-button:hover {
  background: #fff4f6;
}
.plan-card {
  display: grid;
  grid-template-columns:
    minmax(170px, 2fr) minmax(130px, 1fr) minmax(130px, 1fr)
    auto auto;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 14px;
}
.plan-card h2 {
  margin: 0 0 5px;
}
.plan-card p {
  margin: 0;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #fff;
}
.login-card {
  width: min(100%, 600px);
  border: 1px solid #dfe6f6;
  border-radius: 22px;
  box-shadow: 0 20px 55px rgba(20, 37, 84, 0.05);
  padding: 38px;
  display: grid;
  gap: 18px;
}
.login-card .brand {
  justify-content: center;
  margin-bottom: 9px;
}
.login-card h1 {
  text-align: center;
  font-size: 29px;
  margin: 0 0 8px;
}
.login-card .primary {
  margin-top: 10px;
}
.login-foot {
  border-top: 1px solid #e0e7f7;
  text-align: center;
  padding-top: 24px;
  color: #617092;
  margin: 10px 0 0;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-card {
    grid-template-columns: repeat(2, 1fr);
  }
  .user-overview {
    grid-template-columns: minmax(170px, 0.9fr) minmax(0, 1.6fr);
  }
  .user-facts {
    border-right: 0;
  }
  .user-actions {
    grid-column: 1 / -1;
    border-top: 1px solid #e0e7f7;
    padding-top: 18px;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px;
    gap: 8px;
  }
  .brand {
    font-size: 19px;
  }
  .brand-icon {
    width: 27px;
    height: 27px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .nav-link {
    white-space: nowrap;
    padding: 10px;
    min-height: 42px;
    font-size: 14px;
  }
  .nav-link svg {
    width: 18px;
    height: 18px;
  }
  .sidebar-bottom {
    display: block;
    position: absolute;
    right: 8px;
    top: 8px;
    border: 0;
    margin: 0;
    padding: 0;
  }
  .sidebar-bottom .muted {
    display: none;
  }
  .sidebar-bottom .nav-button {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 13px;
  }
  .content {
    padding: 20px 14px 34px;
  }
  .content header h1 {
    font-size: 27px;
  }
  .stats,
  .columns {
    grid-template-columns: 1fr;
  }
  .metric {
    min-height: 110px;
  }
  .plan-card {
    grid-template-columns: 1fr;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 25px;
  }
  .login-card h1 {
    font-size: 25px;
  }
  .notification-editor {
    padding: 20px;
  }
  .editor-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .editor-row > span,
  .editor-row > label:first-child {
    padding-top: 0;
  }
  .notification-preview {
    align-items: flex-start;
    padding: 16px;
  }
  .preview-icon {
    width: 44px;
    height: 44px;
  }
  .user-overview,
  .payment-top,
  .payment-hero-facts,
  .payment-timeline li {
    grid-template-columns: 1fr;
  }
  .user-identity,
  .user-facts {
    border-right: 0;
    border-bottom: 1px solid #e0e7f7;
    padding: 0 0 18px;
  }
  .user-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-actions {
    grid-column: auto;
    border-top: 0;
    padding-top: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition: background 0.15s ease;
  }
}
