/* Admin Home canvas. Everything is scoped to .admin-home so other dashboard tabs keep their styles. */

.admin-home,
.home-sheet,
.home-select-menu {
    --h-radius: 26px;
    --h-gap: 20px;
    --h-row-gap: 30px;
    --h-row: 250px;
    --h-ease: cubic-bezier(.2, .9, .25, 1);
    --h-spring: cubic-bezier(.3, 1.35, .45, 1);

    --h-text: #0d1838;
    --h-muted: #5b6889;
    --h-faint: rgba(13, 24, 56, .42);
    --h-ink: #0d1838;
    --h-on-ink: #ffffff;
    --h-glass: rgba(255, 255, 255, .64);
    --h-glass-strong: rgba(255, 255, 255, .9);
    --h-stroke: rgba(255, 255, 255, .8);
    --h-hair: rgba(13, 24, 56, .08);
    --h-hair-strong: rgba(13, 24, 56, .16);
    --h-chip: rgba(13, 24, 56, .045);
    --h-chip-strong: rgba(13, 24, 56, .09);
    --h-stage: linear-gradient(160deg, rgba(44, 73, 149, .10), rgba(241, 90, 49, .07));
    --h-sheet: rgba(246, 248, 253, .86);
    --h-handle: rgba(13, 24, 56, .55);
    --h-badge: rgba(92, 102, 128, .94);
    --h-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 18px 40px -22px rgba(24, 40, 110, .38), 0 2px 8px rgba(24, 40, 110, .06);
    --h-shadow-lift: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 28px 60px -24px rgba(24, 40, 110, .45), 0 4px 14px rgba(24, 40, 110, .08);
    --h-bg: radial-gradient(1200px 600px at 8% -10%, #dfe6ff 0%, rgba(223, 230, 255, 0) 60%),
            radial-gradient(900px 520px at 100% 0%, #ffe7dc 0%, rgba(255, 231, 220, 0) 55%),
            linear-gradient(180deg, #eef2fb 0%, #f6f4fb 100%);
    --h-orb-a: rgba(91, 118, 255, .35);
    --h-orb-b: rgba(255, 128, 92, .28);

    --h-info: #0ea5e9;
    --h-warn: #f59e0b;
    --h-danger: #e5484d;
    --h-ok: #16a34a;
}

.admin-home {
    position: relative;
    isolation: isolate;
    flex-shrink: 0;
    min-height: calc(100vh - 110px);
    margin: 0 0 24px;
    padding: 18px 24px 56px;
    border-radius: 30px;
    background: var(--h-bg);
    color: var(--h-text);
    overflow: clip;
    transition: background .4s ease, color .4s ease;
}

/* Bleed through the content frame so the canvas fills the screen. */
.admin-dashboard .admin-home {
    min-height: 100dvh;
    margin-left: calc(var(--content-padding-x) * -1);
    margin-right: calc(var(--content-padding-x) * -1);
    margin-bottom: -20px;
    border-radius: 0;
    padding-left: max(24px, var(--content-padding-x));
    padding-right: max(24px, var(--content-padding-x));
}

/* The page behind the canvas uses the same wash, so the color reaches the bottom of the screen. */
body.admin-dashboard:has(#admin-home) {
    background: var(--mx-bg, var(--h-bg));
}

.admin-home[data-home-theme="dark"],
.home-sheet[data-home-theme="dark"],
.home-select-menu[data-home-theme="dark"] {
    --h-text: #eef1ff;
    --h-muted: #98a3c4;
    --h-faint: rgba(238, 241, 255, .42);
    --h-ink: #f3f5ff;
    --h-on-ink: #0b1024;
    --h-glass: rgba(24, 30, 58, .58);
    --h-glass-strong: rgba(34, 41, 74, .92);
    --h-stroke: rgba(255, 255, 255, .09);
    --h-hair: rgba(255, 255, 255, .08);
    --h-hair-strong: rgba(255, 255, 255, .18);
    --h-chip: rgba(255, 255, 255, .055);
    --h-chip-strong: rgba(255, 255, 255, .11);
    --h-stage: linear-gradient(160deg, rgba(99, 122, 255, .16), rgba(241, 90, 49, .10));
    --h-sheet: rgba(18, 22, 44, .86);
    --h-handle: rgba(238, 241, 255, .7);
    --h-badge: rgba(150, 158, 186, .9);
    --h-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 22px 48px -24px rgba(0, 0, 0, .7), 0 2px 10px rgba(0, 0, 0, .25);
    --h-shadow-lift: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 34px 70px -26px rgba(0, 0, 0, .8), 0 4px 16px rgba(0, 0, 0, .3);
    --h-bg: radial-gradient(1100px 620px at 6% -12%, rgba(64, 84, 196, .45) 0%, rgba(64, 84, 196, 0) 60%),
            radial-gradient(900px 520px at 100% 0%, rgba(160, 60, 120, .30) 0%, rgba(160, 60, 120, 0) 55%),
            linear-gradient(180deg, #0a0f24 0%, #0d1129 100%);
    --h-orb-a: rgba(91, 118, 255, .32);
    --h-orb-b: rgba(241, 90, 49, .18);
}

.admin-home::before,
.admin-home::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: home-drift 22s ease-in-out infinite alternate;
}

.admin-home::before {
    top: 18%;
    inset-inline-start: -160px;
    background: var(--h-orb-a);
}

.admin-home::after {
    bottom: -180px;
    inset-inline-end: -120px;
    background: var(--h-orb-b);
    animation-delay: -11s;
}

/* Dashboard frame and tab strip on Home */

.admin-dashboard .admin-home .admin-customized-dashboard {
    background: transparent;
    padding: 0;
    gap: 18px;
    border-radius: 0;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul {
    align-items: stretch;
    padding: 8px 10px;
    background: var(--h-glass);
    border: 1px solid var(--h-stroke);
    border-radius: 22px;
    box-shadow: var(--h-shadow);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li {
    margin-inline-end: 0;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a {
    padding: 6px 8px;
    border-radius: 14px;
    color: var(--h-muted);
    font-weight: 600;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a .text {
    font-size: 11px;
    line-height: 1.2;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a i {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
    border-radius: 11px;
    background: var(--h-chip-strong);
    color: var(--h-ink);
    box-shadow: none;
    font-size: 14px;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a:hover {
    transform: none;
    color: var(--h-text);
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a:hover i {
    background: var(--h-chip-strong);
    color: var(--h-ink);
    box-shadow: none;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a.active {
    color: var(--h-text);
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li:not(.toggler) a.active i {
    background: var(--h-ink);
    color: var(--h-on-ink);
    box-shadow: none;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li.transaction-approval-shortcut {
    align-self: center;
    margin-inline-start: auto;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--h-hair);
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li.transaction-approval-shortcut a > span {
    position: relative;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar ul li.transaction-approval-shortcut a .transaction-approval-count {
    top: -8px;
    inset-inline-end: calc(50% - 24px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--h-ok);
    color: #fff;
    box-shadow: 0 0 0 2px var(--h-glass-strong);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.admin-dashboard .admin-home .admin-customized-dashboard .sidebar .collapse-side-menu {
    color: var(--h-muted);
}

/* Top bar */

.home-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 4px 22px;
}

.home-greeting {
    min-width: 0;
}

.home-greeting__date {
    display: block;
    color: var(--h-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-greeting__title {
    margin: 4px 0 0;
    color: var(--h-text);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.home-pill {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--h-stroke);
    border-radius: 999px;
    background: var(--h-glass);
    box-shadow: var(--h-shadow);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
}

.home-pill__btn,
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--h-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s var(--h-spring);
}

.home-pill__btn:hover,
.home-btn:hover {
    background: var(--h-chip-strong);
}

.home-pill__btn:active,
.home-btn:active {
    transform: scale(.96);
}

.home-pill__btn:focus-visible,
.home-btn:focus-visible,
.home-icon-btn:focus-visible,
.home-card__remove:focus-visible,
.home-card__resize:focus-visible,
.home-catalog__item:focus-visible,
.home-suggest__tile:focus-visible {
    outline: 2px solid #6d83ff;
    outline-offset: 2px;
}

.home-pill__btn--icon {
    width: 36px;
    padding: 0;
}

.home-pill__btn--primary,
.home-btn--primary {
    background: var(--h-ink);
    color: var(--h-on-ink);
}

.home-pill__btn--primary:hover,
.home-btn--primary:hover {
    background: var(--h-ink);
    opacity: .9;
}

.home-btn--primary:disabled {
    cursor: default;
    opacity: .45;
}

.admin-home:not(.is-editing) [data-edit-only],
.admin-home.is-editing [data-view-only] {
    display: none;
}

.home-edit-hint {
    margin: -10px 4px 18px;
    color: var(--h-muted);
    font-size: 13px;
    text-align: center;
    animation: home-fade .25s ease both;
}

/* Empty state */

.home-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 420px;
    margin: 48px auto;
    padding: 36px 28px;
    border: 1px solid var(--h-stroke);
    border-radius: var(--h-radius);
    background: var(--h-glass);
    box-shadow: var(--h-shadow);
    text-align: center;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

.home-empty[hidden] {
    display: none;
}

.home-empty__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #5b76ff, #a35bff);
    color: #fff;
    font-size: 22px;
}

.home-empty__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.home-empty__text {
    margin: 0;
    color: var(--h-muted);
}

/* Grid */

.home-grid {
    --span-s: 3;
    --span-m: 6;
    --span-l: 6;
    --span-xl: 12;
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: var(--h-row);
    grid-auto-flow: row dense;
    gap: var(--h-row-gap) var(--h-gap);
}

.home-card {
    position: relative;
    min-width: 0;
    animation: home-in .34s var(--h-ease) both;
    animation-delay: calc(var(--home-widget-i, 0) * 40ms);
}

.home-card--s { grid-column: span var(--span-s); }
.home-card--m { grid-column: span var(--span-m); }
.home-card--l { grid-column: span var(--span-l); grid-row: span 2; }
.home-card--xl { grid-column: span var(--span-xl); grid-row: span 2; }

.home-card__surface {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--h-stroke);
    border-radius: var(--h-radius);
    background: var(--h-glass);
    box-shadow: var(--h-shadow);
    overflow: hidden;
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    transition: transform .3s var(--h-ease), box-shadow .3s var(--h-ease), background .4s ease;
}

.home-card__surface::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -40%;
    inset-inline-end: -20%;
    width: 70%;
    height: 90%;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--w-a), transparent);
    opacity: .14;
    pointer-events: none;
}

.admin-home:not(.is-editing) .home-card:hover .home-card__surface {
    transform: translateY(-3px);
    box-shadow: var(--h-shadow-lift);
}

.home-card__head {
    position: relative;
    z-index: 1;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 16px 18px 8px;
}

.home-card--full .home-card__head {
    padding-inline-end: 250px;
}

.home-card__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--w-a), var(--w-b));
    box-shadow: 0 8px 16px -8px var(--w-a);
    color: #fff;
    font-size: 14px;
}

.home-card__title {
    margin: 0;
    overflow: hidden;
    color: var(--h-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-card__body {
    z-index: 1;
    flex: 1;
    min-height: 0;
    padding: 2px 18px 16px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--h-hair-strong) transparent;
}

.home-card--full .home-card__body {
    padding: 0 10px 10px;
}

.home-card__caption {
    position: absolute;
    right: 0;
    bottom: -23px;
    left: 0;
    overflow: hidden;
    color: var(--h-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.home-accent--indigo { --w-a: #5b6cff; --w-b: #8b5cf6; }
.home-accent--blue { --w-a: #2f7bff; --w-b: #22b8ff; }
.home-accent--teal { --w-a: #0fb5a6; --w-b: #22d3ee; }
.home-accent--orange { --w-a: #f15a31; --w-b: #f7a440; }
.home-accent--cyan { --w-a: #0ea5e9; --w-b: #38bdf8; }
.home-accent--rose { --w-a: #e5484d; --w-b: #f472b6; }
.home-accent--violet { --w-a: #8b5cf6; --w-b: #ec4899; }
.home-accent--green { --w-a: #16a34a; --w-b: #84cc16; }
.home-accent--amber { --w-a: #f59e0b; --w-b: #f97316; }

/* Edit mode */

.home-card__remove,
.home-card__resize {
    position: absolute;
    z-index: 4;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    opacity: 0;
    transform: scale(.4);
    transition: transform .26s var(--h-spring), opacity .2s ease;
    pointer-events: none;
}

.home-card__remove {
    top: -10px;
    inset-inline-start: -10px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--h-badge);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    color: #fff;
    font-size: 12px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.home-card__resize {
    bottom: 4px;
    inset-inline-end: 4px;
    width: 34px;
    height: 34px;
    background: transparent;
    cursor: nwse-resize;
    touch-action: none;
}

[dir="rtl"] .home-card__resize,
.admin-home[dir="rtl"] .home-card__resize {
    cursor: nesw-resize;
}

.home-card__resize span {
    position: absolute;
    inset: 6px;
    border-bottom: 4px solid var(--h-handle);
    border-inline-end: 4px solid var(--h-handle);
    border-end-end-radius: 18px;
}

.admin-home.is-editing .home-card__remove,
.admin-home.is-editing .home-card__resize {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.admin-home.is-editing .home-card__caption {
    opacity: 1;
}

.admin-home.is-editing .home-card {
    cursor: grab;
    animation: home-wobble .3s ease-in-out infinite alternate;
}

.admin-home.is-editing .home-card:nth-child(even) {
    animation-duration: .34s;
    animation-direction: alternate-reverse;
}

.admin-home.is-editing .home-card__body,
.admin-home.is-editing .home-card__head {
    pointer-events: none;
    user-select: none;
}

.home-card.is-dragging {
    opacity: .35;
}

.home-card.is-busy .home-card__surface {
    opacity: .6;
}

.home-card.is-removing {
    animation: home-out .2s ease forwards !important;
}

.home-card.is-morphing {
    animation: home-morph .36s var(--h-spring) both !important;
}

.home-resize-ghost {
    position: absolute;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(109, 131, 255, .9);
    border-radius: var(--h-radius);
    background: rgba(109, 131, 255, .10);
    pointer-events: none;
    transition: width .18s var(--h-ease), height .18s var(--h-ease), left .18s var(--h-ease);
}

.home-resize-ghost span {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--h-ink);
    color: var(--h-on-ink);
    font-size: 12px;
    font-weight: 700;
}

/* Existing dashboard partials inside a card */

.admin-dashboard .admin-home .home-card .widget {
    position: static;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

.admin-dashboard .admin-home .home-card .widget > .widget-header {
    position: absolute;
    z-index: 2;
    top: 14px;
    inset-inline-end: 16px;
    gap: 10px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.admin-dashboard .admin-home .home-card .widget > .widget-header > .icon,
.admin-dashboard .admin-home .home-card .widget > .widget-header > .title {
    display: none;
}

.admin-dashboard .admin-home .home-card .widget > .widget-content {
    padding: 0;
}

.admin-dashboard .admin-home .home-card .widget-header .right {
    flex: 0 0 210px;
    max-width: 210px;
    padding: 0;
}

.admin-dashboard .admin-home .home-card .request-count {
    border-radius: 999px;
    background: var(--h-chip-strong);
    color: var(--h-text);
    font-weight: 700;
}

.admin-dashboard .admin-home .home-card .view-all-requests {
    color: var(--h-muted);
    font-size: 12px;
    font-weight: 600;
}

.admin-dashboard .admin-home .home-card .k-grid,
.admin-dashboard .admin-home .home-card .k-grid-header,
.admin-dashboard .admin-home .home-card .k-grid-header-wrap,
.admin-dashboard .admin-home .home-card .k-grid-content,
.admin-dashboard .admin-home .home-card .k-grid table,
.admin-dashboard .admin-home .home-card .k-grid tr,
.admin-dashboard .admin-home .home-card .k-grid .k-alt,
.admin-dashboard .admin-home .home-card .k-detail-row,
.admin-dashboard .admin-home .home-card .k-detail-cell,
.admin-dashboard .admin-home .home-card .k-hierarchy-cell {
    border-color: var(--h-hair);
    background: transparent !important;
    box-shadow: none !important;
    color: var(--h-text);
}

.admin-dashboard .admin-home .home-card .k-grid {
    border: 0;
}

.admin-dashboard .admin-home .admin-customized-dashboard .home-card .k-grid th {
    padding: 8px 6px;
    border: 0;
    border-bottom: 1px solid var(--h-hair);
    background: transparent !important;
    color: var(--h-muted) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.admin-dashboard .admin-home .alert-dashboard .home-card .k-grid td,
.admin-dashboard .admin-home .home-card .k-grid td {
    border-color: var(--h-hair);
    color: var(--h-text);
}

.admin-dashboard .admin-home .home-card .k-grid tbody tr:hover > td {
    background: var(--h-chip);
}

.admin-dashboard .admin-home .home-card .k-grid a {
    color: var(--h-text);
}

.admin-dashboard .admin-home .home-card .dashboard-request-view,
.admin-dashboard .admin-home .home-card .k-grid .btn-light {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--h-chip-strong);
    color: var(--h-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.admin-dashboard .admin-home .home-card .requester-photo,
.admin-dashboard .admin-home .home-card .zoomable-thumb2 {
    border-radius: 50%;
}

.admin-dashboard .admin-home[data-home-theme="dark"] .home-card .request-status {
    background: rgba(255, 255, 255, .08);
    color: var(--h-text);
}

.admin-dashboard .admin-home[data-home-theme="dark"] .home-card .request-status-pending { color: #fbbf6a; }
.admin-dashboard .admin-home[data-home-theme="dark"] .home-card .request-status-accepted { color: #6ee7a0; }
.admin-dashboard .admin-home[data-home-theme="dark"] .home-card .request-status-rejected { color: #fca5a5; }

.admin-dashboard .admin-home .home-card .notice-period-employees {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 8px;
    list-style: none;
}

.admin-dashboard .admin-home .home-card .notice-period-employees li {
    border: 0;
    border-radius: 16px;
    background: var(--h-chip);
    color: var(--h-text);
}

.admin-dashboard .admin-home .home-card .notice-period-employees li.table-danger {
    background: rgba(229, 72, 77, .14);
}

.admin-dashboard .admin-home .home-card .notice-employee-name {
    color: var(--h-text);
}

.admin-dashboard .admin-home .home-card .notice-working-date,
.admin-dashboard .admin-home .home-card .notice-period-empty {
    color: var(--h-muted);
}

.admin-dashboard .admin-home .home-card .select2-selection {
    height: 36px;
    padding-inline: 14px 0;
    border: 1px solid var(--h-hair-strong);
    border-radius: 999px;
    background: var(--h-chip);
    box-shadow: none;
}

.admin-dashboard .admin-home .home-card .select2.select2-container--focus .select2-selection--single,
.admin-dashboard .admin-home .home-card .select2.select2-container--open .select2-selection--single {
    border-color: var(--h-hair-strong);
    background: var(--h-glass-strong);
}

.admin-dashboard .admin-home .home-card .select2-selection__rendered,
.admin-dashboard .admin-home .home-card .select2-selection__placeholder {
    color: var(--h-muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-dashboard .admin-home .home-card .select2 .select2-selection__arrow {
    min-width: 32px;
    background: transparent;
    border: 0;
}

.admin-dashboard .admin-home .home-card .select2 .select2-selection__arrow > b {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border: 0;
    border-right: 1.5px solid var(--h-muted);
    border-bottom: 1.5px solid var(--h-muted);
    transform: rotate(45deg);
}

.select2-container .home-select-menu.select2-dropdown,
.select2-container .home-select-menu.select2-dropdown--above,
.select2-container .home-select-menu.select2-dropdown--below {
    overflow: hidden;
    margin-top: 8px;
    padding: 6px;
    border: 1px solid var(--h-stroke);
    border-radius: 18px;
    background: var(--h-glass-strong);
    box-shadow: var(--h-shadow-lift);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
}

.select2-container .home-select-menu.select2-dropdown--above {
    margin-top: 0;
    margin-bottom: 8px;
}

.select2-container .home-select-menu .select2-search--dropdown {
    padding: 4px 4px 8px;
    background: transparent;
}

.select2-container .home-select-menu .select2-search__field {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--h-hair-strong);
    border-radius: 12px;
    background: var(--h-chip);
    color: var(--h-text);
}

.select2-container .home-select-menu .select2-results__options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 280px;
}

.select2-container .home-select-menu .select2-results__option {
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--h-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
}

.select2-container .home-select-menu .select2-results__option .select2-option {
    color: inherit;
}

.select2-container .home-select-menu .select2-results__option--highlighted {
    background: var(--h-chip-strong);
    color: var(--h-text);
}

.select2-container .home-select-menu .select2-results__option[aria-selected="true"] {
    background: var(--h-ink);
    color: var(--h-on-ink);
}

.select2-container .home-select-menu .select2-results__option[aria-selected="true"] .select2-option:after {
    color: var(--h-on-ink);
}

.admin-dashboard .admin-home .home-card .highcharts-container,
.admin-dashboard .admin-home .home-card [id="EmployeesbyAgecontainer"],
.admin-dashboard .admin-home .home-card [id="countByServicePeriod"] {
    margin: 0 !important;
}

/* Glance content */

.home-glance {
    display: flex;
    gap: 18px;
    height: 100%;
    min-width: 0;
}

.home-card--s .home-glance {
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.home-glance__link {
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: var(--h-radius);
}

.home-glance__metric {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
}

.home-card--m .home-glance__metric {
    flex-basis: 30%;
    padding-bottom: 4px;
}

.home-glance__value {
    display: block;
    color: var(--h-text);
    font-size: 54px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .95;
    font-variant-numeric: tabular-nums;
}

.home-glance__label {
    display: block;
    margin-top: 8px;
    color: var(--h-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-glance__sub {
    overflow: hidden;
    color: var(--h-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-glance__sub strong {
    color: var(--h-text);
    font-weight: 600;
}

.home-glance__list {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: safe center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-glance__row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 10px;
    border-radius: 14px;
    background: var(--h-chip);
}

.home-glance__row-main {
    flex: 1;
    min-width: 0;
}

.home-glance__name,
.home-glance__meta {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-glance__name {
    color: var(--h-text);
    font-size: 13px;
    font-weight: 600;
}

.home-glance__meta {
    color: var(--h-muted);
    font-size: 11px;
}

.home-avatar {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--h-glass-strong);
    object-fit: cover;
}

.home-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-inline: 10px;
    border-radius: 50%;
    background: var(--h-muted);
    box-shadow: 0 0 0 4px var(--h-chip);
}

.home-dot--pending { background: var(--h-warn); }
.home-dot--accepted { background: var(--h-ok); }
.home-dot--rejected { background: var(--h-danger); }

.home-faces {
    display: flex;
    align-items: center;
    min-height: 34px;
}

.home-faces .home-avatar {
    width: 34px;
    height: 34px;
}

.home-faces .home-avatar + .home-avatar {
    margin-inline-start: -10px;
}

.home-people {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.home-people--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 8px;
    border-radius: 18px;
    background: var(--h-chip);
    text-align: center;
}

.home-person .home-avatar {
    width: 46px;
    height: 46px;
}

.home-person.is-soon .home-avatar {
    box-shadow: 0 0 0 2px var(--h-glass-strong), 0 0 0 4px var(--h-warn);
}

.home-person__name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--h-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-person__date {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--h-chip-strong);
    color: var(--h-muted);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.home-person.is-soon .home-person__date {
    background: rgba(245, 158, 11, .16);
    color: #b45309;
}

[data-home-theme="dark"] .home-person.is-soon .home-person__date {
    color: #fbbf6a;
}

.home-chips {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: safe center;
    gap: 8px;
    min-width: 0;
}

.home-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 14px;
    background: var(--h-chip);
    color: var(--h-text);
    font-size: 13px;
    font-weight: 600;
}

.home-chip__name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-chip__count {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--w-a), var(--w-b));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.home-glance__empty {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--h-muted);
    font-size: 13px;
    font-weight: 600;
}

.home-glance__empty i {
    color: var(--h-ok);
}

.home-shimmer {
    display: block;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--h-chip) 0%, var(--h-chip-strong) 50%, var(--h-chip) 100%);
    background-size: 200% 100%;
    animation: home-shimmer 1.2s linear infinite;
}

.home-shimmer--value { width: 64px; height: 46px; }
.home-shimmer--row { height: 44px; border-radius: 14px; }
.home-shimmer--faces { width: 92px; height: 34px; border-radius: 999px; }

/* Schematic previews (gallery only) */

.home-schematic {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: 100%;
    padding: 0 8px;
}

.home-schematic__row {
    height: 16px;
    border-radius: 8px;
    background: var(--h-chip-strong);
}

.home-schematic__row:nth-child(2n) { width: 82%; }
.home-schematic__row:nth-child(3n) { width: 64%; }

.home-schematic--chart .home-schematic__row {
    background: linear-gradient(90deg, var(--w-a), var(--w-b));
    opacity: .75;
}

.home-schematic--chart .home-schematic__row:nth-child(1) { width: 40%; }
.home-schematic--chart .home-schematic__row:nth-child(2) { width: 88%; }
.home-schematic--chart .home-schematic__row:nth-child(3) { width: 70%; }
.home-schematic--chart .home-schematic__row:nth-child(4) { width: 52%; }
.home-schematic--chart .home-schematic__row:nth-child(5) { width: 30%; }

/* Gallery sheet */

.home-sheet {
    position: fixed;
    z-index: 1060;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* Sit where a full sheet would, so a shorter list collapses upward. */
    padding-top: max(16px, calc(100dvh - 16px - min(88dvh, 880px)));
    color: var(--h-text);
}

.home-sheet[hidden] {
    display: none;
}

.home-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 28, .42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: home-fade .3s ease both;
}

.home-sheet__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1000px, calc(100% - 32px));
    max-height: min(88dvh, 880px);
    border: 1px solid var(--h-stroke);
    border-radius: 32px;
    background: var(--h-sheet);
    box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .55);
    overflow: hidden;
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    animation: home-sheet-up .38s var(--h-ease) both;
}

.home-sheet.is-closing .home-sheet__panel {
    animation: home-sheet-down .22s ease both;
}

.home-sheet.is-closing .home-sheet__backdrop {
    animation: home-fade .22s ease reverse both;
}

.home-sheet__grabber {
    display: block;
    flex-shrink: 0;
    width: 42px;
    height: 5px;
    margin: 10px auto 4px;
    border-radius: 3px;
    background: var(--h-hair-strong);
}

.home-sheet__view {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.home-sheet__view[hidden] {
    display: none;
}

.home-sheet__view.is-entering {
    animation: home-view-in .3s var(--h-ease) both;
}

.home-sheet__top {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    padding: 8px 22px 14px;
}

.home-search {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    height: 46px;
    margin: 0;
    padding: 0 16px;
    border-radius: 16px;
    background: var(--h-chip-strong);
    color: var(--h-muted);
}

.home-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: var(--h-text);
    font-size: 15px;
}

.home-search input[type="search"]::placeholder {
    color: var(--h-muted);
}

.home-icon-btn {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--h-chip-strong);
    color: var(--h-text);
    cursor: pointer;
    transition: transform .2s var(--h-spring);
}

.home-icon-btn:active {
    transform: scale(.92);
}

.home-sheet__scroll {
    min-height: 0;
    padding: 0 22px 28px;
    overflow: auto;
    scrollbar-width: thin;
}

.home-sheet__section {
    margin: 10px 4px 12px;
    color: var(--h-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.home-sheet__section[hidden] {
    display: none;
}

.home-suggest {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.home-suggest__tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--h-text);
    text-align: center;
    cursor: pointer;
}

.home-suggest__tile[hidden] {
    display: none;
}

.home-suggest__tile:hover .home-stage {
    transform: translateY(-3px);
}

.home-suggest__name {
    font-size: 14px;
    font-weight: 700;
}

.home-suggest__meta {
    margin-top: -6px;
    color: var(--h-muted);
    font-size: 12px;
}

.home-stage {
    position: relative;
    display: grid;
    place-items: center;
    height: 200px;
    border-radius: 24px;
    background: var(--h-stage);
    overflow: hidden;
    transition: transform .3s var(--h-ease);
}

.home-stage--tall {
    height: 380px;
}

.home-preview {
    position: relative;
    flex: 0 0 auto;
    pointer-events: none;
    transform-origin: center;
}

.home-preview .home-card {
    position: absolute;
    inset: 0;
    animation: home-fade .3s ease both;
}

.home-catalog {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-catalog li[hidden] {
    display: none;
}

.home-catalog__item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--h-text);
    text-align: start;
    cursor: pointer;
    transition: background .2s ease;
}

.home-catalog__item:hover {
    background: var(--h-chip-strong);
}

.home-catalog__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--w-a), var(--w-b));
    box-shadow: 0 10px 20px -10px var(--w-a);
    color: #fff;
    font-size: 17px;
}

.home-catalog__text {
    flex: 1;
    min-width: 0;
}

.home-catalog__title {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.home-catalog__desc {
    display: block;
    overflow: hidden;
    color: var(--h-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-catalog__state {
    flex: 0 0 auto;
    color: var(--h-muted);
    font-size: 12px;
    font-weight: 600;
}

.home-sheet.is-rtl .home-flip {
    transform: scaleX(-1);
}

.home-catalog__state .is-added {
    color: var(--h-ok);
}

.home-detail__head {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.home-detail__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.home-detail__desc {
    margin: 2px 0 0;
    color: var(--h-muted);
    font-size: 13px;
}

.home-carousel {
    display: flex;
    gap: 18px;
    padding: 8px 22px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 22px;
    scrollbar-width: none;
}

.home-carousel::-webkit-scrollbar {
    display: none;
}

.home-carousel__slide {
    display: flex;
    flex: 0 0 min(620px, 86%);
    flex-direction: column;
    gap: 10px;
    scroll-snap-align: center;
    text-align: center;
}

.home-carousel__label {
    color: var(--h-muted);
    font-size: 13px;
    font-weight: 700;
}

.home-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
}

.home-carousel__dots button {
    width: 8px;
    height: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--h-hair-strong);
    cursor: pointer;
    transition: width .25s var(--h-ease), background .25s ease;
}

.home-carousel__dots button.is-active {
    width: 22px;
    background: var(--h-ink);
}

.home-detail__actions {
    display: flex;
    justify-content: center;
    padding: 12px 22px 26px;
}

.home-detail__actions .home-btn {
    height: 48px;
    min-width: 220px;
    font-size: 15px;
}

/* Responsive */

@media (max-width: 1200px) {
    .home-grid {
        --span-s: 6;
        --span-m: 12;
        --span-l: 12;
        --span-xl: 12;
    }
}

@media (max-width: 768px) {
    .admin-home {
        padding: 14px 16px 48px;
        border-radius: 0;
    }

    .home-top {
        flex-direction: column;
        align-items: stretch;
    }

    .home-pill {
        align-self: flex-end;
    }

    .home-greeting__title {
        font-size: 24px;
    }

    .home-grid {
        --span-s: 12;
        --h-row: 220px;
        grid-auto-rows: 220px;
    }

    .home-card--full .home-card__head {
        padding-inline-end: 18px;
    }

    .admin-dashboard .admin-home .home-card .widget > .widget-header {
        display: none;
    }

    .home-sheet {
        align-items: stretch;
        padding-top: 0;
    }

    .home-sheet__panel {
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .home-people--5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Motion */

@keyframes home-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes home-morph {
    from { opacity: .4; transform: scale(.96); }
    to { opacity: 1; transform: none; }
}

@keyframes home-out {
    to { opacity: 0; transform: scale(.85); }
}

@keyframes home-wobble {
    from { transform: rotate(-.6deg); }
    to { transform: rotate(.6deg); }
}

@keyframes home-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes home-sheet-up {
    from { opacity: 0; transform: translateY(48px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes home-sheet-down {
    to { opacity: 0; transform: translateY(40px); }
}

@keyframes home-view-in {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes home-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@keyframes home-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(60px, -40px, 0) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .admin-home *,
    .admin-home *::before,
    .admin-home *::after,
    .admin-home::before,
    .admin-home::after {
        animation: none !important;
        transition: none !important;
    }
}
