/* Raznet Intelligence Hub v2 — World-class shell
   Matches the elevated Raznet Solutions corporate design language
   Deep near-black · Electric cyan / blue / violet · Glass · Refined motion
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --bg: #050507;
  --bg-elevated: #0a0b0f;
  --panel: #0f1117;
  --panel-2: #14161e;
  --panel-3: #1a1d27;
  --panel-hover: #1e222e;
  --line: rgba(148, 163, 184, 0.10);
  --line-strong: rgba(148, 163, 184, 0.16);
  --line-focus: rgba(56, 189, 248, 0.45);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --blue: #3b82f6;
  --blue-bright: #60a5fa;
  --violet: #a78bfa;
  --violet-dim: #8b5cf6;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --rose: #fb7185;
  --grad-brand: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a78bfa 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.12), rgba(167, 139, 250, 0.1));
  --grad-glow: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.12), transparent);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-w: 268px;
  --topbar-h: 60px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(34, 211, 238, 0.25); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.35); }

.app-shell {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  background-image: var(--grad-glow);
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding: 20px 12px 12px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 22px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.brand-mark span {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.5px;
}
.brand-mark i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5f3fc;
  right: 4px;
  top: 4px;
  box-shadow: 0 0 8px #22d3ee;
}
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-weight: 700; font-size: 13px; letter-spacing: 1.8px; }
.brand-copy small { font-size: 9px; letter-spacing: 1.4px; color: var(--text-muted); font-weight: 500; }

.workspace-label, .nav-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.3px;
  color: var(--text-dim);
  padding: 14px 12px 6px;
  text-transform: uppercase;
}
.primary-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 1px 0;
  transition: all 0.18s ease;
  position: relative;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.06));
  color: #fff;
  box-shadow: inset 2.5px 0 0 var(--cyan);
}
.nav-item.active .nav-icon { color: var(--cyan); }
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.18s;
}
.nav-pill {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.12);
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}
.sidebar-bottom { margin-top: auto; padding-top: 10px; flex-shrink: 0; }
.support-card {
  background: var(--grad-brand-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
  margin: 4px 4px 12px;
  position: relative;
  overflow: hidden;
}
.support-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(34,211,238,0.08), transparent 60%);
  pointer-events: none;
}
.support-orb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}
.support-card strong { font-size: 12px; font-weight: 600; display: block; }
.support-card p { font-size: 11px; line-height: 1.45; color: var(--text-secondary); margin: 4px 0 0; }
.profile {
  border-top: 1px solid var(--line);
  padding: 12px 6px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar, .top-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(34, 211, 238, 0.2);
}
.profile div:nth-child(2) { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.profile strong { font-size: 12px; font-weight: 600; }
.profile small { font-size: 10px; color: var(--text-muted); }
.profile-dots { margin-left: auto; color: var(--text-dim); font-size: 12px; letter-spacing: 1px; }

/* MAIN */
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 30;
}
.mobile-menu { display: none; }
.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s;
  font-size: 15px;
}
.icon-button:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}
.breadcrumbs {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.breadcrumbs b { color: var(--text-dim); font-weight: 400; }
.breadcrumbs strong { color: var(--text); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  height: 36px;
  width: 220px;
  transition: all 0.2s;
}
.search-box:focus-within {
  border-color: var(--line-focus);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
  width: 260px;
}
.search-box span { color: var(--text-muted); font-size: 14px; }
.search-box input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 13px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.api-status {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.api-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}
.api-status.online::before { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.api-status.offline::before { background: var(--rose); }

/* PAGE */
.page-content {
  padding: 28px 32px 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.hidden { display: none !important; }

.welcome-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}
.welcome-row h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
  line-height: 1.25;
}
.welcome-row h1 span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro { margin: 0; color: var(--text-secondary); font-size: 14.5px; max-width: 480px; }
.date-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.date-icon { color: var(--cyan); font-size: 14px; }

/* HERO */
.hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 36px;
  position: relative;
  box-shadow: var(--shadow);
}
.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 85% 30%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(167, 139, 250, 0.06), transparent);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 36px 36px 28px;
  position: relative;
  align-items: center;
}
.hero-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--cyan);
  margin-bottom: 12px;
}
.hero-copy h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 0 0 14px;
}
.hero-copy h2 em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 420px;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 0;
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25), 0 0 0 1px rgba(255,255,255,0.1) inset;
  transition: all 0.2s;
}
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(34, 211, 238, 0.35), 0 0 0 1px rgba(255,255,255,0.15) inset;
}
.primary-button span { font-size: 15px; transition: transform 0.2s; }
.primary-button:hover span { transform: translateX(3px); }

.hero-art {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.orbit-one { width: 180px; height: 180px; }
.orbit-two { width: 130px; height: 130px; border-color: rgba(34, 211, 238, 0.15); }
.orbit-three { width: 80px; height: 80px; border-color: rgba(167, 139, 250, 0.2); }
.core {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--grad-brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.3), 0 0 0 1px rgba(255,255,255,0.12) inset;
  z-index: 2;
  animation: coreFloat 5s ease-in-out infinite;
}
.core span { font-weight: 800; font-size: 22px; color: #fff; line-height: 1; }
.core small { font-size: 7px; letter-spacing: 0.8px; color: rgba(255,255,255,0.85); font-weight: 600; margin-top: 1px; }
@keyframes coreFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.orbit-node {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--cyan);
  box-shadow: var(--shadow-sm);
  animation: nodeFloat 4s ease-in-out infinite;
}
.node-a { top: 12%; left: 18%; animation-delay: 0s; color: var(--cyan); }
.node-b { top: 8%; right: 22%; animation-delay: 0.6s; color: var(--violet); }
.node-c { bottom: 18%; left: 12%; animation-delay: 1.2s; color: var(--blue-bright); }
.node-d { bottom: 12%; right: 16%; animation-delay: 0.3s; color: var(--teal); }
.node-e { top: 42%; right: 4%; animation-delay: 0.9s; color: var(--amber); }
@keyframes nodeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.hero-foot {
  display: flex;
  gap: 28px;
  padding: 14px 36px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.hero-foot span { display: flex; align-items: center; gap: 7px; }
.hero-foot i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  display: inline-block;
  box-shadow: 0 0 6px var(--cyan);
}

/* SECTIONS */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-heading h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0 0 4px;
}
.section-heading p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cyan);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.18s;
  white-space: nowrap;
}
.text-button:hover { background: rgba(34, 211, 238, 0.08); }
.text-button span { transition: transform 0.18s; }
.text-button:hover span { transform: translateX(2px); }

/* METRICS */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.22s;
}
.metric-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.metric-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.metric-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue-bright); }
.metric-icon.teal { background: rgba(45, 212, 191, 0.12); color: var(--teal); }
.metric-icon.violet { background: rgba(167, 139, 250, 0.14); color: var(--violet); }
.metric-icon.amber { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.metric-card > strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: block;
  margin-bottom: 2px;
}
.metric-card > small {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}
.metric-line {
  height: 3px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.metric-line span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}
.metric-line.teal-line span { background: linear-gradient(90deg, var(--teal), var(--cyan)); }
.metric-line.violet-line span { background: linear-gradient(90deg, var(--violet), var(--blue)); }
.metric-line.amber-line span { background: linear-gradient(90deg, var(--amber), #f59e0b); }

/* MODULES */
.module-heading { margin-top: 8px; }
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.filter-tab {
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active {
  background: var(--panel-3);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.filter-tab span {
  font-size: 10px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}
.filter-tab.active span { background: rgba(34, 211, 238, 0.2); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.module-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  animation: cardIn 0.4s ease both;
}
.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--glow) 12%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.module-card:hover {
  border-color: color-mix(in srgb, var(--glow) 40%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px color-mix(in srgb, var(--glow) 25%, transparent);
}
.module-card:hover::before { opacity: 1; }
.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.module-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--icon-bg, var(--panel-2));
  color: var(--icon-color, var(--cyan));
  display: grid;
  place-items: center;
  font-size: 17px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.22s;
}
.module-card:hover .module-icon { transform: scale(1.06); }
.module-arrow {
  font-size: 13px;
  color: var(--text-dim);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all 0.2s;
}
.module-card:hover .module-arrow {
  opacity: 1;
  transform: translate(0, 0);
  color: var(--glow, var(--cyan));
}
.module-card h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.1px;
  line-height: 1.3;
}
.module-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.module-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-dim);
}
.module-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.bottom-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--cyan);
  flex-shrink: 0;
}
.bottom-banner strong { font-size: 13.5px; display: block; margin-bottom: 2px; }
.bottom-banner p { margin: 0; font-size: 12.5px; color: var(--text-muted); }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.footer b { font-weight: 500; color: var(--text-muted); }

/* MODULE VIEW */
.module-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  min-height: calc(100vh - var(--topbar-h));
}
.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.module-toolbar h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.2px;
}
.module-toolbar p { margin: 0; font-size: 13px; color: var(--text-muted); }
.module-actions { display: flex; gap: 8px; flex-shrink: 0; }
.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: all 0.18s;
}
.secondary-button:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line-strong);
}
.frame-shell {
  flex: 1;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 520px;
  box-shadow: var(--shadow);
}
#moduleFrame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: #0f172a;
}
.frame-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--panel);
  color: var(--text-muted);
  font-size: 13px;
  z-index: 2;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 100;
  backdrop-filter: blur(12px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* LIGHT MODE */
body.light-mode {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --panel-3: #e2e8f0;
  --panel-hover: #f1f5f9;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  color-scheme: light;
}
body.light-mode .sidebar { background: #fff; }
body.light-mode .topbar { background: rgba(248, 250, 252, 0.85); }
body.light-mode .hero-panel { background: #fff; }
body.light-mode .nav-item.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.1), rgba(59, 130, 246, 0.05));
}
body.light-mode .metric-card,
body.light-mode .module-card,
body.light-mode .bottom-banner,
body.light-mode .frame-shell { background: #fff; }

/* RESPONSIVE */
@media (max-width: 1250px) {
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-content { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 24px; }
  .metric-grid { gap: 10px; }
}
@media (max-width: 980px) {
  .sidebar { width: 240px; }
  .main-area { margin-left: 240px; }
  :root { --sidebar-w: 240px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr 0.8fr; padding: 28px 24px 20px; }
  .hero-copy h2 { font-size: 24px; }
  .filter-tabs { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-menu { display: grid; flex-shrink: 0; }
  .topbar { height: 56px; padding: 0 14px; gap: 10px; }
  .breadcrumbs { font-size: 11px; margin-right: auto; }
  .search-box { width: 36px; padding: 0 10px; }
  .search-box input, .search-box kbd { display: none; }
  .search-box:focus-within {
    position: absolute;
    left: 52px;
    right: 100px;
    width: auto;
    background: var(--panel);
    z-index: 5;
  }
  .search-box:focus-within input { display: block; }
  .theme-toggle { display: none; }
  .api-status { display: none; }
  .page-content { padding: 20px 14px 24px; }
  .welcome-row { flex-direction: column; gap: 12px; }
  .welcome-row h1 { font-size: 22px; }
  .date-chip { align-self: flex-start; }
  .hero-grid { grid-template-columns: 1fr; padding: 24px 18px 12px; }
  .hero-copy h2 { font-size: 22px; }
  .hero-art { height: 160px; max-width: 280px; margin: 0 auto; }
  .hero-foot { flex-wrap: wrap; gap: 10px; padding: 12px 16px; font-size: 11px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { padding: 14px; }
  .metric-card > strong { font-size: 20px; }
  .module-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .module-card { padding: 12px; min-height: 140px; }
  .module-card h3 { font-size: 12.5px; }
  .module-card p { font-size: 11px; }
  .bottom-banner { flex-wrap: wrap; }
  .bottom-banner .text-button { display: none; }
  .footer { flex-direction: column; gap: 6px; align-items: flex-start; }
  .module-view { padding: 14px 12px; }
  .module-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .module-actions { width: 100%; }
  .secondary-button { flex: 1; justify-content: center; }
  .frame-shell { min-height: 400px; }
}
@media (max-width: 400px) {
  .module-grid { grid-template-columns: 1fr; }
  .metric-grid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.app-greeting{display:inline-flex;align-items:center;font-weight:600;margin:0 8px 0 0;}
.profile-image-block{margin-top:12px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.profile-image-box{position:relative;width:72px;height:72px;border-radius:12px;overflow:hidden;border:1px solid rgba(128,128,128,.3);background:#0a0f1e}
.profile-image-box img{width:100%;height:100%;object-fit:cover;display:block}
#profileImagePlaceholder{width:72px;height:72px;border-radius:12px;background:#1b2a40;color:#fff;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:600;overflow:hidden}
#profileImageInput{display:none}
.profile-image-note{font-size:11px;color:#8fa3bc}
