html, body {
    font-family: 'Inter', sans-serif, system-ui;
}

h1:focus {
    outline: none;
}

#app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.page {
    position: relative;
    display: flex;
    flex-direction: row;
}

.top-row {
  background-color: #f7f7f7;
  border-bottom: 1px solid #d6d5d5;
  justify-content: flex-end;
  height: 3.5rem;
  display: flex;
  align-items: center;
}

    .top-row ::deep a, .top-row ::deep .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

        .top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
            text-decoration: underline;
        }

        .top-row ::deep a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

@media (max-width: 640.98px) {
    .page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .top-row:not(.auth) {
        display: none;
    }

    .top-row.auth {
        justify-content: space-between;
    }

    .top-row ::deep a, .top-row ::deep .btn-link {
        margin-left: 0;
    }

    .navbar-toggler {
        display: block;
    }

    /* Navigation menu responsive behavior */
    .nav-scrollable.collapse {
        display: none;
    }

    .nav-scrollable:not(.collapse) {
        display: block;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
        /* Ensure full width for main content top row */
        width: 100%;
    }

        .top-row.auth ::deep a:first-child {
            flex: 1;
            text-align: right;
            width: 0;
        }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
        padding-bottom: 1.5rem;
    }

    .navbar-toggler {
        display: none;
    }

    /* Always show navigation on desktop */
    .nav-scrollable {
        display: block !important;
    }
}

/* Navigation menu container */
.nav-scrollable {
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
}

/* Main content layout - ensure full width */
.main-content,
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex item from overflowing */
    width: 100%; /* Ensure full width */
}

.content {
    flex: 1;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem 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");
    }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.rdt-ui-container-label-span {
    margin-bottom: 1rem;
}

    .rdt-ui-container-label-span label {
        font-weight: 600;
        color: #333;
        display: block;
        margin-bottom: 0.25rem;
    }

    .rdt-ui-container-label-span span {
        display: block;
        padding: 0.375rem 0;
        color: #666;
    }

.rdt-ui-data-grid {
    border-collapse: collapse;
    width: 100%;
}

    .rdt-ui-data-grid th,
    .rdt-ui-data-grid td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    .rdt-ui-data-grid th {
        background-color: #f2f2f2;
        font-weight: bold;
    }

.table-row-selectable {
  cursor: pointer;
}
