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

:root {
  /* Font Family */
  --font-ko: 'Noto Sans KR', sans-serif;
  --font-en: 'Outfit', sans-serif;

  /* Colors - Light Mode (Navy Financial Theme) */
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --primary: #1e3a8a; /* Deep Navy */
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --primary-glow: rgba(30, 58, 138, 0.15);
  
  --accent: #2563eb; /* Royal Blue */
  --accent-hover: #1d4ed8;
  --accent-light: #f0f7ff;
  
  --success: #059669; /* Emerald Green */
  --warning: #d97706; /* Amber */
  --danger: #dc2626;  /* Red */
  --info: #0891b2;
  
  --border: #cbd5e1;
  --border-focus: #2563eb;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Colors - Dark Mode */
  --bg-primary: #0b0f19;
  --bg-secondary: #161e2e;
  --bg-card: rgba(22, 30, 46, 0.9);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #4b5563;
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e293b;
  --primary-glow: rgba(59, 130, 246, 0.2);
  
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-light: #1e293b;
  
  --border: #2d3748;
  --border-focus: #3b82f6;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-ko);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: var(--transition);
}

.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.logo span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Landing Page Hero Style */
.hero-section {
  text-align: center;
  padding: 2.5rem 1rem;
}

.hero-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.benefit-feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 550px;
  margin: 0 auto 2.5rem;
  text-align: left;
}

@media (min-width: 576px) {
  .benefit-feature-list {
    grid-template-columns: 1fr 1fr;
  }
}

.benefit-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.benefit-icon {
  font-size: 1.5rem;
}

/* Card Wrapper */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

/* Wizard / Step Progress */
.wizard-header {
  margin-bottom: 1.5rem;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 1;
}

.step-progress-bar {
  position: absolute;
  top: 15px;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 2;
  width: 0%;
  transition: var(--transition);
}

.step-dot {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-en);
  z-index: 3;
  color: var(--text-secondary);
  transition: var(--transition);
}

.step-dot.active {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

.step-dot.completed {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

/* Wizard steps animation */
.wizard-step {
  display: none;
  animation: slideUp 0.3s ease-out forwards;
}

.wizard-step.active {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Grid & Choice Layouts */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 576px) {
  .choice-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.choice-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.choice-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.choice-card.active {
  background: var(--primary-light);
  border-color: var(--accent);
  color: var(--primary);
}

.choice-card .card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.choice-card .card-label {
  font-weight: 700;
  font-size: 0.9rem;
}

/* Inputs & Form Groups */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  padding: 0.75rem 3.5rem 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
}

.input-unit {
  position: absolute;
  right: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.shortcut-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.badge-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.badge-btn:hover {
  background: var(--primary-light);
  border-color: var(--accent);
  color: var(--accent);
}

.badge-btn.clear {
  border-color: var(--danger);
  color: var(--danger);
}

.badge-btn.clear:hover {
  background: rgba(220, 38, 38, 0.05);
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: white;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

.btn-disabled {
  background: var(--border) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

/* Tabs */
.tab-container {
  display: flex;
  background: var(--bg-primary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  font-weight: 700;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--bg-secondary);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* RESULT VIEW & LEAD CARD */
.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-income-box {
  background: var(--primary-light);
  border: 1.5px solid var(--accent);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.result-income-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.lead-capture-card {
  background: linear-gradient(135deg, #1e3b8b, #0f1e4a);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.25);
  margin-top: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lead-card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.lead-badge {
  display: inline-block;
  background: var(--success);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.lead-card-title {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.4;
}

.lead-card-desc {
  font-size: 0.88rem;
  color: #93c5fd;
  margin-bottom: 1.5rem;
}

/* Lead Form */
.lead-form .form-group label {
  color: #bfdbfe;
  font-weight: 600;
}

.lead-form .form-control {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.lead-form .form-control::placeholder {
  color: #64748b;
}

.lead-form .form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.agreement-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #bfdbfe;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.agreement-label input {
  margin-top: 3px;
}

/* Success Card */
.success-card {
  text-align: center;
  padding: 3rem 1.5rem;
}

.success-icon {
  font-size: 3.5rem;
  color: var(--success);
  margin-bottom: 1rem;
}

/* ADMIN PANEL */
.admin-section {
  border-top: 2px dashed var(--border);
  margin-top: 4rem;
  padding-top: 2rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th, .admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg-primary);
  font-weight: 700;
  color: var(--text-secondary);
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.75rem;
}

.status-unread { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.status-contacting { background: rgba(217, 119, 6, 0.1); color: var(--warning); }
.status-completed { background: rgba(5, 150, 105, 0.1); color: var(--success); }

.admin-select {
  padding: 0.2rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
}

.btn-sm-danger {
  background: none;
  border: 1px solid var(--border);
  color: var(--danger);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.btn-sm-danger:hover {
  background: rgba(220, 38, 38, 0.05);
  border-color: var(--danger);
}

.admin-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.admin-stat-num {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* Bell curve distribution representation for simple view */
.simple-distribution {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 1.25rem 0;
  background: var(--border);
}

.dist-bar {
  height: 100%;
}
.dist-low { width: 30%; background: #059669; }
.dist-mid { width: 40%; background: #2563eb; }
.dist-high { width: 30%; background: #cbd5e1; }

.dist-pointer-container {
  position: relative;
  height: 20px;
  margin-top: -8px;
  margin-bottom: 1rem;
}

.dist-pointer {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pointer-triangle {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--accent);
}

.pointer-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

/* PRINT REPORT STYLES */
@media print {
  body { background: white !important; color: black !important; }
  .app-container { padding: 0 !important; }
  header, .hero-section, .wizard-header, .wizard-footer, .lead-capture-card, .admin-section, .badge-btn, .btn {
    display: none !important;
  }
  .card { border: none !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; }
  .wizard-step { display: none !important; }
  #step-results { display: block !important; }
}

/* Benefit Match Card Styles */
.benefit-match-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.benefit-match-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.benefit-match-info {
  flex-grow: 1;
}

.benefit-match-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.benefit-match-badge.cash { background: rgba(5, 150, 105, 0.1); color: var(--success); }
.benefit-match-badge.voucher { background: rgba(8, 145, 178, 0.1); color: var(--info); }
.benefit-match-badge.fund { background: rgba(37, 99, 235, 0.1); color: var(--accent); }

.benefit-match-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.benefit-match-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.benefit-match-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: var(--primary-light);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.benefit-match-link:hover {
  background: var(--accent);
  color: white;
}

/* Industry Card Choice Grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}
@media (min-width: 576px) {
  .industry-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.industry-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  user-select: none;
}
.industry-card input[type="radio"] {
  display: none;
}
.industry-card span {
  font-size: 0.9rem;
  font-weight: 700;
  color: #bfdbfe;
}
.industry-card:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(255, 255, 255, 0.08);
}
.industry-card:has(input[type="radio"]:checked) {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}
.industry-card:has(input[type="radio"]:checked) span {
  color: white;
}

/* Disabled button native state styling */
button:disabled, .btn:disabled {
  background: var(--border) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.6;
}

/* B2B Header Badge glow animation */
.badge-b2b-only {
  margin-left: 0.5rem;
}
