:root {
    --dss-green-950: #0b3020;
    --dss-green-900: #103b29;
    --dss-green-800: #175335;
    --dss-green-700: #247c20;
    --dss-green-600: #319b25;
    --dss-green-500: #48ad28;
    --dss-green-100: #eaf6e4;
    --dss-shell-border: #d6e1dd;
    --dss-shell-bg: #f2f8f6;
    --dss-sidebar-width: 240px;
    --dss-topbar-height: 72px;
}

html,
body.dss-shell {
    min-height: 100%;
}

.dss-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.dss-shell {
    display: block;
    margin: 0;
    background: var(--dss-shell-bg);
    color: #132625;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dss-topbar {
    position: static;
    z-index: 40;
    display: grid;
    grid-template-columns: var(--dss-sidebar-width) minmax(0, 1fr) auto;
    height: var(--dss-topbar-height);
    border-bottom: 1px solid rgba(32, 76, 57, 0.14);
    background: #fff;
    box-shadow: 0 2px 12px rgba(23, 66, 48, 0.06);
}

.dss-topbar__brand {
    display: flex;
    align-items: center;
    padding: 8px 20px 8px 38px;
    background: #fff;
}

.dss-topbar__brand a {
    display: flex;
    align-items: center;
    width: 176px;
    height: 54px;
    overflow: hidden;
}

.dss-topbar__brand img {
    display: block;
    width: 174px;
    height: auto;
}

.dss-topbar__scene {
    min-width: 0;
    background: #fff;
}

.dss-topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px 0 18px;
    background: #fff;
}

.dss-user-menu {
    position: relative;
}

.dss-user-menu summary {
    display: flex;
    align-items: center;
    min-width: 138px;
    height: 42px;
    padding: 3px 12px 3px 5px;
    border: 1px solid #d7e1dd;
    border-radius: 22px;
    background: rgba(239, 246, 242, 0.92);
    color: #111f1c;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.dss-user-menu summary::-webkit-details-marker {
    display: none;
}

.dss-user-menu__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border-radius: 50%;
    background: linear-gradient(145deg, #56b530, #1f861d);
    color: #fff;
    font-size: 17px;
}

.dss-user-menu__name {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dss-user-menu summary > i {
    margin-left: auto;
    padding-left: 9px;
    font-size: 12px;
    transition: transform 160ms ease;
}

.dss-user-menu[open] summary > i {
    transform: rotate(180deg);
}

.dss-user-menu__dropdown {
    position: absolute;
    z-index: 60;
    top: calc(100% + 7px);
    right: 0;
    width: 176px;
    padding: 9px;
    border: 1px solid #dbe4e0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(18, 53, 38, 0.18);
}

.dss-user-menu__dropdown a,
.dss-user-menu__dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #172522;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.dss-user-menu__dropdown a:hover,
.dss-user-menu__dropdown button:hover,
.dss-user-menu__dropdown a:focus-visible,
.dss-user-menu__dropdown button:focus-visible,
.dss-user-menu__dropdown a.is-active,
.dss-user-menu__dropdown button.is-active,
.dss-user-menu__dropdown a[aria-current="page"],
.dss-user-menu__dropdown button[aria-current="page"] {
    background: #299326;
    color: #fff;
}

.dss-user-menu__dropdown form {
    margin-top: 3px;
    padding-top: 4px;
    border-top: 1px solid #e4ebe8;
}

.dss-language-switch {
    display: flex;
    overflow: hidden;
    border: 1px solid #cbd8d2;
    border-radius: 10px;
    background: #fff;
}

.dss-language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 34px;
    color: #172522;
    font-size: 13px;
    font-weight: 600;
}

.dss-language-switch a.is-active {
    background: #299326;
    color: #fff;
}

.dss-app-shell {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - var(--dss-topbar-height));
}

#sidebar.dss-sidebar {
    position: relative;
    z-index: 25;
    top: auto;
    flex: 0 0 var(--dss-sidebar-width);
    flex-direction: column;
    width: var(--dss-sidebar-width);
    height: calc(100vh - var(--dss-topbar-height));
    overflow: hidden;
    color: #fff;
    background-color: #01311b;
    background-image: url('../media/sidebar/glass-globe-bg.jpg?v=2');
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 100% auto;
}

.dss-sidebar__brand {
    padding: 23px 28px 14px;
}

.dss-sidebar__brand strong,
.dss-sidebar__brand span {
    display: block;
}

.dss-sidebar__brand strong {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.dss-sidebar__brand span {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.dss-sidebar__nav {
    position: relative;
    z-index: 2;
    padding: 11px 16px 24px;
}

.dss-sidebar__nav > .kt-menu-item {
    width: 100%;
}

.dss-sidebar__section-title {
    padding: 7px 12px 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 600;
}

.dss-sidebar__divider {
    height: 1px;
    margin: 10px 8px 7px;
    background: linear-gradient(90deg, rgba(164, 220, 144, 0.05), rgba(164, 220, 144, 0.42), rgba(164, 220, 144, 0.05));
}

.dss-sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    margin: 2px 0;
    padding: 8px 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.93);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.dss-sidebar__link > span:last-child {
    min-width: 0;
    white-space: nowrap;
}

.dss-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
}

.dss-sidebar__icon svg {
    display: block;
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dss-sidebar__link:hover,
.dss-sidebar__link:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

.dss-sidebar__link.is-active {
    background: linear-gradient(100deg, #55b52b, #49a824);
    box-shadow: 0 7px 18px rgba(18, 101, 28, 0.32);
    color: #fff;
    font-weight: 600;
}

.dss-main-shell {
    min-width: 0;
    flex: 1 1 auto;
    background:
        radial-gradient(circle at 90% 12%, rgba(116, 183, 139, 0.11), transparent 31%),
        linear-gradient(135deg, #f5faf8 0%, #eef6f3 100%);
}

#scrollable_content {
    min-height: calc(100vh - var(--dss-topbar-height));
}

.dss-content-container.kt-container-fluid {
    width: 100%;
    max-width: none;
    padding: 20px 18px 28px;
}

/*
 * Shared surface for informational/resource pages. Its border and radius
 * match the Step 1 cards, while the surrounding gutter continues to come
 * from .dss-content-container so these pages align with the building flow.
 */
.dss-content-card {
    width: 100%;
    margin: 0;
    padding: 20px 21px;
    border: 1px solid rgba(118, 147, 139, 0.25);
    border-radius: 13px;
    background: #fff;
    box-shadow: none;
}

.dss-content-card > h1:first-child,
.dss-content-card > .space-y-5:first-child > h1:first-child {
    padding-top: 0;
}

/* Keep account forms readable inside the full-width shared content surface. */
.dss-account-form {
    max-width: 36rem;
}

/*
 * Authentication pages reuse the standard DSS content-card surface, with a
 * compact responsive width so short forms do not stretch across the page.
 * Registration gets a little more room for its additional fields and consent
 * copy. The outer content container continues to provide the page gutter.
 */
.dss-auth-card {
    max-width: 440px;
    margin: 20px auto;
    padding: 28px 30px;
}

.dss-auth-card--register {
    max-width: 520px;
}

#scrollable_content .dss-auth-card h1.text-2xl.font-semibold.text-mono {
    padding-top: 0;
    margin-bottom: 0;
}

/* Shared workflow stepper. The same partial remains responsible for Steps 1–4. */
.dss-stepper {
    width: 100%;
    margin: 15px auto 18px;
}

.dss-stepper ol {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dss-stepper__item {
    position: relative;
    min-width: 0;
    flex: 1 1 25%;
    text-align: center;
}

.dss-stepper__item:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 17px;
    left: calc(50% + 25px);
    width: calc(100% - 50px);
    height: 1px;
    background: #aebdc3;
}

.dss-stepper__item.is-reached:not(:last-child)::after {
    background: #8fcf74;
}

.dss-stepper__circle {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    margin: 0 auto;
    border: 1.5px solid #223b43;
    border-radius: 50%;
    background: #f8fbfa;
    color: #14282e;
    font-size: 15px;
    font-weight: 600;
}

.dss-stepper__item.is-reached .dss-stepper__circle {
    border-color: #4da82a;
    background: linear-gradient(145deg, #59b731, #399d25);
    box-shadow: 0 5px 12px rgba(61, 153, 37, 0.2);
    color: #fff;
}

.dss-stepper__label {
    display: block;
    margin: 7px 7px 0;
    color: #10252b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-transform: uppercase;
}

.dss-stepper__item.is-current .dss-stepper__label {
    color: #319b25;
}

@media (min-width: 64rem) {
    :root {
        --dss-sidebar-width: 290px;
    }

    /* Plain fixed overlays use inline `inset: 0`; constrain their centering area to the
       desktop shell content without changing their mobile full-viewport behavior. */
    .dss-content-modal-overlay {
        right: auto !important;
        left: var(--dss-sidebar-width) !important;
        width: calc(100vw - var(--dss-sidebar-width)) !important;
    }

    html,
    body.dss-shell {
        height: 100%;
        overflow: hidden;
    }

    .dss-topbar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
    }

    .dss-topbar__brand {
        width: var(--dss-sidebar-width);
    }

    .dss-topbar__scene {
        grid-column: 2;
    }

    .dss-topbar__actions {
        grid-column: 3;
    }

    .dss-user-menu {
        width: 272px;
    }

    .dss-user-menu summary,
    .dss-user-menu__dropdown {
        box-sizing: border-box;
        width: 100%;
    }

    .dss-app-shell {
        position: fixed;
        top: var(--dss-topbar-height);
        right: 0;
        bottom: 0;
        left: 0;
        min-height: 0;
    }

    #sidebar.dss-sidebar {
        position: fixed;
        top: var(--dss-topbar-height);
        right: auto;
        bottom: 0;
        left: 0;
        height: auto;
    }

    .dss-main-shell {
        height: 100%;
        min-height: 0;
        margin-left: var(--dss-sidebar-width);
        overflow: hidden;
    }

    #scrollable_content {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
    }
}

@media (max-width: 78rem) {
    .dss-topbar__actions {
        gap: 6px;
        padding-right: 16px;
    }

}

@media (max-width: 63.999rem) {
    :root {
        --dss-topbar-height: 62px;
    }

    .dss-topbar {
        grid-template-columns: minmax(180px, 1fr) auto;
    }

    .dss-topbar__brand {
        padding-left: 14px;
    }

    .dss-topbar__brand a {
        width: 150px;
        height: 46px;
    }

    .dss-topbar__brand img {
        width: 148px;
    }

    .dss-topbar__scene {
        display: none;
    }

    .dss-topbar__actions {
        padding-left: 8px;
    }

    .dss-user-menu__name {
        display: none;
    }

    .dss-user-menu summary {
        min-width: 42px;
        width: 42px;
        padding: 3px;
    }

    .dss-user-menu summary > i {
        display: none;
    }

    .dss-user-menu__avatar {
        margin: 0;
    }

    #sidebar.dss-sidebar {
        position: fixed;
        top: 0;
        height: 100vh;
    }

    .dss-content-container.kt-container-fluid {
        padding: 18px 16px 24px;
    }
}

@media (max-width: 42rem) {
    .dss-topbar__brand a {
        width: 126px;
    }

    .dss-topbar__brand img {
        width: 126px;
    }

    .dss-language-switch a {
        width: 35px;
    }

    .dss-stepper {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .dss-stepper ol {
        min-width: 600px;
    }
}

@media (max-width: 40rem) {
    .dss-content-card {
        padding: 15px;
    }

    .dss-auth-card {
        margin: 0 auto;
        padding: 20px;
    }
}
