h1:focus {
    outline: none;
}

/* ── Shared layout utilities ─────────────────────────────────────── */
.illustration-logo {
    height: 65px;
    width: auto;
}

.mud-appbar .illustration-logo {
    height: 45px;
}

/* ── List page toolbar utilities ────────────────────────────────── */
.list-search {
    max-width: 280px;
}

.list-status-filter {
    width: 150px;
    flex-shrink: 0;
}

/* ── Filter popup (shared across list pages) ────────────────────── */

.filter-anchor {
    position: relative;
    z-index: 1300;
}

.filter-popup {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 460px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1300;
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.filter-popup-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.filter-popup-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.filter-popup-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 1299;
    cursor: default;
}

.filter-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }

.fw-semibold { font-weight: 600; }

/* ── Actions column (shared across all list pages) ───────────────── */

.col-actions {
    text-align: center !important;
}

.link-unstyled { text-decoration: none; }

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

.flag-img {
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.phone-col-code {
    flex: 0 0 35%;
    min-width: 0;
}

.phone-col-number {
    flex: 1 1 0;
    min-width: 0;
}

.icon-sm-text {
    font-size: 13px;
}

.icon-xl {
    font-size: 4rem;
}

.empty-state-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.status-dot {
    height: 16px;
    align-self: center;
}

.page-content-wrapper {
    position: relative;
    min-height: calc(100vh - var(--mud-appbar-height, 64px) - 2rem);
}

.page-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── App startup overlay (shown while Blazor initialises layout) ─── */
.app-startup-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: #fff;
}

@media (prefers-color-scheme: dark) {
    .app-startup-overlay {
        background: #1a1a2e;
    }
    .app-startup-spinner {
        border-color: rgba(255, 255, 255, 0.12);
        border-top-color: #90caf9;
    }
}

.app-startup-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: app-spin 0.75s linear infinite;
}

@keyframes app-spin {
    to { transform: rotate(360deg); }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLj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Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ── Page header ─────────────────────────────────────────────────── */
.page-title {
    font-weight: 700;
    line-height: 1.25;
}

.page-breadcrumbs {
    opacity: 0.72;
}

.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;
}

/* ── Dashboard – Welcome Banner ─────────────────────────────────── */
.dashboard-avatar {
    width: 64px !important;
    height: 64px !important;
}

.dashboard-avatar-initials {
    font-size: 1.5rem !important;
}

.dashboard-avatar img,
.dashboard-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-greeting-name {
    font-weight: 700;
}

/* ── Dashboard – Stat Cards ──────────────────────────────────────── */
.dashboard-stat-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-stat-value {
    font-weight: 700;
}

.dashboard-semibold {
    font-weight: 600;
}

.stat-icon-employees {
    background: rgba(0, 167, 111, 0.12) !important;
    color: #00A76F !important;
}

.stat-icon-info {
    background: rgba(0, 184, 217, 0.12) !important;
    color: #00B8D9 !important;
}

.stat-icon-warning {
    background: rgba(255, 171, 0, 0.12) !important;
    color: #FFAB00 !important;
}

.stat-icon-purple {
    background: rgba(142, 51, 255, 0.12) !important;
    color: #8E33FF !important;
}

.stat-icon-success {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #22C55E !important;
}

.text-active {
    color: #22C55E;
}

/* ── Dashboard – Sub-stat Badges ─────────────────────────────────── */
.stat-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--badge-color) 8%, transparent);
}

.stat-badge-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--badge-color);
    line-height: 1.4;
}

.stat-badge-label {
    font-size: 0.7rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -- Dashboard -- Badge color modifiers -- */
.stat-badge-green   { --badge-color: #22C55E; }
.stat-badge-gray    { --badge-color: #919EAB; }
.stat-badge-purple  { --badge-color: #8E33FF; }
.stat-badge-amber   { --badge-color: #FFAB00; }
.stat-badge-cyan    { --badge-color: #00B8D9; }
.stat-badge-red     { --badge-color: #FF5630; }
.stat-badge-primary { --badge-color: var(--mud-palette-primary); }

/* ── Dashboard – Table Progress & Department Bars ────────────────── */
.ob-progress-bar {
    flex: 1;
    min-width: 60px;
    height: 8px;
}

.progress-text {
    white-space: nowrap;
    flex-shrink: 0;
}

.dept-progress-bar {
    width: 80px;
    height: 6px;
}

.dept-count-label {
    min-width: 20px;
    text-align: right;
}

/* ── Dashboard – Employee Self-View ──────────────────────────────── */
.empty-state-avatar {
    width: 80px;
    height: 80px;
}

.empty-state-icon {
    font-size: 40px;
}

.ob-step-flex {
    flex: 1;
}

.ob-step-title {
    font-weight: 500;
}

.ob-step-title-done {
    text-decoration: line-through;
    opacity: 0.55;
}

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

.ob-progress-bar-thick {
    height: 10px;
}

.ob-progress-percent {
    font-weight: 700;
}

/* ── Employee dashboard – onboarding step rows ───────────────────── */
.ob-step-done {
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.ob-step-active {
    background: rgba(0, 167, 111, 0.06);
    border: 1px solid rgba(0, 167, 111, 0.25);
}

.ob-step-pending {
    background: transparent;
    border: 1px solid rgba(145, 158, 171, 0.16);
}

/* ── Minimal Dashboard – Drawer nav styling ─────────────────────── */

.mud-drawer .mud-navmenu {
    padding: 0 8px;
}

.mud-drawer .mud-navmenu .mud-nav-link {
    border-radius: 8px;
    margin-bottom: 2px;
    min-height: 44px;
}

.mud-drawer .mud-navmenu .mud-nav-link:not(.active):hover {
    background-color: rgba(145, 158, 171, 0.08) !important;
}

.mud-drawer .mud-navmenu .mud-nav-link.active {
    background-color: rgba(0, 167, 111, 0.08) !important;
    color: #00A76F !important;
}

.mud-drawer .mud-navmenu .mud-nav-link.active .mud-icon-root {
    color: #00A76F !important;
}

/* ── Minimal Dashboard – Drawer border (dashed separator, not shadow) ── */

.mud-drawer {
    border-right: 1px dashed rgba(145, 158, 171, 0.24) !important;
}

/* ── Step content – responsive images ───────────────────────────── */

.step-content {
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px auto;
    border-radius: 8px;
    object-fit: contain;
}



/* ── Table column alignment utilities ───────────────────────────── */
.col-right,
.mud-table-cell.col-right {
    text-align: right;
}

.col-center,
.mud-table-cell.col-center {
    text-align: center;
}
