/* style.css */

@font-face {
  font-family: 'IRANYekanXVF';
  src: url('IRANYekanXVF.woff') format('woff');
  font-weight: 100 900;
}

:root {
  --bg: #0a0a0f;
  --card: #14141c;
  --border: #24242f;
  --accent: #ff2d55;
  --text: #e8e8ee;
  --text-muted: #8a8a99;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IRANYekanXVF', Tahoma, sans-serif;
  min-height: 100vh;
}

.hidden { display: none !important; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
}

.wallet-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  margin: 40px auto;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}

.tab-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tab-panel { display: none; flex-direction: column; gap: 10px; }
.tab-panel.active { display: flex; }

label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

input {
  background: #1c1c26;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}

button {
  cursor: pointer;
  font-family: inherit;
}

button[type="submit"], .btn-secondary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 8px;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px;
  border-radius: 10px;
}

.error {
  color: var(--accent);
  font-size: 13px;
  min-height: 18px;
}

.success {
  color: #2ecc71;
  font-size: 13px;
  min-height: 18px;
}

.admin-settings-card { max-width: 100%; margin: 0; }
.admin-settings-card form { display: flex; flex-direction: column; gap: 8px; }

.dash-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 16px;
  color: var(--text-muted);
  margin: 28px 0 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.pkg-card, .cfg-card, .topup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.pkg-card h3, .cfg-card h3 { margin: 0 0 8px; font-size: 15px; }
.pkg-card p, .cfg-card p { margin: 4px 0; font-size: 13px; color: var(--text-muted); }

.pkg-card button, .cfg-card button {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  font-weight: 600;
}

.sub-link-box {
  background: #1c1c26;
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  margin-top: 8px;
  color: var(--text-muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
}

.modal-box h3 { margin-top: 0; }
.modal-box form { display: flex; flex-direction: column; gap: 8px; }

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.modal-actions button { flex: 1; margin-top: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
}

.badge-approve, .badge-reject {
  border: none;
  color: white;
  padding: 8px;
  border-radius: 8px;
  font-weight: 600;
  flex: 1;
}
.badge-approve { background: #2ecc71; }
.badge-reject { background: var(--accent); }
.topup-card .actions { display: flex; gap: 8px; margin-top: 10px; }

.gb-buy-card { max-width: 100%; margin: 0; display: flex; flex-direction: column; gap: 8px; }

.gb-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gb-preset-btn {
  flex: 1;
  min-width: 70px;
  background: #1c1c26;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 8px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

.gb-preset-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.price-display {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  min-height: 20px;
}

#gbBuyBtn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}

.usage-bar-track {
  background: #1c1c26;
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-top: 10px;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}

.usage-bar-fill.usage-high {
  background: #ff3b3b;
}

.usage-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.refund-text {
  font-size: 13px;
  color: #2ecc71;
}

.cancel-btn {
  width: 100%;
  background: transparent !important;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 10px;
  border-radius: 8px;
  margin-top: 8px;
  font-weight: 600;
  font-size: 13px;
}
