/* ═══════════════════════════════════════════════
   Project Athena — Design System (lp-01 base)
   ═══════════════════════════════════════════════ */

:root {
  /* Colors — lp-01 */
  --bg-dark: #0A0A0A;
  --bg-dark-2: #111111;
  --bg-dark-3: #1A1A1A;
  --bg-light: #FFFFFF;
  --bg-surface: #F8F9FA;
  --accent: #0066FF;
  --accent-light: #00C8FF;
  --accent-glow: rgba(0, 102, 255, 0.12);
  --text-white: #FFFFFF;
  --text-black: #0A0A0A;
  --text-gray: #888888;
  --text-muted: #6B7280;
  --text-secondary: #9CA3AF;
  --border-dark: rgba(255,255,255,0.1);
  --border-light: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --card-dark: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.1);

  /* Typography */
  --font: 'Inter', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;

  /* Spacing */
  --section-py: 100px;
  --container: 1200px;
  --radius: 16px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text-white);
  background: var(--bg-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Container ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }

/* ── Sections ── */
.section { padding: var(--section-py) 0; }
.section--dark { background: var(--bg-dark); color: var(--text-white); }
.section--dark-2 { background: var(--bg-dark-2); color: var(--text-white); }
.section--light { background: var(--bg-light); color: var(--text-black); }

/* ── Typography ── */
.hero-title {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero-title span { color: var(--accent); }

h1, .h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2, .h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h3, .h3 { font-size: 24px; font-weight: 600; line-height: 1.3; }
h4, .h4 { font-size: 18px; font-weight: 600; }

.section--light h1, .section--light h2, .section--light h3 { color: var(--text-black); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-gray); }
.text-small { font-size: 14px; }

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-desc { max-width: 640px; font-size: 17px; color: var(--text-gray); line-height: 1.7; margin-top: 16px; }
.section--light .section-desc { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font);
  font-size: 15px; font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: none; cursor: pointer;
  transition: all 0.2s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #0055DD; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,102,255,0.3); }
.btn--outline { background: transparent; color: #fff; border: 1px solid var(--border-dark); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--white { background: #fff; color: var(--text-black); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn--sm { padding: 8px 16px; font-size: 14px; border-radius: 6px; }
.btn--danger { background: var(--error); color: #fff; }
.btn--danger:hover { background: #DC2626; }

/* ── Cards ── */
.card {
  background: var(--card-dark);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

.card--light {
  background: #F5F5F5;
  border: none;
  border-radius: var(--radius);
  padding: 40px;
}
.card--accent { background: var(--accent); color: #fff; border: none; }

.card--white {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ── Number Badge ── */
.num-badge { font-size: 64px; font-weight: 900; color: var(--accent); line-height: 1; }

/* ── Grid ── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-40 { gap: 40px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }
.mb-40 { margin-bottom: 40px; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}
.navbar.scrolled { background: rgba(10,10,10,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-dark); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-logo { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.navbar-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-gray); transition: color 0.2s; }
.nav-links a:hover { color: #fff; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse at top right, rgba(0,102,255,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at top left, rgba(0,200,255,0.15) 0%, transparent 50%),
    var(--bg-dark);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-sub { font-size: 14px; font-weight: 500; color: var(--text-gray); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 24px; }
.hero-desc { max-width: 560px; font-size: 17px; color: var(--text-gray); line-height: 1.7; margin-top: 24px; }
.hero-actions { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Stats Row ── */
.stats-row { display: flex; gap: 48px; margin-top: 60px; }
.stat-item .stat-value { font-size: 36px; font-weight: 800; color: #fff; }
.stat-item .stat-label { font-size: 13px; color: var(--text-gray); margin-top: 4px; }

/* ── Feature Section ── */
.feature-icon {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--accent); font-size: 20px;
}

/* ── Footer ── */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border-dark); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 13px; color: var(--text-gray); }

/* ── Animations ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════
   DASHBOARD STYLES (White BG)
   ═══════════════════════════════════════════════ */

body.dashboard-body {
  background: var(--bg-surface);
  color: #111827;
}

.dash-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px; height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border-light);
  padding: 24px 16px;
  position: fixed; left: 0; top: 0;
  display: flex; flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}
.sidebar-logo { font-size: 18px; font-weight: 700; color: #111827; padding: 0 8px 24px; border-bottom: 1px solid var(--border-light); margin-bottom: 16px; }
.sidebar-logo span { color: var(--accent); }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
  cursor: pointer;
}
.sidebar-link:hover { background: var(--bg-surface); color: #111827; }
.sidebar-link.active { background: #EFF6FF; color: var(--accent); font-weight: 600; }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-section-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.08em; text-transform: uppercase; padding: 16px 12px 8px; }
.sidebar-bottom { border-top: 1px solid var(--border-light); padding-top: 16px; margin-top: auto; }

/* Main content */
.dash-main { flex: 1; margin-left: 260px; padding: 24px 32px; min-height: 100vh; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 600; color: #111827; }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.kpi-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-size: 32px; font-weight: 700; color: #111827; margin-top: 4px; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-change { font-size: 13px; font-weight: 600; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; }
.kpi-change--up { background: #ECFDF5; color: #065F46; }
.kpi-change--down { background: #FEF2F2; color: #991B1B; }

/* Dash Cards */
.dash-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.dash-card-header { padding: 16px 24px; border-bottom: 1px solid #F3F4F6; display: flex; align-items: center; justify-content: space-between; }
.dash-card-title { font-size: 15px; font-weight: 600; color: #111827; }
.dash-card-body { padding: 24px; }

/* Tables */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  text-align: left;
}
.dash-table td { padding: 12px 16px; border-bottom: 1px solid #F3F4F6; font-size: 14px; color: #111827; }
.dash-table tr:hover td { background: #F9FAFB; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge--success { background: #ECFDF5; color: #065F46; }
.badge--warning { background: #FFFBEB; color: #92400E; }
.badge--error { background: #FEF2F2; color: #991B1B; }
.badge--info { background: #EFF6FF; color: #1E40AF; }
.badge--neutral { background: #F3F4F6; color: #374151; }

/* Chart placeholder */
.chart-area {
  width: 100%; height: 280px;
  background: linear-gradient(180deg, rgba(0,102,255,0.08) 0%, rgba(0,102,255,0.01) 100%);
  border-radius: 8px;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

/* Status dot */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot--green { background: var(--success); }
.status-dot--yellow { background: var(--warning); }
.status-dot--red { background: var(--error); }

/* Alert bar */
.alert-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  margin-bottom: 16px;
}
.alert-bar--error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-bar--success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-bar--warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* Kill switch */
.kill-switch {
  background: #991B1B; color: #fff;
  padding: 12px 24px;
  border-radius: 8px; border: 2px solid #EF4444;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kill-switch:hover { background: #7F1D1D; transform: scale(1.02); }

/* Toggle */
.toggle { position: relative; width: 44px; height: 24px; cursor: pointer; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #D1D5DB; border-radius: 999px;
  transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { flex-wrap: wrap; gap: 24px; }
}
@media (max-width: 768px) {
  :root { --section-py: 64px; }
  .container { padding: 0 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }
  .nav-links { display: none; }
  .sidebar { display: none; }
  .dash-main { margin-left: 0; }
}
