/* CodakCRM — Custom Brand CSS */

/* ========================================
   LOGIN PAGE — Logo centered with small white background badge
   ======================================== */

/* Force the panel-heading to be a flex column center */
#login.panel.panel-default>.panel-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 8px 20px;
    border-bottom: none;
    background: transparent;
    text-align: center;
}

/* The logo-container div — Taller Vertical White Badge behind the logo */
#login .logo-container {
    width: auto !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #ffffff !important;
    padding: 24px 18px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 12px 32px -4px rgba(0, 45, 60, 0.1), 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    margin: 0 auto 8px auto !important;
}

/* Logo itself — centered with spacious top & bottom vertical breathing room */
#login img.logo,
.logo-container img.logo {
    max-height: 55px !important;
    max-width: 210px !important;
    height: auto !important;
    width: auto !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    background: transparent !important;
}

/* Reduce top padding in panel-body so logo feels close to fields */
#login.panel.panel-default>.panel-body {
    padding-top: 12px;
}

/* ========================================
   NAVBAR / SIDEBAR HEADER LOGO
   ======================================== */
.navbar-brand img,
#navbar a.navbar-brand img,
.navbar-logo-container img.logo {
    max-height: 38px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* ========================================
   CODAK CRM FOOTER DESIGN SYSTEM
   ======================================== */

/* ==========================================================================
   CODAK CRM — ULTRA-LUXURY ENTERPRISE FOOTER DESIGN SYSTEM
   ========================================================================== */

#footer,
footer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 18px 0 24px 0 !important;
    margin-top: 20px !important;
    background: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    position: relative !important;
    z-index: 100 !important;
}

body.has-navbar #footer,
body.has-navbar footer,
body.has-navbar.minimized #footer,
body.has-navbar.minimized footer,
body:not(.has-navbar) #footer,
body:not(.has-navbar) footer {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.el-hany-footer-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* STRICT FOOTER ISOLATION: Hide custom footer everywhere EXCEPT main page footer (#footer) */
.modal .el-hany-footer-container,
.modal-dialog .el-hany-footer-container,
.modal-content .el-hany-footer-container,
.modal-footer .el-hany-footer-container,
.modal-body .el-hany-footer-container,
.panel-body .el-hany-footer-container,
.record .el-hany-footer-container,
.export-container .el-hany-footer-container,
#main .el-hany-footer-container,
#content .el-hany-footer-container,
div:not(#footer)>.el-hany-footer-container,
form .el-hany-footer-container {
    display: none !important;
}

/* Display ONLY inside the primary page footer */
#footer .el-hany-footer-container,
body>footer .el-hany-footer-container,
body.login-body footer .el-hany-footer-container {
    display: flex !important;
}

/* Main Unified Pill Bar */
.codak-unified-footer {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 4px 14px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 252, 0.97) 100%) !important;
    border: 1.2px solid rgba(0, 164, 200, 0.28) !important;
    border-radius: 40px !important;
    box-shadow: 0 5px 16px -3px rgba(0, 45, 60, 0.07), 0 1px 4px rgba(0, 0, 0, 0.02) !important;
    /* backdrop-filter removed — creates stacking context that traps nearby dropdowns */
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: 0 auto !important;
    position: relative !important;
}

.codak-unified-footer:hover {
    border-color: rgba(0, 164, 200, 0.6) !important;
    box-shadow: 0 8px 26px -4px rgba(0, 164, 200, 0.24), 0 0 12px rgba(0, 180, 216, 0.14) !important;
    transform: translateY(-2px) scale(1.004) !important;
}

/* Left Section */
.codak-footer-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Logo Box Badge — Hidden */
.codak-footer-logo-box,
.codak-footer-brand-logo {
    display: none !important;
}

/* Brand Title Link — Styled identically to Copyright Text */
.codak-footer-title,
a.codak-footer-title {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    letter-spacing: -0.005em !important;
    transition: color 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
}

.codak-footer-title:hover,
.codak-footer-title:focus,
a.codak-footer-title:hover {
    color: #00a4c8 !important;
    text-decoration: none !important;
}

/* Separator Dot */
.codak-footer-sep {
    color: #cbd5e1 !important;
    font-size: 5.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 1.5px !important;
}

.codak-dot-icon {
    font-size: 5px !important;
    opacity: 0.7 !important;
}

/* Copyright Text */
.codak-footer-copy {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    letter-spacing: -0.005em !important;
}

/* Right Section Link Button */
.codak-footer-right {
    display: flex !important;
    align-items: center !important;
}

.codak-footer-action-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5.5px !important;
    padding: 5px 13px !important;
    background: linear-gradient(135deg, #005a70 0%, #007c9b 100%) !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: 0 2.5px 10px rgba(0, 90, 112, 0.2) !important;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.codak-footer-action-link span {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: none !important;
}

.codak-footer-action-link:hover {
    background: linear-gradient(135deg, #007c9b 0%, #00a4c8 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1.2px) scale(1.03) !important;
    box-shadow: 0 5px 16px rgba(0, 164, 200, 0.4) !important;
}

.codak-link-arrow {
    font-size: 9px !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.codak-footer-action-link:hover .codak-link-arrow {
    transform: translate(2.5px, -2.5px) rotate(4deg) !important;
}

/* Hide legacy EspoCRM credit text */
footer p.credit,
footer .credit,
#footer p.credit,
#footer .credit,
a[href*="espocrm.com"] {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .codak-unified-footer {
        flex-direction: column !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 14px 20px !important;
        border-radius: 24px !important;
        gap: 12px !important;
    }

    .codak-footer-left {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
}

/* Hide Admin Official Extensions / Promotions Iframe */
.admin-right-column iframe,
.admin-content iframe[src*="espocrm"],
.admin-content iframe[src*="s.espocrm.com"] {
    display: none !important;
}

/* Expand Admin Settings to Full Width when Iframe is Hidden */
.admin-content .row>.col-md-7 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}