/* Member pages of the site (website/server.py): sign-up / login cards, the member panel, the DorasGem shop.
   Colours, buttons and panels come from rehber/css/style.css; the header's account corner is drawn by rehber/js/app.js. */

/* ---------- shared ---------- */
.btn.small { padding: 9px 16px; font-size: 12px; }
.btn.wide { width: 100%; justify-content: center; }
.muted { color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 6px; }
code { font: 13px/1.3 ui-monospace, Consolas, monospace; color: var(--gold-hi); background: rgba(232, 182, 90, .08); padding: 2px 6px; border-radius: 5px; }
.alert { padding: 11px 14px; border-radius: 10px; border: 1px solid; margin: 14px 0; font-size: 15px; }
.alert.bad { color: #ffd9de; background: rgba(224, 71, 90, .14); border-color: rgba(224, 71, 90, .5); }
.alert.good { color: #d4f7dc; background: rgba(143, 224, 160, .12); border-color: rgba(143, 224, 160, .45); }
.alert.wait { color: #fff0cc; background: rgba(232, 182, 90, .1); border-color: rgba(232, 182, 90, .45); }
.alert a { text-decoration: underline; }
.account { padding-top: 56px; min-height: 70vh; }
.wrap.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.account h1 { font-family: var(--display); color: var(--gold-hi); margin: 0 0 8px; }

/* ---------- forms ---------- */
.account-form { display: grid; gap: 16px; margin-top: 18px; }
.account-form.panel { padding: 22px; }
.account-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: #dfe6f0; position: relative; }
.account-form small { color: var(--muted); font-weight: 400; font-size: 13px; }
.account-form input:not([type=hidden]):not([type=radio]) {
  width: 100%; padding: 12px 14px; color: var(--text); background: rgba(5, 8, 13, .7);
  border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
.account-form input:hover { border-color: rgba(232, 182, 90, .75); }
.account-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 182, 90, .18); }
.account-form input.mismatch { border-color: var(--fury); }
.account-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.account-form .btn { margin-top: 4px; font: inherit; font-weight: 700; letter-spacing: .12em; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px !important; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 5px 10px; border-radius: 7px;
  font: 600 12px/1 var(--body); color: var(--gold-hi); background: rgba(232, 182, 90, .1); border: 1px solid var(--line); cursor: pointer;
}
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.meter i { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .1); transition: background .2s; }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--fury); }
.meter[data-level="2"] i:nth-child(-n+2) { background: #e8a04a; }
.meter[data-level="3"] i:nth-child(-n+3) { background: #d8d860; }
.meter[data-level="4"] i { background: var(--good); }
.foot { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.foot.row { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- sign-up / login card ---------- */
.auth { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 18px 60px; }
.auth-card { width: min(980px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; padding: 0; overflow: hidden; border-radius: 18px; }
.auth-art {
  position: relative; min-height: 560px; background-size: cover; background-position: center; display: flex; align-items: flex-end; isolation: isolate;
}
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 9, 15, .15), rgba(7, 9, 15, .55) 45%, rgba(7, 9, 15, .96)); }
.auth-art > div { padding: 34px; }
.auth-art img { width: 230px; margin-bottom: 8px; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .8)); }
.auth-art .kicker { margin-bottom: 18px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; color: #dbe3ee; font-size: 15px; }
.perks li { padding-left: 24px; position: relative; }
.perks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 10px; background: var(--gold); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.auth-form { padding: 42px 40px; display: flex; flex-direction: column; justify-content: center; background: rgba(9, 13, 21, .6); }
.auth-form h1 { font: 600 30px/1.15 var(--display); color: var(--gold-hi); margin: 0 0 8px; letter-spacing: .03em; }
@media (max-width: 820px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-art { min-height: 200px; }
  .auth-art .perks { display: none; }
  .auth-art > div { padding: 22px; }
  .auth-art img { width: 170px; }
  .auth-form { padding: 28px 22px; }
}

/* ---------- member panel ---------- */
.dash { max-width: 1240px; margin: 0 auto; padding: 36px 22px 70px; display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.dash-side { position: sticky; top: 90px; padding: 20px; display: grid; gap: 16px; }
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { width: 44px; height: 44px; font-size: 20px; }
.who b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.who small { color: var(--muted); }
.gem-pill.big { justify-content: center; padding: 10px 14px; font-size: 17px; border-radius: 12px; }
.gem-pill.big i { width: 20px; height: 20px; }
.dash-nav { display: grid; gap: 3px; }
.dash-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; color: #cfd8e4; font-size: 15px; border: 1px solid transparent; }
.dash-nav a:hover { background: rgba(232, 182, 90, .07); color: var(--gold-hi); }
.dash-nav a.active { background: linear-gradient(90deg, rgba(232, 182, 90, .16), rgba(232, 182, 90, .03)); border-color: var(--line); color: var(--gold-hi); }
.dash-nav svg { width: 19px; height: 19px; fill: currentColor; opacity: .85; flex-shrink: 0; }
.link-out { width: 100%; padding: 10px; border-radius: 10px; background: none; border: 1px solid rgba(224, 71, 90, .35); color: #ffb4bd; font: inherit; font-size: 14px; cursor: pointer; }
.link-out:hover { background: rgba(224, 71, 90, .1); }
.dash-main { min-width: 0; }
.dash-head h1 { font: 600 clamp(26px, 3vw, 34px)/1.15 var(--display); color: var(--gold-hi); margin: 0 0 6px; }
.dash-main h2 { font: 600 20px/1.2 var(--display); color: var(--gold); margin: 30px 0 12px; letter-spacing: .03em; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.tile { padding: 18px; display: grid; gap: 6px; align-content: start; }
.tile > span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.tile b { font: 700 28px/1.1 var(--display); color: var(--text); }
.tile b.small-b { font: 600 17px/1.3 var(--body); }
.tile small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tile .btn { justify-self: start; }
.gem-num { color: #bdeeff !important; text-shadow: 0 0 18px rgba(92, 200, 255, .45); }
.state.ok { color: var(--good) !important; }
.state.wait { color: #ffd88a !important; }
.state.bad { color: #ff8b98 !important; }
.heroes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.hero-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.hero-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.hero-card img { width: 56px; height: 72px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); }
.hero-card div { flex: 1; min-width: 0; display: grid; }
.hero-card b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.hero-card span { color: var(--muted); font-size: 14px; }
.hero-card em { font: normal 700 14px/1 var(--display); padding: 7px 9px; border-radius: 8px; }
.hero-card em.light { color: #cfe6ff; background: rgba(111, 183, 255, .14); border: 1px solid rgba(111, 183, 255, .35); }
.hero-card em.fury { color: #ffd0d5; background: rgba(224, 71, 90, .14); border: 1px solid rgba(224, 71, 90, .35); }
.empty { color: var(--muted); padding: 22px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.two h2 { margin-top: 18px !important; }

/* ---------- DorasGem shop ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 20px; }
.pack {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 26px 14px 18px; border-radius: 16px; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, rgba(20, 30, 46, .9), rgba(10, 14, 22, .9)); border: 1px solid var(--line); transition: transform .18s, border-color .18s, box-shadow .18s;
}
.pack:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.pack input { position: absolute; opacity: 0; pointer-events: none; }
.pack:has(input:checked) { border-color: #6fd6ff; box-shadow: 0 0 0 2px rgba(92, 200, 255, .35), 0 14px 34px rgba(30, 120, 200, .25); }
.pack:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.pack .tag { position: absolute; top: -11px; padding: 5px 12px; border-radius: 999px; font: normal 700 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: #1a1206; background: linear-gradient(180deg, #ffe7a8, #e8b65a); }
.gem-icon.size0 { width: 34px; height: 34px; } .gem-icon.size1 { width: 40px; height: 40px; } .gem-icon.size2 { width: 46px; height: 46px; }
.gem-icon.size3 { width: 52px; height: 52px; } .gem-icon.size4 { width: 58px; height: 58px; }
.pack .gem-icon { margin-bottom: 8px; filter: drop-shadow(0 0 14px rgba(92, 200, 255, .75)); }
.pack .amount { font: 700 28px/1 var(--display); color: #e9f8ff; }
.pack .unit { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #9fd8f2; }
.pack .bonus { margin-top: 6px; font-size: 13px; color: var(--good); font-weight: 600; }
.pack .pname { color: var(--muted); font-size: 13px; }
.pack .price { margin-top: 10px; padding: 8px 16px; border-radius: 10px; font: 700 17px/1 var(--body); color: var(--gold-hi); background: rgba(232, 182, 90, .1); border: 1px solid var(--line); }
.pack:has(input:checked) .price { color: #1a1206; background: linear-gradient(180deg, #ffe7a8, #e8b65a); border-color: #ffe7a8; }
.shop-foot { max-width: 420px; margin: 22px auto 0; text-align: center; }
.fineprint { color: var(--muted); font-size: 13px; margin: 26px 0 0; padding-left: 18px; }
.table-wrap { padding: 4px 0; overflow-x: auto; }
table.orders { width: 100%; border-collapse: collapse; font-size: 15px; }
table.orders th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.orders td { padding: 12px 16px; border-bottom: 1px solid rgba(232, 182, 90, .08); white-space: nowrap; }
table.orders tr:last-child td { border-bottom: 0; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid; }
.chip.ok { color: var(--good); border-color: rgba(143, 224, 160, .4); background: rgba(143, 224, 160, .08); }
.chip.wait { color: #ffd88a; border-color: rgba(232, 182, 90, .45); background: rgba(232, 182, 90, .08); }
.chip.off { color: var(--muted); border-color: rgba(147, 161, 181, .35); }
.result { max-width: 560px; margin: 30px auto; padding: 36px 28px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.result h1 { font: 600 28px/1.2 var(--display); color: var(--gold-hi); margin: 10px 0 4px; }
.result .cta { margin-top: 16px; }
.price.big { font: 700 30px/1 var(--body); color: var(--gold-hi); margin: 4px 0 8px; }
.test-pay { border-style: dashed; }

@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; padding-top: 20px; }
  .dash-side { position: static; padding: 6px; gap: 0; }
  .dash-side .who, .dash-side .gem-pill.big, .dash-side form { display: none; }   /* the header carries them on a phone */
  .dash-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .two { grid-template-columns: 1fr; }
  table.orders thead { display: none; }
  table.orders tr { display: grid; padding: 10px 14px; border-bottom: 1px solid rgba(232, 182, 90, .1); }
  table.orders td { border: 0; padding: 4px 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; }
  table.orders td::before { content: attr(data-l); color: var(--muted); font-size: 13px; }
}
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } .packs { grid-template-columns: 1fr 1fr; } .pack .amount { font-size: 22px; } }
