/* Light Beige Theme - Inspired by onepagelove.com */
html, body {
    background: #fff !important;
    color: #2d2621 !important;
}
#legend-wrap {
    background: #fff !important;
}
#page-main {
    background: #fff !important;
    color: #2d2621 !important;
    margin-left: 240px !important;
    min-height: calc(100vh - 60px) !important;
}

/* Navbar */
#legend-header {
    background: #e8e3dc !important;
    border-bottom: 1px solid #ddd7cf !important;
}
#legend-header .navbar-item,
#legend-header .icon,
#legend-header a {
    color: #2d2621 !important;
}
#legend-header .navbar-logo b {
    color: #D94F5C !important;
}

/* Top horizontal nav bar */
#legend-side-menu {
    background: #e8e3dc !important;
    border-bottom: 1px solid #ddd7cf !important;
    width: 100% !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 100 !important;
    overflow: visible !important;
    display: block !important;
    transform: none !important;
    padding: 0 16px !important;
}
#side-menu-icon {
    display: none !important;
}

/* Horizontal menu layout */
#legend-side-menu .menu-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Menu category */
#legend-side-menu .menu-category {
    position: relative !important;
    flex-shrink: 0 !important;
}
#legend-side-menu .menu-category-title {
    display: flex !important;
    align-items: center !important;
    padding: 10px 16px !important;
    color: #8c7d70 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    margin: 4px 0 !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}
#legend-side-menu .lua-heartbeat-link {
    position: relative !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    margin-left: auto !important;
}
#legend-side-menu .lua-heartbeat-link:hover .menu-category-title,
#legend-side-menu .lua-heartbeat-link.active .menu-category-title {
    background: #ddd7cf !important;
    color: #2d2621 !important;
}
}
#legend-side-menu .menu-category:hover .menu-category-title,
#legend-side-menu .menu-category.active .menu-category-title {
    background: #ddd7cf !important;
    color: #2d2621 !important;
}

/* Dropdown submenu - OnePageLove multi-column style */
#legend-side-menu .submenu-popup {
    display: none;
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    width: auto;
    min-width: 140px !important;
    /* max-width removed — JS sets exact width */

    background: #fff !important;
    border: 1px solid #e8e3dc !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.12) !important;
    z-index: 10000 !important;
    padding: 4px 0 !important;
    overflow: hidden !important;
    opacity: 0;
    animation: dropFadeIn 0.15s ease forwards;
}
@keyframes dropFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
#legend-side-menu .submenu-popup::before {
    content: "" !important;
    position: absolute !important;
    left: 20px !important;
    top: -6px !important;
    width: 12px !important;
    height: 12px !important;
    background: #fff !important;
    border-left: 1px solid #e8e3dc !important;
    border-top: 1px solid #e8e3dc !important;
    transform: rotate(45deg) !important;
    z-index: -1 !important;
}

/* Submenu items - clean no-background cells */
#legend-side-menu .submenu-popup d-menu-item {
    display: block !important;
    width: 140px !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid #f0ece6 !important;
    background: transparent !important;
    color: #8c7d70 !important;
    font-size: 13px !important;
    line-height: 36px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}
#legend-side-menu .submenu-popup d-menu-item:hover {
    background: #D94F5C !important;
    border-bottom-color: #D94F5C !important;
    color: #fff !important;
}
#legend-side-menu .submenu-popup d-menu-item[active] {
    background: #D94F5C !important;
    border-bottom-color: #D94F5C !important;
    color: #fff !important;
}

/* Page main - remove left margin for top nav */
#page-main {
    margin-left: 0 !important;
}

/* Cards, panels, boxes */
.card, .box, .panel, .notification, .message,
.menu-content, .dropdown-menu, .modal-card {
    background: #f5f2ee !important;
    color: #2d2621 !important;
    border-color: #ddd7cf !important;
}
.card-header, .panel-heading, .message-header, .modal-card-head, .modal-card-foot {
    background: #f5f2ee !important;
    color: #2d2621 !important;
    border-color: #ddd7cf !important;
}
.card-header-title {
    color: #2d2621 !important;
}
.title, .subtitle {
    color: #2d2621 !important;
}

/* Tables */
.table {
    background: #f5f2ee !important;
    color: #2d2621 !important;
}
.table th, .table td {
    border-color: #ddd7cf !important;
    color: #2d2621 !important;
}
.table thead th {
    background: #e8e3dc !important;
    color: #8c7d70 !important;
}
.table tbody tr:hover {
    background: #e8e3dc !important;
}
.table.is-striped tbody tr:not(.is-selected):nth-child(even) {
    background: #f5f2ee !important;
}

/* Forms */
.input, .textarea, .select select, .d-input input {
    background: #fff !important;
    color: #2d2621 !important;
    border-color: #ddd7cf !important;
}
.input::placeholder, .textarea::placeholder {
    color: #9e8f80 !important;
}
.label {
    color: #8c7d70 !important;
}

/* Buttons */
.button {
    background: #e8e3dc !important;
    color: #2d2621 !important;
    border-color: #ddd7cf !important;
}
.button.is-primary {
    background: #D94F5C !important;
    color: #fff !important;
    border-color: #D94F5C !important;
}
.button.is-danger {
    background: #C4454F !important;
    color: #fff !important;
    border-color: #C4454F !important;
}
.button.is-success {
    background: #11C1F4 !important;
    color: #fff !important;
    border-color: #11C1F4 !important;
}

/* Tags */
.tag {
    background: #e8e3dc !important;
    color: #2d2621 !important;
}
.tag.is-primary { background: #D94F5C !important; color: #fff !important; }
.tag.is-success { background: #11C1F4 !important; color: #fff !important; }
.tag.is-danger { background: #C4454F !important; color: #fff !important; }

/* Tabs */
.tabs a {
    color: #8c7d70 !important;
    border-color: #ddd7cf !important;
}
.tabs a:hover {
    color: #2d2621 !important;
    border-color: #D94F5C !important;
}
.tabs li.is-active a {
    color: #D94F5C !important;
    border-color: #D94F5C !important;
}

/* Pagination */
.pagination-link, .pagination-previous, .pagination-next {
    background: #e8e3dc !important;
    color: #2d2621 !important;
    border-color: #ddd7cf !important;
}
.pagination-link.is-current {
    background: #D94F5C !important;
    color: #fff !important;
    border-color: #D94F5C !important;
}

/* Breadcrumb */
.breadcrumb a {
    color: #D94F5C !important;
}
.breadcrumb li.is-active a {
    color: #8c7d70 !important;
}

/* Modal */
.modal-background {
    background: rgba(0, 0, 0, 0.5) !important;
}
.modal-card-title {
    color: #2d2621 !important;
}

/* Dropdown */
.dropdown-content {
    background: #f5f2ee !important;
    border-color: #ddd7cf !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}
.dropdown-item {
    color: #2d2621 !important;
}
.dropdown-item:hover {
    background: #fff !important;
    color: #D94F5C !important;
}

/* Footer */
.footer {
    background: #e8e3dc !important;
    color: #8c7d70 !important;
}

/* Divider */
.hr, hr {
    background: #ddd7cf !important;
}

/* Hero / Page header / Title bar */
.hero, .hero-body, .page-header, d-page-header,
[d-page-header], [class*="page-header"], [class*="hero"],
.box-header, .panel-block, .panel-tabs,
.section-header, .content-header, .page-title,
.subtitle.is-4, .title.is-4 {
    background: #f5f2ee !important;
    color: #2d2621 !important;
    border-color: #ddd7cf !important;
}

/* Catch any remaining dark backgrounds in main content */
#page-main > div > div:first-child[style*="background"],
#page-main .hero,
#page-main [style*="background-color: rgb(54"],
#page-main [style*="background-color: #3"],
#page-main [style*="background-color: rgb(30"],
#page-main [style*="background-color: rgb(40"],
#page-main [style*="background: rgb(54"],
#page-main [style*="background: #3"],
#page-main [class*="dark"],
#page-main [class*="purple"],
#page-main [class*="navy"] {
    background: #f5f2ee !important;
    color: #2d2621 !important;
}

/* Force all text inside page-main to be dark */
#page-main h1, #page-main h2, #page-main h3, #page-main h4, #page-main h5, #page-main h6,
#page-main p, #page-main span, #page-main div, #page-main label,
#page-main .title, #page-main .subtitle {
    color: #2d2621 !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f5f2ee; }
::-webkit-scrollbar-thumb { background: #ddd7cf; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b0a89e; }
