@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Noto+Sans+KR:wght@400;500;700;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg-dark: #070d18;
  --bg-panel: #0d1627;
  --bg-card: rgba(18, 29, 51, 0.8);
  --border-color: rgba(255, 255, 255, 0.09);
  --border-active: #38bdf8;

  --gov-blue: #1e40af;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --font-main: 'Noto Sans KR', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(30, 64, 175, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

/* Header */
.gov-header {
  background: rgba(7, 13, 24, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.gov-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gov-logo-badge {
  background: linear-gradient(135deg, #1e40af, #0284c7);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.3);
}

.gov-title h1 {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gov-title p {
  font-size: 11px;
  color: var(--text-secondary);
}

.gov-status-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--accent-emerald);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
}

/* Tab Navigation */
.tab-navigation {
  max-width: 1300px;
  margin: 20px auto 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-navigation::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: #38bdf8;
}

.nav-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

/* Main Container */
.app-viewport {
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
  flex: 1;
}

/* Panel Layout */
.panel-grid-2col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .panel-grid-2col { grid-template-columns: 1fr; }
}

.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.box-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chat Styles */
.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.chat-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
}

.chat-bubble.user {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e0f2fe;
  align-self: flex-end;
  max-width: 80%;
}

.chat-bubble.ai {
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-self: flex-start;
  max-width: 95%;
  white-space: pre-line;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}

.input-chat {
  flex: 1;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: white;
  font-size: 13px;
  outline: none;
}

.input-chat:focus {
  border-color: #38bdf8;
}

.btn-send {
  background: linear-gradient(135deg, #1e40af, #0284c7);
  color: white;
  border: none;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

/* Quick Question Pills */
.quick-questions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-question-pill {
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-question-pill:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Recipe Studio Table */
.recipe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.recipe-table th {
  text-align: left;
  padding: 10px 12px;
  background: #0f172a;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.recipe-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.input-table {
  width: 100%;
  background: #0b0f19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: white;
  font-size: 12px;
  outline: none;
}

/* Traceability Visual Cards */
.trace-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trace-node {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-left: 4px solid #38bdf8;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trace-node.critical {
  border-left-color: #f43f5e;
  background: rgba(244, 63, 94, 0.08);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .gov-header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .gov-title h1 {
    font-size: 16px;
  }
  .gov-title p {
    font-size: 10px;
  }
  .tab-navigation {
    padding: 0 16px;
    margin: 12px auto 0 auto;
    gap: 6px;
  }
  .nav-tab-btn {
    padding: 10px 14px;
    font-size: 12px;
  }
  .app-viewport {
    padding: 12px 16px;
  }
  .content-box {
    padding: 16px;
    gap: 14px;
  }
}

