@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0b0f0b;
  --card: #141a14;
  --input: #1c241c;
  --lime: #8ce63d;
  --lime2: #7bd42f;
  --purple: #6a1b9a;
  --text: #fff;
  --muted: #a0ada0;
  --line: #263326
}

* {
  box-sizing: border-box
}

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif
}

button, input, select {
  font: inherit
}

button {
  cursor: pointer
}

.app {
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding-bottom: 50px
}

.header {
  text-align: center;
  position: relative;
  padding: 24px 16px 18px
}

.logo-circle {
  width: 10px;
  height: 10px;
  margin: 0 auto 10px;
  border: 3px solid var(--lime);
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #3b0954, #1a0226);
  color: var(--lime);
  font-size: 19px;
  font-weight: 800;
  overflow: hidden
}

.logo-circle img {
  width: 100%;
  height: 100%;
  max-width: 10px;
  max-height: 10px;
  object-fit: contain
}

.brand-name {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 800;
  font-style: italic
}

.brand-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35
}

.admin-lock {
  position: absolute;
  top: 22px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid #334433;
  border-radius: 10px;
  background: var(--card);
  color: var(--lime);
  font-size: 17px
}

.nav-wrap {
  margin: 0 20px 14px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card)
}

.nav-inner {
  display: flex;
  gap: 0;
  flex-wrap: nowrap
}

.nav-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 8px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap
}

.nav-tab.active {
  background: var(--lime);
  color: #000;
  box-shadow: 0 4px 12px #8ce63d4d
}

.page {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px
}

.page.active {
  display: flex
}

.card, .track-result {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card)
}

.section-label {
  margin-bottom: 10px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em
}

.muted-text, .about-text {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7
}

.mb12 {
  margin-bottom: 12px
}

.mb16 {
  margin-bottom: 16px
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 16px;
  border: 1.5px solid var(--line);
  border-radius: 30px;
  background: var(--card)
}

.search-bar:focus-within {
  border-color: var(--lime)
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px
}

.search-input::placeholder {
  color: var(--muted)
}

.search-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--lime);
  color: #000;
  font-size: 18px
}

.not-found {
  display: none;
  padding: 14px;
  border: 1px solid #743b3b;
  border-radius: 12px;
  background: #301818;
  color: #ff9292;
  font-size: 13px;
  font-weight: 700;
  text-align: center
}

.track-result {
  display: none;
  flex-direction: column;
  gap: 10px
}

.track-header, .total-box, .track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px
}

.track-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted)
}

.track-row:last-child {
  border-bottom: 0
}

.track-row b {
  color: var(--text);
  text-align: right
}

.status-badge, .status-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800
}

.status-ereem, .pill-ereem {
  background: #8ce63d1f;
  color: var(--lime)
}

.status-ub, .pill-ub {
  background: #28a74522;
  color: #5ee27a
}

.status-olgoson, .pill-olgoson {
  background: #6a1b9a33;
  color: #d8a3ff
}

.multi-count {
  display: block;
  margin-top: 3px
}

.pkg-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--input)
}

.pkg-item+.pkg-item {
  margin-top: 8px
}

.pkg-code {
  font-weight: 800
}

.pkg-price, .total-box strong {
  color: var(--lime);
  font-weight: 800
}

.total-box {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #8ce63d17
}

.total-box b {
  font-size: 13px
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px
}

.stat-card {
  padding: 12px 7px;
  border-radius: 12px;
  background: #8ce63d17;
  text-align: center
}

.stat-card b {
  display: block;
  color: var(--lime);
  font-size: 19px
}

.stat-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700
}

.social-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none
}

.address-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #334433;
  border-radius: 16px;
  background: #0f160f;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center
}

.address-icon {
  color: var(--lime);
  font-size: 26px
}

.phone-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px
}

.phone-links a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: #28a745;
  color: white;
  font-weight: 800;
  text-decoration: none
}

.phone-links a:hover {
  background: #218838
}

.purple-btn, .save-btn {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: white;
  font-weight: 800
}

.purple-btn:hover {
  background: #7b1fa2
}

.address-summary .purple-btn {
  margin-top: 14px
}

.tariff {
  display: flex;
  flex-direction: column;
  gap: 9px
}

.tariff>div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5
}

.tariff>div.highlight {
  border-color: #8ce63d4d;
  background: #8ce63d0f
}

.tariff b {
  color: var(--lime);
  white-space: nowrap
}

.instructions {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8
}

.instructions p+p {
  margin-top: 10px
}

.instructions b {
  color: var(--lime)
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: #000d
}

.modal-overlay.open {
  display: flex
}

.modal-box, .login-box {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #334433;
  border-radius: 22px 22px 0 0;
  background: var(--card)
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--purple);
  font-size: 14px
}

.modal-header button {
  border: 0;
  border-radius: 50%;
  background: #ffffff33;
  color: #fff;
  width: 28px;
  height: 28px
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px
}

.field label, .form-card label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase
}

.field>div {
  display: flex;
  gap: 7px
}

.field input, .login-box input, .form-card input, .form-card select {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--input);
  color: var(--text)
}

.copy-btn {
  width: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--purple);
  color: #fff
}

.login-head {
  padding: 22px;
  text-align: center;
  background: #080b08;
  font-size: 16px
}

.login-head b, .login-head small {
  display: block
}

.login-head small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px
}

.login-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 9px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--purple);
  color: white;
  font-weight: 800
}

.login-error {
  display: none;
  padding: 10px;
  border-radius: 9px;
  background: #301818;
  color: #ff9292;
  text-align: center;
  font-size: 12px;
  font-weight: 700
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  overflow: auto;
  background: var(--bg)
}

.admin-panel.open {
  display: block
}

.admin-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  background: #080b08
}

.admin-bar button {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #ffffff14;
  color: var(--muted)
}

.admin-content {
  max-width: 560px;
  margin: auto;
  padding: 20px 16px 60px
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px
}

.admin-stat {
  padding: 12px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  text-align: center
}

.admin-stat b {
  display: block;
  color: var(--lime);
  font-size: 18px
}

.admin-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px
}

.form-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card)
}

.form-card h3, .admin-content>h3 {
  font-size: 15px
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px
}

.cancel-btn {
  display: none;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input);
  color: var(--muted);
  font-weight: 800
}

.admin-search {
  margin-bottom: 12px
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card)
}

.admin-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted)
}

.admin-actions {
  display: flex;
  gap: 5px
}

.admin-actions button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px
}

.edit {
  background: #16334a;
  color: #9ad0ff
}

.delete {
  background: #4a1b1b;
  color: #ff9d9d
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 500;
  display: none;
  transform: translateX(-50%);
  padding: 11px 20px;
  border-radius: 20px;
  background: var(--lime);
  color: #000;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap
}

@media(max-width: 400px) {
  .header {
    padding: 20px 14px 14px
  }
  .logo-circle {
    width: 34px;
    height: 34px
  }
  .brand-name {
    font-size: 21px
  }
  .brand-sub {
    font-size: 10px
  }
  .nav-wrap {
    margin-left: 14px;
    margin-right: 14px
  }
  .nav-tab {
    padding: 8px 5px;
    font-size: 11px
  }
  .form-grid, .admin-stats {
    grid-template-columns: 1fr 1fr
  }
  .tariff>div {
    flex-direction: column;
    gap: 4px
  }
  .tariff b {
    white-space: normal
  }
}
