/* Idea Management Portal — Margins ID Group brand layer over Bootstrap 5.3
   Navy #1F3864 · Orange #ED7D31 (carried over from the Power Apps design) */

:root {
  --imp-navy:        #1F3864;
  --imp-navy-dark:   #16294a;
  --imp-navy-light:  #2e4d82;
  --imp-orange:      #ED7D31;
  --imp-orange-dark: #d96a1f;
  --imp-bg:          #f4f6fa;
  --imp-card-border: #e3e8f0;
  --imp-text:        #1f2937;
  --imp-muted:       #6b7280;
  --imp-radius:      14px;
}

body {
  background: var(--imp-bg);
  color: var(--imp-text);
  font-family: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: .92rem;              /* Poppins runs wide — slightly compact base */
}

/* ---------- Type scale (uniform across all screens) ---------- */
main h3 { font-size: 1.4rem; }               /* page titles */
main h4 { font-size: 1.2rem; }
main h5 { font-size: 1.05rem; }
main h6 { font-size: .95rem; }
.card-header { font-size: .95rem; }
.table { font-size: .88rem; }
.form-label { font-size: .9rem; }
.btn { font-size: .9rem; }
.btn-lg { font-size: 1rem; }
.btn-sm { font-size: .8rem; }
.form-control, .form-select { font-size: .9rem; }
.form-control-lg { font-size: 1rem; }
.alert { font-size: .9rem; }
.badge { font-weight: 500; }

/* ---------- Top bar ---------- */
.imp-topbar {
  background: linear-gradient(90deg, var(--imp-navy-dark), var(--imp-navy) 55%, var(--imp-navy-light));
  color: #fff;
  min-height: 60px;
  box-shadow: 0 2px 10px rgba(31, 56, 100, .25);
}
.imp-topbar .navbar-brand { color: #fff; font-weight: 600; letter-spacing: .2px; }
.imp-topbar .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--imp-orange); color: #fff; font-weight: 700;
}
.imp-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--imp-orange); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem;
}
.imp-lang-toggle .btn { --bs-btn-color: #cfd8ea; --bs-btn-border-color: rgba(255,255,255,.35); }
.imp-lang-toggle .btn.active { background: var(--imp-orange); border-color: var(--imp-orange); color: #fff; }

/* ---------- Sidebar (dark navy rail, per the SIP dashboard design) ---------- */
.imp-sidebar {
  background: linear-gradient(180deg, var(--imp-navy-dark) 0%, var(--imp-navy) 100%);
  border-right: none;
  min-height: calc(100vh - 60px);
  padding-top: 1rem;
}
.imp-sidebar .nav-link {
  color: #c7d2e6;
  border-radius: 10px;
  padding: .55rem .9rem;
  margin: .1rem .6rem;
  display: flex; align-items: center; gap: .65rem;
  font-weight: 500;
  font-size: .88rem;
}
.imp-sidebar .nav-link .bi { color: #8fa2c4; }
.imp-sidebar .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.imp-sidebar .nav-link:hover .bi { color: var(--imp-orange); }
.imp-sidebar .nav-link.active {
  background: var(--imp-orange); color: #fff;
  box-shadow: 0 4px 12px rgba(237, 125, 49, .35);
}
.imp-sidebar .nav-link.active .bi { color: #fff; }
.imp-sidebar .imp-section-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: #7c90b5; padding: 1rem 1.5rem .3rem;
}
#mobileNav .offcanvas-body {
  background: linear-gradient(180deg, var(--imp-navy-dark) 0%, var(--imp-navy) 100%);
}
#mobileNav .offcanvas-body .border-top { border-color: rgba(255, 255, 255, .15) !important; }
#mobileNav .offcanvas-body a.text-danger { color: #ff9b8a !important; }

/* ---------- Cards & content ---------- */
.imp-card {
  background: #fff;
  border: 1px solid var(--imp-card-border);
  border-radius: var(--imp-radius);
  box-shadow: 0 1px 4px rgba(16, 30, 60, .05);
}
.imp-card .card-header {
  background: transparent; border-bottom: 1px solid var(--imp-card-border);
  font-weight: 600;
  padding: .9rem 1.5rem;      /* align header text with the p-4 card body */
}
/* Section headers inside idea/brief previews: navy, not grey */
.imp-card h6.text-uppercase.text-muted {
  color: var(--imp-navy) !important;
  letter-spacing: .05em;
}

/* Uniform inner spacing: p-3 bodies breathe like p-4, and table edge
   columns line up with the 1.5rem header/body padding. */
.imp-card > .p-3 { padding: 1.25rem 1.5rem !important; }
.imp-card .table > :not(caption) > * > *:first-child { padding-left: 1.5rem; }
.imp-card .table > :not(caption) > * > *:last-child { padding-right: 1.5rem; }
.imp-hero {
  background: linear-gradient(120deg, var(--imp-navy) 0%, var(--imp-navy-light) 70%);
  color: #fff; border-radius: var(--imp-radius);
  position: relative; overflow: hidden;
}
.imp-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(237, 125, 49, .25);
}
.imp-hero::before {
  content: ""; position: absolute; right: 60px; bottom: -80px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

/* ---------- Buttons ---------- */
.btn-imp-primary {
  --bs-btn-bg: var(--imp-orange);
  --bs-btn-border-color: var(--imp-orange);
  --bs-btn-hover-bg: var(--imp-orange-dark);
  --bs-btn-hover-border-color: var(--imp-orange-dark);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
  font-weight: 600;
}
.btn-imp-navy {
  --bs-btn-bg: var(--imp-navy);
  --bs-btn-border-color: var(--imp-navy);
  --bs-btn-hover-bg: var(--imp-navy-dark);
  --bs-btn-hover-border-color: var(--imp-navy-dark);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
  font-weight: 600;
}

/* ---------- Status badges (badge_class comes from the statuses table) ---------- */
.imp-badge { border-radius: 999px; padding: .35em .8em; font-size: .75rem; font-weight: 600; }
.imp-badge-draft        { background:#e5e7eb; color:#374151; }
.imp-badge-submitted    { background:#dbeafe; color:#1d4ed8; }
.imp-badge-screening    { background:#fef3c7; color:#b45309; }
.imp-badge-underreview  { background:#ede9fe; color:#6d28d9; }
.imp-badge-approved     { background:#d1fae5; color:#047857; }
.imp-badge-refined      { background:#cffafe; color:#0e7490; }
.imp-badge-deferred     { background:#f3f4f6; color:#6b7280; }
.imp-badge-prioritized  { background:#fde68a; color:#92400e; }
.imp-badge-inimplementation { background:#c7d2fe; color:#3730a3; }
.imp-badge-implemented  { background:#bbf7d0; color:#166534; }
.imp-badge-rewarded     { background:#fed7aa; color:#c2410c; }
.imp-badge-rejected     { background:#fecaca; color:#b91c1c; }

/* ---------- Wizard stepper ---------- */
.imp-stepper { display: flex; gap: 0; }
.imp-step { flex: 1; text-align: center; position: relative; }
.imp-step .dot {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto .35rem;
  display: flex; align-items: center; justify-content: center;
  background: #e3e8f0; color: var(--imp-muted); font-weight: 600; font-size: .85rem;
  border: 2px solid #e3e8f0; z-index: 1; position: relative;
}
.imp-step.done .dot     { background: var(--imp-navy); border-color: var(--imp-navy); color: #fff; }
.imp-step.current .dot  { background: var(--imp-orange); border-color: var(--imp-orange); color: #fff; }
.imp-step .lbl { font-size: .75rem; color: var(--imp-muted); font-weight: 500; }
.imp-step.current .lbl { color: var(--imp-orange); font-weight: 600; }
.imp-step:not(:first-child)::before {
  content: ""; position: absolute; top: 16px; left: -50%; width: 100%;
  height: 2px; background: #e3e8f0;
}
.imp-step.done:not(:first-child)::before,
.imp-step.current:not(:first-child)::before { background: var(--imp-navy); }

/* ---------- Timeline (idea detail) ---------- */
.imp-timeline { list-style: none; padding-left: 0; margin: 0; }
.imp-timeline li { position: relative; padding: 0 0 1.4rem 2rem; }
.imp-timeline li::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: -6px;
  width: 2px; background: var(--imp-card-border);
}
.imp-timeline li:last-child::before { display: none; }
.imp-timeline li::after {
  content: ""; position: absolute; left: 2px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--imp-navy);
}
.imp-timeline li.current::after { border-color: var(--imp-orange); }

/* ---------- Splash ---------- */
.imp-splash {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--imp-navy-dark) 0%, var(--imp-navy) 55%, var(--imp-navy-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.imp-splash-card { text-align: center; max-width: 460px; padding: 2rem; }
.imp-splash-logo {
  width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 1.5rem;
  background: var(--imp-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

/* ---------- Misc ---------- */
.imp-kpi { font-size: 2rem; font-weight: 700; color: var(--imp-navy); }
.imp-kpi-label { color: var(--imp-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
a { color: var(--imp-navy-light); }
.table > :not(caption) > * > * { padding: .75rem .75rem; }
