/* FAO SADC Stakeholder Mapping + CRM Integration Prototype - Brider */
:root {
  --navy:        #0B2545;
  --navy-light:  #1B3A6B;
  --primary:     #1E4D8C;
  --accent:      #2E86AB;
  --teal:        #0D9488;
  --fao-blue:    #016A3A;
  --fao-deep:    #014F2C;
  --fao-light:   #4F9D69;
  --gold:        #FCD34D;
  --grey:        #6B7785;
  --light-grey:  #94A3B8;
  --soft-grey:   #F5F7FA;
  --softer:      #F9FAFB;
  --border:      #E2E8F0;
  --dark:        #1A202C;
  --white:       #FFFFFF;
  --warn:        #F59E0B;
  --bad:         #DC2626;
  --good:        #059669;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--soft-grey);
  color: var(--dark);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
::selection { background: rgba(1,106,58,0.18); }

/* ===== LOGIN SCREEN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--fao-deep) 65%, var(--fao-blue) 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 20% 10%, rgba(46,134,171,0.18), transparent 60%),
    radial-gradient(700px 350px at 80% 90%, rgba(79,157,105,0.20), transparent 60%);
  pointer-events: none;
}
.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 40px 48px 36px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.30);
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.login-brand .logo-mark {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--fao-blue) 100%);
  border-radius: 10px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 24px;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 16px rgba(11,37,69,0.25);
}
.login-brand .name { font-size: 18px; font-weight: 700; color: var(--navy); }
.login-brand .tagline { font-size: 11px; color: var(--grey); margin-top: 3px; }
.login-card h1 { font-size: 24px; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.3px; }
.login-card .subtitle { font-size: 13px; color: var(--grey); margin-bottom: 28px; line-height: 1.55; }
.persona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.persona {
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
}
.persona::after {
  content: '→';
  position: absolute; right: 14px; top: 14px;
  color: var(--light-grey); font-size: 14px;
  transition: all 0.18s;
}
.persona:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.10); }
.persona:hover::after { color: var(--accent); transform: translateX(2px); }
.persona.selected { border-color: var(--fao-blue); background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%); }
.persona.selected::after { color: var(--fao-blue); }
.persona .role { font-weight: 600; color: var(--navy); font-size: 13px; }
.persona .org { font-size: 11px; color: var(--grey); margin-top: 4px; }
.btn-primary {
  background: linear-gradient(135deg, var(--fao-blue) 0%, var(--fao-deep) 100%);
  color: white;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(1,106,58,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(1,106,58,0.35); }
.btn-primary:disabled { background: var(--light-grey); cursor: not-allowed; box-shadow: none; transform: none; }
.login-meta { text-align: center; font-size: 11px; color: var(--grey); margin-top: 18px; line-height: 1.6; }
.login-meta strong { color: var(--navy); }

/* ===== APP SHELL ===== */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #061B33 100%);
  color: white;
  padding: 22px 0 80px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,0.08);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.sidebar-brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}
.sidebar-brand .logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, white 0%, #E2E8F0 100%);
  color: var(--navy);
  border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 17px;
  margin-bottom: 8px;
}
.sidebar-brand .name { font-size: 14px; font-weight: 700; }
.sidebar-brand .ref { font-size: 10px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.nav-section { padding: 14px 20px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.9px; color: rgba(255,255,255,0.45); font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.85);
  border-left: 3px solid transparent;
  font-size: 13px;
  transition: all 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: white; text-decoration: none; }
.nav-link.active { background: rgba(255,255,255,0.10); border-left-color: var(--fao-light); color: white; font-weight: 500; }
.nav-link .badge {
  margin-left: auto;
  background: var(--fao-blue);
  color: white; font-size: 9px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px;
  letter-spacing: 0.4px;
}
.nav-link .badge.crm { background: var(--accent); }
.sidebar-foot {
  position: absolute; bottom: 16px; left: 20px; right: 20px;
  font-size: 11px; color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.sidebar-foot .persona-current { color: white; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.sidebar-foot .switch { color: var(--fao-light); font-size: 10px; cursor: pointer; margin-top: 4px; transition: color 0.15s; }
.sidebar-foot .switch:hover { color: white; }

/* ===== MAIN PANE ===== */
.main { padding: 28px 32px; overflow-x: hidden; max-width: 1480px; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px;
}
.topbar h1 { font-size: 24px; color: var(--navy); font-weight: 700; letter-spacing: -0.3px; }
.topbar .breadcrumb { font-size: 11px; color: var(--grey); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.topbar .actions { display: flex; gap: 8px; }
.btn-sm {
  background: white; border: 1px solid var(--border);
  color: var(--navy); font-size: 12px; font-weight: 500;
  padding: 7px 13px; border-radius: 6px; cursor: pointer;
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-sm:hover { background: var(--soft-grey); border-color: var(--accent); color: var(--accent); }
.btn-sm.fao { background: linear-gradient(135deg, var(--fao-blue) 0%, var(--fao-deep) 100%); color: white; border-color: var(--fao-blue); box-shadow: 0 2px 6px rgba(1,106,58,0.20); }
.btn-sm.fao:hover { background: var(--navy); border-color: var(--navy); color: white; box-shadow: 0 4px 10px rgba(11,37,69,0.25); }
.btn-sm.ghost { background: transparent; border-color: transparent; }

/* ===== HERO BLOCK (dashboard) ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #133961 50%, var(--fao-deep) 100%);
  color: white;
  border-radius: 14px;
  padding: 30px 36px 32px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(11,37,69,0.20);
}
.hero::before {
  content: '';
  position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,157,105,0.45) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; left: -80px; bottom: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,134,171,0.30) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.75); font-weight: 600; margin-bottom: 8px; }
.hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 10px; line-height: 1.2; }
.hero p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.88); max-width: 640px; }
.hero .stats {
  display: flex; gap: 32px; margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 18px;
}
.hero .stat .num { font-size: 24px; font-weight: 700; color: white; line-height: 1; }
.hero .stat .lbl { font-size: 11px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.7px; margin-top: 4px; }
.hero .pill {
  position: absolute; top: 26px; right: 32px; z-index: 3;
  background: rgba(252,211,77,0.20);
  color: var(--gold); border: 1px solid rgba(252,211,77,0.40);
  font-size: 10px; font-weight: 600;
  padding: 4px 11px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: 0.6px;
}

/* ===== KPI CARDS ===== */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px;
}
.kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  transition: all 0.18s;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--fao-blue) 0%, var(--fao-light) 100%);
}
.kpi.crm::before { background: linear-gradient(180deg, var(--accent) 0%, var(--teal) 100%); }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.kpi .label { font-size: 11px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.kpi .value { font-size: 28px; color: var(--navy); font-weight: 700; margin-top: 6px; letter-spacing: -0.5px; }
.kpi .delta { font-size: 11px; color: var(--good); margin-top: 4px; line-height: 1.4; }
.kpi .delta.bad { color: var(--bad); }
.kpi .delta.neutral { color: var(--grey); }

/* ===== CARDS / PANELS ===== */
.row { display: grid; gap: 16px; margin-bottom: 16px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.row.c12 { grid-template-columns: 1fr 2fr; }
.row.c21 { grid-template-columns: 2fr 1fr; }
.row.c13 { grid-template-columns: 1fr 3fr; }
.row.c31 { grid-template-columns: 3fr 1fr; }
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px 20px;
  transition: all 0.18s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.card h2 { font-size: 14px; color: var(--navy); margin-bottom: 4px; font-weight: 700; letter-spacing: -0.1px; }
.card .sub { font-size: 11.5px; color: var(--grey); margin-bottom: 14px; line-height: 1.5; }
.card .full { font-size: 12.5px; color: var(--dark); line-height: 1.55; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.tag {
  display: inline-block;
  background: var(--soft-grey);
  color: var(--navy);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 4px;
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.tag.fao { background: #E8F4ED; color: var(--fao-blue); }
.tag.crm { background: #E8F1F8; color: var(--accent); }
.tag.warn { background: #FEF3C7; color: #92400E; }
.tag.gold { background: #FEF9C3; color: #854D0E; }

/* ===== TABLES ===== */
table.data {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
table.data th {
  text-align: left; padding: 11px 14px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  font-weight: 600; font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase;
}
table.data td {
  padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
table.data tr:hover { background: var(--softer); }
table.data tr:last-child td { border-bottom: none; }
.status-pill {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 3px 9px; border-radius: 10px;
  letter-spacing: 0.3px;
}
.status-live { background: #DCFCE7; color: var(--good); }
.status-prog { background: #DBEAFE; color: #1E40AF; }
.status-plan { background: #FEF3C7; color: #92400E; }
.status-done { background: #E0E7FF; color: #3730A3; }
.status-block { background: #FEE2E2; color: var(--bad); }

/* ===== SADC MAP ===== */
.sadc-map { width: 100%; max-height: 80vh; height: auto; display: block; }
.sadc-country {
  cursor: pointer;
  transition: opacity 0.15s, filter 0.15s;
}
.sadc-country:hover { filter: brightness(1.1); }
.sadc-country.selected { stroke: #0B2545 !important; stroke-width: 3 !important; }

.map-card { padding: 0; overflow: hidden; }
.map-head {
  padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--softer);
}
.map-head .ttl { font-size: 14px; font-weight: 700; color: var(--navy); }
.map-head .meta { font-size: 11px; color: var(--grey); }
.map-canvas { background: linear-gradient(180deg, #F0F9FF 0%, #DBEAFE 100%); padding: 8px; }

/* ===== ARCH FLOW DIAGRAM ===== */
.arch-flow { background: #F8FAFC; padding: 22px; border-radius: 10px; }
.arch-svg { width: 100%; max-width: 1100px; display: block; margin: 0 auto; }
.flow-line {
  fill: none;
  stroke-dasharray: 6 4;
  animation: flowDash 1.6s linear infinite;
}
@keyframes flowDash {
  to { stroke-dashoffset: -20; }
}

/* ===== ER DIAGRAM ===== */
.er-canvas { background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%); padding: 16px; border-radius: 10px; }
.er-svg { width: 100%; display: block; }

/* ===== COPILOT CHAT ===== */
.copilot-shell {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column;
  height: 540px;
  overflow: hidden;
}
.copilot-head {
  background: linear-gradient(135deg, var(--navy) 0%, var(--primary) 100%);
  color: white;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
}
.copilot-head .avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: var(--navy); font-size: 14px;
}
.copilot-head .ttl { font-weight: 700; font-size: 13px; }
.copilot-head .ttl small { display: block; font-weight: 400; font-size: 10.5px; color: rgba(255,255,255,0.75); margin-top: 2px; }
.copilot-msgs {
  flex: 1; overflow-y: auto; padding: 18px;
  background: var(--softer);
}
.msg { margin-bottom: 14px; max-width: 84%; }
.msg.user { margin-left: auto; }
.msg .bubble {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px; line-height: 1.55;
  background: white; border: 1px solid var(--border);
  color: var(--dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.msg.user .bubble {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: white; border: none;
  border-bottom-right-radius: 4px;
}
.msg.bot .bubble { border-bottom-left-radius: 4px; }
.msg .meta { font-size: 10.5px; color: var(--grey); margin-top: 4px; }
.msg.bot .meta::before { content: '✦ '; color: var(--gold); }
.copilot-input {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  display: flex; gap: 8px;
}
.copilot-input input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.copilot-input input:focus { border-color: var(--accent); }
.copilot-input button {
  background: linear-gradient(135deg, var(--fao-blue) 0%, var(--fao-deep) 100%);
  color: white; border: none; padding: 10px 18px;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.suggested-q {
  display: inline-block; background: white; border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 16px; font-size: 11px; color: var(--navy);
  margin: 4px 4px 4px 0; cursor: pointer; transition: all 0.15s;
}
.suggested-q:hover { border-color: var(--fao-blue); color: var(--fao-blue); background: var(--softer); }
.typing-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--grey); margin: 0 1px;
  animation: typing 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ===== ALERT FEED ===== */
.alert-feed { display: grid; gap: 8px; }
.alert {
  border-left: 3px solid var(--fao-blue);
  padding: 10px 14px;
  background: var(--softer);
  border-radius: 5px;
}
.alert.high { border-left-color: var(--bad); background: #FEF2F2; }
.alert.med  { border-left-color: var(--warn); background: #FFFBEB; }
.alert .ttl { font-weight: 600; font-size: 12.5px; color: var(--navy); }
.alert .body { font-size: 11.5px; color: var(--grey); margin-top: 3px; line-height: 1.55; }
.alert .meta { font-size: 10px; color: var(--grey); margin-top: 5px; opacity: 0.85; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(180deg, var(--fao-blue) 0%, var(--fao-light) 50%, var(--border) 100%);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--fao-blue); border: 3px solid white;
  box-shadow: 0 0 0 1px var(--fao-blue);
}
.tl-item.done::before { background: var(--good); box-shadow: 0 0 0 1px var(--good); }
.tl-item.prog::before { background: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.tl-item.plan::before { background: var(--grey); box-shadow: 0 0 0 1px var(--grey); }
.tl-item .when { font-size: 10px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.tl-item .title { font-size: 13px; font-weight: 700; color: var(--navy); margin-top: 2px; }
.tl-item .body { font-size: 11.5px; color: var(--dark); margin-top: 4px; line-height: 1.55; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11,37,69,0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
.modal-overlay.show { display: flex; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: white;
  border-radius: 14px;
  max-width: 720px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.30);
  animation: slideUp 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.modal-head h2 { font-size: 18px; color: var(--navy); font-weight: 700; }
.modal-head .meta { font-size: 11.5px; color: var(--grey); margin-top: 4px; }
.modal-close {
  background: var(--soft-grey); border: none; border-radius: 6px;
  width: 28px; height: 28px;
  cursor: pointer; font-size: 14px; color: var(--grey);
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bad); color: white; }
.modal-body { padding: 22px 26px 26px; }

/* ===== FORM BITS ===== */
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 10.5px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 9px 11px; font-size: 13px; color: var(--dark); font-family: inherit;
  background: white;
  transition: all 0.15s;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,134,171,0.15);
}
.field .value-text { font-size: 13.5px; color: var(--dark); padding: 4px 0; }

/* ===== CHARTS ===== */
.chart-svg { width: 100%; height: auto; display: block; }

/* ===== UTIL ===== */
.muted { color: var(--grey); font-size: 11px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.center { text-align: center; }
.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.fao-watermark { position: fixed; bottom: 14px; right: 22px; font-size: 10px; color: var(--grey); z-index: 99; background: rgba(255,255,255,0.85); padding: 4px 10px; border-radius: 12px; backdrop-filter: blur(4px); }
.fao-watermark a { color: var(--accent); }

/* ===== LANGUAGE SWITCH (sidebar variant — dark background) ===== */
.lang-switch { display: flex; gap: 4px; padding: 0 20px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 12px; }
.lang-btn {
  flex: 1; background: transparent; border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.75); font-size: 10px; font-weight: 600;
  padding: 5px 0; border-radius: 4px; cursor: pointer;
  transition: all 0.15s; letter-spacing: 0.5px;
}
.lang-btn:hover { background: rgba(255,255,255,0.08); color: white; border-color: rgba(255,255,255,0.35); }
.lang-btn.active { background: var(--fao-blue); border-color: var(--fao-blue); color: white; }

/* ===== LANGUAGE SWITCH (light variant — for login card and other light surfaces) ===== */
.login-card .lang-btn,
.lang-switch.light .lang-btn {
  background: var(--soft-grey);
  border: 1px solid var(--border);
  color: var(--navy);
}
.login-card .lang-btn:hover,
.lang-switch.light .lang-btn:hover {
  background: white; border-color: var(--accent); color: var(--accent);
}
.login-card .lang-btn.active,
.lang-switch.light .lang-btn.active {
  background: var(--fao-blue); border-color: var(--fao-blue); color: white;
}

/* ===== PERSONA BANNER (read-only restriction) ===== */
.persona-banner {
  background: linear-gradient(90deg, #FEF9C3 0%, #FEF3C7 100%);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 18px;
  font-size: 12.5px; color: #854D0E;
  display: flex; gap: 10px; align-items: center;
}
.persona-banner .icon { font-weight: 700; font-size: 14px; }
.persona-banner.full { background: linear-gradient(90deg, #ECFDF5 0%, #D1FAE5 100%); border-color: var(--fao-light); color: var(--fao-deep); }
.muted-chip { display: inline-block; background: rgba(252,211,77,0.20); color: var(--gold); font-size: 9.5px; padding: 3px 8px; border-radius: 4px; margin-top: 6px; }

/* ===== STAKEHOLDER PINS ON MAP ===== */
.stk-pin { fill: #DC2626; stroke: white; stroke-width: 1.5; cursor: pointer; transition: all 0.15s; }
.stk-pin.female { fill: #DB2777; }
.stk-pin.baseline { fill: #FCD34D; stroke: #92400E; }
.stk-pin:hover { transform: scale(1.4); }

/* ===== NETWORK / RELATIONSHIP VIEW ===== */
.network-svg { width: 100%; height: auto; min-height: 600px; background: #FAFBFC; border-radius: 8px; }
.net-node { cursor: pointer; transition: all 0.15s; }
.net-node:hover { filter: brightness(1.15); }
.net-node circle { stroke: white; stroke-width: 2; }
.net-edge { stroke-opacity: 0.45; transition: stroke-opacity 0.15s; }
.net-edge:hover { stroke-opacity: 1; stroke-width: 2.5; }

/* ===== VALIDATION QUEUE ===== */
.queue-item {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 8px;
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
}
.queue-item .qkind { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; margin-bottom: 6px; }
.queue-item .qkind.new-profile { background: #DBEAFE; color: #1E40AF; }
.queue-item .qkind.profile-update { background: #FEF3C7; color: #92400E; }
.queue-item .qkind.survey-response { background: #DCFCE7; color: var(--good); }
.queue-item .qttl { font-weight: 700; color: var(--navy); font-size: 13px; margin-bottom: 4px; }
.queue-item .qmeta { font-size: 11px; color: var(--grey); }
.queue-item .qbody { font-size: 12px; color: var(--dark); margin-top: 6px; }
.queue-actions { display: flex; gap: 6px; }
.queue-actions button { padding: 7px 13px; border-radius: 5px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid; transition: all 0.15s; }
.queue-actions .approve { background: var(--fao-blue); color: white; border-color: var(--fao-blue); }
.queue-actions .approve:hover { background: var(--fao-deep); }
.queue-actions .reject { background: white; color: var(--bad); border-color: var(--bad); }
.queue-actions .reject:hover { background: #FEF2F2; }

/* ===== SCORING BREAKDOWN ===== */
.score-breakdown { display: flex; gap: 12px; margin-top: 10px; }
.score-dim { flex: 1; background: var(--softer); border-radius: 6px; padding: 8px 10px; }
.score-dim .lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--grey); font-weight: 600; }
.score-dim .val { font-size: 18px; font-weight: 700; color: var(--navy); margin-top: 2px; }
.score-dim .bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.score-dim .bar-fill { height: 100%; background: linear-gradient(90deg, var(--fao-blue), var(--fao-light)); }

/* ===== DATA-FLOW BOX (CRM page) ===== */
.flow-grid {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  align-items: center; gap: 12px;
  padding: 14px 0;
}
.flow-node {
  background: white; border: 2px solid var(--border); border-radius: 10px;
  padding: 14px 16px; text-align: center;
}
.flow-node.sm  { border-color: var(--fao-blue);  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%); }
.flow-node.crm { border-color: var(--accent);    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); }
.flow-node.ai  { border-color: var(--gold);      background: linear-gradient(135deg, #FEF9C3 0%, #FEF3C7 100%); }
.flow-node .lbl { font-size: 10px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.flow-node .ttl { font-size: 12.5px; color: var(--navy); font-weight: 700; margin-top: 4px; }
.flow-node .meta { font-size: 10.5px; color: var(--grey); margin-top: 3px; }
.flow-arrow {
  text-align: center;
  font-size: 22px; color: var(--accent);
  position: relative;
}
.flow-arrow::after {
  content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  z-index: -1;
}
.flow-arrow .lbl {
  font-size: 10px; color: var(--accent); display: block; margin-top: -4px;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
