@import url("login.css");

.hidden {
  display: none !important;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  border-bottom: 1px solid #2a2a2a;
  background: #0a0a0a;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5f5f5;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-btn {
  border: none;
  background: none;
  color: #737373;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.nav-btn.active,
.nav-btn:hover {
  color: #f5f5f5;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.balance {
  font-variant-numeric: tabular-nums;
  color: #e5e5e5;
  font-size: 13px;
}

.balance span {
  color: #737373;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 6px;
}

.support-link {
  color: #a3a3a3;
  font-size: 12px;
  text-decoration: none;
}

.support-link:hover {
  color: #fff;
}

.auth-slot {
  min-height: 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.guest-auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.guest-auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.guest-login-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(240px, 70vw);
}

.guest-auth-input {
  font-size: 12px;
  padding: 8px 10px;
}

.guest-credentials {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #111;
}

.guest-credentials-title {
  font-size: 12px;
  font-weight: 600;
  color: #e5e5e5;
}

.guest-credentials-hint {
  font-size: 11px;
  color: #737373;
  line-height: 1.4;
}

.guest-credentials-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #a3a3a3;
}

.guest-credentials-row code {
  color: #fff;
  font-size: 11px;
  word-break: break-all;
  text-align: right;
}

.btn-sm {
  width: auto;
  padding: 8px 14px;
}

.main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.view.hidden {
  display: none;
}

.panel {
  border: 1px solid #2a2a2a;
  background: #111;
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f5f5f5;
}

.panel-sub {
  color: #737373;
  font-size: 13px;
  margin-top: 4px;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.input {
  flex: 1;
  border: 1px solid #2a2a2a;
  background: #0a0a0a;
  color: #f5f5f5;
  padding: 12px 14px;
  font-size: 14px;
}

.input:focus {
  outline: none;
  border-color: #525252;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip {
  border: 1px solid #2a2a2a;
  background: transparent;
  color: #a3a3a3;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  border-color: #e5e5e5;
  color: #f5f5f5;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #2a2a2a;
  border: 1px solid #2a2a2a;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #111;
  cursor: pointer;
  text-align: left;
  border: none;
  width: 100%;
  color: inherit;
}

.list-item:hover {
  background: #161616;
}

.list-item-main {
  min-width: 0;
}

.list-item-title {
  color: #f5f5f5;
  font-size: 14px;
  word-break: break-word;
}

.list-item-meta {
  color: #737373;
  font-size: 12px;
  margin-top: 4px;
}

.list-item-price {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: #f5f5f5;
  font-size: 14px;
}

.back-link {
  border: none;
  background: none;
  color: #737373;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}

.back-link:hover {
  color: #e5e5e5;
}

.detail-grid {
  display: grid;
  gap: 20px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #404040;
  background: transparent;
  color: #e5e5e5;
  cursor: pointer;
  font-size: 18px;
}

.qty-value {
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.specs {
  color: #a3a3a3;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #2a2a2a;
}

.table th {
  color: #737373;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}

.status-pill {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a3a3a3;
}

.status-pill.completed {
  color: #e5e5e5;
}

.status-pill.pending {
  color: #737373;
}

.status-pill.failed {
  color: #737373;
}

.status-pill.open {
  color: #e5e5e5;
}

.status-pill.closed {
  color: #737373;
}

.ticket-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  margin: 8px 0 12px;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  margin: 12px 0 16px;
  padding-right: 4px;
}

.ticket-msg {
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 10px 12px;
  background: #0a0a0a;
}

.ticket-msg.admin {
  border-color: #404040;
}

.ticket-msg-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #737373;
  margin-bottom: 6px;
}

.ticket-msg-body {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

button.linkish {
  background: none;
  border: none;
  color: #e5e5e5;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

button.linkish:hover {
  color: #fff;
}

.deposit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.admin-stat {
  border: 1px solid #333;
  padding: 14px 16px;
}

.admin-stat span {
  color: #737373;
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.admin-stat strong {
  font-size: 18px;
}

.admin-balance-form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.admin-balance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-pager {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.empty {
  color: #737373;
  text-align: center;
  padding: 32px 16px;
}

.link-btn {
  border: none;
  background: none;
  color: #e5e5e5;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

.link-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  border: 1px solid #404040;
  background: #111;
  color: #f5f5f5;
  padding: 12px 16px;
  font-size: 13px;
  z-index: 100;
}

.toast.hidden {
  display: none;
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 12px 16px;
  }

  .main {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .table {
    font-size: 12px;
  }
}

.disclaimer-banner {
  background: #141414;
  border-bottom: 1px solid #2a2a2a;
  color: #a3a3a3;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 20px;
  text-align: center;
}

.disclaimer-banner strong {
  color: #e5e5e5;
  font-weight: 600;
}

.maintenance-banner {
  background: #2a1f0a;
  border-bottom: 1px solid #5c4a1a;
  color: #f5d78e;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 20px;
  text-align: center;
}

.maintenance-banner.hidden {
  display: none;
}

.site-footer {
  border-top: 1px solid #2a2a2a;
  color: #737373;
  font-size: 12px;
  line-height: 1.6;
  margin-top: auto;
  padding: 24px 20px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 4px;
}

.orders-note {
  color: #737373;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 16px;
  text-align: center;
}

.auth-link-telegram {
  margin-top: 8px;
}
