/* ============================================================
   Bone Checker Admin — Styles
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0e14;
  color: #f0f6fc;
  font-family: -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  min-height: 100vh;
  padding: 20px;
}

.container { max-width: 1400px; margin: 0 auto; }

/* ---------- Header ---------- */
.header {
  display: flex; align-items: center; justify-content: space-between;
  background: #161b22; border: 1px solid #30363d; border-radius: 14px;
  padding: 20px 24px; margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.logo h1 { font-size: 20px; font-weight: 800; color: #ff6b35; }
.logo p { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: 1.5px; }

.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.status {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: #0d1117;
  border: 1px solid #30363d; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #484f58; }
.dot.online { background: #3fb950; box-shadow: 0 0 8px #3fb950; }
.dot.offline { background: #f85149; }

/* ---------- Buttons ---------- */
button {
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  color: white; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
button:hover { transform: translateY(-1px); }
button:disabled { background: #21262d; color: #484f58; cursor: not-allowed; }

button.secondary { background: #21262d; color: #f0f6fc; border: 1px solid #30363d; }
button.secondary:hover { background: #30363d; }
button.danger { background: linear-gradient(135deg, #f85149, #d43a32); }
button.success { background: linear-gradient(135deg, #3fb950, #2ea043); }
button.warning { background: linear-gradient(135deg, #d29922, #bb8009); }
button.info { background: linear-gradient(135deg, #58a6ff, #1f6feb); }
button.small { padding: 6px 12px; font-size: 12px; }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stat-card { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 18px; }
.stat-value { font-size: 28px; font-weight: 800; color: #ff6b35; line-height: 1; }
.stat-label { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-top: 6px; }

/* ---------- Card ---------- */
.card { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.badge-count {
  margin-left: auto; background: #21262d; padding: 4px 10px;
  border-radius: 20px; font-size: 11px; color: #8b949e;
}

/* ---------- Inputs ---------- */
input {
  background: #0d1117; color: #f0f6fc;
  border: 2px solid #30363d; border-radius: 10px;
  padding: 10px 14px; font-size: 13px;
  font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: #ff6b35; }
input::placeholder { color: #484f58; }

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 100px 100px auto;
  gap: 10px; align-items: center;
}
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.search-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-row input { flex: 1; min-width: 200px; }

/* ---------- Table ---------- */
.table-wrapper {
  overflow-x: auto; border-radius: 10px;
  border: 1px solid #30363d; background: #0d1117;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  padding: 12px 14px; text-align: left;
  font-size: 11px; font-weight: 700;
  color: #8b949e; text-transform: uppercase;
  background: #1c2128; border-bottom: 1px solid #30363d;
  white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid #21262d; }
tbody tr:hover { background: #1c2128; }
td.username { font-weight: 700; }
td.hwid {
  font-family: 'Consolas', monospace; font-size: 11px;
  color: #8b949e; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 12px; font-size: 10px;
  font-weight: 700; text-transform: uppercase;
}
.badge.active { background: #0f2417; color: #3fb950; }
.badge.banned { background: #2d1619; color: #f85149; }
.badge.expired { background: #2d2216; color: #d29922; }
.badge.maxused { background: #2d2216; color: #d29922; }
.badge.infinite { background: #0d1f3d; color: #58a6ff; }
.badge.locked { background: #2d1f16; color: #ff6b35; }

/* ---------- Actions ---------- */
.actions { display: flex; gap: 4px; justify-content: flex-end; }
.actions button {
  padding: 5px 8px; font-size: 13px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Progress ---------- */
.progress-row { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.progress-bar { flex: 1; height: 6px; background: #21262d; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #ff6b35, #ff8555); }
.progress-text { font-size: 11px; font-weight: 700; color: #8b949e; min-width: 45px; text-align: right; }

/* ---------- Login ---------- */
.login-overlay {
  position: fixed; inset: 0; background: #0a0e14;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px; overflow: hidden;
}
.login-overlay::before {
  content: ''; position: absolute; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,107,53,0.18) 0%, transparent 70%);
  top: -300px; right: -200px; border-radius: 50%;
  animation: float1 18s ease-in-out infinite;
}
.login-overlay::after {
  content: ''; position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(88,166,255,0.12) 0%, transparent 70%);
  bottom: -250px; left: -200px; border-radius: 50%;
  animation: float2 22s ease-in-out infinite;
}
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-100px, 80px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(120px, -70px); } }

.login-box {
  position: relative;
  background: rgba(22, 27, 34, 0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 28px; padding: 52px 44px;
  width: 100%; max-width: 440px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 120px rgba(255,107,53,0.15);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  width: 100px; height: 100px; margin: 0 auto 26px;
  background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 50%, #d94a20 100%);
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
  box-shadow: 0 15px 50px rgba(255,107,53,0.6), 0 0 0 8px rgba(255,107,53,0.08);
  animation: pulse 3.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1) rotate(0deg); box-shadow: 0 15px 50px rgba(255,107,53,0.6), 0 0 0 8px rgba(255,107,53,0.08); }
  50% { transform: scale(1.06) rotate(-2deg); box-shadow: 0 20px 65px rgba(255,107,53,0.8), 0 0 0 12px rgba(255,107,53,0.12); }
}

.login-box h1 {
  font-size: 38px; font-weight: 900;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8555 40%, #58a6ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 10px; letter-spacing: 1.5px;
}
.login-box .subtitle {
  color: #8b949e; font-size: 12px; margin-bottom: 36px;
  letter-spacing: 4px; text-transform: uppercase; font-weight: 700;
}
.input-wrapper { position: relative; margin-bottom: 16px; }
.input-wrapper input {
  width: 100%; padding: 16px 20px; font-size: 15px;
  text-align: center; border-radius: 14px; letter-spacing: 1px;
  transition: all 0.25s;
}
.input-wrapper input:focus {
  border-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255,107,53,0.15);
}
#twofaCode {
  font-family: 'Consolas', monospace;
  letter-spacing: 12px; font-size: 24px;
}
.login-box button {
  width: 100%; padding: 16px; font-size: 15px;
  border-radius: 14px; letter-spacing: 1.5px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(255,107,53,0.35);
  transition: all 0.25s;
}
.login-box button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(255,107,53,0.5);
}
.login-error {
  color: #f85149; font-size: 12px; margin-top: 16px;
  min-height: 18px; font-weight: 600; padding: 0 8px;
}
.login-footer {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid rgba(48,54,61,0.5);
  font-size: 11px; color: #484f58;
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
}
.login-footer .ver { color: #ff6b35; font-weight: 800; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  padding: 14px 20px; background: #161b22;
  border: 1px solid #30363d; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  z-index: 10000; opacity: 0; transform: translateY(20px);
  transition: all 0.25s; max-width: 400px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 4px solid #3fb950; }
.toast.error { border-left: 4px solid #f85149; }
.toast.info { border-left: 4px solid #58a6ff; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998; padding: 20px;
}
.modal {
  position: relative; background: #161b22;
  border: 1px solid #30363d; border-radius: 18px;
  padding: 28px; width: 100%; max-width: 680px;
  max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
}
.modal h2 { font-size: 20px; font-weight: 800; color: #ff6b35; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.modal .row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #21262d;
  font-size: 13px; gap: 12px;
}
.modal .row:last-child { border-bottom: none; }
.modal .row .key { color: #8b949e; font-weight: 600; flex-shrink: 0; }
.modal .row .val {
  color: #f0f6fc; font-family: 'Consolas', monospace;
  font-size: 12px; max-width: 420px;
  text-align: right; word-break: break-all;
}
.modal .close-btn {
  position: absolute; top: 20px; right: 24px;
  background: #21262d; border: 1px solid #30363d;
  color: #f0f6fc; width: 36px; height: 36px;
  border-radius: 10px; cursor: pointer; font-size: 16px;
}

/* ---------- Logs ---------- */
.log-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #21262d;
  font-size: 13px;
}
.log-item:hover { background: #1c2128; }
.log-icon { font-size: 20px; width: 28px; text-align: center; }
.log-body { flex: 1; }
.log-title { font-weight: 700; }
.log-meta { color: #8b949e; font-size: 11px; margin-top: 2px; }
.log-time { color: #484f58; font-size: 11px; font-family: 'Consolas', monospace; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 4px; background: #0d1117;
  padding: 4px; border-radius: 12px;
  border: 1px solid #30363d;
  margin-bottom: 16px; width: fit-content;
}
.tabs button {
  background: transparent; border-radius: 8px;
  padding: 8px 20px; font-size: 13px;
  color: #8b949e; box-shadow: none;
}
.tabs button:hover { transform: none; }
.tabs button.active { background: #21262d; color: #ff6b35; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }