body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #f4f6f9;
}

/* ===== Cross-document view transitions ===== */
/* Opts every same-origin navigation into the browser's native page-swap
   animation (paired with the <meta name="view-transition"> tag in
   base.html). Unsupported browsers just ignore this at-rule. */
@view-transition {
    navigation: auto;
}

/* Snappier than the browser's ~0.3s default crossfade, which read as
   sluggish rather than fluid on a click-heavy nav bar. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

/* ===== Generate DSE modal ===== */
.dse-intro {
    background-color: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.18);
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    color: #1a2942;
    margin-bottom: 1rem;
}

/* Related fields grouped side by side instead of one long stacked column —
   each group reads like one "question" instead of nine separate ones. */
.dse-section {
    margin-bottom: 1.25rem;
}

.dse-section:last-child {
    margin-bottom: 0;
}

.dse-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b96a8;
    font-weight: 700;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Fill-progress bar — turns "9 empty-looking boxes" into a visible sense of
   how much is actually left, instead of the form just feeling like a wall. */
.dse-progress-wrap {
    margin-bottom: 1.1rem;
}

.dse-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5768;
}

.dse-progress-percent {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0d6efd;
}

.dse-progress {
    height: 8px;
    border-radius: 999px;
    background-color: rgba(13, 110, 253, 0.1);
}

.dse-progress .progress-bar {
    background-color: #0d6efd;
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.dse-progress .progress-bar.bg-success {
    background-color: #22c55e !important;
}

/* Fields the person actually needs to fill/verify — a soft blue wash marks
   them as "yours to fill in", turning green once a valid value is in. */
.dse-field {
    background-color: rgba(13, 110, 253, 0.045);
    border-color: rgba(13, 110, 253, 0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dse-field:focus {
    background-color: #fff;
}

.dse-field.dse-field-filled {
    background-color: rgba(34, 197, 94, 0.07);
    border-color: rgba(34, 197, 94, 0.4);
}

.dse-field.is-invalid {
    background-color: rgba(220, 53, 69, 0.05);
}

/* System/read-only fields — deliberately flat and muted so they read as
   "not yours to touch" next to the blue fillable ones. */
.dse-readonly-field {
    background-color: #eef1f5 !important;
    color: #6c7688;
    border-color: #e1e6ed;
}

.dse-field-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dse-system-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9aa7bd;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* ===== Floating glass navbar ===== */
.polar-navbar-dock {
    position: sticky;
    top: 0;
    z-index: 1030;
    /* Lines up with .polar-main > .container-fluid's own side padding below,
       so the floating bar spans the same width as the page content instead
       of being capped at 1320px and leaving a growing gap on wide monitors. */
    padding: 0.85rem 1.75rem 0;
}

.polar-navbar {
    position: relative;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow:
        0 8px 30px rgba(13, 110, 253, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.06);
    overflow: visible;
}

/* A soft glossy highlight across the top of the bar — part of the "liquid
   glass" read: a hint of specular light on the frosted surface. */
.polar-navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    color: #1a2942;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-mark {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.32);
}

.brand-text {
    font-size: 1.02rem;
}

/* ===== Mobile hamburger / close toggle ===== */
.nav-toggle {
    margin-left: auto;
    flex-shrink: 0;
    border: 1px solid rgba(13, 110, 253, 0.18);
    background: rgba(255, 255, 255, 0.55);
    color: #0d6efd;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav-toggle-icon-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon-close {
    display: inline;
}

/* ===== Nav links (desktop: inline pill row / mobile: dropdown glass panel) ===== */
.nav-collapse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 auto;
    gap: 0.5rem;
    min-width: 0;
}

.nav-pills-row {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-divider {
    width: 1px;
    height: 22px;
    background-color: rgba(13, 110, 253, 0.14);
    margin: 0 0.35rem;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3f4a5c;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-pill i {
    font-size: 1rem;
    color: #7a8aa5;
    transition: color 0.16s ease;
}

.nav-pill:hover {
    background-color: rgba(13, 110, 253, 0.10);
    color: #0d6efd;
    transform: translateY(-1px);
}

.nav-pill:hover i {
    color: #0d6efd;
}

.nav-pill.active {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.32);
}

.nav-pill.active i {
    color: white;
}

/* ===== Account menu (desktop dropdown) ===== */
.nav-account {
    flex-shrink: 0;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    padding: 0.2rem 0.3rem;
    border-radius: 999px;
}

.user-avatar-btn:hover {
    background-color: rgba(13, 110, 253, 0.08);
}

.user-avatar-btn i {
    font-size: 0.7rem;
    color: #7a8aa5;
}

.user-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.14);
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
}

.user-avatar-img {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.polar-dropdown {
    margin-top: 0.6rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    padding: 0.5rem;
    min-width: 190px;
}

.dropdown-user {
    padding: 0.4rem 0.6rem 0.6rem;
}

.dropdown-user .user-name {
    font-weight: 700;
    color: #1a2942;
    font-size: 0.9rem;
}

.dropdown-user .user-role {
    color: #9aa7bd;
    font-size: 0.75rem;
}

.polar-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4b5768;
    padding: 0.5rem 0.6rem;
}

.polar-dropdown .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
}

/* ===== Notification bell ===== */
.nav-bell {
    flex-shrink: 0;
    position: relative;
}

.bell-btn {
    position: relative;
    border: none;
    background: transparent;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5768;
    font-size: 1.05rem;
}

.bell-btn:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
}

.bell-btn .notification-dot {
    position: absolute;
    top: 5px;
    right: 6px;
    margin-left: 0 !important;
}

.bell-dropdown {
    width: 350px;
    max-width: 90vw;
    padding: 0;
    overflow: hidden;
}

.bell-dropdown-header {
    padding: 0.7rem 0.9rem;
    font-weight: 700;
    color: #1a2942;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bell-dropdown-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 0.4rem;
}

.bell-empty {
    padding: 1.4rem 0.6rem;
    text-align: center;
    color: #9aa7bd;
    font-size: 0.85rem;
    margin: 0;
}

.bell-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0.55rem;
    border-radius: 10px;
}

.bell-item:hover {
    background-color: rgba(13, 110, 253, 0.06);
}

.bell-item-unread {
    background-color: rgba(13, 110, 253, 0.07);
}

.bell-item-link {
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: #344255;
    display: block;
}

.bell-item-message {
    display: block;
    font-size: 0.85rem;
    line-height: 1.35;
}

.bell-item-time {
    display: block;
    font-size: 0.72rem;
    color: #9aa7bd;
    margin-top: 2px;
}

.bell-mention-badge {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    margin-bottom: 3px;
}

.bell-dismiss-btn {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #9aa7bd;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    margin-top: 2px;
}

.bell-dismiss-btn:hover {
    background-color: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

/* ===== @mention suggestions (chat comment boxes) ===== */
.chat-input-row {
    position: relative;
}

.mention-suggestions {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 4px;
    max-height: 190px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 20;
}

.mention-suggestions.show {
    display: block;
}

.mention-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    box-sizing: border-box;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #212529;
}

.mention-option:hover,
.mention-option.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.mention-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-avatar-placeholder {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.14);
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mention-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.mention-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-username {
    font-size: 0.74rem;
    opacity: 0.65;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Mobile: nav-collapse becomes a floating glass dropdown panel ===== */
@media (max-width: 991.98px) {
    .nav-collapse {
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0.5rem;
        right: 0.5rem;
        flex-direction: column;
        align-items: stretch;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 16px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
        padding: 0.75rem;
        gap: 0.15rem;
    }

    .nav-collapse.show {
        display: flex !important;
    }

    .nav-pills-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.1rem;
    }

    .nav-pill {
        width: 100%;
    }

    .nav-divider {
        display: none;
    }

    .nav-account-row {
        margin-top: 0.5rem;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(13, 110, 253, 0.10);
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .nav-user-chip {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.35rem 0.6rem 0.6rem;
    }

    .nav-user-chip .user-meta {
        min-width: 0;
    }

    .nav-user-chip .user-name {
        font-size: 0.88rem;
        font-weight: 700;
        color: #1a2942;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-user-chip .user-role {
        font-size: 0.75rem;
        color: #9aa7bd;
    }

    .logout-pill:hover {
        background-color: rgba(220, 53, 69, 0.08);
        color: #dc3545;
    }

    .logout-pill:hover i {
        color: #dc3545;
    }
}

/* Desktop: nav-collapse is always visible, laid out as a plain inline row */
@media (min-width: 992px) {
    .nav-collapse.collapse {
        display: flex !important;
    }
}

.polar-main > .container-fluid {
    padding: 1.75rem;
}

@media (max-width: 991.98px) {
    .polar-navbar-dock {
        padding: 0.6rem 0.85rem 0;
    }

    .polar-main > .container-fluid {
        padding: 1.25rem 0.85rem;
    }
}

.nav-tabs .nav-link {
    border: none !important; /* Remove the border */
    background-color: transparent !important; /* Ensure no background color */
    color: #0d6efd; /* Match the color to the navbar links */
    font-weight: bold; /* Make the text bold */
    border-radius: 0; /* Remove rounded corners */
    transition: color 0.3s, background-color 0.3s;
}

.nav-tabs .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1); /* Light hover effect */
    color: #0b5ed7; /* Slightly darker hover color */
}

.nav-tabs .nav-link.active {
    background-color: transparent !important; /* No background for active */
    color: #0b5ed7 !important; /* Match hover color for active state */
    font-weight: bold; /* Ensure it remains bold */
}

.card-title {
    font-size: 1.5rem;
}

/* ---------- Detail pages (applicant / member profile) ---------- */
.details-back-btn {
    flex-shrink: 0;
}

.detail-card .card-body p {
    padding: .4rem 0;
    margin: 0;
    border-bottom: 1px dashed rgba(0, 0, 0, .08);
    /* Long values (emails, LinkedIn URLs, goal labels) shouldn't be able to
       push the card wider than its column on narrow/phone screens. */
    overflow-wrap: anywhere;
}

.detail-card .card-body p:last-child {
    border-bottom: none;
}

.detail-card .card-body a {
    overflow-wrap: anywhere;
}

/* Profile fields as a responsive grid instead of one narrow stacked column —
   makes the card actually use the width its parent column gives it. */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.1rem 1.5rem;
}

.detail-field {
    min-width: 0;
}

.detail-field-wide {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8b96a8;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.detail-value {
    font-size: 0.94rem;
    color: #212529;
    overflow-wrap: anywhere;
}

/* Section headers that break a long detail-grid (e.g. the applicant profile)
   into labeled groups — Contact, Background, etc. */
.detail-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c7686;
    font-weight: 700;
    margin: 1.4rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-section-title:first-child {
    margin-top: 0;
}

/* ---------- Previous Roles accordion ---------- */
.past-roles-accordion {
    --bs-accordion-border-color: rgba(0, 0, 0, 0.08);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
    --bs-accordion-active-bg: rgba(13, 110, 253, 0.05);
    --bs-accordion-active-color: #1a2942;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.past-role-item {
    border-radius: 12px !important;
    overflow: hidden;
}

.past-role-item .accordion-button {
    border-radius: 12px;
    font-weight: 500;
    padding: 0.85rem 1.1rem;
}

.past-role-item .accordion-button:not(.collapsed) {
    box-shadow: none;
}

.past-role-item .accordion-button::after {
    flex-shrink: 0;
}

.past-role-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem 1rem;
    width: 100%;
    padding-right: 0.5rem;
}

.past-role-title {
    font-weight: 700;
    color: #1a2942;
}

.past-role-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.past-role-term {
    font-size: 0.82rem;
    color: #5a6a85;
}

.past-role-stage {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
}

@media (max-width: 767.98px) {
    /* The 3-way Member Information / Manage Roles / Previous Roles tab strip
       is fine at desktop widths but starts fighting for space on phones —
       let it wrap onto two lines and shrink the label text instead of
       squeezing/clipping each tab into an unreadable sliver. */
    #memberTab {
        flex-wrap: wrap;
    }

    #memberTab .nav-item {
        flex: 1 1 33%;
    }

    #memberTab .nav-link {
        font-size: 0.78rem;
        padding: 0.5rem 0.35rem;
    }
}

/* ---------- Chat-style comments ---------- */
.chat-panel {
    display: flex;
    flex-direction: column;
}

.chat-messages {
    /* A fixed height (not max-height) so the comment box always takes up
       the same space and the input row below it sits in the same spot on
       every applicant/member — whether there are 40 comments or none —
       instead of the input creeping up to sit right under a short list. */
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    background: #eef1f6;
    border-radius: 10px;
}

.chat-empty {
    margin: auto;
    color: #9aa2ad;
    font-size: .9rem;
    text-align: center;
}

.chat-bubble {
    max-width: 80%;
    padding: .5rem .85rem;
    border-radius: 16px;
    font-size: .92rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    word-wrap: break-word;
}

/* Name + @username row, above the message text. */
.chat-bubble-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 2px;
}

.chat-author-name {
    font-size: .82rem;
    font-weight: 600;
}

.chat-bubble-text {
    white-space: pre-wrap;
}

/* Bottom-right timestamp — out of the way of the name/text, still legible. */
.chat-bubble-time {
    display: block;
    text-align: right;
    font-size: .68rem;
    opacity: .6;
    margin-top: 3px;
}

.chat-bubble-theirs {
    align-self: flex-start;
    background: #ffffff;
    color: #212529;
    border-bottom-left-radius: 4px;
}

.chat-bubble-mine {
    align-self: flex-end;
    background: #0d6efd;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

/* @username gets its own distinct color (not just a dimmer version of the
   bubble's text color) so it reads as a separate, secondary identifier next
   to the name instead of blending into it — a different accent per bubble
   side so it stays visible against both backgrounds. */
.chat-bubble-theirs .chat-author-username {
    color: #0d6efd;
}

.chat-bubble-mine .chat-author-username {
    color: #ffe08a;
}

.chat-author-username {
    font-size: .72rem;
    font-weight: 600;
}

/* Wraps an avatar (real photo or initials) beside its bubble — the bubble
   itself no longer positions itself via align-self once it's nested here,
   this row does that instead. */
.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    max-width: 84%;
}

.chat-row-theirs {
    align-self: flex-start;
}

.chat-row-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-row .chat-bubble-mine,
.chat-row .chat-bubble-theirs {
    align-self: auto;
    max-width: 100%;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-avatar-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.14);
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-bubble-system {
    align-self: center;
    background: rgba(0, 0, 0, .06);
    color: #495057;
    font-size: .78rem;
    font-style: italic;
    font-weight: 500;
    padding: .35rem .9rem;
    border-radius: 999px;
    box-shadow: none;
    text-align: center;
}

.chat-input-row {
    display: flex;
    gap: .5rem;
    margin-top: .85rem;
}

.chat-input-row .form-control {
    border-radius: 999px;
    padding-left: 1rem;
    /* Without this a flex child's content-based floor can force it (and the
       row) wider than the phone screen instead of actually shrinking. */
    min-width: 0;
}

.chat-input-row button {
    border-radius: 999px;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .chat-messages {
        height: 320px;
        padding: 10px;
        gap: 8px;
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 0.88rem;
    }

    .chat-row {
        max-width: 92%;
    }

    .chat-input-row {
        gap: 0.4rem;
        margin-top: 0.65rem;
    }

    .chat-input-row .form-control {
        padding-left: 0.85rem;
    }

    .chat-input-row button {
        width: 40px;
    }
}

.btn-secondary {
    background-color:  #0d6efd!important; /* Make the background transparent */
    color: white !important; /* Set the text color to match your design */
    border: 1px solid #0056b3 !important; /* Optional: Add a border for visibility */
}

.btn-secondary:hover {
    background-color: rgba(0, 86, 179, 0.1) !important; /* Optional: Add a subtle hover effect */
    color: #0056b3 !important;
}
.btn-primary {
    background-color:  #0d6efd!important; /* Make the background transparent */
    color: white !important; /* Set the text color to match your design */
    border: 1px solid #0056b3 !important; /* Optional: Add a border for visibility */
}
.btn-primary:hover {
    background-color: rgba(0, 86, 179, 0.1) !important; /* Optional: Add a subtle hover effect */
    color: #0056b3 !important;
}
.btn-info{
    background-color:  #0d6efd!important; /* Make the background transparent */
    color: white !important; /* Set the text color to match your design */
    border: 1px solid #0056b3 !important; /* Optional: Add a border for visibility */
}
.btn-info:hover{
    background-color: rgba(0, 86, 179, 0.1) !important; /* Optional: Add a subtle hover effect */
    color: #0056b3 !important;
}
/* Table Header */
.custom-table-header {
    background-color: #ffffff; /* White background for header */
    color: #0d6efd; /* Blue text for header */
    border: 1px solid #ced4da!important;
    font-weight: bold; /* Make header text bold */
    text-align: left; /* Align header text to the left */
    border-bottom: 2px solid #dee2e6; /* Subtle bottom border */
}

.custom-table-header th {
    padding: 12px 8px; /* Add padding for spacing */
}

/* Links inside Header */
.custom-table-header th a {
    color: #0d6efd; /* Blue links */
    text-decoration: none; /* Remove underline */
}

.custom-table-header th a:hover {
    text-decoration: underline; /* Underline on hover */
}

/* Table Body */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa; /* Light gray for striped rows */
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1); /* Subtle hover effect */
}

/* Alignment and Spacing for Table Rows */
.table td, .table th {
    vertical-align: middle; /* Center-align content vertically */
    text-align: left; /* Align text to the left */
}

/* Center-align IDs and Actions */
.table td:nth-child(1), .table td:nth-child(8), .custom-table-header th:nth-child(1), .custom-table-header th:nth-child(8) {
    text-align: center;
}

/* Applicants page */
.page-header h1 {
    font-weight: 700;
    color: #1a2942;
}

.applicants-count-badge {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 110, 253, 0.18);
}

.filter-card, .table-card {
    border: 1px solid rgba(13, 110, 253, 0.10);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.06);
}

.filter-card .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a6a85;
    margin-bottom: 0.3rem;
}

.filter-card .form-control,
.filter-card .form-select,
.filter-card .input-group-text {
    border-radius: 10px;
    border-color: #dbe2ea;
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}

/* Sortable table headers */
.applicants-table thead th {
    white-space: nowrap;
}

.applicants-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.applicants-table thead th.sortable:hover {
    color: #0b5ed7;
    background-color: rgba(13, 110, 253, 0.05);
}

.applicants-table thead th .sort-icon {
    margin-left: 4px;
    font-size: 0.75rem;
    opacity: 0.55;
}

.applicants-table thead th.active-sort .sort-icon {
    opacity: 1;
}

.applicants-table tbody tr td {
    font-size: 0.92rem;
}

.stage-pill {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.18);
}

.motivation-pill {
    margin: 0 0.3rem 0.3rem 0;
}

/* Select2 restyled to match the rest of the form controls */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #dbe2ea !important;
    border-radius: 10px !important;
    min-height: 38px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.25);
    color: #0d6efd;
    border-radius: 999px;
    padding: 1px 8px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #0d6efd;
    margin-right: 4px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd;
}

/* Home dashboard */
.welcome-banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 10px 26px rgba(13, 110, 253, 0.22);
}

/* Same soft glass highlight as the navbar, so the banner reads as part of
   the same design language instead of a flat colour block. */
.welcome-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.welcome-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
}

.stat-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid rgba(13, 110, 253, 0.10);
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    height: 100%;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.06);
}

.stat-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.stat-icon-blue { background: linear-gradient(135deg, #0d6efd, #0b5ed7); }
.stat-icon-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-icon-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.stat-icon-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a2942;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: #5a6a85;
}

.chart-card .card-header {
    background-color: #ffffff;
    color: #1a2942;
    font-weight: 600;
    border-bottom: 1px solid rgba(13, 110, 253, 0.08);
}

.chart-wrap {
    position: relative;
    height: 280px;
}

.notification-list {
    max-height: 18rem;
    overflow-y: auto;
}

.notification-list .min-w-0 {
    min-width: 0;
}

/* Shared row styling for the Home dashboard's Notifications + Open
   Applicants lists — rounded, separated rows with a hover state instead of
   the flat default Bootstrap list-group-item strip. */
.home-row-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.home-row-list .list-group-item {
    border: none;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    transition: background-color 0.15s ease;
}

.home-row-list .list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.home-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mention-badge {
    background-color: #0d6efd !important;
    color: #fff !important;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 4px;
}

.notification-dismiss-btn {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #9aa7bd;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.notification-dismiss-btn:hover {
    background-color: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

#polarLoveBox {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    font-size: 14px;
}

#polarHeartBtn {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

#heartPopupContainer {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.heart-popup {
    background: #fff;
    color: #dc3545;
    border: 1px solid #f5c2c7;
    border-radius: 20px;
    padding: 8px 14px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 14px;
    animation: heartFloatUp 3s ease-out forwards;
}

@keyframes heartFloatUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.05);
    }
}


