@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");
/* ===== DART Pro Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --surface: #f7f9fb;
  --surface-dim: #d8dadc;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f2f4f6;
  --surface-container: #eceef0;
  --surface-container-high: #e6e8ea;
  --surface-container-highest: #e0e3e5;
  --on-surface: #191c1e;
  --on-surface-variant: #45464d;
  --inverse-surface: #2d3133;
  --inverse-on-surface: #eff1f3;
  --outline: #76777d;
  --outline-variant: #c6c6cd;
  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #131b2e;
  --on-primary-container: #7c839b;
  --secondary: #0058be;
  --on-secondary: #ffffff;
  --secondary-container: #2170e4;
  --on-secondary-container: #fefcff;
  --primary-fixed: #dae2fd;
  --primary-fixed-dim: #bec6e0;
  --secondary-fixed: #d8e2ff;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-container: 40px;

  /* Radius */
  --r-sm: 2px;
  --r-default: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-full: 9999px;

  /* Sidebar */
  --sidebar-width: 256px;
  --topbar-height: 64px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ===== Typography ===== */
.t-headline-xl { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 30px; font-weight: 700; line-height: 38px; letter-spacing: -0.02em; }
.t-headline-md { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: -0.01em; }
.t-headline-sm { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 16px; font-weight: 600; line-height: 24px; }
.t-body-lg { font-size: 16px; font-weight: 400; line-height: 24px; }
.t-body-md { font-size: 14px; font-weight: 400; line-height: 20px; }
.t-data-mono { font-size: 14px; font-weight: 500; line-height: 20px; letter-spacing: -0.01em; }
.t-label-sm { font-size: 12px; font-weight: 600; line-height: 16px; }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: rgba(250, 251, 252, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(226, 229, 233, 0.5);
  display: flex; flex-direction: column;
  padding: var(--sp-md);
  z-index: 50;
  overflow-y: auto;
}

.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 4px 8px; margin-bottom: var(--sp-xl); }
.sidebar-logo-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-default); display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-text h1 { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 22px; font-weight: 900; line-height: 1; color: var(--on-surface); }
.sidebar-logo-text p { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--outline); font-weight: 700; margin-top: 4px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 0 8px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-radius: 24px;
  color: var(--outline);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 14px; font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.nav-item:hover { color: var(--on-surface); background: var(--surface-container-low); }
.nav-item.active {
  color: var(--on-primary); 
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-weight: 600;
}
.nav-item .material-symbols-outlined { font-size: 20px; }

.sidebar-footer { margin-top: auto; padding-top: var(--sp-md); }
.sidebar-footer .btn-primary { width: 100%; }

/* Topbar */
.topbar {
  position: fixed; top: 0; left: var(--sidebar-width); right: 0;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 229, 233, 0.5);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-lg);
  z-index: 40;
}

.topbar-search {
  position: relative; flex: 1; max-width: 480px;
}
.topbar-search .material-symbols-outlined {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--outline); font-size: 20px;
}
.topbar-search input {
  width: 100%; padding: 8px 16px 8px 40px;
  background: var(--surface-container-low);
  border: 1px solid transparent; border-radius: var(--r-lg);
  font-size: 14px; outline: none;
  transition: all 0.2s;
}
.topbar-search input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0,88,190,0.1);
  background: white;
}

.topbar-actions { display: flex; align-items: center; gap: var(--sp-md); }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: var(--sp-xl);
  max-width: 1200px;
  width: 100%;
}

/* ===== Components ===== */

/* Buttons */
.btn-primary {
  padding: 10px 20px;
  background: var(--primary); color: white;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 14px; font-weight: 700;
  border-radius: var(--r-default);
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  padding: 8px 16px;
  border: 1px solid var(--secondary); color: var(--secondary);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 13px; font-weight: 600;
  border-radius: var(--r-default);
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(0,88,190,0.05); }

.btn-text {
  background: none; border: none; padding: var(--sp-sm) var(--sp-md);
  font-weight: 600; color: #3b82f6; cursor: pointer; border-radius: var(--r-md);
  transition: all 0.2s;
}
.btn-text:hover { background: #eff6ff; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid var(--outline-variant);
  padding: 6px 12px; font-size: 13px; font-weight: 600;
  color: var(--on-surface-variant); cursor: pointer; border-radius: 8px;
  transition: all 0.2s;
}
.btn-ghost:hover {
  background: var(--surface-container-low);
  color: var(--on-surface);
  border-color: var(--outline);
}

.btn-detail {
  display: inline-flex; align-items: center;
  background: none; border: none;
  padding: 4px 8px; font-size: 12px; font-weight: 500;
  color: var(--on-surface-variant); cursor: pointer;
  transition: all 0.2s;
  text-decoration: underline; text-underline-offset: 2px;
}
.btn-detail:hover {
  color: var(--primary);
}

.shortcut-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 6px; border-radius: 6px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px; font-weight: 600;
  pointer-events: none;
}

/* Cards */
.card {
  background: var(--surface-container-lowest);
  border: 1px solid rgba(226, 229, 233, 0.6);
  border-radius: 16px;
  padding: var(--sp-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary) 0%, rgba(0, 88, 190, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover { 
  border-color: rgba(0, 88, 190, 0.2); 
  box-shadow: 0 12px 32px rgba(0, 88, 190, 0.08);
  transform: translateY(-2px);
}
.card:hover::before {
  opacity: 1;
}
.card-static:hover { 
  border-color: rgba(226, 229, 233, 0.6); 
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  transform: none;
}
.card-static:hover::before {
  opacity: 0;
}

/* Stat Cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); margin-bottom: var(--sp-xl); }
.stat-card { composes: card; }
.stat-card .stat-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--on-surface-variant); margin-bottom: 8px;
}
.stat-card .stat-value { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 28px; font-weight: 700; color: var(--on-surface); }
.stat-card .stat-meta {
  display: flex; align-items: center; gap: 4px;
  margin-top: 8px; font-size: 13px; font-weight: 500;
}
.stat-meta .material-symbols-outlined { font-size: 16px; }
.stat-meta.positive { color: var(--success); }
.stat-meta.info { color: var(--secondary); }
.stat-meta.neutral { color: var(--outline); }

/* Disclosure Feed Cards */
.feed-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  cursor: pointer;
  transition: all 0.2s;
}
.feed-card:hover { border-color: var(--secondary); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

.feed-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--sp-md); }
.feed-card-corp { display: flex; align-items: center; gap: 12px; }
.feed-card-ticker {
  width: 40px; height: 40px; border-radius: var(--r-default);
  background: var(--surface-container-low);
  border: 1px solid #e2e5e9;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: var(--on-surface-variant);
}
.feed-card-corp h4 { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 14px; font-weight: 600; color: var(--on-surface); }
.feed-card-corp p { font-size: 12px; font-weight: 600; color: var(--on-surface-variant); }
.feed-card-date {
  font-size: 12px; font-weight: 500; color: var(--on-surface-variant);
  background: var(--surface-container); padding: 4px 8px; border-radius: var(--r-default);
}
.feed-card-title { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 15px; font-weight: 600; color: var(--on-surface); margin-bottom: 8px; line-height: 1.5; }
.feed-card-body { color: var(--on-surface-variant); font-size: 13px; line-height: 1.6; margin-bottom: var(--sp-md); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed-card-tags { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Pills / Status */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em;
}
.pill-regular { background: #eff6ff; color: #1d4ed8; }
.pill-major { background: #fef3c7; color: #92400e; }
.pill-financial { background: #f0fdf4; color: #166534; }
.pill-equity { background: #fdf2f8; color: #9d174d; }
.pill-default { background: var(--surface-container); color: var(--on-surface-variant); }
.pill .material-symbols-outlined { font-size: 14px; }

/* Data Tables */
.data-table { width: 100%; }
.data-table thead tr {
  background: var(--surface-container-low);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--on-surface-variant); font-weight: 700;
}
.data-table th { text-align: left; padding: 12px 16px; }
.data-table th.text-right { text-align: right; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(198,198,205,0.3); font-size: 14px; }
.data-table td.text-right { text-align: right; }
.data-table td.mono { font-weight: 500; letter-spacing: -0.01em; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--surface-container-low); }
.data-table td.bold { font-weight: 700; }
.data-table td.positive { color: var(--success); }
.data-table td.negative { color: var(--error); }

/* Form Elements */
.form-group { margin-bottom: var(--sp-md); }
.form-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--on-surface-variant);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--outline-variant); border-radius: var(--r-default);
  font-size: 14px; background: white; color: var(--on-surface);
  outline: none; transition: all 0.2s;
}
.form-input:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0,88,190,0.1); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2376777d' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Section Headers */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-md); }
.section-title { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 20px; font-weight: 600; color: var(--on-surface); }

/* Page Header */
.page-header { margin-bottom: var(--sp-xl); }
.page-header h2 { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--on-surface); margin-bottom: 10px; }
.page-header p { color: var(--on-surface-variant); font-size: 14px; }

/* Two Column Layout */
.content-grid { display: grid; grid-template-columns: 1fr 380px; gap: var(--sp-xl); }
.content-main { display: flex; flex-direction: column; gap: var(--sp-md); }
.content-aside { display: flex; flex-direction: column; gap: var(--sp-xl); }

/* Dark Banner */
.dark-banner {
  background: var(--primary-container);
  padding: var(--sp-lg); border-radius: var(--r-lg);
  color: white;
}
.dark-banner-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dark-banner-head .material-symbols-outlined { color: var(--secondary-fixed); font-size: 20px; }
.dark-banner-head span { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--secondary-fixed); }
.dark-banner p { font-size: 14px; color: var(--primary-fixed-dim); line-height: 1.6; margin-bottom: var(--sp-md); }
.dark-banner .btn-action {
  width: 100%; padding: 10px;
  background: var(--secondary); color: white;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 13px; font-weight: 700;
  border-radius: var(--r-lg); transition: background 0.2s;
}
.dark-banner .btn-action:hover { background: #1a7ae8; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--outline); }
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--outline-variant);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty State Upgrade */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 20px; color: var(--outline);
}
.empty-state .material-symbols-outlined { 
  font-size: 40px; 
  color: var(--outline-variant); 
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--surface-container);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}
.empty-state p { 
  font-size: 15px; font-weight: 500; color: var(--on-surface-variant); max-width: 300px; line-height: 1.5;
}

/* Toast Notifications */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 12px; pointer-events: none;
}
.toast {
  background: var(--inverse-surface); color: var(--inverse-on-surface);
  padding: 14px 20px; border-radius: var(--r-md);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex; align-items: center; gap: 12px; pointer-events: auto;
  animation: toast-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0; min-width: 240px;
}
.toast.toast-hiding { animation: toast-slide-out 0.3s forwards; }
@keyframes toast-slide-in {
  0% { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes toast-slide-out {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}
.toast .material-symbols-outlined { font-size: 20px; }
.toast.error { background: var(--error); color: var(--on-error); }
.toast.success { background: var(--success); color: white; }


/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--sp-lg); }
.pagination button {
  padding: 8px 14px; border: 1px solid var(--outline-variant);
  border-radius: var(--r-default); font-size: 13px; font-weight: 500;
  color: var(--on-surface-variant); background: white; transition: all 0.2s;
}
.pagination button:hover { border-color: var(--secondary); color: var(--secondary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* Filter Bar (Modern Inset Style) */
.filter-bar {
  display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
  padding: 8px;
  background: var(--surface-container-high); 
  border: none;
  border-radius: 12px; 
  margin-bottom: var(--sp-lg);
}
.filter-bar .form-group { 
  margin-bottom: 0; flex: 1; min-width: 140px; 
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: flex; flex-direction: column; justify-content: center;
}
.filter-bar .form-label {
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-variant);
}
.filter-bar .form-input, .filter-bar .form-select {
  height: 24px;
  border: none;
  background-color: transparent;
  padding: 0;
  box-shadow: none;
  font-size: 14px;
  border-radius: 0;
}
.filter-bar .form-input:focus, .filter-bar .form-select:focus {
  outline: none;
  box-shadow: none;
}
.filter-bar .btn-primary {
  align-self: stretch;
  height: auto;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 24px;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
}

/* Company Detail */
.company-card { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md) var(--sp-xl); }
.company-field label { font-size: 12px; font-weight: 600; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; display: block; }
.company-field .value { font-size: 15px; color: var(--on-surface); font-weight: 500; }
.company-field.full-width { grid-column: 1 / -1; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px; background: var(--inverse-surface); color: var(--inverse-on-surface);
  border-radius: var(--r-lg); font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* Insight Banner */
.insight-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: var(--r-lg);
  margin-bottom: var(--sp-xl); 
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  animation: slideDown 0.4s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.insight-banner:not(:last-child)::after {
  content: ""; position: absolute;
  top: 60px; left: 41px;
  bottom: calc(-1 * var(--sp-xl) + 16px);
  width: 2px; background: var(--outline-variant);
  z-index: -1; opacity: 0.4;
}
.insight-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.12);
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.insight-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: white; flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.insight-content { flex: 1; }
.insight-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.insight-label { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; color: rgba(0,0,0,0.4); }
.insight-impact { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(0,0,0,0.05); }

.insight-text { font-size: 15px; line-height: 1.5; color: var(--on-surface); margin-bottom: 10px; }
.insight-points { 
  margin: 0; padding: 0; list-style: none; 
  display: flex; flex-direction: column; gap: 4px;
}
.insight-points li { 
  font-size: 13px; color: rgba(0,0,0,0.6); 
  display: flex; align-items: flex-start; gap: 8px;
}
.insight-points li::before { content: "•"; color: currentColor; opacity: 0.5; }

.insight-actions { align-self: flex-start; }

.insight-info { background: rgba(240, 247, 255, 0.7); border: 1px solid rgba(59, 130, 246, 0.25); border-left: 4px solid #3b82f6; }
.insight-info .insight-icon { color: #3b82f6; }
.insight-info .insight-impact { background: #dbeafe; color: #1e40af; }

.insight-success { background: rgba(240, 253, 244, 0.7); border: 1px solid rgba(34, 197, 94, 0.25); border-left: 4px solid #22c55e; }
.insight-success .insight-icon { color: #22c55e; }
.insight-success .insight-impact { background: #dcfce7; color: #166534; }

.insight-warning { background: rgba(255, 251, 235, 0.7); border: 1px solid rgba(245, 158, 11, 0.25); border-left: 4px solid #f59e0b; }
.insight-warning .insight-icon { color: #f59e0b; }
.insight-warning .insight-impact { background: #fef3c7; color: #92400e; }

.insight-major { background: rgba(254, 242, 242, 0.7); border: 1px solid rgba(239, 68, 68, 0.25); border-left: 4px solid #ef4444; }
.insight-major .insight-icon { color: #ef4444; }
.insight-major .insight-impact { background: #fee2e2; color: #991b1b; }

.insight-default { background: rgba(248, 250, 252, 0.7); border: 1px solid rgba(148, 163, 184, 0.25); border-left: 4px solid #64748b; }
.insight-default .insight-icon { color: #64748b; }
.insight-default .insight-impact { background: #e2e8f0; color: #475569; }

.insight-purple { background: rgba(250, 245, 255, 0.7); border: 1px solid rgba(168, 85, 247, 0.25); border-left: 4px solid #a855f7; }
.insight-purple .insight-icon { color: #a855f7; }
.insight-purple .insight-impact { background: #f3e8ff; color: #7e22ce; }


.ai-glow {
  position: relative;
  border-color: #818cf8 !important;
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.2);
}
.ai-glow::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(45deg, #818cf8, #c084fc, #818cf8);
  z-index: -1; opacity: 0.1;
}
.group-item:hover { background: var(--surface-container-high); }
.group-item:last-child { border-bottom: none !important; }
.corp-logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.settings-section .card { margin-bottom: var(--sp-lg); }
.api-key-display {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px; word-break: break-all;
  padding: 12px; background: var(--surface-container-low);
  border-radius: var(--r-default); color: var(--on-surface);
}

/* Responsive */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { left: 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--outline-variant); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }

/* Transition for pages */
#app-content { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
/* Autocomplete Suggestions */
.suggestions-list {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: white;
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  border-bottom: 1px solid var(--surface-container);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--surface-container-low); }
.suggestion-item .name { font-weight: 600; color: var(--on-surface); font-size: 14px; }
.suggestion-item .code { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--secondary); background: var(--surface-container); padding: 2px 6px; border-radius: 4px; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-secondary {
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
}
.badge-success {
  background: #dcfce7;
  color: #15803d;
}
.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

/* Highlight styles for numbers and key warnings */
.highlight-number {
  font-weight: 700;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}
.highlight-danger {
  font-weight: 700;
  color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}
.highlight-warning {
  font-weight: 700;
  color: #ea580c;
  background: rgba(234, 88, 12, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}
.highlight-success {
  font-weight: 700;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Category Quick Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: calc(var(--sp-lg) * 0.5);
  padding-bottom: 6px;
  overflow-x: auto;
}
.filter-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-surface-variant);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.filter-tab:hover {
  background: var(--surface-container-low);
  border-color: var(--outline);
}
.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* Risk badge styles */
.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 8px;
  text-transform: uppercase;
}
.risk-safe { background: #dcfce7; color: #15803d; }
.risk-warn { background: #fef3c7; color: #b45309; }
.risk-danger { background: #ffe4e6; color: #b91c1c; }

/* Sidebar Banner Hover Animation */
.sidebar-banner-link:hover .sidebar-banner {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(226, 229, 233, 1) !important;
}

/* Statistics Page Layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-xl);
  margin-top: var(--sp-lg);
}
.stat-card {
  background: var(--surface-container-lowest);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.kpi-box {
  flex: 1;
  min-width: 180px;
  background: var(--surface-container);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-lg);
  padding: 20px;
}
.kpi-title {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--on-surface);
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
}
.stat-table th, .stat-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
}
.stat-table th {
  color: var(--on-surface-variant);
  font-weight: 600;
  background: var(--surface-container-low);
}
.stat-table tr:hover td {
  background: rgba(0,0,0,0.02);
}
