/* BNI DnA Portal - Global Styles */
:root {
  --bni-red: #CF2030;
  --bni-red-dark: #A61828;
  --bni-red-light: #F5E6E8;
  --sterling-light-grey: #F2F2F2;
  --sterling-grey: #C8C8C8;
  --power-black: #000000;
  --granite-grey: #64666A;
  --true-white: #FFFFFF;
  --sidebar-width: 220px;
  --sidebar-collapsed: 56px;
  --topbar-height: 60px;
  --bottomnav-height: 64px;
  --transition: 0.2s ease;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ─── Chapter Meeting Reviews ─────────────────────────────────────────── */
.mr-page{padding:16px;max-width:1180px;margin:0 auto}.mr-page-header,.mr-form-title,.mr-detail-title,.mr-detail-actions{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.mr-page-header h1,.mr-form-title h1,.mr-detail-title h1{margin:0;font-size:24px;line-height:1.2}.mr-page-header p,.mr-form-title p,.mr-detail-title p{margin:5px 0 0;color:#64748b}.mr-overview-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}.mr-stat{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px}.mr-stat span{display:block;color:#64748b;font-size:12px;font-weight:650}.mr-stat strong{display:block;margin-top:6px;font-size:25px;color:#111827}.mr-stat small{font-size:12px;color:#64748b;margin-left:2px}.mr-filters{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:8px;margin:0 0 16px}.mr-filters select,.mr-meta-grid select,.mr-meta-grid input,.mr-item-inputs select,.mr-item-inputs textarea,.mr-summary-grid textarea,.mr-metrics-grid select,.mr-metrics-grid input{width:100%;box-sizing:border-box;border:1.5px solid #d9dee7;border-radius:9px;background:#fff;color:#111827;font:inherit;padding:10px 11px}.mr-list-card,.mr-form-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden}.mr-list-head,.mr-list-row{display:grid;grid-template-columns:minmax(240px,2fr) minmax(150px,1fr) 130px 110px;gap:12px;align-items:center}.mr-list-head{padding:9px 14px;background:#f8fafc;color:#64748b;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.4px}.mr-list-row{width:100%;border:0;border-top:1px solid #eef2f7;background:#fff;padding:13px 14px;text-align:left;cursor:pointer;color:#334155}.mr-list-row:hover{background:#fffafb}.mr-list-main strong,.mr-list-main small{display:block}.mr-list-main strong{color:#111827}.mr-list-main small{margin-top:4px;color:#64748b}.mr-stars{color:#d99a00;white-space:nowrap;letter-spacing:1px}.mr-record-status,.mr-answer-status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:750;white-space:nowrap}.mr-record-status.draft{background:#fef3c7;color:#92400e}.mr-record-status.submitted{background:#dcfce7;color:#166534}.mr-form-card{padding:20px;overflow:visible}.mr-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.mr-meta-grid label>span,.mr-summary-grid label>span,.mr-metrics-grid label>span{display:block;font-size:12px;font-weight:700;color:#475569;margin-bottom:6px}.mr-form-note{margin:14px 0;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:9px;padding:10px 12px;font-size:12px}.mr-form-section{margin-top:18px;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}.mr-form-section>h2{margin:0;padding:11px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:15px;color:#111827}.mr-review-item{display:grid;grid-template-columns:minmax(260px,1fr) minmax(360px,1.35fr);gap:16px;padding:13px 14px;border-top:1px solid #eef2f7}.mr-review-item:first-of-type{border-top:0}.mr-item-copy{display:flex;gap:10px;align-items:flex-start}.mr-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:#fef2f2;color:#b91c1c;font-size:12px;font-weight:800}.mr-item-copy strong{display:block;font-size:13px;color:#1f2937}.mr-item-copy small{display:block;margin-top:3px;font-size:11px;line-height:1.35;color:#64748b}.mr-item-inputs{display:grid;grid-template-columns:160px 1fr;gap:8px}.mr-item-inputs textarea,.mr-summary-grid textarea{resize:vertical;line-height:1.4}.mr-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px}.mr-summary-grid .mr-full{grid-column:1/-1}.mr-metrics-grid{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:10px;padding:0 14px 14px}.mr-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.mr-submit-help{text-align:right;color:#64748b;font-size:11px;margin:7px 0 0}.mr-detail-actions{align-items:center;margin-bottom:12px}.mr-detail-actions>div{display:flex;gap:8px;flex-wrap:wrap}.mr-print-brand{font-size:11px;font-weight:800;letter-spacing:1px;color:#cf2030;margin-bottom:5px}.mr-detail-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px}.mr-detail-meta>div,.mr-detail-metrics>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;padding:10px 12px}.mr-detail-meta span,.mr-detail-summary span,.mr-detail-metrics span{display:block;color:#64748b;font-size:11px;font-weight:700;margin-bottom:4px}.mr-detail-answer{padding:11px 14px;border-top:1px solid #eef2f7}.mr-detail-answer:first-of-type{border-top:0}.mr-detail-answer>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mr-detail-answer strong{font-size:13px}.mr-detail-answer p{margin:7px 0 0 34px;font-size:13px;line-height:1.5;color:#475569}.mr-answer-status{margin-left:auto}.mr-answer-status.mr-good{background:#dcfce7;color:#166534}.mr-answer-status.mr-improve{background:#fef3c7;color:#92400e}.mr-answer-status.mr-concern{background:#fee2e2;color:#991b1b}.mr-answer-status.mr-na{background:#e2e8f0;color:#475569}.mr-detail-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:14px}.mr-detail-summary>div{border:1px solid #e2e8f0;border-radius:9px;padding:11px}.mr-detail-summary p{margin:0;font-size:13px;line-height:1.5;color:#334155}.mr-detail-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:0 14px 14px}.mr-detail-metrics strong{font-size:19px}

@media(max-width:900px){.mr-overview-grid{grid-template-columns:repeat(3,1fr)}.mr-filters{grid-template-columns:repeat(2,1fr)}.mr-meta-grid{grid-template-columns:repeat(2,1fr)}.mr-review-item{grid-template-columns:1fr}.mr-list-head{display:none}.mr-list-row{grid-template-columns:1fr auto}.mr-list-row>span:nth-child(2){grid-column:1/2;font-size:12px}.mr-list-row>span:nth-child(3),.mr-list-row>span:nth-child(4){grid-column:2/3}.mr-item-inputs{grid-template-columns:150px 1fr}.mr-metrics-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.mr-page{padding:12px}.mr-page-header h1,.mr-form-title h1,.mr-detail-title h1{font-size:21px}.mr-overview-grid{grid-template-columns:repeat(2,1fr)}.mr-filters,.mr-meta-grid,.mr-summary-grid,.mr-detail-meta,.mr-detail-summary,.mr-detail-metrics{grid-template-columns:1fr}.mr-filters select{min-height:44px}.mr-form-card{padding:14px}.mr-review-item{padding:12px}.mr-item-inputs{grid-template-columns:1fr}.mr-item-inputs select,.mr-item-inputs textarea{min-height:44px}.mr-metrics-grid{grid-template-columns:repeat(2,1fr)}.mr-list-row{display:flex;flex-direction:column;align-items:flex-start;gap:7px}.mr-list-row>span{width:100%}.mr-form-actions{position:sticky;bottom:72px;background:#fff;border-top:1px solid #e2e8f0;margin:18px -14px -14px;padding:10px 14px;z-index:3}.mr-form-actions .btn{flex:1}.mr-submit-help{padding-top:8px;text-align:center}.mr-answer-status{margin-left:34px}.mr-detail-answer p{margin-left:0}}

@media print{.mr-page{max-width:none;padding:0}.mr-detail-card{border:0;padding:0}.mr-form-section{break-inside:avoid}.mr-detail-answer{break-inside:avoid}.mr-answer-status{border:1px solid #94a3b8!important;background:#fff!important;color:#111!important}.mr-detail-title{border-bottom:2px solid #cf2030;padding-bottom:10px}.mr-detail-meta>div,.mr-detail-metrics>div{background:#fff}.no-print,.sidebar,.topbar,.bottom-nav{display:none!important}.main-content{margin:0!important}}

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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--sterling-light-grey);
  color: var(--power-black);
  min-height: 100vh;
  line-height: 1.5;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--sterling-light-grey); }
::-webkit-scrollbar-thumb { background: var(--sterling-grey); border-radius: 3px; }

/* ─── Typography ─── */
h1,h2,h3,h4,h5,h6 { font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 700; color: var(--power-black); }
p, span, div, td, th, label, input, textarea, select, button { font-family: 'Helvetica Neue', Arial, sans-serif; }

/* ─── Layout ─── */
html, body { height: 100%; margin: 0; padding: 0; }
#app { display: flex; min-height: 100vh; flex-direction: column; flex: 1; }

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--true-white);
  border-right: 1px solid var(--sterling-grey);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-logo {
  padding: 16px;
  border-bottom: 1px solid var(--sterling-grey);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--topbar-height);
}
.sidebar-logo img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.sidebar-logo-text { font-size: 13px; font-weight: 700; color: var(--bni-red); white-space: nowrap; overflow: hidden; }
.sidebar-logo-sub { font-size: 10px; color: var(--granite-grey); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--granite-grey);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.collapsed .nav-section-label { opacity: 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 6px;
  margin: 1px 8px;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--granite-grey);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: var(--sterling-light-grey); color: var(--power-black); }
.nav-item.active { background: var(--bni-red-light); color: var(--bni-red); font-weight: 600; }
.nav-item .nav-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.nav-item .nav-label { transition: opacity var(--transition); }
.sidebar.collapsed .nav-label { opacity: 0; width: 0; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--sterling-grey); }
.sidebar-toggle {
  width: 100%;
  padding: 8px;
  background: none;
  border: 1px solid var(--sterling-grey);
  border-radius: 6px;
  cursor: pointer;
  color: var(--granite-grey);
  font-size: 16px;
  transition: all var(--transition);
}
.sidebar-toggle:hover { background: var(--sterling-light-grey); }
.notification-badge {
  background: var(--bni-red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-content.sidebar-collapsed { margin-left: var(--sidebar-collapsed); }

/* ─── Topbar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--true-white);
  border-bottom: 1px solid var(--sterling-grey);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}
.topbar-title { font-size: 18px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.btn-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--sterling-grey);
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--granite-grey);
  font-size: 18px;
  position: relative;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--sterling-light-grey); color: var(--power-black); }
.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bni-red);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Page Content ─── */
.page-content { flex: 1; padding: 24px; max-width: 1400px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; }
.page-header p { color: var(--granite-grey); font-size: 14px; margin-top: 4px; }

/* ─── Cards ─── */
.card {
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 10px;
  padding: 20px;
}
.card-sm { padding: 16px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-subtitle { font-size: 12px; color: var(--granite-grey); }

/* ─── Stat Cards ─── */
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-card-value { font-size: 28px; font-weight: 800; }
.stat-card-label { font-size: 13px; color: var(--granite-grey); }
.stat-card-change { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.stat-card-change.up { color: #059669; }
.stat-card-change.down { color: var(--bni-red); }

/* Compact stat grid + section headers (dashboard tiles grouped by time period) */
.stat-section-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: #6b7280; letter-spacing: .6px;
  margin: 20px 0 8px; padding: 4px 2px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid #f1f5f9;
}
.stat-section-header:first-of-type { margin-top: 0; }
.stat-grid.compact { grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 0; }
.stat-grid.compact .stat-card { padding: 12px 14px; gap: 4px; }
.stat-grid.compact .stat-card-icon { width: 30px; height: 30px; font-size: 15px; border-radius: 6px; }
.stat-grid.compact .stat-card-value { font-size: 20px; }
.stat-grid.compact .stat-card-label { font-size: 11px; }
.stat-grid.compact .stat-card-change { font-size: 10px; }
@media (max-width: 1300px) {
  .stat-grid.compact { grid-template-columns: repeat(5, 1fr); gap: 10px; }
}
@media (max-width: 1100px) {
  .stat-grid.compact { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .stat-grid.compact { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  .stat-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.compact .stat-card { padding: 10px; }
  .stat-grid.compact .stat-card-value { font-size: 18px; }
}

/* ─── Grids ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ─── Buttons ─── */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition);
  text-decoration: none;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.btn-primary { background: var(--bni-red); color: white; }
.btn-primary:hover { background: var(--bni-red-dark); }
.btn-secondary { background: var(--sterling-light-grey); color: var(--power-black); border: 1px solid var(--sterling-grey); }
.btn-secondary:hover { background: var(--sterling-grey); }
.btn-success { background: #16a34a; color: #fff; border: 1px solid #15803d; }
.btn-success:hover { background: #15803d; }
.btn-danger  { background: #dc2626; color: #fff; border: 1px solid #b91c1c; }
.btn-danger:hover  { background: #b91c1c; }
.btn-ghost { background: none; color: var(--granite-grey); border: 1px solid var(--sterling-grey); }
.btn-ghost:hover { background: var(--sterling-light-grey); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; }

/* ─── Traffic Light / Score Chips ─── */
.tl-green { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.tl-amber { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.tl-red { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.tl-grey { background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; }
.tl-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tl-blue { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.score-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.score-badge {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.score-badge.green { background: #10b981; }
.score-badge.amber { background: #f59e0b; }
.score-badge.red { background: #ef4444; }
.score-badge.grey { background: #9ca3af; }

/* ─── Chapter Card ─── */
.chapter-card {
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  border-left-width: 4px;
}
.chapter-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.chapter-card.border-green { border-left-color: #10b981; }
.chapter-card.border-amber { border-left-color: #f59e0b; }
.chapter-card.border-red { border-left-color: #ef4444; }
.chapter-card.border-grey { border-left-color: #9ca3af; }
.chapter-name {
  font-size: 14px; font-weight: 800;
  color: var(--granite-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chapter-score { font-size: 28px; font-weight: 800; }

/* ─── Tables ─── */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--granite-grey);
  background: var(--sterling-light-grey);
  border-bottom: 1px solid var(--sterling-grey);
  white-space: nowrap;
}
td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
tr:hover td { background: #fafafa; }
tr:last-child td { border-bottom: none; }
.tr-highlight td { background: #fff5f5; }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--sterling-grey);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--true-white);
  color: var(--power-black);
  transition: border-color var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bni-red);
  box-shadow: 0 0 0 3px rgba(207,32,48,0.1);
}
textarea { resize: vertical; min-height: 80px; }
.input-hint { font-size: 12px; color: var(--granite-grey); margin-top: 4px; }

/* ─── Tabs ─── */
.tabs { display: flex; border-bottom: 2px solid var(--sterling-grey); margin-bottom: 20px; gap: 0; overflow-x: auto; }
.tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--granite-grey);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab:hover { color: var(--power-black); }
.tab.active { color: var(--bni-red); border-bottom-color: var(--bni-red); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--true-white);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1100px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--sterling-grey);
  background: none;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--granite-grey);
}

/* ─── Notifications Panel ─── */
.notif-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px;
  background: var(--true-white);
  border-left: 1px solid var(--sterling-grey);
  z-index: 200;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition);
}
.notif-panel.open { transform: translateX(0); }
.notif-header { padding: 16px 20px; border-bottom: 1px solid var(--sterling-grey); display: flex; align-items: center; justify-content: space-between; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item {
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--sterling-light-grey); }
.notif-item.unread { background: #fff8f8; }
.notif-icon { font-size: 20px; margin-right: 10px; }
.notif-text { font-size: 13px; }
.notif-meta { font-size: 11px; color: var(--granite-grey); margin-top: 2px; }

/* ─── Tags / Role Badges ─── */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.role-ed { background: #7c3aed; color: white; }
.role-sgdc { background: var(--bni-red); color: white; }
.role-gdc { background: #0ea5e9; color: white; }
.role-ga { background: #10b981; color: white; }

/* ─── Data Freshness ─── */
.freshness-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.freshness-fresh { background: #10b981; }
.freshness-warn { background: #f59e0b; }
.freshness-stale { background: #ef4444; }

/* ─── Search ─── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 8px;
  padding: 8px 12px;
}
.search-bar input { border: none; background: none; padding: 0; flex: 1; }
.search-bar input:focus { box-shadow: none; }

/* ─── Action Items Sidebar ─── */
.action-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 10px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.action-item {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--sterling-grey);
  margin-bottom: 8px;
  font-size: 13px;
}
.action-item.overdue { border-color: #fecaca; background: #fff5f5; }
.action-item.pending { border-color: #fde68a; background: #fffbeb; }
.action-item.done { border-color: #a7f3d0; background: #ecfdf5; opacity: 0.7; }

/* ─── Call Log Layout ─── */
.call-log-layout { display: flex; gap: 20px; }
.call-log-main { flex: 1; min-width: 0; }

/* ─── Weekly Goals Table ─── */
.week-current { background: #fff5f5; font-weight: 700; }

/* ─── Progress Bar ─── */
.progress-bar { background: var(--sterling-light-grey); border-radius: 4px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
.progress-green { background: #10b981; }
.progress-amber { background: #f59e0b; }
.progress-red { background: var(--bni-red); }

/* ─── Chart Container ─── */
.chart-container { position: relative; height: 260px; }

/* ─── Avatar ─── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bni-red);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

/* ─── Dropdown ─── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: 100%; right: 0;
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 300;
  display: none;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--power-black);
}
.dropdown-item:hover { background: var(--sterling-light-grey); }
.dropdown-item.danger { color: var(--bni-red); }
.dropdown-divider { border-top: 1px solid var(--sterling-grey); margin: 4px 0; }

/* ─── Auth Page ─── */
.auth-page {
  min-height: 100vh;
  width: 100%;
  background: var(--sterling-light-grey);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  flex: 1;
}
.auth-card {
  background: var(--true-white);
  border: 1px solid var(--sterling-grey);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-img {
  width: 80px; height: 80px;
  border-radius: 14px;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  box-shadow: 0 4px 12px rgba(207,32,48,0.3);
}
.auth-title { font-size: 22px; font-weight: 800; text-align: center; }
.auth-sub { font-size: 13px; color: var(--granite-grey); text-align: center; margin-top: 4px; }
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 16px;
}
.auth-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #065f46;
  margin-bottom: 16px;
}

/* ─── Alerts / Banners ─── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; display: flex; align-items: flex-start; gap: 10px; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.whats-new-banner {
  background: linear-gradient(135deg, var(--bni-red), #e8364a);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.whats-new-banner .btn { background: white; color: var(--bni-red); }

/* ─── Spinner ─── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--sterling-grey);
  border-top-color: var(--bni-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; flex-direction: column; gap: 12px;
  color: var(--granite-grey); font-size: 14px;
  background: var(--sterling-light-grey);
}
.loading-screen-inner {
  display: flex; align-items: center; justify-content: center;
  height: 200px; flex-direction: column; gap: 12px;
  color: var(--granite-grey); font-size: 14px;
}

/* ─── Renewal Status Chips ─── */
.renewal-unknown  { background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; }
.renewal-renewing { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.renewal-maybe    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.renewal-not      { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.renewal-renewed  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.renewal-dropped  { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }

/* ─── File Upload ─── */
.upload-zone {
  border: 2px dashed var(--sterling-grey);
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--bni-red);
  background: var(--bni-red-light);
}
.upload-zone .upload-icon { font-size: 40px; margin-bottom: 12px; }

/* ─── Empty State ─── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--granite-grey);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--power-black); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ─── Slide-up sheet (mobile) ─── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  display: none;
}
.sheet-overlay.open { display: block; }
.sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--true-white);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 32px;
  z-index: 501;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}
.sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--sterling-grey);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* ─── Bottom Nav (mobile) ─── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-height);
  background: var(--true-white);
  border-top: 1px solid var(--sterling-grey);
  z-index: 100;
}
.bottom-nav-items { display: flex; height: 100%; }
.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--granite-grey);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 0;
  min-height: 44px;
  transition: color var(--transition);
  position: relative;
}
.bottom-nav-item.active { color: var(--bni-red); }
.bottom-nav-item .nav-icon { font-size: 22px; }
.bottom-nav-badge {
  position: absolute; top: 4px; right: calc(50% - 20px);
  background: var(--bni-red); color: white;
  font-size: 9px; font-weight: 700;
  padding: 1px 4px; border-radius: 8px;
}

/* ─── Floating hamburger (mobile) ─── */
.mobile-sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  display: none;
}
.mobile-sidebar-overlay.open { display: block; }
.mobile-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px;
  background: var(--true-white);
  z-index: 401;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.mobile-sidebar.open { transform: translateX(0); }

/* ─── Mobile Responsive ─── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0 !important; padding-bottom: var(--bottomnav-height); }
  .bottom-nav { display: block; }
  .stat-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .stat-grid .stat-card { padding: 12px; gap: 4px; }
  .stat-grid .stat-card-icon { width: 30px; height: 30px; font-size: 16px; border-radius: 6px; }
  .stat-grid .stat-card-value { font-size: 18px; }
  .stat-grid .stat-card-label { font-size: 11px; }
  .stat-grid .stat-card-sub { font-size: 10px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .call-log-layout { flex-direction: column; }
  .action-sidebar { width: 100%; position: static; }
  .chart-container { height: 200px; }
  /* Resources table: keep only Title + Action on mobile so View/Download stay visible */
  #res-table th:not(:first-child):not(:last-child),
  #res-table td:not(:first-child):not(:last-child) { display: none; }
  #res-table td:last-child > div { justify-content: flex-end; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(3,1fr); gap: 6px; }
  .stat-grid .stat-card { padding: 10px 8px; gap: 2px; }
  .stat-grid .stat-card-icon { width: 26px; height: 26px; font-size: 14px; border-radius: 5px; }
  .stat-grid .stat-card-value { font-size: 16px; }
  .stat-grid .stat-card-label { font-size: 10px; }
  .stat-grid .stat-card-sub { font-size: 9px; }
  .auth-card { padding: 24px 20px; }
  .modal { padding: 20px 16px; }
}

/* ─── Print ─── */
@media print {
  .sidebar, .topbar, .bottom-nav { display: none !important; }
  .main-content { margin: 0 !important; }
}

/* ─── Misc ─── */
.text-red { color: var(--bni-red); }
.text-grey { color: var(--granite-grey); }
.text-green { color: #059669; }
.text-amber { color: #d97706; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none; }
.relative { position: relative; }
.cursor-pointer { cursor: pointer; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase { text-transform: uppercase; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.rounded { border-radius: 6px; }
.rounded-full { border-radius: 50%; }
.border { border: 1px solid var(--sterling-grey); }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }

/* ─── Progress grey ─── */
.progress-grey { background: #9ca3af; }

/* ─── Misc extra ─── */
.text-center { text-align: center; }
.no-data { color: var(--sterling-grey); font-style: italic; }

/* ─── Table sticky header ─── */
.table-sticky thead th { position: sticky; top: 0; z-index: 1; }

/* ─── Card hover ─── */
.card-hover { transition: transform var(--transition), box-shadow var(--transition); cursor: pointer; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* ─── DNA Review section ─── */
.review-section { border: 1px solid var(--sterling-grey); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.review-section-title { font-size: 13px; font-weight: 700; color: var(--granite-grey); margin-bottom: 8px; }

/* ─── Score range labels ─── */
.score-range { font-size: 11px; color: var(--granite-grey); }

/* ─── Import log ─── */
.import-log { font-size: 12px; font-family: monospace; background: #1a1a1a; color: #4ade80; padding: 12px; border-radius: 6px; max-height: 200px; overflow-y: auto; }

/* ─── Status dot inline ─── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.status-dot-green { background: #10b981; }
.status-dot-amber { background: #f59e0b; }
.status-dot-red   { background: #ef4444; }

/* ─── Compact table ─── */
.table-compact td, .table-compact th { padding: 8px 10px; font-size: 12px; }

/* ─── Progress bar label ─── */
.progress-label { font-size: 11px; color: var(--granite-grey); text-align: right; }

/* ─── Sticky page header on scroll ─── */
@supports (position: sticky) {
  .page-header-sticky {
    position: sticky; top: var(--topbar-height);
    background: var(--sterling-light-grey);
    z-index: 80; padding-bottom: 16px;
  }
}

/* ─── Tooltip (title attr) ─── */
[title] { cursor: help; }

/* ══════════════════════════════════════════════════════════
   GDC REVIEW MODULE
   ══════════════════════════════════════════════════════════ */

/* ── Full-page review layout ── */
.dna-review-page {
  display: flex; flex-direction: column; height: 100%;
}
.dna-review-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 16px; gap: 12px; flex-wrap: wrap;
}
.dna-review-topbar h2 { font-size: 18px; font-weight: 600; margin: 0; }
.dna-review-topbar p  { font-size: 13px; color: var(--granite-grey); margin: 2px 0 0; }
.dna-autosave-status  { font-size: 12px; color: var(--granite-grey); }
.dna-autosave-status.saved  { color: #16a34a; }
.dna-autosave-status.saving { color: var(--bni-crimson); }

.dna-review-layout {
  display: flex; gap: 0;
  background: #fff;
  border-radius: 12px;
  border: 0.5px solid rgba(0,0,0,.12);
  overflow: hidden; min-height: 600px;
}

/* ── Section sidebar nav ── */
.dna-section-nav {
  width: 210px; flex-shrink: 0;
  border-right: 0.5px solid rgba(0,0,0,.10);
  background: #fafaf9; padding: 12px 0;
}
.dna-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 13px;
  color: var(--granite-grey); cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s;
}
.dna-nav-item:hover { background: #fff; }
.dna-nav-item.active {
  border-left-color: var(--bni-crimson);
  color: var(--bni-crimson); font-weight: 600; background: #fff;
}
.dna-nav-item .dna-nav-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: #efefef; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600;
  color: var(--granite-grey); flex-shrink: 0;
}
.dna-nav-item.active .dna-nav-num { background: var(--bni-crimson); color: #fff; }
.dna-nav-item.done   .dna-nav-num { background: #16a34a; color: #fff; }

/* ── Section content area ── */
.dna-section-content {
  flex: 1; padding: 24px 28px; overflow-x: auto; min-width: 0;
}
.dna-section-content h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.dna-section-subtitle   { font-size: 13px; color: var(--granite-grey); margin-bottom: 20px; }

/* ── Auto-populated tag ── */
.dna-auto-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #7c3aed; background: #f5f3ff;
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
  margin-left: 8px; vertical-align: middle;
}

/* ── Score grid (TL grids) ── */
.dna-score-grid {
  width: 100%; border-collapse: collapse; font-size: 12px; margin: 12px 0;
}
.dna-score-grid th,
.dna-score-grid td {
  border: 0.5px solid rgba(0,0,0,.12);
  padding: 6px 4px; text-align: center; min-width: 52px;
}
.dna-score-grid th {
  background: #fafaf9; font-weight: 500; font-size: 11px; color: var(--granite-grey);
}
.dna-score-grid td input {
  width: 44px; text-align: center; border: none; background: transparent;
  font-size: 13px; font-weight: 500; padding: 2px; color: inherit;
}
.dna-score-grid td input:focus { outline: none; background: #fef2f2; border-radius: 4px; }
.dna-score-grid .row-label { text-align: left; font-weight: 500; white-space: nowrap; padding: 6px 10px; }
/* TL color classes */
.dna-tl-g  { background: #dcfce7 !important; color: #166534 !important; }
.dna-tl-a  { background: #fef9c3 !important; color: #854d0e !important; }
.dna-tl-r  { background: #fee2e2 !important; color: #991b1b !important; }
.dna-tl-gr { background: #f1f1f0 !important; color: #57534e !important; }
.dna-avg-cell { font-weight: 700; }

/* ── Color legend ── */
.dna-legend {
  display: flex; gap: 12px; margin: 6px 0 4px; font-size: 11px; color: var(--granite-grey); flex-wrap: wrap;
}
.dna-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dna-legend .sw  { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.sw-g  { background: #dcfce7; border: 1px solid #bbf7d0; }
.sw-a  { background: #fef9c3; border: 1px solid #fde68a; }
.sw-r  { background: #fee2e2; border: 1px solid #fecaca; }
.sw-gr { background: #f1f1f0; border: 1px solid #d6d3d1; }

/* ── DC / ED comment pair ── */
.dna-comment-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0;
}
.dna-comment-box { display: flex; flex-direction: column; gap: 4px; }
.dna-comment-box label {
  font-size: 12px; font-weight: 500; color: var(--granite-grey);
  display: flex; align-items: center; gap: 4px;
}
.dna-comment-box textarea {
  padding: 8px 10px;
  border: 0.5px solid rgba(0,0,0,.15); border-radius: 8px;
  font-size: 13px; min-height: 64px; resize: vertical;
  background: #fff; color: #1a1a1a; font-family: inherit;
}
.badge-dc { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; background: #e0e7ff; color: #3730a3; }
.badge-ed { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; background: #fce7f3; color: #9d174d; }

/* ── Chapter block card ── */
.dna-chapter-block {
  background: #fafaf9; border: 0.5px solid rgba(0,0,0,.12);
  border-radius: 8px; padding: 16px; margin-bottom: 16px;
}
.dna-chapter-block h4 {
  font-size: 14px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.chip-primary   { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #dbeafe; color: #1e40af; font-weight: 500; }
.chip-secondary { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #f3f4f6; color: #374151; font-weight: 500; }

/* ── Operational routines grid ── */
.dna-routine-grid { width: 100%; border-collapse: collapse; font-size: 12px; margin: 12px 0; }
.dna-routine-grid th,
.dna-routine-grid td { border: 0.5px solid rgba(0,0,0,.12); padding: 6px 8px; text-align: center; }
.dna-routine-grid th { background: #fafaf9; font-weight: 500; font-size: 11px; color: var(--granite-grey); }
.dna-routine-grid td.routine-name { text-align: left; font-size: 12px; font-weight: 500; white-space: nowrap; min-width: 190px; }
.dna-toggle { cursor: pointer; user-select: none; font-weight: 600; font-size: 12px; border-radius: 4px; padding: 3px 8px; display: inline-block; min-width: 28px; }
.dna-toggle-y   { background: #dcfce7; color: #166534; }
.dna-toggle-n   { background: #fee2e2; color: #991b1b; }
.dna-toggle-blank { background: #f1f1f0; color: #57534e; }
.dna-pct-col    { background: #fafaf9 !important; font-weight: 600; font-size: 12px; }

/* ── Retention table ── */
.dna-retention-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.dna-retention-table th,
.dna-retention-table td { border: 0.5px solid rgba(0,0,0,.12); padding: 8px 12px; text-align: center; }
.dna-retention-table th { background: #fafaf9; font-weight: 500; font-size: 12px; color: var(--granite-grey); }
.dna-retention-table td.metric-label { text-align: left; font-weight: 500; }
.dna-retention-table td input { width: 70px; text-align: center; border: none; background: transparent; font-size: 13px; font-weight: 500; }
.change-pos { color: #16a34a; font-weight: 600; }
.change-neg { color: #dc2626; font-weight: 600; }

/* ── Goals grid ── */
.dna-goals-grid { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.dna-goals-grid th,
.dna-goals-grid td { border: 0.5px solid rgba(0,0,0,.12); padding: 6px 4px; text-align: center; min-width: 56px; }
.dna-goals-grid th { background: #fafaf9; font-weight: 500; font-size: 11px; color: var(--granite-grey); }
.dna-goals-grid td input { width: 50px; text-align: center; border: none; background: transparent; font-size: 12px; }
.dna-goals-grid .target-row td { background: #eff6ff; }
.dna-goals-grid .actual-row td.under { color: #dc2626; font-weight: 600; }
.dna-goals-grid td.row-label { text-align: left; padding-left: 8px; font-size: 12px; font-weight: 500; }

/* ── Successes & Challenges table ── */
.dna-sc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dna-sc-table td { padding: 8px 10px; border: 0.5px solid rgba(0,0,0,.12); vertical-align: top; }
.dna-sc-table .sc-num { width: 30px; font-weight: 600; color: var(--granite-grey); text-align: center; }
.dna-sc-table textarea { width: 100%; border: none; background: transparent; resize: vertical; min-height: 44px; font-size: 13px; font-family: inherit; }
.dna-sc-table textarea:focus { outline: none; background: #fef2f2; border-radius: 4px; }

/* ── Life Long Learning entries ── */
.dna-learn-list  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dna-learn-entry { display: flex; align-items: center; gap: 8px; }
.dna-learn-entry input { padding: 5px 8px; border: 0.5px solid rgba(0,0,0,.15); border-radius: 6px; font-size: 12px; background: #fff; }
.dna-learn-name  { flex: 1; min-width: 100px; }
.dna-learn-date  { width: 130px; }
.dna-learn-del   { width: 26px; height: 26px; border: none; background: none; color: #aaa; cursor: pointer; font-size: 16px; border-radius: 4px; flex-shrink: 0; display:flex;align-items:center;justify-content:center; }
.dna-learn-del:hover { background: #fee2e2; color: #dc2626; }
.dna-learn-add   { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--bni-crimson); cursor: pointer; padding: 5px 10px; border: 1px dashed #fca5a5; border-radius: 6px; background: none; font-weight: 500; margin-top: 4px; }
.dna-learn-add:hover { background: #fef2f2; }
.dna-learn-header { display: flex; gap: 8px; font-size: 11px; font-weight: 500; color: #aaa; padding: 0 34px 6px 0; border-bottom: 0.5px solid rgba(0,0,0,.1); margin-bottom: 6px; }
.dna-learn-header span:first-child { flex: 1; min-width: 100px; }
.dna-learn-count { font-size: 11px; color: #aaa; margin-top: 4px; }

/* ── Sign-off boxes ── */
.dna-signoff { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
.dna-signoff-box { border: 0.5px solid rgba(0,0,0,.12); border-radius: 8px; padding: 16px; text-align: center; }
.dna-signoff-box .role { font-size: 12px; font-weight: 500; color: var(--granite-grey); margin-bottom: 6px; }
.dna-signoff-box .name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.dna-signoff-box .date { font-size: 12px; color: var(--granite-grey); }

/* ── Section footer (Prev/Next) ── */
.dna-footer-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; margin-top: 24px; border-top: 0.5px solid rgba(0,0,0,.10);
}

/* ── Read-only overlay ── */
.dna-readonly input,
.dna-readonly textarea,
.dna-readonly select { background: #f9f9f9 !important; color: #555 !important; cursor: not-allowed !important; }
.dna-readonly .dna-toggle { pointer-events: none; opacity: .7; }
.dna-readonly .dna-learn-del,
.dna-readonly .dna-learn-add { display: none; }

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .dna-review-layout { flex-direction: column; }
  .dna-section-nav   { width: 100%; border-right: none; border-bottom: 0.5px solid rgba(0,0,0,.10); display: flex; overflow-x: auto; padding: 8px 0; }
  .dna-nav-item      { flex-shrink: 0; border-left: none; border-bottom: 3px solid transparent; padding: 8px 12px; }
  .dna-nav-item.active { border-bottom-color: var(--bni-crimson); border-left: none; }
  .dna-section-content { padding: 16px; }
  .dna-comment-pair  { grid-template-columns: 1fr; }
  .dna-signoff       { grid-template-columns: 1fr; }
  .dna-score-grid,
  .dna-routine-grid,
  .dna-goals-grid    { display: block; overflow-x: auto; }
}

/* ══════════════════════════════════════════════════════════
   HAPPINESS SURVEY MODULE
   ══════════════════════════════════════════════════════════ */

/* ── Sentiment pills ── */
.sent-happy    { display:inline-block;border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;background:#f0fff4;color:#276749;border:1px solid #9ae6b4; }
.sent-somewhat { display:inline-block;border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;background:#fffff0;color:#975a16;border:1px solid #f6e05e; }
.sent-nothappy { display:inline-block;border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;background:#fff5f5;color:#c53030;border:1px solid #feb2b2; }
.sent-none     { color:#cbd5e0;font-size:13px; }

/* ── Renewal intent pills ── */
.renew-yes     { display:inline-block;border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;background:#f0fff4;color:#276749;border:1px solid #9ae6b4; }
.renew-maybe   { display:inline-block;border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;background:#fffff0;color:#975a16;border:1px solid #f6e05e; }
.renew-no      { display:inline-block;border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;background:#fff5f5;color:#c53030;border:1px solid #feb2b2; }
.renew-none    { color:#cbd5e0;font-size:13px; }

/* ── Survey overview ── */
.hap-overview-card { background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;margin-bottom:16px;box-shadow:0 1px 3px rgba(15,23,42,.04); }
.hap-overview-header { display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px; }
.hap-overview-header h2 { margin:0;color:#1a202c;font-size:18px;line-height:1.3; }
.hap-overview-header p { margin:4px 0 0;color:#718096;font-size:12px; }
.hap-overview-filters { display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1fr);gap:10px;min-width:min(100%,360px); }
.hap-overview-filters label { color:#718096;font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase; }
.hap-overview-filters select { width:100%;margin-top:4px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#2d3748;font-size:12px;text-transform:none;letter-spacing:normal; }
.hap-overview-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.hap-overview-metric { min-width:0;border:1px solid #e2e8f0;border-radius:12px;padding:13px;background:#f8fafc;text-align:left;font:inherit;cursor:pointer;transition:transform .15s,box-shadow .15s,border-color .15s; }
.hap-overview-metric:hover { transform:translateY(-1px);box-shadow:0 5px 14px rgba(15,23,42,.08); }
.hap-overview-metric:focus-visible { outline:3px solid rgba(229,62,62,.25);outline-offset:2px; }
.hap-overview-metric.active { box-shadow:0 0 0 2px #e53e3e; }
.hap-overview-metric.total { background:#f0f9ff;border-color:#bae6fd; }
.hap-overview-metric.yes { background:#f0fdf4;border-color:#bbf7d0; }
.hap-overview-metric.maybe { background:#fffbeb;border-color:#fde68a; }
.hap-overview-metric.no { background:#fef2f2;border-color:#fecaca; }
.hap-overview-label { color:#64748b;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.35px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.hap-overview-value { margin-top:5px;color:#0f172a;font-size:26px;font-weight:800;line-height:1.1; }
.hap-overview-percent { margin-top:4px;color:#64748b;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.hap-overview-track { height:4px;margin-top:10px;border-radius:999px;background:rgba(148,163,184,.25);overflow:hidden; }
.hap-overview-track span { display:block;height:100%;border-radius:inherit;background:#0ea5e9; }
.hap-overview-metric.yes .hap-overview-track span { background:#22c55e; }
.hap-overview-metric.maybe .hap-overview-track span { background:#eab308; }
.hap-overview-metric.no .hap-overview-track span { background:#ef4444; }

.hap-list-controls { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px; }
.hap-list-controls label { color:#718096;font-size:10px;font-weight:700;letter-spacing:.35px;text-transform:uppercase; }
.hap-list-controls select { width:100%;margin-top:4px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#2d3748;font-size:12px;text-transform:none;letter-spacing:normal; }

/* ── On-time / Late engagement pills ── */
.eng-ontime    { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;background:#f0f9ff;color:#2b6cb0;border:1px solid #bee3f8;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.eng-late      { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;background:#fff5f5;color:#c53030;border:1px solid #feb2b2;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.eng-pending   { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;background:#f7fafc;color:#718096;border:1px solid #e2e8f0;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }

/* ── List row columns ── */
.hap-list-row {
  display: grid;
  grid-template-columns: 30% repeat(5, 1fr) 1.4fr;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow .15s;
  overflow: hidden;
}
.hap-list-row > div { min-width: 0; overflow: hidden; }
.hap-list-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.hap-list-row.risk  { border-color: #fecaca; }
.hap-list-row.archived { opacity: .45; }

.hap-past-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 72px 70px 70px 72px 90px;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow .15s;
  overflow: hidden;
}
.hap-past-row > div { min-width: 0; overflow: hidden; }
.hap-past-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.hap-past-row.archived { opacity: .45; }

.hap-col-headers {
  display: grid;
  grid-template-columns: 30% repeat(5, 1fr) 1.4fr;
  padding: 0 12px;
  margin-bottom: 6px;
}
.hap-col-headers.past {
  grid-template-columns: minmax(0,1fr) 72px 70px 70px 72px 90px;
}
.hap-col-h { font-size:10px;font-weight:700;color:#a0aec0;letter-spacing:.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
/* Ensure member name column truncates cleanly */
.hap-list-row > div:first-child,
.hap-past-row > div:first-child { min-width:0; }
.hap-list-row > div:first-child > div,
.hap-past-row > div:first-child > div { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }

/* ── Filter bar ── */
.hap-filter-bar { display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:14px;scrollbar-width:none; }
.hap-filter-bar::-webkit-scrollbar { display:none; }
.hap-filter-btn { padding:6px 14px;border-radius:999px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;border:1px solid #e2e8f0;background:#fff;color:#718096;flex-shrink:0;transition:all .15s; }
.hap-filter-btn.active { background:#e53e3e;color:#fff;border-color:#e53e3e; }

/* ── Manage bar ── */
.hap-manage-bar { background:#fff;border-bottom:1px solid #e2e8f0;padding:10px 14px;align-items:center;justify-content:space-between;display:none; }
.hap-manage-bar.show { display:flex; }

/* ── Days badge ── */
.days-neg     { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:800;background:#fff0f0;color:#e53e3e;border:1px solid #fecaca;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.days-crit    { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:800;background:#fee2e2;color:#dc2626;border:1px solid #fca5a5;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.days-urgent  { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;background:#fff8f0;color:#c05621;border:1px solid #fbd38d;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.days-warning { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;background:#fffbeb;color:#92400e;border:1px solid #fde68a;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.days-safe    { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:600;background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.days-ok      { display:inline-block;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;background:#f0f9ff;color:#2b6cb0;border:1px solid #bee3f8;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis; }

/* ── Survey link box ── */
.hap-link-box { background:#f7fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px;margin-top:8px; }
.hap-link-url { font-size:11px;color:#276749;font-family:monospace;word-break:break-all;margin-bottom:10px; }
.hap-link-actions { display:flex;gap:8px; }
.hap-btn-copy    { flex:1;padding:9px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;color:#4a5568;font-size:12px;font-weight:600;cursor:pointer; }
.hap-btn-preview { flex:1;padding:9px;border-radius:8px;border:none;background:#e53e3e;color:#fff;font-size:12px;font-weight:600;cursor:pointer; }
.hap-btn-generate { width:100%;padding:13px;border-radius:10px;border:none;background:#e53e3e;color:#fff;font-size:14px;font-weight:700;cursor:pointer; }
.hap-btn-engage   { width:100%;padding:11px;border-radius:10px;border:1px solid #276749;background:#f0fff4;color:#276749;font-size:13px;font-weight:600;cursor:pointer;margin-top:8px; }

/* ── Outcome selector ── */
.hap-outcome-grid { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px; }
.hap-outcome-btn  { border-radius:10px;padding:12px;text-align:center;cursor:pointer;border:2px solid #e2e8f0;background:#f7fafc;transition:all .15s; }
.hap-outcome-btn.sel-renewed { background:#f0fff4;border-color:#9ae6b4; }
.hap-outcome-btn.sel-dropped { background:#fff5f5;border-color:#feb2b2; }
.hap-outcome-icon  { font-size:22px; }
.hap-outcome-label { font-size:12px;font-weight:600;color:#718096;margin-top:4px; }
.hap-outcome-btn.sel-renewed .hap-outcome-label { color:#276749; }
.hap-outcome-btn.sel-dropped .hap-outcome-label { color:#c53030; }

/* ── Self-rating grid ── */
.sr-grid { width:100%;border-collapse:collapse;margin-top:8px; }
.sr-grid th { font-size:11px;font-weight:700;color:#718096;text-align:center;padding:6px 4px;background:#f7fafc; }
.sr-grid th:first-child { text-align:left; }
.sr-grid td { padding:8px 4px;border-bottom:1px solid #f0f0f0;text-align:center;vertical-align:middle; }
.sr-grid td:first-child { text-align:left;font-size:12px;color:#2d3748;line-height:1.4; }
.sr-grid tr:last-child td { border-bottom:none; }
.sr-dot { width:22px;height:22px;border-radius:50%;border:2px solid #e2e8f0;background:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:all .15s;font-size:11px; }
.sr-dot.sel-1 { border-color:#c53030;background:#fff5f5;color:#c53030; }
.sr-dot.sel-2 { border-color:#d97706;background:#fffbeb;color:#d97706; }
.sr-dot.sel-3 { border-color:#276749;background:#f0fff4;color:#276749; }

/* ── Public survey form ── */
.survey-wrap { padding:16px;max-width:620px;margin:0 auto;padding-bottom:60px; }
.survey-brand { text-align:center;padding-bottom:16px; }
.survey-brand-name { font-size:13px;font-weight:800;color:#e53e3e;letter-spacing:2px; }
.survey-brand-title { font-size:18px;font-weight:700;color:#1a202c;margin-top:4px; }
.survey-brand-cn { font-size:12px;color:#718096; }
.survey-form-card { background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px;margin-bottom:10px; }
.survey-form-q { font-size:13px;font-weight:600;color:#2d3748;margin-bottom:2px; }
.survey-form-cn { font-size:11px;color:#a0aec0;margin-bottom:10px; }
.survey-prefilled { background:#f0fff4;border:1px solid #9ae6b4;border-radius:8px;padding:9px 12px;color:#276749;font-size:13px; }
.survey-radio-opt { display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;border:1.5px solid #e2e8f0;margin-bottom:6px;cursor:pointer;background:#fff;transition:all .15s; }
.survey-radio-opt.selected { border-color:#e53e3e;background:#fff5f5; }
.survey-radio-dot { width:16px;height:16px;border-radius:50%;border:2px solid #cbd5e0;flex-shrink:0;transition:all .15s; }
.survey-radio-opt.selected .survey-radio-dot { border-color:#e53e3e;background:#e53e3e; }
.survey-radio-text { font-size:13px;color:#4a5568; }
.survey-radio-opt.selected .survey-radio-text { color:#c53030;font-weight:600; }
.survey-checkbox-opt { display:flex;align-items:flex-start;gap:10px;padding:9px 12px;border-radius:8px;border:1.5px solid #e2e8f0;margin-bottom:6px;cursor:pointer;background:#fff;transition:all .15s; }
.survey-checkbox-opt.selected { border-color:#e53e3e;background:#fff5f5; }
.survey-checkbox-box { width:18px;height:18px;border-radius:4px;border:2px solid #cbd5e0;flex-shrink:0;margin-top:1px;transition:all .15s;display:inline-flex;align-items:center;justify-content:center;font-size:11px; }
.survey-checkbox-opt.selected .survey-checkbox-box { border-color:#e53e3e;background:#e53e3e;color:#fff; }
.survey-textarea { width:100%;border:1px solid #e2e8f0;border-radius:8px;padding:9px 12px;font-size:13px;outline:none;resize:none;color:#2d3748;font-family:inherit; }
.survey-submit-btn { width:100%;padding:14px;border-radius:10px;border:none;background:#e53e3e;color:#fff;font-size:14px;font-weight:700;cursor:pointer;margin-top:8px; }
.survey-footer { text-align:center;font-size:11px;color:#a0aec0;margin-top:12px; }

/* ── Answer cards in panel ── */
.hap-acard { border-radius:10px;padding:10px 14px;margin-bottom:8px; }
.hap-acard-default { background:#f7fafc;border:1px solid #e2e8f0; }
.hap-acard-red     { background:#fff5f5;border:1px solid #fecaca; }
.hap-acard-amber   { background:#fffbeb;border:1px solid #fbd38d; }
.hap-acard-green   { background:#f0fff4;border:1px solid #9ae6b4; }
.hap-answer-q { font-size:11px;color:#a0aec0;margin-bottom:4px;font-weight:600; }
.hap-answer-a { font-size:13px;color:#2d3748;font-weight:500;line-height:1.5; }
.hap-answer-a.red   { color:#c53030; }
.hap-answer-a.amber { color:#92400e; }
.hap-answer-a.green { color:#276749; }

/* ── Summary bar ── */
.hap-summary-bar { border-radius:12px;padding:12px 16px;margin-bottom:14px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px; }
.hap-summary-green { background:#f0fff4;border:1px solid #9ae6b4; }
.hap-summary-amber { background:#fffbeb;border:1px solid #fbd38d; }
.hap-summary-red   { background:#fff5f5;border:1px solid #feb2b2; }
.hap-summary-item label { font-size:11px;color:#718096;display:block;margin-bottom:4px; }

/* ── Checkbox (manage mode) ── */
.hap-cb { width:20px;height:20px;border-radius:6px;border:2px solid #e2e8f0;background:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:11px;flex-shrink:0;transition:all .15s; }
.hap-cb.checked { background:#e53e3e;border-color:#e53e3e;color:#fff; }

/* ── Archived toggle ── */
.hap-archived-toggle { display:flex;align-items:center;gap:8px;margin-bottom:14px;cursor:pointer; }
.hap-toggle-track { width:36px;height:20px;border-radius:999px;background:#e2e8f0;position:relative;transition:background .2s;flex-shrink:0; }
.hap-toggle-track.on { background:#276749; }
.hap-toggle-thumb { position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:left .2s; }
.hap-toggle-track.on .hap-toggle-thumb { left:18px; }

/* ── Success screen ── */
.hap-success-body { display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:60px 24px 24px;width:100%; }
.hap-btn-export { display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:320px;padding:14px;border-radius:10px;border:none;background:#e53e3e;color:#fff;font-size:14px;font-weight:700;margin-top:16px;cursor:pointer; }
.hap-btn-back   { display:flex;align-items:center;justify-content:center;width:100%;max-width:320px;padding:13px;border-radius:10px;border:1.5px solid #e2e8f0;background:#fff;color:#4a5568;font-size:14px;font-weight:600;margin-top:10px;cursor:pointer; }

/* ── P badge ── */
.p-badge { background:#fff5f5;color:#e53e3e;border:1px solid #fecaca;border-radius:4px;font-size:9px;font-weight:700;padding:1px 5px; }

/* ── Happiness panel (bottom-sheet) ── */
#hap-panel {
  padding-bottom: env(safe-area-inset-bottom, 24px);
  /* Never taller than 85vh so the handle is always visible */
  max-height: 85vh;
}
.handle {
  width: 40px; height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  /* centred, with generous top gap so it clears the rounded corners */
  margin: 14px auto 0;
  flex-shrink: 0;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}
.panel-name { font-size: 16px; font-weight: 700; color: #1a202c; line-height: 1.3; }
.panel-sub  { font-size: 12px; color: #718096; margin-top: 3px; }
.close-btn  {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 34px; height: 34px;
  min-width: 34px;          /* prevent shrinking */
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #4a5568;
  margin-left: auto;        /* push to right edge */
}
.panel-body { padding: 14px 20px 24px; }
.section-title {
  font-size: 11px;
  font-weight: 700;
  color: #a0aec0;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 4px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f7fafc;
  font-size: 13px;
}
.info-row:last-of-type { border-bottom: none; }
.info-label { color: #718096; font-weight: 500; }
.info-val   { color: #1a202c; font-weight: 600; text-align: right; }
.notes-area {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  resize: none;
  color: #2d3748;
  font-family: inherit;
  background: #f7fafc;
  box-sizing: border-box;
  margin-top: 6px;
}
.alert-red   { display:flex;align-items:flex-start;gap:10px;background:#fff5f5;border:1px solid #fecaca;border-radius:10px;padding:12px;font-size:13px;color:#c53030;margin-bottom:12px;line-height:1.4; }
.alert-amber { display:flex;align-items:flex-start;gap:10px;background:#fffbeb;border:1px solid #fbd38d;border-radius:10px;padding:12px;font-size:13px;color:#92400e;margin-bottom:12px;line-height:1.4; }
.hap-btn-reset { width:100%;padding:9px;border-radius:8px;border:1px solid #fecaca;background:#fff5f5;color:#c53030;font-size:13px;font-weight:600;cursor:pointer;margin-top:10px; }
.hap-btn-assign { width:100%;padding:9px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;color:#4a5568;font-size:13px;font-weight:600;cursor:pointer;margin-top:4px; }

/* ── Call Log Coverage matrix ── */
.cov-matrix { display:flex; flex-direction:column; }
.cov-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.cov-row:last-of-type { border-bottom: none; }
.cov-row.cov-header {
  background: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  color: #a0aec0;
  letter-spacing: .5px;
  text-align: center;
  padding: 10px 14px;
}
.cov-row.cov-header > .cov-name { text-align: left; }
.cov-row.cov-totals {
  background: #f0fdf4;
  font-weight: 700;
  border-top: 2px solid #bbf7d0;
}
.cov-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.cov-cell {
  font-size: 16px;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  min-width: 0;
  transition: box-shadow .15s;
}
.cov-cell.cov-done    { background: #f0fdf4; cursor: pointer; }
.cov-cell.cov-draft   { background: #fffbeb; cursor: pointer; }
.cov-cell.cov-missing { background: #f8fafc; opacity: 0.55; cursor: pointer; }
.cov-cell.cov-missing:hover { opacity: 0.85; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cov-cell.cov-na      { background: transparent; color: #cbd5e0; font-size: 14px; }
.cov-cell.cov-holiday { background: #fef3c7; }

/* ── T2/T3 callee-based coverage ── */
.cov-callee-matrix { display: flex; flex-direction: column; }
.cov-callee-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 120px minmax(0, 3fr);
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.cov-callee-row:last-of-type { border-bottom: none; }
.cov-callee-row.cov-callee-header {
  background: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  color: #a0aec0;
  letter-spacing: .5px;
  padding: 10px 14px;
}
.cov-callee-row.cov-callee-totals {
  background: #f0fdf4;
  font-weight: 700;
  border-top: 2px solid #bbf7d0;
}
.cov-callee-name { font-size: 13px; font-weight: 600; color: #1a202c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cov-callee-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; text-align: center; white-space: nowrap; }
.cov-callee-ok   { background: #f0fdf4; color: #065f46; border: 1px solid #bbf7d0; }
.cov-callee-low  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.cov-callee-none { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cov-callee-header .cov-callee-status,
.cov-callee-totals .cov-callee-status { background: transparent; border: none; color: inherit; font-size: 13px; }
.cov-callee-pills { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.cov-pill { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid; transition: box-shadow .15s; }
.cov-pill.cov-pill-done  { background: #f0fdf4; color: #065f46; border-color: #bbf7d0; }
.cov-pill.cov-pill-draft { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.cov-pill:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

@media (max-width: 640px) {
  .cov-callee-row { grid-template-columns: minmax(0, 1.4fr) 80px minmax(0, 2fr); gap: 6px; padding: 8px 10px; }
  .cov-callee-name { font-size: 11px; }
  .cov-callee-status { font-size: 10px; padding: 3px 6px; }
  .cov-pill { font-size: 10px; padding: 2px 6px; }
}
.cov-cell.cov-total-cell { background: transparent; font-weight: 700; font-size: 13px; color: #065f46; padding: 4px 0; }
.cov-cell.cov-done:hover,
.cov-cell.cov-draft:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

@media (max-width: 640px) {
  .cov-row { padding: 8px 10px; grid-template-columns: minmax(0, 1.3fr) repeat(5, minmax(0, 1fr)); }
  .cov-name { font-size: 11px; }
  .cov-cell { font-size: 14px; padding: 4px 0; }
  .cov-row.cov-header { font-size: 9px; padding: 8px 10px; }
}

@media (max-width: 480px) {
  .hap-overview-card { padding:14px; }
  .hap-overview-header { align-items:stretch;flex-direction:column;gap:12px; }
  .hap-overview-filters { grid-template-columns:1fr 1fr;min-width:0;width:100%; }
  .hap-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
  .hap-overview-metric { padding:11px; }
  .hap-overview-value { font-size:23px; }
  .hap-overview-percent { white-space:normal;min-height:24px; }
  .hap-list-controls { grid-template-columns:1fr; }
  /* Hide ENGAGEMENT (3rd), SURVEY (4th), ASSIGNED AGA (7th) on mobile; keep RENEWAL (6th) */
  .hap-list-row    { grid-template-columns: minmax(0,1fr) 52px 62px 52px; gap: 3px; padding: 10px 10px; }
  .hap-list-row > div:nth-child(3),
  .hap-list-row > div:nth-child(4),
  .hap-list-row > div:nth-child(7) { display: none; }
  .hap-col-headers:not(.past) { grid-template-columns: minmax(0,1fr) 52px 62px 52px; padding: 0 10px; }
  .hap-col-headers:not(.past) > div:nth-child(3),
  .hap-col-headers:not(.past) > div:nth-child(4),
  .hap-col-headers:not(.past) > div:nth-child(7) { display: none; }
  /* Hide ASSIGNED AGA (6th) on mobile for past rows too */
  .hap-past-row    { grid-template-columns: minmax(0,1fr) 60px 58px 58px 60px; gap: 3px; padding: 10px 10px; }
  .hap-past-row > div:nth-child(6) { display: none; }
  .hap-col-headers.past { grid-template-columns: minmax(0,1fr) 60px 58px 58px 60px; }
  .hap-col-headers.past > div:nth-child(6) { display: none; }
  .panel-header    { padding: 12px 16px 10px; }
  .panel-body      { padding: 12px 16px 40px; }
  #hap-panel       { max-height: 88vh; border-radius: 16px 16px 0 0; }

  /* Call Log — IPA for Next Month table: stack into single column on mobile */
  .ipa-table, .ipa-table tbody, .ipa-table tr, .ipa-table td { display: block; width: 100% !important; }
  .ipa-table tr { border-bottom: 1px solid #e2e8f0 !important; }
  .ipa-table tr:last-child { border-bottom: none !important; }
  .ipa-table td { padding: 10px 14px !important; white-space: normal !important; box-sizing: border-box; }
  .ipa-table td:empty { display: none; }
}

/* ══════════════════════════════════════════════════════════
   AMBASSADOR REVIEW MODULE
   ══════════════════════════════════════════════════════════ */

/* ── Pill badges (sentiment / outcome) ── */
.pill    { display:inline-block;font-size:10px;padding:2px 8px;border-radius:10px;font-weight:600; }
.pill-g  { background:#dcfce7;color:#166534; }
.pill-a  { background:#fef9c3;color:#854d0e; }
.pill-r  { background:#fee2e2;color:#991b1b; }
.pill-b  { background:#dbeafe;color:#1e40af; }
.pill-gr { background:#f1f1f0;color:#57534e; }

/* ── Frequency tags (biannual / annual routines) ── */
.freq-tag { font-size:9px;padding:1px 6px;border-radius:4px;font-weight:600;margin-left:6px;vertical-align:middle;white-space:nowrap; }
.freq-yr  { background:#f5f3ff;color:#7c3aed; }
.freq-bi  { background:#eff6ff;color:#2563eb; }

/* ── Sub-section label ── */
.sub-label { font-size:12px;font-weight:600;color:var(--granite-grey);margin-bottom:8px;padding-bottom:6px;border-bottom:0.5px dashed rgba(0,0,0,.12); }

/* ── Stat mini cards row ── */
.stat-row { display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:12px 0; }
.stat-card-mini { background:#fff;border:0.5px solid rgba(0,0,0,.12);border-radius:8px;padding:14px;text-align:center; }
.stat-card-mini .stat-label { font-size:10px;font-weight:600;color:var(--granite-grey);text-transform:uppercase;letter-spacing:.4px; }
.stat-card-mini .stat-val   { font-size:24px;font-weight:800;margin-top:2px; }
.stat-card-mini .stat-val.green { color:#16a34a; }
.stat-card-mini .stat-val.amber { color:#d97706; }
.stat-card-mini .stat-val.red   { color:#dc2626; }
.stat-card-mini .stat-val.sm    { font-size:14px;font-weight:600; }

/* ── Pipeline table ── */
.pipeline-table { width:100%;border-collapse:collapse;font-size:12px;margin:12px 0; }
.pipeline-table th,.pipeline-table td { border:0.5px solid rgba(0,0,0,.12);padding:8px 10px;text-align:left; }
.pipeline-table th { background:#fafaf9;font-weight:500;font-size:11px;color:var(--granite-grey);text-transform:uppercase;letter-spacing:.3px; }
.pipeline-table tr:hover td { background:#fafaf9; }
.pipeline-table input,.pipeline-table select { padding:4px 6px;border:0.5px solid rgba(0,0,0,.15);border-radius:5px;font-size:12px;background:#fff;font-family:inherit;width:100%; }
.pipeline-table .pipe-member { min-width:120px; }
.y-mark { color:#16a34a;font-weight:600; }
.n-mark { color:#dc2626;font-weight:600; }

/* ── Badge ambassador ── */
.badge-amb { font-size:10px;padding:2px 6px;border-radius:4px;font-weight:600;background:#dbeafe;color:#1e40af; }

/* ── Ambassador review list card ── */
.amb-review-card {
  background:#fff;border:1px solid #e2e8f0;border-radius:12px;
  padding:14px 16px;margin-bottom:10px;cursor:pointer;
  transition:box-shadow .15s;display:flex;align-items:center;gap:14px;
}
.amb-review-card:hover { box-shadow:0 2px 12px rgba(0,0,0,.08); }
.amb-rev-avatar { width:40px;height:40px;border-radius:50%;background:#e53e3e;color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;flex-shrink:0; }
.amb-rev-info   { flex:1;min-width:0; }
.amb-rev-name   { font-size:14px;font-weight:700;color:#1a202c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.amb-rev-meta   { font-size:12px;color:#718096;margin-top:2px; }
.amb-rev-badge  { flex-shrink:0; }

/* ── Responsive: ambassador review ── */
@media (max-width: 768px) {
  .stat-row { grid-template-columns:repeat(2,1fr);gap:8px; }
  .stat-card-mini { padding:10px 8px; }
  .stat-card-mini .stat-label { font-size:9px; }
  .stat-card-mini .stat-val   { font-size:20px; }
  .stat-card-mini .stat-val.sm { font-size:12px; }
  .pipeline-table { display:block;overflow-x:auto;white-space:nowrap; }
  .pipeline-table th,.pipeline-table td { padding:6px 8px;font-size:11px;white-space:nowrap; }
}
@media (max-width: 380px) {
  .stat-card-mini .stat-val { font-size:18px; }
}
