:root {
  --bg-primary: #0a0f1e;
  --bg-secondary: #0d1729;
  --bg-tertiary: #13213a;
  --bg-card: #101d33;
  --border: rgba(199, 216, 240, 0.16);
  --border-highlight: #3b82f6;
  --text-primary: #f5f8ff;
  --text-secondary: #c7d8f0;
  --text-muted: #8499b7;
  --accent: #3b82f6;
  --accent-hover: #72a7ff;
  --green: #5fd0a0;
  --green-bg: rgba(95, 208, 160, 0.1);
  --green-border: rgba(95, 208, 160, 0.4);
  --red: #ff6b7a;
  --orange: #f8a95b;
  --purple: #a98df8;
}

html { background: #0a0f1e; }

* {
  scrollbar-color: #263957 #0a0f1e;
  scrollbar-width: thin;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  background:
    radial-gradient(circle at 82% -10%, rgba(59, 130, 246, 0.18), transparent 32rem),
    radial-gradient(circle at -10% 55%, rgba(15, 46, 91, 0.22), transparent 30rem),
    #0a0f1e !important;
}

h1, h2, h3, .menu-title, .brand-wordmark, .hero-title {
  font-family: "Montserrat", "Inter", sans-serif;
}

.top-bar {
  background: rgba(10, 15, 30, 0.92) !important;
  border-bottom: 1px solid rgba(199, 216, 240, 0.13) !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-header,
body > .top-bar {
  height: 56px !important;
  padding: 0 20px !important;
  gap: 14px !important;
}

.logo-btn.brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  transform: none !important;
}

.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 6px 15px rgba(59, 130, 246, 0.24));
}

.brand-wordmark {
  color: #f5f8ff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: rgba(199, 216, 240, 0.3);
}

body > .top-bar > h1,
.app-header .nav-title {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
}

.top-bar .subtitle,
.app-header .subtitle {
  color: #86a7d5 !important;
  font-size: 0.65rem !important;
  font-weight: 600;
  letter-spacing: 0.16em !important;
}

.app-header .back-btn {
  border-color: rgba(199, 216, 240, 0.18) !important;
  background: rgba(199, 216, 240, 0.04) !important;
  padding: 5px 10px !important;
}

.landing-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 72px 24px 88px;
  overflow: hidden;
}

.landing-shell::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  top: -250px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  filter: blur(80px);
  pointer-events: none;
}

.hero-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
}

.hero-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 18px 36px rgba(59, 130, 246, 0.25));
}

.hero-eyebrow {
  margin-bottom: 14px;
  color: #78a8ed;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-title {
  color: #f5f8ff;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
}

.hero-copy {
  max-width: 580px;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: clamp(0.88rem, 2vw, 1rem);
  line-height: 1.7;
}

.tool-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 720px);
  margin-top: 42px;
}

.menu-card {
  position: relative;
  min-height: 164px;
  padding: 24px !important;
  overflow: hidden;
  text-align: left !important;
  background: linear-gradient(145deg, rgba(19, 33, 58, 0.94), rgba(13, 23, 41, 0.94)) !important;
  border: 1px solid rgba(199, 216, 240, 0.14) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.menu-card::after {
  content: "\2197";
  position: absolute;
  top: 23px;
  right: 23px;
  color: #6f91c3;
  font-size: 1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.menu-card:hover {
  border-color: rgba(59, 130, 246, 0.65) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(59, 130, 246, 0.14) !important;
}

.menu-card:hover::after { color: #72a7ff; transform: translate(2px, -2px); }

.menu-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px !important;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  font-size: 1.3rem !important;
}

.menu-title { margin-bottom: 8px !important; font-size: 0.92rem !important; letter-spacing: 0.01em; }
.menu-desc { color: #91a4be !important; font-size: 0.77rem !important; line-height: 1.55 !important; }

.wizard-step,
.file-card,
.recent-item,
#chart,
.sidebar,
.modal,
.content blockquote,
.content pre {
  background: linear-gradient(145deg, rgba(16, 29, 51, 0.96), rgba(13, 23, 41, 0.96)) !important;
  border-color: rgba(199, 216, 240, 0.14) !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.wizard-step,
.file-card,
.recent-item,
.modal { border-radius: 12px !important; }

.wizard-step .step-num {
  background: linear-gradient(135deg, #3b82f6, #0f2e5b) !important;
  color: #fff !important;
}

.btn-go,
.btn-run,
.toolbar button.active {
  color: #fff !important;
  background: linear-gradient(135deg, #3b82f6, #2563d8) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.btn:hover,
.toolbar button:hover,
.file-card:hover,
.recent-item:hover,
.upload-area:hover {
  border-color: rgba(59, 130, 246, 0.72) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

input[type="checkbox"] { accent-color: #3b82f6 !important; }

.tabs {
  background: rgba(13, 23, 41, 0.9) !important;
  border-bottom-color: rgba(199, 216, 240, 0.13) !important;
}

.tab.active { color: #72a7ff !important; border-bottom-color: #3b82f6 !important; }
.table-item.active { color: #72a7ff !important; border-left-color: #3b82f6 !important; }

.layout { height: calc(100vh - 57px) !important; }
.content { padding-top: 36px !important; }
.content h1 { font-size: 1.75rem !important; letter-spacing: -0.025em; }
.content h2 { color: #72a7ff !important; }

::-webkit-scrollbar-track { background: #0a0f1e !important; }
::-webkit-scrollbar-thumb { background: #263957 !important; }

@media (max-width: 720px) {
  .app-header,
  body > .top-bar { padding: 0 12px !important; }
  .brand-wordmark { font-size: 0.64rem; letter-spacing: 0.22em; }
  .brand-divider { display: none; }
  body > .top-bar > h1,
  .app-header .nav-title { display: none; }
  .top-bar .subtitle,
  .app-header .subtitle { display: none; }
  .landing-shell { padding: 54px 18px 64px; }
  .hero-logo { width: 108px; height: 108px; }
  .hero-title { letter-spacing: 0.12em; text-indent: 0.12em; }
  .tool-grid { grid-template-columns: 1fr; max-width: 430px; }
  .menu-card { min-height: 150px; }
  .content { padding: 24px 16px !important; }
}
