:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --accent: #2f7bfd;
  --accent-muted: #d9e6ff;
  --text: #1b1d29;
  --muted: #6b7185;
  --border: #e4e7ed;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: #e5e7eb;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid #1f2937;
}

.brand-title {
  font-weight: 700;
  font-size: 18px;
}

.brand-subtitle {
  font-size: 13px;
  color: #94a3b8;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-item:hover {
  border-color: #334155;
  background: #111827;
}

.menu-item.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.tip {
  margin-top: auto;
  font-size: 12px;
  color: #cbd5e1;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 12px;
  line-height: 1.5;
}

.content {
  padding: 28px;
  display: grid;
  grid-template-rows: 1fr;
}

.panel {
  display: none;
  height: 100%;
}

.panel.active {
  display: block;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

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

h2 {
  margin: 0;
  font-size: 20px;
}

.muted {
  color: var(--muted);
  margin: 4px 0 0 0;
}

.status {
  color: var(--muted);
  font-size: 13px;
  min-width: 120px;
  text-align: right;
}

.field-label {
  display: block;
  font-weight: 600;
  margin: 12px 0 6px;
}

textarea,
input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #f9fafb;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 123, 253, 0.1);
}

.actions {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

button {
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

button.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

button.ghost {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}

button:hover {
  transform: translateY(-1px);
}

.answer-block {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px dashed var(--accent-muted);
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.reference-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent-muted);
  color: #1d4ed8;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-item .meta {
  font-size: 12px;
  color: var(--muted);
}

.verification {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

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

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .menu {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .content {
    padding: 16px;
  }
}

