/* VENUS CLIENT design system — shared by the Owner panel and the launcher.
   Palette: yellow #FFD600, white #FFFFFF, background #F7F7F5, dark #171717, gold #FFB800. No blue/purple. */
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --v-yellow: #FFD600;
  --v-gold: #FFB800;
  --v-white: #FFFFFF;
  --v-bg: #F7F7F5;
  --v-dark: #171717;
  --v-dark-2: #232323;
  --v-dark-3: #2E2E2E;
  --v-line: #E8E8E3;
  --v-muted: #77776F;
  --v-text: #171717;
  --v-green: #1FA85A;
  --v-red: #E5484D;
  --v-radius: 18px;
  --v-radius-sm: 12px;
  --v-shadow: 0 8px 30px rgba(23, 23, 23, .07);
  --v-shadow-lg: 0 20px 60px rgba(23, 23, 23, .18);
  --v-ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --v-white: #1F1F1F;
  --v-bg: #121212;
  --v-line: #333330;
  --v-muted: #A4A49A;
  --v-text: #F5F5F0;
  --v-shadow: 0 8px 30px rgba(0, 0, 0, .4);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  background: var(--v-bg); color: var(--v-text);
  direction: rtl; text-align: right; font-size: 14.5px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }
.ltr { direction: ltr; unicode-bidi: embed; text-align: left; display: inline-block; }
::selection { background: var(--v-yellow); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfcfc6; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; padding: 10px 20px; border-radius: 14px; font-weight: 700;
  background: var(--v-dark); color: #fff; transition: transform .18s var(--v-ease), box-shadow .18s, background .18s, opacity .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--v-yellow), var(--v-gold)); color: #171717; box-shadow: 0 8px 24px rgba(255, 184, 0, .35); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(255, 184, 0, .5); }
.btn-ghost { background: transparent; color: var(--v-text); border: 1.5px solid var(--v-line); }
.btn-ghost:hover { border-color: var(--v-yellow); box-shadow: none; background: rgba(255, 214, 0, .12); }
.btn-danger { background: var(--v-red); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 16px 44px; font-size: 22px; border-radius: 20px; }
.btn-icon { padding: 8px; width: 38px; height: 38px; }

/* ---------- surfaces ---------- */
.card { background: var(--v-white); border-radius: var(--v-radius); box-shadow: var(--v-shadow); padding: 20px; border: 1px solid var(--v-line); }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.card-dark { background: var(--v-dark); color: #fff; border-color: #000; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 12px; align-items: center; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--v-muted); }
.small { font-size: 12.5px; }
.hide { display: none !important; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--v-muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--v-line); background: var(--v-white);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--v-gold); box-shadow: 0 0 0 4px rgba(255, 214, 0, .25); }
textarea.input { min-height: 80px; resize: vertical; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; user-select: none; }
.check input { accent-color: var(--v-gold); width: 17px; height: 17px; }
input[type=color] { padding: 2px; height: 40px; width: 60px; border-radius: 10px; border: 1.5px solid var(--v-line); background: var(--v-white); }
input[type=range] { accent-color: var(--v-gold); width: 100%; }

/* switch */
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d5d5cc; border-radius: 26px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; top: 3px; right: 3px; background: #fff; border-radius: 50%; transition: .2s var(--v-ease); box-shadow: 0 2px 5px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--v-gold); }
.switch input:checked + span::before { transform: translateX(-20px); }

/* ---------- table ---------- */
.table-wrap { overflow: auto; border-radius: var(--v-radius-sm); border: 1px solid var(--v-line); background: var(--v-white); }
table.t { width: 100%; border-collapse: collapse; }
table.t th { background: var(--v-dark); color: #fff; font-weight: 600; padding: 11px 14px; text-align: right; white-space: nowrap; font-size: 13px; }
table.t td { padding: 10px 14px; border-top: 1px solid var(--v-line); vertical-align: middle; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr:hover { background: rgba(255, 214, 0, .1); }

/* ---------- chips, badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eee; color: #333; white-space: nowrap; }
.badge-yellow { background: var(--v-yellow); color: #171717; }
.badge-dark { background: var(--v-dark); color: var(--v-yellow); }
.badge-red { background: #fde2e3; color: #b3252a; }
.badge-green { background: #dcf5e7; color: #137a40; }
.rank-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 99px; font-weight: 800; font-size: 12px; color: #171717; }
.rarity-common { --rc: #9CA3AF; } .rarity-uncommon { --rc: #22C55E; } .rarity-rare { --rc: #F59E0B; }
.rarity-epic { --rc: #F97316; } .rarity-legendary { --rc: #FFD600; } .rarity-mythic { --rc: #EF4444; }
.rarity-tag { color: var(--rc); border: 1.5px solid var(--rc); background: transparent; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; background: var(--v-bg); padding: 5px; border-radius: 16px; width: max-content; max-width: 100%; overflow: auto; border: 1px solid var(--v-line); }
.tab { border: 0; background: transparent; padding: 8px 18px; border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--v-muted); transition: .18s; white-space: nowrap; }
.tab.active { background: var(--v-yellow); color: #171717; box-shadow: 0 4px 14px rgba(255, 184, 0, .35); }
.tab:not(.active):hover { color: var(--v-text); background: rgba(255, 214, 0, .18); }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 15, 15, .55); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fade .2s; padding: 20px; }
.modal { background: var(--v-white); border-radius: 24px; width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 26px; box-shadow: var(--v-shadow-lg); animation: pop .28s var(--v-ease); border: 1px solid var(--v-line); }
.modal.wide { width: min(1000px, 100%); }
.modal h2 { margin: 0 0 16px; font-size: 20px; }
.toasts { position: fixed; bottom: 22px; left: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--v-dark); color: #fff; padding: 12px 18px; border-radius: 14px; min-width: 240px; box-shadow: var(--v-shadow-lg); border-right: 5px solid var(--v-yellow); animation: slidein .3s var(--v-ease); }
.toast.error { border-right-color: var(--v-red); }
.toast.ok { border-right-color: var(--v-green); }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97) } }
@keyframes slidein { from { opacity: 0; transform: translateX(-30px) } }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

.spinner { width: 22px; height: 22px; border: 3px solid rgba(0, 0, 0, .12); border-top-color: var(--v-gold); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.progress { height: 12px; background: var(--v-line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--v-yellow), var(--v-gold)); border-radius: 99px; transition: width .25s var(--v-ease); background-size: 200% 100%; animation: shimmer 2.5s linear infinite; }
.skeleton { background: linear-gradient(90deg, #eee 25%, #f7f7f2 50%, #eee 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: 10px; }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { width: 44px; height: 44px; }
.logo b { font-size: 19px; letter-spacing: .12em; font-weight: 900; }
.logo b em { font-style: normal; color: var(--v-gold); }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--v-dark); color: var(--v-yellow); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; image-rendering: pixelated; }
.avatar-lg { width: 96px; height: 96px; border-radius: 26px; font-size: 36px; }

/* ---------- stat card ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 30px; font-weight: 900; line-height: 1.2; }
.stat span { color: var(--v-muted); font-size: 13px; }
.stat.hl { background: linear-gradient(135deg, var(--v-yellow), var(--v-gold)); border: 0; }
.stat.hl span { color: rgba(0, 0, 0, .65); }
.empty { text-align: center; padding: 40px 10px; color: var(--v-muted); }
.kbd { background: var(--v-dark); color: var(--v-yellow); padding: 1px 8px; border-radius: 7px; font-weight: 700; font-size: 12px; direction: ltr; display: inline-block; }
code, .mono { font-family: ui-monospace, Consolas, monospace; direction: ltr; unicode-bidi: embed; }
