/* Forced dark theme — independent of Telegram user theme */
:root {
  --bg:       #17212b;
  --bg2:      #0e1621;
  --card:     #1f2e40;
  --text:     #f5f5f5;
  --hint:     #6c849d;
  --link:     #5da0e0;
  --btn:      #5288c1;
  --btn-text: #ffffff;
  --sep:      rgba(255, 255, 255, 0.06);
  --green:    #4dca7a;
  --red:      #e05252;
  --radius:   14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg2);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  font-size: 15px;
}

/* ---- Screens ---- */
.screen {
  display: none;
  padding: 16px 14px 100px;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeIn .18s ease;
}
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header ---- */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
#rates-line {
  font-size: 12px;
  color: var(--hint);
  margin-top: 2px;
}
.page-header .logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #5288c1, #3a6ea8);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(82, 136, 193, 0.35);
}

/* ---- Section title ---- */
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 20px 0 8px 2px;
}

/* ---- Generic card ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---- Info banner ---- */
.info-banner {
  background: rgba(82, 136, 193, 0.14);
  border: 1px solid rgba(82, 136, 193, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 4px;
}
.info-banner b { color: #7db8ea; }

.orders-closed-banner {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: #e05252;
  line-height: 1.5;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.orders-closed-refresh {
  background: none;
  border: none;
  color: #e05252;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.7;
}
.orders-closed-refresh:hover { opacity: 1; }

/* ---- Action cards (home screen) ---- */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.action-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 12px 18px;
  text-align: center;
  cursor: pointer;
  transition: transform .13s, background .13s;
  border: 1px solid var(--sep);
  width: 100%;
  color: var(--text);
}
.action-card:active { transform: scale(.96); background: #253344; }
.action-card .icon { font-size: 34px; margin-bottom: 10px; }
.action-card .label { font-size: 14.5px; font-weight: 600; }
.action-card .sub { font-size: 12px; color: var(--hint); margin-top: 4px; }
.action-card--wide { grid-column: 1 / -1; padding: 14px 20px; display: flex; align-items: center; gap: 14px; text-align: left; }
.action-card--wide .icon { font-size: 28px; margin-bottom: 0; }
.action-card--wide .label { font-size: 14.5px; font-weight: 600; }
.action-card--wide .sub { font-size: 12px; color: var(--hint); margin-top: 2px; }

/* ---- Orders screen ---- */
.order-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--sep);
  border-left-width: 3px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.order-card--card   { border-left-color: var(--btn); }
.order-card--topup  { border-left-color: #4bb543; }
.order-card-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card-title   { font-size: 14px; font-weight: 700; color: var(--text); }
.order-card-num     { font-size: 12px; color: var(--hint); font-weight: 400; margin-left: 4px; }
.order-card-footer  { display: flex; justify-content: space-between; align-items: flex-end; }
.order-card-meta    { }
.order-card-date    { font-size: 12px; color: var(--hint); }
.order-card-pay     { font-size: 12px; color: var(--hint); margin-top: 3px; }
.order-card-amount  { font-size: 16px; font-weight: 700; color: var(--text); text-align: right; }
.order-status { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.order-status--new        { background: rgba(255,255,255,.08); color: var(--hint); }
.order-status--paid       { background: rgba(82,136,193,.2);   color: #7db8ea; }
.order-status--processing { background: rgba(232,160,0,.15);   color: #e8a000; }
.order-status--done       { background: rgba(75,181,67,.15);   color: #4bb543; }
.order-status--cancelled  { background: rgba(224,82,82,.15);   color: #e05252; }
.order-card-status-row  { display: flex; align-items: center; gap: 6px; }
.order-refresh-btn { background: none; border: none; color: var(--hint); font-size: 15px; cursor: pointer; padding: 0; line-height: 1; transition: transform .3s; }
.order-refresh-btn:hover { color: var(--text); }
.order-refresh-btn--spin { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Field list ---- */
.field-list {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--sep);
}
.field {
  display: flex;
  flex-direction: column;
  padding: 11px 14px;
  border-bottom: 1px solid var(--sep);
}
.field:last-child { border-bottom: none; }
.field label {
  font-size: 11.5px;
  color: var(--hint);
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.field input, .field select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: rgba(108, 132, 157, 0.6); }

/* ---- Payment method toggle ---- */
.method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.method-btn {
  border: 1.5px solid var(--sep);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  background: var(--card);
  color: var(--hint);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: border-color .13s, background .13s, color .13s;
}
.method-btn .m-icon { font-size: 22px; display: block; margin-bottom: 3px; }
.method-btn.selected {
  border-color: var(--btn);
  background: rgba(82, 136, 193, 0.15);
  color: #7db8ea;
}

/* ---- Calc box ---- */
.calc-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 4px 14px;
  border: 1px solid var(--sep);
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--sep);
}
.calc-row:last-child { border-bottom: none; }
.calc-row .label { color: var(--hint); }
.calc-row .value { font-weight: 600; }
.calc-total .value { font-size: 16px; color: #7db8ea; }

/* ---- Amount highlight ---- */
.amount-highlight {
  background: rgba(82, 136, 193, 0.13);
  border: 1px solid rgba(82, 136, 193, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.amount-highlight .big {
  font-size: 30px;
  font-weight: 700;
  color: #7db8ea;
  line-height: 1;
}
.amount-highlight .sub {
  font-size: 13px;
  color: var(--hint);
  margin-top: 4px;
}

/* ---- Payment details ---- */
.pay-details {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--sep);
}
.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sep);
  gap: 10px;
}
.pay-row:last-child { border-bottom: none; }
.pay-row .key { font-size: 13px; color: var(--hint); flex-shrink: 0; }
.pay-row .val { font-size: 14px; font-weight: 600; text-align: right; word-break: break-all; }
.copy-btn {
  background: rgba(82, 136, 193, 0.18);
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #7db8ea;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 600;
  font-family: inherit;
}
.copy-btn:active { opacity: .7; }
.pay-row--copy-only { justify-content: space-between; }
.pay-row--copy-only .val { flex: 1; text-align: left; word-break: break-all; }
.copy-btn--icon {
  background: none;
  font-size: 18px;
  padding: 2px 6px;
  color: var(--hint);
  border-radius: 4px;
}
.copy-btn--icon:active { opacity: .5; }

/* ---- Statement screen ---- */
.limit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.limit-tab {
  flex: 1;
  padding: 8px 0;
  border: 1.5px solid var(--sep);
  border-radius: 8px;
  background: none;
  color: var(--hint);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.limit-tab.active {
  background: var(--btn);
  border-color: var(--btn);
  color: #fff;
}
.statement-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}
.statement-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--hint);
  font-size: 14px;
}
.tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sep);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tx-info { flex: 1; min-width: 0; }
.tx-desc {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-date { font-size: 12px; color: var(--hint); margin-top: 2px; }
.tx-amount {
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  text-align: right;
}
.tx-amount.credit { color: var(--green); }
.tx-amount.debit  { color: var(--red, #e05252); }
.tx-amount.neutral { color: var(--hint); }

/* ---- Primary button ---- */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: opacity .13s, transform .1s;
  font-family: inherit;
  letter-spacing: .1px;
}
.btn-primary:active { opacity: .85; transform: scale(.99); }
.btn-primary:disabled { opacity: .4; cursor: default; }

.btn-secondary {
  display: block;
  width: 100%;
  background: var(--bg2);
  color: var(--text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: opacity .13s;
  font-family: inherit;
}
.btn-secondary:active { opacity: .75; }

/* ---- Back button ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 16px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

/* ---- Conditions table (home) ---- */
.card .calc-row { padding: 10px 14px; }
.card .calc-row:last-child { border-bottom: none; }

/* ---- Success screen ---- */
.success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 0 24px;
}
.success-icon { font-size: 68px; margin-bottom: 18px; }
.success-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-sub {
  font-size: 15px;
  color: var(--hint);
  line-height: 1.55;
  max-width: 290px;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all .22s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.15);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Spinner ---- */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- QR code block ---- */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 18px;
  gap: 12px;
}
.qr-wrap canvas, .qr-wrap img { display: block; border-radius: 4px; }
.qr-hint {
  font-size: 13px;
  color: #555;
  margin: 0;
  text-align: center;
}
.qr-loading {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
}

/* ---- Support button ---- */
.btn-support {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: opacity .13s, transform .1s;
}
.btn-support:active { opacity: .7; transform: scale(.99); }

/* ---- App version ---- */
.app-version {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  color: var(--hint);
  opacity: 0.55;
  pointer-events: none;
  z-index: 999;
}

/* ---- Update banner ---- */
.update-banner {
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1f2f45;
  border: 1px solid rgba(92,168,220,0.35);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}
.update-banner__icon {
  font-size: 26px;
  flex-shrink: 0;
}
.update-banner__text {
  flex: 1;
  min-width: 0;
}
.update-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.update-banner__sub {
  font-size: 12px;
  color: var(--hint);
  margin-top: 2px;
}
.update-banner__btn {
  background: var(--btn);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.update-banner__btn:hover {
  opacity: 0.85;
}
.update-banner__btn:active {
  opacity: 0.65;
  transform: scale(0.94);
}
.update-banner__close {
  background: none;
  border: none;
  color: var(--hint);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}

/* ---- SBP link button ---- */
.btn-sbp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  background: rgba(93, 160, 224, 0.12);
  border: 1px solid rgba(93, 160, 224, 0.25);
  border-radius: var(--radius);
  color: var(--link);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-sbp-link:active { opacity: 0.7; }

/* ---- Cancel button ---- */
.btn-cancel {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: opacity .13s, transform .1s;
}
.btn-cancel:active { opacity: .7; transform: scale(.99); }

/* ---- QR payment status ---- */
.usdt-qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 16px 0 4px;
}
.usdt-qr-label {
  font-size: 12px;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.usdt-qr-block img {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  display: block;
}

.qr-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--hint);
}
.qr-countdown span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 36px;
}

.qr-poll-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.qr-poll-status.waiting {
  background: rgba(93, 160, 224, 0.12);
  color: var(--link);
}
.qr-poll-status.paid {
  background: rgba(77, 202, 122, 0.15);
  color: var(--green);
  font-size: 16px;
}
.qr-poll-status.rejected {
  background: rgba(224, 82, 82, 0.12);
  color: var(--red);
}
.spinner-tiny {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ---- Balance modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn .18s ease;
}
.modal-box {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 36px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  border-top: 1px solid var(--sep);
}
.modal-state { display: flex; flex-direction: column; align-items: center; min-height: 80px; justify-content: center; }
.modal-close {
  margin-top: 20px;
  width: 100%;
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.modal-close:active { opacity: .7; }

/* ---- Note text ---- */
.note {
  font-size: 13px;
  color: var(--hint);
  line-height: 1.55;
  margin-top: 10px;
  padding: 0 2px;
}

/* ---- Rates unavailable hint ---- */
.rates-hint {
  font-size: 13px;
  color: var(--red);
  text-align: center;
  margin-top: 8px;
}

/* ---- Login screen ---- */
.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  gap: 12px;
  padding: 32px 16px;
}
.login-logo {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 4px;
}
.login-title {
  font-size: 28px;
  font-weight: 700;
}
.login-desc {
  font-size: 14px;
  color: var(--hint);
  max-width: 280px;
  line-height: 1.5;
}
.login-hint {
  font-size: 14px;
  color: var(--text);
  margin-top: 8px;
}
.login-widget-wrap {
  margin-top: 8px;
  min-height: 48px;
}
.login-error {
  font-size: 13px;
  color: var(--red);
  min-height: 16px;
}
.login-reload-hint {
  font-size: 12px;
  color: var(--hint);
  margin-top: 16px;
}
.login-reload-hint a { color: var(--link); text-decoration: none; }
.login-reload-hint a:hover { text-decoration: underline; }

/* ---- Logout button ---- */
.logout-btn {
  background: none;
  border: 1px solid var(--sep);
  color: var(--hint);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.logout-btn:hover {
  border-color: var(--hint);
  color: var(--text);
}

/* ================================================================
   ADMIN PANEL
================================================================ */
.action-card--admin {
  border: 1px solid rgba(255, 160, 0, 0.25);
  background: rgba(255, 140, 0, 0.07);
}
.action-card--admin:hover { background: rgba(255, 140, 0, 0.13); }


#admin-orders-summary { padding: 14px 16px; }
#admin-orders-summary .calc-row { padding: 4px 0; }

.admin-order-card {
  background: var(--card);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: opacity 0.4s;
}
.admin-order-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--sep);
}
.admin-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.admin-badge--card  { background: rgba(82, 136, 193, 0.18); color: #7db8ea; }
.admin-badge--topup { background: rgba(80, 200, 120, 0.15); color: #5cb85c; }
.admin-order-num { font-size: 13px; color: var(--hint); flex: 1; }
.admin-order-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.admin-order-row { font-size: 14px; line-height: 1.4; }
.admin-order-actions {
  display: flex;
  gap: 6px;
  padding: 8px 14px 12px;
  flex-wrap: wrap;
}
.admin-btn {
  flex: 1;
  min-width: 60px;
  padding: 7px 8px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.admin-btn:disabled { opacity: 0.5; cursor: default; }
.admin-btn--status  { background: rgba(82, 136, 193, 0.18); color: #7db8ea; }
.admin-btn--dialog  { background: rgba(255, 200, 50, 0.12); color: #e0b040; }
.admin-btn--card    { background: rgba(80, 200, 120, 0.15); color: #5cb85c; }
.admin-btn--delete  { background: rgba(220, 50, 50, 0.12); color: #e05; max-width: 44px; flex: none; }

.admin-btn-cancel-stale {
  padding: 3px 9px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(220, 50, 50, 0.18);
  color: #e05555;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}
.admin-btn-cancel-stale:active { opacity: 0.7; }

.admin-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--bg2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.admin-status-item:hover { background: rgba(255,255,255,0.05); }
.admin-status-item--active {
  border-color: var(--btn);
  background: rgba(82, 136, 193, 0.12);
}
.admin-status-item--new       { }
.admin-status-item--paid      { }
.admin-status-item--processing{ }
.admin-status-item--done      { border-color: rgba(80,200,120,0.5); }
.admin-status-item--cancelled { border-color: rgba(220,50,50,0.4); }

/* ================================================================
   ADMIN ALL ORDERS
================================================================ */
.aao-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.aao-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.aao-chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--sep);
  background: var(--bg2);
  color: var(--hint);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.aao-chip--active {
  border-color: var(--btn);
  background: rgba(82, 136, 193, 0.15);
  color: var(--btn);
  font-weight: 600;
}
.aao-order-card {
  background: var(--card);
  border-radius: 14px;
  margin-bottom: 8px;
  padding: 12px 14px;
}
.aao-order-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.aao-order-body { display: flex; flex-direction: column; gap: 3px; }
.aao-order-row { font-size: 14px; line-height: 1.4; }

/* ---- Refresh button ---- */
.btn-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--hint);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.btn-refresh svg {
  width: 17px;
  height: 17px;
  transition: transform 0.5s ease;
}
.btn-refresh:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.btn-refresh:active {
  background: rgba(255,255,255,0.14);
  transform: scale(0.93);
}
.btn-refresh.spinning svg {
  animation: btn-spin 0.6s ease;
}
@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---- Order card entrance animation ---- */
@keyframes order-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.order-animated {
  animation: order-in 0.25s ease both;
}

/* ---- Pretty loader ---- */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 0;
  color: var(--hint);
  font-size: 13px;
}
.loader-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--btn);
  opacity: 0.3;
  animation: loader-pulse 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes loader-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1.1);  }
}

/* Bottom sheet для выбора номера заявки */
.ao-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
}
.ao-sheet-overlay.open { display: block; }

.ao-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  z-index: 901;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.4);
}
.ao-sheet.open { transform: translateY(0); }

.ao-sheet-handle {
  width: 36px; height: 4px;
  background: var(--sep);
  border-radius: 2px;
  margin: 10px auto 0;
}
.ao-sheet-header {
  padding: 12px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sep);
}
.ao-sheet-header span {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.ao-sheet-close {
  background: none;
  border: none;
  color: var(--hint);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.ao-sheet-list {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.ao-sheet-item {
  padding: 14px 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--sep);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
}
.ao-sheet-item:active { background: var(--bg2); }
