/*
 * Medeed shared design system
 * Keeps all areas visually consistent without duplicating view-level styles.
 */
/* Local Google Fonts Arabic subset; Latin glyphs keep the existing font stack. */
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/vazirmatn/vazirmatn-arabic-wght-v16.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E,
        U+FB50-FDFF, U+FE70-FEFC;
}

:root,
[data-bs-theme="light"] {
    --medeed-font-persian: "Vazirmatn";
    --tblr-font-sans-serif: var(--medeed-font-persian), "Inter Var", Inter,
        -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto,
        Helvetica Neue, sans-serif;
    --tblr-primary: #286fb7;
    --tblr-primary-rgb: 40, 111, 183;
    --tblr-link-color: #286fb7;
    --tblr-link-color-rgb: 40, 111, 183;
    --medeed-primary: #286fb7;
    --medeed-primary-dark: #174f88;
    --medeed-primary-rgb: 40, 111, 183;
    --medeed-sidebar-width: 16rem;
    --medeed-sidebar-collapsed-width: 4.5rem;
    --medeed-header-height: 4.25rem;
    --medeed-header-icon: #174f88;
    --medeed-bg: #f1f8fd;
    --medeed-surface: #fff;
    --medeed-text: #374151;
    --medeed-muted: #6b7280;
    --medeed-border: #e5e7eb;
    --medeed-sidebar-bg: #0b355e;
    --medeed-sidebar-bg-top: #0c3b68;
    --medeed-sidebar-text: #f2f7fc;
    --medeed-sidebar-muted: #aac7e2;
    --medeed-sidebar-active: #1267ab;
    --medeed-sidebar-interactive-text: #fff;
    --medeed-sidebar-hover: rgba(65, 145, 210, 0.22);
    --medeed-sidebar-submenu-bg: rgba(0, 0, 0, 0.1);
    --medeed-sidebar-brand-bg: #e3f0fb;
    --medeed-sidebar-brand-border: #cbdfee;
    --medeed-sidebar-brand-text: #0b355e;
    --medeed-sidebar-logo-filter: none;
    --medeed-sidebar-scrollbar: #6384a3;
    --medeed-sidebar-focus: #a8ddff;
    --medeed-menu-icon-stroke: 1.5;
    --medeed-search-bg: #f5faff;
    --medeed-search-border: #e0eaf3;
    --medeed-search-muted: #688cab;
    --medeed-search-icon: #6e94b5;
    --medeed-accent: #ae3ec9;
    --medeed-success: #2fb344;
    --medeed-warning: #f59f00;
    --medeed-danger: #bf1e2e;
    --medeed-radius: 1rem;
    --medeed-radius-sm: 0.7rem;
    --medeed-shadow: 0 1rem 2.75rem rgba(24, 42, 62, 0.09);
    --medeed-shadow-sm: 0 2px 4px rgba(31, 41, 55, 0.04);
}

[data-bs-theme="dark"] {
    --tblr-link-color: #6aa9e3;
    --tblr-link-color-rgb: 106, 169, 227;
    --tblr-link-hover-color: #87bae9;
    --tblr-link-hover-color-rgb: 135, 186, 233;
    --medeed-bg: #111827;
    --medeed-surface: #1f2937;
    --medeed-text: #e5e7eb;
    --medeed-muted: #9ca3af;
    --medeed-border: #2e3c51;
    --medeed-header-icon: #99c8f0;
    --medeed-sidebar-bg: #081523;
    --medeed-sidebar-bg-top: #10243b;
    --medeed-sidebar-text: #dce7f4;
    --medeed-sidebar-muted: #9bb4cd;
    --medeed-sidebar-active: #174d7a;
    --medeed-sidebar-hover: #173752;
    --medeed-sidebar-submenu-bg: rgba(0, 0, 0, 0.18);
    --medeed-sidebar-brand-bg: #152b43;
    --medeed-sidebar-brand-border: #213b55;
    --medeed-sidebar-brand-text: #dce7f4;
    --medeed-sidebar-logo-filter: brightness(0) invert(1);
    --medeed-sidebar-scrollbar: #426383;
    --medeed-sidebar-focus: #75baf1;
    --medeed-search-bg: #152236;
    --medeed-search-border: #2e3c51;
    --medeed-search-muted: #9bb4cd;
    --medeed-search-icon: #8cb5d9;
}

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

body.app-body,
body.portal-body {
    margin: 0;
    color: var(--medeed-text);
    background: var(--medeed-bg);
    font-family: var(--tblr-font-sans-serif);
    font-size: var(--tblr-body-font-size);
    font-weight: var(--tblr-body-font-weight);
    line-height: var(--tblr-body-line-height);
    font-feature-settings: "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
}

body.portal-body .page {
    min-height: 100vh;
    background: var(--medeed-bg);
}

a {
    text-underline-offset: 0.15em;
}

.card,
.modal-content,
.dropdown-menu,
.alert {
    border-radius: var(--medeed-radius);
}

.form-control,
.form-select,
.input-group-text,
.btn {
    border-radius: var(--medeed-radius-sm);
}

.badge {
    border-radius: 999px;
}

.card {
    margin-bottom: 1rem;
    border-color: var(--tblr-border-color-translucent);
    background: var(--medeed-surface);
    box-shadow: var(--medeed-shadow-sm);
    overflow: hidden;
}

.card-header {
    min-height: 4rem;
    padding: 1rem 1.2rem;
    border-color: var(--medeed-border);
    background: transparent;
}

.card-title {
    color: var(--medeed-text);
    font-size: 0.7rem;
    font-weight: 500;
}

.form-label {
    margin-bottom: 0.42rem;
    color: var(--medeed-text);
    font-size: 0.875rem;
    font-weight: 500;
}

[data-bs-theme="dark"] .form-label {
    color: var(--medeed-muted);
}

.form-control,
.form-select,
.input-group-text {
    min-height: 2.8rem;
    border-color: var(--medeed-border);
    background-color: var(--medeed-surface);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--medeed-primary);
    box-shadow: 0 0 0 0.22rem rgba(var(--medeed-primary-rgb), 0.11);
}

.btn-primary,
.bg-primary {
    border-color: var(--medeed-primary) !important;
    background-color: var(--medeed-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    border-color: var(--medeed-primary-dark) !important;
    background-color: var(--medeed-primary-dark) !important;
}

.btn {
    border-radius: 0.55rem;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: normal;
    min-height: 2.55rem;
    padding: var(--tblr-btn-padding-y) var(--tblr-btn-padding-x);
    font-weight: 500;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        color 0.16s ease,
        background-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm,
.btn-group-sm > .btn {
    min-height: 1.5rem;
    padding: 0.2825rem 0.3rem;
    font-size: 0.65rem;
}

.btn-lg {
    min-height: 3rem;
    padding: 0.7rem 1.2rem;
}

.btn-icon {
    padding: 0.55rem;
    aspect-ratio: 1;
}

.btn-back {
    color: var(--medeed-text) !important;
    background: var(--medeed-surface, #fff) !important;
    border: 1px solid var(--medeed-border) !important;
    box-shadow: none !important;
}

.btn-back:hover,
.btn-back:focus-visible {
    color: var(--medeed-primary) !important;
    background: rgba(var(--medeed-primary-rgb), 0.08) !important;
    border-color: rgba(var(--medeed-primary-rgb), 0.35) !important;
}

.language-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.language-buttons .language-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid transparent;
    border-radius: 50% !important;
    overflow: hidden;
    background: #f1f4f8;
    color: var(--medeed-text);
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
}

.language-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.language-button.active {
    border-color: var(--medeed-primary);
    box-shadow: 0 0 0 2px #fff;
}

.language-button:focus-visible {
    outline: 2px solid var(--medeed-primary);
    outline-offset: 3px;
}

.login-heading {
    flex-wrap: wrap;
}

.login-heading .language-buttons {
    max-width: 13rem;
}

.language-codes {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.language-code {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    min-height: 1.5rem;
    padding: 0.1rem 0.25rem;
    border: 1px solid var(--medeed-border);
    border-radius: 0.25rem;
    background: var(--medeed-surface);
    color: var(--medeed-muted);
    font-size: 0.65rem;
    line-height: 1;
    font-weight: 650;
    text-decoration: none;
}

.language-code:hover,
.language-code.active {
    color: var(--medeed-primary);
    border-color: var(--medeed-primary);
}

.language-code.active {
    background: rgba(var(--medeed-primary-rgb), 0.08);
}

.language-code:focus-visible {
    outline: 2px solid var(--medeed-primary);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.btn-primary {
    box-shadow: var(--tblr-shadow-input);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    box-shadow: 0 0.35rem 0.9rem rgba(24, 42, 62, 0.09);
}

.table {
    --tblr-table-border-color: var(--medeed-border);
    color: var(--medeed-text);
}

.table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

.table thead th {
    color: var(--medeed-muted);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--medeed-bg);
}

.table-hover > tbody > tr:hover > * {
    background: rgba(var(--medeed-primary-rgb), 0.045);
}

.table tbody tr {
    transition: background-color 0.16s ease;
}

.table-responsive {
    scrollbar-color: rgba(var(--medeed-primary-rgb), 0.28) transparent;
}

code {
    padding: 0.22rem 0.45rem;
    color: var(--medeed-primary-dark);
    border: 1px solid rgba(var(--medeed-primary-rgb), 0.12);
    border-radius: 0.45rem;
    background: rgba(var(--medeed-primary-rgb), 0.065);
}

.modal-header,
.modal-footer {
    border-color: var(--medeed-border);
}

.dropdown-menu {
    padding: 0.45rem;
    border-color: var(--medeed-border);
    box-shadow: var(--medeed-shadow);
}

.dropdown-item {
    padding: 0.58rem 0.7rem;
    font-size: inherit;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--medeed-primary);
    background: rgba(var(--medeed-primary-rgb), 0.07);
}

.page-wrapper {
    flex: 1;
    padding: 1.8rem 0 2.75rem;
}

.page-wrapper > .container-xl,
.page-wrapper > .container-fluid,
.app-footer .container-xl {
    max-width: 1440px;
    padding-inline: 1.5rem;
}

.page-header {
    margin-bottom: 1.35rem;
}

.app-content .page-header > .container-xl,
.app-content .page-header > .container-fluid {
    position: relative;
    overflow: hidden;
    padding-block: 1.35rem;
    border: 1px solid var(--medeed-border);
    border-radius: var(--medeed-radius);
    background: var(--medeed-surface);
    box-shadow: var(--medeed-shadow-sm);
}

.app-content .page-header .page-title {
    font-size: var(--tblr-font-size-h2);
    font-weight: var(--tblr-font-weight-headings);
}

.app-content .page-header .page-title > :is(i, svg.icon-tabler) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.75rem;
    background: rgba(var(--medeed-primary-rgb), 0.09);
}

.app-content .page-header .page-title > svg.icon-tabler {
    padding: 0.55rem;
}

.page-pretitle {
    margin-bottom: 0.35rem;
    color: var(--medeed-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-title,
.page-header h1,
.page-header h2 {
    color: var(--medeed-text);
    letter-spacing: -0.025em;
}

.text-secondary {
    color: var(--medeed-muted) !important;
}

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: block;
    width: var(--medeed-sidebar-width);
    max-width: var(--medeed-sidebar-width);
    padding: 0;
    color: var(--medeed-sidebar-text);
    border: 0;
    background: linear-gradient(180deg, var(--medeed-sidebar-bg-top), var(--medeed-sidebar-bg) 65%);
    transition:
        transform 0.25s ease,
        width 0.25s ease;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    height: var(--medeed-header-height);
    min-height: var(--medeed-header-height);
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--medeed-sidebar-brand-border);
    background: var(--medeed-sidebar-brand-bg);
}

.sidebar-brand > a {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.sidebar-brand img {
    width: 12.5rem;
    max-width: 100%;
    height: auto;
    max-height: calc(var(--medeed-header-height) - 1.25rem);
    object-fit: contain;
    filter: var(--medeed-sidebar-logo-filter);
}

.sidebar-close {
    display: none;
    flex-shrink: 0;
    color: var(--medeed-sidebar-brand-text);
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.625rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--medeed-sidebar-scrollbar) transparent;
}

.nav-section-label {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.7rem 0.75rem 0.4rem;
    color: var(--medeed-sidebar-muted);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border: 0;
    background: transparent;
}

.nav-section-spaced {
    margin-top: 0.65rem;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-start;
    min-height: 2.75rem;
    margin-bottom: 0.125rem;
    padding: 0.625rem 0.75rem;
    color: var(--medeed-sidebar-text);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    border-radius: 0.3rem;
    transition:
        color 0.15s ease,
        background 0.15s ease;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    color: var(--medeed-sidebar-interactive-text);
    text-decoration: none;
    background: var(--medeed-sidebar-hover);
}

.app-sidebar .nav-link[aria-disabled="true"] {
    cursor: default;
}

.app-sidebar .nav-link.active {
    font-weight: 600;
    background: var(--medeed-sidebar-active);
    box-shadow: none;
}

.app-sidebar .nav-link:focus-visible {
    outline: 2px solid var(--medeed-sidebar-focus);
    outline-offset: -2px;
}

.app-sidebar .nav-link > span:not(.nav-link-icon) {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-sidebar .nav-link::after {
    content: "";
    flex: 0 0 0.375rem;
    width: 0.375rem;
    height: 0.375rem;
    margin: 0 0 0 auto;
    border: solid currentColor;
    border-width: 1.5px 1.5px 0 0;
    opacity: 0.75;
    transform: rotate(45deg);
}

.app-sidebar .nav-link[href$="/Dashboard"]::after {
    display: none;
}

.app-sidebar .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(135deg);
}

.app-sidebar .nav-link-icon {
    display: inline-flex !important;
    flex: 0 0 1.5rem;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    color: inherit;
}

.app-sidebar .nav-link-icon > :is(svg, i),
.app-sidebar .nav-link > :is(i, svg.icon-tabler) {
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    margin: 0 !important;
    font-size: 1.25rem;
}

.nav-icon,
.header-icon,
.dropdown-icon {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-sidebar .nav-link .nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-basis: 1.5rem;
    padding: 0;
    color: inherit;
    border-radius: 0;
    background: transparent;
}

.app-sidebar svg.icon-tabler,
.dropdown-menu svg.icon-tabler {
    stroke-width: var(--medeed-menu-icon-stroke);
}

.app-sidebar .dropdown-item {
    padding: 0.5rem 0.75rem;
    color: var(--medeed-sidebar-text);
    font-size: 0.8rem;
    white-space: normal;
}

.app-sidebar .dropdown-item:is(:hover, :focus-visible, .active) {
    color: var(--medeed-sidebar-interactive-text);
    background: var(--medeed-sidebar-hover);
}

.app-sidebar .dropdown-menu-arrow::before,
.app-sidebar .dropdown-menu-arrow::after {
    display: none;
}

.app-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--medeed-sidebar-width);
}

.app-content {
    position: relative;
    flex: 1;
    padding: 1.8rem 0 2.75rem;
}

.app-content > .page-wrapper {
    padding-top: 0;
    padding-bottom: 0;
}

.applicant-portal .app-content .page-header {
    margin-top: 0;
}

.applicant-portal .app-header .agency-user-identity {
    min-width: 0;
    max-width: 13rem;
}

.applicant-portal .app-header #userName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media print {
    .applicant-portal > .page {
        margin-left: 0 !important;
    }

    .applicant-portal :is(.app-content, .page-wrapper) {
        padding: 0;
        min-height: 0;
    }

    .applicant-portal .sidebar-backdrop {
        display: none !important;
    }
}

.app-content > .container,
.app-content > .container-xl,
.app-content > .container-fluid,
.app-content > .page-wrapper > .container,
.app-content > .page-wrapper > .container-xl,
.app-content > .page-wrapper > .container-fluid {
    max-width: 1440px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--medeed-header-height);
    height: var(--medeed-header-height);
    padding: 0;
    border-bottom: 1px solid var(--medeed-border);
    background: var(--medeed-surface);
    backdrop-filter: blur(12px);
}

.app-header > :is(.container-fluid, .container-xl) {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 0;
    padding-inline: 1.5rem;
}

.sidebar-toggle {
    display: inline-flex;
    flex-shrink: 0;
    margin-right: 0.65rem;
}

.header-title {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    flex-shrink: 0;
    margin-inline-end: 1rem;
}

.header-title span {
    color: var(--medeed-muted);
    font-size: 0.66rem;
}

.header-title strong {
    color: var(--medeed-text);
    font-size: 0.9rem;
}

.agency-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    margin-inline-end: auto;
    text-decoration: none;
}

.agency-header-brand img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    flex-shrink: 0;
}

.agency-header-identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.4;
}

.agency-header-identity strong {
    color: var(--medeed-text);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.agency-header-identity > span {
    color: var(--medeed-muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.portal-search {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    width: 100%;
    max-width: 22rem;
    min-width: 0;
    margin-inline-end: auto;
}

.portal-search .header-icon {
    position: absolute;
    inset-inline-start: 0.55rem;
    width: 1rem;
    height: 1rem;
    color: var(--medeed-search-icon);
    pointer-events: none;
}

.portal-search input.form-control {
    width: 100%;
    min-width: 0;
    height: 1.875rem;
    min-height: 1.875rem;
    padding-block: 0.2rem;
    padding-inline: 1.85rem 0.55rem;
    color: var(--medeed-text);
    border: 1px solid var(--medeed-search-border);
    border-radius: 0.4rem !important;
    background: var(--medeed-search-bg);
    box-shadow: none;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.portal-search input::placeholder {
    color: var(--medeed-search-muted);
    opacity: 1;
}

.app-header :is(svg.icon, svg.icon-tabler, .navbar-toggler-icon) {
    color: var(--medeed-header-icon);
}

.portal-header-actions {
    gap: 0.5rem;
    margin-inline-start: 1rem;
    flex-shrink: 0;
}

.portal-header-actions
    > .dropdown:has(> :is(.nav-link, .profile-button) > :is(.agency-menu-identity, .profile-header-avatar)) {
    border-inline-start: 1px solid var(--medeed-border);
    margin-inline-start: 0.35rem;
    padding-inline-start: 0.65rem;
}

.portal-notifications .dropdown-menu {
    width: 24rem;
    max-width: calc(100vw - 1rem);
}

.badge.notification-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    aspect-ratio: 1;
    padding: 0.15rem;
    border-radius: 50% !important;
    font-size: 0.625rem;
    line-height: 1;
}

.portal-notifications .notification-count {
    inset-block-start: 0.2rem;
    inset-inline-end: 0;
}

.app-sidebar .navbar-nav .nav-link > .badge.notification-count {
    position: static;
    inset: auto;
    transform: none;
    min-width: 1.15rem;
    flex: 0 0 auto;
}

.app-sidebar .nav-link:has(> .notification-count)::after {
    display: none;
}

@media (max-width: 767.98px) {
    .portal-notifications .dropdown-menu {
        position: fixed;
        inset: var(--medeed-header-height) 0.5rem auto;
        width: auto;
        min-width: 0;
    }
}

.agency-menu-identity {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: clamp(6rem, 8vw, 8rem);
    min-width: 0;
    margin-inline-end: 0.75rem;
    color: var(--medeed-primary-dark);
    line-height: 1.25;
}

.agency-menu-identity strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 0.8rem;
}

.agency-menu-identity > span {
    font-size: 0.65rem;
}

.agency-menu-avatar {
    overflow: hidden;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #fff;
}

.agency-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-language-switcher > button {
    gap: 0.35rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.5rem;
    color: var(--medeed-primary-dark);
    border: 0;
    background: transparent;
}

.header-language-switcher > button > span {
    font-size: 0.7rem;
    font-weight: 600;
}

.header-language-switcher svg.icon-tabler {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 1.5;
}

.header-language-switcher .dropdown-item {
    gap: 0.7rem;
}

.header-language-switcher .dropdown-item > span {
    min-width: 1.5rem;
    color: var(--medeed-primary);
    font-size: 0.7rem;
    font-weight: 600;
}

[data-bs-theme="dark"] :is(.agency-menu-identity, .header-language-switcher > button) {
    color: var(--tblr-link-color);
}

@media (max-width: 1399.98px) {
    .app-header:has(.portal-search) .header-title {
        display: none;
    }

    .header-clock-full {
        display: none;
    }

    .header-clock .header-clock-compact {
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .portal-header-actions {
        gap: 0.15rem;
        margin-inline-start: 0.35rem;
    }

    .portal-header-actions
        > .dropdown:has(> :is(.nav-link, .profile-button) > :is(.agency-menu-identity, .profile-header-avatar)) {
        margin-inline-start: 0.15rem;
        padding-inline-start: 0.35rem;
    }

    .agency-menu-identity,
    .app-header .agency-user-identity {
        display: none;
    }

    .header-language-switcher > button {
        padding-inline: 0.25rem;
    }

    .portal-search input.form-control {
        font-size: 0.7rem;
    }

    .portal-header-actions .portal-header-theme {
        gap: 0.15rem;
    }

    .portal-header-actions .header-clock {
        font-size: 0.6rem;
        padding-inline-end: 0.35rem;
    }
}

@media (max-width: 575.98px) {
    .agency-header-brand {
        gap: 0.5rem;
    }

    .agency-header-brand img {
        width: 2.5rem;
        height: 2.5rem;
    }

    .agency-header-identity strong {
        font-size: 0.8rem;
    }

    .agency-header-identity > span {
        font-size: 0.625rem;
    }
}

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

.portal-header-theme {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.35rem;
}

.header-clock {
    margin: 0;
    padding-inline-end: 0.55rem;
    color: var(--medeed-muted);
    font-size: 0.69rem;
    white-space: nowrap;
    border-inline-end: 1px solid var(--medeed-border);
}

.header-clock-compact {
    display: none;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.3;
}

.header-actions .btn {
    color: var(--medeed-muted);
    border: 0;
    background: transparent;
}

.header-actions .btn:hover {
    color: var(--medeed-primary);
    background: rgba(var(--medeed-primary-rgb), 0.08);
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 0.25rem;
    padding: 0.35rem 0.45rem;
    color: var(--medeed-text);
    border: 0;
    background: transparent;
}

.profile-copy {
    display: flex;
    flex-direction: column;
    min-width: 7.5rem;
    text-align: left;
    line-height: 1.25;
}

.profile-copy strong {
    font-size: 0.76rem;
}

.profile-copy small {
    color: var(--medeed-muted);
    font-size: 0.65rem;
}

.avatar {
    color: #fff;
    font-weight: 650;
    background-color: var(--medeed-primary);
}

.app-footer {
    padding: 1rem 0;
    color: var(--medeed-muted);
    font-size: 0.68rem;
    border-top: 1px solid var(--medeed-border);
    background: var(--medeed-surface);
}

.portal-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.9rem 0;
    color: #416b91;
    border-top: 1px solid #dceaf5;
    background: var(--medeed-surface);
    font-size: 0.7rem;
}

.portal-footer .footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-inline: 1.5rem;
}

.portal-footer .footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.portal-footer .footer-brand strong {
    font-weight: 500;
}

.portal-footer a {
    color: var(--medeed-primary-dark);
    text-decoration: none;
}

.portal-footer nav {
    display: flex;
    align-items: center;
}

.portal-footer nav a {
    padding-inline: 0.7rem;
}

.portal-footer nav a:first-child {
    padding-inline-start: 0;
}

.portal-footer nav a:last-child {
    padding-inline-end: 0;
}

.portal-footer nav a + a {
    border-inline-start: 1px solid var(--medeed-border);
}

.portal-footer a:hover {
    text-decoration: underline;
}

[data-bs-theme="dark"] .portal-footer {
    color: var(--medeed-muted);
    border-color: var(--medeed-border);
}

[data-bs-theme="dark"] .portal-footer a {
    color: var(--tblr-link-color);
}

@media (min-width: 992px) {
    body.sidebar-collapsed .app-sidebar {
        width: var(--medeed-sidebar-collapsed-width);
        transform: none;
    }

    body.sidebar-collapsed .app-main,
    body.portal-body.sidebar-collapsed > .page {
        margin-left: var(--medeed-sidebar-collapsed-width);
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding-inline: 0.75rem;
    }

    body.sidebar-collapsed .sidebar-brand > a {
        flex: 0 0 2.5rem;
        justify-content: flex-start;
        overflow: hidden;
    }

    body.sidebar-collapsed .sidebar-brand img {
        flex-shrink: 0;
        max-width: none;
    }

    body.sidebar-collapsed .app-sidebar .nav-link {
        justify-content: center;
        gap: 0;
        padding-inline: 0.5rem;
    }

    body.sidebar-collapsed .app-sidebar .nav-link > span:not(.nav-link-icon),
    body.sidebar-collapsed .app-sidebar .nav-link::after,
    body.sidebar-collapsed .app-sidebar .nav-section-label,
    body.sidebar-collapsed .app-sidebar .dropdown-menu {
        display: none !important;
    }

    body.sidebar-collapsed .notification-bell {
        left: 0.75rem;
        width: 3rem;
        padding: 0.75rem;
        justify-content: center;
    }

    body.sidebar-collapsed .notification-bell .bell-text {
        display: none;
    }
}

.sidebar-backdrop {
    display: none;
}

/* Shared view composition */
.admin-page {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.admin-page-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: clamp(1.35rem, 2.4vw, 2rem);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: calc(var(--medeed-radius) + 0.25rem);
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.16), transparent 12rem),
        linear-gradient(135deg, #173e67 0%, #235f99 52%, #2f7bc4 100%);
    box-shadow: 0 1.2rem 3rem rgba(22, 62, 103, 0.2);
}

.admin-page-hero::after {
    position: absolute;
    right: -5rem;
    bottom: -8rem;
    z-index: -1;
    width: 20rem;
    height: 20rem;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-radius: 50%;
    box-shadow:
        0 0 0 3rem rgba(255, 255, 255, 0.035),
        0 0 0 6rem rgba(255, 255, 255, 0.025);
}

.hero-copy {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 3.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(8px);
}

.hero-icon svg,
.metric-icon svg,
.section-icon svg,
.empty-state-icon svg,
.action-icon svg {
    width: 1.45rem;
    height: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-page-hero .eyebrow {
    margin-bottom: 0.3rem;
    color: rgba(255, 255, 255, 0.62);
}

.admin-page-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    letter-spacing: -0.035em;
}

.admin-page-hero p {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.admin-page-hero .btn-light {
    color: #174f88;
    border: 0;
    box-shadow: 0 0.55rem 1.4rem rgba(10, 32, 55, 0.18);
}

.admin-page-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.45);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.metric-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    overflow: hidden;
    min-height: 6.5rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--medeed-border);
    border-radius: var(--medeed-radius);
    background: color-mix(in srgb, var(--medeed-surface) 96%, var(--medeed-primary));
    box-shadow: var(--medeed-shadow-sm);
}

.metric-card::after {
    position: absolute;
    top: -0.9rem;
    right: -1rem;
    width: 4.5rem;
    height: 4.5rem;
    content: "";
    border-radius: 50%;
    background: currentColor;
    opacity: 0.045;
}

.metric-icon,
.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    flex: 0 0 2.85rem;
    color: var(--medeed-primary);
    border-radius: 0.85rem;
    background: rgba(var(--medeed-primary-rgb), 0.1);
}

.metric-icon.success {
    color: var(--medeed-success);
    background: rgba(21, 150, 106, 0.11);
}

.metric-icon.accent {
    color: var(--medeed-accent);
    background: rgba(116, 87, 217, 0.1);
}

.metric-copy span {
    display: block;
    color: var(--medeed-muted);
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.metric-copy strong {
    display: block;
    margin-top: 0.18rem;
    color: var(--medeed-text);
    font-size: 1.55rem;
    line-height: 1;
}

.data-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-heading-copy h2,
.card-heading-copy h3 {
    margin: 0;
    color: var(--medeed-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.card-heading-copy p {
    margin: 0.18rem 0 0;
    color: var(--medeed-muted);
    font-size: 0.72rem;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--medeed-border);
    background: color-mix(in srgb, var(--medeed-surface) 95%, var(--medeed-primary));
}

.filter-bar .search-box {
    position: relative;
    width: min(100%, 25rem);
}

.filter-bar .search-box svg {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    width: 1rem;
    height: 1rem;
    color: var(--medeed-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-bar .search-box .form-control {
    padding-left: 2.45rem;
}

.resource-chip,
.action-chip,
.route-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.62rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
}

.resource-chip {
    color: #176979;
    background: rgba(25, 151, 168, 0.11);
}

.action-chip {
    color: #895815;
    background: rgba(230, 149, 36, 0.13);
}

.route-chip {
    color: var(--medeed-primary-dark);
    border: 1px solid rgba(var(--medeed-primary-rgb), 0.13);
    background: rgba(var(--medeed-primary-rgb), 0.075);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.32rem 0.62rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
}

.status-pill::before {
    width: 0.45rem;
    height: 0.45rem;
    content: "";
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, currentColor 15%, transparent);
}

.status-pill.active {
    color: #137452;
    background: rgba(21, 150, 106, 0.1);
}

.status-pill.inactive {
    color: #768397;
    background: rgba(108, 123, 141, 0.1);
}

.action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.action-buttons form {
    margin: 0;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0;
    border-radius: 0.65rem;
}

.action-icon svg {
    width: 1rem;
    height: 1rem;
}

.empty-state {
    padding: 3.5rem 1rem !important;
    text-align: center;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.9rem;
    color: var(--medeed-primary);
    border-radius: 1.2rem;
    background: rgba(var(--medeed-primary-rgb), 0.08);
}

.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state strong {
    margin-bottom: 0.25rem;
    color: var(--medeed-text);
    font-size: 0.9rem;
}

.empty-state span {
    color: var(--medeed-muted);
    font-size: 0.75rem;
}

.form-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 1.25rem;
    align-items: start;
}

.form-card .card-body {
    padding: clamp(1.25rem, 2.5vw, 2rem);
}

.form-section + .form-section {
    margin-top: 1.75rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--medeed-border);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
    color: var(--medeed-text);
    font-size: 0.92rem;
}

.section-heading p {
    margin: 0.18rem 0 0;
    color: var(--medeed-muted);
    font-size: 0.72rem;
}

.form-side-note {
    position: sticky;
    top: calc(var(--medeed-header-height) + 1.5rem);
    padding: 1.25rem;
    color: #fff;
    border-radius: var(--medeed-radius);
    background: linear-gradient(145deg, #23374f, #315d88);
    box-shadow: var(--medeed-shadow);
}

.form-side-note h3 {
    margin: 0.9rem 0 0.45rem;
    color: #fff;
    font-size: 0.92rem;
}

.form-side-note p,
.form-side-note li {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.73rem;
    line-height: 1.65;
}

.form-side-note ul {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--medeed-border);
}

.field-hint {
    display: block;
    margin-top: 0.38rem;
    color: var(--medeed-muted);
    font-size: 0.68rem;
}

.rule-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: end;
}

.rule-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.8rem;
    margin-bottom: 1px;
    color: var(--medeed-primary);
    border-radius: 0.75rem;
    background: rgba(var(--medeed-primary-rgb), 0.08);
}

/* Bring legacy views into the same design system without view-specific CSS. */
.app-content > .container,
.app-content > .container-xl,
.app-content > .container-fluid {
    padding-inline: 1.5rem;
}

.app-content .container.mt-4 {
    margin-top: 0 !important;
}

.app-content .table-bordered {
    border-color: var(--medeed-border);
}

.app-content .card-body > form > .row.g-3:first-child,
.app-content .card-body > form > .row.g-2:first-child {
    padding: 0.2rem;
}

.app-content .table-striped > tbody > tr:nth-of-type(odd) > * {
    --tblr-table-accent-bg: rgba(var(--medeed-primary-rgb), 0.018);
}

.app-content hr {
    border-color: var(--medeed-border);
    opacity: 1;
}

.pagination {
    gap: 0.3rem;
}

.page-link {
    min-width: 2.35rem;
    text-align: center;
    border-radius: 0.65rem !important;
}

.alert {
    border-width: 0 0 0 4px;
    box-shadow: 0 0.3rem 1rem rgba(24, 42, 62, 0.045);
}

/* Existing non-admin areas retain their routes and gain the same visual language. */
.portal-body > .page > header.navbar:first-of-type {
    min-height: var(--medeed-header-height);
    border-bottom: 1px solid var(--medeed-border);
    background: var(--medeed-surface);
}

.portal-body > .page > .navbar-expand-md {
    border-bottom: 1px solid var(--medeed-border);
    background: var(--medeed-surface);
    box-shadow: 0 0.3rem 1.5rem rgba(24, 42, 62, 0.035);
}

.portal-body .navbar-brand img {
    width: auto !important;
    max-width: 12rem;
    max-height: 2.9rem;
}

.portal-body .page > header #navbar-menu .nav-link {
    min-height: 3.15rem;
    color: var(--medeed-sidebar-text);
    font-size: var(--tblr-body-font-size);
    font-weight: 400;
}

.portal-body .page > header #navbar-menu .nav-link:hover,
.portal-body .page > header #navbar-menu .nav-link.active {
    color: var(--medeed-primary);
    background: rgba(var(--medeed-primary-rgb), 0.065);
}

.portal-body .footer {
    color: var(--medeed-muted);
    border-top: 1px solid var(--medeed-border);
    background: var(--medeed-surface);
}

/* Login */
body.login-page {
    margin: 0;
    color: #172433;
    background: #f5f8fb;
    font-family:
        var(--medeed-font-persian),
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.login-intro {
    position: relative;
    min-width: 0;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 5.5rem);
    color: #fff;
    background:
        radial-gradient(circle at 8% 92%, rgba(120, 190, 255, 0.28), transparent 28%),
        linear-gradient(145deg, #123b64 0%, #1d5e9e 52%, #286fb7 100%);
}

.login-intro::before,
.login-intro::after {
    position: absolute;
    z-index: -1;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.login-intro::before {
    top: -12rem;
    left: -12rem;
    width: 28rem;
    height: 28rem;
}

.login-intro::after {
    top: -7rem;
    left: -7rem;
    width: 18rem;
    height: 18rem;
}

.intro-content {
    width: min(100%, 18rem);
    margin: auto;
    text-align: center;
}

.login-brand-logo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 284 / 94;
    overflow: hidden;
    filter: brightness(0) invert(1);
}

.login-intro h1 {
    margin: 1.75rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-indent: 0.26em;
    text-transform: uppercase;
    line-height: 1.4;
}

.login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    place-items: center;
    padding: clamp(1.5rem, 5vw, 5rem);
    background:
        linear-gradient(rgba(40, 111, 183, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 111, 183, 0.025) 1px, transparent 1px), #f8fafc;
    background-size: 32px 32px;
}

.login-panel-inner {
    width: 100%;
    max-width: 29rem;
    min-width: 0;
}

.login-card.card {
    border: 1px solid rgba(31, 52, 73, 0.09);
    box-shadow:
        0 1.2rem 3.5rem rgba(29, 59, 91, 0.1),
        0 0.2rem 0.6rem rgba(29, 59, 91, 0.05);
}

.login-card .card-body {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.login-heading {
    margin-bottom: 1.75rem;
}

.eyebrow {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--medeed-primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-heading h1 {
    margin-bottom: 0.5rem;
    color: #172433;
    font-size: clamp(1.6rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.login-heading p,
.support-copy {
    color: #647387;
}

.login-page .form-control-lg {
    min-height: 3.1rem;
    padding: 0.72rem 0.9rem;
    font-size: 0.9rem;
}

.password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    color: var(--medeed-primary);
    border: 1px solid var(--medeed-border);
    border-left: 0;
    background: #fff;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 3.15rem;
    box-shadow: 0 0.5rem 1.2rem rgba(var(--medeed-primary-rgb), 0.2);
}

.support-copy {
    margin: 1.4rem 0 0;
    font-size: 0.78rem;
    text-align: center;
}

.validation-summary-valid,
.field-validation-valid {
    display: none;
}

@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: 1rem 0 3rem rgba(10, 22, 36, 0.15);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-close,
    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        background: rgba(15, 23, 34, 0.42);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    .app-main {
        margin-left: 0;
    }

    .form-shell {
        grid-template-columns: 1fr;
    }

    .form-side-note {
        position: static;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-intro {
        padding: 2rem 1.5rem;
    }

    .intro-content {
        width: 11.5rem;
    }

    .login-intro h1 {
        margin-top: 1.15rem;
        padding-top: 0.85rem;
        font-size: 0.75rem;
        letter-spacing: 0.22em;
        text-indent: 0.22em;
    }

    .login-panel {
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    .app-header > :is(.container-fluid, .container-xl) {
        flex-wrap: nowrap;
        padding-inline: 0.5rem;
    }

    .page-wrapper > .container-xl,
    .page-wrapper > .container-fluid {
        padding-inline: 1rem;
    }

    .profile-copy {
        display: none;
    }

    .page-wrapper {
        padding-top: 1.2rem;
    }

    .admin-page {
        padding-inline: 1rem;
    }

    .admin-page-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .hero-actions .btn {
        width: 100%;
    }

    .rule-flow {
        grid-template-columns: 1fr;
    }

    .rule-arrow {
        margin: -0.2rem auto;
        transform: rotate(90deg);
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .login-panel {
        align-items: start;
        padding: 2rem 1rem;
        background: #f8fafc;
    }

    .brand-header {
        margin-bottom: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Shared person and profile presentation */
.profile-editor-card {
    overflow: hidden;
    border: 0;
    box-shadow: 0 1.25rem 3rem rgba(28, 48, 74, 0.1);
}

.profile-cover {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.35rem;
    min-height: 11rem;
    padding: 2rem;
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.22), transparent 22rem),
        linear-gradient(125deg, #163a62 0%, #176b87 54%, #18a29b 100%);
}

.profile-cover-copy h2 {
    margin: 0 0 0.35rem;
    color: inherit;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.profile-cover-copy p,
.profile-cover .eyebrow {
    color: rgba(255, 255, 255, 0.78);
}

.profile-cover-copy p {
    margin: 0;
}

.profile-photo-editor,
.person-avatar {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, #edf6f8, #d7e9ee);
}

.profile-photo-editor {
    width: 7rem;
    height: 7rem;
    border: 0.3rem solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0.9rem 2rem rgba(7, 31, 51, 0.25);
}

.profile-photo-preview,
.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-fallback,
.person-avatar-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #176176;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.profile-photo-fallback {
    font-size: 2rem;
}

.profile-photo-action {
    position: absolute;
    right: 0.15rem;
    bottom: 0.15rem;
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    cursor: pointer;
    place-items: center;
    color: #174b63;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0.25rem 0.8rem rgba(8, 30, 48, 0.25);
}

.profile-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.person-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.person-avatar {
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: inset 0 0 0 1px rgba(23, 97, 118, 0.12);
}

.person-avatar-sm {
    width: 2rem;
    height: 2rem;
}

.person-avatar-lg {
    width: 4.5rem;
    height: 4.5rem;
}

.person-avatar-fallback {
    font-size: 0.72rem;
}

.person-name {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-meta {
    color: var(--medeed-muted, #718096);
    font-size: 0.75rem;
}

.profile-header-avatar {
    overflow: hidden;
    border-radius: 50%;
    color: #176176;
    background: #e4f2f4;
    font-weight: 800;
}

.profile-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-field {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px dashed #c9dbe3;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8fbfc, #f1f7f8);
}

.icon-bubble {
    display: grid;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    color: #176176;
    border-radius: 0.9rem;
    background: #e7f6f7;
    font-size: 1.25rem;
}

.icon-bubble-amber {
    color: #9a5d04;
    background: #fff2d8;
}

.security-note {
    display: flex;
    gap: 0.7rem;
    padding: 0.9rem;
    color: #5f5543;
    border: 1px solid #f2dfb9;
    border-radius: 0.85rem;
    background: #fffaf0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.security-note :is(i, svg.icon-tabler) {
    flex: 0 0 auto;
    margin-top: 0.12rem;
    color: #b27315;
    font-size: 1.15rem;
}

@media (max-width: 575.98px) {
    .profile-cover {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.5rem;
    }

    .profile-form-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Square surfaces, fields, buttons and badges; keep avatars and radio controls round. */
.card,
.card-header,
.card-footer,
.metric-card,
.alert,
.form-control,
.form-select,
.input-group-text,
.password-toggle,
.btn,
.badge,
.language-code,
.dropdown-item,
.page-link,
button:not(.profile-photo-action) {
    border-radius: 0 !important;
}

/* Legacy panel navigations use the shared left sidebar shell. */
.portal-body > .page {
    min-height: 100vh;
    margin-left: var(--medeed-sidebar-width);
}

.portal-body > .page > .page-wrapper {
    padding-bottom: 0;
}

.portal-body > .page > .page-wrapper > .footer {
    margin-top: auto !important;
    flex-shrink: 0;
}

.portal-body > .page.interessent-page {
    margin-left: 0;
}

.portal-body .app-header .navbar-brand {
    display: none !important;
}

.portal-body .app-sidebar {
    overflow: hidden;
}

.portal-body .app-sidebar .navbar-collapse {
    display: block !important;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--medeed-sidebar-scrollbar) transparent;
}

.portal-body .app-sidebar .navbar,
.portal-body .app-sidebar .container-xl,
.portal-body .app-sidebar .row,
.portal-body .app-sidebar .col {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.portal-body .app-sidebar .sidebar-nav {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    overflow: visible;
}

.portal-body .app-sidebar .navbar {
    color: inherit;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.portal-body .app-sidebar .dropdown-menu {
    position: static !important;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding-left: 2.4rem;
    border: 0;
    border-radius: 0.3rem;
    background: var(--medeed-sidebar-submenu-bg);
    box-shadow: none;
    transform: none !important;
}

@media (max-width: 991.98px) {
    .portal-body > .page {
        margin-left: 0;
    }
}

/* Palette from the partner cockpit template. Keep this after legacy area styles. */
:root,
[data-bs-theme="light"] {
    --tblr-blue: #286fb7;
    --tblr-tabler: #286fb7;
    --dis-red: #286fb7;
    --dis-bronze: #cf784c;
    --dis-silver: #b5b5b5;
    --dis-gold: #f5b81b;
    --dis-platin: #5d96c9;
    --dis-starter: #dd649d;
}

.status-starter {
    background-color: var(--dis-starter);
    color: #2c2c2c;
}

.status-bronze {
    background-color: var(--dis-bronze);
    color: #2c2c2c;
}

.status-silver {
    background-color: var(--dis-silver);
    color: #2c2c2c;
}

.status-gold {
    background-color: var(--dis-gold);
    color: #2c2c2c;
}

.status-platin {
    background-color: var(--dis-platin);
    color: #2c2c2c;
}

.portal-body .footer.footer-transparent {
    background: transparent;
    border-top-color: transparent;
    font-size: var(--tblr-body-font-size);
}

[data-bs-theme="dark"] .notification-bell,
[data-bs-theme="dark"] .notification-panel {
    color: var(--medeed-text);
    background: var(--medeed-surface);
    border-color: var(--medeed-border);
}

[data-bs-theme="dark"] .notification-bell .bell-text,
[data-bs-theme="dark"] .notification-panel .panel-header h4,
[data-bs-theme="dark"] .notification-panel .n-title,
[data-bs-theme="dark"] .notification-panel .info-text strong {
    color: var(--medeed-text);
}

[data-bs-theme="dark"] .notification-bell .bell-text small,
[data-bs-theme="dark"] .notification-panel .n-desc,
[data-bs-theme="dark"] .notification-panel .n-meta,
[data-bs-theme="dark"] .notification-panel .info-text {
    color: var(--medeed-muted);
}

[data-bs-theme="dark"] .notification-panel .notif-card,
[data-bs-theme="dark"] .notification-panel .panel-footer {
    background: var(--medeed-bg);
}

[data-bs-theme="dark"] .notification-panel .panel-header,
[data-bs-theme="dark"] .notification-panel .panel-footer {
    border-color: var(--medeed-border);
}

/* Notification indicators are dots, not text badges. */
.badge.notification-dot,
.app-header .nav-link > .badge:empty {
    border-radius: 50% !important;
}

.agency-user-identity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.25;
    color: var(--medeed-text);
}

.agency-user-identity #userLevel {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .agency-user-identity {
        font-size: 0.625rem;
    }

    .agency-user-identity #userLevel {
        font-size: 0.5625rem;
    }

    .app-header:has(.agency-header-brand) .container-fluid {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .app-header:has(.agency-header-brand) .navbar-nav {
        margin-inline-start: auto;
    }
}

/* Neutral button hovers use the same light blue as the sidebar. */
.btn-secondary,
.btn-outline-secondary,
.btn-ghost-secondary,
.btn-light,
.btn-outline-light,
.btn-ghost-light,
.btn-dark,
.btn-outline-dark,
.btn-ghost-dark,
.btn-white,
.btn-default {
    --tblr-btn-hover-bg: rgba(var(--medeed-primary-rgb), 0.08);
    --tblr-btn-hover-color: var(--medeed-primary);
    --tblr-btn-hover-border-color: rgba(var(--medeed-primary-rgb), 0.35);
}

.language-code:hover,
.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--medeed-primary);
    background: rgba(var(--medeed-primary-rgb), 0.08);
}

/* Keep nested muted labels and counters in outline buttons blue on interaction. */
.btn-outline-secondary:is(:hover, :focus-visible),
.btn-outline-secondary:is(:hover, :focus-visible) .text-secondary,
.btn-outline-secondary:is(:hover, :focus-visible) .subheader {
    color: var(--medeed-primary) !important;
}

.btn-outline-secondary:is(:hover, :focus-visible) .border-secondary {
    border-color: rgba(var(--medeed-primary-rgb), 0.35) !important;
}

.notification-bell .bell-icon svg {
    stroke: var(--medeed-primary);
    stroke-width: 1.8;
}

.notification-panel .panel-header .notification-close {
    color: var(--medeed-muted);
    background: transparent;
    border: 0;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0.375rem;
}

.notification-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.notification-panel .btn-mark-read {
    background: var(--medeed-primary);
}

.notification-panel .btn-mark-read:hover,
.notification-panel .btn-mark-read:focus-visible {
    background: var(--medeed-primary-dark);
}

.notification-panel .panel-header h4 svg {
    stroke: var(--medeed-primary);
}

.notification-panel .panel-header .notification-close:is(:hover, :focus-visible) {
    color: var(--medeed-primary);
    background: rgba(var(--medeed-primary-rgb), 0.08);
}

/* One moon/sun control across all portal headers. */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-switcher .theme-switcher-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    color: var(--medeed-muted);
    border: 0;
    background: transparent;
}

.theme-switcher .theme-switcher-control:hover {
    color: var(--medeed-primary);
}

.theme-switcher .theme-switcher-control:focus-visible {
    outline: 2px solid var(--medeed-primary);
    outline-offset: 2px;
}

.theme-switcher .theme-switcher-control svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Shared opt-in multiple select; inherit the portal's light/dark form tokens. */
.portal-multiselect,
.portal-select-dropdown {
    min-width: 0;
    font-size: inherit;
    --bs-body-bg: var(--tblr-bg-forms);
    --bs-body-color: var(--tblr-body-color);
    --bs-border-color: var(--tblr-border-color);
    --bs-border-width: var(--tblr-border-width);
    --bs-border-radius: var(--tblr-border-radius);
}

.portal-multiselect .ts-control {
    min-height: 2.375rem;
    gap: .25rem;
    padding: .4375rem .75rem;
    color: var(--tblr-body-color);
    background: var(--tblr-bg-forms);
    border-color: var(--tblr-border-color);
    font: inherit;
}

.portal-multiselect .ts-control > input {
    min-width: 4rem;
    color: var(--tblr-body-color);
    font: inherit;
}

.portal-multiselect.ts-wrapper.multi .ts-control > div {
    max-width: 100%;
    margin: 0;
    padding: .125rem .375rem;
    overflow-wrap: anywhere;
    color: var(--tblr-body-color);
    background: var(--tblr-bg-surface-secondary);
    border-radius: var(--tblr-border-radius);
}

.portal-multiselect .ts-dropdown,
.portal-select-dropdown.ts-dropdown {
    color: var(--tblr-body-color);
    background: var(--tblr-bg-surface);
    border-color: var(--tblr-border-color);
    font: inherit;
}

.portal-multiselect .ts-dropdown .active,
.portal-select-dropdown .active,
.portal-multiselect.multi .ts-control > div.active {
    color: var(--medeed-primary-dark);
    background: rgba(var(--medeed-primary-rgb), .12);
}

.portal-multiselect .ts-dropdown .optgroup-header,
.portal-select-dropdown .optgroup-header {
    color: var(--tblr-secondary-color);
    background: var(--tblr-bg-surface-secondary);
}

.portal-multiselect.ts-wrapper.multi.plugin-remove_button .item .remove {
    display: inline-flex;
    align-items: center;
    color: inherit;
    border-color: var(--tblr-border-color);
}

.portal-multiselect .remove .icon {
    width: 1rem;
    height: 1rem;
    stroke-width: 1.5;
}

.portal-multiselect.is-invalid .ts-control {
    border-color: var(--tblr-danger);
}

/* Opt-in single selects share the location combobox appearance. */
.portal-single-select.form-select {
    min-width: 0;
    background-color: var(--tblr-bg-forms);
}

.portal-single-select .ts-control > .item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-single-select .ts-control > input {
    min-width: 0;
    font: inherit;
}

.portal-single-select .ts-dropdown,
.portal-single-select-dropdown.ts-dropdown {
    color: var(--tblr-body-color);
    background: var(--tblr-bg-forms);
    font: inherit;
}

.portal-select-dropdown.ts-dropdown {
    z-index: 1080;
}


.portal-single-select .ts-dropdown .active {
    color: var(--medeed-primary-dark);
    background: rgba(var(--medeed-primary-rgb), .12);
}

.portal-single-select.is-invalid {
    border-color: var(--tblr-danger);
}

/* Monday-first intake calendars; keep the three-month strip scrollable on small screens. */
.portal-consultation-calendar,
.portal-consultation-slots {
    --calendar-closed-color: var(--medeed-danger);
    --calendar-closed-bg: rgba(var(--tblr-danger-rgb), .06);
}
.portal-consultation-calendar {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--medeed-border) transparent;
}
[data-bs-theme="dark"] .portal-consultation-calendar,
[data-bs-theme="dark"] .portal-consultation-slots {
    --calendar-closed-color: #ff9ba4;
    --calendar-closed-bg: rgba(var(--tblr-danger-rgb), .1);
}
.portal-consultation-calendar .litepicker {
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    --litepicker-container-months-color-bg: var(--tblr-bg-surface);
    --litepicker-container-months-box-shadow-color: transparent;
    --litepicker-month-header-color: var(--tblr-body-color);
    --litepicker-day-color: var(--tblr-body-color);
    --litepicker-day-color-hover: var(--tblr-primary);
    --litepicker-is-start-color-bg: var(--tblr-primary);
    --litepicker-is-end-color-bg: var(--tblr-primary);
    --litepicker-is-locked-color: var(--tblr-secondary);
    --litepicker-is-today-color: var(--tblr-primary);
}
.portal-consultation-calendar .litepicker .container__months {
    display: grid;
    grid-template-columns: repeat(3, minmax(16rem, 1fr));
    gap: 1rem;
    width: 100% !important;
    min-width: 50rem;
    max-width: none;
    background: transparent;
    box-shadow: none;
}
.portal-consultation-calendar .litepicker .container__months .month-item {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: .75rem;
    border: 1px solid var(--medeed-border);
    border-radius: var(--tblr-border-radius);
    background: var(--medeed-surface);
}
.portal-consultation-calendar .litepicker .container__months .month-item-header {
    min-height: 2.75rem;
    margin: -.75rem -.75rem .75rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--medeed-border);
    background: rgba(var(--medeed-primary-rgb), .06);
    font-size: .9rem;
    font-weight: 700;
}
.portal-consultation-calendar .litepicker .container__months .month-item-header .button-previous-month,
.portal-consultation-calendar .litepicker .container__months .month-item-header .button-next-month {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: .25rem;
    border: 1px solid var(--medeed-border);
    border-radius: 0;
    color: var(--tblr-body-color);
    background: var(--medeed-surface);
}
.portal-consultation-calendar .litepicker .container__days,
.portal-consultation-calendar .litepicker .container__months .month-item-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .2rem;
    width: 100%;
}
.portal-consultation-calendar .litepicker .container__months .month-item-weekdays-row {
    margin-bottom: .2rem;
}
.portal-consultation-calendar .litepicker .container__days > *,
.portal-consultation-calendar .litepicker .container__months .month-item-weekdays-row > div {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: auto;
    min-height: 1.75rem;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--medeed-border);
    border-radius: 0;
    font-size: .8rem;
}
.portal-consultation-calendar .litepicker .container__months .month-item-weekdays-row > div {
    color: var(--tblr-body-color);
    background: rgba(var(--tblr-secondary-rgb), .08);
    font-size: .7rem;
    font-weight: 700;
}
.portal-consultation-calendar .litepicker .container__days > :empty {
    border-color: transparent;
}
.portal-consultation-calendar .litepicker .container__days .day-item {
    background: rgba(var(--medeed-primary-rgb), .06);
    border-color: rgba(var(--medeed-primary-rgb), .35);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.portal-consultation-calendar .litepicker .container__days .day-item:not(.is-locked):hover {
    background: rgba(var(--medeed-primary-rgb), .14);
    border-color: var(--tblr-primary);
}
.portal-consultation-calendar .litepicker .container__days .day-item.is-locked {
    opacity: .65;
    color: var(--litepicker-is-locked-color);
    background: rgba(var(--tblr-secondary-rgb), .035);
    border-color: var(--medeed-border);
    font-weight: 400;
    cursor: not-allowed;
}
.portal-consultation-calendar .litepicker .container__days .day-item.is-today {
    box-shadow: inset 0 0 0 1px var(--tblr-primary);
    font-weight: 700;
}
/* Leading blank cells share the same seven-column grid, so these columns stay Friday–Sunday. */
.portal-consultation-calendar .litepicker .container__months .month-item-weekdays-row > :nth-child(n + 5),
.portal-consultation-calendar .litepicker .container__days .day-item:is(:nth-child(7n + 5), :nth-child(7n + 6), :nth-child(7n + 7)) {
    --litepicker-day-color: var(--calendar-closed-color);
    --litepicker-day-color-hover: var(--calendar-closed-color);
    --litepicker-is-locked-color: var(--calendar-closed-color);
    --litepicker-is-today-color: var(--calendar-closed-color);
    color: var(--calendar-closed-color);
    background: var(--calendar-closed-bg);
}
.portal-consultation-calendar .litepicker .container__days .day-item.is-start-date.is-end-date {
    color: var(--litepicker-is-start-color);
    background: var(--tblr-primary);
    border-color: var(--tblr-primary);
    border-radius: 0;
    box-shadow: inset 0 0 0 1px var(--medeed-surface);
    font-weight: 700;
}
.portal-consultation-calendar .litepicker .container__days .day-item:focus-visible {
    outline: 2px solid var(--tblr-primary);
    outline-offset: 1px;
}
.portal-consultation-slots [data-slot-id]:disabled,
.portal-consultation-slots .portal-consultation-unavailable {
    color: var(--calendar-closed-color);
    background: var(--calendar-closed-bg);
}
.portal-consultation-slots [data-slot-id]:disabled {
    border-color: rgba(var(--tblr-danger-rgb), .25);
    opacity: .65;
}

/* Shared prospect profile composition; panel shells and Bootstrap own sizing. */
.portal-profile .profile-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
}
.portal-profile .profile-tabs .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
}
.portal-profile .profile-header .person-name {
    font-size: 1.35rem;
    line-height: 1.3;
}
.portal-profile .profile-header .person-cell,
.portal-profile .profile-header .person-cell > :last-child {
    min-width: 0;
}
.portal-profile .profile-facts dt {
    color: var(--tblr-secondary);
    font-weight: 400;
    font-size: .8rem;
    margin-bottom: .25rem;
}
.portal-profile .profile-facts dd {
    font-weight: 500;
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
}
.portal-profile .profile-facts dd:last-child {
    margin-bottom: 0;
}
.portal-profile .profile-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
}
@media print {
    .portal-profile .profile-tabs,
    .portal-profile [data-profile-open] {
        display: none;
    }
    .portal-profile .tab-content > .tab-pane,
    .portal-profile #profile-information .accordion-collapse {
        display: block;
    }
}
