@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --bg:           #050505;
  --bg-2:         #0a0a0a;
  --panel:        #111111;
  --panel-2:      #161616;
  --border:       #262626;
  --border-2:     #3a3a3a;
  --text:         #f2f2f2;
  --muted:        #8f8f8f;
  --dim:          #5c5c5c;
  --white:        #ffffff;
  --black:        #000000;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-full:  999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--white); }

/* ── Topbar ── */
.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(5,5,5,.94);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}

.brand img {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ── Buttons ── */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font: 600 15px 'Vazirmatn';
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .18s ease;
  line-height: 1.3;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
  font-weight: 700;
}
.btn-primary:hover {
  background: #e6e6e6;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.04);
}

.btn-soft {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-soft:hover {
  border-color: var(--border-2);
  background: var(--panel-2);
}

.btn-danger {
  background: transparent;
  border: 1px solid #4a1e1e;
  color: #e88;
}
.btn-danger:hover {
  background: #1a0c0c;
  border-color: #c55;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.full { width: 100%; }

/* ── Forms ── */
input, select, textarea {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  font-size: 13.5px;
  line-height: 1.4;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-2);
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}

input::placeholder, textarea::placeholder { color: var(--dim); }

label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 500;
}

/* ── Cards ── */
.card, .sub-box, .section, .buy-box, .login-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .2px;
}

.card .value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  line-height: 1.3;
}

/* ── Messages ── */
.msg, .error, .error-box, .success-box {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
  border: 1px solid;
  line-height: 1.5;
}

.msg.ok, .success-box {
  background: #121212;
  border-color: #2e2e2e;
  color: #ddd;
}

.msg.err, .error, .error-box {
  background: #160d0d;
  border-color: #4a1e1e;
  color: #eaa;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tabs a {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: all .15s;
}

.tabs a:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.tabs a.active {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  font-weight: 700;
}

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th, td {
  padding: 10px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
}

tr:hover td { background: rgba(255,255,255,.02); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}

.badge.pending {
  background: #141414;
  color: #ccc;
  border-color: #3a3a3a;
}

.badge.approved {
  background: #111;
  color: #fff;
  border-color: #444;
}

.badge.rejected {
  background: #160d0d;
  color: #e88;
  border-color: #4a1e1e;
}

/* ── Utility ── */
.sub-link {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  word-break: break-all;
  font-size: 11.5px;
  direction: ltr;
  text-align: left;
  margin: 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.5;
}

.qr-wrap { text-align: center; margin: 12px 0; }

.qr-wrap img {
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  width: 148px;
  height: 148px;
  border: 1px solid var(--border);
  display: inline-block;
}

.price-live {
  margin: 14px 0;
  padding: 12px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.bal {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.bal strong {
  color: var(--white);
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-top: 8px;
}

.form-row > div {
  flex: 1;
  min-width: 110px;
}

/* ── Hero (if used) ── */
.hero {
  max-width: 960px;
  margin: 48px auto 64px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
  margin: 10px 0 14px;
  font-weight: 800;
  letter-spacing: -.6px;
}

.hero-copy p {
  color: var(--muted);
  max-width: 440px;
  margin: 0 0 20px;
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--dim);
  font-size: 12px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .topbar { padding: 0 14px; height: 54px; }
  .brand img { height: 26px; }
  .btn { padding: 8px 14px; font-size: 12.5px; }
  .hero { grid-template-columns: 1fr; gap: 24px; margin: 32px auto 48px; }
  .cards { grid-template-columns: 1fr !important; }
  .tabs a { padding: 6px 12px; font-size: 12px; }
}


/* —— polish —— */
.sub-box,.box,.login-box,.buy-box{box-shadow:0 8px 32px rgba(0,0,0,.25)}
.stat-box{transition:border-color .2s}
.stat-box:hover{border-color:#3a6a9a !important}
.svc-card{transition:transform .15s,border-color .15s;border-radius:14px}
.svc-card:hover{transform:translateY(-2px);border-color:#3a6a9a !important}
.tabs a{transition:background .15s,color .15s}
.btn{transition:transform .15s,opacity .15s}
.btn:active{transform:scale(.98)}
.topbar{border-bottom:1px solid rgba(255,255,255,.08)}
input,select,textarea{transition:border-color .15s}
input:focus,select:focus,textarea:focus{border-color:#42a5ff !important;outline:none}
.badge{font-weight:600}
@media(max-width:480px){
  .tabs{gap:4px}
  .tabs a{padding:7px 10px;font-size:12px}
  .stat-boxes{grid-template-columns:1fr !important}
  .page,.dash{padding:0 12px}
}
