.dashboard-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* سایدبار */
.sidebar {
  width: 230px;
  background: #161b22;
  border-left: 1px solid #30363d;
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar-item {
  background: #0d1117;
  color: #c9d1d9;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sidebar-item:hover {
  background: #21262d;
  color: #58a6ff;
}

/* بخش اصلی داشبورد */
.main-panel {
  flex: 1;
  padding: 30px 50px;
  background: #0d1117;
  color: #e6edf3;
}

/* کارت‌های Luxor-style */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  text-align: center;
  padding: 20px 10px;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #58a6ff;
}

.card .value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #f0f6fc;
}

.card .subvalue {
  font-size: 0.9rem;
  color: #8b949e;
}

/* جدول ورکرها و دکمه بروزرسانی */
.table-container {
  margin-top: 30px;
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
}

.table-container th, .table-container td {
  border-bottom: 1px solid #30363d;
  padding: 10px;
  text-align: center;
}

.status-active { color: #3fb950; }
.status-inactive { color: #f85149; }

.refresh-btn {
  margin-top: 15px;
  background: #238636;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.refresh-btn:hover { background: #2ea043; }
.chart-box {
  width: 100%;
  height: auto;
}

#hashrateChart {
  width: 100% !important;
  height: 350px !important;
}
.sidebar-item.active {
  background: #21262d;
  color: #58a6ff;
}
/* 🎨 Connection Box - Modal style similar to EMCD */
.btn-connection {
  background: #00ff66;
  color: #000;
  border: none;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 25px;
}
.btn-connection:hover { background: #00cc55; }

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  position: relative;
  margin: 10% auto;
  width: 90%; max-width: 480px;
  background: #0b0f10;
  color: #eee;
  border: 1px solid #00ff66;
  border-radius: 12px;
  box-shadow: 0 0 25px #00ff66cc;
  padding: 20px;
  font-family: monospace;
  text-align: left;
}

.modal-content h3 {
  text-align: center;
  color: #00ff88;
  margin-bottom: 10px;
}

.conn-details p {
  margin: 6px 0;
  padding: 5px 0;
  border-bottom: 1px solid #004422;
}

code {
  background: #111;
  padding: 3px 6px;
  border-radius: 5px;
  color: #00ff88;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
  color: #00ff66;
}

.note {
  color: #888;
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}
.luxor-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #30363d;
  margin-bottom: 20px;
}
.tab-link {
  background: transparent;
  border: none;
  color: #8b949e;
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab-link.active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
}
.tab-content { display: none; }
.tab-content.active { display: block; }
/* --- User Box (Top-Right Dropdown) --- */

.user-box {
  position: fixed;
  top: 15px;
  right: 20px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px 12px;
  width: 140px;
  cursor: pointer;
  z-index: 2000;
}

.user-icon {
  font-size: 20px;
  text-align: center;
  color: #58a6ff;
  font-weight: bold;
}

.user-menu {
  display: none;
  margin-top: 10px;
  flex-direction: column;
  gap: 8px;
}

.user-box:hover .user-menu {
  display: flex;
}

.user-menu a {
  color: #c9d1d9;
  text-decoration: none;
  padding: 6px;
  border-radius: 5px;
  background: #0d1117;
  text-align: center;
  transition: 0.25s;
}

.user-menu a:hover {
  background: #21262d;
  color: #58a6ff;
}
/* SETTINGS PAGE */
.settings-page {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 500px;
  margin: 0 auto;
}

.settings-box {
  background: #161b22;
  border: 1px solid #30363d;
  padding: 20px 25px;
  border-radius: 10px;
}

.settings-box h3 {
  margin-bottom: 15px;
  color: #58a6ff;
  font-size: 1.2rem;
}

.settings-input {
  width: 100%;
  padding: 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #c9d1d9;
  margin-bottom: 18px;
}

.security-row {
  display: flex;
  gap: 10px;
}

.edit-btn {
  background: #238636;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.edit-btn:hover {
  background: #2ea043;
}


/* PASSWORD MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  position: relative;
  margin: 8% auto;
  width: 90%; max-width: 420px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 25px;
  color: #e6edf3;
}

.modal-input {
  width: 100%;
  padding: 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  margin-bottom: 15px;
  color: white;
}

.modal-btn {
  width: 100%;
  background: #238636;
  padding: 10px;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.modal-btn:hover { background: #2ea043; }

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
  color: #58a6ff;
}
