:root {
  --bg-body: #f4f6f9;
  --bg-card: #ffffff;
  --bg-sidebar: #16181d;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary: #3b82f6;
  --purple: #7c3aed;
  --orange: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 14px;
}
body.dark-mode {
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
}
* { box-sizing: border-box; font-family: Tahoma, Vazirmatn, Arial, sans-serif; }
body { margin: 0; background: var(--bg-body); color: var(--text-main); direction: rtl; transition: background 0.2s; }
.topbar {
  background: var(--bg-card); border-bottom: 1px solid var(--border-color);
  padding: 12px 18px; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 50;
}
.topbar-right, .topbar-left { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  background: transparent; border: 1px solid var(--border-color);
  color: var(--text-main); padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 16px;
}
.sidebar {
  position: fixed; top: 0; right: -280px; width: 260px; height: 100vh;
  background: var(--bg-sidebar); color: #fff; padding: 20px 16px;
  transition: right 0.3s ease; z-index: 100; display: flex; flex-direction: column; justify-content: space-between;
}
.sidebar.open { right: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; }
.sidebar-overlay.show { display: block; }
.nav-link {
  display: flex; align-items: center; gap: 10px; color: #cbd5e1;
  text-decoration: none; padding: 12px; border-radius: 10px; margin-bottom: 6px; font-size: 14px;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.1); color: #fff; }
.container { max-width: 960px; margin: 20px auto; padding: 0 14px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.card-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; border: none; }
.control-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.control-row:last-child { border-bottom: none; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; transition: 0.3s; border-radius: 30px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; transition: 0.3s; border-radius: 50%; }
input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }
.btn {
  border: none; border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: bold;
  font-size: 13px; color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-blue { background: var(--primary); }
.btn-purple { background: var(--purple); }
.btn-orange { background: var(--orange); width: 100%; margin-top: 12px; font-size: 14px; }
.btn-light { background: #f1f5f9; color: #1e293b; border: 1px solid #cbd5e1; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.scan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.scan-progress-box {
  display: none; align-items: center; justify-content: space-between;
  background: rgba(59, 130, 246, 0.08); padding: 14px; border-radius: 12px; margin-bottom: 14px;
}
.circle-progress {
  width: 68px; height: 68px; border-radius: 50%;
  background: conic-gradient(var(--primary) 0%, #e2e8f0 0%);
  display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px;
}
.circle-inner {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--bg-card); display: flex; align-items: center; justify-content: center;
}
.ip-hint { color: #b91c1c; font-size: 12.5px; line-height: 1.7; margin: 8px 0 14px; }
.ip-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.ip-info { display: flex; align-items: center; gap: 10px; }
.miner-badge {
  width: 40px; height: 40px; border-radius: 10px; background: #fef3c7;
  color: #b45309; display: flex; align-items: center; justify-content: center; font-weight: bold;
}
.ip-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: center; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
th { color: var(--text-muted); font-weight: bold; }
.badge-online { background: #dcfce7; color: #166534; padding: 3px 8px; border-radius: 6px; font-weight: bold; }
.badge-temp-ok { background: #e0f2fe; color: #0369a1; padding: 3px 8px; border-radius: 6px; }
.badge-temp-high { background: #fee2e2; color: #b91c1c; padding: 3px 8px; border-radius: 6px; }
.service-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-color); gap: 10px; }
.service-item:last-child { border-bottom: none; }
.service-title-wrap { display: flex; align-items: center; gap: 12px; }
.cloud-badge {
  width: 42px; height: 42px; border-radius: 50%; background: #fee2e2; color: #dc2626;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold;
}
.status-pill { padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: bold; display: inline-block; }
.status-active { background: #dcfce7; color: #15803d; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-expired { background: #fee2e2; color: #b91c1c; }
.wizard-layout { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 16px; }
@media (max-width: 800px) { .wizard-layout { grid-template-columns: 1fr; } }
.option-box { border: 2px solid var(--border-color); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.option-box.selected { border-color: var(--primary); background: rgba(59, 130, 246, 0.08); }
.stepper-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border-color); }
.stepper-item:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #334155;
  display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 13px; flex-shrink: 0;
}
.stepper-item.active .step-num { background: var(--primary); color: #fff; }
.stepper-item.done .step-num { background: var(--success); color: #fff; }
.field-input {
  width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border-color);
  background: var(--bg-body); color: var(--text-main); margin-top: 6px; margin-bottom: 12px;
}
