/* ─────────────────────────────────────────────
   SyncTech Admin Dashboard — Styles
   Theme: Glassmorphism / Dark Mode Premium
   ───────────────────────────────────────────── */

:root {
  --bg-color: #0c0d12;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --accent-orange: #f97316;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --accent-green: #22c55e;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --glass-blur: blur(20px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Container Layout ── */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* ── Sidebar ── */
.sidebar {
  width: 100px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-user {
  margin-bottom: 60px;
  text-align: center;
}

.user-avatar-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(45deg, var(--accent-orange), var(--accent-purple));
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-color);
}

.user-name {
  display: none; /* Icon only on small sidebar */
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  align-items: center;
}

.nav-item {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: scale(1.1);
}

.nav-item.active {
  background: var(--accent-orange);
  color: white;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.nav-icon {
  font-size: 1.4rem;
}

.nav-spacer {
  flex-grow: 1;
}

/* ── Main Content ── */
.main-content {
  flex-grow: 1;
  padding: 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.header-search {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 20px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 400px;
}

.header-search input {
  background: transparent;
  border: none;
  color: white;
  outline: none;
  width: 100%;
  font-family: inherit;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }

/* ── Grid Layout ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 30px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Module Featured ── */
.module-featured {
  grid-column: span 2;
  padding: 0;
  height: 300px;
}

.featured-image {
  background: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1964&auto=format&fit=crop') center/cover;
  height: 100%;
  width: 100%;
}

.image-overlay {
  background: linear-gradient(to right, rgba(12, 13, 18, 0.9), transparent);
  height: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.image-overlay h2 {
  font-size: 2.2rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(45deg, var(--accent-orange), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  width: fit-content;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Module Chart ── */
.module-chart {
  grid-column: span 1;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 160px;
  padding-bottom: 20px;
}

.bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.bar {
  width: 12px;
  background: var(--color);
  border-radius: 10px;
  position: relative;
  transition: height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: inherit;
  filter: blur(8px);
  opacity: 0.5;
  z-index: -1;
}

.bar-wrap span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── Module Health (Gauge) ── */
.module-health {
  grid-row: span 1;
}

.gauge-container {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.gauge-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-orange) calc(var(--percent) * 1%), rgba(255, 255, 255, 0.05) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gauge-ring::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-color);
}

.gauge-value {
  position: relative;
  text-align: center;
}

.gauge-value .number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
}

.gauge-value .unit {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.health-stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.h-stat {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.h-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 5px; }
.h-value { font-weight: 700; font-size: 1.1rem; }

/* ── Module Services Toggles ── */
.module-services {
  grid-column: span 2;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 20px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-item.active {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.service-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-icon { font-size: 1.5rem; }
.service-name { font-weight: 600; }

/* ── Switches (Apple style) ── */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider { background-color: var(--accent-orange); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* ── BG Glows ── */
.bg-glows {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
}

.glow-1 { top: -100px; right: -100px; background: var(--accent-orange); }
.glow-2 { bottom: -200px; left: -100px; background: var(--accent-purple); }

/* ── Responsividade ── */
@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .module-featured { grid-column: span 2; }
}

@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .module-featured, .module-chart, .module-services { grid-column: span 1; }
  .services-list { grid-template-columns: 1fr; }
}
