/* DILMUSS keshbek — Mini App. Karta ko'rinishi do'kon kabinetidagi (dilmuss_shop_v2, account.css) bilan bir xil */
:root {
  --bg: #f7f6f2; --card: #fff; --text: #000; --muted: #707070; --line: #ebe8df; --chip: #f1efe8; --ok: #2f7a3d;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
.app { max-width: 480px; margin: 0 auto; padding: calc(12px + var(--sat)) 16px calc(24px + var(--sab)); }
.top { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 14px; }
.top__logo { height: 26px; }
.top__tag { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 5px 11px; border-radius: 20px; background: var(--chip); }

/* ---- karta (aylanadi: old — balans, orqa — QR) ---- */
/* .card — umumiy ko'rinish (fon, bezak); doim .face bilan birga. .face / .face--back qoidalari KEYIN keladi — orqa tomon
   qatorda (QR chapda, yozuv o'ngda) bo'lishi uchun ular .card ni bekor qilishi kerak */
.card {
  overflow: hidden; border-radius: 18px; padding: 20px 22px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 140% at 100% 0%, #3a3a34 0%, #161614 55%, #000 100%);
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .6);
}
.flip { perspective: 1200px; }
.flip.is-flippable { cursor: pointer; }
.flip__inner { position: relative; aspect-ratio: 1.586; transition: transform .7s cubic-bezier(.2, .75, .25, 1); transform-style: preserve-3d; }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face--back { transform: rotateY(180deg); flex-direction: row; align-items: stretch; justify-content: space-between; gap: 16px; padding: 18px; }
.card::before, .card::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); pointer-events: none; }
.card::before { width: 260px; height: 260px; right: -110px; bottom: -150px; }
.card::after { width: 180px; height: 180px; right: -70px; bottom: -110px; border-color: rgba(255, 255, 255, .12); }
.card__top, .card__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; }
.card__logo { height: 18px; filter: invert(1); }
.card__tag { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background: rgba(255, 255, 255, .12); }
.card__label { font-size: 12px; color: rgba(255, 255, 255, .6); margin-bottom: 4px; }
.card__sum { font-size: 32px; line-height: 38px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.card__sum.is-dim { color: rgba(255, 255, 255, .5); }
.card__holder { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__num { font-size: 12px; letter-spacing: .12em; color: rgba(255, 255, 255, .6); flex: none; }
.qr {
  flex: none; height: 100%; aspect-ratio: 1; padding: 6px; border: 0; background: #fff; border-radius: 12px;
  position: relative; cursor: zoom-in; box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.qr svg { display: block; width: 100%; height: 100%; }
.back-meta { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; text-align: right; min-width: 0; position: relative; }
.back-meta__logo { height: 16px; filter: invert(1); }
.back-meta__label { display: block; font-size: 11px; letter-spacing: .02em; color: rgba(255, 255, 255, .55); margin-bottom: 4px; white-space: nowrap; }
.back-meta__code { display: block; font-size: 13px; letter-spacing: .1em; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.hint { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- qoidalar, tugmalar ---- */
.box { background: var(--card); border-radius: 16px; padding: 18px 16px; margin-top: 16px; }
.box h2 { font-size: 17px; line-height: 23px; margin: 0 0 14px; font-weight: 600; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rules li { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 19px; color: #3d3b33; }
.rules b { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #000; }
.muted { color: var(--muted); font-size: 13px; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; border: 0; border-radius: 12px;
  background: #000; color: #fff; font: inherit; font-weight: 500; cursor: pointer; margin-top: 12px;
}
.btn:disabled { opacity: .5; }
.btn--light { background: var(--chip); color: #000; }
.phone { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---- ulanmagan / xato ---- */
.empty { text-align: center; padding: 28px 8px 8px; }
.empty__icon { font-size: 44px; line-height: 1; margin-bottom: 14px; }
.empty h2 { font-size: 19px; margin: 0 0 8px; }
.empty p { margin: 0; color: #3d3b33; }

/* ---- QR katta (kassa uchun) ---- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.overlay__box { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 28px 24px 20px; text-align: center; }
.overlay__logo { height: 24px; margin-bottom: 22px; }
.overlay svg { display: block; width: min(260px, 70vw); height: auto; margin: 0 auto; }
.overlay__code { margin: 10px 0 0; font-size: 15px; letter-spacing: .24em; }
.overlay__who { margin: 16px 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.overlay .muted { margin: 0 0 18px; }

/* ---- yuklanish ---- */
.sk { display: block; border-radius: 6px; background: var(--line); animation: sk 1.2s ease-in-out infinite; }
.sk--dark { background: rgba(255, 255, 255, .14); }
.sk-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
@keyframes sk { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } .flip__inner { transition: none; } }
