h1:focus {
    outline: none;
}

.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+PHBhdGggZD0iTTI26My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI26My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

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

.login-page {
    display: grid;
    min-height: 70vh;
    place-items: center;
}

.login-card,
.upload-panel {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.upload-progress-list {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.upload-progress-item {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 999px;
    height: 0.6rem;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    background: #0d6efd;
    border-radius: 999px;
    height: 100%;
    transition: width 0.15s ease-out;
}

.view-toggle {
    display: inline-flex;
    border: 1px solid #adb5bd;
    border-radius: 0.35rem;
    overflow: hidden;
}

.view-toggle-button {
    background: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.45rem 0.85rem;
}

.view-toggle-button.active {
    background: #0d6efd;
    color: #ffffff;
}

.filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.file-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    margin-top: 1.5rem;
}

.file-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.6rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.file-card-preview {
    align-items: center;
    background: #f8f9fa;
    display: flex;
    height: 9rem;
    justify-content: center;
    overflow: hidden;
}

.file-thumbnail {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.file-icon-tile {
    align-items: center;
    border-radius: 0.5rem;
    color: #495057;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
    text-decoration: none;
    width: 100%;
}

.file-icon-tile.icon-audio { color: #6f42c1; }
.file-icon-tile.icon-video { color: #d63384; }
.file-icon-tile.icon-office { color: #0d6efd; }
.file-icon-tile.icon-pdf { color: #dc3545; }
.file-icon-tile.icon-other { color: #6c757d; }

.file-icon-glyph {
    font-size: 2.6rem;
    line-height: 1;
}

.file-icon-ext {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-rename {
    padding: 0.5rem;
    width: 100%;
}

.file-card-details {
    border-top: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem 0.75rem;
}

.file-card-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-card-meta {
    color: #6c757d;
    font-size: 0.8rem;
}

.file-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.85rem;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.lightbox {
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 1000;
}

.lightbox-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 90vw;
}

.lightbox-image {
    border-radius: 0.4rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    max-width: 90vw;
    object-fit: contain;
}

.lightbox-frame {
    background: #ffffff;
    border: none;
    border-radius: 0.4rem;
    height: 80vh;
    width: min(90vw, 60rem);
}

.lightbox-media {
    border-radius: 0.4rem;
    max-height: 80vh;
    max-width: 90vw;
}

.lightbox-caption {
    color: #f8f9fa;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
    word-break: break-word;
}

.lightbox-close {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.6rem;
    height: 2.6rem;
    line-height: 1;
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    width: 2.6rem;
}

.lightbox-nav {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.4rem;
    height: 3rem;
    line-height: 1;
    margin: 0 0.75rem;
    width: 3rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.login-card {
    width: min(100%, 28rem);
}

.form-field {
    margin: 1rem 0;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-control {
    border: 1px solid #adb5bd;
    border-radius: 0.35rem;
    box-sizing: border-box;
    padding: 0.55rem 0.7rem;
    width: 100%;
}

.primary-button,
.secondary-button,
.small-button {
    border: 0;
    border-radius: 0.35rem;
    cursor: pointer;
    padding: 0.55rem 0.9rem;
}

.primary-button {
    background: #0d6efd;
    color: #ffffff;
    margin-top: 0.5rem;
    width: 100%;
}

.secondary-button,
.small-button {
    background: #e9ecef;
    color: #212529;
}

.file-manager-page {
    margin: 0 auto;
    max-width: 72rem;
    padding: 1rem 0 3rem;
}

.page-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.upload-panel {
    margin-bottom: 1.5rem;
}

.file-input {
    display: block;
    margin-top: 1rem;
}

.file-table-wrapper {
    overflow-x: auto;
}

.file-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.filter-control {
    flex: 1 1 16rem;
}

.filter-control label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.file-table {
    border-collapse: collapse;
    width: 100%;
}

.file-table th,
.file-table td {
    border-bottom: 1px solid #dee2e6;
    padding: 0.8rem 0.6rem;
    text-align: left;
    vertical-align: middle;
}

.file-table th {
    background: #f8f9fa;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.link-button {
    background: none;
    border: 0;
    color: #0d6efd;
    cursor: pointer;
    padding: 0;
}

.danger-link {
    color: #dc3545;
}

.delete-confirmation {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.rename-control {
    align-items: center;
    display: flex;
    gap: 0.4rem;
}

.rename-control .form-control {
    min-width: 12rem;
}

.muted {
    color: #6c757d;
}

.status-message {
    color: #146c43;
}

.error-message {
    color: #b02a37;
}

.empty-state {
    border: 1px dashed #adb5bd;
    color: #6c757d;
    padding: 2rem;
    text-align: center;
}

.camera-input {
    display: inline-block;
    margin-top: 1rem;
}

.camera-input input[type="file"] {
    display: none;
}

.camera-button {
    background: #198754;
    border-radius: 0.35rem;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    padding: 0.55rem 0.9rem;
}

.category-panel {
    margin-bottom: 1.5rem;
}

.category-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.category-chip {
    align-items: center;
    background: #e7f1ff;
    border-radius: 999px;
    color: #0d6efd;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 0.85rem;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
}

.category-chip-editable {
    max-width: 100%;
}

.category-chip-small {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
}

.chip-action {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0;
    text-decoration: underline;
}

.chip-remove {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}

.category-chip-input {
    border: 1px solid #84b6ff;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    min-width: 8rem;
    padding: 0.2rem 0.45rem;
}

.category-add-form {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.category-add-form .form-control {
    width: auto;
    flex: 1 1 16rem;
}

.file-categories {
    margin: 0.4rem 0;
}

.category-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.category-checkbox {
    align-items: center;
    display: flex;
    font-size: 0.85rem;
    gap: 0.4rem;
}

.category-edit-actions {
    display: flex;
    gap: 0.5rem;
}
