html, body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--rz-body-background-color, #121212);
    color: var(--rz-text-color, #e0e0e0);
    font-family: var(--rz-text-font-family, Roboto, sans-serif);
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wN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color: white;
}

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

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 1rem;
    gap: 1rem;
}

.topbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
}

.topbar-tracker {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nav-menu-footer {
    position: relative;
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* RadzenProfileMenu expands its items into a nested <ul>, JS-positioned with an
   inline "position: absolute" of its own. Pinned at the bottom of the sidebar, its
   default downward expansion runs off the viewport, so this forces it to anchor
   above the trigger instead. !important is needed to win over the inline style. */
.nav-menu-footer .rz-navigation-menu.rz-open {
    position: absolute !important;
    top: auto !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin-bottom: 0.25rem;
    background: var(--rz-base-700, #252525);
    border-radius: var(--rz-border-radius, 4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.profile-name {
    font-weight: 500;
    white-space: nowrap;
}

.topbar-tracker-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.topbar-tracker-task {
    font-size: 0.85rem;
    opacity: 0.8;
}

.topbar-tracker-elapsed {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.topbar-task-picker {
    min-width: 20rem;
}

/* The router's <FocusOnNavigate Selector="h1" /> moves keyboard focus to each page's
   heading for screen readers after navigation; browsers draw a default focus ring around
   whatever receives focus, which shows up as an unwanted box around the heading text. */
h1:focus {
    outline: none;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 24rem;
    padding: 2rem;
}

.tree-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tree-icon {
    opacity: 0.7;
}

.tree-name {
    flex-shrink: 0;
    font-weight: 500;
}

.tree-name.tree-archived {
    text-decoration: line-through;
    opacity: 0.5;
}

.tree-inherited {
    font-size: 0.8rem;
    opacity: 0.6;
}

.tree-actions {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 24rem;
}

.recovery-codes code {
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0.25rem;
    text-align: center;
}

.password-form {
    max-width: 24rem;
}

.wcal {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 8rem);
}

.wcal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
}

.wcal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wcal-title {
    font-weight: 600;
    min-width: 14rem;
}

.wcal-total {
    opacity: 0.8;
    font-size: 0.9rem;
}

.wcal-daynames {
    display: grid;
    grid-template-columns: 3.5rem repeat(7, 1fr);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wcal-dayname {
    text-align: center;
    padding: 0.4rem 0;
}

.wcal-dayname.wcal-today .wcal-day-num {
    color: var(--rz-primary, #7c4dff);
    font-weight: 700;
}

.wcal-day-num {
    font-size: 1.1rem;
    font-weight: 600;
}

.wcal-day-label {
    font-size: 0.75rem;
    opacity: 0.7;
}

.wcal-day-total {
    font-size: 0.75rem;
    opacity: 0.6;
}

.wcal-grid-scroll {
    overflow-y: auto;
    flex: 1;
}

.wcal-grid {
    display: grid;
    grid-template-columns: 3.5rem repeat(7, 1fr);
    position: relative;
}

.wcal-time-gutter {
    position: relative;
}

.wcal-hour-label {
    position: absolute;
    right: 0.5rem;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.5;
}

.wcal-gutter-track {
    width: 100%;
}

.wcal-day-col {
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.06) 0,
        rgba(255, 255, 255, 0.06) 1px,
        transparent 1px,
        transparent 100%
    );
    background-size: 100% 48px; /* overridden inline to match the current zoom level */
    cursor: crosshair;
    user-select: none;
}

.wcal-zoom {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.75rem;
}

.wcal-zoom-level {
    font-size: 0.75rem;
    opacity: 0.7;
    min-width: 3rem;
    text-align: center;
}

.wcal-entry {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 0.25rem;
    padding: 0.15rem 0.4rem;
    overflow: hidden;
    cursor: pointer;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-size: 0.75rem;
    line-height: 1.2;
}

.wcal-entry-running {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.wcal-entry-title {
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.wcal-entry-time {
    opacity: 0.85;
}

.wcal-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff4d6d;
    z-index: 2;
}

.wcal-now-line::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4d6d;
}

.wcal-drag-preview {
    position: absolute;
    left: 2px;
    right: 2px;
    background: rgba(124, 77, 255, 0.35);
    border: 1px dashed rgba(124, 77, 255, 0.8);
    border-radius: 0.25rem;
    pointer-events: none;
}

.task-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.5rem;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--rz-border-radius, 4px);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .task-trigger:hover {
        border-color: rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.06);
    }

    .task-trigger:focus-visible {
        outline: 2px solid var(--rz-primary, #7c4dff);
        outline-offset: 1px;
    }

.task-trigger-topbar {
    max-width: 22rem;
}

.task-trigger-icon {
    opacity: 0.6;
    flex-shrink: 0;
}

.task-trigger-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.task-trigger-placeholder {
    opacity: 0.55;
}

.task-trigger-chevron {
    opacity: 0.5;
    flex-shrink: 0;
}

.task-picker-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--rz-border-radius, 4px);
    background: rgba(255, 255, 255, 0.03);
}

    .task-picker-search:focus-within {
        border-color: var(--rz-primary, #7c4dff);
    }

.task-picker-search-icon {
    opacity: 0.5;
    flex-shrink: 0;
}

.task-picker-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--rz-text-color, #e0e0e0);
    font-size: 0.9rem;
    font-family: inherit;
}

.task-picker-path {
    padding: 0 0.15rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-picker-results {
    height: 26rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.task-picker {
    display: flex;
    height: 26rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow-x: auto;
}

.task-picker-column {
    flex: 0 0 14rem;
    min-width: 14rem;
    overflow-y: auto;
    padding: 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

    .task-picker-column:last-child {
        border-right: none;
    }

.task-picker-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 0.35rem;
    cursor: pointer;
    white-space: nowrap;
}

    .task-picker-item:hover {
        background: rgba(255, 255, 255, 0.07);
    }

.task-picker-item-selected,
.task-picker-item-selected:hover {
    background: var(--rz-primary, #7c4dff);
    color: white;
}

.task-picker-item-icon {
    opacity: 0.7;
    flex-shrink: 0;
}

.task-picker-item-selected .task-picker-item-icon {
    opacity: 1;
}

.task-picker-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.task-picker-item-chevron {
    margin-left: auto;
    opacity: 0.5;
    flex-shrink: 0;
}

.task-picker-item-selected .task-picker-item-chevron {
    opacity: 0.85;
}

.task-picker-empty {
    padding: 0.75rem;
    opacity: 0.5;
    font-size: 0.85rem;
}