/* =========================================================
   User Dashboard Page Styles
   ========================================================= */

.dash-layout {
  padding-top: calc(var(--header-height) + var(--space-6));
  padding-bottom: var(--space-8);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-6);
  align-items: start;
}

/* Sidebar */
.dash-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--header-height) + var(--space-5));
}

.dash-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.dash-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-profile strong { display: block; font-size: var(--fs-sm); }
.dash-profile span { font-size: var(--fs-xs); color: var(--text-muted); }

.dash-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.dash-nav a:hover { background: var(--color-surface-alt); color: var(--text-primary); }
.dash-nav a.is-active { background: var(--color-secondary-soft); color: var(--color-secondary); }
.dash-nav a svg { flex-shrink: 0; }

/* Mobile bottom nav */
.dash-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--border-color);
  z-index: 90;
  padding: 6px 0;
}
.dash-bottom-nav ul { display: flex; justify-content: space-around; }
.dash-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-muted);
  padding: 6px;
}
.dash-bottom-nav a.is-active { color: var(--color-accent); }

/* Main content sections */
.dash-section { display: none; }
.dash-section.is-active { display: block; }

.dash-section-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-5);
}

.overview-stats {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: var(--space-6);
}

.overview-row {
  grid-template-columns: 1.4fr 1fr;
  margin-bottom: var(--space-6);
}

.system-summary-card {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}

.system-summary-card__ring { flex-shrink: 0; }

.notif-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.notif-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
}

.notif-item:hover { background: var(--color-surface-alt); }

.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-dot.success { background: var(--color-success); }
.notif-dot.info { background: var(--color-secondary); }
.notif-dot.warning { background: var(--color-warning); }

.notif-item strong { display: block; font-size: var(--fs-sm); }
.notif-item p { font-size: var(--fs-xs); color: var(--text-muted); }
.notif-item time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Orders */
.order-status-badge { white-space: nowrap; }

/* Profile / settings forms */
.settings-form {
  max-width: 560px;
}

.settings-card { margin-bottom: var(--space-5); }
.settings-card h3 { font-size: var(--fs-md); margin-bottom: var(--space-4); }

@media (max-width: 960px) {
  .dash-layout { grid-template-columns: 1fr; padding-bottom: 80px; }
  .dash-sidebar { display: none; }
  .dash-bottom-nav { display: block; }
  .overview-stats { grid-template-columns: repeat(2, 1fr); }
  .overview-row { grid-template-columns: 1fr; }
  .system-summary-card { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .overview-stats { grid-template-columns: 1fr; }
}

.dash-admin-block a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-decoration: none;
}
.dash-admin-block a:hover,
.dash-admin-block a.is-active {
  background: var(--color-secondary-soft, #eef2ff);
  color: var(--color-primary);
}
.dash-section[data-section="admin-hub"] iframe {
  min-height: 70vh;
}

/* admin-only section switch */
.dash-section[data-admin-only] { display: none; }
.dash-section[data-admin-only].is-active { display: block; }
.dash-admin-block a.is-active {
  background: var(--color-secondary-soft, #eef2ff);
  color: var(--color-primary);
  font-weight: 600;
}

.warranty-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:24px;margin-bottom:16px;box-shadow:0 8px 24px rgba(16,26,46,.05);position:relative;overflow:hidden}
.warranty-card::before{content:"";position:absolute;top:0;right:0;left:0;height:4px;background:linear-gradient(90deg,#1b2a4a,#d97b3f)}
.warranty-card__top{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}.warranty-card__brand{font-size:11px;color:#8792a3;margin-bottom:4px}.warranty-card__title{margin:0 0 4px;font-size:1.2rem}.warranty-card__sub{margin:0;font-size:var(--fs-sm);color:#4c5a73}.warranty-card__badge{padding:4px 12px;border-radius:999px;font-size:12px;font-weight:600;background:#e4f4ec;color:#2e8b57;height:fit-content}.warranty-card__code{background:#f8fafc;border-radius:10px;padding:12px 14px;margin-bottom:14px;font-size:var(--fs-sm)}.warranty-card__dates{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px;font-size:var(--fs-sm)}.warranty-card__dates span{display:block;font-size:11px;color:#8792a3}.warranty-cov{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #e2e8f0;font-size:var(--fs-sm)}.warranty-card__disclaimer{font-size:11px;color:#8792a3;margin:14px 0 12px}

.dash-wx{background:linear-gradient(135deg,#1B2A4A,#2A3E68);color:#fff;border-radius:16px;padding:18px 20px;margin-bottom:16px;box-shadow:0 10px 28px rgba(27,42,74,.25)}.dash-wx__top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}.dash-wx__eye{display:block;font-size:11px;opacity:.7;margin-bottom:4px}.dash-wx__top strong{font-size:1.05rem}.dash-wx__badge{background:rgba(240,164,111,.2);color:#F0A46F;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}.dash-wx__body{margin:0 0 12px;font-size:13px;opacity:.9;line-height:1.6}.dash-wx .btn{border-color:rgba(255,255,255,.35);color:#fff}
