/* ============================================================
   Decision Catcher - Common Styles
   Boston Neuromind LLC · CNA v7
   admin.html + learning.neurocatchers.com 자료와 일관
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, "Segoe UI", "Pretendard", sans-serif; }

body {
  background: #f0eee9;
  color: #1a1a1a;
  min-height: 100vh;
  line-height: 1.6;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 2px solid #1a1a1a;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 20px; color: #2a2018; }
.header .nav { display: flex; gap: 16px; }
.header .nav a {
  color: #5a4a35;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
}
.header .nav a:hover, .header .nav a.active {
  background: #f0eee9;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Cards / Sections */
.section {
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
}
.section h2 {
  font-size: 28px;
  color: #2a2018;
  margin-bottom: 16px;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 12px;
}
.section h3 {
  font-size: 20px;
  color: #2a2018;
  margin-top: 24px;
  margin-bottom: 12px;
}
.section p { margin-bottom: 12px; color: #2a2018; }

/* Decision Catcher brand color */
.brand-color { color: #C9444F; }
.brand-bg { background: #C9444F; color: #fff; }
.brand-border { border-color: #C9444F !important; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #C9444F; }
.btn-secondary {
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2a2018;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #C9444F;
  outline: none;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.form-help {
  font-size: 13px;
  color: #5a4a35;
  margin-top: 4px;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.table th {
  background: #f0eee9;
  font-weight: 700;
}
.table tr:hover { background: #fafafa; }

/* Score badge */
.score-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.score-excellent { background: #d4edda; color: #155724; }
.score-good { background: #e1f5d4; color: #2d5016; }
.score-average { background: #fff3cd; color: #856404; }
.score-caution { background: #ffd9b3; color: #8b4513; }
.score-priority { background: #f8d7da; color: #721c24; }

/* Progress bars */
.bar {
  width: 100%;
  height: 24px;
  background: #f0eee9;
  border-radius: 12px;
  overflow: hidden;
  margin: 6px 0;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #C9444F, #E8A317);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 20px;
}
.hero h1 {
  font-size: 56px;
  color: #2a2018;
  margin-bottom: 16px;
  font-weight: 800;
}
.hero .subtitle {
  font-size: 22px;
  color: #5a4a35;
  margin-bottom: 32px;
}
.hero .badge {
  display: inline-block;
  background: #C9444F;
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 24px;
}

/* Grid for feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.feature-card {
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 20px;
  padding: 24px;
}
.feature-card h3 {
  color: #C9444F;
  margin-bottom: 8px;
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  margin: 16px 0;
  border-left: 5px solid;
}
.alert-info { background: #e7f3ff; border-color: #4A90C2; color: #2a4a6a; }
.alert-warning { background: #fff3cd; border-color: #E8A317; color: #856404; }
.alert-danger { background: #f8d7da; border-color: #C9444F; color: #721c24; }
.alert-success { background: #d4edda; border-color: #6B9B5C; color: #155724; }

/* Diagnosis hypothesis box */
.dx-card {
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 16px;
  padding: 20px;
  margin: 12px 0;
}
.dx-card.primary { border-color: #C9444F; border-width: 3px; }
.dx-card.secondary { border-color: #E8A317; }
.dx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dx-name {
  font-size: 18px;
  font-weight: 700;
}
.dx-posterior {
  font-size: 24px;
  font-weight: 800;
  color: #C9444F;
}
.dx-matches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
}
.dx-match-item {
  background: #f0eee9;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.dx-match-label { color: #5a4a35; font-size: 11px; }
.dx-match-value { font-weight: 700; color: #2a2018; }

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: #5a4a35;
  font-size: 14px;
  border-top: 1px solid #ddd;
  margin-top: 60px;
}

/* Login overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  background: #f0eee9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-box {
  max-width: 400px;
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
}
.login-box h2 {
  color: #C9444F;
  margin-bottom: 24px;
}
.login-box input {
  width: 100%;
  padding: 14px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 16px;
}
.login-box button {
  width: 100%;
  padding: 14px;
  background: #C9444F;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.login-err { color: #c00; font-size: 14px; margin-top: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .header { flex-direction: column; gap: 12px; }
  .container { padding: 20px 16px; }
  .hero h1 { font-size: 36px; }
  .dx-matches { grid-template-columns: repeat(2, 1fr); }
}

/* Print */
@media print {
  .header, .footer, .no-print { display: none; }
  .section { border: 1px solid #000; box-shadow: none; }
}

/* 언어 토글 버튼 */
.lang-btn {
  background: #C9444F;
  color: #fff;
  border: 2px solid #C9444F;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.lang-btn:hover {
  background: #fff;
  color: #C9444F;
}
