:root {
  --bg-main: #f7f5f0;
  --ink: #101010;
  --acc: #B7FF32;
  --mint: #39E66B;
  --card-light: #ffffff;
  --muted-txt: #5c564f;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-main);
  color: var(--ink);
  overflow-x: hidden;
}

.container, .page-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: 'Baloo 2', cursive, sans-serif;
  letter-spacing: -0.4px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.96rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-yellow {
  background: var(--acc);
  color: var(--ink);
}

.btn-blue {
  background: var(--mint);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--acc);
  border-color: var(--acc);
  box-shadow: 4px 4px 0 var(--acc);
}

.btn.full {
  width: 100%;
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.sticker.g {
  background: var(--acc);
}

.sticker.b {
  background: var(--mint);
}

.glass, .glass.card {
  background: var(--card-light);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
}

.card {
  padding: 20px;
}

.hl {
  background: var(--acc);
  padding: 0 8px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  display: inline-block;
  line-height: 1.15;
}

.topnav {
  max-width: 1140px;
  margin: 14px auto 0;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card-light);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
  position: sticky;
  top: 12px;
  z-index: 90;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 1.2rem;
}

.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  font-weight: 800;
  font-size: 0.86rem;
  padding: 7px 13px;
  border-radius: 11px;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  border-color: var(--ink);
  background: var(--acc);
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-user {
  font-weight: 800;
  font-size: 0.84rem;
  padding: 6px 12px;
  border-radius: 10px;
  background: #f1ede4;
  border: 2px solid var(--ink);
  white-space: nowrap;
}

.site-footer {
  margin-top: 56px;
  background: var(--ink);
  color: #e9e2d8;
  border-radius: 26px 26px 0 0;
  padding: 34px 24px 22px;
}

.foot-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.foot-brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--acc);
}

.foot-brand b {
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  color: #fff;
}

.foot-brand p {
  margin: 3px 0 0;
  font-size: 0.84rem;
  color: #9b9188;
}

.foot-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.foot-links a {
  font-weight: 800;
  font-size: 0.84rem;
  padding: 8px 14px;
  border-radius: 11px;
  border: 2px solid #333;
  color: #e9e2d8;
  transition: all 0.15s ease;
}

.foot-links a:hover {
  border-color: var(--acc);
  color: var(--acc);
}

.foot-copy {
  max-width: 1140px;
  margin: 22px auto 0;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
  font-size: 0.82rem;
  color: #9b9188;
  font-weight: 600;
}

.field {
  margin-bottom: 14px;
  text-align: left;
}

.field label {
  display: block;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: var(--muted-txt);
}

.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
  transition: box-shadow 0.15s ease;
}

.field input:focus, .field select:focus {
  box-shadow: 3px 3px 0 var(--acc);
}

.hint {
  font-size: 0.84rem;
  color: var(--muted-txt);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  white-space: nowrap;
}

.pill.st-ok {
  background: rgba(57, 230, 107, 0.22);
}

.pill.st-act {
  background: #ffe066;
}

.pill.st-bad {
  background: #ffc9c9;
}

.pill.st-resend {
  background: #d0bfff;
}

.pill.st-depo {
  background: var(--acc);
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 14px;
  border: 2.5px solid var(--acc);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 92vw;
  text-align: center;
  font-size: 0.92rem;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
}

#toast.err {
  background: #c92a2a;
  border-color: #ffc9c9;
}

#toast.ok {
  background: #0b7a43;
  border-color: var(--mint);
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 16, 0.62);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-back.show {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 430px;
  background: var(--card-light);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 9px 9px 0 var(--ink);
  padding: 22px;
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 92vh;
  overflow-y: auto;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #ffc9c9;
  transform: rotate(90deg);
}

.tbl-wrap {
  overflow-x: auto;
  padding: 8px 16px;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 520px;
}

.tbl th, .tbl td {
  padding: 13px 12px;
  border-bottom: 1.5px solid #e6e0d6;
  font-size: 0.9rem;
  vertical-align: middle;
}

.tbl th {
  font-weight: 800;
  color: var(--muted-txt);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.tbl tr:last-child td {
  border-bottom: none;
}

.phone-num {
  font-family: monospace;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  background: #f3f0e8;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  background: #fff;
  font-size: 0.82rem;
}

.rank-1 { background: #ffe066; }
.rank-2 { background: #e9ecef; }
.rank-3 { background: #ffc078; }

.empty-state {
  text-align: center;
  padding: 28px 16px;
  font-weight: 700;
  color: var(--muted-txt);
}

.empty-state i {
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 8px;
  display: block;
}

.skel {
  background: linear-gradient(90deg, #eee 25%, #f6f2ea 50%, #eee 75%);
  background-size: 200% 100%;
  animation: sk 1.2s infinite;
  border-radius: 10px;
  min-height: 46px;
  border: 1.5px solid #e0d9cd;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-weight: 700;
  color: var(--muted-txt);
  font-size: 0.84rem;
}

@keyframes sk {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.dash-wrapper {
  margin-top: 26px;
  margin-bottom: 64px;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  align-items: start;
}

.sidebar {
  padding: 18px;
  position: sticky;
  top: 90px;
  background: #ffffff;
}

.sbal {
  background: var(--ink);
  color: #fff;
  padding: 20px 18px;
  border-radius: 16px;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--acc);
  margin-bottom: 18px;
}

.sbal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c9c0b4;
  font-weight: 800;
  margin-bottom: 6px;
}

.sbal .n {
  font-family: 'Baloo 2', cursive;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--acc);
  line-height: 1.15;
  margin-bottom: 14px;
  word-break: break-word;
}

.sbal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sbal-actions .btn {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.78rem;
  box-shadow: none;
  border: 1.5px solid var(--ink);
}

.snav-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-txt);
  margin: 10px 8px 8px;
}

.snav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slink {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.15s ease;
}

.slink i {
  width: 22px;
  text-align: center;
  font-size: 1rem;
}

.slink:hover {
  background: rgba(183, 255, 50, 0.2);
  border-color: var(--ink);
}

.slink.active {
  background: var(--acc);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.slink.logout-link {
  margin-top: 6px;
  color: #c92a2a;
}

.slink.logout-link:hover {
  background: #ffe3e3;
  border-color: #c92a2a;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--acc);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--ink);
  flex-shrink: 0;
}

.stat-card.s2 .stat-icon {
  background: var(--mint);
}

.stat-card.s3 .stat-icon {
  background: var(--ink);
  color: var(--acc);
}

.stat-card .num, .stat-box .num {
  font-family: 'Baloo 2', cursive;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  word-break: break-word;
}

.stat-card .lbl, .stat-box .lbl {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted-txt);
}

.sec-head, .sec-header-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.sec-head h2, .sec-header-clean h2 {
  font-size: 1.38rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sec-head h2 i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--acc);
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}

.srv-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease;
}

.srv-card:hover {
  transform: translateY(-4px);
}

.srv-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.srv-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--acc);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--ink);
  flex-shrink: 0;
}

.srv-card.tg .srv-icon {
  background: var(--mint);
}

.srv-card.all .srv-icon {
  background: var(--ink);
  color: var(--acc);
}

.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 99px;
  background: #f1ede4;
  border: 1.5px solid var(--ink);
}

.srv-card h3 {
  margin: 12px 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
}

.srv-card .hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted-txt);
  font-weight: 600;
  line-height: 1.5;
}

.srv-card .btn {
  width: 100%;
}

.stat-box {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease;
}

.stat-box:hover {
  transform: translateY(-3px);
}

.stat-box .stat-icon {
  width: 54px;
  height: 54px;
  font-size: 1.4rem;
}

.stat-box .num {
  font-size: 1.9rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0 54px;
}

.otp-code {
  font-family: monospace;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-align: center;
  background: var(--ink);
  color: var(--acc);
  padding: 16px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--acc);
}

.depo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 30px;
}

.qr-panel {
  text-align: center;
  padding: 24px 18px;
}

.qr-panel img {
  width: 100%;
  max-width: 270px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  margin: 12px auto;
  box-shadow: 5px 5px 0 var(--ink);
  display: block;
}

.quick-amts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.quick-amts .btn {
  padding: 9px 6px;
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .snav-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
  }
  .slink.logout-link {
    margin-top: 0;
  }
  .stats-grid, .quick-grid, .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .depo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dash-wrapper {
    margin-top: 16px;
  }
  .stats-grid, .quick-grid, .stats-strip {
    grid-template-columns: 1fr;
  }
  .snav-list {
    grid-template-columns: 1fr 1fr;
  }
  .slink {
    padding: 10px 12px;
    font-size: 0.84rem;
  }
  .topnav {
    flex-wrap: wrap;
  }
  .nav-right {
    width: 100%;
    justify-content: flex-start;
  }
  .tbl {
    min-width: 440px;
  }
}
