:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --line: #e5e7eb;
  --blue: #1a237e;
  --blue2: #283593;
  --green: #16a34a;
  --orange: #f59e0b;
  --red: #dc2626;
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hero {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
  padding: 34px 42px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .78;
  margin-bottom: 8px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0;
  opacity: .86;
  line-height: 1.6;
}

.hero-card {
  min-width: 180px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.hero-card-label, .hero-card-sub {
  opacity: .78;
  font-size: 13px;
}

.hero-card-value {
  font-size: 34px;
  font-weight: 800;
  margin: 4px 0;
}

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.search-panel {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  font-size: 16px;
  outline: none;
}

.search-input:focus {
  border-color: var(--blue2);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tab {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #374151;
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
}

.tab.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.span-2 {
  grid-column: span 1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.panel h2 {
  font-size: 18px;
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.report-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.report-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-left: 5px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  transition: transform .15s, box-shadow .15s;
}

.report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.report-card.growth { border-left-color: var(--orange); background: #fff7ed; }
.report-card.value { border-left-color: var(--green); background: #f0fdf4; }
.report-card.neutral { border-left-color: #94a3b8; background: #f8fafc; }

.report-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.report-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.report-summary {
  color: #374151;
  font-size: 13px;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  background: #eef2ff;
  color: var(--blue);
  margin-left: 4px;
}

.stock-list {
  display: grid;
  gap: 8px;
}

.stock-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
  background: #fff;
}

.stock-row:hover {
  background: #f8fafc;
}

.stock-row strong {
  display: block;
  margin-bottom: 3px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 150px 150px;
  gap: 8px;
  margin-bottom: 12px;
}

.form-grid input,
.form-grid textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
}

.form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.form-grid .wide {
  grid-column: span 2;
}

.form-grid button {
  border: none;
  background: var(--blue);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.memo-list, .tracking-list {
  display: grid;
  gap: 8px;
}

.memo-item, .tracking-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.item-body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 14px;
}

.delete-btn {
  border: none;
  background: #fee2e2;
  color: var(--red);
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}

@media (max-width: 860px) {
  .hero {
    padding: 24px 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: span 1;
  }

  .form-grid button {
    min-height: 42px;
  }
}


.storage-mode {
  display: inline-flex;
  margin: 2px 0 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1a237e;
  font-size: 12px;
  font-weight: 700;
}
