/* صفحه‌های ورود و داشبورد — روی همون توکن‌های redesign.css ساخته شده */
:root {
  --ok: 61, 220, 151;
  --slot: 54px;
  --slot-bg: rgba(10, 6, 20, .55);
}
.page { min-height: 100vh; padding: 112px 0 64px; }
.page .header { position: fixed; }
.header-actions .btn-login { cursor: pointer; font-family: var(--font-md); }

/* ---------- ورود ---------- */
.auth-wrap { min-height: calc(100vh - 176px); display: grid; place-items: center; }
.auth-card { width: min(440px, 100%); padding: 36px 32px 30px; border-radius: var(--r-lg); }
.auth-card h1 { font-size: 1.55rem; margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); font-size: .95rem; margin-bottom: 26px; }
.field-label { display: block; font-family: var(--font-md); font-size: .88rem; margin-bottom: 8px; color: #d9d0e8; }
.input {
  width: 100%; padding: 14px 18px; border-radius: var(--r-md);
  background: var(--slot-bg); border: 1px solid var(--glass-line);
  color: #fff; font: inherit; font-size: 1.15rem; letter-spacing: 1px;
  direction: ltr; text-align: left; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: rgba(169,159,187,.55); }
.input:focus { outline: none; border-color: rgba(185,140,255,.7); box-shadow: 0 0 0 4px rgba(155,89,182,.22); }
.auth-card .btn { width: 100%; margin-top: 18px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
.form-msg { min-height: 1.6em; margin-top: 14px; font-size: .88rem; color: #ff8fa3; }
.form-msg.ok { color: rgb(var(--ok)); }
.otp { display: flex; gap: 10px; direction: ltr; justify-content: space-between; }
.otp input {
  width: 100%; min-width: 0; aspect-ratio: 1 / 1.12; text-align: center;
  padding: 0; font-size: 1.5rem; font-family: var(--font-bd);
  border-radius: 14px; background: var(--slot-bg); border: 1px solid var(--glass-line); color: #fff;
}
.otp input:focus { outline: none; border-color: rgba(185,140,255,.8); box-shadow: 0 0 0 4px rgba(155,89,182,.22); }
.link-btn { background: none; border: 0; color: var(--violet); font: inherit; cursor: pointer; padding: 0; }
.link-btn[disabled] { color: var(--muted); cursor: default; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.hidden { display: none !important; }

/* ---------- داشبورد ---------- */
.dash-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h1 { font-size: 1.9rem; }
.dash-head p { color: var(--muted); font-size: .92rem; }
.phone-ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { border-radius: var(--r-lg); padding: 26px 26px 24px; }
.panel h2 { font-size: 1.1rem; margin-bottom: 4px; }
.panel .sub { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.panel.wide { grid-column: 1 / -1; }

.status-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; font-family: var(--font-md); font-size: .82rem; background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: #7d7390; }
.chip.on { color: rgb(var(--ok)); border-color: rgba(var(--ok), .4); background: rgba(var(--ok), .1); }
.chip.on i { background: rgb(var(--ok)); box-shadow: 0 0 10px rgb(var(--ok)); }
.playtime { font-family: var(--font-bd); font-size: 1.7rem; line-height: 1.5; color: #fff; }
.playtime small { font-family: var(--font); font-size: .9rem; color: var(--muted); margin-inline-start: 6px; }
.meta { color: var(--muted); font-size: .86rem; margin-top: 6px; }
.empty { color: var(--muted); font-size: .92rem; padding: 18px; border: 1px dashed var(--glass-line); border-radius: var(--r-md); }

/* مچ کردن با گیم */
.cmd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; direction: ltr;
  padding: 12px 16px; border-radius: var(--r-md); background: var(--slot-bg); border: 1px solid var(--glass-line);
  font-family: "Roboto", ui-monospace, monospace; font-size: 1.15rem; margin: 14px 0 10px;
}
.cmd b { color: var(--violet); font-weight: 700; letter-spacing: 3px; }
.cmd button { font: inherit; font-family: var(--font-md); font-size: .8rem; padding: 5px 14px; border-radius: 999px; cursor: pointer; color: #fff; background: rgba(255,255,255,.08); border: 1px solid var(--glass-line); }
.cmd button:hover { background: rgba(155,89,182,.3); }
.steps { margin: 0 0 6px; padding-inline-start: 20px; color: #d9d0e8; font-size: .9rem; }
.steps li { margin-bottom: 2px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn.sm { padding: 8px 20px; font-size: .86rem; }
.btn-danger { border-color: rgba(var(--red), .4); color: #ff9aac; background: rgba(var(--red), .08); }
.btn-danger:hover { background: rgba(var(--red), .18); color: #fff; }
.waiting { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.waiting::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(185,140,255,.3); border-top-color: var(--violet); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- اینونتوری ---------- */
.inv { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; direction: ltr; }
.inv-board { padding: 16px; border-radius: 20px; background: rgba(10, 6, 20, .45); border: 1px solid var(--glass-line); }
.inv-top { display: flex; gap: 14px; }
.grid-armor { display: grid; grid-template-rows: repeat(4, var(--slot)); gap: 6px; }
.grid-main { display: grid; grid-template-columns: repeat(9, var(--slot)); gap: 6px; }
.inv-sep { height: 14px; }
.slot-offhand { margin-top: 6px; }
.slot {
  position: relative; width: var(--slot); height: var(--slot); padding: 0; cursor: pointer;
  border-radius: 10px; background: var(--slot-bg); border: 1px solid rgba(255,255,255,.1);
  color: #fff; display: grid; place-items: center; transition: border-color .15s, background .15s;
}
.slot:hover { border-color: rgba(185,140,255,.55); background: rgba(155,89,182,.18); }
.slot.empty-slot { cursor: default; }
.slot.held { border-color: rgba(185,140,255,.9); box-shadow: 0 0 0 2px rgba(155,89,182,.45); }
.slot.sel { background: rgba(155,89,182,.3); border-color: #fff; }
.slot .ic { width: 70%; height: 70%; image-rendering: pixelated; object-fit: contain; }
.slot .tile { width: 70%; height: 70%; border-radius: 7px; display: grid; place-items: center; font-family: "Roboto", sans-serif; font-weight: 700; font-size: .8rem; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.slot .qty { position: absolute; right: 4px; bottom: 1px; font-family: "Roboto", sans-serif; font-weight: 700; font-size: .78rem; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.slot .dur { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; border-radius: 2px; background: rgba(0,0,0,.6); overflow: hidden; }
.slot .dur i { display: block; height: 100%; }
.inv-detail { flex: 1 1 240px; min-width: 220px; direction: rtl; padding-top: 4px; }
.inv-detail h3 { font-size: 1.05rem; margin-bottom: 4px; }
.inv-detail .hint { color: var(--muted); font-size: .9rem; }
.inv-detail ul { margin: 10px 0 0; padding: 0; list-style: none; }
.inv-detail li { font-size: .88rem; color: #d9d0e8; padding: 3px 0; }
.inv-detail .ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.inv-stats { color: var(--muted); font-size: .86rem; margin-bottom: 14px; }
.skeleton .slot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .inv { justify-content: center; }
}
@media (max-width: 560px) {
  :root { --slot: calc((100vw - 96px) / 10); }
  .grid-main { gap: 4px; }
  .grid-armor { gap: 4px; }
  .inv-board { padding: 10px; }
  .inv-top { gap: 8px; }
  .panel { padding: 20px 18px; }
  .auth-card { padding: 28px 20px 24px; }
  .slot .qty { font-size: .62rem; right: 2px; }
  .slot .tile { font-size: .62rem; }
  .dash-head h1 { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .waiting::before, .skeleton .slot { animation: none; }
}
