:root {
    --h1-green: #2f8f57;
    --h1-green-dark: #17633c;
    --h1-green-deep: #0b432b;
    --h1-green-sidebar: #0d4a30;
    --h1-green-sidebar-soft: #145d3e;
    --h1-green-hover: #eef8f1;
    --h1-text-on-green: #f8fff9;
    --h1-text-muted: #d8eee0;
    --h1-text-dark: #173524;
}

.brand-logo-h1 {
    width: 48px;
    max-width: 100%;
    display: block;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(6, 78, 43, .12);
}

.header-container,
.header-container header.header,
.header-container .navbar {
    background: linear-gradient(90deg, var(--h1-green-deep), var(--h1-green-dark) 62%, var(--h1-green));
    color: var(--h1-text-on-green);
}

.header-container .navbar {
    min-height: 68px;
}

.header-container .sidebarCollapse,
.header-container .navbar .nav-link,
.header-container .navbar svg,
.header-container .navbar i,
.header-container #current-time {
    color: var(--h1-text-on-green) !important;
    stroke: currentColor;
}

.header-container .search-animated {
    margin-inline-end: .75rem;
}

.header-container .form-control {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 7px;
    background-color: rgba(255, 255, 255, .92);
    color: var(--h1-text-dark);
}

.header-container .form-control:focus {
    border-color: #b9e9c8;
    box-shadow: 0 0 0 .16rem rgba(185, 233, 200, .32);
}

.header-container .dropdown-menu {
    border-color: rgba(47, 143, 87, .16);
}

.header-container .notification-indicator .notification-count {
    background-color: #e5484d;
}

.calculator-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    text-decoration: none !important;
    transition: background .2s ease, transform .2s ease;
}

.calculator-toggle:hover {
    background: rgba(255, 255, 255, .24);
    transform: translateY(-1px);
}

.calculator-toggle i {
    font-size: 18px;
}

.h1-user-toggle {
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 10px !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    text-decoration: none !important;
}

.h1-user-toggle:hover {
    background: rgba(255, 255, 255, .2);
}

.h1-user-avatar-wrap {
    width: 40px;
    height: 40px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.h1-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
}

.h1-user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    object-fit: cover;
    margin-inline-end: 8px;
}

.h1-user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-weight: 700;
    line-height: 1;
}

.h1-calculator {
    display: none;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    width: min(420px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid rgba(23, 99, 60, .14);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(8, 42, 27, .24);
}

.h1-calculator.is-open {
    display: block;
}

.h1-calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.h1-calculator-eyebrow {
    display: block;
    color: #6a8374;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.h1-calculator-header h6 {
    margin: 2px 0 0;
    color: var(--h1-green-deep);
    font-size: 20px;
    font-weight: 800;
}

.h1-calculator-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #edf7f1;
    color: var(--h1-green-deep);
    font-size: 26px;
    line-height: 1;
}

.h1-calculator-display {
    height: 62px;
    margin-bottom: 14px;
    border: 1px solid #d7eadf;
    border-radius: 14px;
    background: #f7fbf8;
    color: var(--h1-green-deep) !important;
    font-size: 26px;
    font-weight: 800;
    text-align: right;
}

.h1-calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.h1-calculator-grid button {
    min-height: 58px;
    border: 0;
    border-radius: 14px;
    background: #f1f6f3;
    color: var(--h1-text-dark);
    font-size: 20px;
    font-weight: 800;
    transition: background .18s ease, transform .18s ease;
}

.h1-calculator-grid button:hover {
    background: #e3f1e8;
    transform: translateY(-1px);
}

.h1-calculator-grid .is-operator {
    background: #e2f1e8;
    color: var(--h1-green-deep);
}

.h1-calculator-grid .is-equal {
    background: var(--h1-green);
    color: #ffffff;
}

.h1-calculator-grid .is-clear {
    grid-column: span 4;
    background: #fff0f0;
    color: #b4232a;
}

@media (max-width: 575.98px) {
    .h1-user-toggle {
        min-height: 44px;
        padding: 2px 6px !important;
        background: transparent;
    }

    .h1-user-avatar-wrap,
    .h1-user-avatar {
        width: 38px;
        height: 38px;
    }

    .h1-calculator {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        padding: 14px;
        border-radius: 16px;
    }

    .h1-calculator-display {
        height: 56px;
        font-size: 22px;
    }

    .h1-calculator-grid {
        gap: 8px;
    }

    .h1-calculator-grid button {
        min-height: 52px;
        border-radius: 12px;
        font-size: 18px;
    }
}

.sidebar-theme,
.sidebar-wrapper,
#sidebar {
    background: var(--h1-green-sidebar);
}

#sidebar,
#sidebar a,
#sidebar a:hover,
#sidebar a:focus,
#sidebar a:active {
    text-decoration: none !important;
}

#sidebar .theme-brand {
    min-height: 68px;
    background: #0a3a27;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    gap: 8px;
    padding-inline: 12px;
}

#sidebar .theme-brand li.theme-text a {
    max-width: 178px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--h1-text-on-green) !important;
    font-size: 18px;
    letter-spacing: .2px;
}

#sidebar .theme-brand .toggle-sidebar svg {
    color: var(--h1-text-muted) !important;
    stroke: currentColor;
}

#sidebar .theme-brand li.theme-logo img.navbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .14);
}

#sidebar ul.menu-categories {
    padding-top: 12px;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle {
    min-height: 40px;
    margin: 2px 10px;
    border-radius: 7px;
    color: var(--h1-text-muted) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle span:not(.badge),
#sidebar ul.menu-categories ul.submenu > li a,
#sidebar ul.menu-categories ul.submenu > li .dropdown-item {
    color: inherit !important;
    text-decoration: none !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle svg {
    color: #b8dfc5 !important;
    stroke: currentColor;
}

#sidebar ul.menu-categories li.menu.active > .dropdown-toggle {
    background: #f4fbf6;
    color: var(--h1-green-deep) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

#sidebar ul.menu-categories li.menu.active > .dropdown-toggle svg {
    color: var(--h1-green-dark) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle:hover,
#sidebar ul.menu-categories li.menu > .dropdown-toggle[aria-expanded="true"] {
    background: var(--h1-green-sidebar-soft);
    color: #ffffff !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle:hover svg,
#sidebar ul.menu-categories li.menu > .dropdown-toggle[aria-expanded="true"] svg {
    color: #ffffff !important;
}

#sidebar ul.menu-categories ul.submenu > li a,
#sidebar ul.menu-categories ul.submenu > li .dropdown-item {
    border-radius: 6px;
    margin: 1px 12px;
    color: #c8e4d3 !important;
}

#sidebar ul.menu-categories ul.submenu > li a:hover,
#sidebar ul.menu-categories ul.submenu > li .dropdown-item:hover {
    background: #eaf6ef;
    color: var(--h1-green-deep) !important;
}

#sidebar ul.menu-categories li.menu ul.submenu > li a:before {
    background-color: #8bc9a2;
}

#sidebar .shadow-bottom {
    background: linear-gradient(var(--h1-green-sidebar) 35%, rgba(13, 74, 48, 0));
}

.footer-wrapper.h1-footer {
    width: 100%;
    min-height: 64px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid rgba(23, 99, 60, .1);
    background: linear-gradient(90deg, #f7fbf8, #ffffff);
    box-shadow: 0 -8px 24px rgba(8, 42, 27, .04);
}

.h1-footer-brand,
.h1-footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.h1-footer-brand p {
    margin: 0;
    color: #425747;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
}

.h1-footer-brand a,
.h1-footer-credit {
    color: var(--h1-green-dark) !important;
    text-decoration: none !important;
    font-weight: 800;
}

.h1-footer-brand a:hover,
.h1-footer-credit:hover {
    color: var(--h1-green) !important;
}

.h1-footer-icon,
.h1-footer-credit i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #eaf6ef;
    color: var(--h1-green-dark);
}

.h1-footer-credit {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f0f8f3;
    white-space: nowrap;
    transition: background .18s ease, transform .18s ease;
}

.h1-footer-credit:hover {
    background: #e3f1e8;
    transform: translateY(-1px);
}

@media (max-width: 767.98px) {
    .footer-wrapper.h1-footer {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    .h1-footer-brand {
        align-items: flex-start;
    }

    .h1-footer-brand p {
        font-size: 13px;
        line-height: 1.5;
    }
}

.h1-login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(11, 67, 43, .8), rgba(47, 143, 87, .62)),
        url("../../images/backgroud_image.avif") center / cover no-repeat;
    color: var(--h1-text-dark);
}

.h1-login-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(6, 78, 43, .18);
}

.h1-login-brand {
    min-height: 430px;
    background: radial-gradient(circle at 24% 20%, rgba(255, 255, 255, .24), transparent 32%),
        linear-gradient(150deg, #17633c, #3ca366);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.h1-login-brand .brand-logo-h1 {
    width: min(58%, 220px);
    border-radius: 34px;
    box-shadow: 0 24px 48px rgba(6, 78, 43, .26);
}

.h1-login-form {
    background: #ffffff;
}

.h1-login-form h1 {
    color: var(--h1-green-deep);
    font-weight: 700;
}

.h1-login-form .form-control-user {
    border: 1px solid #d8eadf;
    color: var(--h1-text-dark);
}

.h1-login-form .form-control-user:focus {
    border-color: var(--h1-green);
    box-shadow: 0 0 0 .2rem rgba(47, 143, 87, .14);
}

.h1-login-form .btn-primary,
.h1-login-form .btn-user {
    background: linear-gradient(90deg, var(--h1-green-dark), var(--h1-green));
    border-color: var(--h1-green-dark);
    color: #ffffff;
}

.h1-login-form .btn-primary:hover,
.h1-login-form .btn-user:hover {
    background: linear-gradient(90deg, #104f32, #267a4b);
    border-color: #104f32;
}

@media (max-width: 991.98px) {
    .h1-login-brand {
        min-height: 220px;
    }

    .h1-login-brand .brand-logo-h1 {
        width: 150px;
    }
}
