/* ==========================================================================
   Janur Kita Admin & Customer Panel Brand Theme
   Tone Color: Deep Emerald (#074134), Warm Gold (#c9a55a), Warm Ivory (#f8f5ee)
   ========================================================================== */

:root,
html[data-color],
html[data-color='light-janur'],
html[data-color='light-brown'],
html[data-color='light-green'],
html[data-color='light-red'] {
    --primary: #074134;
    --secondary: #c9a55a;
    --tertiary: #8a6a22;
    --quaternary: #0b5243;
    --primary-rgb: 7, 65, 52;
    --secondary-rgb: 201, 165, 90;
    --tertiary-rgb: 138, 106, 34;
    --quaternary-rgb: 11, 82, 67;

    --primary-darker: #052e25;
    --secondary-darker: #b08d44;
    --tertiary-darker: #6f551b;
    --quaternary-darker: #073b30;

    --body: #182b24;
    --alternate: #52625b;
    --muted: #85918b;
    --separator: #e1dccb;
    --separator-light: #ece7d9;
    --body-rgb: 24, 43, 36;
    --alternate-rgb: 82, 98, 91;
    --muted-rgb: 133, 145, 139;
    --separator-rgb: 225, 220, 203;
    --separator-light-rgb: 236, 231, 217;

    --background: #f8f5ee;
    --foreground: #ffffff;
    --background-rgb: 248, 245, 238;
    --foreground-rgb: 255, 255, 255;

    --background-theme: #efece2;
    --background-light: #f4f0e6;

    --gradient-1: #074134;
    --gradient-2: #06352a;
    --gradient-3: #03251c;
    --gradient-1-lighter: #0b5243;
    --gradient-1-darker: #03251c;

    --light-text: #f8f5ee;
    --dark-text: #10241d;
    --light-text-darker: #e5dfd1;
    --dark-text-darker: #071410;
    --light-text-rgb: 248, 245, 238;
    --dark-text-rgb: 16, 36, 29;

    --danger: #c93545;
    --info: #1f7a8c;
    --warning: #c9a55a;
    --success: #1b7a58;
    --light: #ece7d9;
    --dark: #10241d;
    --danger-darker: #8f222e;
    --info-darker: #155562;
    --warning-darker: #8a6a22;
    --success-darker: #11523b;
    --light-darker: #dcd5c4;
    --dark-darker: #08130f;

    --body-darker: #10241d;
    --alternate-darker: #3d4b45;
    --muted-darker: #6c7872;
    --separator-darker: #c8c1ae;

    --danger-rgb: 201, 53, 69;
    --info-rgb: 31, 122, 140;
    --warning-rgb: 201, 165, 90;
    --success-rgb: 27, 122, 88;
    --light-rgb: 236, 231, 217;
    --dark-rgb: 16, 36, 29;

    --menu-shadow: 0px 8px 28px rgba(3, 37, 28, 0.22);
    --menu-shadow-navcolor: 0px 4px 16px rgba(3, 37, 28, 0.08);

    --background-navcolor-light: #ffffff;
    --background-navcolor-dark: #03251c;

    --font: "Jost", "Nunito Sans", sans-serif;
    --font-heading: "Marcellus", "Montserrat", serif;
}

/* Dark Mode Palette (Toggle via Light/Dark button in sidebar) */
html[data-color*='dark'] {
    --primary: #c9a55a;
    --secondary: #156b57;
    --tertiary: #d8b96e;
    --quaternary: #0b5243;
    --primary-rgb: 201, 165, 90;
    --secondary-rgb: 21, 107, 87;
    --tertiary-rgb: 216, 185, 110;
    --quaternary-rgb: 11, 82, 67;

    --primary-darker: #b08d44;
    --secondary-darker: #0e5242;
    --tertiary-darker: #b8984c;
    --quaternary-darker: #073b30;

    --body: #e7ece9;
    --alternate: #a7b8b0;
    --muted: #6e8279;
    --separator: #1c382f;
    --separator-light: #132a23;
    --body-rgb: 231, 236, 233;
    --alternate-rgb: 167, 184, 176;
    --muted-rgb: 110, 130, 121;
    --separator-rgb: 28, 56, 47;
    --separator-light-rgb: 19, 42, 35;

    --background: #041913;
    --foreground: #07261d;
    --background-rgb: 4, 25, 19;
    --foreground-rgb: 7, 38, 29;

    --background-theme: #062119;
    --background-light: #0b3025;

    --gradient-1: #052920;
    --gradient-2: #041f18;
    --gradient-3: #02140f;
    --gradient-1-lighter: #07382b;
    --gradient-1-darker: #02140f;

    --light-text: #f8f5ee;
    --dark-text: #041913;
    --light-text-darker: #d8d2c5;
    --dark-text-darker: #020d0a;
    --light-text-rgb: 248, 245, 238;
    --dark-text-rgb: 4, 25, 19;

    --background-navcolor-light: #07261d;
    --background-navcolor-dark: #02140f;
}

/* ==========================================================================
   Sidebar Navigation — Deep Emerald & Gold Accents
   ========================================================================== */
html[data-placement='vertical'] .nav-container,
html[data-placement='horizontal'] .nav-container {
    background-color: #074134 !important;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201, 165, 90, 0.14) 0%, rgba(201, 165, 90, 0) 70%),
        linear-gradient(165deg, #074134 0%, #053328 55%, #03251c 100%) !important;
    border-right: 1px solid rgba(201, 165, 90, 0.25);
}

/* Ensure sidebar stays Emerald + Gold even if navcolor="light" was cached */
html[data-navcolor='light'] .nav-container .menu-container .menu > li > a,
html[data-navcolor='light'] .nav-container .menu-container .menu a,
html[data-navcolor='light'] .nav-container .menu-icons > li > a,
html[data-navcolor='light'] .nav-container .user-container .user .name {
    color: var(--light-text) !important;
}

html[data-navcolor='light'] .nav-container .menu-container .menu > li > a .icon,
.nav-container .menu-container .menu > li > a .icon {
    color: #c9a55a !important;
}

html[data-navcolor='light'] .menu a[data-bs-toggle='collapse']:before {
    border-color: #c9a55a !important;
}

/* Active & Hover Menu States in Sidebar */
html[data-placement='vertical'] .nav-container .nav-content .menu-container .menu li a.active,
html[data-placement='vertical'] .nav-container .nav-content .menu-container .menu li a:hover,
html[data-navcolor='light'] .nav-container .menu-container .menu a.active,
html[data-navcolor='light'] .nav-container .menu-container .menu a:hover {
    background: rgba(201, 165, 90, 0.16) !important;
    color: #f4ecd8 !important;
    box-shadow: inset 0 0 0 1px rgba(201, 165, 90, 0.28) !important;
}

.nav-container .menu-container .menu a.active .label::after {
    background: #c9a55a !important;
}

.nav-container hr.separator {
    border-color: rgba(201, 165, 90, 0.25);
    opacity: 1;
}

/* Brand Logo in Sidebar */
.nav-container .brand-admin-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.65rem;
    width: auto !important;
    text-decoration: none;
    color: #f8f5ee !important;
}

.nav-container .brand-admin-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(201, 165, 90, 0.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #074134;
    display: grid;
    place-items: center;
}

.nav-container .brand-admin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-container .brand-admin-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.nav-container .brand-admin-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c9a55a;
    white-space: nowrap;
}

.nav-container .brand-admin-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(248, 245, 238, 0.7);
    white-space: nowrap;
}

html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .nav-container .brand-admin-text {
    display: none;
}

html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .nav-container .nav-content .logo a.brand-admin-link {
    width: 38px !important;
}

/* Pin button on emerald sidebar (desktop only) */
#pinButton.pin-button {
    background: rgba(3, 37, 28, 0.75) !important;
    border-color: rgba(201, 165, 90, 0.45) !important;
    color: #c9a55a !important;
}

#pinButton.pin-button:hover {
    background: #c9a55a !important;
    border-color: #c9a55a !important;
    color: #03251c !important;
}

/* Mobile responsive navigation & toggle */
@media (min-width: 992px) {
    .mobile-drawer-close,
    .nav-container .mobile-buttons-container {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    #pinButton.pin-button {
        display: none !important;
    }

    .nav-container .mobile-buttons-container {
        display: flex !important;
        margin-left: auto;
        align-items: center;
        height: 100%;
        padding-right: 0.85rem;
    }

    .nav-container.mobile-side-ready .mobile-buttons-container,
    .nav-container.mobile-side-in .mobile-buttons-container {
        display: none !important;
    }

    #mobileMenuButton.menu-button {
        display: inline-flex !important;
        width: 2.15rem;
        height: 2.15rem;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(201, 165, 90, 0.45) !important;
        border-radius: 50% !important;
        background: rgba(4, 38, 29, 0.8) !important;
        color: #e2c57c !important;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease;
        text-decoration: none !important;
    }

    #mobileMenuButton.menu-button:hover,
    #mobileMenuButton.menu-button:focus-visible {
        background: #c9a55a !important;
        border-color: #c9a55a !important;
        color: #04281f !important;
        outline: none;
    }

    #mobileMenuButton .menu-icon-bars {
        display: block;
    }

    #mobileMenuButton .menu-icon-close {
        display: none;
    }

    html[data-mobile='true'] #mobileMenuButton .menu-icon-bars {
        display: none;
    }

    html[data-mobile='true'] #mobileMenuButton .menu-icon-close {
        display: block;
    }

    .mobile-drawer-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 1003;
        display: none;
        width: 2rem;
        height: 2rem;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(201, 165, 90, 0.45);
        border-radius: 50%;
        background: rgba(4, 38, 29, 0.8);
        color: #e2c57c;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease;
    }

    .mobile-drawer-close:hover {
        color: #04281f;
        border-color: #c9a55a;
        background: #c9a55a;
    }

    html[data-mobile='true'] .mobile-drawer-close,
    .nav-container.mobile-side-ready .mobile-drawer-close,
    .nav-container.mobile-side-in .mobile-drawer-close {
        display: inline-flex !important;
    }
}

html[data-dimension='mobile'] #pinButton.pin-button {
    display: none !important;
}

/* ==========================================================================
   Bottom Account Dropdown in Sidebar (.sidebar-account-footer)
   ========================================================================== */
.sidebar-account-footer {
    order: 4;
    margin-top: auto;
    width: 100%;
    padding: 0.75rem 1.25rem 1.25rem;
    flex-shrink: 0;
}

.sidebar-account-card {
    border: 1px dashed rgba(201, 165, 90, 0.42);
    border-radius: 10px;
    background: rgba(3, 37, 28, 0.45);
    padding: 0.7rem 0.75rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sidebar-account-card:hover,
.sidebar-account-card.is-active {
    border-color: rgba(201, 165, 90, 0.75);
    background: rgba(3, 37, 28, 0.65);
}

.sidebar-account-toggle {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
    color: #f8f5ee;
    cursor: pointer;
}

.sidebar-account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: #0c1714;
    border: 1px solid rgba(201, 165, 90, 0.45);
    color: #f8f5ee;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-account-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.25;
}

.sidebar-account-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f8f5ee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-account-email {
    font-size: 0.75rem;
    color: rgba(248, 245, 238, 0.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-account-chevron {
    color: rgba(248, 245, 238, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.sidebar-account-toggle:not(.collapsed) .sidebar-account-chevron {
    transform: rotate(180deg);
}

.sidebar-account-divider {
    border-top: 1px dashed rgba(201, 165, 90, 0.35);
    margin: 0.7rem 0 0.45rem;
}

.sidebar-account-menu {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-account-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.48rem 0.55rem;
    border-radius: 7px;
    color: rgba(248, 245, 238, 0.88) !important;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar-account-link i,
.sidebar-account-link svg {
    color: #c9a55a !important;
    flex-shrink: 0;
}

.sidebar-account-link:hover,
.sidebar-account-link.active {
    background: rgba(201, 165, 90, 0.16);
    color: #f4ecd8 !important;
}

/* Slim / Unpinned Sidebar Behaviour for Bottom Account Box */
html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .sidebar-account-footer {
    padding: 0.5rem 0.65rem 1rem;
}

html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .sidebar-account-card {
    padding: 0.35rem;
    display: flex;
    justify-content: center;
}

html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .sidebar-account-toggle {
    justify-content: center;
}

html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .sidebar-account-info,
html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) .sidebar-account-chevron,
html[data-placement='vertical'][data-behaviour='unpinned']:not([data-menu-animate='show']) #sidebarAccountMenu {
    display: none !important;
}

html[data-placement='vertical'][data-dimension='mobile'] .nav-container:not(.mobile-side-in) .sidebar-account-footer,
html[data-placement='horizontal'][data-dimension='mobile'] .nav-container:not(.mobile-side-in) .sidebar-account-footer {
    display: none !important;
}

/* ==========================================================================
   Cards, Buttons, Headings & Tables Refinement
   ========================================================================== */
.page-title-container h1,
.cta-1,
.display-4 {
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

.card {
    border: 1px solid var(--separator-light);
    box-shadow: 0 6px 22px rgba(7, 65, 52, 0.05) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--light-text) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-darker) !important;
    border-color: var(--primary-darker) !important;
    color: #f4ecd8 !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--light-text) !important;
}

/* Auth pages (Login, Register, Forgot/Reset Password) — Transparent & Centered Brand Logo */
.auth-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    text-decoration: none;
    width: 100%;
    margin: 0 auto 1.25rem;
}

.auth-brand-header .auth-brand-icon,
.auth-brand-header .brand-admin-icon {
    width: 72px;
    height: 72px;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-header .auth-brand-icon img,
.auth-brand-header .brand-admin-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-header .auth-brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-brand-header .auth-brand-title,
.auth-brand-header .brand-admin-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #074134;
    display: block;
    line-height: 1.15;
}

.auth-brand-header .auth-brand-subtitle,
.auth-brand-header .brand-admin-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a6a22;
    display: block;
    margin-top: 2px;
}

/* Google Sign-In Button */
.btn-google {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.65rem !important;
    background-color: #ffffff !important;
    color: #3c4043 !important;
    border: 1px solid #dadce0 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    border-radius: var(--border-radius-md, 8px) !important;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.btn-google:hover,
.btn-google:focus,
.btn-google:active {
    background-color: #f8f9fa !important;
    border-color: #d2d5da !important;
    color: #202124 !important;
    box-shadow: 0 1px 4px rgba(60, 64, 67, 0.16), 0 2px 8px rgba(60, 64, 67, 0.08) !important;
}

.btn-google svg {
    flex-shrink: 0;
}
