/* Authly Grej — store, account and store-manager components (manga theme) */

/* ---------- Product artwork ---------- */
.p-art { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #fff; }
.p-art-ph { position: relative; overflow: hidden; display: grid; place-items: center; background: #fff; }
.p-art-ph .ph-burst { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, var(--ink) 0deg .8deg, transparent .8deg 7deg); mask-image: radial-gradient(circle, transparent 22%, #000 60%); -webkit-mask-image: radial-gradient(circle, transparent 22%, #000 60%); opacity: .55; }
.p-art-ph .ph-tone { position: absolute; inset: 0; background-image: radial-gradient(var(--ink) 1.1px, transparent 1.4px); background-size: 8px 8px; opacity: .1; }
.p-art-ph b { position: relative; font-family: var(--font-manga); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4rem); color: var(--pink); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); transform: rotate(-6deg); }

/* ---------- Product cards ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.p-card { position: relative; display: flex; flex-direction: column; background: #fff; border: var(--stroke) solid var(--ink); border-radius: 16px; box-shadow: var(--pop); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.p-card:hover { transform: translate(-3px, -3px); box-shadow: var(--pop-lg); }
.p-card .p-art { border-bottom: var(--stroke) solid var(--ink); transition: transform .6s var(--ease); }
.p-card:hover .p-art { transform: scale(1.04); }
.p-card .art-wrap { overflow: hidden; }
.p-card .body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.p-card .cat { font-family: var(--font-jp); font-weight: 900; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); }
.p-card h3 { font-family: var(--font-manga); font-weight: 400; font-size: 1.3rem; line-height: 1.2; }
.p-card p { color: var(--muted); font-size: .9rem; flex: 1; }
.p-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.p-card .from { font-size: .78rem; color: var(--muted); }
.p-card .from b { display: block; font-family: var(--font-manga); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.sticker { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); font-weight: 800; font-size: .74rem; box-shadow: 2px 2px 0 var(--ink); transform: rotate(4deg); }

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 30px; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; font-weight: 700; font-size: .86rem; cursor: pointer; transition: background .2s, transform .2s var(--ease), box-shadow .2s; box-shadow: 2px 2px 0 var(--ink); }
.chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chip.on { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--pink); }

/* ---------- Featured spotlight ---------- */
.spot { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--pop-lg); overflow: hidden; margin-bottom: 56px; }
.spot .art-wrap { border-right: 3px solid var(--ink); }
.spot .p-art { height: 100%; aspect-ratio: auto; min-height: 320px; }
.spot .info { padding: 36px clamp(22px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; gap: 14px; position: relative; }
.spot h2 { font-family: var(--font-manga); font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; }
.spot .lead { font-size: 1rem; }
.spot .price-row { display: flex; align-items: baseline; gap: 10px; }
.spot .price-row b { font-family: var(--font-manga); font-weight: 400; font-size: 2rem; }

/* ---------- How buying works ---------- */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flow-step { position: relative; background: #fff; border: var(--stroke) solid var(--ink); border-radius: 16px; padding: 24px; box-shadow: var(--pop); }
.flow-step .num { position: absolute; top: -18px; left: 18px; width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 10px; background: var(--pink); color: #fff; font-family: var(--font-manga); box-shadow: 2px 2px 0 var(--ink); }
.flow-step h3 { font-family: var(--font-manga); font-weight: 400; font-size: 1.15rem; margin: 10px 0 6px; }
.flow-step p { color: var(--muted); font-size: .9rem; }
.flow-step .jp { position: absolute; top: 14px; right: 16px; font-family: var(--font-jp); font-weight: 900; color: rgba(18,18,22,.12); font-size: 1.4rem; }

/* ---------- Product page ---------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.pd .gallery { position: sticky; top: 100px; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--pop-lg); background: #fff; }
.pd .gallery .p-art { aspect-ratio: 1 / 1; }
.pd h1 { font-family: var(--font-manga); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; margin: 10px 0 10px; }
.plans-pick { display: grid; gap: 10px; margin: 22px 0; }
.plan-opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: var(--stroke) solid var(--ink); border-radius: 14px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s; box-shadow: 3px 3px 0 var(--ink); }
.plan-opt:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt .radio { width: 22px; height: 22px; flex-shrink: 0; border: 2.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; background: #fff; }
.plan-opt .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); transform: scale(0); transition: transform .25s var(--ease); }
.plan-opt.on { background: var(--pink-soft); box-shadow: 4px 4px 0 var(--pink); }
.plan-opt.on .radio::after { transform: scale(1); }
.plan-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan-opt .pn { flex: 1; }
.plan-opt .pn b { display: block; font-weight: 800; }
.plan-opt .pn small { color: var(--muted); }
.plan-opt .pp { text-align: right; }
.plan-opt .pp b { font-family: var(--font-manga); font-weight: 400; font-size: 1.25rem; }
.plan-opt .pp s { display: block; color: var(--faint); font-size: .8rem; }
.plan-opt .save { position: absolute; top: -11px; right: 14px; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 6px; background: var(--yellow); font-size: .68rem; font-weight: 800; }
.buy-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.buy-bar .total { font-size: .86rem; color: var(--muted); }
.buy-bar .total b { display: block; font-family: var(--font-manga); font-weight: 400; color: var(--ink); font-size: 1.8rem; line-height: 1; }
.perks { display: grid; gap: 10px; margin-top: 24px; padding: 18px; border: 2px dashed var(--line-2); border-radius: 14px; }
.perks div { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.perks svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--pink); margin-top: 2px; }

/* ---------- Checkout ---------- */
.co { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.box { background: #fff; border: var(--stroke) solid var(--ink); border-radius: 18px; box-shadow: var(--pop); padding: 26px; }
.box + .box { margin-top: 20px; }
.box h2 { display: flex; align-items: center; gap: 12px; font-family: var(--font-manga); font-weight: 400; font-size: 1.3rem; margin-bottom: 16px; }
.box h2 .n { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 9px; background: var(--yellow); font-size: .95rem; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.method { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; box-shadow: 2px 2px 0 var(--ink); transition: transform .2s, box-shadow .2s, background .2s; text-align: left; }
.method:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.method.on { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--pink); }
.method .mi { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 2px solid currentColor; font-size: .8rem; font-family: var(--font-mono); flex-shrink: 0; }
.pay-info { margin-top: 16px; padding: 18px; border-radius: 14px; background: var(--bg); border: 2px dashed var(--ink); display: grid; gap: 12px; }
.pay-info .amount { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pay-info .amount b { font-family: var(--font-manga); font-weight: 400; font-size: 1.6rem; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); font-family: var(--font-mono); font-size: .86rem; overflow-wrap: anywhere; }
.copy-row .btn { flex-shrink: 0; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 2px dashed var(--line-2); font-size: .92rem; }
.summary .line:last-child { border: 0; }
.summary .line.total { font-weight: 800; font-size: 1.05rem; }
.summary .line.total b { font-family: var(--font-manga); font-weight: 400; font-size: 1.5rem; }
.summary .prod { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.summary .prod .p-art { width: 72px; height: 72px; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 12px; }
.summary .prod .p-art-ph b { font-size: 1.4rem; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 2px 2px 0 var(--ink); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .84rem; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  font: inherit; font-size: .94rem; outline: none; transition: box-shadow .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { box-shadow: 4px 4px 0 var(--pink); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.check-line { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .9rem; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--pink); }
.err { color: #dc2626; font-size: .84rem; font-weight: 600; margin-top: 6px; }

.drop { position: relative; display: grid; place-items: center; gap: 6px; min-height: 130px; padding: 18px; text-align: center; border: 2.5px dashed var(--ink); border-radius: 14px; background: #fff; cursor: pointer; transition: background .2s; }
.drop:hover, .drop.over { background: var(--pink-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { width: 28px; height: 28px; }
.drop small { color: var(--muted); }
.drop img.preview { max-height: 160px; border: 2px solid var(--ink); border-radius: 10px; }

/* ---------- Status stamps ---------- */
.stamp { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 8px; font-weight: 800; font-size: .76rem; letter-spacing: .02em; white-space: nowrap; box-shadow: 2px 2px 0 var(--ink); }
.stamp i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stamp.awaiting_approval, .stamp.processing { background: var(--yellow); color: var(--ink); }
.stamp.approved { background: #c9f7df; color: #065f46; }
.stamp.rejected { background: #ffd5d5; color: #991b1b; }
.stamp.cancelled { background: #eee; color: #555; }

/* ---------- Account / orders ---------- */
.acct-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.avatar-big { width: 72px; height: 72px; border-radius: 18px; border: 3px solid var(--ink); background: var(--pink); color: #fff; display: grid; place-items: center; font-family: var(--font-manga); font-size: 1.8rem; box-shadow: 4px 4px 0 var(--ink); }
.acct-head h1 { font-family: var(--font-manga); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; border: 2px solid var(--ink); font-size: .72rem; font-weight: 800; background: #fff; }
.role-tag i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.tabs-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab-btn { height: 42px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-weight: 800; font-size: .9rem; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .2s, box-shadow .2s, background .2s; display: inline-flex; align-items: center; gap: 8px; }
.tab-btn:hover { transform: translate(-1px, -1px); }
.tab-btn.on { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--pink); }
.tab-btn .count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--pink); color: #fff; font-size: .72rem; border: 2px solid var(--ink); }
.order { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; background: #fff; border: var(--stroke) solid var(--ink); border-radius: 16px; box-shadow: var(--pop); }
.order + .order { margin-top: 16px; }
.order .p-art { width: 84px; height: 84px; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 12px; }
.order .p-art-ph b { font-size: 1.5rem; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 2px 2px 0 var(--ink); }
.order h3 { font-family: var(--font-manga); font-weight: 400; font-size: 1.15rem; }
.order .meta { font-size: .84rem; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.order .meta code { font-family: var(--font-mono); color: var(--ink); }
.order .right { text-align: right; display: grid; gap: 8px; justify-items: end; }
.order .right b { font-family: var(--font-manga); font-weight: 400; font-size: 1.2rem; }
.order .extra { grid-column: 1 / -1; }
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--pink); }
.keybox code { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; overflow-wrap: anywhere; color: #c4f5da; }
.keybox .lbl { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); width: 100%; }
.keybox .btn-light { box-shadow: none !important; height: 34px; }
.note-box { padding: 12px 14px; border-radius: 12px; border: 2px solid var(--ink); background: var(--bg); font-size: .9rem; }
.note-box.bad { background: #fff0f0; }

.empty { text-align: center; padding: 50px 20px; background: #fff; border: 3px dashed var(--ink); border-radius: 18px; }
.empty .sfx-inline { font-family: var(--font-manga); font-size: 2.4rem; color: var(--pink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); display: block; margin-bottom: 10px; transform: rotate(-4deg); }
.empty h3 { font-family: var(--font-manga); font-weight: 400; font-size: 1.3rem; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------- Store manager ---------- */
.sm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.sm-stat { background: #fff; border: var(--stroke) solid var(--ink); border-radius: 14px; padding: 16px 18px; box-shadow: var(--pop); }
.sm-stat span { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sm-stat b { display: block; font-family: var(--font-manga); font-weight: 400; font-size: 1.8rem; margin-top: 4px; }
.sm-stat.hot { background: var(--yellow); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.row h4 { font-weight: 800; font-size: .98rem; }
.row .sub { font-size: .82rem; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.row .sub code { font-family: var(--font-mono); color: var(--ink); }
.row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn-xs { height: 34px !important; padding: 0 12px !important; font-size: .8rem !important; border-radius: 9px !important; }
.btn-ok { background: #16a34a !important; color: #fff !important; border-color: var(--ink) !important; box-shadow: 3px 3px 0 var(--ink) !important; }
.btn-bad { background: #fff !important; color: #dc2626 !important; box-shadow: 3px 3px 0 var(--ink) !important; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; font-size: .86rem; }
.perm input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--pink); }
.perm b { display: block; font-family: var(--font-mono); font-size: .76rem; }
.role-card { display: grid; gap: 10px; padding: 18px; background: #fff; border: var(--stroke) solid var(--ink); border-radius: 16px; box-shadow: var(--pop); }
.role-card .top { display: flex; align-items: center; gap: 10px; }
.role-card .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.role-card h4 { font-weight: 800; flex: 1; }
.role-card .perms { display: flex; flex-wrap: wrap; gap: 6px; }
.role-card .perms span { font-family: var(--font-mono); font-size: .72rem; padding: 3px 8px; border-radius: 6px; background: var(--bg); border: 1.5px solid var(--ink); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.plan-rows { display: grid; gap: 8px; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 90px 100px 100px 40px; gap: 8px; align-items: center; }
.plan-row .x { width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 800; }
.plan-row-head { display: grid; grid-template-columns: minmax(0, 1.4fr) 90px 100px 100px 40px; gap: 8px; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.method-edit { padding: 16px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; display: grid; gap: 10px; box-shadow: 3px 3px 0 var(--ink); }
.method-edit + .method-edit { margin-top: 12px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(18,18,22,.55); backdrop-filter: blur(3px); animation: fadeIn .2s ease; }
.modal { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 8px 8px 0 var(--pink); padding: 26px; animation: popIn .35s var(--ease); }
.modal.wide { max-width: 860px; }
.modal h3 { font-family: var(--font-manga); font-weight: 400; font-size: 1.5rem; margin-bottom: 6px; }
.modal .sub { color: var(--muted); margin-bottom: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal img.proof { width: 100%; border: 2px solid var(--ink); border-radius: 12px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.skeleton { height: 120px; border-radius: 16px; border: 2px solid var(--line-2); background: linear-gradient(90deg, #fff 0%, #f1efe9 50%, #fff 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .spot, .pd, .co { grid-template-columns: minmax(0, 1fr); }
  .spot .art-wrap { border-right: 0; border-bottom: 3px solid var(--ink); }
  .pd .gallery { position: static; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .acts { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .order { grid-template-columns: 64px minmax(0, 1fr); }
  .order .p-art { width: 64px; height: 64px; }
  .order .right { grid-column: 1 / -1; justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; justify-content: space-between; }
  .plan-row, .plan-row-head { grid-template-columns: minmax(0, 1fr) 70px 80px 36px; }
  .plan-row .cmp, .plan-row-head .cmp { display: none; }
}
