:root {
    --font-family-base: "Inter", Arial, sans-serif;
    --font-size-caption: .6875rem;
    --font-size-small: .75rem;
    --font-size-label: .8125rem;
    --font-size-body: .875rem;
    --font-size-control: .9375rem;
    --font-size-badge: 12.2px;
    --font-size-base: 1rem;
    --font-size-large: 1.125rem;
    --font-size-icon: 1.25rem;
    --font-size-card-title: 1.625rem;
    --font-size-navigation: var(--font-size-base);
    --font-size-heading: 1.75rem;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --line-height-base: 1.5;
    --line-height-compact: 1.2;
    --primary-outline-hover: #e45c5c;
}

html {
    font-size: 16px;
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-family-base);
}

body {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-base);
}

button,
input,
select,
textarea {
    font-size: inherit;
}

h1,
h2,
h3,
p {
    font-family: inherit;
}
/* Shared admin layout primitives */
.admin-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #253335;
    background: #f7f8f4;
    font-family: var(--font-family-base);
}

.admin-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr) 44px;
}

.admin-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    color: #fff;
    background: #101a20;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-width: 190px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.admin-brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: .25rem;
    color: #101a20;
    background: #fff;
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .06em;
}

.sidebar-toggle,
.icon-button {
    position: relative;
    border: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.sidebar-toggle {
    display: none;
    font-size: var(--font-size-icon);
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.icon-button {
    font-size: var(--font-size-icon);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 16px;
    padding: 2px 4px;
    border-radius: 20px;
    color: #fff;
    background: #be3f46;
    font-size: var(--font-size-caption);
}

.header-user {
    font-size: var(--font-size-body);
}

.logout-link {
    padding: .45rem .75rem;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: .3rem;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: var(--font-size-small);
    cursor: pointer;
}

.admin-sidebar {
    grid-column: 1;
    grid-row: 2 / 4;
    padding: 1.5rem .7rem;
    color: #b9c3c7;
    background: #101a20;
}

.sidebar-nav {
    display: grid;
    gap: .35rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem .85rem;
    border-radius: .45rem;
    color: inherit;
    font-size: var(--font-size-body);
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
}

.sidebar-nav a span {
    width: 1.1rem;
    text-align: center;
    font-size: inherit;
}

.sidebar-nav a.active {
    color: #162127;
    background: #fff;
}

.sidebar-nav a:hover {
    color: #fff;
    background: #243239;
}

.admin-main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1rem;
}

.page-header h1 {
    margin: 0;
    color: #17282b;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    letter-spacing: -.04em;
}

.page-header p:not(.page-eyebrow) {
    margin: .45rem 0 0;
    color: #71807d;
    font-size: var(--font-size-body);
}

.page-eyebrow {
    margin: 0 0 .45rem;
    color: #668078;
    font-size: var(--font-size-caption);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.primary-button,
.secondary-button, .primary-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem .9rem;
    border-radius: .35rem;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    border: 1px solid #101a20;
    color: #fff;
    background: #101a20;
}

.primary-button:hover {
    background: #243239;
}

.secondary-button {
    border: 1px solid #d5ddda;
    color: #405252;
    background: #fff;
}

.secondary-button:hover {
    border-color: #879795;
    background: #f5f8f6;
}
.primary-outline {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: #fff;
}

.primary-outline:hover {
    border-color: var(--primary-outline-hover);
    color: #fff;
    background: var(--primary-outline-hover);
}

.alert {
    margin-bottom: 1.25rem;
    padding: .8rem 1rem;
    border-radius: .35rem;
    font-size: var(--font-size-body);
}

.alert-success {
    border: 1px solid #b9ddc9;
    color: #22633d;
    background: #effaf3;
}

.alert-danger {
    border: 1px solid #f0b8b8;
    color: #9d3030;
    background: #fff3f3;
}

.content-card {
    overflow: hidden;
    border: 1px solid #dfe5e3;
    border-radius: .4rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(16, 26, 32, .04);
}

.card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9eeec;
}

.search-form {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: .5rem;
}

.search-form input {
    width: min(100%, 260px);
    min-height: 38px;
    padding: .55rem .75rem;
    border: 1px solid #d5ddda;
    border-radius: .35rem;
    font: inherit;
    font-size: var(--font-size-body);
    outline: 0;
}

.search-form input:focus {
    border-color: #66787c;
    box-shadow: 0 0 0 3px rgba(16, 26, 32, .08);
}

.admin-footer {
    grid-column: 2;
    grid-row: 3;
    padding: .85rem 2.5rem;
    color: #71807d;
    background: #fff;
    font-size: var(--font-size-caption);
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    top: 1rem;
    left: 1rem;
    z-index: 10;
    padding: .6rem;
    color: #fff;
    background: #101a20;
}

@media (max-width: 760px) {
    .admin-app {
        grid-template-columns: 1fr;
        grid-template-rows: 60px minmax(0, 1fr) 44px;
    }

    .admin-brand {
        min-width: 0;
    }

    .sidebar-toggle {
        display: block;
        order: -1;
    }

    .admin-sidebar {
        position: fixed;
        top: 60px;
        bottom: 0;
        left: 0;
        z-index: 5;
        width: 230px;
        transform: translateX(-100%);
        transition: transform .2s;
    }

    .admin-page.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
    }

    .admin-page.sidebar-open .sidebar-backdrop {
        position: fixed;
        inset: 60px 0 0;
        z-index: 4;
        display: block;
        background: rgba(16, 26, 32, .35);
    }

    .admin-main,
    .admin-footer {
        grid-column: 1;
    }

    .admin-footer {
        padding: .85rem 1.25rem;
    }

    .header-user {
        display: none;
    }

    .page-content {
        padding: 1.5rem 1.25rem;
    }

    .card-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form input {
        flex: 1;
        width: auto;
    }
}
/* Reference admin shell */
.user-app {
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #253335;
    background: #101a20;
    font-family: var(--font-family-base);
}

.sidebar {
    width: 225px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 1rem 1rem 1.5rem;
    color: #fff;
    background: #101a20;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 42px;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: var(--font-size-body);
    font-weight: 600;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    color: #d9edf2;
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: .25rem;
    padding: 0 .35rem;
}

.sidebar-nav a,
.logout-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .78rem .8rem;
    border-radius: .5rem;
    color: #b9c3c7;
    font-size: var(--font-size-control);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.sidebar-nav a span,
.logout-link span {
    width: 1.1rem;
    color: #b6dce9;
    text-align: center;
}

.sidebar-nav a.active {
    color: #162127;
    background: #fff;
}

.sidebar-nav a:hover {
    color: #fff;
    background: #243239;
}

.sidebar-nav a.active span {
    color: #315e78;
}

.sidebar-nav a:hover span {
    color: #fff;
}

.logout-form {
    margin-top: auto;
}

.logout-link {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.logout-link:hover {
    color: #fff;
    background: #243239;
}

.main-content {
    min-width: 0;
    min-height: calc(100vh - 10px);
    flex: 1;
    margin: 5px 5px 5px 0;
    overflow: auto;
    border-radius: 13px;
    background: #f7f8f4;
}

.main-content > .page-header {
    min-height: 42px;
    margin-bottom: 1.5rem;
}

.topbar-title {
    margin: 0;
    color: #101a20;
    font-size: var(--font-size-heading);
    font-weight: 400;
    letter-spacing: -.04em;
}

.topbar-section {
    color: #668078;
    font-size: var(--font-size-caption);
    font-weight: 600;
    letter-spacing: .12em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.header-icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccd8e2;
    border-radius: .4rem;
    color: #182932;
    background: #fff;
    font-size: var(--font-size-large);
    cursor: pointer;
}

.profile {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-left: .15rem;
    font-size: var(--font-size-small);
}

.profile-avatar {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #73849b;
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.profile strong,
.profile small {
    display: block;
}

.profile small {
    margin-top: .15rem;
    color: #71807d;
    font-size: var(--font-size-caption);
}

@media (max-width: 760px) {
    .user-app {
        display: block;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .brand {
        margin-bottom: 1rem;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
    }

    .sidebar-nav a {
        flex: 1 0 auto;
        justify-content: center;
    }

    .logout-form {
        display: none;
    }

    .main-content {
        min-height: auto;
        margin: 0;
        border-radius: 0;
    }
}
/* Exact shell alignment from resources/html/user-list.html */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.user-app {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    padding: 0;
    border: 5px solid #0a66c2;
    overflow: hidden;
    background: #101a20;
}

.user-app > .sidebar {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    height: 100%;
    min-height: 0;
    flex: 0 0 220px;
    padding: 1rem;
    border-radius: 10px 0 0 10px;
    background: #101a20;
}

.sidebar .brand {
    min-height: 42px;
    justify-content: center;
    gap: .6rem;
    font-size: var(--font-size-body);
    line-height: 1;
}

.sidebar .brand-mark {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    font-size: var(--font-size-caption);
}

.sidebar .sidebar-nav {
    display: grid;
    gap: .25rem;
    padding: 0 .35rem;
}

.sidebar .sidebar-nav a,
.sidebar .logout-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: .75rem;
    padding: .625rem .75rem;
    border-radius: .5rem;
    font-size: var(--font-size-control);
}

.sidebar .sidebar-nav svg,
.sidebar .logout-link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: #b6dce9;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar .sidebar-nav a.active svg {
    stroke: #315e78;
}

.sidebar-nav-group-title {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: .75rem;
    padding: .625rem .75rem;
    border-radius: .5rem;
    color: inherit;
    font-size: var(--font-size-control);
    cursor: pointer;
    list-style: none;
}

.sidebar-nav-group-title::-webkit-details-marker {
    display: none;
}

.sidebar-nav-group-arrow {
    width: 18px;
    height: 18px;
    margin-left: auto;
    fill: none;
    stroke: #00a8ff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

.sidebar-nav-group[open] .sidebar-nav-group-arrow {
    transform: rotate(180deg);
}

.sidebar-nav-group-title i {
    width: 18px;
    color: #b6dce9;
    text-align: center;
}

.sidebar-nav-group.is-active .sidebar-nav-group-title {
    color: #fff;
}

.sidebar-nav-child {
    min-height: 38px !important;
    margin: 0 0 .15rem 1.15rem;
    padding: .45rem .75rem !important;
    border-left: 2px solid rgba(182, 220, 233, .35);
    border-radius: 0 .5rem .5rem 0 !important;
    font-size: calc(var(--font-size-control) - 1px) !important;
}

.sidebar-nav-child::before {
    content: '';
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #fff41e;
}

.sidebar-nav-child.active::before {
    background: #fff41e;
}

.sidebar .logout-form {
    margin-top: auto;
}

.user-app > .main-content {
    width: calc(100vw - 225px);
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    overflow: auto;
    border-radius: 0 13px 13px 0;
    background: #f7f8f4;
    box-shadow: inset 1px 0 #101a20;
}

.main-content > .page-header {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.5rem;
    box-shadow: 0 2px 0 rgba(15, 23, 42, 0.04);
}

.main-content .topbar-title {
    margin: 0;
    font-size: var(--font-size-heading);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -.04em;
}

.main-content .header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.main-content .header-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border-radius: .4rem;
}

.main-content .header-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #182932;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.main-content .header-icon.header-nav-toggle svg {
    stroke: #ffffff;
    stroke-width: 2;
}

.main-content .profile {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-left: .15rem;
    font-size: var(--font-size-small);
}

.main-content .profile-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    font-size: var(--font-size-caption);
}

@media (max-width: 800px) {
    .user-app > .sidebar {
        width: 190px;
        min-width: 190px;
        max-width: 190px;
        flex-basis: 190px;
    }

    .user-app > .main-content {
        width: calc(100vw - 195px);
    }

}

@media (max-width: 560px) {
    .user-app {
        height: auto;
        min-height: 100vh;
        display: block;
        border: 0;
        overflow: visible;
    }

    .user-app > .sidebar,
    .user-app > .main-content {
        width: 100%;
        max-width: none;
        height: auto;
        border-radius: 0;
    }

    .user-app > .sidebar {
        min-height: auto;
    }

    .sidebar .sidebar-nav {
        display: flex;
        overflow-x: auto;
    }

    .sidebar .sidebar-nav a {
        flex: 1 0 auto;
        justify-content: center;
    }
    .header-branch {
        display: none !important;
    }
}
.sidebar .sidebar-nav a > span,
.sidebar .logout-link > span {
    width: auto;
    flex: 1 1 auto;
    color: inherit;
    text-align: left;
}
/* Shared typography application */
.sidebar .sidebar-nav a,
.sidebar .logout-link {
    font-size: var(--font-size-navigation);
    font-weight: var(--font-weight-regular);
}

.sidebar .brand {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
}

.main-content .topbar-title,
.page-header h1 {
    font-size: var(--font-size-heading);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-compact);
}

.main-content .profile,
.page-header p,
.primary-button,
.secondary-button {
    font-size: var(--font-size-list-page);
}

.main-content .profile strong {
    font-weight: var(--font-weight-semibold);
}

.main-content .profile small,
.page-eyebrow {
    font-size: var(--font-size-caption);
}
:root {
    --font-size-list-page: 0.9rem;
    --font-size-form-label: 0.9rem;
    --font-size-form-value: var(--font-size-list-page);
    --font-weight-form-label: var(--font-weight-regular);
    --color-required: #dc3545;
}

:root {
    --layout-sidebar-width: 13.75rem;
    --layout-main-gutter-x: 1.75rem;
    --layout-main-gutter-y: 1.5rem;
    --layout-page-gap: 1.25rem;
}

.user-app > .sidebar {
    width: var(--layout-sidebar-width);
    min-width: var(--layout-sidebar-width);
    max-width: var(--layout-sidebar-width);
}

.user-app > .main-content {
    width: calc(100vw - var(--layout-sidebar-width));
}

.page-content {
    max-width: none;
    margin: 0;
    padding: 1rem 2rem;
}

.page-list-page,
.branch-page,
.user-form-page,
.branch-form-page {
    display: grid;
}

.main-content > .page-header {
    min-height: 2.625rem;
    margin-bottom: .1rem;
}

.main-content > .page-header.page-header-actions-only {
    justify-content: flex-end;
}

.page-header-inline {
    min-height: 0;
}

.page-header-inline h1 {
    margin: 0;
    color: #17282b;
    font-size: var(--font-size-heading);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-compact);
    letter-spacing: -.04em;
}

@media (max-width: 800px) {
    .user-app > .sidebar {
        width: 11.875rem;
        min-width: 11.875rem;
        max-width: 11.875rem;
        flex-basis: 11.875rem;
    }

    .user-app > .main-content {
        width: calc(100vw - 12.1875rem);
    }
}

:root {
    --font-size-page-inline-title: 1.5rem;
}

.page-header-inline {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-header-inline h1 , .header-text h1{
    margin: 0;
    color: #17282b;
    font-size: var(--font-size-page-inline-title);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-compact);
    letter-spacing: -.04em;
}

.page-header-inline .primary-button {
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .page-header-inline {
        align-items: center;
    }
}

.page-module-page {
    display: grid;
}

.page-header-actions-only {
    justify-content: flex-end;
}

.page-header-module {
    align-items: flex-start;
}

.page-header-module > div:first-child {
    min-width: 0;
}

.page-header-module .page-eyebrow {
    margin-bottom: .4rem;
}

.page-header-module p:not(.page-eyebrow) {
    max-width: 38rem;
    margin-top: .4rem;
}

.page-header-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.page-header-actions-inline .primary-button,
.page-header-actions-inline .secondary-button {
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .page-header-module {
        align-items: stretch;
    }

    .page-header-actions-inline {
        margin-left: 0;
    }
}

.page-list-page {
    gap: .75rem;
}

.page-header-module .page-eyebrow {
    display: none;
}

.page-header-module p:not(.page-eyebrow) {
    margin-top: .3rem;
}

.form-field label .required-mark {
    color: var(--color-required);
}

.form-field label .field-optional {
    color: #71807d;
}

.status-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    min-height: 2.75rem;
    font-size: var(--font-size-form-value);
}

.status-radio-option {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #182932;
}

.status-radio-option input[type="radio"] {
    margin: 0;
    accent-color: #101a20;
}

.status-toggle-field {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.75rem;
    font-size: var(--font-size-form-value);
}

.status-toggle-current {
    color: #10b981;
    font-weight: var(--font-weight-medium);
}

.status-toggle-current.is-inactive {
    color: #f59e0b;
}

.status-toggle-label {
    color: #f59e0b;
    font-weight: var(--font-weight-medium);
}

.status-toggle-label.is-active {
    color: #10b981;
}

.status-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-toggle-switch {
    width: 2.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    padding: .125rem;
    border-radius: 999px;
    background: #94a3b8;
    cursor: pointer;
    transition: background .2s ease;
}

.status-toggle-switch::before {
    content: "";
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}

.status-toggle-input:checked + .status-toggle-switch {
    background: #10b981;
}

.status-toggle-input:checked + .status-toggle-switch::before {
    transform: translateX(1rem);
}

.form-card .form-field .status-toggle-field {
    grid-column: 2;
    justify-self: start;
}

.status-toggle-field {
    min-width: 0;
}

.status-toggle-label {
    min-width: 3.25rem;
}

.status-toggle-switch {
    flex: 0 0 2.25rem;
}

@media (max-width: 560px) {
    .form-card .form-field .status-toggle-field {
        grid-column: auto;
        width: 100%;
    }
}
.user-form-page .form-field.status-field .status-toggle-field,
.branch-form-page .form-field.status-field .status-toggle-field {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: .55rem;
    width: auto;
    min-width: 0;
}

.user-form-page .form-field.status-field .status-toggle-label,
.branch-form-page .form-field.status-field .status-toggle-label {
    display: inline-block;
    min-width: 3.75rem;
    line-height: 1;
    white-space: nowrap;
}

.user-form-page .form-field.status-field .status-toggle-switch,
.branch-form-page .form-field.status-field .status-toggle-switch {
    flex: 0 0 2.25rem;
}

@media (max-width: 560px) {
    .user-form-page .form-field.status-field .status-toggle-field,
    .branch-form-page .form-field.status-field .status-toggle-field {
        grid-column: auto;
        width: 100%;
    }
}

.status-toggle-field {
    position: relative;
}

.status-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Responsive shell refresh */
:root {
    --shell-sidebar-width: clamp(15rem, 18vw, 17.5rem);
    --shell-content-padding: clamp(1rem, 2vw, 1.75rem);
    --shell-surface-radius: clamp(.75rem, 1.25vw, 1rem);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.user-app {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(14rem, var(--shell-sidebar-width)) minmax(0, 1fr);
    align-items: stretch;
    margin: 0;
    border-left: 0;
    overflow: clip;
    background: #101a20;
}

body.user-app > .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    border-radius: 0;
}

body.user-app > .main-content {
    width: auto !important;
    min-width: 0;
    min-height: calc(100vh - .5rem);
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--shell-surface-radius);
}

.sidebar-backdrop {
    display: none;
}

.header-shell {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.header-nav-toggle {
    display: none;
    flex: 0 0 auto;
}

.header-nav-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-actions {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: space-between;
}

.profile {
    min-width: 0;
}

.profile > span:last-child {
    min-width: 0;
}

.profile strong,
.profile small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-content {
    min-width: 0;
    margin-inline: auto;
}

/* Shared topbar typography and alignment */
.main-content > .page-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 78px;
    padding: 1rem 2.5rem;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #e6ebe8;
    box-sizing: border-box;
}
.main-content .header-actions {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-left: auto;
}
.main-content .header-message {
    width: 48px;
    height: 48px;
    border: 1px solid #d7e0ea;
    border-radius: .65rem;
    color: #18324b;
    background: #fff;
    font-size: 1rem;
}
.main-content .header-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 48px;
    padding: .3rem .85rem;
    border: 1px solid #d7e0ea;
    border-radius: .9rem;
    color: #18324b;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}
.main-content .avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: #0c4a8a;
    font-size: .875rem;
    font-weight: 700;
}
@media (max-width: 700px) {
    .main-content > .page-header { min-height: 64px; padding-inline: 1rem; }
    .main-content .header-message { width: 38px; height: 38px; }
    .main-content .header-user { min-height: 38px; padding-inline: .5rem; }
    .main-content .header-user > span:not(.avatar) { display: none; }
}

/* Shared shell placement: brand in the topbar, signed-in user in the sidebar. */
.topbar-brand {
    color: #102a43;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
}
.sidebar-user-menu { position: relative; }
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 58px;
    margin: 0 0 1.15rem;
    padding: .55rem .45rem;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}
.sidebar-user::-webkit-details-marker { display: none; }
.sidebar-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    background: #0c4a8a;
    font-size: 1rem;
    font-weight: 700;
}
.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.sidebar-user-details { display: flex; min-width: 0; flex-direction: column; gap: .15rem; }
.sidebar-user-details strong,
.sidebar-user-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-details strong { font-size: .9rem; font-weight: 600; }
.sidebar-user-details small { color: #b9d0e4; font-size: .7rem; }
.sidebar.role-superuser .sidebar-user-role,
.sidebar.role-manager .sidebar-user-role,
.sidebar.role-telecaller .sidebar-user-role { color: #fff; }
.sidebar.role-superuser .sidebar-user-avatar { background: #7c3aed; }
.sidebar.role-manager .sidebar-user-avatar { background: #2563eb; }
.sidebar.role-telecaller .sidebar-user-avatar { background: #059669; }
.sidebar-user-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 1rem; width: 1rem; height: 1rem; margin-left: auto; color: #b9d0e4; font-size: .7rem; transition: transform .15s ease; }
.sidebar-user-menu[open] .sidebar-user-arrow { transform: rotate(180deg); }
.sidebar-user-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% - .65rem);
    right: .45rem;
    left: .45rem;
    padding: .3rem;
    border: 1px solid #d9e4ee;
    border-radius: .5rem;
    background: #fff;
    box-shadow: 0 .5rem 1rem rgba(12, 34, 55, .2);
}
.sidebar-user-dropdown-item { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: .35rem; color: #18324b; font-size: .8rem; text-decoration: none; }
.sidebar-user-dropdown-item:hover { color: #0a66c2; background: #fff1f1; }
.sidebar-user-dropdown-item i { font-size: .95rem; }

/* Compact navigation controls; hover changes colour only, never the element size. */
body.user-app > .sidebar .sidebar-nav a {
    min-height: 40px;
    padding: .5rem .7rem;
    border: 1px solid transparent;
    border-radius: .45rem;
    font-size: 16px;
}
body.user-app > .sidebar .sidebar-nav a:hover,
body.user-app > .sidebar .sidebar-nav a.active {
    border-width: 1px;
}

/* Consistent compact action sizing across the application. */
body.user-app .primary-button,
body.user-app .secondary-button {
    min-height: 36px;
    padding: .5rem .85rem;
    font-size: .8rem;
}

body.user-app .search-field input::placeholder,
body.user-app input[type="search"]::placeholder {
    font-size: 14.4px;
}

body.user-app select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2318324b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right .75rem center;
    background-repeat: no-repeat;
    background-size: 14px;
    padding-right: 2.25rem !important;
}

body.user-app .primary-button,
body.user-app .secondary-button,
body.user-app button.primary-button,
body.user-app button.secondary-button,
body.user-app .topbar-logout {
    font-size: 14.4px;
    font-weight: 600;
}

body.user-app .primary-button i,
body.user-app button.primary-button i {
    color: #fff;
    font-size: 1.05em;
    opacity: 1;
    -webkit-text-stroke: .15px currentColor;
}

body.user-app .secondary-button i,
body.user-app button.secondary-button i {
    color: #18324b;
    font-size: 1.05em;
    opacity: 1;
    -webkit-text-stroke: .15px currentColor;
}

body.user-app .topbar-notification i {
    color: #18324b;
    font-size: 1.2rem;
    opacity: 1;
    -webkit-text-stroke: .2px currentColor;
}
.topbar-logout-form { margin: 0; }
.notification-menu {
    position: relative;
}
.notification-menu summary {
    list-style: none;
}
.notification-menu summary::-webkit-details-marker {
    display: none;
}
.notification-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + .55rem);
    right: 0;
    width: min(330px, calc(100vw - 2rem));
    padding: .75rem;
    border: 1px solid #d7e0ea;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(24, 50, 75, .14);
}
.notification-dropdown > strong {
    display: block;
    padding: .25rem .5rem .6rem;
    color: #18324b;
}
.notification-dropdown form { margin: 0; }
.notification-dropdown button {
    display: block;
    width: 100%;
    padding: .65rem .5rem;
    border: 0;
    border-top: 1px solid #edf1f5;
    color: #18324b;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.notification-dropdown button:hover { background: #f7f9fb; }
.notification-dropdown small {
    display: block;
    margin-top: .2rem;
    color: #718096;
}
.notification-dropdown p {
    margin: 0;
    padding: .5rem;
    color: #718096;
}
.notification-view-all {
    display: block;
    margin: .45rem .5rem 0;
    padding-top: .65rem;
    border-top: 1px solid #edf1f5;
    color: #18324b;
    font-size: .8rem;
    text-decoration: none;
}
.notification-view-all:hover { color: #0a66c2; }
.notification-page {
    width: min(100% - 2rem, 1100px);
    margin: 0 auto;
    padding: 1.6rem 0 2.5rem;
}
.notification-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}
.notification-page-title h2 { margin: 0; color: #102a43; font-size: 2rem; font-weight: 400; }
.notification-page-title form { margin: 0; }
.notification-list { overflow: hidden; }
.notification-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf1f5;
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.is-unread { background: #f7faff; }
.notification-item-icon { color: #0a66c2; font-size: 1.15rem; }
.notification-item-content { flex: 1; min-width: 0; }
.notification-item-content strong { display: block; color: #18324b; font-weight: 600; }
.notification-item-content small { display: block; margin-top: .25rem; color: #718096; }
.notification-item-actions { display: flex; align-items: center; gap: .8rem; white-space: nowrap; }
.notification-item-actions a,
.notification-item-actions button { border: 0; color: #18324b; background: transparent; font-size: .82rem; text-decoration: none; cursor: pointer; }
.notification-item-actions a:hover,
.notification-item-actions button:hover { color: #0a66c2; }
.notification-item-actions form { margin: 0; }
@media (max-width: 650px) {
    .notification-page { width: min(100% - 1.5rem, 1100px); padding-top: 1rem; }
    .notification-page-title { align-items: flex-start; flex-direction: column; }
    .notification-page-title h2 { font-size: 1.6rem; }
    .notification-item { align-items: flex-start; flex-wrap: wrap; padding: 1rem; }
    .notification-item-actions { width: 100%; padding-left: 2rem; }
}
.main-content .topbar-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d7e0ea;
    border-radius: .7rem;
    color: #18324b;
    background: #fff;
    cursor: pointer;
    font-size: 1.15rem;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

/* Final button typography override for the user application shell. */
body.user-app .primary-button,
body.user-app .secondary-button,
body.user-app button.primary-button,
body.user-app button.secondary-button,
body.user-app .topbar-logout {
    font-size: 14.4px !important;
    font-weight: 600 !important;
}
.main-content .topbar-notification:hover,
.main-content .topbar-notification:focus-visible {
    border-color: #18324b;
    color: #0a66c2;
    background: #f7f9fb;
    outline: 0;
}
.notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 6px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #0a66c2;
}
.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    height: 44px;
    min-height: 44px;
    padding: .55rem .95rem;
    border: 1px solid #0a66c2;
    border-radius: .7rem;
    color: #0a66c2;
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-size: .8rem;
    font-size: .8rem;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.topbar-logout:hover,
.topbar-logout:focus-visible { border-color: #b8050f; color: #fff; background: #0a66c2; outline: 0; }
@media (max-width: 700px) {
    .topbar-brand { font-size: 1rem; }
    .main-content .topbar-notification { width: 38px; height: 38px; }
    .topbar-logout { height: 38px; min-height: 38px; padding: .45rem .7rem; }
}

.content-card,
.form-card,
.detail-card,
.table-scroll {
    max-width: 100%;
}

@media (max-width: 960px) {
    body.user-app {
        grid-template-columns: minmax(0, 1fr);
    }

    body.user-app.sidebar-open {
        overflow: hidden;
    }

    body.user-app > .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(15rem, 86vw) !important;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    body.user-app.sidebar-open > .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        border: 0;
        opacity: 0;
        pointer-events: none;
        background: rgba(16, 26, 32, .42);
        transition: opacity .2s ease;
    }

    body.user-app.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    body.user-app > .main-content {
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .header-nav-toggle {
        display: inline-flex;
    }

    .sidebar .brand {
        justify-content: flex-start;
        margin-bottom: 1.5rem;
    }

    .sidebar .sidebar-nav {
        display: grid;
        overflow: visible;
    }

    .sidebar .logout-form {
        display: block;
    }

    .page-header,
    .page-header-inline,
    .page-header-module {
        align-items: center;
    }

    .page-header-actions-inline,
    .header-actions {
        margin-left: 0;
    }
}

@media (max-width: 640px) {

    .header-actions {
        gap: .5rem;
    }

    .profile > span:last-child {
        flex: 1 1 auto;
    }

    .page-content {
        width: 100%;
    }
}

.brand-logo {
    display: block;
    width: min(11.5rem, 100%);
    height: auto;
    max-height: 4.5rem;
    aspect-ratio: 5 / 2;
    object-fit: contain;
    contain: paint;
}

.sidebar .brand {
    justify-content: center;
    padding-inline: .5rem;
}

@media (max-width: 960px) {
    .sidebar .brand {
        justify-content: center;
    }
}

/* Header alignment and sidebar brand follow-up */
.header-shell .header-actions {
    margin-left: auto;
}

.header-branch {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    gap: .5rem;
}

.header-branch span {
    flex: 0 0 auto;
    color: #718096;
    font-size: 1rem;
    line-height: 1.2;
}

.header-branch strong {
    overflow: hidden;
    color: #172b4d;
    font-size: .9rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-branch-control {
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 2.125rem;
    padding: .35rem .75rem;
    border: 1px solid #d9e4ee;
    border-radius: .75rem;
    background: #fff;
    color: #172b4d;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
}

.header-branch-control-readonly {
    cursor: default;
}

.header-branch-form {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.header-branch-control:focus {
    outline: none;
    border-color: #9ab7d3;
    box-shadow: 0 0 0 3px rgba(154, 183, 211, .2);
}

@media (min-width: 650px) {

    .profile-name-wrap{
        display: flex !important;
    }
}

@media (max-width: 960px) {
    .header-shell .header-actions {
        margin-left: 0;
    }
}
.profile-avatar-image {
    object-fit: cover;
    background: #d7e0df;
}

/* Sidebar refresh aligned to resources/html/user-list.html */
:root {
    --color-sidebar-bg: #0f2742;
    --color-sidebar-hover: #16395e;
    --color-sidebar-icon: #8fd3ff;
    --color-sidebar-text: #d8e8f8;
    --color-sidebar-active-text: #0f2742;
    --color-sidebar-active-bg: #ffffff;
    --color-primary: #0d6efd;
    --color-primary-hover: #0b5ed7;
    --color-secondary-border: #bfd3ea;
    --color-secondary-text: #28527a;
    --color-secondary-hover: #edf5ff;
}

body.user-app {
    background: var(--color-sidebar-bg);
}

body.user-app > .sidebar {
    background: linear-gradient(180deg, #0f2742 0%, #12345a 100%);
}

.sidebar .sidebar-nav a,
.sidebar .logout-link {
    color: var(--color-sidebar-text);
}

.sidebar .sidebar-nav a:hover,
.sidebar .logout-link:hover {
    background: var(--color-sidebar-hover);
}

.sidebar .sidebar-nav a.active {
    color: var(--color-sidebar-active-text);
    background: var(--color-sidebar-active-bg);
}

.sidebar .sidebar-nav svg,
.sidebar .logout-link svg {
    stroke: var(--color-sidebar-icon);
}

.sidebar .sidebar-nav i,
.sidebar .logout-link i {
    width: 18px;
    min-width: 18px;
    flex: 0 0 18px;
    color: var(--color-sidebar-icon);
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.sidebar .sidebar-nav a.active svg,
.sidebar .sidebar-nav a.active i {
    stroke: var(--color-sidebar-active-text);
    color: var(--color-sidebar-active-text);
}

.primary-button {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.primary-button:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
}

.secondary-button {
    border-color: var(--color-secondary-border);
    color: var(--color-secondary-text);
}

.secondary-button:hover {
    border-color: var(--color-primary);
    background: var(--color-secondary-hover);
}

.profile-link {
    color: inherit;
    text-decoration: none;
}

.profile-link:hover strong,
.profile-link:hover small {
    color: var(--color-primary);
}
/* Profile dropdown */
.profile-menu {
    position: relative;
}

.profile-menu > summary {
    list-style: none;
    cursor: pointer;
}

.profile-menu > summary::-webkit-details-marker {
    display: none;
}

.profile-summary {
    gap: .45rem;
    padding: .3rem .55rem;
    border: 1px solid #d9e4ee;
    border-radius: .55rem;
    background: #fff;
}

.profile-name-wrap {
    display: none;
    align-items: center;
    min-width: 0;
}

.profile-summary strong {
    color: #172b4d;
    font-size: .95rem;
}

.profile-summary small {
    display: none;
}

.profile-trigger {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #5b6b7c;
    text-decoration: none;
}

.profile-trigger svg {
    width: .95rem;
    height: .95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-trigger:hover {
    color: var(--color-primary);
    background: #edf5ff;
}

.profile-menu[open] .profile-trigger {
    color: var(--color-primary);
    background: #edf5ff;
}

.profile-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + .5rem);
    right: 0;
    min-width: 10.5rem;
    padding: .35rem;
    border: 1px solid #d9e4ee;
    border-radius: .55rem;
    background: #fff;
    box-shadow: 0 .5rem 1rem rgba(23, 43, 77, .14);
}

.profile-dropdown-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .6rem;
    padding: .55rem .65rem;
    border: 0;
    border-radius: .35rem;
    color: #172b4d;
    background: transparent;
    font: inherit;
    text-decoration: none;
    text-align: left;
}

.profile-dropdown-item:hover,
.profile-dropdown-item:focus-visible {
    color: var(--color-primary);
    background: #fff1f1;
    outline: none;
}

.profile-dropdown-item svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.profile-dropdown-divider {
    height: 1px;
    margin: .35rem 0;
    background: #e5edf4;
}
/* Sidebar colour update to match profile mockup */
:root {
    --color-sidebar-bg: #193454;
    --color-sidebar-hover: #234568;
    --color-sidebar-icon: #d6e7fb;
    --color-sidebar-text: #eef4fb;
    --color-sidebar-active-text: #102543;
    --color-sidebar-active-bg: #ffffff;
}

body.user-app > .sidebar {
    background: linear-gradient(180deg, #193454 0%, #1d3b5e 100%);
}

.sidebar .sidebar-nav {
    gap: .6rem;
}

.sidebar .sidebar-nav a,
.sidebar .logout-link {
    min-height: 2.7rem;
    border-radius: .7rem;
}

.sidebar .sidebar-nav a.active {
    box-shadow: 0 8px 18px rgba(8, 23, 40, .12);
}
/* User list screenshot colour refresh */
:root {
    --color-sidebar-bg: #0a66c2;
    --color-sidebar-hover: #08549f;
    --color-sidebar-icon: #ffffff;
    --color-sidebar-text: #fff5f5;
    --color-sidebar-active-text: #101820;
    --color-sidebar-active-bg: #fff41e;
    --color-primary: #0a66c2;
    --color-primary-hover: #08549f;
    --color-secondary-border: #d9e4ee;
    --color-secondary-text: #101820;
    --color-secondary-hover: #f8fafc;
}

body.user-app {
    background: #0a66c2;
}

body.user-app > .sidebar {
    background: #0a66c2;
}

.sidebar .sidebar-nav a,
.sidebar .logout-link {
    color: var(--color-sidebar-text);
}

.sidebar .sidebar-nav a:hover,
.sidebar .logout-link:hover {
    background: rgba(255, 255, 255, .14);
}

.sidebar .sidebar-nav a.active {
    color: var(--color-sidebar-active-text);
    background: var(--color-sidebar-active-bg);
    box-shadow: none;
}

.sidebar .sidebar-nav svg,
.sidebar .logout-link svg {
    stroke: var(--color-sidebar-icon);
}

.sidebar .sidebar-nav i,
.sidebar .logout-link i {
    width: 18px;
    min-width: 18px;
    flex: 0 0 18px;
    color: var(--color-sidebar-icon);
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.sidebar .sidebar-nav a.active svg,
.sidebar .sidebar-nav a.active i {
    stroke: var(--color-sidebar-active-text);
    color: var(--color-sidebar-active-text);
}

.primary-button {
    border-color: var(--color-primary);
    background: var(--color-primary);
    box-shadow: none;
}

.primary-button:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
}

.secondary-button {
    border-color: var(--color-secondary-border);
    color: var(--color-secondary-text);
    background: #fff;
}

.secondary-button:hover {
    border-color: #c8d5e3;
    background: var(--color-secondary-hover);
}
/* Global red button theme refinement */
.primary-button,
button.primary-button,
a.primary-button {
    border-color: #0a66c2;
    color: #fff;
    background: #0a66c2;
}

.primary-button:hover,
button.primary-button:hover,
a.primary-button:hover {
    border-color: #08549f;
    color: #fff;
    background: #08549f;
}
/* Remove sidebar divider line */
body.user-app > .main-content {
    box-shadow: none;
}

/* Final shell normalization: keep the standard two-column app structure above any earlier conflicting overrides. */
:root {
    --shell-stable-sidebar-width: 220px;
    --shell-stable-main-radius: 13px;
}

body.user-app {
    width: 100%;
    min-height: 100vh;
    display: flex !important;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0;
}

body.user-app > .sidebar {
    flex: 0 0 var(--shell-stable-sidebar-width);
    width: var(--shell-stable-sidebar-width) !important;
    min-width: var(--shell-stable-sidebar-width) !important;
    max-width: var(--shell-stable-sidebar-width) !important;
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
    justify-self: stretch;
}

body.user-app > .main-content {
    flex: 1 1 auto;
    display: block;
    width: auto !important;
    min-width: 0;
    min-height: calc(100vh - 10px);
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--shell-stable-main-radius);
    background: #f7f8f4;
    box-shadow: none;
}

body.user-app > .main-content > .page-header,
body.user-app > .main-content .page-header-actions-only {
    display: flex;
}

@media (max-width: 960px) {
    body.user-app {
        flex-direction: column;
        overflow-y: auto;
        border: 0;
    }

    body.user-app > .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        min-width: min(15rem, 86vw) !important;
        max-width: min(18rem, 86vw) !important;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    body.user-app.sidebar-open > .sidebar {
        transform: translateX(0);
    }

    body.user-app > .main-content {
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
}@media (min-width: 961px) {
    body.user-app.sidebar-open {
        overflow-y: auto;
    }

    body.user-app.sidebar-open > .sidebar {
        position: static;
        inset: auto;
        width: auto !important;
        height: auto;
        transform: none;
        box-shadow: none;
    }

    body.user-app.sidebar-open .sidebar-backdrop {
        display: none !important;
    }
}

.page-module-page .detail-card .detail-label {
    font-size: var(--font-size-form-label);
    font-weight: var(--font-weight-form-label);
}

.page-module-page .detail-card .detail-value,
.page-module-page .detail-card .status-control {
    font-size: var(--font-size-form-value);
}


.text-nowrap {
    white-space: nowrap;
}

/* One shared search and pagination system for all list pages. */
.filters,
.lead-filters,
.common-filter-bar {
    display: grid !important;
    grid-template-columns: minmax(250px, 1.3fr) minmax(170px, .8fr) minmax(170px, .8fr) auto auto !important;
    align-items: center;
    gap: .75rem !important;
    width: 100%;
    margin-bottom: 1rem !important;
    padding: 1rem 1.1rem !important;
    box-sizing: border-box;
    border: 1px solid #cddbe8;
    border-radius: .7rem;
    background: #fff;
}

.filters .search-field,
.lead-filters .search-field,
.common-filter-bar .search-field {
    position: relative;
    min-width: 0;
}

.filters input,
.filters select,
.lead-filters input,
.lead-filters select,
.common-filter-bar input,
.common-filter-bar select {
    width: 100%;
    min-height: 38px !important;
    box-sizing: border-box;
    border: 1px solid #d9e0e5;
    border-radius: .4rem;
    padding: .45rem .7rem !important;
    color: #253335;
    background: #fff;
    font-size: .8rem !important;
}

.filters .search-field input,
.lead-filters .search-field input,
.common-filter-bar .search-field input {
    padding-right: 2.4rem !important;
}

.filters .search-field i,
.lead-filters .search-field i,
.common-filter-bar .search-field i {
    position: absolute;
    top: 50%;
    right: .9rem;
    transform: translateY(-50%);
    color: #668096;
}

.filters .primary-button,
.filters .secondary-button,
.lead-filters .primary-button,
.lead-filters .secondary-button,
.common-filter-bar .primary-button,
.common-filter-bar .secondary-button {
    min-height: 38px !important;
    padding: .45rem .85rem !important;
    font-size: .8rem;
    font-weight: 500;
}

.list-footer,
.common-list-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .75rem !important;
    color: #71817f;
    font-size: .8rem !important;
}

.list-footer .pagination-wrap,
.common-list-footer .pagination-wrap {
    margin: 0;
}

@media (max-width: 850px) {
    .filters,
    .lead-filters,
    .common-filter-bar {
        grid-template-columns: 1fr 1fr !important;
    }

    .filters .search-field,
    .lead-filters .search-field,
    .common-filter-bar .search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .filters,
    .lead-filters,
    .common-filter-bar {
        grid-template-columns: 1fr !important;
    }

    .filters .search-field,
    .lead-filters .search-field,
    .common-filter-bar .search-field {
        grid-column: auto;
    }

    .list-footer,
    .common-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
.actions {
    white-space: nowrap;
}

.actions a {
    color: #315e78;
    font-weight: 600;
    text-decoration: none;
}

.actions a:hover {
    text-decoration: underline;
}
.overflow-anywhere{
    overflow-wrap: anywhere;
}

.text-themecolor {
    color: var(--color-primary) !important;
}
.flex-wrap{
    flex-wrap: wrap;
}
.pt-05{
    padding-top: 0.5rem;
}
.p-0{
    padding: 0 !important;
}
.p-1{
    padding: 1rem;
}
.mr-auto{
    margin-right: auto;
}
.bg-white{
    background-color: #ffffff;
}
.border-bottom{
    border-bottom: 1px solid #d5ddda;
}
.border{
    border: 1px solid #ccd8e2;
}
.w-100{
    width: 100%;
}

.admin-table tbody tr[data-user-row] {
    background: #fff;
}
.admin-table tbody tr[data-user-row]:nth-of-type(4n-1), .admin-table tbody tr.even-stripped:nth-of-type(even) {
    background: #f9fafb;
}
.admin-table tbody > tr.is-open td > div {
    border-top: 1px solid #e4e9ed;
}
.admin-table tbody > tr:not(.is-last-accordion).is-open td > div {
    border-bottom: 1px solid #e4e9ed;
}

.d-flex{
    display: flex;
}
.align-items-center{
    align-items: center;
}
.g-05{
    gap: .5rem;
}
.topbar-pad{
    padding: 1rem !important;
}
