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

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --secondary: #e11d48;
  --secondary-light: #ffe4e6;
  --accent: #6366f1;
  --accent-light: #e0e7ff;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px -2px rgba(13, 148, 136, 0.08);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #14b8a6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.25);
}

.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.15;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Hero Section - Compact & Minimalist */
.hero-section {
  background: linear-gradient(135deg, #042f2e 0%, #0d9488 70%, #0f766e 100%);
  color: #ffffff;
  padding: 1.25rem 0 1.5rem 0;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.hero-desc {
  font-size: 0.85rem;
  color: #ccfbf1;
  max-width: 650px;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

/* Feature pills */
.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Sticky Progress Bar */
.progress-container {
  position: sticky;
  top: 56px;
  z-index: 95;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.25rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.custom-progress {
  height: 6px;
  border-radius: 999px;
  background-color: #e2e8f0;
  overflow: hidden;
}

.custom-progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #14b8a6 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 999px;
}

/* Main Form Card */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.section-header {
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.2rem;
}

.section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Question Cards */
.question-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  padding: 0.9rem 1.15rem;
  margin-bottom: 0.85rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.question-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.06);
}

.question-card.answered {
  border-color: #5eead4;
  background: #fcfdfd;
}

.question-card.highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.question-card.critical-q {
  border-left: 3.5px solid var(--secondary);
}

.q-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.6rem;
}

.q-number {
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.question-card.answered .q-number {
  background: var(--primary);
  color: #fff;
}

.q-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

.q-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Option Choices */
.option-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.option-item {
  position: relative;
}

.option-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  user-select: none;
}

.option-label:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.option-bullet {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.option-bullet::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}

.option-input:checked + .option-label {
  background: #f0fdfa;
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

.option-input:checked + .option-label .option-bullet {
  border-color: var(--primary);
}

.option-input:checked + .option-label .option-bullet::after {
  opacity: 1;
  transform: scale(1);
}

/* Critical Question Alert Notice */
.critical-notice {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Result Card & Gauges */
.result-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.result-header {
  padding: 1.75rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
}

.result-header.res-rendah {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: #fff;
}

.result-header.res-sedang {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  color: #fff;
}

.result-header.res-tinggi {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  color: #fff;
}

.score-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.score-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.score-max {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 600;
}

.result-category-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.result-body {
  padding: 1.5rem;
}

.alert-self-harm {
  background: #fef2f2;
  border-left: 5px solid #dc2626;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.patient-info-table {
  width: 100%;
  margin-bottom: 1.5rem;
}

.patient-info-table th {
  width: 35%;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 0;
}

.patient-info-table td {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  padding: 6px 0;
}

/* Footer */
footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Print Styling */
@media print {
  .no-print, .navbar-custom, .hero-section, .progress-container, footer, .btn-print, .btn-action {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .result-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    margin: 0 !important;
  }
  .result-header {
    background: #f1f5f9 !important;
    color: #000 !important;
    padding: 1rem !important;
  }
  .score-circle {
    background: transparent !important;
    border-color: #333 !important;
    color: #000 !important;
  }
  .print-header {
    display: block !important;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
}
