/* Base Customer CSS */

/* This file should ONLY be used to style overall customer pages. */
/* For styling individual pages, use the appropriate component's CSS files. */

/* Global styles */

:root {
    /* Core Brand Colors */
    /* --primary-color: #040C55; */
    --primary-color: #1c2d4d;
    --secondary-color: #CCE2FC;
    --gold-color: #A79479; /* Gold color for badges and highlights */

    /* Brand Color Mixes */
    --secondary-color-light: color-mix(in srgb, var(--secondary-color) 70%, white 30%);
    --secondary-color-dark: color-mix(in srgb, var(--secondary-color) 85%, black 15%);

    /* Status/Badge Colors */
    --badge-success-bg: #b4ecbc;
    --badge-success-text: #1a5e1e;
    --badge-danger-bg: #ffcccc;
    --badge-danger-text: #b30000;
    --badge-warning-bg: #ffa500;
    --badge-warning-text: #ffd076;

    --footer-height: 50px; /* Footer height for list pages */

    /* Neutral Colors */
    --white: #ffffff;
    --black: #000000;
    --light-gray: #f0f0f0;
    --medium-gray: #747474;

    /* Pill Button Colors */
    --pill-grey-dark: #444444;
    --pill-grey-light: #e6dddd;

    /* Backgrounds */
    --bg-primary: var(--white) !important;
    --background-gray: #f9f9f9;

    /* Bootstrap RGB Variables */
    --bs-primary-rgb: 167, 148, 121;

    /* Utility Colors */
    --hover-light-gray: #e0e0e0;
    --text-color: rgba(33, 37, 41, 0.75);
    --border-color: #707070;
    --table-border: #ddd;
    --highlight-color: #1c1b1b;
    --transparent: transparent;
    --input-field: #F0F0F0;

    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --font-size-heading: 1.8rem;
    --font-size-subheading: 1.1em;
    --font-size-text: 12px;
    --font-size-base: 0.8rem;
    --font-size-main: 1rem; /* Main font size for body text */

    --font-small: normal normal normal 8px/15px var(--font-family);
    --font-medium: normal normal normal 10px/18px var(--font-family);
    --font-heading: normal normal 600 20px/33px var(--font-family);

    /* Spacing (for margin, padding, gap) */
    --spacing-xs: 4px;      /* Extra small spacing */
    --spacing-small: 5px;
    --spacing: 10px;
    --spacing-medium: 10px;
    --spacing-large: 20px;
    --spacing-xl: 40px;     /* Extra large spacing */

    /* Layout */
    --radius: 5px;                  /* Default border radius */
    --card-radius: 10px;            /* For containers/cards */
    --btn-radius: 8px;              /* For buttons */
    --sidebar-width: 170px;
    --sidebar-collapsed-width: 55px;
    --navbar-height: 40px;
    --chat-expanded-width: 400px;

    /* Button Styles */
    --button-bg-color: var(--primary-color);
    --button-hover-bg-color: var(--gold-color);
    --button-text-color: var(--white);
    --button-padding: 5px 10px;
    --button-border-radius: 5px;
    --button-height: 40px;          /* Consistent button height */

    /* Transitions */
    --basic-transition: 0.3s ease;
    --transform-transition: transform 0.3s ease;
    --color-transition: color 0.3s ease;
    --button-transition: background-color 0.3s ease, transform 0.3s ease;

    /* Shadows */
    --basic-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --sidebar-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
    --box-shadow-default: 0 1px 3px rgba(0,0,0,0.1); /* Used for filter-section, etc. */
    --box-shadow-card: 0 3px 12px rgba(0,0,0,0.04);  /* Used for white-container */
    --box-shadow-hover: 0 6px 18px rgba(0,0,0,0.08); /* Used for hover states */

    /* Icons Sizing */
    --icon-size: 25px;

    /* EPC Colours */
    --epc-a: #367C43;
    --epc-b: #519D3C;
    --epc-c: #A6C954;
    --epc-d: #FDF150;
    --epc-e: #ECB144;
    --epc-f: #DC7038;
    --epc-g: #D0362F;
    --epc-default: #e0e0e0;

    /* Table Styles */
    --table-header-bg: #f9f9f9;
    --table-row-hover: #f5f5f5;
    --border-light: #e2e2e2;
    --link-blue: #4873bf;
    --border-extra-light: #eee;
    --border-medium: #dee2e6;
    --hover-dark: #505050;
    --text-dark: #333;
    --active-bg: #ccc;

    /* Bootstrap spacing scale overrides (all paddings and margins) */
    --bs-spacing-0: 0px;
    --bs-spacing-1: 1px;
    --bs-spacing-2: 2px;
    --bs-spacing-3: 4px;
    --bs-spacing-4: 8px;
    --bs-spacing-5: 12px;

    /* Full width and height variables */
    --full-width: 100%;
    --full-height: 100%;

    /* Full width/height relative to viewport */
    --viewport-width: 100vw;
    --viewport-height: 100vh;

    /* Add more variables below as you modularize more styles */
    /* Example: --input-radius, --modal-shadow, --alert-bg, etc. */
}

html, body {
    height: var(--full-height);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: var(--font-family);
    background-color: var(--background-gray);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-dark);
}

/* ==========================================================================
   List Page Fixed Header with Internal Scroll.
   ========================================================================== */

body.list-page {
    overflow: hidden;
    height: var(--viewport-height);
    padding-bottom: 0 !important;
}

body.list-page > .d-flex {
    height: 100%;
}

body.list-page main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

body.list-page .main-content {
    padding: 0 !important;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.list-page .page-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Table responsive container - flex column, no scroll here */
body.list-page .table-responsive {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

/* HTMX target divs sit between outer .table-responsive and the inner one;
   they must participate in the flex chain for height to propagate. */
body.list-page .table-responsive > [hx-swap] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ==========================================================================
   Sticky Pagination - Top
   ========================================================================== */

/* Make the top pagination sticky */
body.list-page .table-responsive > .d-flex.justify-content-between.align-items-center.mb-2 {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: var(--spacing) 6px;
}


/* ==========================================================================
   Sticky Table Headers 
   ========================================================================== */

/* The table wrapper scrolls both axes - flex: 1 fills remaining space */
body.list-page .table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    position: relative;
    scrollbar-gutter: stable;
}

/* Make table headers sticky - targets ALL tables inside .table-wrapper */
body.list-page .table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--white);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Blue border reinforcement on each th - visible above sticky z-index */
body.list-page .table-wrapper thead th::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Ensure the content above the table doesn't grow */
body.list-page .styled-heading,
body.list-page .search-placeholder,
body.list-page .search-filter-buttons,
body.list-page .filter-container,
body.list-page .tab-button-group,
body.list-page .icons,
body.list-page .d-flex.justify-content-between.align-items-center {
    flex-shrink: 0;
}

/* Fix for company list structure */
body.list-page .tab-button-group {
    margin-bottom: var(--spacing);
}

/* Ensure debug panels don't interfere */
body.list-page .card {
    flex-shrink: 0;
}

/* Handle HTMX loading states */
body.list-page .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* End of any Lis */
p {
    margin-bottom: 0.5rem;
}

/* reset button */
.btn-reset {
    background-color: var(--light-gray);
    color: var(--medium-gray);
    border: none;
}

.btn-reset i {
    font-size: var(--font-size-base);
}

/* Global Button overrides */
.btn {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    padding: var(--button-padding);
    border-radius: var(--button-border-radius);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--button-transition);
}

.btn i {
    font-size: 1em;
}

.btn:hover {
    background-color: var(--button-hover-bg-color);
    transform: scale(1);
    color: var(--button-text-color);
}

.btn-danger {
    background-color: var(--badge-danger-bg);
    color: var(--badge-danger-text);
}

/* Override Bootstrap active button color for your custom buttons */

/* Global Navbar overrides */
.nav-link {
    color: var(--background-gray);
}

.nav-link.active {
    background-color: unset;
    color: var(--gold-color) !important;
    border-bottom: 2px solid var(--gold-color);
}

.a.nav-link.active {
    background-color: unset;
    color: var(--gold-color);
    border-bottom: 2px solid var(--gold-color);
}

/* Tabs */

.tabs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-top: 10px;
    list-style-type: none;
    /* padding-left: 0; */
}

.tabs {
    display: flex;
    gap: var(--spacing-large)
}

.tab {
    cursor: pointer;
    padding: 10px;
    color: var(--primary-color);
    transition: var(--color-transition), border-bottom var(--basic-transition);
    border-bottom: 2px solid transparent;
}

.tab i {
    font-size:var(--font-size-base);
}

.tab.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.tab:hover,
.tab.active {
    color: var(--gold-color) !important;
    font-weight: bold;
    border-bottom: 2px solid var(--gold-color);
}

.tab-button-group {
    display: flex;
    gap:var(--spacing-large);
    margin-bottom: var(--spacing-large);
}
.btn-tab {
    cursor: pointer;
    padding: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border: none;
    background: unset;
    background-color: unset;
    border-bottom: 2px solid transparent;
    font-weight: normal;
}
.btn-tab.active {
    color: var(--gold-color);
    font-weight: bold;
    border-bottom: 2px solid var(--gold-color);
}
.btn-tab:hover {
    color: var(--gold-color);
    font-weight: bold;
    border-bottom: 2px solid var(--gold-color);
    background-color: unset;
}
/* End Global styles */
/* EPC Badge Colors */
.epc-badge[data-rating="A"] { background-color: var(--epc-a); color: #fff; }
.epc-badge[data-rating="B"] { background-color: var(--epc-b); color: #fff; }
.epc-badge[data-rating="C"] { background-color: var(--epc-c); color: #000; }
.epc-badge[data-rating="D"] { background-color: var(--epc-d); color: #000; }
.epc-badge[data-rating="E"] { background-color: var(--epc-e); color: #000; }
.epc-badge[data-rating="F"] { background-color: var(--epc-f); color: #fff; }
.epc-badge[data-rating="G"] { background-color: var(--epc-g); color: #fff; }
.epc-badge {
    color: #6c757d;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    border-radius: 13px;
    padding: 5px 10px;
    font-weight: 500;

}

.sidebar {
    position: fixed;
    top: 0px;
    left: 0px;
    width: var(--sidebar-width);
    height: var(--full-height);
    font-size: 0.7em;
    background: var(--primary-color) 0% 0% no-repeat padding-box;
    opacity: 1;
    display: flex;
    padding-top: 70px;
    flex-direction: column;
    align-items: center;
    transition: width var(--basic-transition);
    color: var(--white);
    box-shadow: var(--sidebar-shadow);
    will-change: width; /* Performance optimisation */
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
}

.sidebar.collapsed .nav-link .nav-icon,
.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.sidebar.collapsed .nav-link .nav-text,
.sidebar.collapsed .logo-text {
    display: none;
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.logo{
    height: 50px;
}
.icon i.fa-id-card {
    font-size: 20px;
    height: 20px;
    line-height: 20px;
    vertical-align: middle;
}
.icon:disabled img[alt="Zoho"] {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.65;
}

.sidebar.collapsed .logo {
    width: 35px !important;
    height: auto !important;
    margin-bottom:var(--spacing-large);
}

.sidebar.collapsed ul.nav {
    width: var(--sidebar-collapsed-width);
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

/* Toggle button styles */
.sidebar .btn-toggle-sidebar {
    position: fixed;
    top: 10px;
    font-size: var(--font-medium);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    z-index: 1000;
    padding: 10px;
}

/* SideBar Navigation link styles */
.sidebar .nav-links .nav-link {
    height: 32px;
    margin-bottom: 2px;
    font-size: var(--font-size-text);
    letter-spacing: 0px;
    color: var(--white);
    text-align: left;
    opacity: 1;
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: unset !important;
    border-bottom: unset;
    transition: var(--color-transition), opacity 0.5s ease;
}

.sidebar .nav-links .nav-link .nav-text {
    display: inline-block;
    transition: opacity 0.5s ease;
}

.sidebar .nav-links .nav-link:hover,
.sidebar .nav-links .nav-link.active {
    background-color: transparent !important;
    box-shadow: none;
    color: var(--gold-color) !important;
    transform: translateX(2px);
}

.sidebar .nav-links .nav-link.active {
    color: var(--gold-color) !important;
    font-weight: bold;
    border-left: 3px solid var(--gold-color);
}

.sidebar .nav-links .nav-link i,
.sidebar .nav-links .nav-link .nav-icon {
    margin-right: 10px;
}

.sidebar .nav-links .nav-link.active i,
.sidebar .nav-links .nav-link.active .nav-icon,
.sidebar .nav-links .nav-link:hover i,
.sidebar .nav-links .nav-link:hover .nav-icon {
    color: var(--gold-color) !important;
}

/* Sidebar icon styles */
.sidebar .nav-icon,
.sidebar .nav-links .nav-link .nav-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    vertical-align: middle;
    margin-right: 8px;
    filter: brightness(0) invert(1);
    transform: translateX(-5px);
    transition: transform 0.2s ease, filter 0.3s ease;
}

/* SVG icon styles */
.sidebar .nav-links .nav-link img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.sidebar .nav-links .nav-link:hover img,
.sidebar .nav-links .nav-link:hover .nav-icon {
    transform: translateX(-3px) scale(1.1);
}

/* Add tooltips for collapsed sidebar */
.sidebar.collapsed .nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link:hover::after {
    content: attr(title);
    position: absolute;
    left: 45px;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: var(--font-size-text);
    white-space: nowrap;
    box-shadow: var(--basic-shadow);
    z-index: 1000;
}
/* Logo Sidebar section */
.logo-container {
    display: flex;
    align-items: center;
    position: relative;
    flex-direction: column;
    transition: opacity 0.5s ease;
}


/* Top Navbar container */
.navbar {
    position: fixed;
    left: var(--sidebar-width);
    width: calc(var(--full-width) - var(--sidebar-width));
    height: var(--navbar-height);
    background: var(--white) 0% 0% no-repeat padding-box;
    border: 1px solid var(--light-gray);
    padding: 0 var(--spacing-large);
    transition: left var(--basic-transition), width var(--basic-transition);
    z-index: 1000;
}

body.sidebar-collapsed .navbar {
    left: var(--sidebar-collapsed-width);
    width: calc(var(--full-width) - var(--sidebar-collapsed-width));
}

/* Navbar left section */
.navbar .left-section {
    display: flex;
    align-items: center;
}

.navbar .left-section i,
.navbar .left-section .search-input {
    margin-right: 8px; /* Add margin to separate the icon and text */
}

/* Navbar right section */
.navbar .right-section {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 30px;
}
.placeholder-icon {
    color: var(--text-color);
    pointer-events: none;
}

/* Bell icon styles */
.bell-icon {
    width: 14px;
    height: 17px;
    border: none;
    opacity: 1;
    margin-right: 10px;
}

/* User name styles */
.user-name {
    height: 17px;
    font: var(--font-medium);
    letter-spacing: 0px;
    color: var(--black);
    text-align: left;
    opacity: 1;
    margin-right: 10px;
}

/* Profile icon styles */
.profile-icon {
    border-radius: 50%;
    object-fit: cover;
    margin-right: var(--spacing-large);
    width: 25px;
    height: 25px;
}

.avatar-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    filter: invert(74%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(87%) contrast(87%);
}

/* Page Container */
.page-container {
    margin-top: calc(var(--navbar-height) + var(--spacing-large)) !important;
    width: 100%!important;
    padding-right: 0 !important; /* Remove any right padding */
}

/* White Container */
.white-container {
    font-size: var(--font-size-base);
    flex: 1 1 calc(48% - var(--spacing)); /* Fit two containers per row */
    padding: 24px;
    background: var(--white);
    border-radius: 10px;
    opacity: 1;
    box-sizing: border-box;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.white-container:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.white-container h3 {
    margin: 0 0 16px 0;
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 1;
    position: relative;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
}

.white-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.white-container:hover h3::after {
    width: 60px;
}

.white-container h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Add subtle dividers between content sections */
.white-container .section-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin: 16px 0;
}


/* AI Chatbot Container */
.right-container-chat {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: var(--full-height);
    background: var(--primary-color);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
    transition: width var(--basic-transition);
    z-index: 1000;
}

.right-container-chat.expanded {
    width: var(--chat-expanded-width);
}

.right-container-chat .content {
    padding: var(--spacing-large);
    font-size: 14px; 
}

.right-container-chat .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--black); 
    border-bottom: solid 1px var(--secondary-color);
    font-size: 0.6em;
}

.right-container-chat .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--white);
    padding-top: 0;
    font-size: 4em;
    margin-top: 0;
    margin-right: 0;
}

.right-container-chat h3 {
    font-size: 1.6em;
    margin-top: 0;
    color: var(--white);
    padding: 12px;
}

.right-container-chat p {
    margin-top: 10px;
}

/* Adjust main content when right-container-chat is expanded */
body.right-container-chat-expanded .main-content {
    margin-right: var(--chat-expanded-width);
    transition: margin-right var(--basic-transition);
}

/* Adjust navbar when right-container-chat is expanded */
body.right-container-chat-expanded .navbar {
    width: calc(var(--full-width) - var(--sidebar-width) - var(--chat-expanded-width));
    transition: width var(--basic-transition);
}

/* Adjust sidebar when right-container-chat is expanded */
body.right-container-chat-expanded .sidebar {
    left: 0;
    transition: left var(--basic-transition);
}

/* End Containers */

/* Page content styles */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(var(--full-width) - var(--sidebar-width));
    transition: margin-left var(--basic-transition), width var(--basic-transition);
    background-color: var(--background-gray);
}
body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(var(--full-width) - var(--sidebar-collapsed-width));
}


/* End Page content styles */

/* Standard Page Elements */

/* ==========================================================================
   Search Components - Used in company search pages, property search, etc.
   ========================================================================== */
.search-placeholder {
    background-color: var(--light-gray);
    padding: 10px;
    border-radius: 8px;

}


.search-container {
    display: flex;
    align-items: center;
    width: var(--full-width);
}

.search-icon {
    color: var(--medium-gray);
    margin-right: 10px;
}

.search-input:focus {
    background-color: var(--light-gray) !important;
    box-shadow: none !important;
    outline: none !important; 
}

/* Search input styles */
.search-input {
    border: none;
    outline: none;
    box-shadow: none;
    font: var(--font-medium);
    width: 450px;
    padding-right: 40px;
    font-size: 0.8em;
    background-color: transparent;
    color: #212529 !important;
    flex-grow: 1;
    transition: background-color var(--basic-transition);
}

.search-button {
    padding-left: var(--spacing-large);
    padding-right: var(--spacing-large);
}

.search-button:hover {
    transform: scale(1);
}

.styled-heading {
    font: var(--font-heading);
    letter-spacing: -1.1px;
    color: var(--black);
    opacity: 1;
    text-align: left;
}

.search-filter-buttons {
    gap: 10px;
    padding: 4px 0 0 0;
    opacity: 1;
}

.charge-status-container {
    display: flex;
    align-items: center;
    width: auto;
    margin-right: 40px;
}

.charge-status-label {
    white-space: nowrap;
    margin-left: var(--spacing-large);
    letter-spacing: 0;
    color: var(--medium-gray);
    font: var(--font-small);
    line-height: 15px;
    font-size: var(--font-size-text);
    padding-left: 10px;
    padding-right: 10px;
    display: inline-block
}

.charge-status-label:hover {
    color: var(--hover-dark);
}

.toggle-buttons {
    height: var(--full-height);
    display: flex;
}

.ml-3 {
    margin-left: 10px;
}

.fixed-size {
    width: 128px;
    height: 28px;
}

/* filter controls */
.filter-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom:var(--spacing-large);
}

.filter-container .dropdown {
    margin-right: 10px;
}

.filter-container .btn-group {
    margin-right: 10px;
}

.filter-container .btn {
    width: auto;
    height: 28px;
    padding: 5px 10px;
    margin-right: 5px;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    background-color: #f8f9fa;
    font-size: 10px;
    color: var(--medium-gray);
    letter-spacing: 0px;
    text-align: center;
}

.filter-container .btn:hover{
    background-color:#F0F0F0 !important;
    color: #747474 !important;
    border: 1px solid #E2E2E2 !important;
}

/* active */
.filter-container .btn.active {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    border: 1px solid var(--primary-color) !important;
}


.form-label {
    color: var(--black);
    letter-spacing: 0px;
    font-size: 0.75em;
    margin-right: 5px; 
    align-items: center;
    margin-top: 8px;
}

.filter-item {
    display: flex;
    align-items: center;
    margin-right:var(--spacing-large);
}

/* ==========================================================================
   Advanced Filters Toggle - Shared across pages with 5+ filters
   ========================================================================== */
.advanced-filter-btn {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--medium-gray);
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.85em;
    cursor: pointer;
}

.advanced-filter-btn:hover {
    color: var(--white);
    border-color: var(--gold-color);
    transform: translateY(-1px);
}

.advanced-filter-btn.active {
    background-color: var(--gold-color);
    color: var(--white);
    border-color: var(--gold-color);
}

.advanced-filters-row {
    width: var(--full-width);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filters-inline-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    justify-content: flex-start;
}

.inline-filter-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 140px;
}

.filter-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.range-input {
    width: 65px !important;
    height: 32px !important;
    padding: 4px 6px !important;
    font-size: 0.75em !important;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
}

.range-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(28, 45, 77, 0.25);
}

.range-separator {
    font-size: 0.8em;
    color: var(--medium-gray);
    font-weight: 500;
}

.advanced-filter-btn.active .chevron-icon {
    transform: rotate(180deg);
}

.epc-ratings-inline {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.epc-ratings-inline .epc-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.epc-ratings-inline .epc-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Advanced filters responsive */
@media (max-width: 1400px) {
    .filters-inline-wrapper { gap: 15px; }
    .inline-filter-item { min-width: 120px; max-width: 180px; }
}

@media (max-width: 1200px) {
    .filters-inline-wrapper { gap: 12px; }
    .inline-filter-item { min-width: 100px; max-width: 150px; }
    .range-input { width: 55px !important; }
}

@media (max-width: 992px) {
    .filters-inline-wrapper { flex-direction: column; gap: 15px; }
    .inline-filter-item {
        min-width: auto;
        max-width: none;
        width: var(--full-width);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .filter-label { margin-bottom: 0; margin-right: 10px; }
    .range-inputs { flex-shrink: 0; }
    .epc-ratings-inline { flex-shrink: 0; }
}

.advanced-filters-row[style*="display: none"] {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 1; transform: translateY(0); max-height: 200px; }
    to { opacity: 0; transform: translateY(-10px); max-height: 0; }
}

/* Used for search/filter inputs on multiple pages */
.search-filter-input {
    width: 129px;
    height: 30px;
    background-color: var(--light-gray);
    color: var(--medium-gray);
    letter-spacing: 0px;
    font-size: 0.75em;
    border: 1px solid var(--white);
    border-radius: 35px;
    margin-right: 10px;
    padding:var(--spacing-medium);
}


/* all dropdowns  */
.select-dropdown {
    padding: 5px 10px;
    width: 250px;
    font-size: 0.8em;
    color: var(--medium-gray);
    background-color: var(--light-gray);
    border: none;
    border-radius: 35px;
    text-align: left;
    transition: background-color var(--basic-transition), color var(--basic-transition);
}

.option-dropdown {
    font-size: 0.8em;
}

/* Icons */
.icons {
    display: flex;
    gap: 10px;
}

.icon {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.icon:hover {
    transform: scale(1.1);
}
/* 
/* ==========================================================================
   Table Styles - Used across all data tables in the application
   ========================================================================== */

/* Base table wrapper for all pages */
.table-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    --table-min-width: 980px;
}

.table-wrapper--compact {
    --table-min-width: 840px;
}

.table-wrapper--standard {
    --table-min-width: 980px;
}

.table-wrapper--wide {
    --table-min-width: 1200px;
}

.table-wrapper--xwide {
    --table-min-width: 1500px;
}

/* For non-list pages, apply the original height constraint */
body:not(.list-page) .table-wrapper {
    max-height: 990px;
    overflow-y: auto;
}

/* Sticky headers for ALL pages */
.table-wrapper thead tr {
    position: sticky;
    top: 0;
    background-color: #f9f9f9;
    z-index: 1;
}

/* GOLD BORDER for ALL pages - this stays consistent */
.table-wrapper thead tr::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--primary-color);
    z-index: 2;
}

.custom-table {
    width: 100%;
    min-width: var(--table-min-width, 980px);
    border-spacing: 0;
    border-collapse: collapse;
    table-layout: auto;
    word-wrap: break-word;
}

.custom-table th {
    background-color:transparent !important;
}


.custom-table th,
.custom-table td {
    padding: 8px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--font-size-text);
    white-space: normal; /* or nowrap if you want no wrapping */
}

.custom-table tr {
    border-bottom: 1px solid var(--table-border);
}

.custom-table tr:hover {
    background-color: var(--table-row-hover);
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

.custom-table th a:hover {
    color: var(--gold-color) !important;
}

/* Ensure links styled as badges use the badge color */
.custom-table tr a.badge,
.custom-table tr .badge a {
    color: var(--primary-color);
    font-size: var(--font-size-text);
}


/* anchor tags hover */
.custom-table tr a.badge:hover,
.custom-table tr .badge a:hover {
    color: var(--white) !important;
}
.custom-table tr a,
.custom-table th a {
    font-size: var(--font-size-text);

}

.table-cell-ellipsis {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.label-text {
    font-size: var(--font-size-text);
}

/* featured in company detail page */
a {
    text-decoration: none;
    letter-spacing: 0px;
    color: var(--primary-color);
    text-align: left;
    opacity: 1;
}

.sic-badge {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 10px;
    padding: 4px 8px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.sic-badge:hover {
    color: var(--white);
    background-color:  var(--gold-color);
}

/* Default Button with RooHover */
.badge {
    border-radius: 10px;
    padding: 4px 8px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--primary-color)
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.badge-tab {
    color: var(--white);
    background-color: var(--primary-color);

}

.badge:hover {
    background-color: var(--gold-color);
    color: var(--white);
    transform: scale(1);
}

.badge-success,
.badge-danger,
.badge-warning {
    border-radius: 10px;
    padding: 4px 8px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success {
    background-color: var(--badge-success-bg);
    color: var(--badge-success-text);

}
.badge-danger {
    background-color: var(--badge-danger-bg);
    color: var(--badge-danger-text);
}

.badge-warning {
    background-color: var(--badge-warning-bg);
    color: var(--badge-warning-text);
}

span.badge.bg-secondary,
span.badge.bg-secondary:hover,
span.badge.bg-secondary:focus {
    color: var(--pill-grey-dark) !important;
    background-color: var(--pill-grey-light) !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: default !important;
}

/* Flag Icon */
.flag-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

/* Icon Heading Button */
.icon-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing);
}

.icon-heading-buttons {
    display: flex;
    gap: 10px;
}


/* Info Boxes Section - Update */
.info-section {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--spacing);
}

.info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80px;
    width: var(--full-width);
    max-width: 450px;
    padding: var(--spacing);
    border-radius: 8px;
    border: none;
    opacity: 1;
    box-sizing: border-box;
    background-color: var(--white);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.info-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--full-width);
    height: 3px;
    background-color: var(--primary-color);
    opacity: 0.8;
}

.info-container:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.info-container h2, 
.info-container p {
    margin: 0;
    text-align: center;
}

.info-container h2 {
    font-size: var(--font-size-subheading);
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.info-container:hover h2 {
    color: var(--primary-color);
}

.info-container p {
    font-size: 1.3em;
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/* === Lender/Company Detail Page Tabs & Scroll Styles === */
    .scrollable-tab-content {
        overflow-y: auto;
        height: calc(var(--viewport-height) - 380px); /* Adjust height as needed */
        -ms-overflow-style: none;  /* Internet Explorer 10+ */
    }

    .tabs-container.scrolled {
        border-bottom: solid 2px var(--gold-color);
    }


/* ========================================================================== 
   Icon hover effects & enhancements 
   ========================================================================== */
.icon-margin-right {
    margin-right:  var(--spacing-large);
}

.icon[data-action]:not(:disabled) {
    transition: color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
    outline: none;
}

.icon[data-action="delete"]:not(:disabled):hover,
.icon[data-action="delete"]:not(:disabled):focus-visible {
    color: var(--badge-danger-text);
    transform: scale(1.1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(179,0,0,0.08);
}

.icon[data-action="save"]:not(:disabled):hover,
.icon[data-action="save"]:not(:disabled):focus-visible {
    color: var(--link-blue);
    transform: scale(1.1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(72,115,191,0.08);
}

.icon[data-action="export"]:not(:disabled):hover,
.icon[data-action="export"]:not(:disabled):focus-visible {
    color: var(--badge-success-text);
    transform: scale(1.1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(26,94,30,0.08);
}

/* Accessible focus ring for keyboard users */
.icon[data-action]:not(:disabled):focus-visible {
    outline: 2px solid var(--gold-color);
    outline-offset: 2px;
}

/* Tooltip on hover/focus */
.icon[data-action]:not(:disabled):hover::after,
.icon[data-action]:not(:disabled):focus-visible::after {
    content: attr(data-action);
    position: absolute;
    left: 50%;
    top: 120%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    opacity: 0.95;
}

/* ==========================================================================
   Sticky Footer - Always at Bottom, Never Overlapped
   ========================================================================== */

.footer {
    height: var(--footer-height);
    line-height: 50px;
    border-top: 1px solid #e2e2e2;
    font-size: 0.6em !important;
    margin-left: var(--sidebar-width);
    width: calc(var(--full-width) - var(--sidebar-width));
    
    /* Ensure footer is above content if content overflows */
    z-index: 100;
}

body.sidebar-collapsed .footer {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(var(--full-width) - var(--sidebar-collapsed-width));
    transition: margin-left var(--basic-transition), width var(--basic-transition);
}

/* Flat Property Cards - Single Line Design */
.property-card-flat {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--border-extra-light);
    overflow: hidden;
    height: 70px;
}

.property-card-flat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--gold-color);
}

.property-card-link-flat {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.property-card-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    height: 100%;
    gap: 12px;
}

/* EPC Section - Left */
.property-epc-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.property-epc-section .epc-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 28px;
    text-align: center;
}

/* Info Section - Middle (grows to fill space) */
.property-info-section {
    flex-grow: 1;
    min-width: 0;
}

.property-address-flat {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-details-flat {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.property-type-flat {
    background-color: var(--secondary-color-light);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.7rem;
}

.property-area-flat {
    font-weight: 500;
    font-size: 1.2em;
}

/* Value Section - Right */
.property-value-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.property-value-flat {
    color: var(--primary-color);
    font-size: 1rem;
    text-align: right;
    min-width: 80px;
}



.property-card-flat.compact {
    height: 60px;
}

.property-card-flat.compact .property-card-content {
    padding: 8px 12px;
    gap: 8px;
}

.property-card-flat.compact .property-address-flat {
    font-size: 0.8rem;
}

.property-card-flat.compact .property-details-flat {
    font-size: 0.7rem;
}


/* ==========================================================================
   Contacts Summary Column Styling
   ========================================================================== */

.contacts-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.contact-metric {
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.contact-metric:hover {
    transform: translateY(-1px);
    opacity: 0.8;
}

.contact-metric i {
    color: var(--primary-color);
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.contact-metric span {
    font-size: 0.85em;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1;
}

.contact-metric:hover i {
    color: var(--gold-color);
}

/* Table cell specific styling for contacts */
.custom-table td .contacts-summary {
    justify-content: flex-start;
}