/* ============================================================
   DYNOMIC – dashboard.css
   ============================================================ */

.dash-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
}

.sidebar__logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.sidebar__link:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.sidebar__link.active {
  background: rgba(229,28,28,.12);
  color: var(--red);
}

.sidebar__bottom {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.sidebar__logout:hover {
  background: rgba(229,28,28,.1);
  color: var(--red);
}

/* ── Main content ───────────────────────────────────────────── */
.dash-main {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.topbar__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
}

/* ── Content area ───────────────────────────────────────────── */
.dash-content {
  padding: 32px 28px;
  flex: 1;
}

/* ── Welcome ────────────────────────────────────────────────── */
.dash-welcome {
  margin-bottom: 28px;
}
.dash-welcome h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.verify-banner {
  margin-top: 10px;
  padding: 10px 16px;
  background: rgba(234,179,8,.1);
  border: 1px solid rgba(234,179,8,.35);
  border-radius: var(--radius);
  font-size: .875rem;
  color: #fde047;
}
.verify-banner a {
  color: #fde047;
  text-decoration: underline;
  margin-left: 8px;
}

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-card__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.stat-card__label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

.stat-card__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Panels ─────────────────────────────────────────────────── */
.dash-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.dash-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.dash-panel__header h2 {
  font-size: 1rem;
  font-weight: 700;
}

.dash-panel--empty {
  border-style: dashed;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state__icon { font-size: 3rem; }

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.empty-state p {
  color: var(--text-muted);
  font-size: .9rem;
  max-width: 320px;
}

/* ── Device info ─────────────────────────────────────────────── */
.device-info {
  padding: 0 22px;
}

.device-info__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.device-info__row:last-child { border-bottom: none; }

.device-info__label { color: var(--text-muted); }
.device-info__value { font-weight: 500; }
.mono { font-family: monospace; letter-spacing: .04em; font-size: .82rem; }

/* ── Table ───────────────────────────────────────────────────── */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.dash-table th {
  text-align: left;
  padding: 12px 22px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.dash-table td {
  padding: 13px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: rgba(255,255,255,.02); }

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px !important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .dash-main { margin-left: 0; }
  .topbar__burger { display: flex; }
  .dash-content { padding: 20px 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}
