﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --amethyst: #390B46;
    --indigo: #3B296A;
    --midnight: #1A022E;
    --indigo-highlight: #430AD6;
    --gold: #B4974F;
    --light-gold: #F0EADC;
    --green: #1CCD80;
    --red: #F02222;
    --white: #FFFFFF;
    --background: #FAFAFA;
    --light-grey: #CCCCCC;
    --grey: #999999;
    --beige: #F5EFE4;
    --primary: #1A022E;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --header-height: 75px; /* single source of truth for header height */
    --sidebar-width: 260px; /* single source of truth for sidebar width */
    --sidebar-width-collapsed: 80px;
}

@font-face {
    font-family: 'CustomiseTobias';
    src: url('fonts/WEB/Tobias-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'CustomiseTobias';
    src: url('fonts/WEB/Tobias-Regular.woff2') format('woff2'), url('fonts/WEB/Tobias-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'CustomiseTobias';
    src: url('fonts/WEB/Tobias-Bold.woff2') format('woff2'), url('fonts/WEB/Tobias-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'CustomiseTobias';
    src: url('fonts/WEB/Tobias-RegularItalic.woff2') format('woff2'), url('fonts/WEB/Tobias-RegularItalic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'CustomiseTobias';
    src: url('fonts/WEB/Tobias-BoldItalic.woff2') format('woff2'), url('fonts/WEB/Tobias-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'CustomiseTobias';
    src: url('fonts/WEB/Tobias-Thin.woff2') format('woff2'), url('fonts/WEB/Tobias-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'Neue Haas Unica W1G';
    src: url('fonts/webFonts/NeueHaasUnicaRegular/font.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'Neue Haas Unica W1G';
    src: url('fonts/webFonts/NeueHaasUnicaLight/font.woff2') format('woff2');
    font-weight: 350;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'Neue Haas Unica W1G';
    src: url('fonts/webFonts/NeueHaasUnicaMedium/font.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-feature-settings: "ss01";
}

@font-face {
    font-family: 'Neue Haas Unica W1G';
    src: url('fonts/webFonts/NeueHaasUnicaThin/font.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-feature-settings: "ss01";
}

/*NEW Responsive CSS*/
/*Agents Portal Css*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Neue Haas Unica W1G','Inter', sans-serif;
    background: #f6f8fc;
    /* fixed header sits on top of everything, so push body content
       down by the header's height */
    padding-top: var(--header-height);
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/*================ HEADER ================*/

.agent-header {
    /* fixed to the viewport so it never scrolls away, and the sidebar
       (also fixed) can anchor itself to the bottom of it */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    background: var(--amethyst) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-logo {
    height: 52px;
    flex-shrink: 0;
}

.header-divider {
    width: 2px;
    height: 45px;
    background: #c99c3c;
    margin: 0 22px;
    flex-shrink: 0;
}

.portal-title {
    color: white;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: transparent !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    flex-shrink: 0;
}

    .icon-btn:hover {
        background: #ececec;
    }

    .icon-btn i {
        font-size: 22px;
        color: #ffffff;
    }

.notification-badge {
    position: absolute;
    top: 4px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.expand-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .expand-btn i {
        font-size: 16px;
        color: #1d4e89;
        transition: all .25s ease;
    }

    .expand-btn:hover {
        background: #f5f7fb;
        border-radius: 6px;
    }

.profile-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #5c35d8;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 22px;
    margin-right: 15px;
    flex-shrink: 0;
}

.profile-name {
    color: black;
    font-size: 24px;
    font-weight: 400;
    white-space: nowrap;
}

/*================ BODY ================*/

.page-wrapper {
    display: flex !important;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
}

/*================ SIDEBAR ================*/

.sidebar {
    /* fixed to the viewport (pinned under the header) so it stays in
       place no matter how far the main content is scrolled */
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    height: calc(100vh - var(--header-height));
    flex: 0 0 var(--sidebar-width);
    max-width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #ddd;
    transition: flex-basis .25s ease, max-width .25s ease, min-width .25s ease, width .25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 900;
}

.menu-title {
    padding: 22px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 1px solid #eee;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    /* the menu itself scrolls internally if it's ever taller than the
       viewport, while the sidebar shell stays pinned */
    overflow-y: auto;
    overflow-x: hidden;
}

    .sidebar-menu li a {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 18px 28px;
        /*        color: #42526e;*/
        color: var(--amethyst);
        text-decoration: none;
        font-size: 18px;
    }

    .sidebar-menu li.active a {
        background: #ffffff;
        color: var(--gold);
        /*        color: var(--amethyst);*/
        font-weight: 400;
    }

    .sidebar-menu li a:hover {
        background: #f8f8f8;
        color: var(--midnight);
    }

/*================ DASHBOARD ================*/

.main-content {
    flex: 1;
    /* offset by the fixed sidebar's width since the sidebar is out of
       normal flow now */
    margin-left: var(--sidebar-width);
    padding: 35px;
    overflow: auto;
    min-width: 0; /* allows content (tables etc.) to shrink instead of overflowing the flex row */
    transition: margin-left .25s ease;
}

.title {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 5px;
    font-family: 'CustomiseTobias', Georgia, serif;
    color: var(--amethyst);
}

.sub-title {
    font-size: 25px;
    font-weight: 400;
    margin-bottom: 5px;
    font-family: 'CustomiseTobias', Georgia, serif;
    color: var(--amethyst);
}

.dashboard p {
    color: #6b7280;
    font-size: 20px;
    margin-bottom: 35px;
}

/*================ CARDS ================*/
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
}

.card-box {
    background: #fff;
    border-radius: 0px;
    padding: 20px 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    border: 1px solid #ececec;
    transition: all 0.3s ease;

    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

    .card-box:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }

.card-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
/*    align-items: baseline;
    gap: 8px;
    flex-wrap: nowrap;*/ 
}

.card-box span {
    font-size: 16px;
    font-weight: 700;
    color: #173153;
    font-family: 'Neue Haas Unica W1G';
    /* Allow heading to wrap */
    white-space: normal;
    line-height: 1.2;
    /* Take available space */
    flex: 1;
    min-width: 0;
}

/*    .card-box span::after {
        content: " :";
    }*/

.card-box h2 {
    font-size: 28px;
    color: #2d64ff;
    font-weight: 700;
    font-family: 'CustomiseTobias';
    white-space: nowrap;
    margin: 0;
    line-height: 1.2;
    /* Keep value on the right */
    flex-shrink: 0;
}

/* ===== Common Table ===== */

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table thead {
        background: #f5f8fc;
    }

    .table th {
        text-align: left;
        padding: 22px;
        color: #49658d;
        font-size: 16px;
        font-weight: 600;
    }

    .table td {
        padding: 22px;
        border-top: 1px solid #edf2f8;
        font-size: 14px;
        vertical-align: middle;
    }

    .table tbody tr:hover {
        background: #fafcff;
    }

/* Leads */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: nowrap;
    gap: 30px;
}

#actionsTab .page-header,
#pitchesTab .page-header,
#notesTab .page-header{
    margin-top: 5px;
    margin-bottom: 5px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 10px;
}



.create-btn {
    background: #2d64ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

    .create-btn:hover {
        background: #1d4ed8;
    }

.table-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e6ebf5;
    box-shadow: 0 5px 15px rgba(0,0,0,.06);
    width: 100%;
    height: auto;
    max-width: 100%;
    /* the card itself no longer scrolls directly — the .table-responsive
       wrapper inside it (see below) owns the horizontal scroll so the
       behavior is identical whether Bootstrap's own .table-responsive
       styles are present or not */
    overflow: hidden;
}

/* Explicit, self-contained scroll wrapper — don't rely on Bootstrap's
   .table-responsive alone; this guarantees horizontal scrolling for
   any wide table (dashboard lead/pitch grid, modal tables) on EVERY
   screen size, including large desktop monitors where an invisible
   overlay scrollbar can make a scrollable table look "stuck". */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    /*    scrollbar-color: var(--gold) #eef1f6;*/
}

    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }

    .table-responsive::-webkit-scrollbar-track {
        background: #eef1f6;
        border-radius: 8px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--gold);
        border-radius: 8px;
    }

        .table-responsive::-webkit-scrollbar-thumb:hover {
            background: var(--amethyst);
        }

.table-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /*    margin-bottom: 25px;*/
    flex-wrap: wrap;
    /*    gap: 15px;*/
    margin-right: auto;
}

.search-box {
    width: 300px;
    max-width: 100%;
    padding: 2px 18px;
    border-radius: 10px;
    border: 1px solid #dbe3f1;
    font-size: 14px;
    outline: none;
}

    .search-box:focus {
        border-color: #2d64ff;
    }

    .search-box input {
        width: 100%;
        padding: 12px 18px 12px 45px;
        border: 1px solid #d8dee9;
        border-radius: 10px;
        outline: none;
        box-sizing: border-box;
    }


/*#leadsTable {
    width: 100%;
    min-width: 2200px;
    border-collapse: collapse;
    margin-bottom: 80px;
}*/

    /* Main table header */
    /*#leadsTable thead {
        background-color: #e8f0ed !important;
    }

        #leadsTable thead th {*/
            /*        text-align: center !important;
        vertical-align: middle !important;*/
            /*font-size: 17px;
            font-weight: 400;
            background-color: #e8f0ed !important;
            color: #273d4e !important;
            padding: 10px 18px;
            white-space: nowrap;
            min-width: 140px;
        }

table.dataTable thead th {
    text-align: center !important;
    vertical-align: middle !important;
}*/

/* DataTables scrolling header */
/*div.dt-scroll-head,
div.dt-scroll-head table,
div.dt-scroll-head thead,
div.dt-scroll-head thead tr,
div.dt-scroll-head thead th {
    background-color: #e8f0ed !important;*/
    /*    color: #273d4e !important;*/
/*}

    div.dt-scroll-head thead th {*/
        /*color: #273d4e !important;*/ /* text color */
        /*font-size: 14px !important;
        font-weight: 400 !important;
        padding: 10px 18px !important;
        text-align: center !important;
        vertical-align: middle !important;
        white-space: nowrap;
        min-width: 140px;
        border-bottom: 2px solid #c99c3c;*/ /* example: gold underline */
    /*}*/

/* Table body */
/*#leadsTable tbody td {
    padding: 12px 18px;
    border-top: 1px solid #edf2f8;
    font-size: 16px;
    font-family: 'Neue Haas Unica W1G';
    vertical-align: middle;
    text-align: center;
}

#leadsTable tbody tr {
    border-bottom: 4px solid #edf2f8;
}*/


/* ============================================================
   LEADS TABLE — ID-scoped header styling
   Why two selectors? DataTables with scrollX/scrollY clones the
   <thead> into a separate .dt-scroll-head wrapper. The original
   <thead> is hidden, so the visible header is the clone. To make
   an ID-based rule actually show, we must target BOTH:
     1) #leadsTable thead th        → original (no-scroll case)
     2) #leadsTable_wrapper .dt-scroll-head thead th
        (or a general .dt-scroll-head rule if you prefer)
   DataTables automatically wraps the table in a div with id
   "<tableId>_wrapper" — that's why #leadsTable_wrapper works.
   ============================================================ */

#leadsTable {
    width: 100%;
    min-width: 2200px;
    border-collapse: collapse;
    margin-bottom: 80px;
}

    /* --- 1) Original <thead> (used when scrollX/scrollY is OFF) --- */
    #leadsTable thead {
        background-color: #e8f0ed !important;
    }

        #leadsTable thead th {
            font-size: 17px;
            font-weight: 400;
            background-color: #e8f0ed !important;
            color: #273d4e !important;
            padding: 10px 18px;
            white-space: nowrap;
            min-width: 140px;
            text-align: center !important;
            vertical-align: middle !important;
            border-bottom: 2px solid #c99c3c;
        }

/* --- 2) Cloned <thead> (the one DataTables actually shows when
   scrollX/scrollY is ON). Scoped to THIS table's wrapper only, so
   other tables on other pages are unaffected. --- */
/*#leadsTable_wrapper div.dt-scroll-head,
#leadsTable_wrapper div.dt-scroll-head table,
#leadsTable_wrapper div.dt-scroll-head thead,
#leadsTable_wrapper div.dt-scroll-head thead tr,
#leadsTable_wrapper div.dt-scroll-head thead th {
    background-color: #e8f0ed !important;
}

    #leadsTable_wrapper div.dt-scroll-head thead th
    {*/
        /*        color: #273d4e !important;*/
        /*color: black;
        font-size: 17px !important;
        font-weight: 600 !important;
        font-family: 'CustomiseTobias';
        padding: 10px 18px !important;
        text-align: center !important;
        vertical-align: middle !important;
        white-space: nowrap;
        min-width: 140px;
        border-bottom: 2px solid #c99c3c;
    }*/

/* Body cells (unchanged, kept ID-scoped) */
#leadsTable tbody td {
    padding: 12px 18px;
    border-top: 1px solid #edf2f8;
    font-size: 16px;
/*    font-family: 'Neue Haas Unica W1G';*/
    font-family:CustomiseTobias;
    vertical-align: middle;
    text-align: center;
}

#leadsTable tbody tr {
    border-bottom: 4px solid #edf2f8;
}



.modal-table {
    width: 100%;
    /*min-width: 2200px;*/
    border-collapse: collapse;
}

    .modal-table thead {
        background: #f5f8fc;
    }

    .modal-table th {
        text-align: left;
        font-size: 17px;
        font-weight: 400;
        background: #e8f0ed;
        padding: 14px 18px;
        vertical-align: middle;
        white-space: nowrap; /* Prevent text wrapping */
        min-width: 140px;
    }

    .modal-table td {
        padding: 14px 18px;
        border-top: 1px solid #edf2f8;
        font-size: 15px;
        font-family: 'Neue Haas Unica W1G';
    }


.status {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.new {
    background: #eef4ff;
    color: #2d64ff;
}

.contacted {
    background: #eaf8ef;
    color: #0f9d58;
}

.view-btn {
    background: #f4f4f4;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    cursor: pointer;
    transition: .3s;
    font-weight: 600;
}

    .view-btn:hover {
        background: #2d64ff;
        color: #fff;
    }

/* Pitch */

.header-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stage-filter {
    width: 170px;
    max-width: 100%;
}

.pitch-table {
    margin-bottom: 0;
    min-width: 640px;
}

    .pitch-table thead {
        background: #f5f7fb;
    }

        .pitch-table thead th {
            color: #49658d;
            font-size: 16px;
            font-weight: 600;
            padding: 22px;
        }

    .pitch-table tbody td {
        padding: 24px 22px;
        vertical-align: middle;
        font-size: 14px;
    }

.lead-name,
.offer-title {
    font-size: 16px;
    font-weight: 600;
    color: #16335B;
}

.pitch-table small {
    color: #7d8ca5;
    font-size: 15px;
}

.badge-stage {
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    white-space: nowrap;
}

.stage-blue {
    background: #dcefff;
    color: #0d6efd;
    font-size: 15px;
}

.stage-green {
    background: #daf8e6;
    color: #1b8d46;
    font-size: 15px;
}

.btn-light {
    background: #f3f5f9;
    border: 1px solid #dce2ec;
}

.btn-primary {
    background: #2f63ea;
    border: none;
}

.pitch-table tbody tr:hover {
    background: #fafcff;
}

/* Subscription */
.page-subtitle {
    color: #64748b;
    margin-top: 4px;
    font-size: 16px;
}

/*.offerings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 30px;
}

.offering-card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    min-width: 0;
}

.offering-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 10px;
}*/

.offerings-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 20px;
    overflow: hidden;
    width: 100%;
}

.offering-card {
    flex: 0 0 calc(50% - 6px);
    min-width: calc(50% - 6px);
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    /* Smaller padding */
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    box-sizing: border-box;
}

.offering-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.package-badge {
    /*    padding: 7px 14px;*/
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

    .package-badge.equity {
        background: #dff0ff;
        color: #0d6efd;
    }

    .package-badge.realestate {
        background: #fff4cc;
        color: #b56b00;
    }

.target-return {
    color: #11823b;
    font-size: 16px;
    font-weight: 700;
}

.offering-title {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: #183153;
    margin-bottom: 14px;
}

.offering-description {
    color: #5f6e82;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.section-title {
    color: #5d6d82;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 16px;
}

/*.instrument-list {
    margin-bottom: 25px;
}

.instrument-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
}*/


.instrument-list {
    max-height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.instrument-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.instrument-file {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* Download button */
.instrument-download-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    color: #b4974f;
    flex-shrink: 0;
}

/* Optional scrollbar styling */
.instrument-list::-webkit-scrollbar {
    width: 5px;
}

.instrument-list::-webkit-scrollbar-thumb {
    background: #b4974f;
    border-radius: 10px;
}

.instrument-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.offering-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.investment-text {
    font-size: 14px;
}

.pitch-btn {
    background: #efefef;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

    .pitch-btn:hover {
        background: #183153;
        color: #fff;
    }

/* Navigation */

.portfolio-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}


.portfolio-arrow {
    border: 0;
    background: transparent;
    color: #b4974f;
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

    .portfolio-arrow:hover {
        color: #170836;
    }

#create-lead-page .page-header {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#create-lead-page .back-btn {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 15px;
}

.lead-form-card {
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 14px;
    padding: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
    width: 100%;
    box-sizing: border-box;
    font-family: 'Neue Haas Unica W1G';
}

    .lead-form-card input,
    .lead-form-card textarea,
    .lead-form-card select {
        border: 1px solid #957D4D;
        border-radius: 0;
    }

    .lead-form-card select {
       height:36px;
    }

.form-group {
    margin-bottom: 28px;
}

    .form-group label {
        display: block;
        margin-bottom: 10px;
        font-size: 16px;
        font-weight: 600;
        color: #1f2937;
    }

#create-pitch-page .page-header {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#create-pitch-page .back-btn {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 15px;
}

#create-pitch-page h3 {
    font-size: 14px;
    font-weight: 400;
}

#create-pitch-page p {
    font-size: 12px;
}

#create-pitch-page .card-box {
    background: #fff;
}

#create-pitch-page .form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.form-select {
    width: 100%;
    height: 52px;
}

#login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    /*    min-height: 100vh;*/
    height: auto;
    /*    padding: 20px;*/
    box-sizing: border-box;
}

    #login-page .cards {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #login-page .lead-form-card {
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    #login-page .card-box {
        width: 100%;
        max-width: 450px;
    }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    height: 70px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.sidebar-toggles {
    display: flex;
    align-items: center;
}

#sidebarToggle {
    font-size: 22px;
    color: #344767;
    cursor: pointer;
    transition: all .3s ease;
}

    #sidebarToggle:hover {
        color: #430AD6;
        transform: scale(1.1);
    }

.sidebar.collapsed {
    flex: 0 0 var(--sidebar-width-collapsed);
    max-width: var(--sidebar-width-collapsed);
    min-width: var(--sidebar-width-collapsed);
    width: var(--sidebar-width-collapsed);
}

    /* the sidebar is fixed/out-of-flow now, so its width no longer pushes
   .main-content over automatically — mirror the collapsed state onto
   the content pane via the sibling combinator */
    .sidebar.collapsed ~ .main-content {
        margin-left: var(--sidebar-width-collapsed);
    }

#contacts .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Common Modal CSS */
.modal-header .nav-tabs {
    border-bottom: none;
    margin-top: 6px;
    margin-bottom: 0;
}

.modal-header .nav-link {
    border: none;
    color: #555555;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    padding: 10px 18px;
}

.modal-header .nav-tabs .nav-link:hover {
    color: #957D4D;
}

/* Active tab */
.modal-header .nav-tabs .nav-link.active {
    color: #957D4D;
    font-weight: 700;
    background: transparent;
    border: none;
    border-bottom: 3px solid #957D4D;
}

/* Modal Size
   ------------------------------------------------------------------
   The old version fixed the dialog/content to a % of the *viewport*
   (85vh) and then carved the body out with a magic-number subtraction
   (calc(80vh - 170px)). That breaks the moment the header wraps to a
   second line (narrow screens) or the mobile browser's address bar
   changes the usable viewport height — the footer either gets pushed
   off-screen or the body has almost no room to scroll in.

   The fix uses max-height, not height: the dialog/content are capped
   at a budget so long tabs (the Info form) scroll internally instead
   of overflowing the screen, but they're free to shrink below that
   cap — so short tabs (Notes, Pitches with 1-2 rows) hug their own
   content instead of stretching to match whichever tab happens to be
   tallest. No vh subtraction, so it self-adjusts to however tall the
   header/tabs/footer actually render at any screen size. */
#leadModal .modal-dialog,
#pitchModal .modal-dialog,
#contactModal .modal-dialog,
#reminderModal .modal-dialog {
    max-width: 1200px;
    /* dvh = "dynamic viewport height": excludes the mobile browser's
       address bar / toolbar, so the dialog never sizes itself against
       space that isn't actually visible. Falls back to vh on browsers
       that don't support dvh yet. */
    max-height: calc(100vh - 3.5rem);
    max-height: calc(100dvh - 3.5rem);
}

#leadModal .modal-content,
#pitchModal .modal-content,
#contactModal .modal-content,
#reminderModal .modal-content {
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#leadModal .modal-header,
#pitchModal .modal-header,
#contactModal .modal-header,
#reminderModal .modal-header {
    padding: 12px 20px 0;
    flex: 0 0 auto;
}

/* The tab row itself scrolls sideways instead of wrapping to a second
   line when there isn't room for all five tabs — keeps the header's
   height predictable on every screen size. */
#leadModal .nav-tabs,
#pitchModal .nav-tabs,
#contactModal .nav-tabs,
#reminderModal .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    #leadModal .nav-tabs::-webkit-scrollbar,
    #pitchModal .nav-tabs::-webkit-scrollbar,
    #contactModal .nav-tabs::-webkit-scrollbar,
    #reminderModal .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    #leadModal .nav-tabs .nav-link,
    #pitchModal .nav-tabs .nav-link,
    #contactModal .nav-tabs .nav-link,
    #reminderModal .nav-tabs .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

#leadModal form,
#pitchModal form,
#contactModal form,
#reminderModal form {
    display: flex;
    flex-direction: column;
    border: none;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

/* Bootstrap's .tab-content/.tab-pane sit between the form and the
   body — they also need to be part of the flex chain, or the body's
   flex sizing has nothing to defer to and collapses. */
#leadModal .tab-content,
#pitchModal .tab-content,
#contactModal .tab-content,
#reminderModal .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
}

#leadModal .tab-pane,
#pitchModal .tab-pane,
#contactModal .tab-pane,
#reminderModal .tab-pane {
    width: 100%;
}

    #leadModal .tab-pane.active,
    #pitchModal .tab-pane.active,
    #contactModal .tab-pane.active,
    #reminderModal .tab-pane.active {
        display: flex;
        flex-direction: column;
        min-height: 0;
        flex: 1 1 auto;
    }

#leadModal .modal-body,
#pitchModal .modal-body,
#contactModal .modal-body,
#reminderModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 30px;
    min-height: 0;
}

#leadModal .modal-footer,
#pitchModal .modal-footer,
#contactModal .modal-footer,
#reminderModal .modal-footer {
    flex: 0 0 auto;
    padding: 12px 20px;
    /* keeps Cancel/Save clear of the home-indicator / gesture bar on
       notched phones instead of sitting flush with the screen edge */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: auto;
    background: #fff;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

@media (max-width: 576px) {
    /* Full-width sheet on phones, edge-to-edge with no floating-card
       margin — but still capped (not forced) to the screen height, so
       a short tab like Notes doesn't stretch to fill the whole screen
       either. */
    #leadModal .modal-dialog,
    #pitchModal .modal-dialog,
    #contactModal .modal-dialog,
    #reminderModal .modal-dialog {
        max-width: 100%;
        width: 100%;
        margin: 0;
        max-height: 100vh;
        max-height: 100dvh;
    }

    #leadModal .modal-content,
    #pitchModal .modal-content,
    #contactModal .modal-content,
    #reminderModal .modal-content {
        border-radius: 0;
    }

    #leadModal .modal-body,
    #pitchModal .modal-body,
    #contactModal .modal-body,
    #reminderModal .modal-body {
        padding: 16px 18px;
    }

    #leadModal .modal-footer,
    #pitchModal .modal-footer,
    #contactModal .modal-footer,
    #reminderModal .modal-footer {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

        #leadModal .modal-footer .btn,
        #pitchModal .modal-footer .btn,
        #contactModal .modal-footer .btn,
        #reminderModal .modal-footer .btn,
        #leadModal .modal-footer .create-btn,
        #pitchModal .modal-footer .create-btn,
        #contactModal .modal-footer .create-btn,
        #reminderModal .modal-footer .create-btn {
            flex: 1 1 0;
        }
}

/*    #reminderModal .modal-footer .btn,
    #reminderModal .modal-footer .create-btn {
        margin-top: 50px;
    }*/



#leadModal select,
#pitchModal select,
#contactModal select,
#reminderModal select {
    height: 38px;
    padding: 4px 10px;
    font-size: 14px;
}



.profile-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #430AD6, #6B46C1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    user-select: none;
}

.profile-tooltip {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    background: #FFFFFF;
    color: var(--gold);
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    /*    z-index: 1000;*/
}

/*    .profile-tooltip::after {
        content: "";
        position: absolute;
        top: 50%;
        right: -6px;
        transform: translateY(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: transparent transparent transparent #2b2b2b;
    }*/

.profile-menu:hover .profile-tooltip {
    opacity: 1;
    visibility: visible;
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background: #22c55e;
    border: 2px solid #fff;
    border-radius: 50%;
}

/* Notification Page */
.notification-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

    .notification-container h2 {
        font-size: 32px;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 25px;
    }

/* Notification Card */
.notification-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

    .notification-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .notification-card.unread {
        border-left: 5px solid #2563eb;
        background: #f8fbff;
    }

    .notification-card:not(.unread) {
        border-left: 5px solid #d1d5db;
    }

    .notification-card h5 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        color: #111827;
    }

    .notification-card p {
        margin: 10px 0;
        font-size: 15px;
        color: #4b5563;
        line-height: 1.5;
    }

    .notification-card small {
        color: #9ca3af;
        font-size: 13px;
    }

/* Parent Menu */
.has-submenu {
    position: relative;
}

    .has-submenu > .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 18px 28px;
        /*    color: #42526e;*/
        text-decoration: none;
        cursor: pointer;
    }

        .has-submenu > .submenu-toggle span {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .has-submenu > .submenu-toggle:hover {
            background: #f8f8f8;
        }

.arrow {
    transition: transform .3s;
    font-size: 12px;
}

.has-submenu.active .arrow {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
}

.has-submenu.active .submenu {
    display: block;
}

.submenu li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 28px 12px 55px;
    font-size: 13px;
    color: var(--amethyst);
    text-decoration: none;
    line-height: 1.5;
}

    .submenu li a:hover {
        background: #f8f8f8;
        color: var(--midnight);
    }

.submenu-icon {
    font-size: 12px;
    margin-top: 3px;
}

.submenu li.active > a,
.submenu li a.active {
    background: #ffffff;
    color: var(--gold);
    font-weight: 400;
}

/*================================================================
  RESPONSIVE BREAKPOINTS
  Strategy (mobile-first cascade read top→bottom as max-width bands):
  - >1440px  (large desktops / wide monitors): a touch more breathing
    room and an extra card column so content doesn't look sparse.
  - 1025px-1440px (standard desktop): layout as designed — fixed
    260px sidebar, 3-col cards.
  - 993px-1024px (small laptops / large tablets landscape): sidebar
    narrows slightly, cards go 2-col.
  - 769px-992px (tablets portrait): sidebar narrows further, cards
    stay 2-col, offering grid goes 1-col, paddings tighten.
  - <=768px (small tablets/large phones): sidebar collapses into a
    fixed bottom tab bar, cards/grids stack to 1 col.
  - 481px-576px (large phones): tighten spacing further, buttons
    start going full width, tables keep horizontal scroll.
  - <=480px (phones): tight paddings/font sizes, full-width buttons,
    horizontal-scroll tables so data never gets crushed.
  - <=380px (small/older phones): last-mile tightening so nothing
    clips on the smallest common viewports.

  The header (.agent-header) and the sidebar (.sidebar) are both
  position:fixed to the viewport at every breakpoint above 768px, so
  neither ever scrolls with the page — only .main-content scrolls.
  Below 768px the sidebar turns into a fixed bottom tab bar instead
  (see that breakpoint) and stays just as pinned.
  ================================================================*/

@media (min-width: 1441px) {
    .main-content {
        padding: 45px 60px;
    }

    .cards {
        grid-template-columns: repeat(4, minmax(260px, 1fr));
    }
}

@media (max-width: 1024px) {
    .cards {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .sidebar {
        flex: 0 0 220px;
        max-width: 220px;
        min-width: 220px;
        width: 220px;
    }

    .main-content {
        padding: 25px;
        margin-left: 220px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        flex: 0 0 190px;
        max-width: 190px;
        min-width: 190px;
        width: 190px;
    }

    .main-content {
        margin-left: 190px;
    }

    .sidebar-menu li a {
        padding: 16px 18px;
        font-size: 17px;
    }

    .menu-title {
        font-size: 22px;
        padding: 18px;
    }

    .offering-title {
        font-size: 28px;
    }

    .card-box {
        padding: 24px;
    }

    /* .offerings-grid is a flexbox, not a grid, so the old
       "grid-template-columns: 1fr" rule that used to live here never
       actually stacked anything — the two offering-card panels stayed
       pinned at 50% width (with overflow:hidden clipping them) all
       the way down to phone widths. Switch the flex container to wrap
       and let each card take the full row instead. */
    .offerings-grid {
        flex-wrap: wrap;
        overflow: visible;
    }

    .offering-card {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    /* header keeps growing with wrapped content on very narrow
       screens, so give a slightly bigger buffer than the min-height
       below to avoid the first bit of content tucking under it */
    body {
        padding-top: 90px;
    }

    .agent-header {
        height: auto;
        min-height: 70px;
        padding: 12px 20px;
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .header-divider {
        display: none;
    }

    .portal-title {
        font-size: 18px;
    }

    .profile-circle {
        width: 42px;
        height: 42px;
        font-size: 18px;
        margin-right: 10px;
    }

    .profile-name {
        font-size: 18px;
    }

    /* Sidebar becomes a fixed bottom tab bar (icon over label, evenly
       spaced) instead of a fixed left column. The collapsed/expand
       toggle is meant for the desktop layout, so neutralize it here. */
    .page-wrapper {
        flex-direction: column !important;
    }

    .sidebar,
    .sidebar.collapsed {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        flex: none !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        height: 64px !important;
        border-right: none !important;
        border-top: 1px solid #eee;
        box-shadow: 0 -2px 8px rgba(0,0,0,.06);
        z-index: 100;
        overflow: visible;
    }

        /* Hide the sidebar's own heading in the bottom-bar layout — the
       reference screenshot has no title row down there. Remove this
       rule if you'd rather keep it as a slim top strip. */
        .sidebar .menu-title,
        .sidebar .sidebar-header {
            display: none;
        }

    /*.sidebar-menu {
        display: flex;
        height: 100%;
        margin: 0;
        padding: 0;
    }

        .sidebar-menu li {
            flex: 1 1 0;
            display: flex;
        }

            .sidebar-menu li a {
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: 4px;
                width: 100%;
                padding: 8px 4px;
                font-size: 11px;
                line-height: 1.1;
                text-align: center;
                color: #6b7280;
            }*/

    /* Icons: if your <a> markup uses an <i>/<svg> child, size it
               here so it reads as a tab-bar icon rather than an inline glyph. */
    /*.sidebar-menu li a > *:first-child {
                    font-size: 20px;
                    width: 22px;
                    height: 22px;
                }

            .sidebar-menu li.active a {
                background: transparent;
                border-left: none;
                border-bottom: none;
                color: #4f1c8b;
                font-weight: 600;
            }*/

    /* .has-submenu ("Opportunities") was still picking up the desktop
       .has-submenu > .submenu-toggle rule (row layout, label+arrow
       side by side) because that selector is more specific than the
       plain .sidebar-menu li a column rule above. Re-assert the tab
       layout here so it matches every other bottom-bar item. */

    /*.sidebar-menu li.has-submenu {
                position: relative;
            }

                .sidebar-menu li.has-submenu > .submenu-toggle {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    width: 100%;
                    height: 100%;
                    padding: 6px 4px;
                    text-align: center;
                    color: #6b7280;
                }

                    .sidebar-menu li.has-submenu > .submenu-toggle span {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        gap: 3px;
                    }

                .sidebar-menu li.has-submenu .arrow {
                    font-size: 10px;
                    margin-top: 2px;
                }

                .sidebar-menu li.has-submenu .submenu {
                    position: absolute;
                    bottom: 70px;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 230px;
                    background: #fff;
                    border-radius: 10px;
                    box-shadow: 0 6px 20px rgba(0,0,0,.15);
                    padding: 8px 0;
                    display: none;
                    z-index: 1000;
                }

                .sidebar-menu li.has-submenu.active .submenu {
                    display: block;
                }

                .sidebar-menu li.has-submenu .submenu li a {
                    display: flex;
                    flex-direction: row;
                    justify-content: flex-start;
                    align-items: flex-start;
                    padding: 12px 18px;
                    font-size: 14px;
                    text-align: left;
                    color: #6d4c41;
                }*/

    .sidebar-menu {
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        width: 100%;
        height: 100%;
    }

        .sidebar-menu > li {
            flex: 1;
            position: relative;
        }

            .sidebar-menu > li > a,
            .sidebar-menu > li > .submenu-toggle {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: 4px;
                height: 100%;
                width: 100%;
                padding: 6px 2px;
                text-align: center;
                text-decoration: none;
                color: #6b7280;
                font-size: 10px;
                line-height: 1.2;
            }

                .sidebar-menu > li > .submenu-toggle span {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 4px;
                }

                    .sidebar-menu > li > a i,
                    .sidebar-menu > li > .submenu-toggle span i {
                        font-size: 18px;
                    }

        /* Hide dropdown arrow */
        .sidebar-menu .arrow {
            display: none;
        }

        /* Floating submenu */
        .sidebar-menu .submenu {
            position: absolute;
            bottom: 68px;
            left: 50%;
            transform: translateX(-50%);
            width: 230px;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 6px 20px rgba(0,0,0,.15);
            display: none;
            padding: 8px 0;
            z-index: 999;
        }

        .sidebar-menu .has-submenu.active .submenu {
            display: block;
        }

        .sidebar-menu .submenu li a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 18px;
            text-align: left;
            font-size: 14px;
        }

    /* Fold Log out into the same row as the nav items instead of
       leaving it as a separate full-width button below them. .sidebar
       becomes the flex row itself; .sidebar-menu (the nav items) and
       .sidebar-logout (the last tab) sit side by side inside it, each
       sized and styled the same way. */
    .sidebar,
    .sidebar.collapsed {
        flex-direction: row !important;
    }

    /* Removes the <ul> as a box (but keeps its <li> children) so every
       nav item and the Log out tab become equal-width flex siblings
       directly under .sidebar, instead of the whole nav list being
       sized as a single item next to Log out. */
    .sidebar-menu {
        display: contents !important;
    }

    .sidebar-logout {
        flex: 1 !important;
        margin-top: 0 !important;
        padding: 0 !important;
        border-top: none !important;
        height: 100% !important;
    }

    .logout-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        width: 100% !important;
        height: 100% !important;
        padding: 6px 2px !important;
        background: transparent !important;
        color: #6b7280 !important;
        border-radius: 0 !important;
        font-size: 10px !important;
        font-weight: 400 !important;
        line-height: 1.2 !important;
    }

        .logout-btn i {
            font-size: 18px !important;
            color: #957D4D !important;
        }

        .logout-btn:hover {
            background: #f8f8f8 !important;
            color: #6b7280 !important;
        }

            .logout-btn:hover i {
                color: #957D4D !important;
            }

    /* On the bottom-tab-bar layout the sidebar no longer occupies a
       left column, so the content pane doesn't need a left offset —
       just room at the bottom so it isn't hidden behind the fixed
       tab bar. This also overrides the collapsed-sidebar offset rule
       above, since the sidebar can't meaningfully be "collapsed"
       once it's a bottom bar. */
    .main-content,
    .sidebar.collapsed ~ .main-content {
        margin-left: 0 !important;
        padding: 20px 20px 84px;
    }

    .title {
        font-size: 24px;
    }

    .dashboard p {
        font-size: 16px;
        margin-bottom: 22px;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card-box {
        padding: 22px;
    }

    .table-card,
    .lead-form-card {
        padding: 20px;
        border-radius: 12px;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .offering-title {
        font-size: 26px;
    }

    .offering-description {
        font-size: 15px;
    }

    .investment-text {
        font-size: 19px;
    }

    .offering-footer,
    .offering-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .stage-filter {
        width: 100%;
    }

    .notification-container {
        padding: 0 15px;
    }

        .notification-container h2 {
            font-size: 24px;
        }

    .notification-card {
        padding: 15px;
    }

        .notification-card h5 {
            font-size: 16px;
        }

        .notification-card p {
            font-size: 14px;
        }
}

@media (max-width: 576px) {
    .portal-title {
        font-size: 16px;
    }

    .header-right {
        gap: 12px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .notification-menu {
        width: calc(100vw - 24px);
        right: 12px !important;
        left: auto !important;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 25px;
        margin-top: 20px;
    }

    .header-actions {
        flex-direction: column;
    }

    .create-btn {
        width: 100%;
        text-align: center;
    }

    .table th,
    .table td,
    .lead-table th,
    .lead-table td,
    .pitch-table thead th,
    .pitch-table tbody td {
        padding: 14px 16px;
    }

    .offering-card {
        padding: 20px;
    }

    .package-badge,
    .target-return {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 100px;
    }

    .agent-header {
        padding: 10px 14px;
    }

    .header-logo {
        height: 36px;
    }

    .main-content {
        padding: 14px 14px 78px;
    }

    .title {
        font-size: 20px;
    }

    .card-box h2 {
        font-size: 24px;
    }

    .create-btn,
    .pitch-btn,
    .view-btn {
        width: 100%;
        padding: 12px 0;
        text-align: center;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

    .stage-filter {
        width: 100%;
    }

    .offering-card {
        padding: 18px;
    }

    .offering-title {
        font-size: 22px;
    }

    .instrument-item {
        font-size: 14px;
    }

    #login-page .card-box {
        padding: 22px;
    }

    .sidebar-menu li a {
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .profile-name {
        display: none; /* avoid crowding the header on the smallest phones */
    }

    .portal-title {
        font-size: 14px;
    }

    .header-logo {
        height: 30px;
    }

    .title {
        font-size: 18px;
    }

    .card-box {
        padding: 16px;
    }

        .card-box h2 {
            font-size: 20px;
        }

    .table-card,
    .lead-form-card {
        padding: 14px;
    }

    .lead-form-card {
        border-radius: 10px;
    }

    .offering-title {
        font-size: 19px;
    }

    .investment-text {
        font-size: 16px;
    }

    .sidebar-menu li a {
        padding: 6px 2px;
        font-size: 9px;
    }
}

/* Landscape phones: the fixed bottom tab bar plus a short viewport
   height can crowd vertical space — trim it down a bit. */
@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
    body {
        padding-top: 70px;
    }

    .agent-header {
        min-height: 56px;
    }

    .sidebar,
    .sidebar.collapsed {
        height: 52px !important;
    }

    .sidebar-menu li a {
        padding: 4px 4px;
        font-size: 9px;
    }

    .main-content {
        padding-bottom: 60px;
    }
}

.notification-dropdown {
    position: relative;
}

.notification-menu {
    width: 400px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.notification-header {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.notification-item {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: .25s;
}

    .notification-item:hover {
        background: #f8fafc;
    }

    .notification-item h6 {
        margin-bottom: 6px;
        font-size: 12px;
        font-weight: 600;
    }

    .notification-item p {
        margin-bottom: 6px;
        color: #666;
        font-size: 12px;
    }

    .notification-item small {
        color: #999;
    }

    .notification-item.unread {
        background: #f8fbff;
        border-left: 4px solid #2563eb;
    }

    .notification-item.reminder {
        background: #fffdf3;
    }

.notification-footer {
    text-align: center;
    padding: 14px;
    background: #fafafa;
}

    .notification-footer a {
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
    }

.quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .quick-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 60px; /* Same width */
        height: 30px;
        padding: 0 14px;
        font-size: 14px;
    }

        .quick-actions .btn i {
            margin-right: 5px;
        }


/* Logout Section */
.sidebar-logout {
    margin-top: auto;
    padding: 24px;
    border-top: 1px solid #e5e5e5;
}

/* Logout Button */
.logout-btn {
    width: 100%;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #3f0750;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    /* Logout Icon */
    .logout-btn i {
        font-size: 21px;
        color: #c6a04a;
    }

    /* Hover */
    .logout-btn:hover {
        background: #4d0b5f;
        color: #fff;
    }

        .logout-btn:hover i {
            color: #d5b35a;
        }

/* The fixed 38px height below was clipping the multi-select boxes to
   a single line — once more than 3-4 tags were chosen, the rest of
   the selected options were pushed past the right edge and simply
   invisible (as opposed to wrapping to a second row). Letting the
   box grow (min-height instead of a locked height) and making it a
   wrapping flex container fixes that: tags now flow onto as many
   rows as they need and the box grows to fit them all. */
.choices__inner {
    height: auto !important;
    min-height: 38px !important;
    padding: 5px 10px !important;
    border: 1px solid var(--gold) !important;
    box-sizing: border-box;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    row-gap: 6px;
    column-gap: 6px;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border: 1px solid var(--gold) !important;
    box-shadow: none !important;
}

/* Choices.js renders selected tags as an inner <ul>/<li> list; make
   sure that list also wraps instead of relying on the browser's
   default (which varies by version) and drop the margins that used
   to assume a single fixed-height row. */
.choices__list--multiple {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

    .choices__list--multiple .choices__item {
        margin: 0;
    }

    /* The "Select option" search input shouldn't force its own full-width
   row — let it sit inline after the last tag and wrap naturally with
   the rest. */
    .choices__list--multiple .choices__input {
        flex: 1 1 auto;
        min-width: 90px;
        margin: 0;
    }

.lead-table th.group-end,
.lead-table td.group-end {
    border-right: 2px solid #d9d9d9;
}


.portfolio-section {
    /*    background: #eee3c7;*/
    /*    padding: 32px 12px 18px;*/
    width: 100%;
    box-sizing: border-box;
}


/* ============================================================
   CONTACTS TABLE — scoped styling
   Everything here targets .contacts-table / .contacts-table-wrapper
   only, so it can't affect the Leads table or any other table that
   shares #leadsTable / .lead-table elsewhere in the app.
   ============================================================ */

.contacts-table {
    width: 100%;
    /*    min-width: 2200px;*/
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 80px;
    table-layout: auto;
}

    /* Header */
    .contacts-table thead th {
        background-color: #e8f0ed !important;
        color: #273d4e !important;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: .2px;
        padding: 14px 18px;
        white-space: nowrap;
        min-width: 140px;
        position: sticky;
        top: 0;
        z-index: 2;
    }

        /* Rounded outer corners on the header row */
        .contacts-table thead th:first-child {
            border-top-left-radius: 10px;
        }

        .contacts-table thead th:last-child {
            border-top-right-radius: 10px;
        }

/* DataTables' own generated scroll header/body — scoped so it only
   applies inside the Contacts wrapper */
/*.contacts-table-wrapper div.dt-scroll-head,
.contacts-table-wrapper div.dt-scroll-head table,
.contacts-table-wrapper div.dt-scroll-head thead,
.contacts-table-wrapper div.dt-scroll-head thead tr,
.contacts-table-wrapper div.dt-scroll-head thead th {
    background-color: #e8f0ed !important;
}

.contacts-table-wrapper div.dt-scroll-head thead th {*/
    /*        color: #273d4e !important;*/
    /*color: black;
    font-size: 17px !important;
    font-weight: 600 !important;
    font-family: 'CustomiseTobias';
    padding: 10px 18px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap;
    min-width: 140px;
    border-bottom: 2px solid #c99c3c;
}*/

/* DataTables owns scrolling once scrollX/scrollY are on for this
   table — let it, instead of fighting it with the outer
   .table-responsive overflow. Paired with scrollCollapse: true in
   the JS init, this is what stops the scroll area being pinned open
   at a fixed height with only 1-2 rows (the floating-row bug). */
.contacts-table-wrapper div.dt-scroll-body {
    overflow: auto !important;
    overflow-y: auto !important;
    max-width: 100%;
    border: 1px solid #edf2f8;
    border-radius: 10px;
}

.contacts-table-wrapper.table-responsive {
    overflow-x: visible;
}

/* Body cells — single line + ellipsis keeps every row the same
   height, which the DataTables scroll-position math depends on.
   Full value is still reachable via the title="" tooltip in the view. */
.contacts-table tbody td {
    padding: 12px 18px;
    border-top: 1px solid #edf2f8;
    font-size: 15px;
    font-family: 'Neue Haas Unica W1G';
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    /*    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;*/
}

.contacts-table tbody tr {
    transition: background-color .15s ease;
}

    .contacts-table tbody tr:nth-child(even) td {
        background-color: #fafbfc;
    }

    .contacts-table tbody tr:hover td {
        background-color: #f2f7f5;
    }

/* Keep the checkbox column narrow and pinned so it doesn't eat into
   the horizontal scroll */
.contacts-table th:first-child,
.contacts-table td:first-child {
    min-width: 48px;
    width: 48px;
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: inherit;
}

.contacts-table thead th:first-child {
    z-index: 3;
}

.contacts-table .view-btn {
    white-space: nowrap;
}

.contacts-table td {
    line-height: 1.5;
}

    /* Give these columns enough room for multiple values */
    .contacts-table td:nth-child(2),
    .contacts-table td:nth-child(3),
    .contacts-table td:nth-child(4),
    .contacts-table td:nth-child(5) {
        min-width: 180px;
        max-width: 280px;
    }

/* ============================================================
   SHARED DATATABLE HEADER — Leads + Contacts
   Why BOTH selectors? DataTables with scrollX/scrollY clones the
   <thead> into a separate .dt-scroll-head container. The clone is
   what's visible. We target:
     1) #leadsTable_wrapper   → the Leads page wrapper ID
     2) .contacts-table-wrapper → the Contacts page wrapper class
   Both live inside <div id="contacts"> or the leads page, so this
   rule cannot leak to any other table in the app.
   ============================================================ */

#leadsTable_wrapper div.dt-scroll-head,
#leadsTable_wrapper div.dt-scroll-head table,
#leadsTable_wrapper div.dt-scroll-head thead,
#leadsTable_wrapper div.dt-scroll-head thead tr,
#leadsTable_wrapper div.dt-scroll-head thead th,
.contacts-table-wrapper div.dt-scroll-head,
.contacts-table-wrapper div.dt-scroll-head table,
.contacts-table-wrapper div.dt-scroll-head thead,
.contacts-table-wrapper div.dt-scroll-head thead tr,
.contacts-table-wrapper div.dt-scroll-head thead th {
    background-color: #e8f0ed !important;
}

    #leadsTable_wrapper div.dt-scroll-head thead th,
    .contacts-table-wrapper div.dt-scroll-head thead th {
/*        color: #000000 !important;*/
        color:var(--amethyst);
        font-size: 17px !important;
        font-weight: 600 !important;
        font-family: 'CustomiseTobias';
        padding: 10px 18px !important;
        text-align: center !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
        min-width: 140px !important;
        /*        border-bottom: 2px solid #c99c3c !important;*/
        border-bottom: 2px !important;
    }

/* ============================================================
   DataTables — "N entries per page" spacing
   Covers both DataTables 1.x (.dataTables_length) and
   2.x (.dt-length) DOM structures.
   ============================================================ */

/* --- DataTables 2.x --- */
.dt-length {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .dt-length label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        font-weight: 400;
    }

    .dt-length select {
        margin-right: 8px;
        padding-right: 22px; /* room for the native dropdown arrow */
    }

/* --- DataTables 1.x --- */
.dataTables_wrapper .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
}

.dataTables_wrapper .dataTables_length select {
    margin-right: 8px;
}

/* Fallback: the ORIGINAL (non-cloned) <thead>, used when a table
   is rendered without scrollX/scrollY. Keeps both tables identical
   in either mode. */
/*#leadsTable thead th,
.contacts-table thead th {
    color: #000000 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    font-family: 'CustomiseTobias', Georgia, serif;
    padding: 10px 18px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    min-width: 140px !important;
    border-bottom: 2px solid #c99c3c !important;
}*/

.pitch-table-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

.contact-status-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-status-label {
    margin: 0;
    font-weight: 600;
    color: #170836;
    white-space: nowrap;
}

.status-dropdown-wrapper {
    position: relative;
}

.contact-status-select {
    min-width: 230px;
    height: 40px;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background-color: #fff;
    color: #170836;
    font-size: 14px;
    padding: 6px 36px 6px 12px;
    cursor: pointer;
}

    .contact-status-select:focus {
        border-color: #b4974f;
        box-shadow: 0 0 0 0.15rem rgba(180, 151, 79, 0.15);
        outline: none;
    }

    .contact-status-select option {
        color: #170836;
    }

.required-field::after {
    content: " *";
    color: red;
    font-weight: 400;
}
.actions-reminder-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* ==============================
   CONTACT STATUS BADGES
   ============================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* Failed Duplicity Check */
.status-failed {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
}

/* Passed Duplicity Check */
.status-passed {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

/* Submitted for Conversion */
.status-submitted {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

/* Lead Accepted */
.status-accepted {
    background-color: #cff4fc;
    color: #055160;
    border: 1px solid #9eeaf9;
}

/* Lead Rejected */
.status-rejected {
    background-color: #e2d9f3;
    color: #432874;
    border: 1px solid #c5b3e6;
}

/* N/A */
.status-na {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}

/* ============================================================
   PITCH STATUS PILLS
   ============================================================ */

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
}

    /* 1 - Not Contacted — light grey */
    .status.status-1 {
        background-color: #e9ecef;
        color: #495057;
        border-color: #ced4da;
    }

    /* 2 - Follow up — pink */
    .status.status-2 {
        background-color: #f8c8dc;
        color: #7a1f45;
        border-color: #f0a5c4;
    }

    /* 3 - Interested — light yellow */
    .status.status-3 {
        background-color: #fdf3c0;
        color: #7a6200;
        border-color: #f5e08a;
    }

    /* 4 - Still considering — light green */
    .status.status-4 {
        background-color: #d8f0c0;
        color: #3d6b1a;
        border-color: #b9e094;
    }

    /* 5 - Needs more information — light mint */
    .status.status-5 {
        background-color: #c8f0d4;
        color: #1f6b38;
        border-color: #a0e0b4;
    }

    /* 6 - Needs board approval — light cyan */
    .status.status-6 {
        background-color: #c0f0f0;
        color: #0e6060;
        border-color: #94e0e0;
    }

    /* 7 - Likely to invest — light blue */
    .status.status-7 {
        background-color: #c0dcf5;
        color: #14497a;
        border-color: #94c2e8;
    }

    /* 8 - Likely a no — light purple */
    .status.status-8 {
        background-color: #cfc0f5;
        color: #3f1a7a;
        border-color: #b09ce8;
    }

    /* 9 - Closed - Not interested — light pink/magenta */
    .status.status-9 {
        background-color: #f0c8f0;
        color: #6b1f6b;
        border-color: #e0a0e0;
    }

    /* 10 - No response — light rose */
    .status.status-10 {
        background-color: #f5c0c8;
        color: #7a1f2a;
        border-color: #eba0ab;
    }

    /* 11 - On hold — light coral */
    .status.status-11 {
        background-color: #f5c0c0;
        color: #7a1f1f;
        border-color: #eba0a0;
    }

    /* 12 - Closed – Invested — light lime green */
    .status.status-12 {
        background-color: #c0f0a0;
        color: #2d5a10;
        border-color: #9ce070;
    }