/* ============================================================
   Decision Catcher - Common Styles
   Boston Neuromind LLC - CNA v7
   Calm Blue Tone (NeuroCatchers brand)
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Noto Sans KR', 'Inter', -apple-system, "Segoe UI", system-ui, sans-serif; }

body {
  background: var(--bg, #F7F8FA);
  color: #2A2D34;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.7;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 2px solid #5B6B7B;
  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: #46535F; }
.header .nav { display: flex; gap: 16px; }
.header .nav a {
  color: #5B6B7B;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
}
.header .nav a:hover, .header .nav a.active {
  background: #EEF1F4;
  color: #46535F;
}

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

/* Cards / Sections */
.section {
  background: #fff;
  border: 2px solid #5B6B7B;
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(42, 45, 52, 0.06);
}
.section h2 {
  font-size: 28px;
  color: #46535F;
  margin-bottom: 16px;
  border-bottom: 2px solid #E3E6EA;
  padding-bottom: 12px;
}
.section h3 {
  font-size: 20px;
  color: #46535F;
  margin-top: 24px;
  margin-bottom: 12px;
}
.section p { margin-bottom: 12px; color: #2A2D34; }

/* Decision Catcher brand color (Calm Blue) */
.brand-color { color: #5B6B7B; }
.brand-bg { background: #5B6B7B; color: #fff; }
.brand-border { border-color: #5B6B7B !important; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  background: #46535F;
  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: #5B6B7B; }
.btn-secondary {
  background: #fff;
  color: #46535F;
  border: 2px solid #5B6B7B;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #46535F;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border: 2px solid #E3E6EA;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #5B6B7B;
  outline: none;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.form-help {
  font-size: 14px;
  color: #6B7280;
  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 #EEF1F4;
}
.table th {
  background: #EEF1F4;
  font-weight: 700;
  color: #46535F;
}
.table tr:hover { background: #F2F4F6; }

/* Score badge - shades of blue */
.score-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.score-excellent { background: #46535F; color: #fff; }
.score-good { background: #5B6B7B; color: #fff; }
.score-average { background: #6B7280; color: #fff; }
.score-caution { background: #E3E6EA; color: #46535F; }
.score-priority { background: #EEF1F4; color: #46535F; border: 2px solid #5B6B7B; }

/* Progress bars */
.bar {
  width: 100%;
  height: 24px;
  background: #EEF1F4;
  border-radius: 12px;
  overflow: hidden;
  margin: 6px 0;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5B6B7B, #46535F);
  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: #46535F;
  margin-bottom: 16px;
  font-weight: 800;
}
.hero .subtitle {
  font-size: 22px;
  color: #5B6B7B;
  margin-bottom: 32px;
}
.hero .badge {
  display: inline-block;
  background: #5B6B7B;
  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 #E3E6EA;
  border-radius: 20px;
  padding: 24px;
  transition: border-color 0.2s;
}
.feature-card:hover {
  border-color: #5B6B7B;
}
.feature-card h3 {
  color: #5B6B7B;
  margin-bottom: 8px;
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  margin: 16px 0;
  border-left: 5px solid;
}
.alert-info { background: #EEF1F4; border-color: #5B6B7B; color: #46535F; }
.alert-warning { background: #EEF1F4; border-color: #6B7280; color: #46535F; }
.alert-danger { background: #ECEEF1; border-color: #46535F; color: #2A2D34; }
.alert-success { background: #EEF1F4; border-color: #46535F; color: #46535F; }

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

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

/* Login overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #EEF1F4 0%, #E3E6EA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-box {
  max-width: 400px;
  background: #fff;
  border: 2px solid #5B6B7B;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(42, 45, 52, 0.12);
}
.login-box h2 {
  color: #46535F;
  margin-bottom: 24px;
}
.login-box input {
  width: 100%;
  padding: 14px;
  border: 2px solid #E3E6EA;
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 16px;
}
.login-box input:focus {
  border-color: #5B6B7B;
  outline: none;
}
.login-box button {
  width: 100%;
  padding: 14px;
  background: #5B6B7B;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.login-box button:hover {
  background: #46535F;
}
.login-err { color: #46535F; 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; }
}

/* Language toggle button */
.lang-btn {
  background: #5B6B7B;
  color: #fff;
  border: 2px solid #5B6B7B;
  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: #5B6B7B;
}
