:root {
  color-scheme: dark;
  --ink: #eef7ff !important;
  --muted: #7f91a8 !important;
  --blue: #0aa9ff !important;
  --line: #17334a !important;
  --bg: #070910 !important;
  --admin-panel: #091525;
  --admin-panel-soft: #0c1929;
  --admin-cyan: #00d9f5;
  --admin-blue: #078cff;
  --admin-danger: #ee3d64;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  scrollbar-color: #1b5573 #080c14;
}

html {
  min-height: 100%;
  background: #070910;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0 !important;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 13% 42%, rgba(24, 48, 79, .30), transparent 32%),
    radial-gradient(circle at 63% 38%, rgba(11, 46, 74, .18), transparent 28%),
    linear-gradient(113deg, #11111c 0%, #090b12 49%, #030406 100%) !important;
  color: var(--ink) !important;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif !important;
  letter-spacing: .01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(21, 64, 92, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 64, 92, .025) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

a {
  color: #78e9ff;
}

.top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px;
  min-height: 82px !important;
  padding: 0 max(30px, calc((100vw - 1248px) / 2)) !important;
  border-bottom: 1px solid rgba(66, 114, 145, .16);
  background: rgba(7, 10, 16, .94) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
}

.brand,
.top > strong {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f1f6ff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: .05em;
}

.brand::before,
.top > strong::before {
  content: "MWE\A GAMES";
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 45px;
  flex: 0 0 50px;
  white-space: pre;
  border: 1px solid rgba(47, 207, 255, .68);
  border-radius: 13px 6px 13px 6px;
  background:
    linear-gradient(145deg, rgba(255, 128, 53, .92), rgba(197, 40, 85, .82) 48%, rgba(0, 151, 255, .9));
  color: #fff;
  font-size: 8px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: .03em;
  text-align: center;
  text-shadow: 0 1px 2px #00152b;
  box-shadow: 0 0 18px rgba(0, 176, 255, .15), inset 0 0 0 2px rgba(6, 15, 30, .32);
  transform: skew(-5deg);
}

.brand a {
  color: #84eaff !important;
  opacity: .82;
  text-decoration: none;
}

.top .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap !important;
  width: auto;
  gap: 9px;
}

.top .actions form {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.top .actions .button {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  text-decoration: none;
}

.wrap {
  width: min(100%, 1248px) !important;
  max-width: 1248px !important;
  margin: 0 auto !important;
  padding: 46px 28px 72px !important;
}

.intro,
.head {
  margin-bottom: 30px !important;
}

.intro h1,
.head h1 {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 0 0 12px !important;
  color: #08d9ee !important;
  font-size: clamp(25px, 2.25vw, 32px) !important;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-shadow: 0 0 22px rgba(0, 210, 244, .16);
}

.panel > h1,
.panel > h2,
.wrap > h1,
.wrap > h2 {
  color: #edf7ff;
  letter-spacing: -.015em;
}

.panel > h1 {
  color: #08d9ee;
  font-size: clamp(24px, 2vw, 30px);
}

.intro h1::after,
.head h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 52px;
  height: 2px;
  border-radius: 9px;
  background: linear-gradient(90deg, #00e5f8, #087cff);
  box-shadow: 0 0 10px rgba(0, 219, 255, .5);
}

.intro p,
.muted,
.hint {
  color: var(--muted) !important;
}

.grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 26px !important;
}

.card {
  position: relative;
  display: flex !important;
  min-height: 178px !important;
  padding: 24px 24px 68px !important;
  overflow: hidden;
  border: 1px solid #15364e !important;
  border-radius: 13px !important;
  background:
    radial-gradient(circle at 88% 4%, rgba(0, 179, 255, .19), transparent 43%),
    linear-gradient(145deg, #0c1929 0%, #081320 68%, #07111c 100%) !important;
  box-shadow:
    0 15px 38px rgba(0, 0, 0, .24),
    inset 0 1px rgba(255, 255, 255, .018),
    0 0 23px rgba(0, 150, 240, .045) !important;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.card:nth-child(2n) {
  background:
    radial-gradient(circle at 16% 100%, rgba(28, 37, 95, .18), transparent 44%),
    linear-gradient(145deg, #0a1727, #07101c) !important;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #1c5c7e !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3), 0 0 26px rgba(0, 182, 255, .08) !important;
}

.card h2 {
  margin: 0 0 11px !important;
  color: #f0f7ff !important;
  font-size: 18px !important;
  font-weight: 700;
}

.card p {
  margin: 0 !important;
  color: #7e90a7 !important;
  font-size: 12px;
  line-height: 1.75 !important;
}

.card .count {
  position: absolute;
  left: 24px;
  right: 152px;
  bottom: 27px;
  margin: 0 !important;
  color: #00d8ef !important;
  font-size: 11px !important;
  line-height: 1.35;
}

.card > .button {
  position: absolute;
  right: 22px;
  bottom: 19px;
  min-width: 118px;
  min-height: 34px;
  padding: 8px 14px !important;
  font-size: 11px !important;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #12364d !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 205, 245, .16), transparent 26%),
    linear-gradient(145deg, rgba(10, 25, 41, .97), rgba(5, 15, 26, .97)) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28), 0 0 34px rgba(0, 147, 234, .05) !important;
}

.button,
button.button,
.top button,
body > .box button,
button:not(.secondary):not(.danger):not(.more-options) {
  min-height: 36px;
  border: 1px solid rgba(71, 216, 255, .24) !important;
  border-radius: 9px !important;
  background: linear-gradient(100deg, #087eff 0%, #00d9f3 100%) !important;
  color: #001427 !important;
  font-size: 12px;
  font-weight: 800 !important;
  letter-spacing: .01em;
  box-shadow: 0 0 17px rgba(0, 172, 255, .23), inset 0 1px rgba(255, 255, 255, .34);
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.button:hover,
button.button:hover {
  filter: brightness(1.13);
  transform: translateY(-1px);
  box-shadow: 0 0 23px rgba(0, 190, 255, .34);
}

.button.secondary,
.top .button.secondary,
.top button,
button.secondary,
button.more-options {
  border-color: #233b52 !important;
  background: linear-gradient(180deg, #1b2a3d, #142133) !important;
  color: #d4deeb !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05) !important;
}

.button.danger,
button.danger {
  border-color: rgba(255, 100, 131, .28) !important;
  background: linear-gradient(135deg, #f24f6f, #d92d58) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(238, 61, 100, .18) !important;
}

.filters {
  align-items: center;
  padding: 1px;
}

input,
textarea,
select,
.filters input,
.filters select {
  min-height: 40px;
  border: 1px solid #183a51 !important;
  border-radius: 10px !important;
  outline: none;
  background: rgba(8, 24, 40, .92) !important;
  color: #dce9f5 !important;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .28);
}

input::placeholder,
textarea::placeholder {
  color: #66798f;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #078fca !important;
  box-shadow: 0 0 0 3px rgba(0, 184, 238, .09), inset 0 1px 4px rgba(0, 0, 0, .2);
}

input[type="checkbox"],
input[type="radio"] {
  min-height: auto;
  accent-color: #00cdec;
}

.table {
  overflow: hidden;
  border-collapse: separate !important;
  border-spacing: 0;
  color: #cbd8e6;
  font-size: 12px;
}

.table th {
  border-bottom: 1px solid #122a3e !important;
  background: rgba(7, 19, 33, .78);
  color: #617890 !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .035em;
}

.table td {
  border-bottom: 1px solid rgba(19, 45, 65, .65) !important;
}

.table tr:last-child td {
  border-bottom: 0 !important;
}

.table tr:not(:first-child):hover td {
  background: rgba(12, 48, 70, .18);
}

.cover {
  border: 1px solid rgba(95, 211, 255, .13);
  background: linear-gradient(135deg, #ff6a3d, #097eff) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.badge {
  border: 1px solid rgba(0, 211, 239, .14);
  border-radius: 999px !important;
  background: rgba(0, 188, 230, .16) !important;
  color: #1cdff4 !important;
  font-weight: 700;
}

.badge.off {
  border-color: rgba(255, 90, 119, .18);
  background: rgba(235, 54, 92, .14) !important;
  color: #ff7895 !important;
}

.asset,
.group-option {
  border-color: #17364c !important;
  background: rgba(10, 27, 44, .72) !important;
}

.msg,
.ok {
  color: #4de5bd !important;
}

.err,
.error {
  color: #ff8098 !important;
}

dialog {
  border: 1px solid #1b4965 !important;
  background: #0a1726 !important;
  color: #eef7ff !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72), 0 0 44px rgba(0, 181, 255, .12) !important;
}

dialog::backdrop {
  background: rgba(0, 3, 8, .78) !important;
  backdrop-filter: blur(5px);
}

body > .box {
  position: relative;
  width: min(390px, calc(100vw - 32px)) !important;
  padding: 34px !important;
  border: 1px solid #15506f;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 202, 246, .2), transparent 35%),
    linear-gradient(150deg, #0c1c2e, #08121f) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52), 0 0 36px rgba(0, 175, 244, .1);
}

body > .box h1 {
  margin: 0 0 23px;
  color: #08daef;
  font-size: 25px;
}

body > .box input,
body > .box button {
  margin: 7px 0 !important;
}

body > .box .login-home { margin: 9px 0 0; }

body > .box .login-home .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .top {
    min-height: 70px !important;
    padding: 0 16px !important;
  }

  .brand,
  .top > strong {
    font-size: 12px !important;
  }

  .brand::before,
  .top > strong::before {
    width: 40px;
    height: 37px;
    flex-basis: 40px;
    font-size: 7px;
  }

  .wrap {
    padding: 30px 15px 50px !important;
  }

  .head {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .card {
    min-height: 170px !important;
  }

  .panel {
    padding: 16px !important;
    overflow-x: auto;
  }

  .wrap .actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
