:root {
    --portal-bg: #f5f6f7;
    --portal-surface: #ffffff;
    --portal-surface-muted: #fafafa;
    --portal-ink: #171717;
    --portal-muted: #6f7378;
    --portal-border: #dedede;
    --portal-border-strong: #c9c9c9;
    --portal-shadow: 0 1rem 2.4rem rgba(18, 18, 18, 0.07);
    --portal-shadow-soft: 0 0.35rem 1.1rem rgba(18, 18, 18, 0.05);
    --sidebar-bg: #111111;
    --portal-accent: #b49a62;
    --portal-accent-dark: #8d7543;
    --status-approved-bg: #edf6f1;
    --status-approved-text: #226342;
    --status-pending-bg: #fff7e4;
    --status-pending-text: #806019;
    --status-rejected-bg: #fceeee;
    --status-rejected-text: #983434;
    --status-cancelled-bg: #eeeeee;
    --status-cancelled-text: #5f6368;
}

html,
body {
    min-height: 100%;
    background: var(--portal-bg);
    color: var(--portal-ink);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a,
.btn-link {
    color: var(--portal-ink);
}

a:hover,
.btn-link:hover {
    color: #000;
}

.content {
    padding-top: 1.1rem;
}

h1,
h2,
h3 {
    color: var(--portal-ink);
    letter-spacing: 0;
}

h1:focus {
    outline: none;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.page-kicker {
    color: var(--portal-accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.page-title {
    margin: 0.15rem 0 0;
    font-size: 1.85rem;
    font-weight: 760;
}

.page-subtitle {
    max-width: 54rem;
    margin: 0.35rem 0 0;
    color: var(--portal-muted);
}

.section-card,
.form-section,
.metric-card,
.quick-link-card,
.portal-content section.border,
.portal-content .border.rounded.p-3 {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border) !important;
    border-radius: 0.85rem !important;
    box-shadow: var(--portal-shadow-soft);
}

.section-card,
.form-section {
    padding: 1.15rem;
    margin-bottom: 1.25rem;
}

.metric-card {
    position: relative;
    height: 100%;
    padding: 1.1rem;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.25rem;
    background: var(--portal-accent);
}

.metric-label {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.metric-value {
    margin-top: 0.3rem;
    color: var(--portal-ink);
    font-size: 2rem;
    font-weight: 780;
    line-height: 1;
}

.metric-note {
    margin-top: 0.45rem;
    color: var(--portal-muted);
    font-size: 0.85rem;
}

.metric-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    background: var(--portal-surface-muted);
    color: var(--portal-accent-dark);
    font-weight: 800;
}

.filter-bar {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.85rem;
    box-shadow: var(--portal-shadow-soft);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.empty-state {
    background: var(--portal-surface);
    border: 1px dashed var(--portal-border-strong);
    border-radius: 0.85rem;
    color: var(--portal-muted);
    padding: 1.25rem;
}

.quick-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    color: var(--portal-ink);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.quick-link-card:hover {
    color: var(--portal-ink);
    border-color: var(--portal-accent) !important;
    box-shadow: var(--portal-shadow);
    transform: translateY(-1px);
}

.btn {
    border-radius: 0.55rem;
    font-weight: 700;
}

.external-login-form {
    margin-top: 1rem;
}

.external-login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.google-login-button {
    width: min(100%, 22rem);
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.72rem 1.1rem;
    color: #202124;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 0.65rem;
    box-shadow: 0 0.08rem 0.18rem rgba(60, 64, 67, 0.12);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.google-login-button:hover {
    background: #f8fafd;
    border-color: #c8d2e4;
    box-shadow: 0 0.35rem 0.9rem rgba(60, 64, 67, 0.16);
    transform: translateY(-1px);
}

.google-login-button:focus,
.google-login-button:active:focus {
    outline: none;
    border-color: #8ab4f8;
    box-shadow: 0 0 0 0.18rem rgba(66, 133, 244, 0.2);
}

.google-login-button:active {
    transform: translateY(0);
}

.google-login-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    flex: 0 0 auto;
}

.google-login-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.external-provider-button {
    min-height: 3rem;
    padding-inline: 1.1rem;
}

.btn-primary,
.btn-dark {
    color: #fff;
    background-color: var(--portal-ink);
    border-color: var(--portal-ink);
}

.btn-primary:hover,
.btn-dark:hover {
    color: #fff;
    background-color: #000;
    border-color: #000;
}

.btn-success {
    color: #fff;
    background-color: #275c43;
    border-color: #275c43;
}

.btn-outline-primary,
.btn-outline-dark {
    color: var(--portal-ink);
    border-color: var(--portal-border-strong);
}

.btn-outline-primary:hover,
.btn-outline-dark:hover {
    color: #fff;
    background-color: var(--portal-ink);
    border-color: var(--portal-ink);
}

.btn-outline-secondary {
    color: #4f5357;
    border-color: var(--portal-border-strong);
}

.btn-outline-danger {
    color: #983434;
    border-color: #d8aaaa;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #983434;
    border-color: #983434;
}

.form-label {
    color: #34383c;
    font-size: 0.82rem;
    font-weight: 750;
}

.form-control,
.form-select {
    border-color: var(--portal-border);
    border-radius: 0.55rem;
    min-height: 2.55rem;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 0.18rem rgba(180, 154, 98, 0.18);
}

.validation-message,
.text-danger.validation-message {
    color: #983434;
    font-size: 0.84rem;
    margin-top: 0.25rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #6fa783;
}

.invalid {
    outline: 1px solid #b35353;
}

.alert {
    border-radius: 0.75rem;
    border-width: 1px;
    box-shadow: var(--portal-shadow-soft);
}

.alert-success {
    background: var(--status-approved-bg);
    border-color: #cfe7d8;
    color: var(--status-approved-text);
}

.alert-warning {
    background: var(--status-pending-bg);
    border-color: #ecd89c;
    color: var(--status-pending-text);
}

.alert-danger {
    background: var(--status-rejected-bg);
    border-color: #efc4c4;
    color: var(--status-rejected-text);
}

.table-responsive {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.85rem;
    box-shadow: var(--portal-shadow-soft);
}

.table {
    margin-bottom: 0;
    color: var(--portal-ink);
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.95rem;
    border-bottom-color: #ececec;
}

.table thead th {
    background: #f7f7f7;
    color: #494d52;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: #fcfcfc;
}

.table-hover > tbody > tr:hover > *,
.table tbody tr:hover > * {
    background: #f7f4ed;
}

.leave-approvals-filter,
.leave-approvals-table-shell {
    width: 100%;
}

.leave-approvals-table {
    min-width: 1420px;
}

.leave-approvals-table th,
.leave-approvals-table td {
    vertical-align: middle;
}

.leave-approvals-table th:nth-child(1),
.leave-approvals-table td:nth-child(1) {
    min-width: 8rem;
}

.leave-approvals-table th:nth-child(2),
.leave-approvals-table td:nth-child(2) {
    min-width: 13rem;
}

.leave-approvals-table th:nth-child(10),
.leave-approvals-table td:nth-child(10) {
    min-width: 7.25rem;
}

.leave-approvals-table th:nth-child(11),
.leave-approvals-table td:nth-child(11) {
    min-width: 9rem;
}

.leave-approvals-table th:nth-child(12),
.leave-approvals-table td:nth-child(12) {
    min-width: 7.5rem;
}

.leave-approvals-table th:nth-child(13),
.leave-approvals-table td:nth-child(13) {
    min-width: 12rem;
}

.leave-approvals-table th:nth-child(14),
.leave-approvals-table td:nth-child(14) {
    min-width: 11rem;
}

.leave-approvals-table td:nth-child(13) .form-control {
    min-width: 10.5rem;
}

.badge,
.status-badge,
.role-badge,
.type-badge {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.status-badge.status-approved,
.badge.text-bg-success {
    background: var(--status-approved-bg) !important;
    color: var(--status-approved-text) !important;
}

.status-badge.status-pending,
.badge.text-bg-warning {
    background: var(--status-pending-bg) !important;
    color: var(--status-pending-text) !important;
}

.status-badge.status-rejected,
.badge.text-bg-danger {
    background: var(--status-rejected-bg) !important;
    color: var(--status-rejected-text) !important;
}

.status-badge.status-cancelled,
.badge.text-bg-secondary {
    background: var(--status-cancelled-bg) !important;
    color: var(--status-cancelled-text) !important;
}

.badge.text-bg-primary,
.type-badge.type-remote {
    background: #eef1f5 !important;
    color: #303844 !important;
}

.badge.text-bg-info,
.type-badge.type-leave {
    background: #f3efe4 !important;
    color: #6e5b2f !important;
}

.type-badge.type-leave-other-country {
    background: #eeeff8 !important;
    color: #545d8c !important;
}

.type-badge.type-birthday {
    background: #f8eeee !important;
    color: #8a3c4b !important;
}

.type-badge.type-recurring {
    background: #eaf4f2 !important;
    color: #2c665d !important;
}

.role-badge {
    background: #f0f0f0;
    border: 1px solid var(--portal-border);
    color: #474b50;
}

.role-ceo {
    background: #171717;
    border-color: #171717;
    color: #fff;
}

.role-admin {
    background: #f3efe4;
    border-color: #e0d4b7;
    color: #6e5b2f;
}

.role-employee {
    background: #eef1f5;
    border-color: #d7dce3;
    color: #303844;
}

.calendar-shell {
    overflow-x: auto;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.9rem;
    box-shadow: var(--portal-shadow-soft);
}

.admin-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(10rem, 1fr));
    min-width: 70rem;
}

.admin-calendar-header,
.admin-calendar-day {
    border-right: 1px solid var(--portal-border);
    border-bottom: 1px solid var(--portal-border);
}

.admin-calendar-header {
    background: #f7f7f7;
    color: #494d52;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    padding: 0.65rem;
    text-align: center;
    text-transform: uppercase;
}

.admin-calendar-day {
    min-height: 12rem;
    padding: 0.65rem;
    background: #fff;
}

.admin-calendar-day.is-muted {
    background: #fafafa;
    color: var(--portal-muted);
}

.calendar-event {
    border: 1px solid #e5e5e5;
    border-left: 3px solid var(--portal-accent);
    border-radius: 0.65rem;
    padding: 0.5rem;
    background: #fff;
}

.calendar-event.is-other-country-off {
    border-color: #dfe1ef;
    border-left-color: #737ca9;
    background: #fafaff;
}

[data-auto-scroll="true"],
[role="alert"],
.alert[role="status"] {
    scroll-margin-top: 6rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 5rem;
    height: 5rem;
    border: 1px solid var(--portal-border);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--portal-surface-muted);
    color: var(--portal-accent-dark);
    font-weight: 850;
}

.profile-avatar.profile-avatar-sm {
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.discover-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 5.75rem;
    padding: 1rem;
    text-align: left;
    color: var(--portal-ink);
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.85rem;
    box-shadow: var(--portal-shadow-soft);
}

.discover-card:hover {
    border-color: var(--portal-accent);
}

.discover-card-body {
    min-width: 0;
}

.discover-hierarchy {
    overflow: hidden;
}

.hierarchy-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.hierarchy-row {
    --hierarchy-level: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: calc(100% - (var(--hierarchy-level) * 1.65rem));
    min-height: 5rem;
    margin-left: calc(var(--hierarchy-level) * 1.65rem);
    padding: 0.75rem;
    text-align: left;
    color: var(--portal-ink);
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.65rem;
}

.hierarchy-row:hover,
.hierarchy-row.is-selected {
    border-color: var(--portal-accent);
    box-shadow: var(--portal-shadow-soft);
}

.hierarchy-row.is-match {
    background: #fffdf8;
}

.hierarchy-connector {
    width: 0.8rem;
    height: 2.6rem;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--portal-border-strong);
    border-left: 1px solid var(--portal-border-strong);
}

.hierarchy-row.is-root .hierarchy-connector {
    border-color: transparent;
}

.hierarchy-report-count {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.35rem 0.55rem;
    color: var(--portal-muted);
    background: var(--portal-surface-muted);
    border: 1px solid var(--portal-border);
    border-radius: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.organization-chart-section {
    position: relative;
    overflow: hidden;
    padding: 0;
    background:
        radial-gradient(circle at 92% 0%, rgba(180, 154, 98, 0.11), transparent 18rem),
        var(--portal-surface);
}

.organization-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.35rem 1rem;
}

.organization-chart-header p {
    max-width: 42rem;
}

.organization-chart-header-side {
    display: grid;
    justify-items: end;
    gap: 0.7rem;
}

.organization-chart-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.organization-chart-summary > span {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.42rem 0.65rem;
    color: var(--portal-muted);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.organization-chart-summary strong {
    color: var(--portal-ink);
    font-size: 0.9rem;
}

.organization-chart-toolbar {
    display: inline-flex;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--portal-border);
    border-radius: 0.65rem;
    box-shadow: 0 0.25rem 0.75rem rgba(18, 18, 18, 0.05);
}

.organization-chart-toolbar button,
.organization-chart-toolbar output {
    display: inline-grid;
    min-width: 2.2rem;
    min-height: 2.15rem;
    place-items: center;
    padding: 0.35rem 0.55rem;
    color: #35383b;
    background: #f7f7f6;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1;
}

.organization-chart-toolbar button {
    cursor: pointer;
}

.organization-chart-toolbar button:hover,
.organization-chart-toolbar button:focus-visible {
    color: var(--portal-ink);
    background: #fff;
    border-color: var(--portal-accent);
    outline: none;
}

.organization-chart-toolbar button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.organization-chart-toolbar output {
    min-width: 3.3rem;
    color: var(--portal-muted);
    background: transparent;
}

.organization-chart-toolbar .organization-chart-fit-button {
    min-width: auto;
    padding-inline: 0.7rem;
}

.organization-chart-toolbar .organization-chart-download-button {
    min-width: auto;
    padding-inline: 0.8rem;
    color: #fff;
    background: #202224;
}

.organization-chart-toolbar .organization-chart-download-button:hover,
.organization-chart-toolbar .organization-chart-download-button:focus-visible {
    color: #fff;
    background: #080909;
    border-color: #080909;
}

.organization-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    padding: 0 1.35rem 1rem;
}

.org-team-legend {
    --org-team: #4d5e6f;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #555a60;
    font-size: 0.75rem;
    font-weight: 650;
}

.org-team-legend i {
    width: 0.55rem;
    height: 0.55rem;
    background: var(--org-team);
    border-radius: 999px;
}

.org-team-legend small {
    display: inline-grid;
    min-width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    color: var(--portal-muted);
    background: #f2f3f4;
    border-radius: 999px;
    font-size: 0.65rem;
}

.organization-chart-scroll {
    height: clamp(32rem, calc(100vh - 17rem), 52rem);
    max-width: 100%;
    overflow: auto;
    overscroll-behavior-inline: contain;
    padding: 2rem 1.25rem 1.5rem;
    border-top: 1px solid var(--portal-border);
    background-color: #f8f9fa;
    background-image: radial-gradient(circle, rgba(79, 84, 89, 0.12) 0.7px, transparent 0.8px);
    background-size: 18px 18px;
    scrollbar-color: #b8bbc0 transparent;
}

.organization-chart-scroll.is-exporting {
    cursor: progress;
}

.organization-chart-scroll:focus-visible {
    outline: 2px solid rgba(180, 154, 98, 0.58);
    outline-offset: -0.25rem;
}

.organization-chart-canvas {
    display: flex;
    justify-content: center;
    width: max-content;
    min-width: 100%;
    padding: 0 0.5rem 1rem;
    box-sizing: border-box;
}

.org-tree {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.org-tree ul {
    margin: 0;
    list-style: none;
}

.org-tree-roots {
    align-items: flex-start;
    gap: 2.5rem;
    width: max-content;
}

.org-tree-item {
    --org-team: #4d5e6f;
    --org-team-soft: #edf0f3;
    --org-team-line: #a8b0b9;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    padding: 2.5rem 0.5rem 0;
    text-align: center;
}

.org-tree-item.is-root {
    padding-top: 0;
}

.org-tree-children {
    position: relative;
    display: flex;
    justify-content: center;
    width: max-content;
    min-width: 100%;
    padding: 2.5rem 0 0;
    box-sizing: border-box;
}

.org-tree-children::before {
    position: absolute;
    top: 0;
    left: 50%;
    height: 2.5rem;
    border-left: 1.5px solid var(--org-team-line);
    content: "";
}

.org-tree-children > .org-tree-item::before,
.org-tree-children > .org-tree-item::after {
    position: absolute;
    top: 0;
    width: 50%;
    height: 2.5rem;
    border-top: 1.5px solid var(--org-team-line);
    content: "";
}

.org-tree-children > .org-tree-item::before {
    right: 50%;
}

.org-tree-children > .org-tree-item::after {
    left: 50%;
    border-left: 1.5px solid var(--org-team-line);
}

.org-tree-children > .org-tree-item:first-child::before,
.org-tree-children > .org-tree-item:last-child::after {
    border-top-color: transparent;
}

.org-tree-children > .org-tree-item:first-child::after {
    border-radius: 0.45rem 0 0;
}

.org-tree-children > .org-tree-item:last-child::before {
    border-right: 1.5px solid var(--org-team-line);
    border-radius: 0 0.45rem 0 0;
}

.org-tree-children > .org-tree-item:only-child::before,
.org-tree-children > .org-tree-item:only-child::after {
    display: none;
}

.org-person-card {
    display: grid;
    grid-template-rows: 3rem 1fr 2.3rem;
    flex: 0 0 auto;
    width: 13rem;
    height: 8rem;
    margin-inline: auto;
    padding: 0;
    overflow: hidden;
    color: var(--portal-ink);
    text-align: center;
    background: #fff;
    border: 1px solid #cfd2d5;
    border-radius: 0.65rem;
    box-shadow: 0 0.45rem 1rem rgba(29, 34, 39, 0.08);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.org-person-card:hover,
.org-person-card:focus-visible {
    border-color: var(--org-team);
    box-shadow: 0 0.7rem 1.4rem rgba(29, 34, 39, 0.13);
    outline: none;
    transform: translateY(-2px);
}

.org-tree-item.is-selected > .org-person-card {
    border-color: var(--org-team);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--org-team) 20%, transparent), 0 0.7rem 1.4rem rgba(29, 34, 39, 0.13);
}

.org-tree-item.is-match > .org-person-card {
    box-shadow: 0 0 0 3px rgba(180, 154, 98, 0.3), 0 0.7rem 1.4rem rgba(29, 34, 39, 0.12);
}

.org-person-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    padding: 0.55rem 0.75rem;
    color: var(--org-team);
    background: var(--org-team-soft);
    border-bottom: 1px solid color-mix(in srgb, var(--org-team) 24%, transparent);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    line-height: 1.25;
    text-transform: uppercase;
}

.org-person-name {
    align-self: center;
    padding: 0.7rem 0.75rem 0.4rem;
    font-size: 0.92rem;
    font-weight: 760;
    line-height: 1.3;
}

.org-person-fund {
    display: -webkit-box;
    height: 2.3rem;
    padding: 0.35rem 0.65rem 0.5rem;
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.employee-fund-select {
    min-height: 7.5rem;
}

.org-team-neutral {
    --org-team: #393b3e;
    --org-team-soft: #efefed;
    --org-team-line: #aeb0b3;
}

.org-team-0 {
    --org-team: #304d79;
    --org-team-soft: #e9eef6;
    --org-team-line: #9dacc2;
}

.org-team-1 {
    --org-team: #27676b;
    --org-team-soft: #e6f1f0;
    --org-team-line: #93b5b5;
}

.org-team-2 {
    --org-team: #8b672e;
    --org-team-soft: #f5efe3;
    --org-team-line: #c5ae82;
}

.org-team-3 {
    --org-team: #7e4350;
    --org-team-soft: #f4e9ec;
    --org-team-line: #c3a0a8;
}

.org-team-4 {
    --org-team: #4d5e6f;
    --org-team-soft: #e9edf0;
    --org-team-line: #a6b0ba;
}

.org-team-5 {
    --org-team: #5f6942;
    --org-team-soft: #edf0e7;
    --org-team-line: #aeb698;
}

.task-assignee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.task-assignee-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 13rem;
    padding: 0.55rem 0.7rem;
    background: var(--portal-surface-muted);
    border: 1px solid var(--portal-border);
    border-radius: 0.5rem;
}

.task-assignment-picker {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.8rem;
    background: var(--portal-surface-muted);
    border: 1px solid var(--portal-border);
    border-radius: 0.65rem;
}

.task-assignment-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.task-assignment-rows {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.task-assignment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
}

.task-collaborator-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.task-collaborator-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.48rem;
    color: var(--portal-text);
    background: var(--portal-surface-muted);
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 650;
}

@media (max-width: 575.98px) {
    .task-assignment-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .task-assignment-toolbar .btn,
    .task-assignment-row .btn {
        width: 100%;
    }

    .task-assignment-row {
        grid-template-columns: 1fr;
    }
}

.medical-report-table {
    min-width: 1080px;
}

.task-status-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
    gap: 1rem;
}

.task-status-panel {
    min-width: 0;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-top: 0.25rem solid var(--portal-accent);
    border-radius: 0.65rem;
    box-shadow: var(--portal-shadow-soft);
    overflow: hidden;
}

.task-status-panel-open {
    border-top-color: var(--status-cancelled-text);
}

.task-status-panel-inprogress {
    border-top-color: #4a7c99;
}

.task-status-panel-review {
    border-top-color: var(--status-pending-text);
}

.task-status-panel-recurring {
    border-top-color: #2c665d;
}

.task-status-panel-closed {
    border-top-color: var(--status-approved-text);
}

.task-status-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--portal-border);
}

.task-status-empty {
    margin: 0.75rem;
}

.task-card-list {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
}

.task-card {
    min-width: 0;
    padding: 0.8rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.5rem;
}

.task-card-overdue {
    border-color: #efc0ca;
    background: #fff1f4;
}

.task-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.task-card-title {
    color: var(--portal-ink);
    font-weight: 750;
    overflow-wrap: anywhere;
}

.task-card-details {
    margin-top: 0.55rem;
    color: var(--portal-muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.task-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.65rem;
    margin-top: 0.7rem;
    color: var(--portal-muted);
    font-size: 0.82rem;
}

.task-card-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.task-card-meta strong {
    display: block;
    color: var(--portal-ink);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.task-card-actions,
.task-edit-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.task-load-more {
    justify-self: stretch;
}

.task-inline-edit {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.task-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.task-edit-details {
    min-height: 4.5rem;
    resize: vertical;
}

.task-deadline-input-overdue {
    border-color: #e4a1ad;
    background-color: #fff7f9;
}

.task-deadline-text-overdue {
    color: #9f233a;
    font-weight: 700;
}

.task-overdue-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #ffe1e8;
    color: #9f233a;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}

.task-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.task-summary-employee-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    color: var(--portal-ink);
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.task-summary-employee-button:hover {
    color: var(--portal-accent-dark);
}

.task-summary-toggle-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-accent-dark);
    background: #f8f4eb;
    border: 1px solid #e5dcc9;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 850;
    line-height: 1;
}

.task-summary-breakdown-row > td {
    padding: 0.95rem;
    background: #fffdf8;
}

.task-summary-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.8rem;
}

.task-summary-status-group {
    min-height: 5rem;
    padding: 0.75rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 0.5rem;
}

.task-summary-status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    color: var(--portal-muted);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.task-summary-mini-task {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--portal-border);
}

.task-summary-status-heading + .task-summary-mini-task {
    border-top: 0;
}

.blazor-error-boundary {
    background: #983434;
    border-radius: 0.75rem;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.activity-details-summary {
    color: var(--bs-link-color);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.discover-chart-card {
    position: relative;
    overflow: visible;
}

.discover-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.discover-chart-header p {
    max-width: 44rem;
}

.leader-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
    padding: 0.65rem 0.85rem;
    color: #5d4b22;
    background: linear-gradient(135deg, #fffaf0, #f4ead3);
    border: 1px solid #e4d4ad;
    border-radius: 0.75rem;
}

.leader-highlight > span:first-child {
    font-size: 1.25rem;
}

.leader-highlight strong,
.leader-highlight small {
    display: block;
}

.leader-highlight small {
    margin-top: 0.05rem;
    color: #786943;
    font-size: 0.72rem;
}

.leaderboard-scroll {
    margin-top: 1.25rem;
    padding: 0.75rem 0.25rem 0.5rem;
    overflow-x: auto;
    scrollbar-color: #cfc4ac transparent;
}

.leaderboard-scroll:focus-visible,
.headcount-chart-scroll:focus-visible {
    outline: 2px solid rgba(180, 154, 98, 0.5);
    outline-offset: 0.25rem;
    border-radius: 0.5rem;
}

.leaderboard-chart {
    display: grid;
    grid-template-columns: repeat(var(--leaderboard-count), minmax(5.75rem, 1fr));
    align-items: end;
    gap: 0.45rem;
    min-width: max(100%, calc(var(--leaderboard-count) * 6.2rem));
}

.leaderboard-entry {
    display: grid;
    grid-template-rows: 1.5rem 13rem 2.3rem auto auto;
    justify-items: center;
    gap: 0.32rem;
    min-width: 0;
    padding: 0.45rem 0.3rem 0.65rem;
    color: var(--portal-ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    font: inherit;
    text-align: center;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.leaderboard-entry:hover,
.leaderboard-entry:focus-visible {
    background: #fcfaf5;
    border-color: #e5dcc9;
    outline: none;
    transform: translateY(-0.2rem);
}

.leaderboard-rank {
    align-self: center;
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 850;
}

.leaderboard-entry.is-rank-1 .leaderboard-rank,
.leaderboard-entry.is-rank-2 .leaderboard-rank,
.leaderboard-entry.is-rank-3 .leaderboard-rank {
    font-size: 1.2rem;
    line-height: 1;
}

.leaderboard-bar-track {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-bottom: 1px solid #d9d2c3;
    background: linear-gradient(to top, rgba(180, 154, 98, 0.05), transparent 70%);
    border-radius: 0.45rem 0.45rem 0 0;
}

.leaderboard-bar {
    position: relative;
    width: min(70%, 3.75rem);
    height: var(--bar-height);
    min-height: 0.38rem;
    background: linear-gradient(180deg, #bca66f 0%, #8f7642 100%);
    border-radius: 0.65rem 0.65rem 0.2rem 0.2rem;
    box-shadow: 0 0.45rem 0.9rem rgba(112, 89, 40, 0.16);
    transition: height 320ms ease, filter 160ms ease;
}

.leaderboard-entry:hover .leaderboard-bar,
.leaderboard-entry:focus-visible .leaderboard-bar {
    filter: saturate(1.12) brightness(1.03);
}

.leaderboard-entry.is-rank-1 .leaderboard-bar {
    background: linear-gradient(180deg, #d7ba68 0%, #a98634 100%);
}

.leaderboard-entry.is-rank-2 .leaderboard-bar {
    background: linear-gradient(180deg, #bbc1ca 0%, #7d8795 100%);
}

.leaderboard-entry.is-rank-3 .leaderboard-bar {
    background: linear-gradient(180deg, #c99772 0%, #9a6546 100%);
}

.leaderboard-value {
    position: absolute;
    top: -1.55rem;
    left: 50%;
    min-width: 1.75rem;
    padding: 0.12rem 0.35rem;
    color: #5f4e28;
    background: #fff;
    border: 1px solid #e4dccb;
    border-radius: 999px;
    box-shadow: 0 0.2rem 0.45rem rgba(18, 18, 18, 0.07);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.2;
    transform: translateX(-50%);
}

.profile-avatar.leaderboard-avatar {
    width: 2.3rem;
    height: 2.3rem;
    border-width: 2px;
    border-color: #fff;
    box-shadow: 0 0 0 1px var(--portal-border), 0 0.25rem 0.55rem rgba(18, 18, 18, 0.09);
    font-size: 0.65rem;
}

.leaderboard-name {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 0.74rem;
    font-weight: 780;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-country {
    color: var(--portal-muted);
    font-size: 0.65rem;
    line-height: 1;
}

.headcount-card {
    background:
        radial-gradient(circle at 95% 8%, rgba(180, 154, 98, 0.09), transparent 14rem),
        var(--portal-surface);
}

.headcount-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    max-width: 28rem;
}

.headcount-event-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.7rem;
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.headcount-event-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.headcount-event-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.headcount-event-dot.is-arrival {
    background: #57866c;
}

.headcount-event-dot.is-departure {
    background: #737ca9;
}

.headcount-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.6rem;
    color: #4c5056;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.country-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.country-dot-lebanon {
    background: #b49a62;
}

.country-dot-france {
    background: #737ca9;
}

.headcount-chart-scroll {
    margin-top: 1.25rem;
    overflow-x: auto;
    overflow-y: visible;
}

.headcount-chart {
    position: relative;
    min-width: 48rem;
    aspect-ratio: 1000 / 320;
}

.headcount-chart svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.headcount-gridline {
    stroke: #e8e4dc;
    stroke-width: 1;
    stroke-dasharray: 4 6;
    vector-effect: non-scaling-stroke;
}

.headcount-axis-label,
.headcount-date-label {
    fill: #777b80;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 650;
}

.headcount-area {
    fill: url(#headcount-area-gradient);
}

.headcount-line {
    fill: none;
    stroke: #9d824c;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.headcount-join {
    position: absolute;
    z-index: 2;
    top: var(--point-top);
    left: var(--point-left);
    display: block;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: 50%;
    font: inherit;
    transform: translate(-50%, -50%);
}

.headcount-join:hover,
.headcount-join:focus-visible {
    z-index: 10;
    outline: none;
}

.headcount-join::after {
    position: absolute;
    right: -0.32rem;
    bottom: -0.22rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.85rem;
    height: 0.85rem;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
}

.headcount-join.is-arrival::after {
    background: #57866c;
    content: "+";
}

.headcount-join.is-departure::after {
    background: #737ca9;
    content: "−";
}

.headcount-join.is-inactive {
    cursor: help;
}

.profile-avatar.headcount-avatar {
    width: 1.65rem;
    height: 1.65rem;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #a58b55, 0 0.25rem 0.6rem rgba(18, 18, 18, 0.18);
    font-size: 0.45rem;
    transition: transform 150ms ease;
}

.headcount-join.is-departure .headcount-avatar {
    box-shadow: 0 0 0 2px #737ca9, 0 0.25rem 0.6rem rgba(18, 18, 18, 0.18);
    filter: saturate(0.78);
}

.headcount-join:hover .headcount-avatar,
.headcount-join:focus-visible .headcount-avatar {
    transform: scale(1.18);
}

.headcount-tooltip {
    position: absolute;
    bottom: calc(100% + 0.8rem);
    left: 50%;
    display: none;
    flex-direction: column;
    width: max-content;
    max-width: 13rem;
    padding: 0.55rem 0.65rem;
    color: #fff;
    background: #242424;
    border-radius: 0.55rem;
    box-shadow: 0 0.65rem 1.4rem rgba(18, 18, 18, 0.2);
    font-size: 0.7rem;
    line-height: 1.35;
    text-align: left;
    pointer-events: none;
    transform: translateX(-50%);
}

.headcount-tooltip::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 0;
    border: 0.35rem solid transparent;
    border-top-color: #242424;
    content: "";
    transform: translateX(-50%);
}

.headcount-tooltip strong,
.headcount-tooltip span,
.headcount-tooltip small {
    display: block;
}

.headcount-tooltip small {
    margin-top: 0.15rem;
    color: #d7caa9;
}

.headcount-join.is-departure .headcount-tooltip small {
    color: #d6d9ee;
}

.headcount-join:hover .headcount-tooltip,
.headcount-join:focus-visible .headcount-tooltip {
    display: flex;
}

.headcount-join.is-near-left .headcount-tooltip {
    left: -0.35rem;
    transform: none;
}

.headcount-join.is-near-left .headcount-tooltip::after {
    left: 1.15rem;
}

.headcount-join.is-near-right .headcount-tooltip {
    right: -0.35rem;
    left: auto;
    transform: none;
}

.headcount-join.is-near-right .headcount-tooltip::after {
    right: 0.8rem;
    left: auto;
    transform: none;
}

.headcount-join.is-near-top .headcount-tooltip {
    top: calc(100% + 0.8rem);
    bottom: auto;
}

.headcount-join.is-near-top .headcount-tooltip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #242424;
}

.activity-details-json {
    background: #f7f7f8;
    border: 1px solid #dedee3;
    border-radius: 0.5rem;
    font-size: 0.78rem;
    margin: 0.65rem 0 0;
    max-height: 24rem;
    max-width: min(44rem, 75vw);
    overflow: auto;
    padding: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
    }

    .metric-value {
        font-size: 1.65rem;
    }

    .discover-chart-header {
        flex-direction: column;
    }

    .headcount-summary {
        justify-content: flex-start;
    }

    .organization-chart-header {
        flex-direction: column;
    }

    .organization-chart-summary {
        justify-content: flex-start;
    }

    .organization-chart-header-side {
        justify-items: start;
    }
}

@media (max-width: 700px) {
    .filter-bar .btn-group {
        display: flex;
        width: 100%;
        overflow-x: auto;
    }

    .filter-bar .btn-group .btn {
        flex: 0 0 auto;
    }

    .organization-chart-header {
        padding-inline: 1rem;
    }

    .organization-chart-legend {
        padding-inline: 1rem;
    }

    .organization-chart-scroll {
        height: clamp(28rem, calc(100vh - 12rem), 40rem);
        padding-inline: 0.5rem;
    }

    .organization-chart-toolbar {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .org-person-card {
        width: 11.5rem;
    }

    .hierarchy-row {
        width: calc(100% - (var(--hierarchy-level) * 0.85rem));
        margin-left: calc(var(--hierarchy-level) * 0.85rem);
    }

    .hierarchy-report-count {
        display: none;
    }

    .task-summary-breakdown {
        grid-template-columns: 1fr;
    }

    .task-status-board {
        grid-template-columns: 1fr;
    }

    .task-card-meta,
    .task-edit-grid {
        grid-template-columns: 1fr;
    }

    .leader-highlight {
        width: 100%;
    }

    .leaderboard-chart {
        grid-template-columns: repeat(var(--leaderboard-count), minmax(5.25rem, 1fr));
        min-width: max(100%, calc(var(--leaderboard-count) * 5.7rem));
    }

    .leaderboard-entry {
        grid-template-rows: 1.5rem 11rem 2.3rem auto auto;
    }

    .headcount-chart {
        min-width: 42rem;
    }
}
