/* ============================================================
   GREENGATE EB-5 HUB — Global Stylesheet
   Brand Colors: #5fbb46 (green), #023675 (navy), #848484 (gray)
   Fonts: Montserrat + Work Sans + Nunito
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Work+Sans:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ──────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES
   ────────────────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --green:       #5fbb46;
  --green-dark:  #4a9a34;
  --green-light: #7ecc65;
  --green-pale:  #eaf7e5;
  --navy:        #023675;
  --navy-dark:   #012458;
  --navy-light:  #1a4f96;
  --navy-pale:   #e8eef8;
  --gray:        #848484;
  --gray-light:  #c4c4c4;
  --gray-pale:   #f5f5f5;
  --white:       #ffffff;
  --black:       #1a1a2e;

  /* Semantic */
  --text-primary:    #1a2332;
  --text-secondary:  #4a5568;
  --text-muted:      #848484;
  --border:          #e2e8f0;
  --border-focus:    #5fbb46;
  --surface:         #ffffff;
  --surface-alt:     #f8fafc;

  /* Status Colors */
  --success:  #5fbb46;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #3b82f6;

  /* Gradients */
  --grad-hero:    linear-gradient(135deg, #012458 0%, #023675 50%, #1a4f96 100%);
  --grad-green:   linear-gradient(135deg, #4a9a34 0%, #5fbb46 60%, #7ecc65 100%);
  --grad-card:    linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --grad-glass:   linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(2,54,117,0.08), 0 1px 2px rgba(2,54,117,0.04);
  --shadow-md:   0 4px 16px rgba(2,54,117,0.10), 0 2px 6px rgba(2,54,117,0.06);
  --shadow-lg:   0 8px 32px rgba(2,54,117,0.14), 0 4px 12px rgba(2,54,117,0.08);
  --shadow-xl:   0 20px 60px rgba(2,54,117,0.18), 0 8px 24px rgba(2,54,117,0.10);
  --shadow-green: 0 4px 20px rgba(95,187,70,0.25);

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Work Sans', sans-serif;
  --font-accent:  'Nunito', sans-serif;

  /* Transitions */
  --trans-fast:   0.15s ease;
  --trans-med:    0.25s ease;
  --trans-slow:   0.4s ease;

  /* Layout */
  --sidebar-w:  260px;
  --topbar-h:   64px;
  --content-max: 1280px;
}

/* ──────────────────────────────────────────────────────────
   RESET & BASE
   ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-alt);
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; transition: color var(--trans-fast); }
a:hover { color: var(--green); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

input, textarea, select {
  font-family: var(--font-body);
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

/* ──────────────────────────────────────────────────────────
   LAYOUT
   ────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--trans-med);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Text-only logo variant (no icon) */
.sidebar-logo--text-only {
  gap: 0;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  line-height: 1.15;
}

/* Enlarged text when no icon is present */
.sidebar-logo-text--large .brand-green,
.sidebar-logo-text--large .brand-white {
  font-size: 1.45rem !important;
  letter-spacing: 0.02em !important;
}

.sidebar-logo-text--large .sidebar-logo-sub {
  font-size: 0.68rem !important;
  margin-top: 3px !important;
}

.sidebar-logo-text .brand-green {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--green-light);
  letter-spacing: -0.02em;
}

.sidebar-logo-text .brand-white {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.sidebar-logo-sub {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}

.nav-section-label {
  font-family: var(--font-accent);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0.75rem 1.25rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--trans-fast);
  cursor: pointer;
  position: relative;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

.nav-item.active {
  color: var(--white);
  background: rgba(95,187,70,0.18);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
  border-radius: 0 2px 2px 0;
}

.nav-item i {
  width: 18px;
  font-size: 0.95rem;
  text-align: center;
  opacity: 0.85;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--green);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-contact-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 0.875rem;
}

.sidebar-contact-card p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-accent);
  line-height: 1.5;
}

.sidebar-contact-card a {
  color: var(--green-light);
  font-weight: 600;
}

.sidebar-contact-card .contact-phone {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.25rem;
}

/* MAIN CONTENT AREA */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.topbar-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-accent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  min-width: 220px;
  transition: all var(--trans-fast);
}

.topbar-search:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(95,187,70,0.12);
}

.topbar-search input {
  border: none;
  background: none;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}

.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search i { color: var(--text-muted); font-size: 0.8rem; }

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: all var(--trans-fast);
  font-size: 0.85rem;
  position: relative;
}

.topbar-btn:hover {
  background: var(--navy-pale);
  color: var(--navy);
  border-color: var(--navy-light);
}

.topbar-btn .notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.mobile-menu-btn {
  display: none;
  color: var(--navy);
  font-size: 1.1rem;
}

/* PAGE CONTENT */
.page-content {
  flex: 1;
  padding: 1.5rem;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

/* ──────────────────────────────────────────────────────────
   COMPONENTS
   ────────────────────────────────────────────────────────── */

/* PAGE HEADER */
.page-header {
  margin-bottom: 1.75rem;
}

.page-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-family: var(--font-accent);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-accent);
}

.breadcrumb span { color: var(--green); font-weight: 600; }
.breadcrumb i { font-size: 0.6rem; }

/* CARDS */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--trans-med), transform var(--trans-med);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* STAT CARDS */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-med);
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-icon.green  { background: var(--green-pale);  color: var(--green-dark); }
.stat-icon.navy   { background: var(--navy-pale);   color: var(--navy); }
.stat-icon.gray   { background: var(--gray-pale);   color: var(--gray); }
.stat-icon.orange { background: #fff7ed;             color: #c2410c; }

.stat-info .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-family: var(--font-accent);
}

.stat-info .stat-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin: 0.15rem 0;
}

.stat-info .stat-delta {
  font-size: 0.75rem;
  font-family: var(--font-accent);
  font-weight: 600;
}

.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }
.stat-delta i    { margin-right: 2px; font-size: 0.65rem; }

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-accent);
  letter-spacing: 0.02em;
}

.badge-green   { background: var(--green-pale);  color: var(--green-dark); }
.badge-navy    { background: var(--navy-pale);   color: var(--navy); }
.badge-gray    { background: var(--gray-pale);   color: var(--gray); }
.badge-orange  { background: #fff7ed;            color: #c2410c; }
.badge-red     { background: #fef2f2;            color: #b91c1c; }
.badge-yellow  { background: #fefce8;            color: #854d0e; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--trans-fast);
  border: 1.5px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-green:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy-pale);
  color: var(--navy);
}

.btn-outline-green {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green);
}
.btn-outline-green:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 0.4rem 0.75rem;
}
.btn-ghost:hover {
  background: var(--surface-alt);
  color: var(--navy);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
}

/* INPUTS / FORMS */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-family: var(--font-accent);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.55rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--white);
  transition: all var(--trans-fast);
  outline: none;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(95,187,70,0.12);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23848484' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 100px; }

/* ALERTS */
.alert {
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-left: 4px solid;
  margin-bottom: 1rem;
}

.alert i { margin-top: 1px; font-size: 0.95rem; flex-shrink: 0; }

.alert-info   { background: #eff6ff; border-color: var(--info);    color: #1e40af; }
.alert-success { background: var(--green-pale); border-color: var(--green); color: var(--green-dark); }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }
.alert-danger  { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }

/* TAGS */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-accent);
  background: var(--gray-pale);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--trans-fast);
  cursor: pointer;
}

.tag:hover, .tag.active {
  background: var(--navy-pale);
  color: var(--navy);
  border-color: var(--navy-light);
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* GRID UTILITIES */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* FLEX UTILITIES */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-xs  { gap: 0.25rem; }
.gap-sm  { gap: 0.5rem; }
.gap-md  { gap: 1rem; }
.gap-lg  { gap: 1.5rem; }
.flex-1  { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* TEXT UTILITIES */
.text-sm   { font-size: 0.8rem; }
.text-xs   { font-size: 0.72rem; }
.text-lg   { font-size: 1.05rem; }
.text-muted { color: var(--text-muted); }
.text-navy  { color: var(--navy); }
.text-green { color: var(--green-dark); }
.text-white { color: var(--white); }
.font-heading { font-family: var(--font-heading); }
.font-accent  { font-family: var(--font-accent); }
.font-bold    { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* MARGIN / PADDING */
.mt-xs { margin-top: 0.25rem; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mt-xl { margin-top: 2rem; }
.mb-xs { margin-bottom: 0.25rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 1.5rem; }
.mb-xl { margin-bottom: 2rem; }

/* ──────────────────────────────────────────────────────────
   HERO BANNER (Home / Dashboard)
   ────────────────────────────────────────────────────────── */
.hero-banner {
  background: var(--grad-hero);
  border-radius: var(--radius-2xl);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.hero-banner::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 280px; height: 280px;
  background: rgba(95,187,70,0.1);
  border-radius: 50%;
}

.hero-banner::after {
  content: '';
  position: absolute;
  right: 60px; bottom: -80px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-text { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-title span { color: var(--green-light); }

.hero-subtitle {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  max-width: 480px;
  line-height: 1.6;
  font-family: var(--font-accent);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.hero-stat {
  text-align: center;
  color: white;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-light);
  line-height: 1;
}

.hero-stat-label {
  font-family: var(--font-accent);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-top: 0.25rem;
}

/* QUICK ACCESS TILES */
.quick-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.quick-tile {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  transition: all var(--trans-med);
  position: relative;
  overflow: hidden;
}

.quick-tile::before {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-radius: 50%;
  opacity: 0.08;
  transition: all var(--trans-med);
}

.quick-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.quick-tile:hover::before { width: 100px; height: 100px; }

.quick-tile.green::before  { background: var(--green); }
.quick-tile.navy::before   { background: var(--navy); }
.quick-tile.orange::before { background: #f59e0b; }
.quick-tile.teal::before   { background: #0ea5e9; }

.tile-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.tile-icon.green  { background: var(--green-pale); color: var(--green-dark); }
.tile-icon.navy   { background: var(--navy-pale);  color: var(--navy); }
.tile-icon.orange { background: #fff7ed;            color: #c2410c; }
.tile-icon.teal   { background: #e0f2fe;            color: #0369a1; }

.tile-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
}

.tile-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-accent);
  line-height: 1.4;
}

.tile-arrow {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: all var(--trans-fast);
}

.quick-tile:hover .tile-arrow { color: var(--navy); transform: translateX(3px); }

/* ──────────────────────────────────────────────────────────
   PROJECT / OPPORTUNITY CARDS
   ────────────────────────────────────────────────────────── */
.project-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--trans-med);
  cursor: pointer;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--green);
}

.project-card-header {
  background: var(--grad-hero);
  padding: 1.25rem;
  position: relative;
}

.project-card-header.industry-manufacturing { background: linear-gradient(135deg, #1e3a5f 0%, #2d5986 100%); }
.project-card-header.industry-oil-gas       { background: linear-gradient(135deg, #1c2b3a 0%, #344a5e 100%); }
.project-card-header.industry-hospitality   { background: linear-gradient(135deg, #1a3a2a 0%, #2d5c42 100%); }
.project-card-header.industry-transportation{ background: linear-gradient(135deg, #1f1b4b 0%, #363078 100%); }
.project-card-header.industry-healthcare    { background: linear-gradient(135deg, #1a2f4a 0%, #2a4d73 100%); }

.project-industry-badge {
  font-family: var(--font-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.project-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.project-card-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-accent);
}

.project-featured-tag {
  position: absolute;
  top: 0.875rem; right: 0.875rem;
  background: var(--green);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-accent);
}

.project-card-body { padding: 1.25rem; }

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-metric {
  text-align: center;
  padding: 0.625rem 0.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.project-metric-value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.project-metric-label {
  font-family: var(--font-accent);
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.project-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
}

/* ──────────────────────────────────────────────────────────
   LEGISLATION UPDATE CARDS
   ────────────────────────────────────────────────────────── */
.update-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  transition: all var(--trans-med);
  cursor: pointer;
}

.update-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--navy-light);
  transform: translateX(2px);
}

.update-impact-bar {
  width: 4px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.update-impact-bar.high   { background: var(--danger); }
.update-impact-bar.medium { background: var(--warning); }
.update-impact-bar.low    { background: var(--success); }

.update-content { flex: 1; }

.update-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.update-category {
  font-family: var(--font-accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  background: var(--navy-pale);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.update-date {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.update-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.update-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.greengate-take {
  background: linear-gradient(135deg, var(--green-pale) 0%, #f0fbe9 100%);
  border: 1px solid rgba(95,187,70,0.25);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.greengate-take-label {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  margin-bottom: 0.35rem;
}

.greengate-take p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ──────────────────────────────────────────────────────────
   ASK ISMAEL
   ────────────────────────────────────────────────────────── */
.question-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transition: all var(--trans-med);
}

.question-card:hover { box-shadow: var(--shadow-md); }

.question-card-header {
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
}

.vote-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 48px;
}

.vote-count {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.vote-label {
  font-family: var(--font-accent);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.vote-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all var(--trans-fast);
  background: var(--white);
}

.vote-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-pale);
}

.question-body { flex: 1; }

.question-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.question-answer {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  background: var(--surface-alt);
  display: none;
}

.question-answer.show { display: block; }

.answer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.answer-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--grad-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.answer-by-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.answer-by-title {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.answer-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ──────────────────────────────────────────────────────────
   LEARNING CENTER
   ────────────────────────────────────────────────────────── */
.module-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--trans-med);
  cursor: pointer;
}

.module-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.module-card-header {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.module-number {
  position: absolute;
  top: 0.75rem; left: 0.875rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
}

.module-icon-main {
  font-size: 2.25rem;
  color: rgba(255,255,255,0.9);
}

.progress-ring-wrap {
  position: absolute;
  bottom: 0.75rem; right: 0.875rem;
}

.module-card-body { padding: 1.25rem; }

.module-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.module-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.module-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.module-progress-fill {
  height: 100%;
  background: var(--grad-green);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.module-progress-text {
  font-family: var(--font-accent);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.module-card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
}

.module-duration {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* BADGE ACHIEVEMENT */
.badge-achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--trans-med);
}

.badge-achievement:hover { box-shadow: var(--shadow-md); }

.badge-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.badge-achievement.earned .badge-icon-wrap { background: var(--green-pale); color: var(--green-dark); }
.badge-achievement.locked .badge-icon-wrap { background: var(--gray-pale);  color: var(--gray-light); }

.badge-achievement-name {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
}

.badge-achievement.locked .badge-achievement-name { color: var(--gray); }

/* ──────────────────────────────────────────────────────────
   BUSINESS INTELLIGENCE / CHARTS
   ────────────────────────────────────────────────────────── */
.chart-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.chart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.chart-subtitle {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.chart-body {
  padding: 1.25rem 1.5rem;
}

/* ──────────────────────────────────────────────────────────
   TEA MAP
   ────────────────────────────────────────────────────────── */
.map-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ──────────────────────────────────────────────────────────
   MANGO MAPS — iframe responsivo dentro do pontilhado
   ────────────────────────────────────────────────────────── */
/* ── MANGO MAPS CONTAINER
   contain:strict + overflow:hidden impede qualquer filho
   (incluindo scripts do MangoMaps) de expandir o pai.
   A altura é controlada EXCLUSIVAMENTE aqui.
   ─────────────────────────────────────────────────── */
.mango-map-clip {
  /* Dimensionamento rígido */
  position: relative;
  width: 100%;
  height: 540px;
  min-height: 540px;
  max-height: 540px;

  /* Confina qualquer overflow do iframe ou scripts externos */
  overflow: hidden !important;
  contain: strict;          /* impede que filhos influenciem o tamanho do pai */

  /* Visual */
  border-radius: var(--radius-xl);
  border: 2px dashed var(--navy-light);
  background: linear-gradient(135deg, var(--navy-pale) 0%, #dce8f9 100%);
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.mango-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-direction: column;
  color: var(--navy-light);
  font-family: var(--font-accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.mango-map-loading i {
  font-size: 2.5rem;
  opacity: 0.4;
  animation: pulse 1.8s ease infinite;
}

/* Tablet */
@media (max-width: 1024px) {
  .mango-map-clip {
    height: 480px;
    min-height: 480px;
    max-height: 480px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .mango-map-clip {
    height: 420px;
    min-height: 420px;
    max-height: 420px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .mango-map-clip {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    border-radius: var(--radius-lg);
  }
}

/* Very small */
@media (max-width: 360px) {
  .mango-map-clip {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.875rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   CHART BODY RESPONSIVE HEIGHTS
   ────────────────────────────────────────────────────────── */
.chart-body--bar   { height: 280px; position: relative; }
.chart-body--donut { height: 260px; display: flex; align-items: center; justify-content: center; position: relative; }
.chart-body--donut canvas { max-width: 260px; max-height: 260px; }
.chart-body--line  { height: 240px; position: relative; }

/* ──────────────────────────────────────────────────────────
   TEA MAP CONTROLS — responsive layout
   ────────────────────────────────────────────────────────── */
.tea-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tea-btn-group {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────
   SERVICES / CONTACT PAGE
   ────────────────────────────────────────────────────────── */
.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--trans-med);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--green);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--green-pale);
  border-radius: 0 var(--radius-xl) 0 100%;
  opacity: 0;
  transition: opacity var(--trans-med);
}

.service-card:hover::after { opacity: 1; }

.service-icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--navy-pale);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.service-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.service-bullets {
  list-style: none;
}

.service-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-accent);
  padding: 0.2rem 0;
}

.service-bullets li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   FILTER BAR
   ────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 140px;
}

.filter-label {
  font-family: var(--font-accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ──────────────────────────────────────────────────────────
   FAQ / GLOSSARY
   ────────────────────────────────────────────────────────── */
.faq-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: all var(--trans-fast);
}

.faq-item:hover { border-color: var(--navy-light); }

.faq-question {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
}

.faq-question i {
  color: var(--green);
  transition: transform var(--trans-med);
  flex-shrink: 0;
}

.faq-item.open .faq-question i { transform: rotate(180deg); }

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1rem;
}

.faq-answer p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ──────────────────────────────────────────────────────────
   NOTIFICATIONS PANEL
   ────────────────────────────────────────────────────────── */
.notif-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: 360px;
  height: calc(100vh - var(--topbar-h));
  background: var(--white);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--trans-med);
}

.notif-panel.open { transform: translateX(0); }

.notif-panel-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.875rem;
  cursor: pointer;
  transition: background var(--trans-fast);
}

.notif-item:hover { background: var(--surface-alt); }

.notif-item.unread { background: var(--navy-pale); }

.notif-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.notif-icon.green  { background: var(--green-pale); color: var(--green-dark); }
.notif-icon.navy   { background: var(--navy-pale);  color: var(--navy); }
.notif-icon.orange { background: #fff7ed;            color: #c2410c; }

.notif-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-text strong {
  color: var(--navy);
  font-weight: 600;
}

.notif-time {
  font-family: var(--font-accent);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ──────────────────────────────────────────────────────────
   MODAL
   ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,54,117,0.4);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans-med);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--trans-med);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

.modal-close:hover { background: var(--gray-pale); color: var(--navy); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ──────────────────────────────────────────────────────────
   MOBILE OVERLAY
   ────────────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ──────────────────────────────────────────────────────────
   SCROLLBAR
   ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-alt); }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — inclui comportamento dentro de iframe
   ────────────────────────────────────────────────────────── */

/* ── Tablet largo ── */
@media (max-width: 1100px) {
  .grid-4        { grid-template-columns: repeat(2, 1fr); }
  .quick-tiles   { grid-template-columns: repeat(2, 1fr); }
  .hero-stats    { display: none; }
  .kpi-grid      { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet / iframe médio ── */
@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .sidebar-overlay.open { display: block; }
  .main-wrapper          { margin-left: 0; }
  .mobile-menu-btn       { display: flex; }
  .topbar-search         { min-width: 140px; }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }

  .ismael-card  { grid-template-columns: 1fr !important; text-align: center; }
  .ismael-avatar { margin: 0 auto; }
}

/* ── Mobile / iframe estreito ── */
@media (max-width: 640px) {
  .page-content   { padding: 0.875rem; }
  .quick-tiles    { grid-template-columns: 1fr 1fr; }
  .hero-banner    { padding: 1.25rem; flex-direction: column; }
  .hero-title     { font-size: 1.15rem; }
  .hero-subtitle  { font-size: 0.8rem; }
  .hero-stats     { display: none; }
  .hero-actions   { flex-direction: column; }
  .filter-bar     { flex-direction: column; }
  .filter-group   { min-width: unset; width: 100%; }
  .topbar-search  { display: none; }
  .project-metrics { grid-template-columns: repeat(3, 1fr); }
  .grid-4         { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid       { grid-template-columns: repeat(2, 1fr); }

  /* Topbar compacto */
  .topbar { padding: 0 0.875rem; gap: 0.5rem; }
  .topbar-title   { font-size: 0.875rem; }
  .topbar-subtitle { display: none; }
  .topbar-right .btn-green { display: none; }

  /* Cards compactos */
  .card-header    { padding: 0.875rem 1rem; }
  .card-body      { padding: 1rem; }
  .stat-card      { padding: 1rem; }
  .stat-value     { font-size: 1.2rem; }

  /* Page header compacto */
  .page-header h1 { font-size: 1.2rem; }
  .page-header-inner { flex-direction: column; align-items: flex-start; }

  /* Projeto cards */
  .project-card-header { padding: 1rem; }
  .project-card-body   { padding: 1rem; }
  .project-card-footer { padding: 0.75rem 1rem; }

  /* Módulos */
  .module-card-header { height: 90px; }
  .module-icon-main   { font-size: 1.75rem; }

  /* Update items */
  .update-item { padding: 1rem; }

  /* Section tabs */
  .section-tabs { gap: 0.15rem; }
  .section-tab  { padding: 0.4rem 0.625rem; font-size: 0.75rem; }

  /* Ismael card */
  .ismael-card   { padding: 1.25rem; grid-template-columns: 1fr !important; }
  .ismael-avatar { width: 60px; height: 60px; font-size: 1.35rem; margin: 0 auto; }
  .ismael-name   { font-size: 0.95rem; }
  .ismael-bio    { font-size: 0.78rem; }

  /* FAQ */
  .faq-question  { font-size: 0.82rem; }

  /* Contact */
  .contact-cta-card { padding: 1.5rem; }
  .contact-cta-card h2 { font-size: 1.1rem; }

  /* Hero banner services */
  .hero-banner.mb-xl { padding: 1.25rem; }
}

/* ── Mobile muito pequeno / iframe <400px ── */
@media (max-width: 400px) {
  .quick-tiles    { grid-template-columns: 1fr; }
  .grid-4         { grid-template-columns: 1fr; }
  .kpi-grid       { grid-template-columns: 1fr; }
  .page-content   { padding: 0.625rem; }

  .hero-banner    { padding: 1rem; }
  .hero-title     { font-size: 1rem; }
  .hero-eyebrow   { font-size: 0.65rem; }

  .topbar         { padding: 0 0.625rem; }
  .topbar-btn:not(#mobileMenuBtn) { display: none; }

  .stat-card      { padding: 0.75rem; }
  .stat-icon      { width: 38px; height: 38px; font-size: 1rem; }
  .stat-value     { font-size: 1.05rem; }

  .project-metrics { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .project-metric  { padding: 0.4rem; }
  .project-metric-value { font-size: 0.82rem; }

  .section-tab    { padding: 0.35rem 0.5rem; font-size: 0.7rem; }

  .module-card-header { height: 75px; }
  .module-icon-main   { font-size: 1.5rem; }
}

/* ──────────────────────────────────────────────────────────
   BREAKPOINT CLASSES (injetadas via JS — funciona em iframe)
   Espelham exatamente os @media queries acima, mas aplicados
   via classe no <html> pelo ResizeObserver do app.js,
   garantindo que o layout responda à largura real do iframe.
   ────────────────────────────────────────────────────────── */

/* bp-md = viewport 640–900px (tablet / iframe médio) */
html.bp-md .sidebar              { transform: translateX(-100%); }
html.bp-md .sidebar.open         { transform: translateX(0); box-shadow: var(--shadow-xl); }
html.bp-md .sidebar-overlay.open { display: block; }
html.bp-md .main-wrapper         { margin-left: 0; }
html.bp-md .mobile-menu-btn      { display: flex; }
html.bp-md .grid-2,
html.bp-md .grid-3               { grid-template-columns: 1fr; }
html.bp-md .hero-stats           { display: none; }
html.bp-md .ismael-card          { grid-template-columns: 1fr !important; text-align: center; }
html.bp-md .ismael-avatar        { margin: 0 auto; }

/* bp-sm = viewport 400–640px (mobile) */
html.bp-sm .sidebar              { transform: translateX(-100%); }
html.bp-sm .sidebar.open         { transform: translateX(0); box-shadow: var(--shadow-xl); }
html.bp-sm .sidebar-overlay.open { display: block; }
html.bp-sm .main-wrapper         { margin-left: 0; }
html.bp-sm .mobile-menu-btn      { display: flex; }
html.bp-sm .topbar               { padding: 0 0.875rem; gap: 0.5rem; }
html.bp-sm .topbar-title         { font-size: 0.875rem; }
html.bp-sm .topbar-subtitle      { display: none; }
html.bp-sm .topbar-search        { display: none; }
html.bp-sm .topbar-right .btn-green { display: none; }
html.bp-sm .hero-stats           { display: none; }
html.bp-sm .hero-banner          { padding: 1.25rem; flex-direction: column; }
html.bp-sm .hero-title           { font-size: 1.15rem; }
html.bp-sm .hero-subtitle        { font-size: 0.8rem; }
html.bp-sm .hero-actions         { flex-direction: column; }
html.bp-sm .grid-2,
html.bp-sm .grid-3               { grid-template-columns: 1fr; }
html.bp-sm .grid-4               { grid-template-columns: repeat(2, 1fr); }
html.bp-sm .kpi-grid             { grid-template-columns: repeat(2, 1fr); }
html.bp-sm .quick-tiles          { grid-template-columns: 1fr 1fr; }
html.bp-sm .filter-bar           { flex-direction: column; }
html.bp-sm .filter-group         { min-width: unset; width: 100%; }
html.bp-sm .page-content         { padding: 0.875rem; }
html.bp-sm .page-header h1       { font-size: 1.2rem; }
html.bp-sm .page-header-inner    { flex-direction: column; align-items: flex-start; }
html.bp-sm .card-header          { padding: 0.875rem 1rem; }
html.bp-sm .card-body            { padding: 1rem; }
html.bp-sm .stat-card            { padding: 1rem; }
html.bp-sm .stat-value           { font-size: 1.2rem; }
html.bp-sm .ismael-card          { padding: 1.25rem; grid-template-columns: 1fr !important; }
html.bp-sm .ismael-avatar        { width: 60px; height: 60px; font-size: 1.35rem; margin: 0 auto; }
html.bp-sm .section-tab          { padding: 0.4rem 0.625rem; font-size: 0.75rem; }
html.bp-sm .module-card-header   { height: 90px; }
html.bp-sm .module-icon-main     { font-size: 1.75rem; }

/* bp-xs = viewport <400px (mobile muito pequeno) */
html.bp-xs .sidebar              { transform: translateX(-100%); }
html.bp-xs .sidebar.open         { transform: translateX(0); box-shadow: var(--shadow-xl); }
html.bp-xs .sidebar-overlay.open { display: block; }
html.bp-xs .main-wrapper         { margin-left: 0; }
html.bp-xs .mobile-menu-btn      { display: flex; }
html.bp-xs .topbar               { padding: 0 0.625rem; }
html.bp-xs .topbar-title         { font-size: 0.82rem; }
html.bp-xs .topbar-subtitle      { display: none; }
html.bp-xs .topbar-search        { display: none; }
html.bp-xs .topbar-right .btn-green { display: none; }
html.bp-xs .topbar-btn:not(#mobileMenuBtn) { display: none; }
html.bp-xs .hero-stats           { display: none; }
html.bp-xs .hero-banner          { padding: 1rem; flex-direction: column; }
html.bp-xs .hero-title           { font-size: 1rem; }
html.bp-xs .hero-eyebrow         { font-size: 0.65rem; }
html.bp-xs .hero-actions         { flex-direction: column; }
html.bp-xs .grid-2,
html.bp-xs .grid-3               { grid-template-columns: 1fr; }
html.bp-xs .grid-4               { grid-template-columns: 1fr; }
html.bp-xs .kpi-grid             { grid-template-columns: 1fr; }
html.bp-xs .quick-tiles          { grid-template-columns: 1fr; }
html.bp-xs .filter-bar           { flex-direction: column; }
html.bp-xs .filter-group         { min-width: unset; width: 100%; }
html.bp-xs .page-content         { padding: 0.625rem; }
html.bp-xs .page-header h1       { font-size: 1.05rem; }
html.bp-xs .page-header-inner    { flex-direction: column; align-items: flex-start; }
html.bp-xs .card-header          { padding: 0.75rem 0.875rem; }
html.bp-xs .card-body            { padding: 0.875rem; }
html.bp-xs .stat-card            { padding: 0.75rem; }
html.bp-xs .stat-icon            { width: 38px; height: 38px; font-size: 1rem; }
html.bp-xs .stat-value           { font-size: 1.05rem; }
html.bp-xs .ismael-card          { padding: 1rem; grid-template-columns: 1fr !important; }
html.bp-xs .ismael-avatar        { width: 56px; height: 56px; font-size: 1.2rem; margin: 0 auto; }
html.bp-xs .section-tab          { padding: 0.35rem 0.5rem; font-size: 0.7rem; }
html.bp-xs .module-card-header   { height: 75px; }
html.bp-xs .module-icon-main     { font-size: 1.5rem; }
html.bp-xs .project-metrics      { gap: 0.4rem; }
html.bp-xs .project-metric       { padding: 0.4rem; }
html.bp-xs .project-metric-value { font-size: 0.82rem; }

/* ──────────────────────────────────────────────────────────
   UTILITY — HIDE/SHOW
   ────────────────────────────────────────────────────────── */
.page-section { display: none; }
.page-section.active { display: block; }

.hidden { display: none !important; }

/* ──────────────────────────────────────────────────────────
   LOADING SKELETON
   ────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-pale) 25%, #ececec 37%, var(--gray-pale) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ──────────────────────────────────────────────────────────
   ANIMATIONS
   ────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.animate-in { animation: fadeIn 0.35s ease forwards; }

/* GREENGATE TAKE "G" mark */
.greengate-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--green-dark);
  background: var(--green-pale);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(95,187,70,0.3);
}

/* ──────────────────────────────────────────────────────────
   SERVICES HERO BANNER (2-column balanced layout)
   ────────────────────────────────────────────────────────── */
.services-hero-banner {
  background: linear-gradient(135deg, #012458 0%, #023675 60%, #1a4f96 100%);
  border-radius: var(--radius-2xl);
  padding: 2.5rem 2.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.services-hero-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(95,187,70,0.08);
  pointer-events: none;
}

.services-hero-banner::after {
  content: '';
  position: absolute;
  left: -40px; bottom: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(95,187,70,0.05);
  pointer-events: none;
}

.services-hero-left {
  position: relative;
  z-index: 1;
}

.services-hero-right {
  position: relative;
  z-index: 1;
}

.services-hero-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin: 0.5rem 0 1.25rem;
}

.services-hero-title span {
  color: var(--green-light);
}

.services-hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.services-hero-stat {
  display: flex;
  flex-direction: column;
}

.services-stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-light);
  line-height: 1;
}

.services-stat-label {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.services-hero-desc {
  font-family: var(--font-accent);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

/* ──────────────────────────────────────────────────────────
   ISMAEL CREDENTIALS STRIP
   ────────────────────────────────────────────────────────── */
.ismael-credentials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
  z-index: 1;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255,255,255,0.15);
  min-width: 140px;
}

.ismael-cred-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-accent);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
}

.ismael-cred-item i {
  width: 14px;
  color: var(--green-light);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Ismael card horizontal layout (desktop) */
.ismael-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.75rem;
  align-items: start;
}

/* ──────────────────────────────────────────────────────────
   LEARNING CENTER — CLEAN CORPORATE ICONS
   ────────────────────────────────────────────────────────── */
.module-card-header .fa-solid,
.module-card-header .fa-regular {
  /* Use font awesome directly — already handles icons cleanly */
}

/* ──────────────────────────────────────────────────────────
   SIDEBAR LOGO SIZING FIX
   ────────────────────────────────────────────────────────── */
.sidebar-logo-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   COMPREHENSIVE MOBILE RESPONSIVE OVERHAUL
   Target: every component looks perfect on 320–767px
   ────────────────────────────────────────────────────────── */

/* === TOPBAR mobile === */
@media (max-width: 900px) {
  .mobile-menu-btn { display: flex !important; }
  .main-wrapper { margin-left: 0 !important; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .sidebar-overlay.open { display: block; }
}

@media (max-width: 768px) {
  /* Page content padding */
  .page-content { padding: 0.875rem !important; }

  /* Grids collapse */
  .grid-2,
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .quick-tiles { grid-template-columns: repeat(2, 1fr) !important; }

  /* Topbar */
  .topbar { padding: 0 0.875rem; gap: 0.5rem; height: auto; min-height: 56px; }
  .topbar-search { display: none; }
  .topbar-right .btn-green { display: none; }
  .topbar-subtitle { display: none; }
  .topbar-title { font-size: 0.9rem; }

  /* Hero banner */
  .hero-banner { padding: 1.25rem 1.25rem 1.5rem; flex-direction: column; gap: 1rem; }
  .hero-title { font-size: 1.2rem; }
  .hero-subtitle { font-size: 0.82rem; }
  .hero-stats { display: none !important; }
  .hero-actions { flex-direction: column; gap: 0.625rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Page header */
  .page-header h1 { font-size: 1.15rem; }
  .page-header p { font-size: 0.82rem; }
  .page-header-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .page-header-inner .btn { width: 100%; justify-content: center; }

  /* Cards */
  .card-header { padding: 0.875rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .card-body { padding: 0.875rem 1rem; }
  .stat-card { padding: 0.875rem 1rem; }
  .stat-value { font-size: 1.2rem; }

  /* Filter bar */
  .filter-bar { flex-direction: column; gap: 0.625rem; }
  .filter-group { min-width: unset !important; width: 100%; }
  .filter-group:last-child { width: auto; align-self: flex-start; }

  /* Project cards */
  .project-card-header { padding: 1rem; }
  .project-card-body { padding: 1rem; }
  .project-card-footer { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .project-metrics { grid-template-columns: repeat(3, 1fr) !important; gap: 0.5rem; }
  .project-metric { padding: 0.5rem 0.4rem; }
  .project-metric-value { font-size: 0.85rem; }

  /* Ismael card mobile */
  .ismael-card {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 1rem;
  }
  .ismael-avatar { margin: 0 auto; width: 68px; height: 68px; font-size: 1.4rem; }
  .ismael-credentials {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-left: 0;
    padding-top: 1rem;
    min-width: unset;
    gap: 0.5rem 1rem;
  }
  .ismael-info { text-align: left; }
  .ismael-bio { max-width: 100%; }

  /* Section tabs */
  .section-tabs { gap: 0.15rem; flex-wrap: wrap; }
  .section-tab { padding: 0.4rem 0.7rem; font-size: 0.78rem; }

  /* Learning modules grid */
  .grid-3#modulesGrid { grid-template-columns: 1fr !important; }
  .grid-4#badgesGrid { grid-template-columns: repeat(2, 1fr) !important; }
  .module-card-header { height: 90px; }
  .module-icon-main { font-size: 1.75rem; }

  /* FAQ */
  .faq-question { font-size: 0.84rem; padding: 0.875rem 1rem; }

  /* Contact page */
  .contact-cta-card { padding: 1.5rem; }
  .contact-cta-card h2 { font-size: 1.1rem; }

  /* Services hero */
  .services-hero-banner {
    grid-template-columns: 1fr !important;
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }
  .services-hero-title { font-size: 1.25rem; }
  .services-hero-stats { gap: 1rem; }

  /* Update items */
  .update-item { padding: 1rem; }

  /* Breadcrumb */
  .breadcrumb { font-size: 0.75rem; }

  /* TEA map — full mobile fix */
  .map-placeholder { height: 260px; padding: 1rem; }
  .map-placeholder h3 { font-size: 0.95rem; }
  .map-placeholder p { font-size: 0.78rem; max-width: 100%; }
  .map-placeholder .btn { font-size: 0.78rem; padding: 0.4rem 0.875rem; white-space: nowrap; }
  .map-legend { flex-wrap: wrap; gap: 0.4rem 0.75rem; padding: 0.625rem 0.875rem; }
  .legend-item { font-size: 0.7rem; }

  /* TEA controls stacks on mobile */
  .tea-controls { flex-direction: column; align-items: flex-start; }
  .tea-btn-group { width: 100%; }
  .tea-btn-group .btn { flex: 1; justify-content: center; }

  /* Question cards */
  .question-card-header { padding: 0.875rem 1rem; }
  .vote-box { min-width: 40px; }
  .question-text { font-size: 0.84rem; }

  /* Chart cards — compact on mobile */
  .chart-card { overflow: hidden; }
  .chart-header { padding: 0.875rem 1rem; }
  .chart-title { font-size: 0.82rem; }
  .chart-subtitle { font-size: 0.7rem; }
  .chart-body--bar   { height: 220px !important; padding: 0.75rem; }
  .chart-body--donut { height: 220px !important; padding: 0.5rem; }
  .chart-body--donut canvas { max-width: 180px !important; max-height: 180px !important; }
  .chart-body--line  { height: 200px !important; padding: 0.75rem; }

  /* BI Export button full-width on mobile */
  .bi-export-btn { width: 100%; justify-content: center; }

  /* Tables horizontal scroll */
  .overflow-x-auto, [style*="overflow-x:auto"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* TEA table scrollable */
  #teaProjectTable { min-width: 560px; }

  /* Alert banners */
  .alert { padding: 0.75rem 1rem; font-size: 0.82rem; }

  /* Notif panel */
  .notif-panel { width: calc(100vw - 2rem); right: 1rem; }

  /* Modal */
  .modal { margin: 1rem; max-width: calc(100vw - 2rem); max-height: 90vh; }
  .modal-body { padding: 1rem; }
  .modal-footer { padding: 0.875rem 1rem; }

  /* Form fields */
  .grid-2.form-row { grid-template-columns: 1fr !important; }
}

/* === Very small mobile (< 480px) === */
@media (max-width: 480px) {
  .page-content { padding: 0.625rem !important; }
  .quick-tiles { grid-template-columns: 1fr 1fr !important; }
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }

  .hero-title { font-size: 1.05rem; }
  .hero-eyebrow { font-size: 0.68rem; }
  .hero-banner { padding: 1rem; }

  .topbar { padding: 0 0.625rem; gap: 0.375rem; }
  .topbar-title { font-size: 0.82rem; }
  .topbar-btn:not(#mobileMenuBtn):not([onclick="toggleNotifications()"]) { display: none; }

  .stat-card { padding: 0.75rem; gap: 0.625rem; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; }
  .stat-value { font-size: 1.05rem; }
  .stat-label { font-size: 0.7rem; }

  .card-header { padding: 0.75rem 0.875rem; }
  .card-body { padding: 0.75rem 0.875rem; }

  .project-metrics { grid-template-columns: repeat(3, 1fr) !important; gap: 0.375rem; }
  .project-metric { padding: 0.4rem 0.25rem; }
  .project-metric-value { font-size: 0.78rem; }

  .section-tab { padding: 0.35rem 0.5rem; font-size: 0.72rem; }

  .module-card-header { height: 75px; }
  .module-icon-main { font-size: 1.5rem; }

  .services-hero-banner { padding: 1rem; }
  .services-hero-title { font-size: 1.05rem; }

  .grid-4#badgesGrid { grid-template-columns: repeat(2, 1fr) !important; }

  .ismael-card { padding: 1rem; }
  .ismael-avatar { width: 56px; height: 56px; font-size: 1.2rem; }
  .ismael-name { font-size: 0.92rem; }
  .ismael-bio { font-size: 0.78rem; }
}

/* === Extra small (< 360px) === */
@media (max-width: 360px) {
  .quick-tiles { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: 1fr !important; }
  .kpi-grid { grid-template-columns: 1fr !important; }
  .page-content { padding: 0.5rem !important; }
  .services-hero-stats { flex-direction: column; gap: 0.625rem; }
}

/* ──────────────────────────────────────────────────────────
   BREAKPOINT CLASSES UPDATE (JS-injected for iframe compat)
   ────────────────────────────────────────────────────────── */

/* Update ismael-card for bp classes */
html.bp-md .ismael-card,
html.bp-sm .ismael-card,
html.bp-xs .ismael-card {
  grid-template-columns: 1fr !important;
  text-align: center;
}

html.bp-md .ismael-credentials,
html.bp-sm .ismael-credentials,
html.bp-xs .ismael-credentials {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  border-left: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-left: 0;
  padding-top: 1rem;
  min-width: unset;
}

html.bp-md .ismael-avatar,
html.bp-sm .ismael-avatar,
html.bp-xs .ismael-avatar {
  margin: 0 auto;
}

html.bp-md .services-hero-banner,
html.bp-sm .services-hero-banner,
html.bp-xs .services-hero-banner {
  grid-template-columns: 1fr !important;
  padding: 1.5rem 1.25rem;
  gap: 1.25rem;
}

html.bp-sm .services-hero-title,
html.bp-xs .services-hero-title {
  font-size: 1.2rem;
}

html.bp-sm .page-header-inner,
html.bp-xs .page-header-inner {
  flex-direction: column;
  align-items: flex-start;
}

html.bp-sm .filter-bar,
html.bp-xs .filter-bar {
  flex-direction: column;
}

html.bp-sm .filter-group,
html.bp-xs .filter-group {
  min-width: unset !important;
  width: 100%;
}

html.bp-xs .quick-tiles { grid-template-columns: 1fr !important; }
html.bp-xs .kpi-grid { grid-template-columns: 1fr !important; }

/* Topbar right actions hidden on small screens */
html.bp-sm .topbar-right .btn-green,
html.bp-xs .topbar-right .btn-green { display: none; }

html.bp-sm .topbar-search,
html.bp-xs .topbar-search { display: none; }

html.bp-xs .topbar-btn:not(#mobileMenuBtn):not([onclick="toggleNotifications()"]) { display: none; }

/* ══════════════════════════════════════════════════════════
   MOBILE OVERFLOW FIX — FINAL CONSOLIDATED LAYER
   Ensures NO element bleeds outside the viewport on mobile
   ════════════════════════════════════════════════════════ */

/* Global overflow guard */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Make sure the app shell never overflows */
  .app-shell, .main-wrapper, .page-content {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  /* ── TEA MAP full fix ── */
  #page-map {
    overflow-x: hidden;
  }

  /* Legend wraps properly */
  .map-legend {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem 0.75rem !important;
    padding: 0.625rem 0.875rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .legend-item {
    font-size: 0.72rem !important;
    white-space: nowrap;
  }

  /* TEA controls stack cleanly */
  .tea-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .tea-btn-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .tea-btn-group .btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-width: 120px !important;
    white-space: nowrap !important;
  }

  /* Mango Maps — mobile height override */
  .mango-map-clip {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
    overflow: hidden !important;
    contain: strict !important;
    border-radius: var(--radius-lg) !important;
  }

  /* TEA stats grid single column */
  #page-map .grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* TEA project table scrollable */
  #page-map .card > div {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  #teaProjectTable {
    min-width: 520px !important;
    max-width: none !important;
  }

  /* ── BUSINESS INTELLIGENCE full fix ── */
  #page-bi {
    overflow-x: hidden;
  }

  /* BI page header: stack button below title */
  #page-bi .page-header-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .bi-export-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* BI grids collapse to single column */
  #page-bi .grid-2 {
    grid-template-columns: 1fr !important;
  }

  /* KPI grid stays 2 columns but compact */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.625rem !important;
  }

  /* Chart cards don't overflow */
  .chart-card {
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .chart-header {
    padding: 0.875rem 1rem !important;
    flex-wrap: wrap !important;
    gap: 0.375rem !important;
  }

  .chart-title { font-size: 0.85rem !important; }
  .chart-subtitle { font-size: 0.72rem !important; }

  .chart-body {
    padding: 0.75rem !important;
    overflow: hidden !important;
  }

  .chart-body--bar   { height: 220px !important; }
  .chart-body--donut { height: 220px !important; }
  .chart-body--donut canvas {
    max-width: 180px !important;
    max-height: 180px !important;
  }
  .chart-body--line  { height: 200px !important; }

  /* ── PAGE HEADER universal fix ── */
  .page-header-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .page-header-inner > .btn,
  .page-header-inner .btn-green {
    width: 100% !important;
    justify-content: center !important;
  }

  .page-header h1 {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
  }

  .page-header p {
    font-size: 0.82rem !important;
    word-break: break-word !important;
  }

  /* ── BREADCRUMBS don't overflow ── */
  .breadcrumb {
    font-size: 0.72rem !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* ── OPPORTUNITIES & LEGISLATION ── */
  .filter-bar {
    flex-direction: column !important;
    gap: 0.625rem !important;
    width: 100% !important;
  }

  .filter-group {
    width: 100% !important;
    min-width: unset !important;
  }

  .filter-group select,
  .filter-group input {
    width: 100% !important;
  }

  /* ── PROJECT CARDS ── */
  .project-card {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .project-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* ── ALERT BANNERS ── */
  .alert {
    font-size: 0.82rem !important;
    padding: 0.75rem 1rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    word-break: break-word !important;
  }

  /* ── TOPBAR fix ── */
  .topbar {
    padding: 0 0.75rem !important;
    height: auto !important;
    min-height: 52px !important;
    gap: 0.5rem !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  .topbar-left {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .topbar-title {
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ── CARDS global ── */
  .card {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* ── STAT CARDS ── */
  .stat-card {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* ── TABLES always scroll ── */
  table {
    display: block;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    width: max-content;
  }
  table thead, table tbody, table tfoot { display: table; width: 100%; }
  table tr { display: table-row; }
  table th, table td { display: table-cell; }

  /* ── MODAL ── */
  .modal {
    margin: 1rem !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  /* ── NOTIFICATION PANEL ── */
  .notif-panel {
    width: calc(100vw - 1.5rem) !important;
    right: 0.75rem !important;
  }
}

/* Very small screens — additional guards */
@media (max-width: 420px) {
  .mango-map-clip {
    height: 340px !important;
    min-height: 340px !important;
    max-height: 340px !important;
  }

  .tea-btn-group .btn {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.75rem !important;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .chart-body--bar   { height: 200px !important; }
  .chart-body--donut { height: 190px !important; }
  .chart-body--line  { height: 180px !important; }

  .page-header h1 { font-size: 1rem !important; }

  /* Make project metrics 2 columns on very tiny screens */
  .project-metrics { grid-template-columns: repeat(2, 1fr) !important; }

  /* Section tabs wrap properly */
  .section-tabs {
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }

  .section-tab {
    flex: 1 1 auto !important;
    text-align: center !important;
    min-width: 80px !important;
  }
}

/* iframe breakpoint class duplicates for TEA map + BI */
html.bp-sm #page-map .grid-3,
html.bp-xs #page-map .grid-3 {
  grid-template-columns: 1fr !important;
}

html.bp-sm .tea-controls,
html.bp-xs .tea-controls {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
}

html.bp-sm .tea-btn-group,
html.bp-xs .tea-btn-group {
  width: 100% !important;
  flex-wrap: wrap !important;
}

html.bp-sm .tea-btn-group .btn,
html.bp-xs .tea-btn-group .btn {
  flex: 1 1 auto !important;
  justify-content: center !important;
}

html.bp-sm .mango-map-clip,
html.bp-xs .mango-map-clip {
  height: 420px !important;
  min-height: 420px !important;
  max-height: 420px !important;
  overflow: hidden !important;
  contain: strict !important;
}

html.bp-sm #page-bi .grid-2,
html.bp-xs #page-bi .grid-2 {
  grid-template-columns: 1fr !important;
}

html.bp-sm .bi-export-btn,
html.bp-xs .bi-export-btn {
  width: 100% !important;
  justify-content: center !important;
}

html.bp-sm .chart-body--bar,
html.bp-xs .chart-body--bar { height: 210px !important; }

html.bp-sm .chart-body--donut,
html.bp-xs .chart-body--donut { height: 210px !important; }

html.bp-sm .chart-body--line,
html.bp-xs .chart-body--line { height: 195px !important; }

html.bp-sm .kpi-grid,
html.bp-xs .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
