html,
body {
    font-family: var(--default-font-family);
    background-color: var(--default-body-bg-color);
    color: var(--default-text-color);
}

body {
    font-size: 0.813rem;
}

.orbit-shell__guest {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--default-body-bg-color);
}

.orbit-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem;
    background: var(--custom-white);
    color: var(--default-text-color);
    overflow-y: auto;
    z-index: 40;
}

.orbit-sidebar__overlay {
    display: none;
}

.orbit-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem 1rem;
    border-bottom: 1px solid var(--default-border);
    text-decoration: none;
    color: inherit;
}

.orbit-sidebar__brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    flex-shrink: 0;
}

.orbit-sidebar__brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.orbit-sidebar__brand-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgb(var(--primary-rgb));
}

.orbit-sidebar__brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.orbit-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.orbit-sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.orbit-sidebar__section-title {
    padding: 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.orbit-sidebar__list,
.orbit-sidebar__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.orbit-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.orbit-sidebar__sublist {
    margin-top: 0.3rem;
    padding-left: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.orbit-sidebar__link,
.orbit-sidebar__sublink {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: inherit;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: left;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.orbit-sidebar__link:hover,
.orbit-sidebar__sublink:hover,
.orbit-sidebar__link--toggle:hover {
    background: var(--light);
    color: rgb(var(--primary-rgb));
}

.orbit-sidebar__link--toggle {
    cursor: pointer;
}

.orbit-sidebar__list-item.is-selected>.orbit-sidebar__link,
.orbit-sidebar__sublist-item.is-selected>.orbit-sidebar__sublink,
.orbit-sidebar__link.active,
.orbit-sidebar__sublink.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: rgb(var(--primary-rgb));
}

.orbit-sidebar__list-item.is-selected>.orbit-sidebar__link::before,
.orbit-sidebar__sublist-item.is-selected>.orbit-sidebar__sublink::before,
.orbit-sidebar__link.active::before,
.orbit-sidebar__sublink.active::before {
    content: "";
    position: absolute;
    left: -0.75rem;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 0.2rem;
    border-radius: 0 999px 999px 0;
    background: rgb(var(--primary-rgb));
}

.orbit-sidebar__icon {
    font-size: 1rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    color: inherit;
}

.orbit-sidebar__icon--child {
    font-size: 0.9rem;
}

.orbit-sidebar__label {
    flex: 1;
    min-width: 0;
}

.orbit-sidebar__badge {
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    background: rgb(var(--danger-rgb));
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
}

.orbit-sidebar__chevron {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.orbit-sidebar__link--toggle.is-open .orbit-sidebar__chevron {
    transform: rotate(90deg);
}

.orbit-sidebar__loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.75rem;
    color: var(--text-muted);
}

.orbit-spin {
    animation: orbit-spin 0.9s linear infinite;
}

.orbit-topbar {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    background: var(--custom-white);
    border-bottom: 1px solid var(--default-border);
}

.orbit-topbar__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.orbit-topbar__toggle {
    display: none;
    width: 2.125rem;
    height: 2.125rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--default-text-color);
    font-size: 1.1rem;
}

.orbit-topbar__title-group {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.orbit-topbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.orbit-topbar__version {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.orbit-topbar__search {
    flex: 1;
    max-width: 30rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.75rem;
    background: var(--light);
    color: var(--text-muted);
}

.orbit-topbar__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--default-text-color);
    font: inherit;
}

.orbit-topbar__kbd {
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--default-border);
    border-radius: 0.45rem;
    background: var(--custom-white);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.orbit-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.orbit-icon-button {
    position: relative;
    width: 2.125rem;
    height: 2.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
}

.orbit-icon-button:hover,
.orbit-topbar__toggle:hover {
    background: var(--light);
    color: var(--default-text-color);
}

.orbit-icon-button__badge {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    min-width: 0.95rem;
    height: 0.95rem;
    padding: 0 0.15rem;
    border-radius: 999px;
    background: rgb(var(--danger-rgb));
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--custom-white);
}

.orbit-user-menu {
    margin-left: 0.35rem;
}

.orbit-avatar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--light);
    color: var(--default-text-color);
}

.orbit-avatar-chip__avatar {
    flex-shrink: 0;
}

.orbit-avatar-chip__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    line-height: 1.15;
}

.orbit-avatar-chip__name {
    font-size: 0.78rem;
    font-weight: 600;
}

.orbit-avatar-chip__role {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.orbit-avatar-chip__chevron {
    color: var(--text-muted);
    font-size: 1rem;
}

.orbit-footer {
    padding: 0.85rem 1.5rem 1.25rem;
    border-top: 1px solid var(--default-border);
    color: var(--text-muted);
    font-size: 0.75rem;
}

a,
.btn-link {
    color: var(--primary-color);
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-border);
}

.btn-primary:hover {
    background-color: var(--primary08);
    border-color: var(--primary-border);
    color: #fff;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--primary02), 0 0 0 0.25rem var(--primary02);
    border-color: var(--primary-color);
}

.content {
    padding-top: 1.1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--default-text-color);
}

/* Card Styles */
.card {
    background-color: var(--custom-white);
    border-color: var(--default-border);
    margin-bottom: 1rem;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

/* Form Styles */
.form-control,
.form-select {
    background-color: var(--form-control-bg);
    border-color: var(--input-border);
    color: var(--default-text-color);
    min-height: 44px;
    font-size: 16px;
    /* Prevents zoom on iOS */
}

.form-control:focus,
.form-select:focus {
    background-color: var(--form-control-bg);
    color: var(--default-text-color);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--default-text-color);
}

/* Table Styles */
.table {
    color: var(--default-text-color);
    border-color: var(--default-border);
}

.table> :not(caption)>*>* {
    background-color: transparent;
    border-bottom-color: var(--default-border);
    color: var(--default-text-color);
}

/* Mobile-friendly enhancements */
/* Ensure all buttons are touch-friendly (minimum 44x44px) */
.btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
}

.btn-sm {
    min-height: 38px;
    padding: 0.375rem 0.75rem;
}

.btn-lg {
    min-height: 48px;
    padding: 0.75rem 1.5rem;
}

/* Improve form controls for mobile */
.form-control,
.form-select {
    min-height: 44px;
    font-size: 16px;
    /* Prevents zoom on iOS */
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Better spacing for mobile cards */
.card {
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem;
}

@media (min-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid rgb(var(--success-rgb));
}

.invalid {
    outline: 1px solid rgb(var(--danger-rgb));
}

.validation-message {
    color: rgb(var(--danger-rgb));
}

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

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

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

/* Additional mobile responsive styles */
/* Improve table responsiveness with horizontal scroll */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Mobile-specific table improvements */
@media (max-width: 767.98px) {

    /* Make tables stack better on mobile */
    table.table {
        font-size: 0.875rem;
    }

    table.table th,
    table.table td {
        padding: 0.5rem;
        vertical-align: middle;
    }

    /* Improve button groups on mobile */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .btn-group>.btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    /* Stack filter controls vertically */
    .row.g-3>[class*="col-"] {
        margin-bottom: 0.75rem;
    }

    /* Improve card spacing on mobile */
    .card {
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    /* Better heading sizes for mobile */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.125rem;
    }

    h5 {
        font-size: 1rem;
    }

    /* Improve badge visibility on mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }

    /* Better spacing for mobile images */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Touch-friendly improvements for all screens */
a:not(.btn) {
    -webkit-tap-highlight-color: var(--primary01);
}

/* Report Grid Responsive Improvements */
.responsive-grid {
    font-size: 0.875rem;
}

@media (max-width: 991.98px) {
    .responsive-grid {
        height: 500px !important;
    }
}

@media (max-width: 767.98px) {
    .responsive-grid {
        height: 400px !important;
        font-size: 0.8rem;
    }

    .responsive-grid .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }

    .responsive-grid .actions-column {
        min-width: 110px;
    }
}

/* Improve input focus states for mobile */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

/* Better checkbox and radio button sizes for touch */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    color: var(--default-text-color) !important;
}

/* Topic selection checkboxes - enhanced visibility */
.form-check {
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.form-check:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

html[data-theme-mode="dark"] .form-check:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.form-check-input:checked~.form-check-label {
    font-weight: 500;
    color: var(--primary-color);
}

html[data-theme-mode="dark"] .form-check-input:checked~.form-check-label {
    color: var(--primary-color);
}



.submit-actions-mobile {
    background: var(--custom-white);
    border-top: 1px solid var(--default-border);
}

/* Better spacing for small screens */
@media (max-width: 575.98px) {

    .container,
    .container-fluid {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Stack buttons vertically on very small screens */
    .d-grid {
        gap: 0.5rem !important;
    }

    /* Better responsive button text */
    .btn .d-none {
        display: none !important;
    }
}

/* Sticky submit button on mobile for SubmitReport page */
@media (max-width: 767.98px) {
    .submit-actions-mobile {
        position: sticky;
        bottom: 0;
        background: var(--custom-white);
        padding: 1rem;
        border-top: 1px solid var(--default-border);
        margin: 0 -1rem -1rem -1rem;
        z-index: 100;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
    .content {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
}

@media (max-width: 991.98px) {
    .orbit-sidebar__overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 35;
    }

    .orbit-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(18rem, calc(100vw - 2.5rem));
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.18);
    }

    html[data-toggled="open"] .orbit-sidebar {
        transform: translateX(0);
    }

    html[data-toggled="open"] .orbit-sidebar__overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .orbit-topbar {
        padding: 0 1rem;
    }

    .orbit-topbar__toggle {
        display: inline-flex;
    }

    .orbit-topbar__search {
        max-width: none;
    }

    .orbit-avatar-chip {
        padding-right: 0.35rem;
    }
}

@media (max-width: 767.98px) {
    .orbit-topbar {
        gap: 0.65rem;
        padding: 0 0.75rem;
    }

    .orbit-topbar__search {
        display: none;
    }

    .orbit-topbar__title-group {
        gap: 0.35rem;
    }

    .orbit-topbar__version {
        display: none;
    }

    .orbit-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}