/* ============================================================
   CARLSBERG FOUNDATION — Portal Stylesheet
   Inspired by carlsbergfondet.dk
   ============================================================ */

/* ----- Font Faces ----- */

@font-face {
    font-family: 'CarlsbergDisplay';
    src: url(/carlsbergfontdisplay.otf);
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CarlsbergBold';
    src: url(/carlsbergfontbold.otf);
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'LibreFranklin';
    src: url(/LibreFranklin-Light.woff2) format('woff2');
    font-weight: 300;
    font-style: normal;
}

/* ----- CSS Custom Properties ----- */

:root {
    --cf-green-deep: #183428;
    --cf-green-dark: #1A2F29;
    --cf-green-accent: #00bf4d;
    --cf-green-hover: #009e40;
    --cf-green-light: #f0f7f2;
    --cf-green-muted: #2E554A;
    --cf-white: #ffffff;
    --cf-off-white: #FAFBFA;
    --cf-grey-50: #f8f8f8;
    --cf-grey-100: #f2f2f2;
    --cf-grey-200: #e5e5e5;
    --cf-grey-300: #d4d4d4;
    --cf-grey-400: #a3a3a3;
    --cf-grey-500: #737373;
    --cf-grey-600: #525252;
    --cf-grey-800: #262626;
    --cf-text: #000000;
    --cf-text-secondary: #000000;
    --cf-radius: 0;
    --cf-radius-sm: 2px;
    --cf-radius-lg: 0;
    --cf-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --cf-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --cf-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --cf-transition: 0.25s ease;
    --cf-font-body: 'LibreFranklin', 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cf-font-display: 'CarlsbergDisplay', 'CarlsbergBold', Georgia, serif;
}

/* ----- Base ----- */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--cf-font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: #000000;
    background-color: var(--cf-white);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    flex: 1 0 auto;
    max-width: 1200px;
}

/* ----- Typography ----- */

h1, h5, h6 {
    font-family: var(--cf-font-display);
    color: #000000;
    line-height: 1.2;
    margin-top: 0;
    font-weight: 400;
}

h2, h3, h4 {
    font-family: var(--cf-font-body);
    color: #000000;
    line-height: 1.2;
    margin-top: 0;
    font-weight: 400;
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.2rem;
}

h6 {
    font-family: var(--cf-font-display);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #000000;
}

p, a.attachment-file {
    font-family: var(--cf-font-body);
    font-size: 16px;
    line-height: 1.7;
    color: #000000;
}

a {
    color: var(--cf-green-deep);
    text-decoration: none;
    transition: color var(--cf-transition);
    border-bottom: 1px solid transparent;
}

a:hover, a:focus {
    color: var(--cf-green-accent);
    border-bottom-color: var(--cf-green-accent);
}

.actionsLabel {
    color: #000000;
}

label {
    color: #000000;
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.above, .below {
    font-style: italic;
    color: var(--cf-grey-500);
    font-size: 13px;
}

/* ----- Page Header ----- */

.page-header {
    border-bottom: none;
}

/* ----- CRM Form Fields ----- */

.crmEntityFormView .cell {
    padding: 20px 0;
}

.crmEntityFormView .cell .field-label {
    font-family: var(--cf-font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--cf-green-deep);
}

/* ============================================================
   NEW HEADER — .cf-header
   (white background, clean layout like carlsbergfondet.dk)
   ============================================================ */

.cf-header {
    background-color: var(--cf-white);
    border-bottom: 1px solid var(--cf-grey-200);
    position: relative;
    z-index: 1000;
}

.cf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding-top: 0;
    padding-bottom: 0;
    gap: 0;
}

/* Fix Bootstrap container pseudo-elements acting as flex items */
.cf-header-inner::before,
.cf-header-inner::after {
    display: none !important;
    content: none !important;
}

/* SVG logo inside header-logo */
.cf-header-svg-logo {
    height: 48px;
    width: auto;
    color: var(--cf-green-deep);
    display: block;
    margin-right: 16px;
}

.cf-header-logo {
    flex-shrink: 0;
}

/* Push navigation to the right */
.cf-header-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Last nav item flush to the right edge */
.cf-nav-list > .cf-nav-item:last-child > .cf-nav-link {
    padding-right: 0;
}

.cf-header .navbar-brand,
.cf-header-logo .navbar-brand {
    color: transparent !important;
    background: url("https://www.carlsbergfondet.dk/~/media/Carlsbergfondet/Static/Logo/MainLogo_en.png?h=42&w=600") no-repeat 0 center;
    background-size: contain;
    height: 40px;
    width: 280px;
    display: block;
    padding: 0;
    margin: 0;
}

.cf-header .navbar-brand p,
.cf-header-logo .navbar-brand p,
.cf-header-logo p {
    color: transparent;
    width: 280px;
    margin: 0;
    font-size: 0;
}

/* Mobile toggle */
.cf-header-toggle {
    background: transparent;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    position: relative;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Hide the built-in Bootstrap spans from DOM */
.cf-header-toggle span.cf-toggle-bar {
    display: none !important;
}

/* Create the 3-line burger menu with perfectly even lines via box-shadow */
.cf-header-toggle::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 1px;
    background-color: var(--cf-green-deep);
    box-shadow: 0 -8px 0 var(--cf-green-deep), 0 8px 0 var(--cf-green-deep);
    transition: background-color var(--cf-transition), box-shadow var(--cf-transition);
}

.cf-header-toggle:hover::after,
.cf-header-toggle:focus::after {
    background-color: var(--cf-green-accent);
    box-shadow: 0 -8px 0 var(--cf-green-accent), 0 8px 0 var(--cf-green-accent);
}

.cf-nav-main {
    display: flex;
    align-items: center;
}

.cf-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.cf-nav-item {
    position: relative;
}

.cf-nav-link {
    display: block;
    font-family: var(--cf-font-display);
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    padding: 24px 16px;
    letter-spacing: 0.02em;
    text-transform: none;
    border-bottom: 2px solid transparent;
    transition: color var(--cf-transition), border-color var(--cf-transition);
    text-decoration: none;
    white-space: nowrap;
}

.cf-nav-link:hover,
.cf-nav-link:focus {
    color: var(--cf-green-accent);
    border-bottom-color: var(--cf-green-accent);
    background-color: transparent;
    text-decoration: none;
}

.cf-nav-icon {
    font-size: 16px;
    padding: 24px 14px;
}

/* User avatar circle — hidden */
.cf-user-avatar {
    display: none;
}

.cf-username {
    font-size: 14px;
}

/* Login link styled as subtle button */
.cf-nav-login {
    background-color: var(--cf-green-deep);
    color: var(--cf-white) !important;
    padding: 8px 20px !important;
    margin: 16px 0 16px 8px;
    border-bottom: none !important;
    font-size: 13px !important;
    letter-spacing: 0.04em;
}

.cf-nav-login:hover,
.cf-nav-login:focus {
    background-color: var(--cf-green-accent);
    color: var(--cf-white) !important;
}

/* Dropdown menus */
.cf-dropdown {
    border: none;
    border-radius: 0;
    box-shadow: var(--cf-shadow-lg);
    padding: 8px 0;
    margin-top: 0;
    min-width: 200px;
}

.cf-dropdown li > a {
    font-family: var(--cf-font-body);
    font-size: 14px;
    color: var(--cf-green-deep);
    padding: 10px 20px !important;
    border: none !important;
    transition: background-color var(--cf-transition);
}

.cf-dropdown li > a:hover,
.cf-dropdown li > a:focus {
    background-color: var(--cf-green-light);
    color: var(--cf-green-deep);
    padding: 10px 20px !important;
    border: none !important;
    text-decoration: none !important;
}

/* ============================================================
   LEGACY NAVBAR (fallback for old header)
   ============================================================ */

.navbar {
    flex-shrink: 0;
}

.navbar-static-top.navbar-inverse {
    background-color: var(--cf-white);
    border: none;
    box-shadow: none;
    border-bottom: 1px solid var(--cf-grey-200);
}

#navbar {
    min-height: 52px;
}

.navbar-brand {
    color: transparent !important;
    background: url("https://www.carlsbergfondet.dk/~/media/Carlsbergfondet/Static/Logo/MainLogo_en.png?h=42&w=600") no-repeat 0 13px;
    background-size: contain;
}

.navbar-brand p {
    color: transparent;
    width: 300px;
}

.navbar-static-top.navbar .menu-bar > .navbar-nav > li > a {
    font-family: var(--cf-font-display);
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 20px 16px;
    transition: color var(--cf-transition), border-color var(--cf-transition);
    border-bottom: 2px solid transparent;
}

.navbar-static-top.navbar .menu-bar > .navbar-nav > li > a:hover,
.navbar-static-top.navbar .menu-bar > .navbar-nav > li > a:focus {
    color: var(--cf-green-accent) !important;
    border-bottom: 2px solid var(--cf-green-accent) !important;
    background-color: transparent;
}

.navbar-inverse .navbar-nav > li > a:hover {
    color: var(--cf-green-accent) !important;
    background-color: transparent;
    border-bottom: 2px solid var(--cf-green-accent) !important;
}

.nav > li.divider-vertical {
    display: none;
}

.navbar-inverse .navbar-toggle {
    border-color: var(--cf-grey-300);
}

.navbar-inverse .navbar-toggle .icon-bar {
    background-color: var(--cf-green-deep);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
    background: transparent;
    padding: 16px 0;
    margin-bottom: 32px;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.breadcrumb > li a,
.breadcrumb > li a:hover {
    color: var(--cf-green-deep);
    border-bottom: none;
}

.breadcrumb > li a:hover {
    color: var(--cf-green-accent);
}

.breadcrumb > .active {
    color: var(--cf-grey-500);
}

/* ============================================================
   CARDS — Grant Listings
   ============================================================ */

.cf-container {
    margin-top: 24px;
}

.cf-card-outer {
    padding: 0 12px;
    margin-bottom: 28px;
}

.cf-card-inner {
    padding: 32px 28px;
    border: none;
    border-radius: 0;
    min-height: 175px;
    background: var(--cf-off-white);
    transition: background-color var(--cf-transition);
    position: relative;
    border-left: 3px solid var(--cf-green-accent);
}

.cf-card-inner:hover {
    background-color: var(--cf-green-light);
}

@media (min-width: 992px) {
    .cf-card-inner {
        min-height: 240px;
    }
}

.cf-card-inner h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
    color: var(--cf-green-deep);
    letter-spacing: -0.01em;
}

.cf-card-inner p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cf-text-secondary);
}

.cf-card-inner p a {
    color: var(--cf-green-deep);
    border-bottom: 1px solid var(--cf-green-accent);
}

.cf-card-inner p a:hover {
    color: var(--cf-green-accent);
}

.cf-card-inner button,
.cf-card-inner .btn {
    margin-bottom: 20px;
    font-size: 14px;
    padding: 10px 28px;
}

@media (min-width: 768px) {
    .cf-card-inner button,
    .cf-card-inner .btn {
        bottom: 0;
        position: absolute;
    }
}

.cf-container-list {
    margin-left: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    font-family: var(--cf-font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 24px;
    border: 1px solid var(--cf-green-deep);
    border-radius: 0;
    box-shadow: none;
    letter-spacing: 0.02em;
    text-transform: none;
    transition: all var(--cf-transition);
    cursor: pointer;
}

.btn:focus {
    outline: 2px solid var(--cf-green-accent);
    outline-offset: 2px;
}

.btn-primary {
    color: var(--cf-white);
    background-color: var(--cf-green-deep);
    border-color: var(--cf-green-deep);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-primary:active:focus {
    color: var(--cf-white);
    background-color: var(--cf-green-accent);
    border-color: var(--cf-green-accent);
}

.btn-default {
    color: var(--cf-green-deep);
    background-color: transparent;
    border-color: var(--cf-green-deep);
}

.btn-default:hover,
.btn-default:active,
.btn-default:focus,
.btn-default:active:focus {
    color: var(--cf-white);
    background-color: var(--cf-green-deep);
    border-color: var(--cf-green-deep);
}

.btn-info {
    color: var(--cf-green-deep);
    background-color: transparent;
    border-color: var(--cf-green-deep);
}

.btn-info:hover {
    color: var(--cf-white);
    background-color: var(--cf-green-deep);
    border-color: var(--cf-green-deep);
}

.btn-xs, .btn-group-xs > .btn {
    padding: 2px 8px;
    font-size: 12px;
}

/* Disabled buttons */
.btn-default.disabled:hover, .btn-default.disabled:focus, .btn-default.disabled.focus,
.btn-default[disabled]:hover, .btn-default[disabled]:focus, .btn-default[disabled].focus,
fieldset[disabled] .btn-default:hover, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default.focus {
    background-color: var(--cf-grey-100);
    border-color: var(--cf-grey-300);
    color: var(--cf-grey-500);
}

.btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled.focus,
.btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled].focus,
fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary.focus {
    background-color: var(--cf-grey-300);
    border-color: var(--cf-grey-300);
}

/* Dropdown buttons */
.dropdown .btn {
    box-shadow: none;
}

.dropdown .btn:focus {
    outline-color: var(--cf-grey-400);
}

/* ============================================================
   FORMS
   ============================================================ */

.form-control {
    border: 1px solid var(--cf-grey-300);
    border-radius: 0;
    padding: 10px 14px;
    font-size: 16px;
    font-family: var(--cf-font-body);
    transition: border-color var(--cf-transition);
    color: var(--cf-text);
    background-color: var(--cf-white);
}

.form-control:focus {
    border-color: var(--cf-green-deep);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(24, 52, 40, 0.12);
}

.form-group input {
    accent-color: var(--cf-green-accent);
}

.facet-view input {
    accent-color: var(--cf-green-accent);
}

/* ============================================================
   ALERTS
   ============================================================ */

.alert-danger {
    background-color: var(--cf-off-white);
    border: none;
    border-left: 3px solid #dc2626;
    border-radius: 0;
    color: var(--cf-text);
    padding: 20px 24px;
}

.validation-summary a {
    color: var(--cf-green-deep) !important;
    border-bottom: 1px solid var(--cf-green-accent);
}

.alert-warning {
    background-color: var(--cf-off-white);
    border: none;
        border-radius: 0;
    color: var(--cf-text);
    padding: 20px 24px;
}

.alert-info {
    background-color: var(--cf-green-light);
    border: none;
    border-left: 3px solid var(--cf-green-accent);
    border-radius: 0;
    color: var(--cf-text);
    padding: 20px 24px;
}

/* ============================================================
   PROGRESS & STEP INDICATORS
   ============================================================ */

/* Hide default checkmark icon */
.progress .glyphicon {
    display: none !important;
}

.progress {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 48px;
    padding: 0;
    border: none;
    height: auto;
}

.progress.list-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    justify-content: space-between;
}

/* The connecting line */
.progress .list-group-item::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--cf-grey-200);
    z-index: 1;
}

.progress .list-group-item:last-child::after {
    display: none;
}

/* Green connecting line for completed steps */
.progress .list-group-item-success::after {
    background-color: var(--cf-green-deep);
}

.progress .list-group-item.incomplete,
.progress .list-group-item-success,
.progress .list-group-item.active,
.progress .list-group-item.active:hover,
.progress .list-group-item.active:focus {
    line-height: 1.4em;
    min-height: auto;
    z-index: 2;
    color: var(--cf-text);
    background-color: transparent !important;
    border: none !important;
}

.progress .list-group-item {
    color: var(--cf-grey-500);
    border: none !important;
    border-radius: 0;
    transition: color var(--cf-transition);
    font-size: 13px;
    font-family: var(--cf-font-body);
    font-weight: 500;
    letter-spacing: 0.01em;
    background: transparent !important;
    padding: 36px 12px 0;
    flex: 1;
    text-align: center;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* The step circle */
.progress .list-group-item::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--cf-white);
    border: 2px solid var(--cf-grey-300);
    z-index: 3;
    transition: all var(--cf-transition);
}

.progress .list-group-item.active {
    color: var(--cf-green-deep);
    font-weight: 700;
}
.progress .list-group-item.active::before {
    border-color: var(--cf-green-deep);
    background-color: var(--cf-green-deep);
    box-shadow: 0 0 0 4px var(--cf-green-light);
}

.progress .list-group-item.incomplete {
    color: var(--cf-grey-400);
}

.progress .list-group-item-success {
    color: var(--cf-green-deep) !important;
}
.progress .list-group-item-success::before {
    border-color: var(--cf-green-deep);
    background-color: var(--cf-green-deep);
}

#WebFormPanel {
    clear: both;
    margin-top: 8px;
}

/* DESKTOP progress steps (removed old border logic) */
@media only screen and (min-width: 765px) {
    .tab-column td { padding-left: 20px; }

    .section-landing-search form.form-search {
        max-width: 70%;
        margin: auto;
    }
}

/* ============================================================
   SEARCH
   ============================================================ */

.section-landing-search {
    min-height: auto;
    background-image: none;
}

.section-landing-search h1 div {
    color: var(--cf-text);
    font-size: 2.25rem;
    min-height: 50px;
}

.section-landing-search .page_section .row {
    padding-top: 32px;
    padding-bottom: 80px;
}

.section-landing-search #search-filter {
    padding-top: 9px;
    margin-top: 0 !important;
}

.section-landing-search .btn-select {
    padding-left: 0 !important;
}

.section-landing-search .form-control {
    margin-left: 10px;
}

.section-landing-search .input-group-btn {
    padding-left: 20px;
}

.section-landing-search .btn-default {
    padding-top: 7px;
    margin-top: -11px !important;
}

.section-landing-search ul {
    padding-inline-start: 0;
}

/* ============================================================
   TABLES & DATA GRID
   ============================================================ */

table.section {
    margin-top: 24px;
}

table.section[role="presentation"] {
    width: 100%;
}

table.section[role="presentation"] td.cell {
    padding: 8px 12px 8px 0;
    vertical-align: top;
}

table.section[role="presentation"] td.zero-cell {
    display: none;
}

.table > thead > tr > th {
    font-family: var(--cf-font-body);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cf-green-deep);
    border-bottom: 2px solid var(--cf-green-deep);
    padding: 12px 10px;
    white-space: nowrap;
}

.table > tbody > tr > td {
    font-size: 14px;
    vertical-align: middle;
    padding: 12px 10px;
    border-top: 1px solid var(--cf-grey-200);
    color: var(--cf-text);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--cf-off-white);
}

.table > tbody > tr:hover {
    background-color: var(--cf-green-light);
}

.sort-enabled a {
    color: var(--cf-green-deep);
    text-decoration: none;
    border-bottom: none;
}

.sort-enabled a:hover {
    color: var(--cf-green-accent);
    border-bottom: none;
}

/* ============================================================
   ENTITY GRID / LIST
   ============================================================ */

.entity-grid.entitylist {
    margin-bottom: 32px;
}

.entitylist .entity-grid-header {
    margin-bottom: 16px;
}

.view-grid.table-responsive {
    border: none;
    margin-bottom: 16px;
}

.view-empty.message,
.view-error.message,
.view-access-denied.message {
    padding: 40px 24px;
    text-align: center;
    color: var(--cf-grey-500);
    font-size: 14px;
    background: var(--cf-off-white);
    border-left: 3px solid var(--cf-grey-300);
}

.view-loading.message {
    padding: 40px 24px;
    text-align: center;
    color: var(--cf-grey-500);
}

.view-pagination {
    text-align: center;
    padding: 16px 0;
}

.view-pagination .pagination > li > a,
.view-pagination .pagination > li > span {
    color: var(--cf-green-deep);
    border: 1px solid var(--cf-grey-300);
    border-radius: 0;
    padding: 8px 14px;
    font-size: 14px;
    transition: all var(--cf-transition);
}

.view-pagination .pagination > li > a:hover {
    background-color: var(--cf-green-light);
    border-color: var(--cf-green-deep);
    color: var(--cf-green-deep);
}

.view-pagination .pagination > .active > a,
.view-pagination .pagination > .active > span {
    background-color: var(--cf-green-deep);
    border-color: var(--cf-green-deep);
    color: var(--cf-white);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.well.profile-info {
    background-color: var(--cf-off-white);
    border: none;
    border-radius: 0;
    border-left: 3px solid var(--cf-green-accent);
    padding: 24px;
    text-align: center;
    box-shadow: none;
}

.well.profile-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    opacity: 0.9;
}

.userFullName {
    font-family: var(--cf-font-display);
    font-size: 1.1rem;
    color: var(--cf-green-deep);
    margin-top: 4px;
}

/* Profile sidebar weblinks */
.weblinks.list-group {
    margin-bottom: 16px;
}

.weblinks .weblink.list-group-item {
    background: transparent;
    border: none !important;
    border-radius: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-family: var(--cf-font-body);
    color: var(--cf-green-deep);
    transition: background-color var(--cf-transition), color var(--cf-transition);
    border-left: 2px solid transparent !important;
}

.weblinks .weblink.list-group-item:hover,
.weblinks .weblink.list-group-item:focus {
    background-color: var(--cf-green-light);
    color: var(--cf-green-deep);
    border-left: 2px solid var(--cf-green-accent) !important;
}

/* Profile sidebar panel */
.panel.panel-default.nav-profile {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 20px;
}

.nav-profile .panel-heading {
    background-color: var(--cf-off-white);
    border: none;
    border-radius: 0;
    padding: 14px 16px;
}

.nav-profile .panel-title {
    font-family: var(--cf-font-body);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--cf-green-deep);
}

.nav-profile .panel-title .fa {
    margin-right: 6px;
    color: var(--cf-green-muted);
}

.list-group.nav-profile .list-group-item {
    background: transparent;
    border: none !important;
    border-radius: 0;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--cf-green-deep);
    transition: background-color var(--cf-transition);
    border-bottom: none !important;
}

.list-group.nav-profile .list-group-item:hover {
    background-color: var(--cf-green-light);
}

.profile-alert {
    color: #d97706;
    font-size: 14px;
}

.profile-page-heading {
    font-family: var(--cf-font-body);
    font-size: 1.3rem;
    color: var(--cf-green-deep);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cf-grey-200);
}

/* Profile form layout */
.crmEntityFormView table.section[role="presentation"] {
    border-collapse: separate;
    border-spacing: 0 4px;
}

.crmEntityFormView .cell.form-control-cell {
    padding: 8px 12px 8px 0;
}

.crmEntityFormView .info.required .field-label::after {
    content: " *";
    color: #dc2626;
    font-weight: 400;
}

.crmEntityFormView .control input.form-control,
.crmEntityFormView .control select.form-control,
.crmEntityFormView .control textarea.form-control {
    border: 1px solid var(--cf-grey-300);
    border-radius: 0;
    padding: 8px 14px;
    font-size: 15px;
    font-family: var(--cf-font-body);
    color: var(--cf-text);
    background: var(--cf-white);
    transition: border-color var(--cf-transition);
}

.crmEntityFormView .control input.form-control:focus,
.crmEntityFormView .control select.form-control:focus,
.crmEntityFormView .control textarea.form-control:focus {
    border-color: var(--cf-green-deep);
    box-shadow: 0 0 0 2px rgba(24, 52, 40, 0.12);
}

.crmEntityFormView .control input.form-control[readonly] {
    background-color: var(--cf-grey-50);
    color: var(--cf-grey-600);
    cursor: default;
}

.crmEntityFormView .control textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.crmEntityFormView .control select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23183428' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--cf-grey-200);
}

/*.actions .entity-action-button {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}*/

.actions .submit-btn,
.actions .button.next,
.actions .button.previous {
    min-width: 160px;
}

/* ============================================================
   EDIT FORM: TAB & FIELDSET LAYOUT
   ============================================================ */

h2.tab-title {
    display: none !important;
}

h2.tab-title:first-child,
.entity-form > h2.tab-title:first-of-type,
.crmEntityFormView h2.tab-title:first-of-type {
    margin-top: 0;
}

#EntityFormControl .tab.clearfix {
    display: none !important;
}

.tab.clearfix {
    margin-bottom: 36px;
}

.tab-column {
    width: 100%;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 32px;
}

legend.section-title {
    border: none;
    padding: 0;
    margin: 0 0 16px;
    width: 100%;
}

legend.section-title h3 {
    font-family: var(--cf-font-body);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cf-green-deep);
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--cf-grey-200);
}

/* ============================================================
   EDIT FORM: BOOLEAN RADIO BUTTONS
   ============================================================ */

.boolean-radio-cell {
    padding: 8px 12px 8px 0;
}

.boolean-radio {
    display: inline-flex;
    gap: 16px;
    align-items: center;
    background-color: var(--cf-off-white);
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid var(--cf-grey-200);
}

.boolean-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--cf-grey-300);
    border-radius: 50%;
    margin: 0 6px 0 0;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    transition: border-color var(--cf-transition);
}

.boolean-radio input[type="radio"]:checked {
    border-color: var(--cf-green-accent);
}

.boolean-radio input[type="radio"]:checked::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: var(--cf-green-accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.boolean-radio input[type="radio"]:focus {
    outline: none;
    border-color: var(--cf-green-deep);
    box-shadow: 0 0 0 2px rgba(24, 52, 40, 0.12);
}

.boolean-radio label {
    font-weight: 400;
    font-size: 15px;
    color: var(--cf-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* ============================================================
   EDIT FORM: DATETIME PICKER
   ============================================================ */

.datetimepicker.input-group,
.input-append.input-group.datetimepicker {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.datetimepicker .form-control {
    border-radius: 0 !important;
    border-right: none !important;
    flex: 1;
    height: auto;
    min-height: 44px;
    width: 100%;
    box-shadow: none;
}

.datetimepicker {
    width: 100%;
    margin-bottom: 0;
}

/* Datetime cell: ensure full width */
.cell.datetime {
    width: 100% !important;
}

.cell.datetime .control {
    width: 100%;
}

.cell.datetime .input-append.input-group.datetimepicker {
    width: 100%;
}

.input-group .input-group-addon {
    background: var(--cf-off-white);
    border: 1px solid var(--cf-grey-300);
    border-radius: 0;
    padding: 10px 14px;
    min-height: 44px;
    color: var(--cf-green-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--cf-transition);
    cursor: pointer;
}

.datetimepicker .input-group-addon:hover,
.input-group .input-group-addon:hover {
    background: var(--cf-grey-100);
}

.icon-calendar.fa.fa-calendar,
.iconBorder {
    color: var(--cf-green-deep);
    font-size: 16px;
}

/* Datepicker description text */
.datetimepicker + .description,
.cell.datetime .description {
    margin-top: 6px;
}

/* ============================================================
   EDIT FORM: LOOKUP FIELDS (input + search/clear buttons)
   ============================================================ */

.cell.lookup .input-group {
    display: flex;
    align-items: stretch;
}

.cell.lookup .input-group .form-control {
    flex: 1;
    border-radius: 0 !important;
}

.cell.lookup .input-group .input-group-btn {
    display: flex;
    gap: 0;
}

.cell.lookup .input-group .input-group-btn .btn {
    border-radius: 0;
    border: 1px solid var(--cf-grey-300);
    border-left: none;
    background: var(--cf-off-white);
    color: var(--cf-green-deep);
    padding: 8px 12px;
    min-width: auto;
    transition: background var(--cf-transition);
}

.cell.lookup .input-group .input-group-btn .btn:hover {
    background: var(--cf-grey-100);
    color: var(--cf-green-deep);
}

.cell.lookup .input-group .input-group-btn .btn .fa {
    font-size: 14px;
}

/* Lookup modal */
.modal-lookup .modal-dialog {
    max-width: 800px;
}

.lookup-modal .entity-lookup .entity-grid .view-grid {
    margin-top: 12px;
}

/* ============================================================
   EDIT FORM: PICKLIST / SELECT
   ============================================================ */

.picklist-cell .form-control.picklist {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23183428' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    border-radius: 0;
}

/* ============================================================
   EDIT FORM: VALIDATORS
   ============================================================ */

.validators span {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
}

.validation-summary {
    margin-bottom: 24px;
}

.validation-summary .validation-header {
    font-family: var(--cf-font-body);
    font-size: 1rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 8px;
}

.validation-summary .validation-header .fa {
    margin-right: 6px;
}

.validation-summary a {
    color: #dc2626;
    text-decoration: underline;
}

.validation-summary a:hover {
    color: #b91c1c;
}

/* ============================================================
   EDIT FORM: DESCRIPTION / HELP TEXT
   ============================================================ */

.crmEntityFormView .description {
    font-size: 13px;
    color: var(--cf-grey-600);
    line-height: 1.4;
    margin-top: 4px;
}

.crmEntityFormView .description.above {
    margin-top: 0;
    margin-bottom: 6px;
}

/* ============================================================
   EDIT FORM: TEXT-MUTED DASH PLACEHOLDER
   ============================================================ */

.crmEntityFormView .control .text-muted {
    display: none;
}

/* ============================================================
   MODALS
   ============================================================ */

.modal-content {
    border-radius: 0;
    border: none;
    box-shadow: var(--cf-shadow-lg);
}

.modal-header {
    background-color: var(--cf-off-white);
    border-bottom: 1px solid var(--cf-grey-200);
    padding: 16px 24px;
    border-radius: 0;
}

.modal-title {
    font-family: var(--cf-font-display);
    font-size: 1.1rem;
    color: var(--cf-green-deep);
}

.modal-title .fa {
    margin-right: 8px;
    color: var(--cf-green-muted);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--cf-grey-200);
    padding: 16px 24px;
    background: transparent;
}

.modal .close {
    font-size: 20px;
    color: var(--cf-grey-500);
    opacity: 0.7;
    text-shadow: none;
}

.modal .close:hover {
    color: var(--cf-green-deep);
    opacity: 1;
}

.form-close {
    background: none;
    border: none;
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    color: var(--cf-grey-500);
}

.form-close:hover {
    color: var(--cf-green-deep);
}

/* Modal form layout */
.form-horizontal .form-group {
    margin-bottom: 16px;
}

.form-horizontal .control-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--cf-green-deep);
    text-align: left;
}

.form-loading {
    text-align: center;
    padding: 32px;
    color: var(--cf-grey-400);
}

/* ============================================================
   GET HELP / CTA SECTION  (hidden)
   ============================================================ */

#gethelp,
.section-diagonal-right {
    display: none !important;
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */

.dropdown-menu {
    border: 1px solid var(--cf-grey-200);
    border-radius: 0;
    box-shadow: var(--cf-shadow-lg);
    font-size: 14px;
    padding: 8px 0;
    margin-top: 0;
}

.dropdown-menu > li > a {
    font-family: var(--cf-font-body);
    color: var(--cf-green-deep);
    padding: 10px 20px !important;
    border: none !important;
    transition: background-color var(--cf-transition);
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: var(--cf-green-light);
    color: var(--cf-green-deep);
    padding: 10px 20px !important;
    border: none !important;
    text-decoration: none !important;
}

a.details-link {
    color: var(--cf-green-deep);
    border-bottom: none;
}

a.details-link:hover {
    color: var(--cf-green-accent);
    border-bottom: none;
}

/* ============================================================
   PANELS (generic)
   ============================================================ */

.panel {
    border-radius: 0;
    border: 1px solid var(--cf-grey-200);
    box-shadow: none;
}

.panel-heading {
    background-color: var(--cf-off-white);
    border-radius: 0;
    font-family: var(--cf-font-body);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.01em;
    color: var(--cf-green-deep);
}

.panel-default > .panel-heading {
    color: var(--cf-green-deep);
    background-color: var(--cf-off-white);
    border-color: var(--cf-grey-200);
}

/* ============================================================
   TIMELINE / NOTES
   ============================================================ */

.entity-timeline .note .attachment-outer-border {
    border: none;
    padding: 5px;
}

div.createdby.text-muted,
div.attachment-separator {
    display: none;
}

/* ============================================================
   LISTS / GRID ACTIONS
   ============================================================ */

.dropdown.action .btn {
    border: none;
    background: transparent;
    padding: 0;
    width: 32px;
    height: 32px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Hide the built-in downward chevron and SR text */
.dropdown.action .btn span,
.dropdown.action .btn .fa-chevron-circle-down {
    display: none !important;
}

/* Create the 3-line burger menu with perfectly even lines via box-shadow */
.dropdown.action .btn::after {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background-color: var(--cf-green-deep);
    box-shadow: 0 -6px 0 var(--cf-green-deep), 0 6px 0 var(--cf-green-deep);
    transition: background-color var(--cf-transition), box-shadow var(--cf-transition);
}

.dropdown.action .btn:hover::after,
.dropdown.action .btn:focus::after {
    background-color: var(--cf-green-accent);
    box-shadow: 0 -6px 0 var(--cf-green-accent), 0 6px 0 var(--cf-green-accent);
}

.grid-actions a.btn.action {
    margin-top: 5px;
    margin-bottom: 5px;
}

div.toolbar-actions {
    float: left !important;
}

/* ============================================================
   LOGIN / TABS
   ============================================================ */

.nav-tabs {
    border-bottom: 1px solid var(--cf-grey-200);
}

.nav-tabs a {
    color: var(--cf-green-deep);
    border-bottom: none;
    transition: color var(--cf-transition);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.nav-tabs a:hover,
.nav-tabs a:focus {
    color: var(--cf-green-accent);
}

.nav > li > a:hover,
.nav > li > a:focus {
    background-color: transparent;
    border-bottom: none;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    border-bottom: 2px solid var(--cf-green-deep);
    color: var(--cf-green-deep);
    background: transparent;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer,
.cf-footer {
    color: var(--cf-white);
    flex-shrink: 0;
}

/* Legacy footer-top (hidden) */
footer .footer-top {
    display: none;
}

/* Main footer area */
.cf-footer-main,
footer .footer-bottom {
    background-color: var(--cf-green-deep);
    padding: 56px 0 40px;
    margin-top: 80px;
}

.cf-footer-info {
    margin-bottom: 24px;
}

.cf-footer-info p,
footer p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 4px;
}

.cf-footer-info a,
footer a {
    color: rgba(255, 255, 255, 0.75);
    border-bottom: none !important;
    transition: color var(--cf-transition);
}

.cf-footer-info a:hover,
footer a:hover {
    color: var(--cf-white);
    border-bottom: none !important;
}

/* Footer navigation columns */
.cf-footer-col,
footer .footer-list {
    margin-bottom: 28px;
}

.cf-footer-heading,
footer .footer-list h4 {
    font-family: var(--cf-font-body);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cf-white);
    margin-bottom: 14px;
    opacity: 1;
}

.cf-footer-links,
footer .footer-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cf-footer-links li,
footer .footer-list ul li {
    margin-bottom: 8px;
}

.cf-footer-links li a,
footer .footer-list ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: none !important;
    transition: color var(--cf-transition);
}

.cf-footer-links li a:hover,
footer .footer-list ul li a:hover {
    color: var(--cf-white);
    border-bottom: none !important;
}

/* Bottom bar */
.cf-footer-bottom {
    background-color: #0f231b;
    padding: 16px 0;
}

.cf-footer-copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.6;
}

.cf-footer-legal {
    margin: 0;
    padding: 0;
}

.cf-footer-legal li {
    display: inline-block;
    margin-left: 20px;
}

.cf-footer-legal li:first-child {
    margin-left: 0;
}

.cf-footer-legal li a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: none !important;
    transition: color var(--cf-transition);
}

.cf-footer-legal li a:hover {
    color: var(--cf-white);
    border-bottom: none !important;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media only screen and (max-width: 767px) {
    .cf-header-svg-logo {
        height: 38px;
        margin-top: 4px;
    }

    .navbar-brand {
        width: 240px;
        margin-left: 14px;
        margin-top: 2px;
    }

    .cf-header-inner {
        min-height: auto;
        padding-top: 16px;
        flex-wrap: wrap;
    }

    .cf-header-toggle {
        display: flex;
        margin-top: 2px;
    }

    .cf-header-nav {
        flex-basis: 100%;
        margin-left: 0;
        margin-top: 16px;
        padding-top: 8px;
        border-top: 1px solid var(--cf-grey-200);
    }

    .cf-header-nav.collapse:not(.in) {
        display: none !important;
    }

    .cf-nav-list {
        flex-direction: column;
        align-items: stretch;
    }

    .cf-nav-link {
        padding: 16px !important;
        border-bottom: 1px solid var(--cf-grey-100) !important;
    }

    .cf-nav-login {
        display: inline-block;
        margin: 16px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .cf-card-inner {
        padding: 24px 20px;
    }

    /* Profile page: stack sidebar on mobile */
    .col-md-4 .well.profile-info {
        margin-bottom: 20px;
    }

    .crmEntityFormView table.section[role="presentation"] td.cell {
        display: block;
        width: 100% !important;
        padding-right: 0;
    }

    /* Grid table: horizontal scroll on mobile */
    .view-grid.table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table > thead > tr > th,
    .table > tbody > tr > td {
        white-space: nowrap;
        padding: 10px 8px;
    }

    /* Mobile footer styling */
    .cf-footer-main {
        padding: 40px 0 24px;
    }

    .cf-footer-info {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .cf-footer-info img {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    footer .footer-list,
    .cf-footer-col {
        text-align: center;
        margin-bottom: 30px;
    }

    /* Edit form: stack boolean radios on mobile */
    .boolean-radio {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Edit form: actions full-width buttons on mobile */
    .actions .entity-action-button {
        flex-direction: column;
    }

    .actions .submit-btn,
    .actions .button.next,
    .actions .button.previous {
        width: 100%;
    }

    h2.tab-title {
        font-size: 2rem;
        margin-top: 20px;
    }

    .cf-footer-bottom .row {
        text-align: center;
    }

    .cf-footer-legal {
        margin-top: 8px;
    }

    .cf-footer-legal li {
        margin-left: 12px;
    }
}

@media only screen and (min-width: 766px) and (max-width: 991px) {
    .cf-nav-link {
        font-size: 13px;
        padding: 24px 10px;
    }
}

/* ============================================================
   HIDDEN / UTILITY
   ============================================================ */

label[for=notescontrol] {
    display: none !important;
}

table.section[data-name="hideSection"] {
    display: none !important;
}