/* ============================================================
   STYLE.CSS
   Dipakai halaman login / register / dashboard / kuesioner /
   hasil / admin. Palet & bahasa desain disamakan dengan
   home.css (landing page) supaya seluruh aplikasi terasa satu
   kesatuan: hijau kampus sebagai warna utama, biru matematika
   sebagai aksen sekunder, tipografi Plus Jakarta Sans.
   ============================================================ */

:root {
  --primary: #0e6b3a;          /* = --uni-green di home.css */
  --primary-dark: #094d29;     /* = --uni-green-dark */
  --primary-light: #16a34a;
  --accent-blue: #1e3a8a;
  --accent-blue-light: #2563eb;
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #14181f;
  --muted: #5b6472;
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --border: #e6ebf2;
  --ring: rgba(14, 107, 58, 0.14);
}

* { box-sizing: border-box; }

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

/* ---------- NAVBAR ---------- */
.navbar {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 65%, #0d7a44);
  color: #fff;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 2px 18px rgba(9, 77, 41, 0.22);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color .2s ease;
}
.navbar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.navbar .brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -.2px;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 960px;
  margin: 28px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

h1, h2, h3 { color: var(--text); font-weight: 800; letter-spacing: -.3px; }
h2 { position: relative; padding-bottom: 10px; margin-top: 0; }
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.hero {
  text-align: center;
  padding: 60px 20px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: .96rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(14, 107, 58, 0.32);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(14, 107, 58, 0.4); color: #fff; }
.btn-secondary { background: #64748b; box-shadow: 0 8px 20px rgba(100,116,139,0.28); }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: var(--danger); box-shadow: 0 8px 20px rgba(220,38,38,0.28); }
.btn-danger:hover { background: #b91c1c; }

/* ---------- TABLES ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
th { background: var(--ring); color: var(--primary-dark); font-weight: 700; }
tr:hover td { background: #fafcff; }

/* ---------- BADGES / ALERTS ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
.badge-ok { background: var(--success); }
.badge-warn { background: var(--warn); }
.badge-danger { background: var(--danger); }

.alert {
  padding: 13px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: .93rem;
  border: 1px solid transparent;
}
.alert-success { background: #dcfce7; color: #14532d; border-color: #bbf7d0; }
.alert-error { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; }

/* ---------- SCORE BARS ---------- */
.bar-row { margin-bottom: 12px; }
.bar-row > div:first-child { font-weight: 600; margin-bottom: 4px; }
.bar-bg {
  background: #e9edf5;
  border-radius: 8px;
  overflow: hidden;
  height: 24px;
}
.bar-fill {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  height: 100%;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding-left: 10px;
  white-space: nowrap;
  border-radius: 8px;
}

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 5px; font-weight: 700; font-size: .93rem; color: var(--text); }
input[type=text], input[type=password], select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 1rem;
  font-family: inherit;
  background: #fbfcfe;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input[type=text]:focus, input[type=password]:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}
.likert { display: flex; gap: 10px; flex-wrap: wrap; }
.likert label { font-weight: 400; display: flex; align-items: center; gap: 4px; }
.pairwise-scale { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 0.92rem; }
.section-title {
  border-bottom: 2px solid var(--ring);
  padding-bottom: 8px;
  margin-top: 32px;
  color: var(--primary-dark);
}
.matrix-mini-table td, .matrix-mini-table th { text-align: center; }

/* ---------- AI NARRATIVE CARD ---------- */
.card.ai-narrative {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 70%, #0d7a44);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}
.card.ai-narrative::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -90px;
  right: -70px;
}
.card.ai-narrative h3 { color: #fff; }
.card.ai-narrative h3::after { background: rgba(255,255,255,0.7); }
.card.ai-narrative p { color: rgba(255,255,255,0.92); position: relative; z-index: 1; }
.ai-narrative-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.btn-regen {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  margin-bottom: 14px;
}
.btn-regen:hover { background: rgba(255,255,255,0.26); transform: translateY(-1px); }
.btn-regen:disabled { opacity: .6; cursor: default; transform: none; }

/* ---------- CHAT KONSULTASI ---------- */
.chat-card h3 { margin-bottom: 4px; }

.chat-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.chat-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-msg-ai {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}
.chat-input-row input[type=text] {
  flex: 1;
}
.chat-note { margin-top: 8px; margin-bottom: 0; min-height: 1.2em; }

footer { text-align: center; padding: 24px; color: var(--muted); font-size: 0.85rem; }

.certificate-box{border:1px solid #d8dee9;border-radius:8px;margin:12px 0;padding:12px;background:#fbfcfe}.certificate-box legend{font-weight:700;padding:0 6px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.form-grid input,.form-grid select{width:100%;padding:9px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:6px;background:#fff}
