/* =====================================================
   GRANT ROADMAP - MAIN STYLESHEET
   ===================================================== */

/* Theme: yellow, white, black, grey, light blue for distinction */
:root {
    /* Typography: fixed font, exactly 4 sizes site-wide */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --text-major: 2rem;      /* 1. Main title (h1, page headlines) */
    --text-subtitle: 1.5rem; /* 2. Subtitle (h2, section titles) */
    --text-title: 1.25rem;   /* 3. Title (h3–h5, card titles, subsection headings) */
    --text-body: 1rem;       /* 4. Body (p, span, li, all content) */
    --primary-color: #eab308;
    --primary-dark: #ca8a04;
    --primary-light: #fef08a;
    --success-color: #eab308;
    --accent-blue: #dbeafe;
    --accent-blue-border: #93c5fd;
    --danger-color: #374151;
    --warning-color: #6b7280;
    --info-color: #6b7280;
    --light-bg: #f8f9fa;
    --grey-50: #f9fafb;
    --grey-100: #f3f4f6;
    --grey-200: #e5e7eb;
    --grey-500: #6b7280;
    --grey-600: #4b5563;
    --grey-700: #374151;
    --grey-800: #2d3748;
    --grey-900: #1f2937;
    --black: #111827;
    --white: #ffffff;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    /* Reusable yellow gradient and border (buttons, badges, active states) */
    --gradient-yellow: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    --gradient-yellow-hover: linear-gradient(135deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    --border-yellow: 1px solid rgba(202, 138, 4, 0.4);
    /* Reusable gray gradient (secondary buttons) */
    --gradient-gray: linear-gradient(135deg, #9ca3af 0%, #6b7280 50%, #4b5563 100%);
    --gradient-gray-hover: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
    /* Reusable red gradient (withdraw, destructive actions) */
    --gradient-red: linear-gradient(135deg, #fca5a5 0%, #ef4444 50%, #dc2626 100%);
    --gradient-red-hover: linear-gradient(135deg, #f87171 0%, #dc2626 50%, #b91c1c 100%);
    --border-red: 1px solid rgba(185, 28, 28, 0.4);
    /* Reusable spacing for fields, list items, table cells */
    --padding-box: 0.75rem 1rem;
    --radius-box: 6px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    font-family: var(--font-family);
}

/* Global Styles – single font stack site-wide */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-body);
    background: linear-gradient(180deg, var(--white) 0%, var(--grey-100) 35%, var(--accent-blue) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--grey-900);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-main {
    flex: 1 0 auto;
}

/* =====================================================
   CONTENT SEPARATION - site-wide (title vs text, sections, list items)
   ===================================================== */

/* Typography: 4 sizes only — main (h1), subtitle (h2), title (h3–h5), body (p/span/li) */
.layout-main h1 { font-size: var(--text-major); margin-bottom: 1rem; color: var(--black); }
.layout-main h2 { font-size: var(--text-subtitle); margin-bottom: 0.9rem; color: var(--grey-900); }
.layout-main h3, .layout-main h4, .layout-main h5 { font-size: var(--text-title); margin-bottom: 0.65rem; color: var(--grey-800); }
.layout-main h3 { margin-bottom: 0.75rem; }
.layout-main h4 { margin-bottom: 0.65rem; }
.layout-main h5 { margin-bottom: 0.55rem; }
.layout-main p, .layout-main span, .layout-main li { font-size: var(--text-body); color: var(--grey-800); }

.layout-main h1 + p,
.layout-main h2 + p,
.layout-main h3 + p,
.layout-main h4 + p,
.layout-main h5 + p {
    margin-top: 0.35rem;
}

/* Section divider line - add class .section-with-line to any section */
.section-with-line {
    border-bottom: 1px solid var(--grey-200);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.section-with-line:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Form fields: darker, bolder text site-wide for readability */
.form-control,
.form-select,
textarea.form-control {
    color: var(--grey-900);
    font-weight: 500;
}
.form-control::placeholder {
    color: var(--grey-600);
    font-weight: 400;
}
.form-select option {
    color: var(--grey-900);
    font-weight: 500;
}

/* Title banner - highlights section/tile titles with distinct background and text color */
.title-banner {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.title-banner .home-section-title,
.title-banner h2,
.title-banner h3,
.title-banner h4,
.title-banner h5 {
    color: var(--grey-900);
    font-weight: 700;
}

.title-banner-count {
    color: var(--grey-700);
    font-weight: 500;
}

/* Section title banner (home page - Plans, Resources) */
.section-title-banner {
    padding: 0.85rem 1.25rem;
}

.section-title-banner h2 {
    color: var(--grey-900);
}

/* Resources section title banner - grey to match Choose Your Plan */
.section-title-banner-resources {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
}

.section-title-banner-resources h2 {
    color: var(--grey-900);
}

/* Dashboard home section tile title banner - blue strip like landing page */
.home-section-title-banner {
    padding: 0.6rem 1rem;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
}

.home-section-title-banner .home-section-title {
    font-size: var(--text-title);
    color: var(--grey-900);
}

.list-group-separated .list-group-item {
    border: 1px solid var(--grey-200) !important;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    padding: 1.25rem 1.5rem !important;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.list-group-separated .list-group-item:last-child {
    margin-bottom: 0;
}

.layout-footer {
    flex-shrink: 0;
}

/* =====================================================
   NAVIGATION (theme: gray bg, black text)
   ===================================================== */
.navbar {
    box-shadow: var(--card-shadow);
}

.navbar-theme {
    background: linear-gradient(105deg, #fefce8 0%, #fef9c3 35%, #e0f2fe 100%) !important;
    border-bottom: 1px solid rgba(234, 179, 8, 0.2);
}

.navbar-brand-theme {
    color: var(--black) !important;
    font-size: var(--text-title);
    letter-spacing: -0.5px;
    font-weight: 700;
}

.navbar-brand-theme:hover {
    color: var(--primary-color) !important;
}

.navbar-logo {
    height: 70px;
    width: auto;
    margin-left: 1.5rem;
}

.nav-link-theme {
    color: var(--black) !important;
    font-weight: 500;
}

.nav-link-theme:hover {
    color: var(--primary-color) !important;
}

.navbar-text-theme {
    color: var(--black) !important;
}

.btn-nav-outline {
    color: var(--black) !important;
    border-color: var(--black) !important;
}

/* Yellow gradient fill: nav Sign In/Profile + Sign In with Email, Hire a Grant Writer, Filters, etc. */
.btn-nav-cta,
.btn-gradient-yellow {
    background: var(--gradient-yellow);
    color: var(--black) !important;
    border: var(--border-yellow);
    font-weight: 600;
}
.btn-nav-cta:hover,
.btn-nav-cta:focus,
.btn-nav-cta.show,
.btn-gradient-yellow:hover,
.btn-gradient-yellow:focus,
.btn-gradient-yellow:active {
    background: var(--gradient-yellow-hover);
    color: var(--black) !important;
    border-color: var(--primary-dark);
}

/* Gray gradient button: same size/style as yellow, for Cancel and secondary actions */
.btn-gradient-gray {
    background: var(--gradient-gray);
    color: var(--white) !important;
    border: 1px solid rgba(75, 85, 99, 0.5);
    font-weight: 600;
}
.btn-gradient-gray:hover,
.btn-gradient-gray:focus,
.btn-gradient-gray:active {
    background: var(--gradient-gray-hover);
    color: var(--white) !important;
    border-color: var(--grey-700);
}

/* Red gradient button: withdraw and destructive actions (dark background -> white text) */
.btn-gradient-red {
    background: var(--gradient-red);
    color: var(--white) !important;
    border: var(--border-red);
    font-weight: 600;
}
.btn-gradient-red:hover,
.btn-gradient-red:focus,
.btn-gradient-red:active {
    background: var(--gradient-red-hover);
    color: var(--white) !important;
    border-color: #b91c1c;
}

/* Dark background buttons: ensure white text for contrast */
.btn-secondary {
    color: var(--white) !important;
}

.navbar .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.3);
}

/* Pull nav links + actions a bit in from the right edge */
.navbar-collapse-right {
    margin-right: 1.5rem;
}

/* Space between last nav link (e.g. Dashboard) and Profile button; accounts for button border */
.navbar-actions {
    margin-left: 1.25rem;
}

/* Navbar toggler: default dark icon on gray background (no filter needed) */

.profile-dropdown {
    min-width: 280px;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

.profile-dropdown-header {
    padding: 0.625rem 1rem;
    font-size: var(--text-body);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--grey-500);
    background: var(--grey-50);
    border-bottom: 1px solid var(--grey-100);
}

.profile-dropdown-info {
    padding: 0.75rem 1rem;
    background: #fff;
}

.profile-dropdown-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.profile-dropdown-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.profile-dropdown-row dt {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-500);
}

.profile-dropdown-row dd {
    margin: 0;
    font-size: var(--text-body);
    color: var(--grey-800);
    word-break: break-word;
}

.profile-dropdown-actions {
    padding: 0.375rem 0;
    background: #fff;
}

.profile-dropdown .dropdown-item {
    padding-left: 1rem;
    padding-right: 1rem;
}

.profile-dropdown .dropdown-item:hover {
    background-color: var(--grey-50);
}

/* Account tab dropdown: hover highlight */
.account-dropdown-item:hover {
    background-color: var(--accent-blue);
    color: var(--grey-900);
}

.account-dropdown-item:focus {
    background-color: var(--accent-blue);
    color: var(--grey-900);
}

/* =====================================================
   SERVICES PAGE
   ===================================================== */

/* Hero Section */
.services-page {
    overflow-x: hidden;
}

/* Home page wrapper: consistent typography and font */
.home-page {
    font-family: var(--font-family);
    font-size: var(--text-body);
}
.home-page h1, .home-page h2, .home-page h3, .home-page h4 {
    font-family: var(--font-family);
}

.hero-section {
    background: transparent;
    color: #1f2937;
    padding: 80px 0;
    border-bottom: 1px solid #e5e7eb;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-left {
    text-align: left;
}

.hero-section h1 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    font-size: var(--text-major);
}

.hero-section .main-text {
    display: inline;
    font-size: var(--text-major);
}

.hero-section .dynamic-text {
    display: inline;
    color: var(--primary-color);
    font-weight: 800;
    min-width: 150px;
    font-size: var(--text-major);
}

.dynamic-text .text-item {
    display: none;
    opacity: 0;
    font-size: var(--text-major);
    color: var(--primary-color);
}

.dynamic-text .text-item.active {
    display: inline;
    animation: smoothFade 1.3s ease-in-out forwards;
    font-size: var(--text-major);
    color: var(--primary-color);
}

@keyframes smoothFade {
    0% { opacity: 0; }
    25% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

.hero-section .lead {
    font-size: var(--text-body);
    margin-bottom: 30px;
    max-width: 100%;
    color: #6b7280;
}

.customers-badge {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent-blue);
    border: 2px solid var(--accent-blue-border);
    border-radius: 50px;
    color: var(--grey-900);
    font-size: var(--text-body);
    font-weight: 600;
    margin-top: 20px;
}

.customers-badge strong {
    color: var(--grey-900);
    font-size: var(--text-body);
}

.hero-right {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--grey-200) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: var(--text-body);
    position: relative;
    overflow: hidden;
}

.overlay-tile {
    position: absolute;
    padding: 20px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    text-align: center;
}

/* 70+ Matches: oval bubble, bent tail from top-right to bottom-left (tail on right, into bubble) */
.overlay-tile.matches {
    bottom: 20px;
    left: -40px;
    width: 140px;
    min-height: 72px;
    padding-left: 40px;
    padding-right: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef08a 50%, #facc15 100%);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--black);
}

/* Bent tail: top-right to bottom-left - rotated oval */
.overlay-tile.matches::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14px;
    width: 28px;
    height: 44px;
    transform: translateY(-50%) rotate(45deg);
    background: linear-gradient(135deg, #fef08a 0%, #facc15 100%);
    border-radius: 50%;
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-left-color: transparent;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

.overlay-tile.matches .number {
    font-size: var(--text-title);
    color: var(--black);
}

.overlay-tile.matches .label {
    font-size: var(--text-body);
    color: var(--black);
    margin-top: 5px;
}

/* $40K Funded: oval bubble, bent tail from bottom-left to top-right (tail on left, into bubble) */
.overlay-tile.funded {
    top: 20px;
    right: -40px;
    width: 140px;
    min-height: 72px;
    padding-left: 20px;
    padding-right: 40px;
    padding-top: 16px;
    padding-bottom: 16px;
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black);
}

/* Bent tail: bottom-left to top-right - rotated oval */
.overlay-tile.funded::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -14px;
    width: 28px;
    height: 44px;
    transform: translateY(-50%) rotate(-45deg);
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    border-radius: 50%;
    border: var(--border-yellow);
    border-right-color: transparent;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
}

.overlay-tile.funded .amount {
    font-size: var(--text-title);
    color: var(--black);
}

.overlay-tile.funded .label {
    font-size: var(--text-body);
    color: var(--black);
    margin-top: 5px;
}

/* Success System Section */
.success-system {
    padding: 80px 0;
    background: transparent;
    border-bottom: 1px solid var(--grey-200);
}

.success-system h2 {
    font-size: var(--text-major);
    margin-bottom: 15px;
    color: #1f2937;
}

.success-system > .container > p {
    color: #6b7280;
}

.success-system-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 40px;
}

.success-text {
    padding: 20px 0;
}

.success-text h2 {
    font-size: var(--text-major);
    font-weight: 800;
    margin-bottom: 20px;
    color: #1f2937;
}

.success-text p {
    font-size: var(--text-body);
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 20px;
}

.success-text .cta-text {
    color: var(--primary-color);
    font-size: var(--text-body);
    margin-bottom: 20px;
}

.success-text .cta-text a {
    text-decoration: none;
}

/* Our Partners section: title same size and style as Grant Support Services (Services page) */
#our-partners .section-title-banner h2 {
    font-size: var(--text-major);
    font-weight: 700;
    color: #1f2937;
}

.success-image {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-steps-grid {
    display: none;
}

.success-step {
    padding: 30px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.success-step:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: var(--text-title);
    font-weight: bold;
    border-radius: 50%;
    margin-bottom: 15px;
}

.success-step h5 {
    font-size: var(--text-title);
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.success-step p {
    font-size: var(--text-body);
    color: #6b7280;
}

/* Grant Support Services Section */
.grant-support-section {
    padding: 80px 0;
    background: transparent;
    font-family: var(--font-family);
    font-size: var(--text-body);
}

.grant-support-section h2 {
    font-size: var(--text-major);
    margin-bottom: 50px;
    color: #1f2937;
}

.grant-support-section h3 {
    font-size: var(--text-title);
    font-weight: 700;
    color: #1f2937;
}

.grant-support-section p {
    font-size: var(--text-body);
}

/* Grant Support: Get Grant Help intro & content cards */
.services-intro {
    font-size: var(--text-body);
}
.services-intro-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.services-intro-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
}
.content-card {
    border-radius: 12px;
    background: var(--white);
    font-size: var(--text-body);
    border: 1px solid var(--grey-200);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.content-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-blue-border);
}
.content-card .card-body {
    padding: 1.25rem 1.5rem;
}

/* Grant & Business Consulting: section title */
.services-section-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}

/* Service option cards (General Grant Session, Business Plan Review, etc.) */
.service-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.service-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-blue-border);
}

/* Blue strip for service card titles (same as plan-name-strip) */
.service-card-title-strip {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}
.service-card:has(.service-badge) .service-card-title-strip {
    margin-top: 1.25rem;
}
.service-card-title-strip .service-card-title {
    margin-bottom: 0;
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}

/* Fractional Plan badge overlapping card border (like 7 Days Free Trial / Most Popular) */
.service-card .service-badge {
    position: absolute;
    top: -8px;
    left: 16px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: var(--text-body);
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fef9c3 50%, var(--primary-color) 100%);
    border: 1px solid rgba(234, 179, 8, 0.5);
    color: var(--grey-900);
    margin-bottom: 0;
}
.service-card .service-badge:hover {
    text-decoration: none;
}

.service-card-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 0.5rem;
}
.service-card-subtitle {
    font-size: var(--text-body);
    color: var(--grey-600);
}
.service-card-desc {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.service-card-desc.service-card-desc-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.service-card-desc.service-card-desc-expanded {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
}
.service-read-more,
.link-brown {
    color: #795548 !important;
    text-decoration: none;
    font-weight: 500;
}
.service-read-more:hover,
.link-brown:hover {
    color: #5d4037 !important;
    text-decoration: underline;
}
.service-card-includes {
    font-size: var(--text-body);
    color: var(--grey-600);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--grey-200);
}
.service-includes-label {
    font-weight: 600;
    color: var(--grey-700);
}
.service-card-featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.2);
}

/* Not sure what service / Contact CTA box (Grant Support section) */
.services-cta-box {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    font-size: var(--text-body);
}
.services-cta-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.services-cta-text {
    font-size: var(--text-body);
    color: var(--grey-700);
}

/* Plans Section */
.plans-section {
    padding: 80px 0;
    background: transparent;
    border-bottom: 1px solid var(--grey-200);
}

.plans-section h2 {
    font-size: var(--text-major);
    margin-bottom: 50px;
    color: #1f2937;
}

.plan-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.plan-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.plan-card.featured {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.25);
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: var(--text-body);
    font-weight: 700;
    text-transform: uppercase;
}

.free-trial-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, var(--grey-600) 0%, var(--grey-700) 100%);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: var(--text-body);
    font-weight: 700;
    text-transform: uppercase;
}

.plan-header {
    margin-bottom: 20px;
}

.plan-header h4 {
    font-size: var(--text-title);
    font-weight: 700;
    margin-bottom: 0;
    color: #1f2937;
}

/* Blue strip for plan name (Basic Plan, Success Plan, etc.) */
.plan-name-strip {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.plan-name-strip h4 {
    font-size: var(--text-title);
    font-weight: 700;
    color: #1f2937;
}

.plan-billing,
.plan-pricing-text {
    font-size: var(--text-body);
    color: #111827;
    margin: 0;
}

.plan-billing.text-black,
.plan-pricing-text.text-black {
    color: #111827 !important;
}

.plan-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.price-amount {
    font-size: var(--text-major);
    font-weight: 700;
    color: var(--primary-color);
}
/* Plans section: C$ amounts same size as "Our Success System" and yellow */
.plans-section .plan-card:not(.additional-plan) .price-amount {
    font-size: var(--text-major);
    color: var(--primary-color);
}

.price-period {
    font-size: var(--text-body);
    color: #6b7280;
    margin-left: 5px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    flex-grow: 1;
}

.plan-features li {
    padding: 10px 0;
    color: var(--grey-700);
    font-size: var(--text-body);
    border-bottom: 1px solid var(--grey-100);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 8px;
}

.plan-card .btn {
    margin-top: auto;
}

/* Additional plans (Fractional, Association) - same width as default plans, notes expand to right and push next block */
.additional-plans-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.5rem;
}
.additional-plan-wrapper {
    display: flex;
    align-items: stretch;
    flex: 0 0 calc((100% - 1.5rem) / 3);
    min-width: 0;
    min-height: 100%;
    transition: flex 0.3s ease;
}
.additional-plan-wrapper.is-expanded {
    flex: 0 0 calc((100% - 1.5rem) / 3 + 320px);
}
.plan-card.additional-plan {
    padding: 1.5rem 1.5rem;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 420px;
    border-radius: 12px 0 0 12px;
    border-right: none;
    display: flex;
    flex-direction: column;
}
.plan-card.additional-plan .plan-features {
    flex: 1 1 auto;
}
.plan-notes-toggle {
    flex: 0 0 36px;
    width: 36px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-left: none;
    border-radius: 0 12px 12px 0;
}
.additional-plan-wrapper.is-expanded .plan-notes-toggle {
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--grey-600);
    font-size: var(--text-subtitle);
    padding: 0;
}
.plan-notes-toggle:hover {
    background: var(--accent-blue);
    color: white;
}
.plan-notes-toggle-icon {
    display: block;
    line-height: 1;
}
.additional-plan-wrapper.is-expanded .plan-notes-toggle-icon {
    transform: rotate(90deg);
}
.plan-notes-panel {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    overflow: hidden;
    background: white;
    border: 1px solid var(--grey-200);
    border-left: none;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    transition: flex 0.3s ease, width 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.additional-plan-wrapper.is-expanded .plan-notes-panel {
    flex: 0 0 min(320px, calc(100vw - 2rem));
    width: min(320px, calc(100vw - 2rem));
    min-width: 0;
}
.plan-notes-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1rem 2.5rem 1rem;
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}
.plan-notes-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--grey-100);
    border-radius: 6px;
    font-size: var(--text-title);
    line-height: 1;
    cursor: pointer;
    color: var(--grey-600);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.plan-notes-close:hover {
    background: var(--grey-200);
    color: var(--grey-800);
}
.plan-card-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    margin-bottom: 0.75rem;
}
.plan-card-p:last-child {
    margin-bottom: 0;
}

/* Mobile adjustments: stack additional plans and expand notes downward */
@media (max-width: 767.98px) {
    .additional-plans-row {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    .additional-plan-wrapper,
    .additional-plan-wrapper.is-expanded {
        flex: 1 1 100%;
        min-height: 0;
        flex-direction: column;
    }
    .plan-card.additional-plan {
        min-height: auto;
        border-radius: 12px 12px 0 0;
        border-right: 1px solid var(--grey-200);
    }
    .plan-notes-toggle {
        width: 100%;
        flex: 0 0 auto;
        border-radius: 0 0 12px 12px;
        border-top: none;
        border-left: 1px solid var(--grey-200);
    }
    .plan-notes-panel {
        flex: 0 0 auto;
        width: 100%;
        border-left: 1px solid var(--grey-200);
        border-top: 1px solid var(--grey-200);
        border-radius: 0 0 12px 12px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    }
}
.plan-notes-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1rem 2.5rem 1rem;
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}
.plan-notes-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--grey-100);
    border-radius: 6px;
    font-size: var(--text-title);
    line-height: 1;
    cursor: pointer;
    color: var(--grey-600);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.plan-notes-close:hover {
    background: var(--grey-200);
    color: var(--grey-800);
}
.plan-card-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    margin-bottom: 0.75rem;
}
.plan-card-p:last-child {
    margin-bottom: 0;
}

/* Not sure where to start CTA (Plans section) */
.plans-cta-box {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    font-size: var(--text-body);
}
.plans-cta-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.plans-cta-text {
    font-size: var(--text-body);
    color: var(--grey-700);
}

/* Resources Section */
.resources-section {
    padding: 80px 0;
    background: transparent;
    border-bottom: 1px solid var(--grey-200);
}

.resources-section h2 {
    font-size: var(--text-major);
    margin-bottom: 50px;
    color: #1f2937;
}

.resource-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--grey-200) !important;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.resource-card .card-title {
    color: #1f2937;
    padding: 0;
    margin: 0;
}

/* Light blue strip for resource card title */
.resource-name-strip {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
}

.resource-name-strip .card-title {
    color: #1f2937;
    margin: 0;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover) !important;
    border-color: var(--primary-color) !important;
}

.resource-icon {
    font-size: var(--text-title);
    margin-bottom: 15px;
}

.badge {
    font-size: var(--text-body);
    font-weight: 500;
}

.resource-card h5 {
    font-size: var(--text-title);
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.resource-card p {
    font-size: var(--text-body);
    color: #6b7280;
    margin-bottom: 20px;
    flex-grow: 1;
}

.resource-card .btn {
    margin-top: auto;
}

/* Service Providers Access cards (Explore Ecosystem / Become a Service Provider) */
.become-provider-card {
    border-radius: 12px;
    font-size: var(--text-body);
    border: 1px solid var(--grey-200);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.become-provider-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-blue-border);
}
.become-provider-card .card-body {
    padding: 1.25rem 1.5rem;
}
.become-provider-card .service-card-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.become-provider-card .services-intro-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-yellow);
    padding: 80px 0;
    font-family: var(--font-family);
}

.cta-section h2,
.cta-section p,
.cta-section .lead {
    color: var(--black);
    font-size: var(--text-body);
}
.cta-section h2 {
    font-size: var(--text-major);
    font-weight: 800;
}
.cta-section .lead {
    font-size: var(--text-body);
}

.btn-cta-contact {
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 50%, #111827 100%);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--white) !important;
    font-weight: 600;
}

.btn-cta-contact:hover,
.btn-cta-contact:focus,
.btn-cta-contact:active {
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
    border-color: var(--black);
    color: var(--white) !important;
}

/* =====================================================
   AUTH PAGES (SIGNIN/SIGNUP)
   ===================================================== */

.auth-page {
    background-color: var(--light-bg);
    min-height: 80vh;
    padding-top: 2rem;
}

/* No min-height on row so card flows from top and "Already have an account?" stays visible */
.auth-page .row {
    min-height: 0;
    align-items: flex-start;
}

.auth-card {
    background: white;
    padding: 28px 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.auth-card h2 {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

/* Signup two-column layout: align second row (Your Name | Password) to same height */
/* Signup: no min-height so row doesn't push "Already have an account?" below fold */
.auth-card .signup-field-row {
    min-height: 0;
}

.auth-card .form-control-lg {
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: var(--text-body);
}

.auth-card .form-control-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

.auth-card .btn-lg:not(.btn-oauth) {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black) !important;
}

.auth-card .btn-lg:not(.btn-oauth):hover,
.auth-card .btn-lg:not(.btn-oauth):focus,
.auth-card .btn-lg:not(.btn-oauth):active {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark);
    color: var(--black) !important;
}

.auth-validation-message {
    white-space: pre-line;
}

.password-input-wrapper .password-toggle {
    text-decoration: none;
    font-size: var(--text-title);
}

.password-input-wrapper .password-toggle:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* OAuth buttons: white text on sign-in/sign-up */
/* OAuth logo-only square buttons, side by side */
.oauth-buttons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.btn-oauth {
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-oauth:hover {
    transform: scale(1.05);
}

/* Grey background for all; logos use brand colors via SVG fill / .oauth-icon-apple */
.btn-oauth-google,
.btn-oauth-microsoft,
.btn-oauth-apple {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: inherit;
}

.btn-oauth-google:hover,
.btn-oauth-microsoft:hover,
.btn-oauth-apple:hover {
    background-color: #dee2e6;
    border-color: #ced4da;
    color: inherit;
}

.oauth-icon-apple {
    color: #000;
}

/* =====================================================
   DASHBOARD PAGE
   ===================================================== */

.dashboard-page {
    background: linear-gradient(180deg, var(--white) 0%, var(--grey-100) 35%, var(--accent-blue) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Same font and base size across all dashboard tabs (Home, List Building, Saved Grants, Application, etc.) */
.dashboard-page .tab-content,
.dashboard-page .tab-pane {
    font-family: var(--font-family);
    font-size: var(--text-body);
}
.dashboard-page .tab-content .form-control,
.dashboard-page .tab-content .form-select,
.dashboard-page .tab-content .form-label {
    font-family: var(--font-family);
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-header h1 {
    color: #1f2937;
}

.dashboard-header .btn:not(.btn-gradient-yellow) {
    border-radius: 8px;
    background: var(--primary-color);
    border: none;
}

.dashboard-header .btn:not(.btn-gradient-yellow):hover {
    background: var(--primary-dark);
}

.dashboard-header .btn-gradient-yellow {
    border-radius: 8px;
    background: var(--gradient-yellow);
    color: var(--black) !important;
    border: var(--border-yellow);
}

.dashboard-header .btn-gradient-yellow:hover {
    background: var(--gradient-yellow-hover);
    color: var(--black) !important;
    border-color: var(--primary-dark);
}

/* Admin viewing expired company: disable tab content (read-only) */
.dashboard-content-disabled {
    pointer-events: none;
    opacity: 0.75;
    user-select: none;
}

/* Stat Cards */
.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: #9ca3af;
    font-size: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Home tab value banner - styled label and value, vertically centered */
.home-value-banner {
    min-height: 1in;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 1.5rem;
    gap: 0.5rem;
}

.home-value-banner .value-banner-label,
.home-value-banner .value-banner-amount {
    line-height: 1.2;
}

.home-value-banner .value-banner-label {
    font-size: var(--text-title);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--grey-600);
}

.home-value-banner .value-banner-amount {
    font-size: var(--text-title);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

/* Home tab two sections - bordered; title/description/list each have consistent size across both columns */
.home-section {
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.home-section-title {
    font-size: var(--text-title);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.home-section-desc {
    font-size: var(--text-body);
    margin-bottom: 0.75rem;
    min-height: 2.8rem;
    flex-shrink: 0;
}

/* List area - same height for both sections, always scrollable */
.home-section-list-scroll {
    height: 420px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.home-matches-list.list-group-separated .list-group-item,
.home-portfolio-list.list-group-separated .list-group-item {
    font-size: var(--text-body);
    border: 1px solid var(--grey-200) !important;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    padding: 1.25rem 1.5rem !important;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    min-height: 3.25rem;
}

.home-matches-list .list-group-item:last-child,
.home-portfolio-list .list-group-item:last-child {
    margin-bottom: 0;
}

.home-section .see-all-link {
    font-size: var(--text-body);
}

.see-all-link {
    color: var(--primary-color);
    text-decoration: none;
}

.see-all-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Grant Portfolio status badges (pastel, yellow/gray theme) - kept small so list row height matches Your Matches */
.portfolio-status {
    font-size: var(--text-body);
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Saved: neutral/saved (same as before) */
.portfolio-status-added {
    background: #fef9c3;
    color: #a16207;
}
.portfolio-status-new {
    background: #fef9c3;
    color: #a16207;
}

/* In Progress: blue (working on it) */
.portfolio-status-in-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Submitted: amber (awaiting review) */
.portfolio-status-submitted {
    background: #fef08a;
    color: #ca8a04;
}

/* Approved: green */
.portfolio-status-approved {
    background: #dcfce7;
    color: #166534;
}

/* Rejected: red */
.portfolio-status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

/* Grant request history badges (Add Grants tab) */
.grant-history-badge {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}
.grant-history-badge-approved {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: #ffffff !important;
}
.grant-history-badge-withdrawn {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
    color: #1f2937 !important;
}
.grant-history-badge-pending {
    background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    color: #422006 !important;
}
.grant-history-badge-rejected {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 50%, #dc2626 100%);
    color: #ffffff !important;
}

/* Grant Cards */
.grant-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grant-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.grant-card.favorite-card {
    border: 2px solid var(--primary-color);
    background: rgba(234, 179, 8, 0.08);
}

.grant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.grant-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    flex-grow: 1;
}

.status-badge {
    font-size: var(--text-body);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-badge.status-applied {
    background: var(--grey-200);
    color: var(--grey-700);
}

.status-badge.status-in-progress {
    background: var(--grey-100);
    color: var(--grey-700);
}

.status-badge.status-awaiting-review {
    background: var(--grey-200);
    color: var(--grey-900);
}

.status-badge.status-approved {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.status-badge.status-rejected {
    background: var(--grey-200);
    color: var(--grey-700);
}

.grant-description {
    font-size: var(--text-body);
    color: #6b7280;
    margin-bottom: 15px;
    flex-grow: 1;
}

.grant-details {
    background: var(--light-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-body);
    padding: 4px 0;
}

.detail-item .label {
    color: #9ca3af;
    font-weight: 600;
}

.detail-item .value {
    color: #1f2937;
    font-weight: 500;
}

.grant-card .btn {
    margin-top: auto;
}

.grant-card .form-select-sm {
    border-radius: var(--radius-box);
    font-size: var(--text-body);
    padding: 4px 8px;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* Account tab: section cards and edit */
/* Account tab sections: same sectional pattern as Home (border outline + inner content style) */
.account-section.home-section {
    /* Uses .home-section border, border-radius 8px, padding 1rem from main .home-section rule */
}

/* Soft gradient for Home tab cards (client and admin) */
#home .home-section.account-section {
    background: linear-gradient(165deg, #fefefe 0%, #fafbfc 45%, #f5f6f8 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.account-section .home-section-title-banner {
    margin-bottom: 1rem;
}

/* Home tab: constrain columns so content doesn't overflow the section */
#home .home-section.account-section .row > [class*="col-"] {
    min-width: 0;
}

.account-section-inner {
    padding: 1rem;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-family: var(--font-family);
    font-size: var(--text-body);
}

/* Team members: blue "Primary" label for the primary user */
.badge-primary-label {
    font-size: var(--text-body);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 50%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
}

/* Team members: Editor (yellow gradient) and Viewer (gray gradient) labels */
.badge-gradient-yellow {
    background: var(--gradient-yellow);
    color: var(--black);
    border: 1px solid rgba(202, 138, 4, 0.4);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.badge-gradient-gray {
    background: var(--gradient-gray);
    color: var(--white);
    border: 1px solid rgba(75, 85, 99, 0.5);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}


/* Account detail fields (personal/company view): each field in a bordered box */
.account-detail-field {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: var(--padding-box);
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-detail-field .account-val {
    margin-top: 0.25rem;
}

/* Account edit form: each field group in a bordered box */
.account-edit-field {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: var(--padding-box);
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-edit-field .form-control {
    border-color: var(--grey-200);
}

/* Company Information subsection titles (Company Identification, Founder, etc.) */
.account-subsection-title {
    display: block;
    font-size: var(--text-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-700);
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Account lists (team members, billing history, payment methods): each item bordered */
.account-list-item {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: var(--padding-box);
    margin-bottom: 0.5rem;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-list-item:last-child {
    margin-bottom: 0;
}

/* Saved Grants: meta row (amount, closes on, planned) with icons and badge */
.timeline-grant-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: var(--text-body);
    color: var(--grey-600);
}
.timeline-grant-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.timeline-grant-meta-item i {
    font-size: var(--text-body);
    color: var(--grey-500);
    flex-shrink: 0;
}
.timeline-grant-meta-amount {
    font-weight: 600;
    color: var(--grey-800);
}
.timeline-grant-meta-amount i {
    color: var(--primary-dark);
}
.timeline-grant-meta-planned {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
}
.timeline-grant-meta-planned i {
    color: var(--grey-600);
}

/* Ensure two-column list items keep right content aligned and prevent wrapping,
   while truncating or clipping long left text as needed. */
.home-matches-list .list-group-item,
.home-portfolio-list .list-group-item,
.timeline-grant-list .timeline-grant-item,
.account-list-item.d-flex.justify-content-between {
    gap: 0.75rem;
}
.home-matches-list .list-group-item > .flex-grow-1,
.home-portfolio-list .list-group-item > .flex-grow-1,
.timeline-grant-item > .flex-grow-1 {
    min-width: 0; /* allow text-truncate to work */
}
.home-matches-list .list-group-item span.text-truncate,
.home-portfolio-list .list-group-item span.text-truncate,
.timeline-grant-item .list-item-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-matches-list .list-group-item > span.text-muted,
.home-portfolio-list .list-group-item > .portfolio-status,
.timeline-grant-item .timeline-grant-view {
    flex-shrink: 0;
    white-space: nowrap;
}

.account-edit-btn:hover {
    color: var(--primary-color) !important;
}

/* Edit icon button: square with gradient yellow */
.account-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0 !important;
    border: var(--border-yellow) !important;
    border-radius: 6px;
    background: var(--gradient-yellow);
    color: var(--black) !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.account-edit-btn:hover,
.account-edit-btn:focus {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark) !important;
    color: var(--black) !important;
}

.account-edit-btn i {
    font-size: var(--text-body);
}

/* Current plan stats: Days remaining, Team members, Next billing */
.plan-stats-row {
    display: flex;
    flex-wrap: wrap;
}

.plan-stat-card {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    text-align: center;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.plan-stat-card .plan-stat-icon {
    font-size: var(--text-title);
    color: var(--grey-600);
    margin-bottom: 0.35rem;
}

.plan-stat-card .plan-stat-icon i {
    vertical-align: middle;
}

.plan-stat-card .plan-stat-value {
    font-size: var(--text-subtitle);
    font-weight: 700;
    color: var(--grey-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.plan-stat-card .plan-stat-value-sm {
    font-size: var(--text-body);
    font-weight: 600;
}

.plan-stat-card .plan-stat-sep {
    font-weight: 400;
    color: var(--grey-500);
    margin: 0 0.1em;
}

.plan-stat-card .plan-stat-label {
    font-size: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-600);
    margin-top: 0.15rem;
}

.plan-stat-card .plan-stat-autopay-off {
    font-size: var(--text-body);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--bs-danger, #dc3545);
    margin-top: 0.35rem;
}

.plan-stat-card .progress {
    background: var(--grey-200);
    border-radius: 2px;
}

.plan-stat-card .progress-bar {
    background: linear-gradient(90deg, #fef08a 0%, #eab308 100%);
    border-radius: 2px;
}

.plan-stat-card.plan-stat-days .plan-stat-value { color: var(--primary-color); }
.plan-stat-card.plan-stat-members .plan-stat-value { color: var(--grey-800); }

/* Grant detail: top row = checkpoints (3/4) + completion % (1/4) */
.grant-detail-top-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}
.grant-checkpoints-wrap { flex: 0 0 75%; min-width: 0; }
.grant-completion-widget {
    flex: 0 0 25%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.grant-completion-widget .grant-completion-label { font-size: var(--text-body); color: var(--grey-600); }
.grant-completion-widget .d-flex { align-items: center; gap: 0.5rem; }
.grant-completion-widget .progress.grant-progress-bar { height: 14px; }
.grant-completion-pct { font-size: var(--text-body); font-weight: 600; white-space: nowrap; min-width: 2.5em; }

/* Grant detail: checkpoint progress (4 stages) */
.grant-checkpoints { padding: 0.5rem 0; }
.grant-checkpoints .d-flex { gap: 0; }
.grant-checkpoint-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.grant-checkpoint-item.active { opacity: 1; }
.grant-checkpoint-item.current .grant-checkpoint-num {
    background: var(--gradient-yellow);
    color: var(--black);
    border-color: transparent;
}
.grant-checkpoint-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--grey-300);
    background: var(--grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-body);
}
.grant-checkpoint-label {
    font-size: var(--text-body);
    margin-top: 0.35rem;
    color: var(--grey-600);
    text-align: center;
    max-width: 4.5rem;
}
.grant-checkpoint-line {
    flex: 1;
    min-width: 1rem;
    height: 2px;
    background: var(--grey-200);
    align-self: center;
    margin: 0 0.25rem;
    transition: background 0.2s;
}
.grant-checkpoint-line.active { background: var(--primary-color); }
.grant-progress-bar .progress-bar {
    background: linear-gradient(90deg, #fef08a 0%, #eab308 100%);
    border-radius: 4px;
}

/* Grant detail: Status – plain label + regular dropdown */
.grant-status-widget-label {
    font-size: 0.875rem;
    color: var(--grey-700);
    white-space: nowrap;
}
.grant-status-select {
    min-width: 8rem;
}

.grant-message-board-scroll {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

/* Grant detail: all section content areas scroll after a fixed height */
.grant-section-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}
.grant-section-scroll::-webkit-scrollbar { width: 6px; }
.grant-section-scroll::-webkit-scrollbar-track { background: var(--grey-200, #e5e7eb); border-radius: 3px; }
.grant-section-scroll::-webkit-scrollbar-thumb { background: var(--grey-500, #6b7280); border-radius: 3px; }
.grant-section-scroll::-webkit-scrollbar-thumb:hover { background: var(--grey-600, #4b5563); }

/* Supporting Documents Checklist: accordion items, hide empty when has docs */
.grant-checklist-list .accordion-button { font-size: var(--text-title); }
.grant-checklist-list .accordion-button::after { margin-left: auto; }
.grant-checklist-list .accordion-button:not(.collapsed) { font-weight: 600; }
.grant-checklist-list .accordion-body { font-size: var(--text-body); }
.grant-checklist-docs:has(.grant-doc-name) .grant-checklist-docs-empty { display: none !important; }

/* Upload Documents: expandable doc cards */
.grant-doc-card-header { cursor: pointer; user-select: none; }
.grant-doc-card-header:hover { background: var(--grey-100, #f3f4f6); border-radius: 0.25rem; }
.grant-doc-card-header .grant-doc-view-btn,
.grant-doc-card-header .btn-gradient-gray { border-radius: 6px; min-width: 2rem; }
.grant-doc-card-header .grant-doc-card-chevron { transition: transform 0.2s ease; }
.grant-doc-card-body.show .grant-doc-card-chevron { transform: rotate(90deg); }
.grant-doc-card .grant-doc-checklist-options label { cursor: pointer; }

/* Upload Documents thumbnails (legacy / fallback) */
.grant-doc-thumb:hover { background: var(--grey-100); }
.grant-docs-thumbnails .grant-doc-thumb { min-height: 2.5rem; }

/* Application Contacts cards */
.grant-contact-card dt { font-size: var(--text-body); text-transform: uppercase; letter-spacing: 0.02em; }
.grant-contact-card .grant-contact-remove { opacity: 0.7; }
.grant-contact-card .grant-contact-remove:hover { opacity: 1; }

/* =====================================================
   Account → Subscriptions: consistent styling
   ===================================================== */

.account-page-title {
    font-size: var(--text-subtitle);
    font-weight: 700;
    color: var(--grey-900);
    letter-spacing: -0.02em;
}

/* Current plan: plan name + amount block */
.subscription-plan-hero {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Plan type badge – stands out as current plan name */
.subscription-plan-badge {
    display: inline-block;
    font-size: var(--text-body);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--grey-900);
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(234, 179, 8, 0.2);
}

.subscription-plan-price {
    margin-bottom: 0.25rem;
}

.subscription-plan-amount {
    font-size: var(--text-subtitle);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.subscription-plan-period {
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
    margin-left: 0.15rem;
}

.subscription-plan-billing-note {
    font-size: var(--text-body);
    color: var(--grey-600);
    margin-bottom: 0;
}

/* Empty states (no invoices, no payment methods) */
.subscription-empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--grey-100);
    border: 1px dashed var(--grey-300);
    border-radius: 8px;
}

.subscription-empty-icon {
    font-size: var(--text-major);
    color: var(--grey-400);
    display: block;
    margin-bottom: 0.75rem;
}

.subscription-empty-text {
    font-size: var(--text-body);
    color: var(--grey-600);
}

/* Section intro text (Upgrade plan copy) */
.subscription-section-desc {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.5;
}

/* Plan detail card: shown when Change plan is clicked or admin suggestion */
.plan-detail-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.plan-detail-card-header {
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--grey-900);
    letter-spacing: -0.01em;
}

.plan-detail-card-desc {
    font-size: var(--text-body);
    color: var(--grey-600);
    line-height: 1.5;
    margin-bottom: 0;
}

.plan-detail-stats {
    display: flex;
    flex-wrap: wrap;
}

.plan-detail-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.plan-detail-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-600);
}

.plan-detail-stat-value {
    font-size: var(--text-body);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.plan-detail-card-suggestion {
    border-color: rgba(234, 179, 8, 0.5);
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.15) 0%, rgba(250, 204, 21, 0.08) 50%, rgba(234, 179, 8, 0.05) 100%);
}

.plan-detail-card-suggestion .plan-detail-card-header {
    color: var(--grey-900);
}

.plan-detail-actions {
    padding-top: 0.5rem;
    border-top: 1px solid var(--grey-200);
}

/* List secondary text (amount in billing history) */
.subscription-list-amount {
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
}

.subscription-list-icon {
    color: var(--grey-500);
    font-size: var(--text-title);
}

/* Payment methods: thumbnail / square cards */
.payment-methods-grid {
    margin-bottom: 0;
}

.payment-method-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1rem 1rem 1.25rem;
    padding-top: 2rem;
    height: 100%;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.payment-method-default-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
    user-select: none;
}

.payment-method-default-label:hover {
    color: var(--grey-800);
}

.payment-method-default-label input[type="checkbox"] {
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

.payment-method-default-text {
    white-space: nowrap;
}

.payment-method-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--grey-300);
}

.payment-method-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.payment-method-card-row:first-child {
    margin-bottom: 0.5rem;
}

.payment-method-card-row-actions {
    justify-content: flex-end;
}

.payment-method-card-last4 {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    letter-spacing: 0.02em;
}

.payment-method-card-expiry {
    font-size: var(--text-body);
    color: var(--grey-600);
}

.payment-method-card-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    text-transform: capitalize;
}

.payment-card-brand-icon {
    font-size: var(--text-subtitle);
    line-height: 1;
    color: var(--grey-700);
}

.payment-method-card-brand-name {
    flex-shrink: 0;
}

/* Billing history: small invoice thumbnails – Plan, bill date, amount (annual) */
.billing-history-grid {
    margin-bottom: 0;
}

.invoice-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 6px;
    padding: 0.5rem 0.6rem 0.65rem;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.invoice-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: var(--grey-300);
}

.invoice-card-icon {
    font-size: var(--text-title);
    color: var(--grey-500);
    margin-bottom: 0.25rem;
}

.invoice-card-plan {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    line-height: 1.3;
}

.invoice-card-date {
    font-size: var(--text-body);
    margin-top: 0.15rem;
}

.invoice-card-amount {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    margin-top: 0.25rem;
}

.invoice-card-annual {
    font-weight: 400;
    font-size: var(--text-body);
    color: var(--grey-600);
}

.account-val {
    font-size: var(--text-body);
    color: #1f2937;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    background: var(--light-bg);
}

.modal-header .btn-close {
    filter: brightness(0);
}

.modal-body {
    padding: 25px;
    font-size: var(--text-body);
}

#comparisonModal .modal-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
#comparisonModal .table {
    font-size: var(--text-body);
}
#comparisonModal .table th,
#comparisonModal .table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}
#comparisonModal .table thead th {
    font-size: var(--text-body);
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead {
    background: var(--grey-700);
    color: var(--white);
}

.table-bordered {
    border-color: #e5e7eb;
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* =====================================================
   PLANS & RESOURCES PAGES
   ===================================================== */

.plans-page,
.resources-page {
    padding: 40px 0;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-section {
        padding: 50px 0;
    }

    .hero-section h1 {
        font-size: var(--text-major);
    }

    .hero-right {
        height: 300px;
    }

    .overlay-tile {
        position: relative;
        margin: 10px;
    }

    .overlay-tile.matches {
        bottom: auto;
        left: auto;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 16px;
        padding-bottom: 16px;
        min-height: 0;
    }

    .overlay-tile.matches::after {
        display: none;
    }

    .overlay-tile.funded {
        top: auto;
        right: auto;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 16px;
        padding-bottom: 16px;
        min-height: 0;
    }

    .overlay-tile.funded::after {
        display: none;
    }

    .success-system-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .success-steps-grid {
        grid-template-columns: 1fr;
    }

    .success-system h2,
    .plans-section h2 {
        font-size: var(--text-major);
    }

    .plan-card.featured {
        transform: scale(1);
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: var(--text-title);
    }

    .grant-header {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-header .col-auto {
        width: 100%;
        margin-top: 15px;
    }

    .dashboard-header .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: var(--text-major);
    }

    .plan-card {
        padding: 20px;
    }

    .auth-card {
        padding: 25px;
    }

    .modal-body {
        padding: 15px;
    }
}

/* =====================================================
   FOOTER SECTION
   ===================================================== */

.footer-section,
footer.bg-dark {
    background: var(--grey-900) !important;
    color: var(--grey-200);
    padding: 60px 0 20px;
    font-family: var(--font-family);
}

.footer-section-tight {
    padding: 2.5rem 0 0.75rem !important;
}

.footer-section-tight .footer-divider {
    margin-top: 1.25rem;
    margin-bottom: 1rem;
}

.layout-footer {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

footer.bg-dark .container {
    color: var(--grey-200);
}

.footer-section h6 {
    font-size: var(--text-title);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: var(--text-body);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* =====================================================
   ALERTS (theme: yellow/grey)
   ===================================================== */
.alert-danger {
    background-color: rgba(55, 65, 81, 0.1);
    border-color: var(--grey-600);
    color: var(--grey-900);
}

.alert-warning {
    background-color: rgba(107, 114, 128, 0.15);
    border-color: var(--grey-500);
    color: var(--grey-900);
}

.alert-success {
    background-color: rgba(234, 179, 8, 0.15);
    border-color: var(--primary-color);
    color: var(--grey-900);
}

.alert-info {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue-border);
    color: var(--grey-900);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-primary {
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black) !important;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark);
    color: var(--black) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--black);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.transition-all {
    transition: all 0.3s ease;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* =====================================================
   CONTACT PAGE (theme only)
   ===================================================== */
.contact-page {
    background: linear-gradient(135deg, var(--grey-100) 0%, var(--white) 100%);
    min-height: 100vh;
}

.contact-card {
    border: 2px solid var(--primary-color) !important;
    border-radius: 0.5rem;
}

.contact-card .card-title,
.contact-card-title {
    color: var(--grey-900);
}

.contact-form-input {
    border: 1px solid var(--grey-200);
    padding: 10px 12px;
}

.contact-form-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

.contact-form-input[rows] {
    resize: vertical;
}

.contact-btn-primary {
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black) !important;
    font-weight: 600;
}

.contact-btn-primary:hover,
.contact-btn-primary:focus,
.contact-btn-primary:active {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark);
    color: var(--black) !important;
}

.contact-back-link {
    color: var(--primary-color);
}

.contact-alert-info {
    border-left: 4px solid var(--primary-color);
}

.contact-required {
    color: var(--grey-600);
}

/* =====================================================
   HOME PAGE (images, resource cards)
   ===================================================== */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    position: absolute;
    top: 0;
    left: 0;
}

.steps-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps-img-wrapper .steps-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.steps-hover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    min-width: 320px;
    min-height: 320px;
    max-width: min(480px, 95vw);
    max-height: min(480px, 95vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.steps-hover-overlay .steps-hover-wedge {
    pointer-events: all;
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
    stroke-width: 6;
}
@media (min-width: 1200px) {
    .steps-hover-overlay { min-width: 380px; min-height: 380px; max-width: 480px; max-height: 480px; }
}
@media (max-width: 768px) {
    .steps-hover-overlay { min-width: 240px; min-height: 240px; max-width: min(300px, 90vw); max-height: min(300px, 90vw); }
    .steps-hover-overlay .steps-hover-wedge { stroke-width: 8; }
}
@media (max-width: 480px) {
    .steps-hover-overlay { min-width: 200px; min-height: 200px; max-width: min(260px, 88vw); max-height: min(260px, 88vw); }
    .steps-hover-overlay .steps-hover-wedge { stroke-width: 10; }
}
.steps-hover-overlay .steps-hover-wedge:hover {
    fill: transparent;
}
.steps-tooltip {
    position: fixed;
    z-index: 1100;
    padding: 4px 8px;
    font-size: var(--text-body);
    color: var(--grey-800);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.steps-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   ABOUT PAGE
   ===================================================== */
.about-page {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 38%, #eef6ff 100%);
}

.about-hero {
    padding: 1.1rem 0 1.05rem;
}

.about-hero-wrap {
    width: 100%;
    max-width: none;
    padding-left: clamp(1rem, 2.2vw, 2.25rem);
    padding-right: clamp(1rem, 2.2vw, 2.25rem);
}

.about-hero-card {
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(234, 179, 8, 0.35);
    background: linear-gradient(105deg, #fefce8 0%, #fef9c3 35%, #e0f2fe 100%);
    color: #111827;
    min-height: 138px;
    padding: 1.35rem 1.5rem 1.35rem 6.25rem;
    box-shadow: 0 10px 20px rgba(75, 85, 99, 0.14);
    overflow: hidden;
}

.about-hero-card h1 {
    color: var(--grey-900);
    margin-bottom: 0.25rem;
    font-size: clamp(1.42rem, 2vw, 1.9rem);
}

.about-hero-card p {
    color: var(--grey-600);
    margin-bottom: 0;
    font-weight: 600;
}

.about-hero-badge {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fef08a 0%, #facc15 58%, #eab308 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c2d12;
    font-size: 1.5rem;
    box-shadow: 0 8px 18px rgba(234, 179, 8, 0.35);
}

.about-hero-badge .bi-cash-coin {
    font-size: 1.9rem;
    line-height: 1;
}

.about-money-icon {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 44px;
}

.about-money-blob {
    position: absolute;
    border-radius: 999px;
    background: #86efac;
    opacity: 0.95;
}

.about-money-blob-front {
    width: 31px;
    height: 31px;
    left: -7px;
    bottom: -5px;
}

.about-money-blob-back {
    width: 27px;
    height: 27px;
    left: 3px;
    top: -4px;
}

.about-money-note {
    position: absolute;
    left: 11px;
    top: 9px;
    width: 24px;
    height: 18px;
    border-radius: 5px;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fef08a;
    border: 1px solid rgba(22, 101, 52, 0.55);
    font-size: 0.82rem;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(22, 163, 74, 0.35);
}

.about-intro {
    padding: 2rem 0 1.25rem;
}

.about-intro-row {
    align-items: center;
}

.about-steps-image {
    width: min(600px, 100%);
    height: auto;
}

.about-steps-map {
    width: min(600px, 100%);
    height: min(600px, 95vw);
    margin: -1.9rem auto 0;
}

.about-steps-map .steps-hover-overlay {
    width: 124%;
    height: 124%;
    min-width: 380px;
    min-height: 380px;
    max-width: min(560px, 96vw);
    max-height: min(560px, 96vw);
}

.about-page .steps-tooltip {
    color: #ffffff;
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(255, 255, 255, 0.18);
}

.about-intro-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(600px, 95vw);
}

.about-intro h2 {
    color: #111827;
    margin-bottom: 1rem;
}

.about-intro p {
    font-size: 1.12rem;
    color: #374151;
    margin-bottom: 0.95rem;
}

.about-roadmap {
    padding: 1rem 0 3rem;
}

.about-step-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left-width: 6px;
    border-radius: 14px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-step-card:hover {
    transform: scale(1.016);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.about-step-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.about-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #eef2ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.about-step-head .about-step-number {
    font-weight: 700;
    font-size: 5rem;
    line-height: 1;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.about-step-card:hover .about-step-number {
    transform: scale(1.08);
}

.about-step-card h3 {
    font-size: clamp(1.45rem, 2.1vw, 1.9rem);
    color: #111827;
    margin-bottom: 0.55rem;
}

.about-step-card p {
    color: #374151;
    margin-bottom: 0;
    font-size: 1.16rem;
}

.about-step-callout {
    margin-top: 1rem;
    border: 1px solid #d1d5db;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: #f3f4f6;
}

.about-step-callout h4 {
    margin-bottom: 0.35rem;
    color: #111827;
}

.about-step-callout p {
    color: #4b5563;
    font-size: 1.03rem;
}

.about-step-link {
    display: inline-block;
    margin-top: 0.95rem;
    text-decoration: none;
    font-weight: 700;
}

.about-step-link:hover {
    text-decoration: underline;
}

.about-step-blue {
    border-left-color: #6366f1;
    border-color: rgba(99, 102, 241, 0.32);
}
.about-step-blue .about-step-icon,
.about-step-blue .about-step-link {
    color: #4338ca;
}
.about-step-blue .about-step-number {
    color: rgba(67, 56, 202, 0.22);
}
.about-step-blue .about-step-callout {
    border-left-color: #6366f1;
}

.about-step-amber {
    border-left-color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.32);
}
.about-step-amber .about-step-icon,
.about-step-amber .about-step-link {
    color: #b45309;
}
.about-step-amber .about-step-number {
    color: rgba(180, 83, 9, 0.22);
}
.about-step-amber .about-step-callout {
    border-left-color: #f59e0b;
}

.about-step-teal {
    border-left-color: #14b8a6;
    border-color: rgba(20, 184, 166, 0.32);
}
.about-step-teal .about-step-icon,
.about-step-teal .about-step-link {
    color: #0f766e;
}
.about-step-teal .about-step-number {
    color: rgba(15, 118, 110, 0.22);
}
.about-step-teal .about-step-callout {
    border-left-color: #14b8a6;
}

.about-step-green {
    border-left-color: #10b981;
    border-color: rgba(16, 185, 129, 0.32);
}
.about-step-green .about-step-icon,
.about-step-green .about-step-link {
    color: #047857;
}
.about-step-green .about-step-number {
    color: rgba(4, 120, 87, 0.22);
}
.about-step-green .about-step-callout {
    border-left-color: #10b981;
}

.about-step-violet {
    border-left-color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.32);
}
.about-step-violet .about-step-icon,
.about-step-violet .about-step-link {
    color: #6d28d9;
}
.about-step-violet .about-step-number {
    color: rgba(109, 40, 217, 0.22);
}
.about-step-violet .about-step-callout {
    border-left-color: #8b5cf6;
}

.about-step-pink {
    border-left-color: #ec4899;
    border-color: rgba(236, 72, 153, 0.32);
}
.about-step-pink .about-step-icon,
.about-step-pink .about-step-link {
    color: #be185d;
}
.about-step-pink .about-step-number {
    color: rgba(190, 24, 93, 0.22);
}
.about-step-pink .about-step-callout {
    border-left-color: #ec4899;
}

.about-step-cyan {
    border-left-color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.32);
}
.about-step-cyan .about-step-icon,
.about-step-cyan .about-step-link {
    color: #0e7490;
}
.about-step-cyan .about-step-number {
    color: rgba(14, 116, 144, 0.22);
}
.about-step-cyan .about-step-callout {
    border-left-color: #06b6d4;
}

/* Keep inner callout text neutral across all section variants (non-tinted) */
.about-step-card .about-step-callout h4 {
    color: #111827;
}

.about-step-card .about-step-callout p {
    color: #4b5563;
}

@media (max-width: 991.98px) {
    .about-hero-card {
        min-height: 130px;
        padding: 1.15rem 1rem 1.15rem 5.4rem;
    }

    .about-hero-badge {
        width: 62px;
        height: 62px;
        left: 0.95rem;
    }

    .about-hero-badge .bi-cash-coin {
        font-size: 1.7rem;
    }

    .about-steps-map {
        width: min(440px, 100%);
        height: min(440px, 90vw);
        margin-top: -0.35rem;
    }

    .about-intro-copy {
        min-height: min(440px, 90vw);
    }

    .about-steps-map .steps-hover-overlay {
        min-width: 320px;
        min-height: 320px;
        max-width: min(460px, 94vw);
        max-height: min(460px, 94vw);
    }

    .about-intro p {
        font-size: 1.06rem;
    }

    .about-step-card p {
        font-size: 1.05rem;
    }

    .about-step-head .about-step-number {
        font-size: 4.2rem;
    }
}

@media (max-width: 575.98px) {
    .about-hero-card {
        min-height: 126px;
        padding: 1rem 0.85rem;
        text-align: left;
    }

    .about-hero-badge {
        position: static;
        transform: none;
        margin-bottom: 0.7rem;
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }

    .about-hero-badge .bi-cash-coin {
        font-size: 1.45rem;
    }

    .about-steps-map {
        width: min(360px, 100%);
        height: min(360px, 92vw);
        margin-top: 0;
    }

    .about-intro-copy {
        min-height: auto;
    }

    .about-steps-map .steps-hover-overlay {
        min-width: 250px;
        min-height: 250px;
        max-width: min(360px, 92vw);
        max-height: min(360px, 92vw);
    }

    .about-step-card {
        padding: 1.15rem 1rem;
    }

    .about-step-number {
        font-size: 1.8rem;
    }

    .about-step-card h3 {
        font-size: 1.5rem;
    }

    .about-step-head .about-step-number {
        font-size: 3.35rem;
    }
}
.steps-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resource-card-wrap {
    position: relative;
}

.resource-card .card-text-muted,
.resource-card-muted {
    font-size: var(--text-body);
}

/* =====================================================
   RESOURCES VIEW (video)
   ===================================================== */
.resource-video {
    max-height: 400px;
}

/* List sections: same typography site-wide (title = --text-title, details = --text-body) */
.timeline-grant-meta {
    font-size: var(--text-body);
}
/* List item title: same style for Saved Grants and List Building (no fw-bold) */
.list-item-title {
    font-size: var(--text-title);
    font-weight: 500;
    line-height: 1.3;
    color: var(--grey-900);
}
.lb-accordion-item .timeline-grant-meta {
    font-size: var(--text-body);
}
.lb-accordion-item .lb-accordion-body,
.lb-accordion-item .lb-grant-detail {
    font-size: var(--text-body);
}
.lb-accordion-item .lb-grant-detail dt,
.lb-accordion-item .lb-grant-detail dd {
    font-size: var(--text-body);
}
/* FAQ left topic nav */
.faq-topic-nav {
    border-right: 1px solid var(--border-color, #dee2e6);
    padding-right: 1rem;
}
.faq-topic-nav .nav-link {
    font-weight: 500;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}
.faq-topic-nav-gradient .nav-link {
    color: var(--bs-body-color);
}
.faq-topic-nav-gradient .nav-link:hover {
    background: rgba(254, 240, 138, 0.35);
    color: var(--bs-body-color);
}
.faq-topic-nav-gradient .nav-link.active {
    background: var(--gradient-yellow);
    color: #1f2937;
    border: none;
}
.faq-topic-nav-gradient .nav-link.active:hover {
    background: var(--gradient-yellow-hover);
    color: #1f2937;
}
.faq-search-wrap .form-control {
    font-size: var(--text-body);
}
.faq-search-wrap .input-group-text {
    font-size: var(--text-body);
}
.faq-accordion .accordion-button {
    font-size: var(--text-title);
    font-weight: 600;
    line-height: 1.3;
}
.faq-accordion .accordion-body,
.faq-accordion .faq-content {
    font-size: var(--text-body);
}
.faq-accordion .faq-content p {
    font-size: var(--text-body);
}

/* =====================================================
   FAQ (converted DOCX content)
   ===================================================== */
.faq-content {
    max-width: 48rem;
    line-height: 1.6;
}

.faq-content h1 { font-size: var(--text-title); margin-top: 1.5rem; margin-bottom: 0.75rem; font-weight: 700; }
.faq-content h2 { font-size: var(--text-title); margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }
.faq-content h3 { font-size: var(--text-title); margin-top: 1rem; margin-bottom: 0.5rem; font-weight: 600; }
.faq-content p { font-size: var(--text-body); margin-bottom: 0.75rem; }
.faq-content ul, .faq-content ol { margin-bottom: 0.75rem; padding-left: 1.5rem; }
.faq-content li { font-size: var(--text-body); margin-bottom: 0.25rem; }
.faq-content strong { font-weight: 600; }
.faq-content table { border-collapse: collapse; margin-bottom: 1rem; width: 100%; }
.faq-content th, .faq-content td { border: 1px solid var(--border-color, #dee2e6); padding: 0.5rem 0.75rem; text-align: left; }
.faq-content th { font-weight: 600; background: var(--light-bg, #f8f9fa); }

/* =====================================================
   LIST BUILDING (dashboard)
   ===================================================== */
.lb-sort-select { max-width: 16rem; }
.lb-grant-count { font-weight: 500; padding: 0.35rem 0.65rem; }

.lb-filter-panel {
    position: relative;
    z-index: 10;
}
.lb-filter-panel .form-label { margin-bottom: 0.25rem; }

/* List Building filter panel - improved styling */
.lb-filter-panel-styled {
    background: var(--white);
    border-radius: var(--radius-box);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--grey-200);
    overflow: hidden;
}
.lb-filter-panel-styled .lb-filter-panel-header {
    background: linear-gradient(135deg, var(--grey-50) 0%, var(--grey-100) 100%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--grey-200);
}
.lb-filter-panel-styled .lb-filter-panel-title {
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--grey-800);
}
.lb-filter-panel-styled .lb-filter-panel-body {
    padding: 1rem 1.25rem;
}
.lb-filter-panel-styled .lb-filter-panel-footer {
    padding: 0.75rem 1.25rem;
    background: var(--grey-50);
    border-top: 1px solid var(--grey-200);
}
/* List Building: prominent dark border on all filter dropdowns (Status select + multi-select triggers) */
.lb-filter-panel-styled .lb-multi-dropdown .lb-multi-dropdown-trigger {
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--white);
    border: 1px solid var(--grey-600);
}
.lb-filter-panel-styled .lb-multi-dropdown .lb-multi-dropdown-trigger:hover {
    border-color: var(--primary-color);
    background: var(--white);
}
.lb-filter-panel-styled .lb-multi-dropdown .dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border: 1px solid var(--grey-500);
}
.lb-filter-panel-styled .lb-multi-dropdown-menu label {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.lb-filter-panel-styled .lb-multi-dropdown-menu label:hover {
    background: var(--grey-100);
}
.lb-filter-panel-styled .form-select {
    border-radius: 4px;
    border: 1px solid var(--grey-600);
}
.lb-filter-panel-styled .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

/* Admin approve add grant - checkbox multi-select (same style as List Building) */
.admin-grant-multi-field {
    background: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
}
.admin-grant-multi-dropdown .admin-grant-multi-trigger,
.admin-grant-multi-dropdown .lb-multi-dropdown-trigger {
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--white);
    border: 1px solid var(--grey-600);
}
.admin-grant-multi-dropdown .admin-grant-multi-trigger:hover,
.admin-grant-multi-dropdown .lb-multi-dropdown-trigger:hover {
    border-color: var(--primary-color);
    background: var(--white);
}
.admin-grant-multi-dropdown .dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border: 1px solid var(--grey-500);
}
.admin-grant-multi-dropdown-menu label {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.admin-grant-multi-dropdown-menu label:hover {
    background: var(--grey-100);
}
.admin-grant-multi-field .admin-grant-add-new {
    border-radius: 4px;
    border-color: var(--grey-300);
}
.admin-grant-multi-field .admin-grant-add-btn {
    border-radius: 4px;
    font-size: 0.875rem;
}
#admin-request-approve-modal .form-label.fw-semibold { color: var(--grey-700); }
#admin-request-approve-modal .row.g-3 > [class*="col-"] { margin-bottom: 0.25rem; }

/* Admin Users, Businesses, Partners – card styling with soft gradient */
#admin-users-list .admin-card,
#admin-businesses-list .admin-card,
#admin-partners-list .admin-card,
#admin-applied-list .admin-card {
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: linear-gradient(165deg, #fefefe 0%, #fafbfc 50%, #f4f5f7 100%);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
#admin-users-list .admin-card:hover,
#admin-businesses-list .admin-card:hover,
#admin-partners-list .admin-card:hover,
#admin-applied-list .admin-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--grey-300);
}
#admin-users-list .admin-card .card-body,
#admin-businesses-list .admin-card .card-body,
#admin-partners-list .admin-card .card-body,
#admin-applied-list .admin-card .card-body {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    display: flex;
    flex-direction: column;
}
.admin-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--grey-800);
    margin-bottom: 0.5rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.admin-card-meta {
    font-size: 0.875rem;
    color: var(--grey-600);
    margin-bottom: 0.35rem;
    line-height: 1.45;
    letter-spacing: 0.01em;
}
.admin-card-meta i {
    opacity: 0.85;
    color: var(--grey-500);
    margin-right: 0.35rem;
}
.admin-card-badges {
    font-size: 0.8125rem;
    line-height: 1.4;
}
.admin-card-badges .badge {
    font-weight: 500;
}
.admin-card-actions {
    margin-top: auto;
}
.admin-partner-card .admin-card-actions {
    padding-top: 0.25rem;
}
.admin-applied-card .admin-card-badges {
    align-items: center;
}
.admin-applied-card .admin-card-meta {
    margin-bottom: 0.3rem;
}
.admin-user-card .admin-card-meta,
#admin-businesses-list .admin-card .admin-card-meta {
    margin-bottom: 0.3rem;
}
.admin-badge-role {
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--grey-700) !important;
}
/* Users tab – white text on badges (Admin, Active, Inactive, role) */
#admin-users-list .admin-card-title { color: var(--grey-700); }
#admin-users-list .admin-card-title .badge { color: #fff !important; }
#admin-users-list .admin-card-meta { color: var(--grey-500); }
#admin-users-list .admin-card-badges .badge {
    color: #fff !important;
}
#admin-users-list .admin-badge-role {
    background: var(--grey-700) !important;
    color: #fff !important;
}

/* Applied grants tab – white text on status badge */
#admin-applied-list .admin-card-badges .badge {
    color: #fff !important;
}

/* Partners tab – white text on Active/Inactive badges */
#admin-partners-list .admin-card-badges .badge {
    color: #fff !important;
}

#lb-active-filters .badge button { padding: 0 0.25rem; }
#lb-active-filters .badge .btn-close-sm { margin-left: 0.15rem; }
#lb-active-filters.lb-filters-readonly .btn-close-sm {
    pointer-events: none;
    opacity: 0.5;
}

.lb-grant-list.accordion { border: none; }
.lb-accordion-item {
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.lb-accordion-item:last-child { margin-bottom: 0; }
.lb-accordion-item.account-list-item { padding: 0; }
.lb-accordion-item.account-list-item > .d-flex:first-child { padding: 0.75rem 1rem; }
.lb-accordion-item .accordion-header { border: none; }
.lb-accordion-item .accordion-button {
    font-size: var(--text-body);
    padding: 0.75rem 1rem;
    background: var(--white) !important;
    border: none !important;
}
.lb-accordion-item .accordion-button:not(.collapsed) { box-shadow: none !important; }
.lb-accordion-item .accordion-button::after { display: none; }
.lb-grant-name { font-size: var(--text-body); font-weight: 500; color: var(--grey-900); }
.lb-accordion-body { border-top: 1px solid var(--grey-200); background: var(--grey-100); }
.lb-grant-detail { padding: 0 1rem 1rem; }
.lb-grant-detail dl { margin-bottom: 0; }
.lb-grant-detail dt { font-weight: 600; color: var(--grey-600); }
.lb-grant-detail dd { margin-bottom: 0.5rem; }
.lb-accordion-chevron i,
.lb-accordion-item .accordion-collapse-chevron i {
    transition: transform 0.2s ease;
    font-size: var(--text-body);
    color: var(--grey-500);
}
.lb-accordion-item:has(.accordion-collapse.show) .accordion-collapse-chevron i,
.lb-accordion-item:has(.accordion-collapse.show) .lb-accordion-chevron i { transform: rotate(180deg); }
.lb-star-btn { font-size: var(--text-body); line-height: 1; }
.lb-star-btn:hover { opacity: 0.85; }
.lb-star-btn .bi-star-fill { color: var(--primary-color); }

.lb-page-num { min-width: 2rem; }
#lb-list-building [title] { cursor: pointer; }

/* Contacts tab: typography and sizing (match site vars) */
#store-contacts h4 {
    font-size: var(--text-title);
    font-weight: 700;
}

/* Contacts left sidebar: uniform size for button, input, and category rows */
#store-contacts .contacts-sidebar .account-section-inner {
    --contacts-row-height: 2.5rem;
    --contacts-row-padding: 0.5rem 0.75rem;
}
#store-contacts .contacts-sidebar .account-section-inner .form-control {
    font-size: var(--text-body);
    padding: var(--contacts-row-padding);
    min-height: var(--contacts-row-height);
}
#store-contacts .contacts-sidebar .account-section-inner .form-control::placeholder {
    font-size: var(--text-body);
}
#store-contacts .contacts-sidebar #contacts-add-btn {
    font-size: var(--text-body);
    min-height: var(--contacts-row-height);
    padding: var(--contacts-row-padding);
}
#store-contacts .title-banner.home-section-title-banner .home-section-title {
    font-size: var(--text-title);
}
#store-contacts .account-list-item.contacts-category-item .contacts-category-name,
#store-contacts .account-list-item.contacts-category-item .contacts-category-count {
    font-size: var(--text-body);
}
#store-contacts #contacts-empty {
    font-size: var(--text-body);
}

/* Contacts tab: category list (extends .account-list-item) - same row height as button/input */
.account-list-item.contacts-category-item {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-body);
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-box, 6px);
}
#store-contacts .contacts-sidebar .account-list-item.contacts-category-item {
    min-height: var(--contacts-row-height);
    padding: var(--contacts-row-padding);
}
.account-list-item.contacts-category-item:hover {
    background: var(--grey-100);
}
.account-list-item.contacts-category-item.active {
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black);
    font-weight: 600;
}
.contacts-category-name {
    flex-grow: 1;
    font-weight: 500;
}
.contacts-category-count {
    flex-shrink: 0;
    margin-left: 0.5rem;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-700);
}
/* Contacts table inside account-section-inner */
#store-contacts .account-section-inner .table thead {
    background: var(--grey-700);
    color: var(--white);
    font-size: var(--text-body);
    font-weight: 600;
}
#store-contacts .account-section-inner .table tbody tr:hover {
    background: var(--light-bg);
}
#store-contacts .account-section-inner .table td,
#store-contacts .account-section-inner .table th {
    padding: var(--padding-box);
    vertical-align: middle;
    font-size: var(--text-body);
}
#store-contacts .contact-edit,
#store-contacts .contact-delete {
    color: var(--grey-600);
    font-size: var(--text-body);
}
#store-contacts .contact-edit:hover {
    color: var(--primary-color);
}
#store-contacts .contact-delete:hover {
    color: var(--danger-color, #dc3545);
}

/* Contact Add/Edit modal: match site typography and form sizing */
#contactModal .modal-title {
    font-size: var(--text-title);
    font-weight: 600;
}
#contactModal .form-label.small {
    font-size: var(--text-body);
}
#contactModal .form-control,
#contactModal .form-select {
    font-size: var(--text-body);
    padding: 0.5rem 0.75rem;
}
#contactModal .modal-footer .btn {
    font-size: var(--text-body);
}

/* Application tab: KPI cards and status tabs + accordions */
.plan-stat-card .plan-stat-amount {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-700);
    margin-top: 0.25rem;
}

/* Application KPI cards: compact, use site typography (--text-title, --text-body) */
#application .application-kpi-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(145deg, var(--white) 0%, var(--grey-100) 100%);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 0.4rem 0.6rem 0.4rem 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}
#application .application-kpi-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
}
#application .application-kpi-card .app-kpi-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
}
#application .application-kpi-card .app-kpi-left .plan-stat-value {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
    letter-spacing: -0.02em;
    line-height: 1;
}
#application .application-kpi-card .app-kpi-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
}
#application .application-kpi-card .app-kpi-right-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
#application .application-kpi-card .app-kpi-right .plan-stat-icon {
    font-size: var(--text-body);
    margin: 0;
    flex-shrink: 0;
}
#application .application-kpi-card .app-kpi-right .plan-stat-label {
    font-size: var(--text-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--grey-800);
    margin: 0;
}
#application .application-kpi-card .app-kpi-right .plan-stat-amount-label {
    font-size: var(--text-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--grey-600);
}
#application .application-kpi-card .app-kpi-right .plan-stat-amount-value {
    font-size: var(--text-body);
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}
#application .application-kpi-card .plan-stat-icon i { color: var(--grey-600); }
#application .application-kpi-in-progress .plan-stat-icon i { color: var(--primary-dark); }
#application .application-kpi-awaiting .plan-stat-icon i { color: var(--grey-600); }
#application .application-kpi-approved .plan-stat-icon i { color: #059669; }
#application .application-kpi-rejected .plan-stat-icon i { color: var(--grey-500); }

#application .nav-tabs-application {
    border-bottom: 1px solid var(--grey-200);
    padding: 0 1rem;
    background: var(--grey-100);
}
#application .nav-tabs-application .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-box) var(--radius-box) 0 0;
    padding: 0.6rem 1rem;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
}
#application .nav-tabs-application .nav-link:hover {
    color: var(--grey-900);
    background: var(--white);
}
#application .nav-tabs-application .nav-link.active {
    background: var(--white);
    color: var(--grey-900);
    border-color: var(--grey-200);
    border-bottom-color: var(--white);
    margin-bottom: -1px;
}
#application .app-tab-count {
    font-weight: 400;
    color: var(--grey-500);
}
#application .app-tab-count-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    margin-left: 0.35rem;
    font-size: var(--text-body);
    font-weight: 700;
    line-height: 1;
    color: var(--grey-900);
    background: linear-gradient(135deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    border-radius: 999px;
    vertical-align: middle;
}
#application .nav-tabs-application .nav-link.active .app-tab-count-bubble {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 50%, #eab308 100%);
    color: var(--grey-900);
}
#application .tab-content.account-section-inner {
    border-radius: 0 0 var(--radius-box) var(--radius-box);
}

#application .application-accordion,
#application .application-list {
    border: none;
}
#application .app-accordion-item,
#application .app-list-item {
    display: flex;
    align-items: center;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
#application .app-accordion-item:last-child,
#application .app-list-item:last-child {
    margin-bottom: 0;
}
#application .app-list-item-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}
#application .app-accordion-item .accordion-header {
    border: none;
    display: flex;
    align-items: stretch;
    margin: 0;
}
#application .app-accordion-item .accordion-button {
    font-size: var(--text-body);
    padding: 0.75rem 1rem;
    background: var(--white) !important;
    border: none !important;
    box-shadow: none !important;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    text-align: left;
}
#application .app-accordion-item .accordion-button:not(.collapsed) {
    background: var(--grey-100) !important;
}
#application .app-accordion-item .accordion-button::after { display: none; }
#application .app-list-item-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    width: 10rem;
    margin-right: 1.25rem;
    align-self: center;
    font-family: var(--font-family);
    font-size: var(--text-body);
}
#application .app-list-item-progress-wrap .app-list-item-progress {
    flex: 1;
    min-width: 0;
}
#application .app-list-item-progress-pct {
    flex-shrink: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    min-width: 2.25rem;
    text-align: left;
}
#application .app-list-item-progress {
    height: 22px;
    background: var(--grey-200);
    border-radius: 999px;
    overflow: hidden;
}
#application .app-list-item-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fef9c3 0%, #fef08a 35%, #eab308 70%, #ca8a04 100%);
    border-radius: 999px;
    transition: width 0.25s ease;
}
#application .app-list-item-view {
    flex-shrink: 0;
}
#application .app-accordion-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}
#application .app-accordion-title-line {
    font-weight: 600;
    font-size: var(--text-body);
    color: var(--grey-900);
    line-height: 1.3;
}
#application .app-accordion-details-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.25rem;
    font-size: var(--text-body);
}
#application .app-accordion-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
#application .app-accordion-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    font-size: var(--text-body);
    color: var(--grey-500);
    flex-shrink: 0;
}
#application .app-accordion-detail-icon i {
    vertical-align: middle;
}
#application .app-accordion-detail-label {
    color: var(--grey-500);
    font-weight: 500;
    letter-spacing: 0.03em;
    font-size: var(--text-body);
}
#application .app-accordion-detail-value {
    color: var(--grey-800);
    font-weight: 600;
    font-size: var(--text-body);
}
#application .app-accordion-title {
    font-weight: 600;
    color: var(--grey-900);
    min-width: 0;
}
#application .app-accordion-meta {
    flex-shrink: 0;
}
#application .app-accordion-amount {
    color: var(--grey-800);
}
#application .app-accordion-body {
    border-top: 1px solid var(--grey-200);
    background: var(--grey-100);
    padding: 0.75rem 1rem;
}
#application .app-accordion-detail {
    font-size: var(--text-body);
}
/* =====================================================
   GRANT ROADMAP - MAIN STYLESHEET
   ===================================================== */

/* Theme: yellow, white, black, grey, light blue for distinction */
:root {
    /* Typography: one font and one size per level site-wide */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --text-major: 2rem;      /* 1. Main title (h1, page headlines) */
    --text-subtitle: 1.5rem; /* 2. Subtitle (h2, section titles) */
    --text-title: 1.25rem;   /* 3. Title (h3–h5, card titles, subsection headings) */
    --text-body: 1rem;       /* 4. Body (p, span, li, all content) */
    --primary-color: #eab308;
    --primary-dark: #ca8a04;
    --primary-light: #fef08a;
    --success-color: #eab308;
    --accent-blue: #dbeafe;
    --accent-blue-border: #93c5fd;
    --danger-color: #374151;
    --warning-color: #6b7280;
    --info-color: #6b7280;
    --light-bg: #f8f9fa;
    --grey-50: #f9fafb;
    --grey-100: #f3f4f6;
    --grey-200: #e5e7eb;
    --grey-500: #6b7280;
    --grey-600: #4b5563;
    --grey-700: #374151;
    --grey-800: #2d3748;
    --grey-900: #1f2937;
    --black: #111827;
    --white: #ffffff;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    /* Reusable yellow gradient and border (buttons, badges, active states) */
    --gradient-yellow: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    --gradient-yellow-hover: linear-gradient(135deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    --border-yellow: 1px solid rgba(202, 138, 4, 0.4);
    /* Reusable gray gradient (secondary buttons) */
    --gradient-gray: linear-gradient(135deg, #9ca3af 0%, #6b7280 50%, #4b5563 100%);
    --gradient-gray-hover: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
    /* Reusable red gradient (withdraw, destructive actions) */
    --gradient-red: linear-gradient(135deg, #fca5a5 0%, #ef4444 50%, #dc2626 100%);
    --gradient-red-hover: linear-gradient(135deg, #f87171 0%, #dc2626 50%, #b91c1c 100%);
    --border-red: 1px solid rgba(185, 28, 28, 0.4);
    /* Reusable spacing for fields, list items, table cells */
    --padding-box: 0.75rem 1rem;
    --radius-box: 6px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    font-family: var(--font-family);
}

/* Global Styles – single font stack site-wide */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-body);
    background: linear-gradient(180deg, var(--white) 0%, var(--grey-100) 35%, var(--accent-blue) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--grey-900);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-main {
    flex: 1 0 auto;
}

/* =====================================================
   CONTENT SEPARATION - site-wide (title vs text, sections, list items)
   ===================================================== */

/* Typography: 4 sizes only — main (h1), subtitle (h2), title (h3–h5), body (p/span/li) */
.layout-main h1 { font-size: var(--text-major); margin-bottom: 1rem; color: var(--black); }
.layout-main h2 { font-size: var(--text-subtitle); margin-bottom: 0.9rem; color: var(--grey-900); }
.layout-main h3, .layout-main h4, .layout-main h5 { font-size: var(--text-title); margin-bottom: 0.65rem; color: var(--grey-800); }
.layout-main h3 { margin-bottom: 0.75rem; }
.layout-main h4 { margin-bottom: 0.65rem; }
.layout-main h5 { margin-bottom: 0.55rem; }
.layout-main p, .layout-main span, .layout-main li { font-size: var(--text-body); color: var(--grey-800); }

.layout-main h1 + p,
.layout-main h2 + p,
.layout-main h3 + p,
.layout-main h4 + p,
.layout-main h5 + p {
    margin-top: 0.35rem;
}

/* Section divider line - add class .section-with-line to any section */
.section-with-line {
    border-bottom: 1px solid var(--grey-200);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.section-with-line:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Form fields: darker, bolder text site-wide for readability */
.form-control,
.form-select,
textarea.form-control {
    color: var(--grey-900);
    font-weight: 500;
}
.form-control::placeholder {
    color: var(--grey-600);
    font-weight: 400;
}
.form-select option {
    color: var(--grey-900);
    font-weight: 500;
}

/* Title banner - highlights section/tile titles with distinct background and text color */
.title-banner {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.title-banner .home-section-title,
.title-banner h2,
.title-banner h3,
.title-banner h4,
.title-banner h5 {
    color: var(--grey-900);
    font-weight: 700;
}

.title-banner-count {
    color: var(--grey-700);
    font-weight: 500;
}

/* Section title banner (home page - Plans, Resources) */
.section-title-banner {
    padding: 0.85rem 1.25rem;
}

.section-title-banner h2 {
    color: var(--grey-900);
}

/* Resources section title banner - grey to match Choose Your Plan */
.section-title-banner-resources {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
}

.section-title-banner-resources h2 {
    color: var(--grey-900);
}

/* Dashboard home section tile title banner - blue strip like landing page */
.home-section-title-banner {
    padding: 0.6rem 1rem;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
}

.home-section-title-banner .home-section-title {
    font-size: var(--text-title);
    color: var(--grey-900);
}

.list-group-separated .list-group-item {
    border: 1px solid var(--grey-200) !important;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    padding: 1.25rem 1.5rem !important;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.list-group-separated .list-group-item:last-child {
    margin-bottom: 0;
}

.layout-footer {
    flex-shrink: 0;
}

/* =====================================================
   NAVIGATION (theme: gray bg, black text)
   ===================================================== */
.navbar {
    box-shadow: var(--card-shadow);
}

.navbar-theme {
    background: linear-gradient(105deg, #fefce8 0%, #fef9c3 35%, #e0f2fe 100%) !important;
    border-bottom: 1px solid rgba(234, 179, 8, 0.2);
}

.navbar-brand-theme {
    color: var(--black) !important;
    font-size: var(--text-title);
    letter-spacing: -0.5px;
    font-weight: 700;
}

.navbar-brand-theme:hover {
    color: var(--primary-color) !important;
}

.navbar-logo {
    height: 70px;
    width: auto;
    margin-left: 1.5rem;
}

.nav-link-theme {
    color: var(--black) !important;
    font-weight: 500;
}

.nav-link-theme:hover {
    color: var(--primary-color) !important;
}

.navbar-text-theme {
    color: var(--black) !important;
}

.btn-nav-outline {
    color: var(--black) !important;
    border-color: var(--black) !important;
}

/* Yellow gradient fill: nav Sign In/Profile + Sign In with Email, Hire a Grant Writer, Filters, etc. */
.btn-nav-cta,
.btn-gradient-yellow {
    background: var(--gradient-yellow);
    color: var(--black) !important;
    border: var(--border-yellow);
    font-weight: 600;
}
.btn-nav-cta:hover,
.btn-nav-cta:focus,
.btn-nav-cta.show,
.btn-gradient-yellow:hover,
.btn-gradient-yellow:focus,
.btn-gradient-yellow:active {
    background: var(--gradient-yellow-hover);
    color: var(--black) !important;
    border-color: var(--primary-dark);
}

/* Gray gradient button: same size/style as yellow, for Cancel and secondary actions */
.btn-gradient-gray {
    background: var(--gradient-gray);
    color: var(--white) !important;
    border: 1px solid rgba(75, 85, 99, 0.5);
    font-weight: 600;
}
.btn-gradient-gray:hover,
.btn-gradient-gray:focus,
.btn-gradient-gray:active {
    background: var(--gradient-gray-hover);
    color: var(--white) !important;
    border-color: var(--grey-700);
}

/* Red gradient button: withdraw and destructive actions (dark background -> white text) */
.btn-gradient-red {
    background: var(--gradient-red);
    color: var(--white) !important;
    border: var(--border-red);
    font-weight: 600;
}
.btn-gradient-red:hover,
.btn-gradient-red:focus,
.btn-gradient-red:active {
    background: var(--gradient-red-hover);
    color: var(--white) !important;
    border-color: #b91c1c;
}

/* Dark background buttons: ensure white text for contrast */
.btn-secondary {
    color: var(--white) !important;
}

.navbar .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.3);
}

/* Pull nav links + actions a bit in from the right edge */
.navbar-collapse-right {
    margin-right: 1.5rem;
}

/* Space between last nav link (e.g. Dashboard) and Profile button; accounts for button border */
.navbar-actions {
    margin-left: 1.25rem;
}

/* Navbar toggler: default dark icon on gray background (no filter needed) */

.profile-dropdown {
    min-width: 280px;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

.profile-dropdown-header {
    padding: 0.625rem 1rem;
    font-size: var(--text-body);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--grey-500);
    background: var(--grey-50);
    border-bottom: 1px solid var(--grey-100);
}

.profile-dropdown-info {
    padding: 0.75rem 1rem;
    background: #fff;
}

.profile-dropdown-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.profile-dropdown-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.profile-dropdown-row dt {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-500);
}

.profile-dropdown-row dd {
    margin: 0;
    font-size: var(--text-body);
    color: var(--grey-800);
    word-break: break-word;
}

.profile-dropdown-actions {
    padding: 0.375rem 0;
    background: #fff;
}

.profile-dropdown .dropdown-item {
    padding-left: 1rem;
    padding-right: 1rem;
}

.profile-dropdown .dropdown-item:hover {
    background-color: var(--grey-50);
}

/* Account tab dropdown: hover highlight */
.account-dropdown-item:hover {
    background-color: var(--accent-blue);
    color: var(--grey-900);
}

.account-dropdown-item:focus {
    background-color: var(--accent-blue);
    color: var(--grey-900);
}

/* =====================================================
   SERVICES PAGE
   ===================================================== */

/* Hero Section */
.services-page {
    overflow-x: hidden;
}

/* Home page wrapper: consistent typography and font */
.home-page {
    font-family: var(--font-family);
    font-size: var(--text-body);
}
.home-page h1, .home-page h2, .home-page h3, .home-page h4 {
    font-family: var(--font-family);
}

.hero-section {
    background: transparent;
    color: #1f2937;
    padding: 80px 0;
    border-bottom: 1px solid #e5e7eb;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-left {
    text-align: left;
}

.hero-section h1 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    font-size: var(--text-major);
}

.hero-section .main-text {
    display: inline;
    font-size: var(--text-major);
}

.hero-section .dynamic-text {
    display: inline;
    color: var(--primary-color);
    font-weight: 800;
    min-width: 150px;
    font-size: var(--text-major);
}

.dynamic-text .text-item {
    display: none;
    opacity: 0;
    font-size: var(--text-major);
    color: var(--primary-color);
}

.dynamic-text .text-item.active {
    display: inline;
    animation: smoothFade 1.3s ease-in-out forwards;
    font-size: var(--text-major);
    color: var(--primary-color);
}

@keyframes smoothFade {
    0% { opacity: 0; }
    25% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

.hero-section .lead {
    font-size: var(--text-body);
    margin-bottom: 30px;
    max-width: 100%;
    color: #6b7280;
}

.customers-badge {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent-blue);
    border: 2px solid var(--accent-blue-border);
    border-radius: 50px;
    color: var(--grey-900);
    font-size: var(--text-body);
    font-weight: 600;
    margin-top: 20px;
}

.customers-badge strong {
    color: var(--grey-900);
    font-size: var(--text-body);
}

.hero-right {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--grey-200) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: var(--text-body);
    position: relative;
    overflow: hidden;
}

.overlay-tile {
    position: absolute;
    padding: 20px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    text-align: center;
}

/* 70+ Matches: oval bubble, bent tail from top-right to bottom-left (tail on right, into bubble) */
.overlay-tile.matches {
    bottom: 20px;
    left: -40px;
    width: 140px;
    min-height: 72px;
    padding-left: 40px;
    padding-right: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef08a 50%, #facc15 100%);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--black);
}

/* Bent tail: top-right to bottom-left - rotated oval */
.overlay-tile.matches::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14px;
    width: 28px;
    height: 44px;
    transform: translateY(-50%) rotate(45deg);
    background: linear-gradient(135deg, #fef08a 0%, #facc15 100%);
    border-radius: 50%;
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-left-color: transparent;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

.overlay-tile.matches .number {
    font-size: var(--text-title);
    color: var(--black);
}

.overlay-tile.matches .label {
    font-size: var(--text-body);
    color: var(--black);
    margin-top: 5px;
}

/* $40K Funded: oval bubble, bent tail from bottom-left to top-right (tail on left, into bubble) */
.overlay-tile.funded {
    top: 20px;
    right: -40px;
    width: 140px;
    min-height: 72px;
    padding-left: 20px;
    padding-right: 40px;
    padding-top: 16px;
    padding-bottom: 16px;
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black);
}

/* Bent tail: bottom-left to top-right - rotated oval */
.overlay-tile.funded::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -14px;
    width: 28px;
    height: 44px;
    transform: translateY(-50%) rotate(-45deg);
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    border-radius: 50%;
    border: var(--border-yellow);
    border-right-color: transparent;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
}

.overlay-tile.funded .amount {
    font-size: var(--text-title);
    color: var(--black);
}

.overlay-tile.funded .label {
    font-size: var(--text-body);
    color: var(--black);
    margin-top: 5px;
}

/* Success System Section */
.success-system {
    padding: 80px 0;
    background: transparent;
    border-bottom: 1px solid var(--grey-200);
}

.success-system h2 {
    font-size: var(--text-major);
    margin-bottom: 15px;
    color: #1f2937;
}

.success-system > .container > p {
    color: #6b7280;
}

.success-system-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 40px;
}

.success-text {
    padding: 20px 0;
}

.success-text h2 {
    font-size: var(--text-major);
    font-weight: 800;
    margin-bottom: 20px;
    color: #1f2937;
}

.success-text p {
    font-size: var(--text-body);
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 20px;
}

.success-text .cta-text {
    color: var(--primary-color);
    font-size: var(--text-body);
    margin-bottom: 20px;
}

.success-text .cta-text a {
    text-decoration: none;
}

/* Our Partners section: title same size and style as Grant Support Services (Services page) */
#our-partners .section-title-banner h2 {
    font-size: var(--text-major);
    font-weight: 700;
    color: #1f2937;
}

.success-image {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-steps-grid {
    display: none;
}

.success-step {
    padding: 30px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.success-step:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: var(--text-title);
    font-weight: bold;
    border-radius: 50%;
    margin-bottom: 15px;
}

.success-step h5 {
    font-size: var(--text-title);
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.success-step p {
    font-size: var(--text-body);
    color: #6b7280;
}

/* Grant Support Services Section */
.grant-support-section {
    padding: 80px 0;
    background: transparent;
    font-family: var(--font-family);
    font-size: var(--text-body);
}

.grant-support-section h2 {
    font-size: var(--text-major);
    margin-bottom: 50px;
    color: #1f2937;
}

.grant-support-section h3 {
    font-size: var(--text-title);
    font-weight: 700;
    color: #1f2937;
}

.grant-support-section p {
    font-size: var(--text-body);
}

/* Grant Support: Get Grant Help intro & content cards */
.services-intro {
    font-size: var(--text-body);
}
.services-intro-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.services-intro-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
}
.content-card {
    border-radius: 12px;
    background: var(--white);
    font-size: var(--text-body);
    border: 1px solid var(--grey-200);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.content-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-blue-border);
}
.content-card .card-body {
    padding: 1.25rem 1.5rem;
}

/* Grant & Business Consulting: section title */
.services-section-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}

/* Service option cards (General Grant Session, Business Plan Review, etc.) */
.service-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.service-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-blue-border);
}

/* Blue strip for service card titles (same as plan-name-strip) */
.service-card-title-strip {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}
.service-card:has(.service-badge) .service-card-title-strip {
    margin-top: 1.25rem;
}
.service-card-title-strip .service-card-title {
    margin-bottom: 0;
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}

/* Fractional Plan badge overlapping card border (like 7 Days Free Trial / Most Popular) */
.service-card .service-badge {
    position: absolute;
    top: -8px;
    left: 16px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: var(--text-body);
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fef9c3 50%, var(--primary-color) 100%);
    border: 1px solid rgba(234, 179, 8, 0.5);
    color: var(--grey-900);
    margin-bottom: 0;
}
.service-card .service-badge:hover {
    text-decoration: none;
}

.service-card-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 0.5rem;
}
.service-card-subtitle {
    font-size: var(--text-body);
    color: var(--grey-600);
}
.service-card-desc {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.service-card-desc.service-card-desc-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.service-card-desc.service-card-desc-expanded {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
}
.service-read-more,
.link-brown {
    color: #795548 !important;
    text-decoration: none;
    font-weight: 500;
}
.service-read-more:hover,
.link-brown:hover {
    color: #5d4037 !important;
    text-decoration: underline;
}
.service-card-includes {
    font-size: var(--text-body);
    color: var(--grey-600);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--grey-200);
}
.service-includes-label {
    font-weight: 600;
    color: var(--grey-700);
}
.service-card-featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.2);
}

/* Not sure what service / Contact CTA box (Grant Support section) */
.services-cta-box {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    font-size: var(--text-body);
}
.services-cta-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.services-cta-text {
    font-size: var(--text-body);
    color: var(--grey-700);
}

/* Plans Section */
.plans-section {
    padding: 80px 0;
    background: transparent;
    border-bottom: 1px solid var(--grey-200);
}

.plans-section h2 {
    font-size: var(--text-major);
    margin-bottom: 50px;
    color: #1f2937;
}

.plan-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.plan-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.plan-card.featured {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.25);
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: var(--text-body);
    font-weight: 700;
    text-transform: uppercase;
}

.free-trial-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, var(--grey-600) 0%, var(--grey-700) 100%);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: var(--text-body);
    font-weight: 700;
    text-transform: uppercase;
}

.plan-header {
    margin-bottom: 20px;
}

.plan-header h4 {
    font-size: var(--text-title);
    font-weight: 700;
    margin-bottom: 0;
    color: #1f2937;
}

/* Blue strip for plan name (Basic Plan, Success Plan, etc.) */
.plan-name-strip {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.plan-name-strip h4 {
    font-size: var(--text-title);
    font-weight: 700;
    color: #1f2937;
}

.plan-billing,
.plan-pricing-text {
    font-size: var(--text-body);
    color: #111827;
    margin: 0;
}

.plan-billing.text-black,
.plan-pricing-text.text-black {
    color: #111827 !important;
}

.plan-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.price-amount {
    font-size: var(--text-major);
    font-weight: 700;
    color: var(--primary-color);
}
/* Plans section: C$ amounts same size as "Our Success System" and yellow */
.plans-section .plan-card:not(.additional-plan) .price-amount {
    font-size: var(--text-major);
    color: var(--primary-color);
}

.price-period {
    font-size: var(--text-body);
    color: #6b7280;
    margin-left: 5px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    flex-grow: 1;
}

.plan-features li {
    padding: 10px 0;
    color: var(--grey-700);
    font-size: var(--text-body);
    border-bottom: 1px solid var(--grey-100);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 8px;
}

.plan-card .btn {
    margin-top: auto;
}

/* Additional plans (Fractional, Association) - same width as default plans, notes expand to right and push next block */
.additional-plans-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.5rem;
}
.additional-plan-wrapper {
    display: flex;
    align-items: stretch;
    flex: 0 0 calc((100% - 1.5rem) / 3);
    min-width: 0;
    min-height: 100%;
    transition: flex 0.3s ease;
}
.additional-plan-wrapper.is-expanded {
    flex: 0 0 calc((100% - 1.5rem) / 3 + 320px);
}
.plan-card.additional-plan {
    padding: 1.5rem 1.5rem;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 420px;
    border-radius: 12px 0 0 12px;
    border-right: none;
    display: flex;
    flex-direction: column;
}
.plan-card.additional-plan .plan-features {
    flex: 1 1 auto;
}
.plan-notes-toggle {
    flex: 0 0 36px;
    width: 36px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-left: none;
    border-radius: 0 12px 12px 0;
}
.additional-plan-wrapper.is-expanded .plan-notes-toggle {
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--grey-600);
    font-size: var(--text-subtitle);
    padding: 0;
}
.plan-notes-toggle:hover {
    background: var(--accent-blue);
    color: white;
}
.plan-notes-toggle-icon {
    display: block;
    line-height: 1;
}
.additional-plan-wrapper.is-expanded .plan-notes-toggle-icon {
    transform: rotate(90deg);
}
.plan-notes-panel {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    overflow: hidden;
    background: white;
    border: 1px solid var(--grey-200);
    border-left: none;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    transition: flex 0.3s ease, width 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.additional-plan-wrapper.is-expanded .plan-notes-panel {
    flex: 0 0 min(320px, calc(100vw - 2rem));
    width: min(320px, calc(100vw - 2rem));
    min-width: 0;
}
.plan-notes-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1rem 2.5rem 1rem;
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}
.plan-notes-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--grey-100);
    border-radius: 6px;
    font-size: var(--text-title);
    line-height: 1;
    cursor: pointer;
    color: var(--grey-600);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.plan-notes-close:hover {
    background: var(--grey-200);
    color: var(--grey-800);
}
.plan-card-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    margin-bottom: 0.75rem;
}
.plan-card-p:last-child {
    margin-bottom: 0;
}

/* Not sure where to start CTA (Plans section) */
.plans-cta-box {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    font-size: var(--text-body);
}
.plans-cta-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.plans-cta-text {
    font-size: var(--text-body);
    color: var(--grey-700);
}

/* Resources Section */
.resources-section {
    padding: 80px 0;
    background: transparent;
    border-bottom: 1px solid var(--grey-200);
}

.resources-section h2 {
    font-size: var(--text-major);
    margin-bottom: 50px;
    color: #1f2937;
}

.resource-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--grey-200) !important;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.resource-card .card-title {
    color: #1f2937;
    padding: 0;
    margin: 0;
}

/* Light blue strip for resource card title */
.resource-name-strip {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
}

.resource-name-strip .card-title {
    color: #1f2937;
    margin: 0;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover) !important;
    border-color: var(--primary-color) !important;
}

.resource-icon {
    font-size: var(--text-title);
    margin-bottom: 15px;
}

.badge {
    font-size: var(--text-body);
    font-weight: 500;
}

.resource-card h5 {
    font-size: var(--text-title);
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.resource-card p {
    font-size: var(--text-body);
    color: #6b7280;
    margin-bottom: 20px;
    flex-grow: 1;
}

.resource-card .btn {
    margin-top: auto;
}

/* Service Providers Access cards (Explore Ecosystem / Become a Service Provider) */
.become-provider-card {
    border-radius: 12px;
    font-size: var(--text-body);
    border: 1px solid var(--grey-200);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.become-provider-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-blue-border);
}
.become-provider-card .card-body {
    padding: 1.25rem 1.5rem;
}
.become-provider-card .service-card-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
.become-provider-card .services-intro-p {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-yellow);
    padding: 80px 0;
    font-family: var(--font-family);
}

.cta-section h2,
.cta-section p,
.cta-section .lead {
    color: var(--black);
    font-size: var(--text-body);
}
.cta-section h2 {
    font-size: var(--text-major);
    font-weight: 800;
}
.cta-section .lead {
    font-size: var(--text-body);
}

.btn-cta-contact {
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 50%, #111827 100%);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--white) !important;
    font-weight: 600;
}

.btn-cta-contact:hover,
.btn-cta-contact:focus,
.btn-cta-contact:active {
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
    border-color: var(--black);
    color: var(--white) !important;
}

/* =====================================================
   AUTH PAGES (SIGNIN/SIGNUP)
   ===================================================== */

.auth-page {
    background-color: var(--light-bg);
    min-height: 80vh;
    padding-top: 2rem;
}

/* No min-height on row so card flows from top and "Already have an account?" stays visible */
.auth-page .row {
    min-height: 0;
    align-items: flex-start;
}

.auth-card {
    background: white;
    padding: 28px 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.auth-card h2 {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

/* Signup two-column layout: align second row (Your Name | Password) to same height */
/* Signup: no min-height so row doesn't push "Already have an account?" below fold */
.auth-card .signup-field-row {
    min-height: 0;
}

.auth-card .form-control-lg {
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: var(--text-body);
}

.auth-card .form-control-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

.auth-card .btn-lg:not(.btn-oauth) {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black) !important;
}

.auth-card .btn-lg:not(.btn-oauth):hover,
.auth-card .btn-lg:not(.btn-oauth):focus,
.auth-card .btn-lg:not(.btn-oauth):active {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark);
    color: var(--black) !important;
}

.auth-validation-message {
    white-space: pre-line;
}

.password-input-wrapper .password-toggle {
    text-decoration: none;
    font-size: var(--text-title);
}

.password-input-wrapper .password-toggle:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* OAuth buttons: white text on sign-in/sign-up */
/* OAuth logo-only square buttons, side by side */
.oauth-buttons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.btn-oauth {
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-oauth:hover {
    transform: scale(1.05);
}

/* Grey background for all; logos use brand colors via SVG fill / .oauth-icon-apple */
.btn-oauth-google,
.btn-oauth-microsoft,
.btn-oauth-apple {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: inherit;
}

.btn-oauth-google:hover,
.btn-oauth-microsoft:hover,
.btn-oauth-apple:hover {
    background-color: #dee2e6;
    border-color: #ced4da;
    color: inherit;
}

.oauth-icon-apple {
    color: #000;
}

/* =====================================================
   DASHBOARD PAGE
   ===================================================== */

.dashboard-page {
    background: linear-gradient(180deg, var(--white) 0%, var(--grey-100) 35%, var(--accent-blue) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Same font and base size across all dashboard tabs (Home, List Building, Saved Grants, Application, etc.) */
.dashboard-page .tab-content,
.dashboard-page .tab-pane {
    font-family: var(--font-family);
    font-size: var(--text-body);
}
.dashboard-page .tab-content .form-control,
.dashboard-page .tab-content .form-select,
.dashboard-page .tab-content .form-label {
    font-family: var(--font-family);
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-header h1 {
    color: #1f2937;
}

.dashboard-header .btn:not(.btn-gradient-yellow) {
    border-radius: 8px;
    background: var(--primary-color);
    border: none;
}

.dashboard-header .btn:not(.btn-gradient-yellow):hover {
    background: var(--primary-dark);
}

.dashboard-header .btn-gradient-yellow {
    border-radius: 8px;
    background: var(--gradient-yellow);
    color: var(--black) !important;
    border: var(--border-yellow);
}

.dashboard-header .btn-gradient-yellow:hover {
    background: var(--gradient-yellow-hover);
    color: var(--black) !important;
    border-color: var(--primary-dark);
}

/* Admin viewing expired company: disable tab content (read-only) */
.dashboard-content-disabled {
    pointer-events: none;
    opacity: 0.75;
    user-select: none;
}

/* Stat Cards */
.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: #9ca3af;
    font-size: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Home tab value banner - styled label and value, vertically centered */
.home-value-banner {
    min-height: 1in;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 1.5rem;
    gap: 0.5rem;
}

.home-value-banner .value-banner-label,
.home-value-banner .value-banner-amount {
    line-height: 1.2;
}

.home-value-banner .value-banner-label {
    font-size: var(--text-title);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--grey-600);
}

.home-value-banner .value-banner-amount {
    font-size: var(--text-title);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

/* Home tab two sections - bordered; title/description/list each have consistent size across both columns */
.home-section {
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.home-section-title {
    font-size: var(--text-title);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.home-section-desc {
    font-size: var(--text-body);
    margin-bottom: 0.75rem;
    min-height: 2.8rem;
    flex-shrink: 0;
}

/* List area - same height for both sections, always scrollable */
.home-section-list-scroll {
    height: 420px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.home-matches-list.list-group-separated .list-group-item,
.home-portfolio-list.list-group-separated .list-group-item {
    font-size: var(--text-body);
    border: 1px solid var(--grey-200) !important;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    padding: 1.25rem 1.5rem !important;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    min-height: 3.25rem;
}

.home-matches-list .list-group-item:last-child,
.home-portfolio-list .list-group-item:last-child {
    margin-bottom: 0;
}

.home-section .see-all-link {
    font-size: var(--text-body);
}

.see-all-link {
    color: var(--primary-color);
    text-decoration: none;
}

.see-all-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Grant Portfolio status badges (pastel, yellow/gray theme) - kept small so list row height matches Your Matches */
.portfolio-status {
    font-size: var(--text-body);
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Saved: neutral/saved (same as before) */
.portfolio-status-added {
    background: #fef9c3;
    color: #a16207;
}
.portfolio-status-new {
    background: #fef9c3;
    color: #a16207;
}

/* In Progress: blue (working on it) */
.portfolio-status-in-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Submitted: amber (awaiting review) */
.portfolio-status-submitted {
    background: #fef08a;
    color: #ca8a04;
}

/* Approved: green */
.portfolio-status-approved {
    background: #dcfce7;
    color: #166534;
}

/* Rejected: red */
.portfolio-status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

/* Grant request history badges (Add Grants tab) */
.grant-history-badge {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}
.grant-history-badge-approved {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: #ffffff !important;
}
.grant-history-badge-withdrawn {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
    color: #1f2937 !important;
}
.grant-history-badge-pending {
    background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    color: #422006 !important;
}
.grant-history-badge-rejected {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 50%, #dc2626 100%);
    color: #ffffff !important;
}

/* Grant Cards */
.grant-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grant-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.grant-card.favorite-card {
    border: 2px solid var(--primary-color);
    background: rgba(234, 179, 8, 0.08);
}

.grant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.grant-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    flex-grow: 1;
}

.status-badge {
    font-size: var(--text-body);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-badge.status-applied {
    background: var(--grey-200);
    color: var(--grey-700);
}

.status-badge.status-in-progress {
    background: var(--grey-100);
    color: var(--grey-700);
}

.status-badge.status-awaiting-review {
    background: var(--grey-200);
    color: var(--grey-900);
}

.status-badge.status-approved {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.status-badge.status-rejected {
    background: var(--grey-200);
    color: var(--grey-700);
}

.grant-description {
    font-size: var(--text-body);
    color: #6b7280;
    margin-bottom: 15px;
    flex-grow: 1;
}

.grant-details {
    background: var(--light-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-body);
    padding: 4px 0;
}

.detail-item .label {
    color: #9ca3af;
    font-weight: 600;
}

.detail-item .value {
    color: #1f2937;
    font-weight: 500;
}

.grant-card .btn {
    margin-top: auto;
}

.grant-card .form-select-sm {
    border-radius: var(--radius-box);
    font-size: var(--text-body);
    padding: 4px 8px;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* Account tab: section cards and edit */
/* Account tab sections: same sectional pattern as Home (border outline + inner content style) */
.account-section.home-section {
    /* Uses .home-section border, border-radius 8px, padding 1rem from main .home-section rule */
}

/* Soft gradient for Home tab cards (client and admin) */
#home .home-section.account-section {
    background: linear-gradient(165deg, #fefefe 0%, #fafbfc 45%, #f5f6f8 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.account-section .home-section-title-banner {
    margin-bottom: 1rem;
}

/* Home tab: constrain columns so content doesn't overflow the section */
#home .home-section.account-section .row > [class*="col-"] {
    min-width: 0;
}

.account-section-inner {
    padding: 1rem;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-family: var(--font-family);
    font-size: var(--text-body);
}

/* Team members: blue "Primary" label for the primary user */
.badge-primary-label {
    font-size: var(--text-body);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 50%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
}

/* Team members: Editor (yellow gradient) and Viewer (gray gradient) labels */
.badge-gradient-yellow {
    background: var(--gradient-yellow);
    color: var(--black);
    border: 1px solid rgba(202, 138, 4, 0.4);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.badge-gradient-gray {
    background: var(--gradient-gray);
    color: var(--white);
    border: 1px solid rgba(75, 85, 99, 0.5);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}


/* Account detail fields (personal/company view): each field in a bordered box */
.account-detail-field {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: var(--padding-box);
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-detail-field .account-val {
    margin-top: 0.25rem;
}

/* Account edit form: each field group in a bordered box */
.account-edit-field {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: var(--padding-box);
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-edit-field .form-control {
    border-color: var(--grey-200);
}

/* Company Information subsection titles (Company Identification, Founder, etc.) */
.account-subsection-title {
    display: block;
    font-size: var(--text-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-700);
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Account lists (team members, billing history, payment methods): each item bordered */
.account-list-item {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    padding: var(--padding-box);
    margin-bottom: 0.5rem;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-list-item:last-child {
    margin-bottom: 0;
}

/* Saved Grants: meta row (amount, closes on, planned) with icons and badge */
.timeline-grant-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: var(--text-body);
    color: var(--grey-600);
}
.timeline-grant-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.timeline-grant-meta-item i {
    font-size: var(--text-body);
    color: var(--grey-500);
    flex-shrink: 0;
}
.timeline-grant-meta-amount {
    font-weight: 600;
    color: var(--grey-800);
}
.timeline-grant-meta-amount i {
    color: var(--primary-dark);
}
.timeline-grant-meta-planned {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue-border);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
}
.timeline-grant-meta-planned i {
    color: var(--grey-600);
}

/* Ensure two-column list items keep right content aligned and prevent wrapping,
   while truncating or clipping long left text as needed. */
.home-matches-list .list-group-item,
.home-portfolio-list .list-group-item,
.timeline-grant-list .timeline-grant-item,
.account-list-item.d-flex.justify-content-between {
    gap: 0.75rem;
}
.home-matches-list .list-group-item > .flex-grow-1,
.home-portfolio-list .list-group-item > .flex-grow-1,
.timeline-grant-item > .flex-grow-1 {
    min-width: 0; /* allow text-truncate to work */
}
.home-matches-list .list-group-item span.text-truncate,
.home-portfolio-list .list-group-item span.text-truncate,
.timeline-grant-item .list-item-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-matches-list .list-group-item > span.text-muted,
.home-portfolio-list .list-group-item > .portfolio-status,
.timeline-grant-item .timeline-grant-view {
    flex-shrink: 0;
    white-space: nowrap;
}

.account-edit-btn:hover {
    color: var(--primary-color) !important;
}

/* Edit icon button: square with gradient yellow */
.account-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0 !important;
    border: var(--border-yellow) !important;
    border-radius: 6px;
    background: var(--gradient-yellow);
    color: var(--black) !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.account-edit-btn:hover,
.account-edit-btn:focus {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark) !important;
    color: var(--black) !important;
}

.account-edit-btn i {
    font-size: var(--text-body);
}

/* Current plan stats: Days remaining, Team members, Next billing */
.plan-stats-row {
    display: flex;
    flex-wrap: wrap;
}

.plan-stat-card {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    text-align: center;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.plan-stat-card .plan-stat-icon {
    font-size: var(--text-title);
    color: var(--grey-600);
    margin-bottom: 0.35rem;
}

.plan-stat-card .plan-stat-icon i {
    vertical-align: middle;
}

.plan-stat-card .plan-stat-value {
    font-size: var(--text-subtitle);
    font-weight: 700;
    color: var(--grey-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.plan-stat-card .plan-stat-value-sm {
    font-size: var(--text-body);
    font-weight: 600;
}

.plan-stat-card .plan-stat-sep {
    font-weight: 400;
    color: var(--grey-500);
    margin: 0 0.1em;
}

.plan-stat-card .plan-stat-label {
    font-size: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-600);
    margin-top: 0.15rem;
}

.plan-stat-card .plan-stat-autopay-off {
    font-size: var(--text-body);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--bs-danger, #dc3545);
    margin-top: 0.35rem;
}

.plan-stat-card .progress {
    background: var(--grey-200);
    border-radius: 2px;
}

.plan-stat-card .progress-bar {
    background: linear-gradient(90deg, #fef08a 0%, #eab308 100%);
    border-radius: 2px;
}

.plan-stat-card.plan-stat-days .plan-stat-value { color: var(--primary-color); }
.plan-stat-card.plan-stat-members .plan-stat-value { color: var(--grey-800); }

/* Grant detail: top row = checkpoints (3/4) + completion % (1/4) */
.grant-detail-top-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}
.grant-checkpoints-wrap { flex: 0 0 75%; min-width: 0; }
.grant-completion-widget {
    flex: 0 0 25%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.grant-completion-widget .grant-completion-label { font-size: var(--text-body); color: var(--grey-600); }
.grant-completion-widget .d-flex { align-items: center; gap: 0.5rem; }
.grant-completion-widget .progress.grant-progress-bar { height: 14px; }
.grant-completion-pct { font-size: var(--text-body); font-weight: 600; white-space: nowrap; min-width: 2.5em; }

/* Grant detail: checkpoint progress (4 stages) */
.grant-checkpoints { padding: 0.5rem 0; }
.grant-checkpoints .d-flex { gap: 0; }
.grant-checkpoint-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.grant-checkpoint-item.active { opacity: 1; }
.grant-checkpoint-item.current .grant-checkpoint-num {
    background: var(--gradient-yellow);
    color: var(--black);
    border-color: transparent;
}
.grant-checkpoint-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--grey-300);
    background: var(--grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-body);
}
.grant-checkpoint-label {
    font-size: var(--text-body);
    margin-top: 0.35rem;
    color: var(--grey-600);
    text-align: center;
    max-width: 4.5rem;
}
.grant-checkpoint-line {
    flex: 1;
    min-width: 1rem;
    height: 2px;
    background: var(--grey-200);
    align-self: center;
    margin: 0 0.25rem;
    transition: background 0.2s;
}
.grant-checkpoint-line.active { background: var(--primary-color); }
.grant-progress-bar .progress-bar {
    background: linear-gradient(90deg, #fef08a 0%, #eab308 100%);
    border-radius: 4px;
}

/* Grant detail: Status – plain label + regular dropdown */
.grant-status-widget-label {
    font-size: 0.875rem;
    color: var(--grey-700);
    white-space: nowrap;
}
.grant-status-select {
    min-width: 8rem;
}

.grant-message-board-scroll {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

/* Grant detail: all section content areas scroll after a fixed height */
.grant-section-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}
.grant-section-scroll::-webkit-scrollbar { width: 6px; }
.grant-section-scroll::-webkit-scrollbar-track { background: var(--grey-200, #e5e7eb); border-radius: 3px; }
.grant-section-scroll::-webkit-scrollbar-thumb { background: var(--grey-500, #6b7280); border-radius: 3px; }
.grant-section-scroll::-webkit-scrollbar-thumb:hover { background: var(--grey-600, #4b5563); }

/* Supporting Documents Checklist: accordion items, hide empty when has docs */
.grant-checklist-list .accordion-button { font-size: var(--text-title); }
.grant-checklist-list .accordion-button::after { margin-left: auto; }
.grant-checklist-list .accordion-button:not(.collapsed) { font-weight: 600; }
.grant-checklist-list .accordion-body { font-size: var(--text-body); }
.grant-checklist-docs:has(.grant-doc-name) .grant-checklist-docs-empty { display: none !important; }

/* Upload Documents: expandable doc cards */
.grant-doc-card-header { cursor: pointer; user-select: none; }
.grant-doc-card-header:hover { background: var(--grey-100, #f3f4f6); border-radius: 0.25rem; }
.grant-doc-card-header .grant-doc-view-btn,
.grant-doc-card-header .btn-gradient-gray { border-radius: 6px; min-width: 2rem; }
.grant-doc-card-header .grant-doc-card-chevron { transition: transform 0.2s ease; }
.grant-doc-card-body.show .grant-doc-card-chevron { transform: rotate(90deg); }
.grant-doc-card .grant-doc-checklist-options label { cursor: pointer; }

/* Upload Documents thumbnails (legacy / fallback) */
.grant-doc-thumb:hover { background: var(--grey-100); }
.grant-docs-thumbnails .grant-doc-thumb { min-height: 2.5rem; }

/* Application Contacts cards */
.grant-contact-card dt { font-size: var(--text-body); text-transform: uppercase; letter-spacing: 0.02em; }
.grant-contact-card .grant-contact-remove { opacity: 0.7; }
.grant-contact-card .grant-contact-remove:hover { opacity: 1; }

/* =====================================================
   Account → Subscriptions: consistent styling
   ===================================================== */

.account-page-title {
    font-size: var(--text-subtitle);
    font-weight: 700;
    color: var(--grey-900);
    letter-spacing: -0.02em;
}

/* Current plan: plan name + amount block */
.subscription-plan-hero {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Plan type badge – stands out as current plan name */
.subscription-plan-badge {
    display: inline-block;
    font-size: var(--text-body);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--grey-900);
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(234, 179, 8, 0.2);
}

.subscription-plan-price {
    margin-bottom: 0.25rem;
}

.subscription-plan-amount {
    font-size: var(--text-subtitle);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.subscription-plan-period {
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
    margin-left: 0.15rem;
}

.subscription-plan-billing-note {
    font-size: var(--text-body);
    color: var(--grey-600);
    margin-bottom: 0;
}

/* Empty states (no invoices, no payment methods) */
.subscription-empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--grey-100);
    border: 1px dashed var(--grey-300);
    border-radius: 8px;
}

.subscription-empty-icon {
    font-size: var(--text-major);
    color: var(--grey-400);
    display: block;
    margin-bottom: 0.75rem;
}

.subscription-empty-text {
    font-size: var(--text-body);
    color: var(--grey-600);
}

/* Section intro text (Upgrade plan copy) */
.subscription-section-desc {
    font-size: var(--text-body);
    color: var(--grey-700);
    line-height: 1.5;
}

/* Plan detail card: shown when Change plan is clicked or admin suggestion */
.plan-detail-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.plan-detail-card-header {
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--grey-900);
    letter-spacing: -0.01em;
}

.plan-detail-card-desc {
    font-size: var(--text-body);
    color: var(--grey-600);
    line-height: 1.5;
    margin-bottom: 0;
}

.plan-detail-stats {
    display: flex;
    flex-wrap: wrap;
}

.plan-detail-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.plan-detail-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-600);
}

.plan-detail-stat-value {
    font-size: var(--text-body);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.plan-detail-card-suggestion {
    border-color: rgba(234, 179, 8, 0.5);
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.15) 0%, rgba(250, 204, 21, 0.08) 50%, rgba(234, 179, 8, 0.05) 100%);
}

.plan-detail-card-suggestion .plan-detail-card-header {
    color: var(--grey-900);
}

.plan-detail-actions {
    padding-top: 0.5rem;
    border-top: 1px solid var(--grey-200);
}

/* List secondary text (amount in billing history) */
.subscription-list-amount {
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
}

.subscription-list-icon {
    color: var(--grey-500);
    font-size: var(--text-title);
}

/* Payment methods: thumbnail / square cards */
.payment-methods-grid {
    margin-bottom: 0;
}

.payment-method-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 1rem 1rem 1.25rem;
    padding-top: 2rem;
    height: 100%;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.payment-method-default-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
    user-select: none;
}

.payment-method-default-label:hover {
    color: var(--grey-800);
}

.payment-method-default-label input[type="checkbox"] {
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

.payment-method-default-text {
    white-space: nowrap;
}

.payment-method-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--grey-300);
}

.payment-method-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.payment-method-card-row:first-child {
    margin-bottom: 0.5rem;
}

.payment-method-card-row-actions {
    justify-content: flex-end;
}

.payment-method-card-last4 {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    letter-spacing: 0.02em;
}

.payment-method-card-expiry {
    font-size: var(--text-body);
    color: var(--grey-600);
}

.payment-method-card-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    text-transform: capitalize;
}

.payment-card-brand-icon {
    font-size: var(--text-subtitle);
    line-height: 1;
    color: var(--grey-700);
}

.payment-method-card-brand-name {
    flex-shrink: 0;
}

/* Billing history: small invoice thumbnails – Plan, bill date, amount (annual) */
.billing-history-grid {
    margin-bottom: 0;
}

.invoice-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 6px;
    padding: 0.5rem 0.6rem 0.65rem;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.invoice-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: var(--grey-300);
}

.invoice-card-icon {
    font-size: var(--text-title);
    color: var(--grey-500);
    margin-bottom: 0.25rem;
}

.invoice-card-plan {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    line-height: 1.3;
}

.invoice-card-date {
    font-size: var(--text-body);
    margin-top: 0.15rem;
}

.invoice-card-amount {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    margin-top: 0.25rem;
}

.invoice-card-annual {
    font-weight: 400;
    font-size: var(--text-body);
    color: var(--grey-600);
}

.account-val {
    font-size: var(--text-body);
    color: #1f2937;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    background: var(--light-bg);
}

.modal-header .btn-close {
    filter: brightness(0);
}

.modal-body {
    padding: 25px;
    font-size: var(--text-body);
}

#comparisonModal .modal-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
}
#comparisonModal .table {
    font-size: var(--text-body);
}
#comparisonModal .table th,
#comparisonModal .table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}
#comparisonModal .table thead th {
    font-size: var(--text-body);
    font-weight: 600;
}

/* Plan comparison table: styled X / check / optional (no boxes, just typography, use theme yellow/blue) */
.plan-compare-yes,
.plan-compare-no,
.plan-compare-optional {
    font-weight: 600;
    font-size: 1.05rem;
}
.plan-compare-yes {
    color: var(--primary-color);
}
.plan-compare-no {
    color: var(--grey-600);
}
.plan-compare-optional {
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead {
    background: var(--grey-700);
    color: var(--white);
}

.table-bordered {
    border-color: #e5e7eb;
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* =====================================================
   PLANS & RESOURCES PAGES
   ===================================================== */

.plans-page,
.resources-page {
    padding: 40px 0;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-section {
        padding: 50px 0;
    }

    .hero-section h1 {
        font-size: var(--text-major);
    }

    .hero-right {
        height: 300px;
    }

    .overlay-tile {
        position: relative;
        margin: 10px;
    }

    .overlay-tile.matches {
        bottom: auto;
        left: auto;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 16px;
        padding-bottom: 16px;
        min-height: 0;
    }

    .overlay-tile.matches::after {
        display: none;
    }

    .overlay-tile.funded {
        top: auto;
        right: auto;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 16px;
        padding-bottom: 16px;
        min-height: 0;
    }

    .overlay-tile.funded::after {
        display: none;
    }

    .success-system-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .success-steps-grid {
        grid-template-columns: 1fr;
    }

    .success-system h2,
    .plans-section h2 {
        font-size: var(--text-major);
    }

    .plan-card.featured {
        transform: scale(1);
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: var(--text-title);
    }

    .grant-header {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-header .col-auto {
        width: 100%;
        margin-top: 15px;
    }

    .dashboard-header .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: var(--text-major);
    }

    .plan-card {
        padding: 20px;
    }

    .auth-card {
        padding: 25px;
    }

    .modal-body {
        padding: 15px;
    }
}

/* =====================================================
   FOOTER SECTION
   ===================================================== */

.footer-section,
footer.bg-dark {
    background: var(--grey-900) !important;
    color: var(--grey-200);
    padding: 60px 0 20px;
    font-family: var(--font-family);
}

.footer-section-tight {
    padding: 2rem 0 0.5rem !important;
}

.footer-section-tight .footer-divider {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.footer-section-tight h6 {
    margin-bottom: 0.75rem !important;
}

.layout-footer {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

footer.bg-dark .container {
    color: var(--grey-200);
}

.footer-section h6 {
    font-size: var(--text-title);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: var(--text-body);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* =====================================================
   ALERTS (theme: yellow/grey)
   ===================================================== */
.alert-danger {
    background-color: rgba(55, 65, 81, 0.1);
    border-color: var(--grey-600);
    color: var(--grey-900);
}

.alert-warning {
    background-color: rgba(107, 114, 128, 0.15);
    border-color: var(--grey-500);
    color: var(--grey-900);
}

.alert-success {
    background-color: rgba(234, 179, 8, 0.15);
    border-color: var(--primary-color);
    color: var(--grey-900);
}

.alert-info {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue-border);
    color: var(--grey-900);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-primary {
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black) !important;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark);
    color: var(--black) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--black);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.transition-all {
    transition: all 0.3s ease;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* =====================================================
   CONTACT PAGE (theme only)
   ===================================================== */
.contact-page {
    background: linear-gradient(135deg, var(--grey-100) 0%, var(--white) 100%);
    min-height: 100vh;
}

.contact-card {
    border: 2px solid var(--primary-color) !important;
    border-radius: 0.5rem;
}

.contact-card .card-title,
.contact-card-title {
    color: var(--grey-900);
}

.contact-form-input {
    border: 1px solid var(--grey-200);
    padding: 10px 12px;
}

.contact-form-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

.contact-form-input[rows] {
    resize: vertical;
}

.contact-btn-primary {
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black) !important;
    font-weight: 600;
}

.contact-btn-primary:hover,
.contact-btn-primary:focus,
.contact-btn-primary:active {
    background: var(--gradient-yellow-hover);
    border-color: var(--primary-dark);
    color: var(--black) !important;
}

.contact-back-link {
    color: var(--primary-color);
}

.contact-alert-info {
    border-left: 4px solid var(--primary-color);
}

.contact-required {
    color: var(--grey-600);
}

/* =====================================================
   HOME PAGE (images, resource cards)
   ===================================================== */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    position: absolute;
    top: 0;
    left: 0;
}

.steps-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps-img-wrapper .steps-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.steps-hover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    min-width: 320px;
    min-height: 320px;
    max-width: min(480px, 95vw);
    max-height: min(480px, 95vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.steps-hover-overlay .steps-hover-wedge {
    pointer-events: all;
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
    stroke-width: 6;
}
@media (min-width: 1200px) {
    .steps-hover-overlay { min-width: 380px; min-height: 380px; max-width: 480px; max-height: 480px; }
}
@media (max-width: 768px) {
    .steps-hover-overlay { min-width: 240px; min-height: 240px; max-width: min(300px, 90vw); max-height: min(300px, 90vw); }
    .steps-hover-overlay .steps-hover-wedge { stroke-width: 8; }
}
@media (max-width: 480px) {
    .steps-hover-overlay { min-width: 200px; min-height: 200px; max-width: min(260px, 88vw); max-height: min(260px, 88vw); }
    .steps-hover-overlay .steps-hover-wedge { stroke-width: 10; }
}
.steps-hover-overlay .steps-hover-wedge:hover {
    fill: transparent;
}
.steps-tooltip {
    position: fixed;
    z-index: 1100;
    padding: 4px 8px;
    font-size: var(--text-body);
    color: var(--grey-800);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.steps-tooltip.visible {
    opacity: 1;
    visibility: visible;
}
.steps-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resource-card-wrap {
    position: relative;
}

.resource-card .card-text-muted,
.resource-card-muted {
    font-size: var(--text-body);
}

/* =====================================================
   RESOURCES VIEW (video)
   ===================================================== */
.resource-video {
    max-height: 400px;
}

/* List sections: same typography site-wide (title = --text-title, details = --text-body) */
.timeline-grant-meta {
    font-size: var(--text-body);
}
/* List item title: same style for Saved Grants and List Building (no fw-bold) */
.list-item-title {
    font-size: var(--text-title);
    font-weight: 500;
    line-height: 1.3;
    color: var(--grey-900);
}
.lb-accordion-item .timeline-grant-meta {
    font-size: var(--text-body);
}
.lb-accordion-item .lb-accordion-body,
.lb-accordion-item .lb-grant-detail {
    font-size: var(--text-body);
}
.lb-accordion-item .lb-grant-detail dt,
.lb-accordion-item .lb-grant-detail dd {
    font-size: var(--text-body);
}
/* FAQ left topic nav */
.faq-topic-nav {
    border-right: 1px solid var(--border-color, #dee2e6);
    padding-right: 1rem;
}
.faq-topic-nav .nav-link {
    font-weight: 500;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}
.faq-topic-nav-gradient .nav-link {
    color: var(--bs-body-color);
}
.faq-topic-nav-gradient .nav-link:hover {
    background: rgba(254, 240, 138, 0.35);
    color: var(--bs-body-color);
}
.faq-topic-nav-gradient .nav-link.active {
    background: var(--gradient-yellow);
    color: #1f2937;
    border: none;
}
.faq-topic-nav-gradient .nav-link.active:hover {
    background: var(--gradient-yellow-hover);
    color: #1f2937;
}
.faq-search-wrap .form-control {
    font-size: var(--text-body);
}
.faq-search-wrap .input-group-text {
    font-size: var(--text-body);
}
.faq-accordion .accordion-button {
    font-size: var(--text-title);
    font-weight: 600;
    line-height: 1.3;
}
.faq-accordion .accordion-body,
.faq-accordion .faq-content {
    font-size: var(--text-body);
}
.faq-accordion .faq-content p {
    font-size: var(--text-body);
}

/* =====================================================
   FAQ (converted DOCX content)
   ===================================================== */
.faq-content {
    max-width: 48rem;
    line-height: 1.6;
}

.faq-content h1 { font-size: var(--text-title); margin-top: 1.5rem; margin-bottom: 0.75rem; font-weight: 700; }
.faq-content h2 { font-size: var(--text-title); margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }
.faq-content h3 { font-size: var(--text-title); margin-top: 1rem; margin-bottom: 0.5rem; font-weight: 600; }
.faq-content p { font-size: var(--text-body); margin-bottom: 0.75rem; }
.faq-content ul, .faq-content ol { margin-bottom: 0.75rem; padding-left: 1.5rem; }
.faq-content li { font-size: var(--text-body); margin-bottom: 0.25rem; }
.faq-content strong { font-weight: 600; }
.faq-content table { border-collapse: collapse; margin-bottom: 1rem; width: 100%; }
.faq-content th, .faq-content td { border: 1px solid var(--border-color, #dee2e6); padding: 0.5rem 0.75rem; text-align: left; }
.faq-content th { font-weight: 600; background: var(--light-bg, #f8f9fa); }

/* =====================================================
   LIST BUILDING (dashboard)
   ===================================================== */
.lb-sort-select { max-width: 16rem; }
.lb-grant-count { font-weight: 500; padding: 0.35rem 0.65rem; }

.lb-filter-panel {
    position: relative;
    z-index: 10;
}
.lb-filter-panel .form-label { margin-bottom: 0.25rem; }

/* List Building filter panel - improved styling */
.lb-filter-panel-styled {
    background: var(--white);
    border-radius: var(--radius-box);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--grey-200);
    overflow: hidden;
}
.lb-filter-panel-styled .lb-filter-panel-header {
    background: linear-gradient(135deg, var(--grey-50) 0%, var(--grey-100) 100%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--grey-200);
}
.lb-filter-panel-styled .lb-filter-panel-title {
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--grey-800);
}
.lb-filter-panel-styled .lb-filter-panel-body {
    padding: 1rem 1.25rem;
}
.lb-filter-panel-styled .lb-filter-panel-footer {
    padding: 0.75rem 1.25rem;
    background: var(--grey-50);
    border-top: 1px solid var(--grey-200);
}
/* List Building: prominent dark border on all filter dropdowns (Status select + multi-select triggers) */
.lb-filter-panel-styled .lb-multi-dropdown .lb-multi-dropdown-trigger {
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--white);
    border: 1px solid var(--grey-600);
}
.lb-filter-panel-styled .lb-multi-dropdown .lb-multi-dropdown-trigger:hover {
    border-color: var(--primary-color);
    background: var(--white);
}
.lb-filter-panel-styled .lb-multi-dropdown .dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border: 1px solid var(--grey-500);
}
.lb-filter-panel-styled .lb-multi-dropdown-menu label {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.lb-filter-panel-styled .lb-multi-dropdown-menu label:hover {
    background: var(--grey-100);
}
.lb-filter-panel-styled .form-select {
    border-radius: 4px;
    border: 1px solid var(--grey-600);
}
.lb-filter-panel-styled .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

/* Admin approve add grant - checkbox multi-select (same style as List Building) */
.admin-grant-multi-field {
    background: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
}
.admin-grant-multi-dropdown .admin-grant-multi-trigger,
.admin-grant-multi-dropdown .lb-multi-dropdown-trigger {
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--white);
    border: 1px solid var(--grey-600);
}
.admin-grant-multi-dropdown .admin-grant-multi-trigger:hover,
.admin-grant-multi-dropdown .lb-multi-dropdown-trigger:hover {
    border-color: var(--primary-color);
    background: var(--white);
}
.admin-grant-multi-dropdown .dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border: 1px solid var(--grey-500);
}
.admin-grant-multi-dropdown-menu label {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.admin-grant-multi-dropdown-menu label:hover {
    background: var(--grey-100);
}
.admin-grant-multi-field .admin-grant-add-new {
    border-radius: 4px;
    border-color: var(--grey-300);
}
.admin-grant-multi-field .admin-grant-add-btn {
    border-radius: 4px;
    font-size: 0.875rem;
}
#admin-request-approve-modal .form-label.fw-semibold { color: var(--grey-700); }
#admin-request-approve-modal .row.g-3 > [class*="col-"] { margin-bottom: 0.25rem; }

/* Admin Users, Businesses, Partners – card styling with soft gradient */
#admin-users-list .admin-card,
#admin-businesses-list .admin-card,
#admin-partners-list .admin-card,
#admin-applied-list .admin-card {
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: linear-gradient(165deg, #fefefe 0%, #fafbfc 50%, #f4f5f7 100%);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
#admin-users-list .admin-card:hover,
#admin-businesses-list .admin-card:hover,
#admin-partners-list .admin-card:hover,
#admin-applied-list .admin-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--grey-300);
}
#admin-users-list .admin-card .card-body,
#admin-businesses-list .admin-card .card-body,
#admin-partners-list .admin-card .card-body,
#admin-applied-list .admin-card .card-body {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    display: flex;
    flex-direction: column;
}
.admin-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--grey-800);
    margin-bottom: 0.5rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.admin-card-meta {
    font-size: 0.875rem;
    color: var(--grey-600);
    margin-bottom: 0.35rem;
    line-height: 1.45;
    letter-spacing: 0.01em;
}
.admin-card-meta i {
    opacity: 0.85;
    color: var(--grey-500);
    margin-right: 0.35rem;
}
.admin-card-badges {
    font-size: 0.8125rem;
    line-height: 1.4;
}
.admin-card-badges .badge {
    font-weight: 500;
}
.admin-card-actions {
    margin-top: auto;
}
.admin-partner-card .admin-card-actions {
    padding-top: 0.25rem;
}
.admin-applied-card .admin-card-badges {
    align-items: center;
}
.admin-applied-card .admin-card-meta {
    margin-bottom: 0.3rem;
}
.admin-user-card .admin-card-meta,
#admin-businesses-list .admin-card .admin-card-meta {
    margin-bottom: 0.3rem;
}
.admin-badge-role {
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--grey-700) !important;
}
/* Users tab – white text on badges (Admin, Active, Inactive, role) */
#admin-users-list .admin-card-title { color: var(--grey-700); }
#admin-users-list .admin-card-title .badge { color: #fff !important; }
#admin-users-list .admin-card-meta { color: var(--grey-500); }
#admin-users-list .admin-card-badges .badge {
    color: #fff !important;
}
#admin-users-list .admin-badge-role {
    background: var(--grey-700) !important;
    color: #fff !important;
}

/* Applied grants tab – white text on status badge */
#admin-applied-list .admin-card-badges .badge {
    color: #fff !important;
}

/* Partners tab – white text on Active/Inactive badges */
#admin-partners-list .admin-card-badges .badge {
    color: #fff !important;
}

#lb-active-filters .badge button { padding: 0 0.25rem; }
#lb-active-filters .badge .btn-close-sm { margin-left: 0.15rem; }

.lb-grant-list.accordion { border: none; }
.lb-accordion-item {
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.lb-accordion-item:last-child { margin-bottom: 0; }
.lb-accordion-item.account-list-item { padding: 0; }
.lb-accordion-item.account-list-item > .d-flex:first-child { padding: 0.75rem 1rem; }
.lb-accordion-item .accordion-header { border: none; }
.lb-accordion-item .accordion-button {
    font-size: var(--text-body);
    padding: 0.75rem 1rem;
    background: var(--white) !important;
    border: none !important;
}
.lb-accordion-item .accordion-button:not(.collapsed) { box-shadow: none !important; }
.lb-accordion-item .accordion-button::after { display: none; }
.lb-grant-name { font-size: var(--text-body); font-weight: 500; color: var(--grey-900); }
.lb-accordion-body { border-top: 1px solid var(--grey-200); background: var(--grey-100); }
.lb-grant-detail { padding: 0 1rem 1rem; }
.lb-grant-detail dl { margin-bottom: 0; }
.lb-grant-detail dt { font-weight: 600; color: var(--grey-600); }
.lb-grant-detail dd { margin-bottom: 0.5rem; }
.lb-accordion-chevron i,
.lb-accordion-item .accordion-collapse-chevron i {
    transition: transform 0.2s ease;
    font-size: var(--text-body);
    color: var(--grey-500);
}
.lb-accordion-item:has(.accordion-collapse.show) .accordion-collapse-chevron i,
.lb-accordion-item:has(.accordion-collapse.show) .lb-accordion-chevron i { transform: rotate(180deg); }
.lb-star-btn { font-size: var(--text-body); line-height: 1; }
.lb-star-btn:hover { opacity: 0.85; }
.lb-star-btn .bi-star-fill { color: var(--primary-color); }

.lb-page-num { min-width: 2rem; }
#lb-list-building [title] { cursor: pointer; }

/* Contacts tab: typography and sizing (match site vars) */
#store-contacts h4 {
    font-size: var(--text-title);
    font-weight: 700;
}

/* Contacts left sidebar: uniform size for button, input, and category rows */
#store-contacts .contacts-sidebar .account-section-inner {
    --contacts-row-height: 2.5rem;
    --contacts-row-padding: 0.5rem 0.75rem;
}
#store-contacts .contacts-sidebar .account-section-inner .form-control {
    font-size: var(--text-body);
    padding: var(--contacts-row-padding);
    min-height: var(--contacts-row-height);
}
#store-contacts .contacts-sidebar .account-section-inner .form-control::placeholder {
    font-size: var(--text-body);
}
#store-contacts .contacts-sidebar #contacts-add-btn {
    font-size: var(--text-body);
    min-height: var(--contacts-row-height);
    padding: var(--contacts-row-padding);
}
#store-contacts .title-banner.home-section-title-banner .home-section-title {
    font-size: var(--text-title);
}
#store-contacts .account-list-item.contacts-category-item .contacts-category-name,
#store-contacts .account-list-item.contacts-category-item .contacts-category-count {
    font-size: var(--text-body);
}
#store-contacts #contacts-empty {
    font-size: var(--text-body);
}

/* Contacts tab: category list (extends .account-list-item) - same row height as button/input */
.account-list-item.contacts-category-item {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-body);
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-box, 6px);
}
#store-contacts .contacts-sidebar .account-list-item.contacts-category-item {
    min-height: var(--contacts-row-height);
    padding: var(--contacts-row-padding);
}
.account-list-item.contacts-category-item:hover {
    background: var(--grey-100);
}
.account-list-item.contacts-category-item.active {
    background: var(--gradient-yellow);
    border: var(--border-yellow);
    color: var(--black);
    font-weight: 600;
}
.contacts-category-name {
    flex-grow: 1;
    font-weight: 500;
}
.contacts-category-count {
    flex-shrink: 0;
    margin-left: 0.5rem;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-700);
}
/* Contacts table inside account-section-inner */
#store-contacts .account-section-inner .table thead {
    background: var(--grey-700);
    color: var(--white);
    font-size: var(--text-body);
    font-weight: 600;
}
#store-contacts .account-section-inner .table tbody tr:hover {
    background: var(--light-bg);
}
#store-contacts .account-section-inner .table td,
#store-contacts .account-section-inner .table th {
    padding: var(--padding-box);
    vertical-align: middle;
    font-size: var(--text-body);
}
#store-contacts .contact-edit,
#store-contacts .contact-delete {
    color: var(--grey-600);
    font-size: var(--text-body);
}
#store-contacts .contact-edit:hover {
    color: var(--primary-color);
}
#store-contacts .contact-delete:hover {
    color: var(--danger-color, #dc3545);
}

/* Contact Add/Edit modal: match site typography and form sizing */
#contactModal .modal-title {
    font-size: var(--text-title);
    font-weight: 600;
}
#contactModal .form-label.small {
    font-size: var(--text-body);
}
#contactModal .form-control,
#contactModal .form-select {
    font-size: var(--text-body);
    padding: 0.5rem 0.75rem;
}
#contactModal .modal-footer .btn {
    font-size: var(--text-body);
}

/* Application tab: KPI cards and status tabs + accordions */
.plan-stat-card .plan-stat-amount {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-700);
    margin-top: 0.25rem;
}

/* Application KPI cards: compact, use site typography (--text-title, --text-body) */
#application .application-kpi-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(145deg, var(--white) 0%, var(--grey-100) 100%);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 0.4rem 0.6rem 0.4rem 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}
#application .application-kpi-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
}
#application .application-kpi-card .app-kpi-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
}
#application .application-kpi-card .app-kpi-left .plan-stat-value {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--grey-900);
    letter-spacing: -0.02em;
    line-height: 1;
}
#application .application-kpi-card .app-kpi-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
}
#application .application-kpi-card .app-kpi-right-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
#application .application-kpi-card .app-kpi-right .plan-stat-icon {
    font-size: var(--text-body);
    margin: 0;
    flex-shrink: 0;
}
#application .application-kpi-card .app-kpi-right .plan-stat-label {
    font-size: var(--text-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--grey-800);
    margin: 0;
}
#application .application-kpi-card .app-kpi-right .plan-stat-amount-label {
    font-size: var(--text-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--grey-600);
}
#application .application-kpi-card .app-kpi-right .plan-stat-amount-value {
    font-size: var(--text-body);
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}
#application .application-kpi-card .plan-stat-icon i { color: var(--grey-600); }
#application .application-kpi-in-progress .plan-stat-icon i { color: var(--primary-dark); }
#application .application-kpi-awaiting .plan-stat-icon i { color: var(--grey-600); }
#application .application-kpi-approved .plan-stat-icon i { color: #059669; }
#application .application-kpi-rejected .plan-stat-icon i { color: var(--grey-500); }

#application .nav-tabs-application {
    border-bottom: 1px solid var(--grey-200);
    padding: 0 1rem;
    background: var(--grey-100);
}
#application .nav-tabs-application .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-box) var(--radius-box) 0 0;
    padding: 0.6rem 1rem;
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--grey-600);
}
#application .nav-tabs-application .nav-link:hover {
    color: var(--grey-900);
    background: var(--white);
}
#application .nav-tabs-application .nav-link.active {
    background: var(--white);
    color: var(--grey-900);
    border-color: var(--grey-200);
    border-bottom-color: var(--white);
    margin-bottom: -1px;
}
#application .app-tab-count {
    font-weight: 400;
    color: var(--grey-500);
}
#application .app-tab-count-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    margin-left: 0.35rem;
    font-size: var(--text-body);
    font-weight: 700;
    line-height: 1;
    color: var(--grey-900);
    background: linear-gradient(135deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    border-radius: 999px;
    vertical-align: middle;
}
#application .nav-tabs-application .nav-link.active .app-tab-count-bubble {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 50%, #eab308 100%);
    color: var(--grey-900);
}
#application .tab-content.account-section-inner {
    border-radius: 0 0 var(--radius-box) var(--radius-box);
}

#application .application-accordion,
#application .application-list {
    border: none;
}
#application .app-accordion-item,
#application .app-list-item {
    display: flex;
    align-items: center;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-box);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
#application .app-accordion-item:last-child,
#application .app-list-item:last-child {
    margin-bottom: 0;
}
#application .app-list-item-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}
#application .app-accordion-item .accordion-header {
    border: none;
    display: flex;
    align-items: stretch;
    margin: 0;
}
#application .app-accordion-item .accordion-button {
    font-size: var(--text-body);
    padding: 0.75rem 1rem;
    background: var(--white) !important;
    border: none !important;
    box-shadow: none !important;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    text-align: left;
}
#application .app-accordion-item .accordion-button:not(.collapsed) {
    background: var(--grey-100) !important;
}
#application .app-accordion-item .accordion-button::after { display: none; }
#application .app-list-item-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    width: 10rem;
    margin-right: 1.25rem;
    align-self: center;
    font-family: var(--font-family);
    font-size: var(--text-body);
}
#application .app-list-item-progress-wrap .app-list-item-progress {
    flex: 1;
    min-width: 0;
}
#application .app-list-item-progress-pct {
    flex-shrink: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--grey-800);
    min-width: 2.25rem;
    text-align: left;
}
#application .app-list-item-progress {
    height: 22px;
    background: var(--grey-200);
    border-radius: 999px;
    overflow: hidden;
}
#application .app-list-item-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fef9c3 0%, #fef08a 35%, #eab308 70%, #ca8a04 100%);
    border-radius: 999px;
    transition: width 0.25s ease;
}
#application .app-list-item-view {
    flex-shrink: 0;
}
#application .app-accordion-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}
#application .app-accordion-title-line {
    font-weight: 600;
    font-size: var(--text-body);
    color: var(--grey-900);
    line-height: 1.3;
}
#application .app-accordion-details-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.25rem;
    font-size: var(--text-body);
}
#application .app-accordion-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
#application .app-accordion-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    font-size: var(--text-body);
    color: var(--grey-500);
    flex-shrink: 0;
}
#application .app-accordion-detail-icon i {
    vertical-align: middle;
}
#application .app-accordion-detail-label {
    color: var(--grey-500);
    font-weight: 500;
    letter-spacing: 0.03em;
    font-size: var(--text-body);
}
#application .app-accordion-detail-value {
    color: var(--grey-800);
    font-weight: 600;
    font-size: var(--text-body);
}
#application .app-accordion-title {
    font-weight: 600;
    color: var(--grey-900);
    min-width: 0;
}
#application .app-accordion-meta {
    flex-shrink: 0;
}
#application .app-accordion-amount {
    color: var(--grey-800);
}
#application .app-accordion-body {
    border-top: 1px solid var(--grey-200);
    background: var(--grey-100);
    padding: 0.75rem 1rem;
}
#application .app-accordion-detail {
    font-size: var(--text-body);
}
