:root {
  --bg: #050505;
  --bg-elevated: #151515;
  --bg-elevated-soft: #1e1e1e;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --accent: #ff7b00;
  --accent-strong: #ff5500;
  --accent-soft: rgba(255, 123, 0, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #777777;
  --danger: #ff4d4f;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 0 25px rgba(255, 115, 0, 0.25);
}

/* Global reset & base layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui,
    sans-serif;
  background: radial-gradient(circle at top, #151515 0, #050505 55%);
  color: var(--text-primary);
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* Top bar */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(5, 5, 5, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.top-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Top bar nav */

.top-bar__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.1s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 123, 0, 0.6);
}

.nav-link--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  padding-inline: 14px;
}

.nav-link--primary:hover {
  transform: translateY(-1px);
}

/* Burger (mobile) */

.top-bar__burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 4px;
}

.top-bar__burger span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-primary);
}

/* Mobile nav */

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 10px 16px;
  background: rgba(5, 5, 5, 0.98);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 6px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 3px;
}

.mobile-nav__item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.mobile-nav__item--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

/* Layout */

.main-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 24px 40px;
}

/* Sidebar */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-section {
  background: rgba(10, 10, 10, 0.95);
  border-radius: var(--radius-lg);
  padding: 12px 12px 10px;
  border: 1px solid var(--border-subtle);
}

.sidebar-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.sidebar-card {
  background: radial-gradient(circle at top left, #1f1208, #090909);
  border-radius: var(--radius-md);
  padding: 10px;
  border: 1px solid rgba(255, 123, 0, 0.2);
}

.sidebar-label {
  font-size: 11px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.sidebar-value {
  font-size: 13px;
  margin: 0;
}

.sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-action-button {
  flex: 1 1 48%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 6px 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.sidebar-action-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.sidebar-profile-text {
  display: flex;
  flex-direction: column;
}

.sidebar-name {
  font-size: 13px;
  margin: 0;
}

.sidebar-role {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0;
}

/* Content */

.content {
  background: rgba(10, 10, 10, 0.95);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 18px 18px 24px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Sections */

.page-section {
  display: none;
  animation: fadeInSection 0.3s ease-in-out;
}

.page-section--active {
  display: block;
}

@keyframes fadeInSection {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */

.btn {
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
}

.btn-mini {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-text h1 {
  font-size: clamp(28px, 3vw, 34px);
  margin: 0 0 8px;
}

.hero-text p {
  margin: 0 0 14px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.metric {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}

.metric-value {
  display: block;
  font-weight: 700;
  font-size: 18px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-card {
  border-radius: var(--radius-md);
  padding: 12px 12px 10px;
  border: 1px solid var(--border-subtle);
}

.hero-card--primary {
  background: radial-gradient(circle at top left, #2a1404, #090909);
  box-shadow: var(--shadow-soft);
}

.hero-card--secondary {
  background: linear-gradient(135deg, #151515, #090909);
}

.hero-card-title {
  margin: 0 0 4px;
  font-size: 15px;
}

.hero-card-subtitle {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.heatmap {
  display: flex;
  gap: 6px;
}

.heatmap-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #333;
}

.heatmap-dot--hot {
  background: linear-gradient(135deg, var(--accent-strong), #ff0000);
}

.heatmap-dot--medium {
  background: linear-gradient(135deg, #ffc107, var(--accent));
}

.heatmap-dot--low {
  background: linear-gradient(135deg, #00c853, #4caf50);
}

/* Home grid */

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.home-grid-card {
  background: rgba(20, 20, 20, 0.95);
  border-radius: var(--radius-md);
  padding: 10px 10px 12px;
  border: 1px solid var(--border-subtle);
}

.home-grid-card h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.home-grid-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Filters */

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.filter-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.filter-group input,
.filter-group select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #101010;
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 13px;
}

/* Cards grid */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.card {
  background: rgba(15, 15, 15, 0.98);
  border-radius: var(--radius-md);
  padding: 10px 10px 12px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    border-color 0.12s ease, background 0.12s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 123, 0, 0.5);
  background: rgba(25, 25, 25, 0.98);
  box-shadow: 0 0 15px rgba(255, 115, 0, 0.25);
}

.card-title {
  margin: 0 0 4px;
  font-size: 15px;
}

.card-subtitle {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Detail panel */

.detail-panel {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 10px 10px 12px;
  background: rgba(10, 10, 10, 0.98);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-header h3 {
  margin: 0;
  font-size: 17px;
}

.detail-panel p {
  margin: 8px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 13px;
}

.detail-list li {
  margin-bottom: 4px;
}

/* Academy */

.academy-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.academy-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.academy-tab {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 15, 15, 0.95);
  padding: 6px 8px;
  font-size: 13px;
  text-align: left;
  color: var(--text-secondary);
}

.academy-tab--active {
  background: var(--accent-soft);
  border-color: rgba(255, 123, 0, 0.7);
  color: var(--accent);
}

.academy-content h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.academy-content p {
  margin: 0 0 10px;
  color: var(--text-secondary);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 13px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* Restaurants */

.cards-grid--restaurants .card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.restaurant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.tag {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
}

/* AI */

.ai-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
}

.ai-sidebar h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.prompt-chip {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  color: var(--text-secondary);
  padding: 6px 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.prompt-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.ai-chat {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(10, 10, 10, 0.98);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

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

.status-dot--online {
  background: #00c853;
}

.ai-chat-window {
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.msg {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.msg.user {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-bottom-right-radius: 0;
  margin-left: 80px;
}

.msg.bot {
  background: #151515;
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 0;
  margin-right: 80px;
  color: var(--text-primary);
}

.ai-chat-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-chat-input textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  color: var(--text-primary);
  padding: 8px;
  font-size: 14px;
  min-height: 70px;
  resize: vertical;
}

.ai-chat-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading {
  font-size: 12px;
  color: var(--accent);
}

.error {
  font-size: 12px;
  color: var(--danger);
}

/* Journal */

.journal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}

.journal-list {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.journal-entry {
  border-radius: var(--radius-md);
  padding: 8px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  background: #151515;
}

.journal-entry-title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 14px;
}

.journal-entry-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.journal-entry-body {
  font-size: 13px;
  color: var(--text-secondary);
}

.journal-editor {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.journal-editor input,
.journal-editor textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #151515;
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 13px;
}

.journal-editor textarea {
  min-height: 90px;
  resize: vertical;
}

.journal-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* About */

.about-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.about-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  padding: 10px;
  font-size: 13px;
}

.about-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
}

.contact-form {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  padding: 10px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-group {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #151515;
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 13px;
}

.contact-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.contact-aside {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  padding: 10px;
  font-size: 13px;
}

.contact-aside h3 {
  margin-top: 0;
}

.contact-aside ul {
  padding-left: 18px;
}

/* Dashboard */

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.dashboard-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #101010;
  padding: 10px;
  font-size: 13px;
}

.dashboard-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.simulator-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.simulator-output {
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
  padding: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 32px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Footer */

.site-footer {
  padding: 10px 24px 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .academy-layout,
  .ai-layout,
  .journal-layout,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-chat-window .msg.user,
  .ai-chat-window .msg.bot {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .top-bar__nav {
    display: none;
  }

  .top-bar__burger {
    display: flex;
  }

  .mobile-nav {
    display: none;
  }

  .mobile-nav.mobile-nav--open {
    display: flex;
  }

  .content {
    padding: 14px;
  }
}
