/* Ngingetken v4 - Style Sheet */

:root {
  --primary: #0f2d52;
  --primary-light: #1a4a7a;
  --gold: #f5b700;
  --gold-hover: #d4a017;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(15,45,82,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--primary);
  color: #fff;
  padding: 24px 16px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.brand-mark {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  flex: 0 0 auto;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-title { font-weight: 700; font-size: 16px; }
.brand-subtitle { font-size: 11px; opacity: 0.7; }

.nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 4px;
  transition: 0.2s;
}
.nav a:hover, .nav a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.main {
  flex: 1;
  margin-left: 260px;
  padding: 28px 32px;
  max-width: calc(100vw - 260px);
}

.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); font-weight: 600; margin-bottom: 6px;
}
h1 { font-size: 26px; font-weight: 700; color: var(--primary); }
.lead { color: var(--text-muted); font-size: 15px; margin-top: 6px; }

.app-logo {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  box-shadow: 0 12px 30px rgba(15,45,82,0.16);
}
.app-logo.small {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-gold { background: var(--gold); color: var(--primary); }
.btn-gold:hover { background: var(--gold-hover); }

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid; gap: 16px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { width: 100%; position: relative; height: auto; }
  .main { margin-left: 0; max-width: 100%; padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .app-shell { flex-direction: column; }
}

.stat-card {
  text-align: center;
}
.stat-label {
  font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px;
}
.stat-value {
  font-size: 32px; font-weight: 800; color: var(--primary); margin: 8px 0;
}
.stat-note {
  font-size: 12px; color: var(--text-muted);
}

.progress {
  height: 8px; background: var(--border); border-radius: 999px;
  overflow: hidden; margin-top: 10px;
}
.progress span {
  display: block; height: 100%; background: var(--gold); border-radius: 999px;
  transition: width 0.6s ease;
}

.progress-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--value), var(--border) 0);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--primary);
  margin: 16px auto;
  position: relative;
}
.progress-ring::before {
  content: ''; position: absolute;
  width: 90px; height: 90px; background: #fff; border-radius: 50%;
}
.progress-ring::after {
  content: attr(data-value); position: relative; z-index: 1;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
th, td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); font-weight: 600; background: #f8fafc;
}
tr:hover td { background: #f8fafc; }
.empty { text-align: center; color: var(--text-muted); padding: 40px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge.success { background: #d1fae5; color: #065f46; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.medium { background: #dbeafe; color: #1e40af; }
.badge.muted { background: #f1f5f9; color: #475569; }

.input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  outline: none; transition: 0.2s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,45,82,0.08); }

select.input { appearance: auto; }

.form-section { display: none; }
.form-section.active { display: block; }

.stepper {
  display: flex; gap: 8px; margin: 20px 0;
}
.step {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--border); color: var(--text-muted);
  font-size: 13px; font-weight: 600;
}
.step.active { background: var(--primary); color: #fff; }
.step-number {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.2); display: flex;
  align-items: center; justify-content: center; font-size: 12px;
}

.question-card {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.radio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.radio-option {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 14px;
}
.radio-option:hover { background: #f8fafc; }
.radio-option input { accent-color: var(--primary); }

.alert {
  padding: 14px 16px; border-radius: 12px; font-size: 14px;
}
.alert.info { background: #eff6ff; border-left: 4px solid var(--info); }
.alert.warning { background: #fffbeb; border-left: 4px solid var(--warning); }
.alert.danger { background: #fef2f2; border-left: 4px solid var(--danger); }

.hero {
  max-width: 980px; margin: 40px auto; padding: 0 20px;
}
.hero-card {
  text-align: center; padding: 40px 32px;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; margin-top: 24px;
  flex-wrap: wrap;
}

.public-page {
  max-width: 900px; margin: 30px auto; padding: 0 20px;
}

.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
}

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.kanban {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.kanban-col { background: var(--bg); border-radius: var(--radius); padding: 16px; }
.kanban-col h3 { font-size: 14px; margin-bottom: 12px; color: var(--text-muted); }
.kanban-item {
  background: #fff; padding: 14px; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-bottom: 10px;
}

.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item {
  position: relative; padding: 14px; background: #f8fafc;
  border-radius: 10px; margin-bottom: 12px;
}
.timeline-item::before {
  content: ''; position: absolute; left: -22px; top: 18px;
  width: 10px; height: 10px; background: var(--primary); border-radius: 50%;
}

.mini-card {
  background: #f8fafc; border-radius: 10px; padding: 14px; text-align: center;
}
.risk-low { color: var(--success); }
.risk-medium { color: var(--warning); }
.risk-high { color: var(--danger); }

.copy-statement {
  background: #f8fafc; border: 1px dashed #94a3b8;
  padding: 14px; border-radius: 14px; font-weight: 600;
  line-height: 1.6; margin-bottom: 12px;
}

.privacy-note {
  font-size: 12px; color: var(--text-muted); background: #f8fafc;
  border-radius: 12px; padding: 10px; margin-top: 10px;
}

.history-box { display: none; margin-top: 12px; }
.history-box.show { display: block; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 5px 10px;
  background: #eef2ff; color: #3730a3;
  font-size: 12px; font-weight: 700;
}

.question-number {
  display: inline-flex; width: 28px; height: 28px;
  border-radius: 999px; background: var(--primary); color: #fff;
  align-items: center; justify-content: center;
  font-size: 12px; margin-right: 8px;
}

.small-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--primary); color: #fff;
  padding: 14px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); z-index: 300;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.table-actions { display: flex; gap: 6px; }

.empty-state {
  text-align: center; padding: 40px; color: var(--text-muted);
}

.report-section { margin-top: 16px; }
.report-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.report-filters > * {
  max-width: 210px;
}
.bar-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.bar-row {
  display: grid;
  gap: 8px;
}
.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}
.bar-meta span {
  color: var(--text-muted);
  text-align: right;
}
.bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}
.metric-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}
.metric-row strong {
  text-align: right;
  color: var(--primary);
}
.mini-metric {
  display: inline-flex;
  margin: 2px 6px 2px 0;
  color: var(--text-muted);
}
.idea-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.idea-list.wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.idea-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}
.idea-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.idea-item span,
.idea-item small {
  color: var(--text-muted);
  font-size: 12px;
}
.idea-item p {
  font-size: 14px;
  color: var(--text);
}

@media (max-width: 768px) {
  .report-filters > * { max-width: none; }
  .bar-meta,
  .metric-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .bar-meta span,
  .metric-row strong {
    text-align: left;
  }
}
