/* ============================================================
   Brand Audit Stylesheet
   Hafian Fuad · Brand Audit · 2026 · didukung Makruva Intelligence Lab
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #1B3A5C;
  --primary-light:  #EEF4FB;
  --primary-hover:  #14304d;
  --accent:         #D4450C;
  --text:           #1a1a1a;
  --text-muted:     #666;
  --border:         #e5e7eb;
  --bg:             #f8f9fa;
  --white:          #ffffff;
  --radius:         12px;
  --shadow:         0 2px 12px rgba(0,0,0,0.08);

  /* Brand Loop titik colors */
  --loop-brand:     #1E3A8A;   /* deep blue */
  --loop-brand-lt:  #EFF6FF;
  --loop-business:  #14532D;   /* deep green */
  --loop-business-lt: #F0FDF4;
  --loop-behaviour: #7C2D12;   /* deep orange */
  --loop-behaviour-lt: #FFF7ED;
  --loop-cross:     #581C87;   /* purple cross-titik */
  --loop-cross-lt:  #FAF5FF;

  /* Brand Level colors */
  --level-1: #6b7280; /* Invisible grey */
  --level-2: #0369a1; /* Emerging blue */
  --level-3: #0891b2; /* Developing cyan */
  --level-4: #16a34a; /* Established green */
  --level-5: #b45309; /* Authority amber */
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 760px; margin: 0 auto; padding: 24px 16px; }
h1, h2, h3, h4 { line-height: 1.3; }
a { color: var(--primary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block; background: var(--primary); color: white; padding: 14px 28px;
  border-radius: 8px; font-size: 16px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary.btn-personal { background: #1a5c3a; }
.btn-primary.btn-personal:hover { background: #145230; }
.btn-secondary {
  display: inline-block; background: white; color: var(--primary); padding: 14px 28px;
  border-radius: 8px; font-size: 16px; font-weight: 600; border: 2px solid var(--primary);
  cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--primary-light); }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-header { text-align: center; padding: 48px 0 32px; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; margin-bottom: 12px; }
.landing-header h1 { font-size: 40px; color: var(--primary); margin-bottom: 8px; }
.tagline { font-size: 18px; color: var(--text-muted); }

/* Brand Loop Framework */
.brand-loop-section {
  background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
  margin-bottom: 32px; text-align: center;
}
.loop-intro { color: var(--text-muted); margin-bottom: 28px; font-size: 15px; max-width: 520px; margin-left: auto; margin-right: auto; }
.loop-badges { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.loop-connector { font-size: 22px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.loop-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 20px; border-radius: 12px; min-width: 130px; }
.loop-badge-letter { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: white; margin-bottom: 4px; }
.loop-badge-name { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
.loop-badge-desc { font-size: 12px; color: var(--text-muted); text-align: center; }
.loop-brand-badge { background: var(--loop-brand-lt); }
.loop-brand-badge .loop-badge-letter { background: var(--loop-brand); }
.loop-brand-badge .loop-badge-name { color: var(--loop-brand); }
.loop-business-badge { background: var(--loop-business-lt); }
.loop-business-badge .loop-badge-letter { background: var(--loop-business); }
.loop-business-badge .loop-badge-name { color: var(--loop-business); }
.loop-behaviour-badge { background: var(--loop-behaviour-lt); }
.loop-behaviour-badge .loop-badge-letter { background: var(--loop-behaviour); }
.loop-behaviour-badge .loop-badge-name { color: var(--loop-behaviour); }
.loop-caption { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* Pilih Jenis Audit */
.audit-choices { margin-bottom: 32px; }
.section-title { font-size: 22px; margin-bottom: 20px; text-align: center; color: var(--primary); }
.audit-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.audit-card {
  background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 16px;
  border-top: 4px solid var(--primary);
}
.audit-card-personal { border-top-color: #1a5c3a; }
.audit-card-header { display: flex; align-items: center; gap: 12px; }
.audit-card-icon { font-size: 28px; }
.audit-card-header h3 { font-size: 18px; color: var(--primary); }
.audit-card-personal .audit-card-header h3 { color: #1a5c3a; }
.audit-card-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.audit-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.audit-meta-item { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.audit-meta-sep { color: var(--border); font-weight: 700; }
.dim-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dim-tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.tag-brand { background: var(--loop-brand-lt); color: var(--loop-brand); }
.tag-business { background: var(--loop-business-lt); color: var(--loop-business); }
.tag-behaviour { background: var(--loop-behaviour-lt); color: var(--loop-behaviour); }
.tag-brand-biz { background: var(--loop-cross-lt); color: var(--loop-cross); }

.sync-note {
  background: var(--primary-light); border-radius: var(--radius); padding: 18px 22px;
  display: flex; align-items: flex-start; gap: 12px;
}
.sync-note-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.sync-note p { font-size: 14px; color: var(--text-muted); }

/* Benefits */
.what-you-get { margin-bottom: 40px; }
.what-you-get h3 { font-size: 22px; margin-bottom: 20px; text-align: center; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.benefit { background: white; border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.benefit-icon { font-size: 28px; display: block; margin-bottom: 12px; }
.benefit h4 { font-size: 14px; margin-bottom: 8px; }
.benefit p { font-size: 13px; color: var(--text-muted); }

.landing-footer { text-align: center; padding: 32px 0; color: var(--text-muted); font-size: 13px; }
.landing-footer a { color: var(--primary); }
.quote { font-style: italic; margin-top: 8px; }
.author-note { margin-top: 6px; font-size: 12px; opacity: 0.7; }

/* ============================================================
   ASSESSMENT PAGE
   ============================================================ */
.assessment-header { text-align: center; padding: 24px 0 16px; margin-bottom: 24px; }
.assessment-header .brand { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }

/* Profile Form */
#step-profile { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
#step-profile h2 { font-size: 22px; margin-bottom: 8px; }
.step-desc { color: var(--text-muted); margin-bottom: 24px; }

.profile-section-divider {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 8px;
  margin: 24px 0 20px;
}

.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-label-section { display: block; font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.label-opt { font-weight: 400; color: var(--text-muted); font-size: 13px; }
input[type=text], input[type=email], input[type=number], input[type=tel], select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 15px; transition: border-color 0.2s; background: white;
}
input:focus, select:focus { outline: none; border-color: var(--primary); }

/* Radio options in profile form */
.radio-options { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s; font-weight: 400; font-size: 15px;
}
.radio-option input[type=radio] {
  width: auto; padding: 0; border: none; flex-shrink: 0;
  accent-color: var(--primary); width: 16px; height: 16px;
}
.radio-option:hover { border-color: var(--primary); background: var(--primary-light); }
.radio-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.progress-bar { flex: 1; background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.3s; }
.progress-text { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

/* ============================================================
   DIMENSION HEADER (rendered by JS inside questions-container)
   ============================================================ */
.dim-header { margin-bottom: 24px; }
.dim-label {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--primary-light); color: var(--primary); padding: 4px 10px; border-radius: 4px; margin-bottom: 8px;
}
.dim-name { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.dim-loop {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 4px;
}
/* Loop color variants for dim-loop */
.dim-loop-brand    { background: var(--loop-brand-lt); color: var(--loop-brand); }
.dim-loop-business { background: var(--loop-business-lt); color: var(--loop-business); }
.dim-loop-behaviour{ background: var(--loop-behaviour-lt); color: var(--loop-behaviour); }
.dim-loop-cross    { background: var(--loop-cross-lt); color: var(--loop-cross); }

/* ============================================================
   QUESTION CARDS
   ============================================================ */
.question-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.question-card.answered { border-left: 4px solid var(--primary); }
.question-num { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.question-text { font-size: 16px; font-weight: 500; margin-bottom: 10px; }
.question-helper { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; background: var(--bg); padding: 10px 14px; border-radius: 6px; border-left: 2px solid var(--border); }

/* Likert Scale */
.likert-scale { display: flex; gap: 8px; margin-bottom: 10px; }
.likert-option { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.likert-option input { display: none; }
.likert-circle {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
  transition: all 0.15s; cursor: pointer;
}
.likert-option:hover .likert-circle, .likert-option.selected .likert-circle {
  background: var(--primary); color: white; border-color: var(--primary);
}
.likert-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); padding: 0 2px; }
.likert-labels span { max-width: 80px; text-align: center; }
.likert-labels span:first-child { text-align: left; }
.likert-labels span:last-child { text-align: right; }

/* Qualitative Questions */
.qualitative-inputs { display: flex; flex-direction: column; gap: 12px; }
.qual-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qual-prefix { font-size: 14px; font-weight: 600; color: var(--text); flex-shrink: 0; min-width: 120px; }
.qual-input {
  flex: 1; min-width: 200px; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; transition: border-color 0.2s;
}
.qual-input:focus { outline: none; border-color: var(--primary); }

/* Multichoice + Radio Questions */
.multichoice-options { display: flex; flex-direction: column; gap: 8px; }
.multichoice-option {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; font-size: 14px;
}
.multichoice-option input { flex-shrink: 0; accent-color: var(--primary); width: 16px; height: 16px; }
.multichoice-option:hover { border-color: var(--primary); background: var(--primary-light); }
.multichoice-option.selected { border-color: var(--primary); background: var(--primary-light); font-weight: 500; }

.nav-buttons { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-box { text-align: center; padding: 80px 32px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.spinner { width: 48px; height: 48px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box h3 { font-size: 22px; margin-bottom: 12px; }
.loading-box p { color: var(--text-muted); }

/* ============================================================
   RESULT PAGE
   ============================================================ */
.result-header { text-align: center; padding: 24px 0 16px; }
.result-header .brand { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }

/* Brand Strength Hero */
.brand-hero {
  text-align: center; padding: 40px 24px; background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.result-greeting { font-size: 20px; margin-bottom: 4px; }
.result-subtitle { color: var(--text-muted); margin-bottom: 28px; }
.brand-score-badge {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--primary-light); border-radius: 16px; padding: 24px 40px; margin-bottom: 16px;
}
.brand-score-number { font-size: 56px; font-weight: 900; color: var(--primary); line-height: 1; }
.brand-score-label { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.brand-level-badge {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 6px 16px;
  border-radius: 20px; letter-spacing: 0.5px;
}
.level-1 { background: #f3f4f6; color: var(--level-1); }
.level-2 { background: #e0f2fe; color: var(--level-2); }
.level-3 { background: #e0f9ff; color: var(--level-3); }
.level-4 { background: #dcfce7; color: var(--level-4); }
.level-5 { background: #fef3c7; color: var(--level-5); }

/* Section Cards */
.section-card { background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px; }
.section-card h2 { font-size: 20px; margin-bottom: 16px; }
.section-card h3 { font-size: 17px; margin-bottom: 12px; }

/* Loop Scores */
.loop-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.loop-score-item { text-align: center; padding: 16px 12px; border-radius: 10px; }
.loop-score-item.ls-brand { background: var(--loop-brand-lt); }
.loop-score-item.ls-business { background: var(--loop-business-lt); }
.loop-score-item.ls-behaviour { background: var(--loop-behaviour-lt); }
.loop-score-name { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
.ls-brand .loop-score-name { color: var(--loop-brand); }
.ls-business .loop-score-name { color: var(--loop-business); }
.ls-behaviour .loop-score-name { color: var(--loop-behaviour); }
.loop-score-value { font-size: 32px; font-weight: 800; color: var(--text); }

/* Dimension Score Bars */
.dim-score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dim-score-label { font-size: 13px; font-weight: 600; width: 180px; flex-shrink: 0; }
.dim-score-bar-wrap { flex: 1; background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; }
.dim-score-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #3d6fa0); transition: width 0.5s; }
.dim-score-pct { font-size: 13px; font-weight: 600; color: var(--text-muted); width: 36px; text-align: right; }

/* Priority Cards */
.priority-cards { display: flex; flex-direction: column; gap: 16px; }
.priority-card { border-left: 4px solid var(--primary); background: var(--bg); border-radius: 0 8px 8px 0; padding: 16px 20px; }
.priority-card.p-brand    { border-left-color: var(--loop-brand); }
.priority-card.p-business { border-left-color: var(--loop-business); }
.priority-card.p-behaviour{ border-left-color: var(--loop-behaviour); }
.priority-card.p-cross    { border-left-color: var(--loop-cross); }
.priority-rank { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.priority-dim-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.priority-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.priority-aksi { list-style: none; margin-bottom: 10px; }
.priority-aksi li { font-size: 13px; padding: 4px 0; padding-left: 16px; position: relative; }
.priority-aksi li::before { content: '→'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.priority-ukur { font-size: 12px; color: var(--text-muted); background: white; border-radius: 4px; padding: 6px 10px; }

/* Alignment Block */
.alignment-block { background: var(--loop-cross-lt); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.alignment-score-row { display: flex; align-items: center; gap: 16px; }
.alignment-score-num { font-size: 40px; font-weight: 800; color: var(--loop-cross); }
.alignment-label { font-size: 15px; font-weight: 600; }
.alignment-category { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Sync Score */
.sync-block { text-align: center; padding: 24px; background: var(--primary-light); border-radius: 10px; margin-bottom: 16px; }
.sync-score-num { font-size: 48px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.sync-score-label { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.sync-label-badge { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; padding: 5px 14px; border-radius: 20px; background: var(--primary); color: white; }

/* CTA */
.cta-section { text-align: center; border: 2px solid var(--primary-light); }
.cta-section h3 { margin-bottom: 12px; }
.cta-section p { color: var(--text-muted); margin-bottom: 20px; }

.result-footer { text-align: center; padding: 24px 0 32px; color: var(--text-muted); font-size: 13px; }
.result-footer a { color: var(--primary); }

/* ============================================================
   ADMIN Reliability
   ============================================================ */
.admin-page { max-width: 900px; margin: 0 auto; padding: 32px 16px; }
.admin-header { border-bottom: 2px solid var(--border); padding-bottom: 16px; margin-bottom: 28px; }
.admin-section { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.admin-section h2 { font-size: 18px; margin-bottom: 16px; }
.reliability-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.reliability-table th { background: var(--bg); font-weight: 700; text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); }
.reliability-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.reliability-table tr:last-child td { border-bottom: none; }
.alpha-good { color: var(--level-4); font-weight: 700; }
.alpha-ok   { color: var(--level-2); font-weight: 700; }
.alpha-low  { color: var(--accent); font-weight: 700; }

/* ============================================================
   RESPONSIVE 600px
   ============================================================ */
@media (max-width: 600px) {
  /* Landing */
  .landing-header { padding: 32px 0 20px; }
  .landing-header h1 { font-size: 28px; }
  .tagline { font-size: 15px; }
  .audit-cards { grid-template-columns: 1fr; }
  .loop-badges { gap: 8px; }
  .loop-badge { min-width: 100px; padding: 12px 14px; }
  .loop-badge-letter { width: 32px; height: 32px; font-size: 14px; }
  .loop-connector { font-size: 16px; }
  .brand-loop-section { padding: 24px 18px; }

  /* Assessment form */
  #step-profile { padding: 20px 16px; }
  #step-profile h2 { font-size: 18px; }
  .radio-option { padding: 10px 12px; font-size: 14px; }

  /* Questions */
  .question-text { font-size: 15px; }
  .likert-scale { gap: 4px; }
  .likert-circle { width: 40px; height: 40px; font-size: 13px; }
  .likert-labels { font-size: 10px; }
  .qual-row { flex-direction: column; align-items: flex-start; }
  .qual-prefix { min-width: auto; }
  .qual-input { width: 100%; min-width: auto; }
  .nav-buttons { justify-content: stretch; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }

  /* Loading */
  .loading-box { padding: 40px 20px; }

  /* Result */
  .brand-score-badge { padding: 18px 24px; }
  .brand-score-number { font-size: 40px; }
  .loop-scores { grid-template-columns: 1fr; gap: 10px; }
  .dim-score-label { width: 120px; font-size: 12px; }
  .section-card { padding: 20px 16px; }
}

/* ============================================================
   RESPONSIVE 360px
   ============================================================ */
@media (max-width: 360px) {
  .container { padding: 16px 12px; }
  .landing-header h1 { font-size: 24px; }
  .brand-loop-section { padding: 16px 12px; }
  .likert-circle { width: 36px; height: 36px; font-size: 12px; }
  .audit-card { padding: 20px 16px; }
}
