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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: rgba(99,102,241,0.12);
  --accent: #818cf8;
  --dark: #0f1117;
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #1e2230;
  --text: #f1f3f7;
  --text-light: #94a3b8;
  --border: #334155;
  --radius: 12px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.navbar-link:hover {
  color: var(--accent);
  background: var(--primary-light);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.navbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.navbar-email {
  font-size: 14px;
  color: var(--text-light);
}

.navbar-logout {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
}
.navbar-logout:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239,68,68,0.1);
}

/* ── Hero ── */
.dashboard-hero {
  background: linear-gradient(135deg, #1a1d27 0%, #242836 100%);
  padding: 48px 32px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: var(--primary);
  opacity: 0.06;
  border-radius: 50%;
}
.dashboard-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 20%;
  width: 250px;
  height: 250px;
  background: var(--primary);
  opacity: 0.04;
  border-radius: 50%;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-content h1 {
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.hero-content p {
  color: var(--text-light);
  font-size: 17px;
  font-weight: 400;
}

/* ── App Grid ── */
.app-grid {
  max-width: 900px;
  margin: -24px auto 0;
  padding: 0 32px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 2;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.app-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(99,102,241,0.15);
  transform: translateY(-3px);
}

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.app-arrow {
  color: var(--border);
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.app-card:hover .app-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.app-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.app-info p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding: 20px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer p {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .navbar { padding: 0 16px; }
  .navbar-email { display: none; }
  .app-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }
  .dashboard-hero { padding: 32px 16px; }
  .hero-content h1 { font-size: 22px; }
}
