/* ============================================================
   WebLago — Modern Design System
   Premium admin-panel aesthetic with fluid responsive layout
 ============================================================ */

/* ?? Base Reset & Typography */
html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
    color: #1a1a2e;
    background: #f0f2f5;
    /* Ensure touch scroll works on all mobile devices */
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    height: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #0d1b2a;
    letter-spacing: -0.01em;
}

    h1:focus {
        outline: none;
    }

a, .btn-link {
    color: #0b6fa4;
    transition: color 0.2s ease;
}

    a:hover {
        color: #0d3b66;
    }

/* ?? Global Transitions ?? */
/* NOTE: Do NOT apply transition to *, it breaks native touch-scroll
   on mobile devices. Apply transitions only to specific interactive elements. */
a, button, .btn, .mud-button-root, .mud-icon-button,
.form-control, .form-select, .card, .badge,
input, textarea, select {
    transition-property: background-color, border-color, color, box-shadow, opacity, transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

/* ?? Scrollbar ?? */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(13, 27, 42, 0.18);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(13, 27, 42, 0.32);
    }

/* ?? Content Area ?? */
.content {
    padding-top: 0.5rem;
    max-width: 100%;
}

/* ?? Buttons */
.btn {
    font-weight: 600;
    border-radius: 0.6rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    border-width: 1.5px;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* MudBlazor button unification */
.mud-button-root {
    border-radius: 0.6rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    min-height: 2.5rem;
    padding-inline: 1rem;
    transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

    .mud-button-root .mud-button-label {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .mud-button-root:hover:not(.mud-disabled) {
        transform: translateY(-1px);
    }

    .mud-button-root:active:not(.mud-disabled) {
        transform: translateY(0);
    }

.mud-button-filled.mud-button-filled-primary {
    box-shadow: 0 6px 18px rgba(13, 59, 102, 0.26);
}

    .mud-button-filled.mud-button-filled-primary:hover {
        box-shadow: 0 10px 22px rgba(13, 59, 102, 0.32);
    }

.mud-button-outlined {
    border-width: 1.5px;
}

/* Icon buttons in grids/tables */
.mud-icon-button {
    border-radius: 0.6rem !important;
    transition: transform 0.16s ease, background-color 0.2s ease;
}

    .mud-icon-button:hover {
        transform: translateY(-1px);
        background-color: rgba(11, 111, 164, 0.08);
    }

/* Better alignment for grouped actions */
.mud-button-group {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

    .mud-button-group .mud-icon-button {
        margin: 0;
    }

/* Generic container for aligned action buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ?? Form Controls — Premium Styling ?? */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #344054;
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.form-control,
.form-select {
    border: 1.5px solid #d0d5dd;
    border-radius: 0.6rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    color: #1a1a2e;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    min-height: 2.75rem;
}

    .form-control:hover,
    .form-select:hover {
        border-color: #98a2b3;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: #0b6fa4;
        box-shadow: 0 0 0 3px rgba(11, 111, 164, 0.12);
        background-color: #fff;
        outline: none;
    }

    .form-control::placeholder {
        color: #98a2b3;
        font-weight: 400;
    }

    .form-control[readonly] {
        background-color: #f8f9fb;
        color: #667085;
        border-color: #e4e7ec;
    }

.form-control-sm,
.form-select-sm {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    min-height: 2.35rem;
    border-radius: 0.5rem;
}

.form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    border: 1.5px solid #d0d5dd;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .form-check-input:checked {
        background-color: #0b6fa4;
        border-color: #0b6fa4;
        box-shadow: 0 2px 6px rgba(11, 111, 164, 0.3);
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 3px rgba(11, 111, 164, 0.12);
        border-color: #0b6fa4;
    }

.input-group .form-control {
    border-radius: 0.6rem;
}

    .input-group .form-control:not(:first-child) {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .input-group .form-control:not(:last-child) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.input-group-text {
    background: #f8f9fb;
    border: 1.5px solid #d0d5dd;
    border-radius: 0.6rem;
    color: #4f5d75;
    font-size: 0.9rem;
    padding: 0.65rem 0.8rem;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-radius: 0 0.6rem 0.6rem 0;
    border-left: none;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: #20a86e;
    box-shadow: 0 0 0 3px rgba(32, 168, 110, 0.1);
}

.invalid {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.validation-message {
    color: #dc3545;
    font-size: 0.82rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.validation-summary-errors {
    list-style: none;
    padding-left: 0;
}

/* ?? Cards — Elevated & Clean ?? */
.card {
    border: 1px solid #e4e7ec;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

    .card:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
    }

.card-header {
    background: linear-gradient(180deg, #fafbfc, #f6f8fa);
    border-bottom: 1px solid #e4e7ec;
    padding: 1rem 1.25rem;
    font-weight: 700;
}

.card-title {
    color: #0d1b2a;
    font-weight: 700;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: #fafbfc;
    border-top: 1px solid #e4e7ec;
    padding: 1rem 1.25rem;
}

/* ?? Tables — Clean & Elegant */
.table {
  font-size: 0.9rem;
    margin-bottom: 0;
}

    .table > thead {
        background: linear-gradient(180deg, #f6f8fc, #f0f2f5);
    }

        .table > thead th {
            font-weight: 700;
      font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #4f5d75;
  padding: 0.85rem 1rem;
            border-bottom: 2px solid #e4e7ec;
    white-space: nowrap;
}

    .table > tbody td {
        padding: 0.75rem 1rem;
   vertical-align: middle;
        border-bottom: 1px solid #f0f2f5;
        color: #344054;
    }

.table-hover > tbody > tr:hover {
    background-color: rgba(11, 111, 164, 0.04);
}

.table-responsive {
    border: 1px solid #e4e7ec;
    border-radius: 0.85rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

    .table-responsive .table {
 margin-bottom: 0;
    }

/* MudBlazor table — enable horizontal scroll on mobile */
.mud-table,
.mud-simple-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mud-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ?? Modals — Smooth & Modern ?? */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #0d3b66, #0b6fa4);
    color: #fff;
    border-bottom: none;
    padding: 1.15rem 1.5rem;
}

    .modal-header .modal-title {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .modal-header .btn-close {
        filter: brightness(0) invert(1);
        opacity: 0.8;
    }

        .modal-header .btn-close:hover {
            opacity: 1;
        }

.modal-body {
    padding: 1.5rem;
}

    .modal-body dl dt {
        font-weight: 600;
        color: #4f5d75;
        font-size: 0.85rem;
    }

    .modal-body dl dd {
        font-weight: 500;
        color: #1a1a2e;
        margin-bottom: 0.75rem;
    }

.modal-footer {
    background: #fafbfc;
    border-top: 1px solid #e4e7ec;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
}

/* ?? Alerts — Polished ?? */
.alert {
    border-radius: 0.7rem;
    border-width: 1.5px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.85rem 1.15rem;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ?? Badges ?? */
.badge {
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

    .badge.bg-primary {
        background: linear-gradient(135deg, #0d3b66, #0b6fa4) !important;
    }

    .badge.bg-secondary {
        background: #667085 !important;
    }

/* ?? Spinner ?? */
.spinner-border {
    animation-duration: 0.65s;
}

/* ?? Page Header — Responsive ?? */
.responsive-page-header {
  display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

    .responsive-page-header h1 {
        font-size: 1.65rem;
        font-weight: 800;
        color: #0d1b2a;
    }

    .responsive-page-header .btn {
        white-space: nowrap;
    }

/* ?? Login Page ?? */
.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d3b66 0%, #0b6fa4 50%, #1a8fc7 100%);
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

    .login-layout::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.06), transparent 40%), radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.04), transparent 35%);
        animation: loginBgFloat 20s ease-in-out infinite alternate;
    }

@keyframes loginBgFloat {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-3%, -2%);
    }
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.1);
}

.login-header {
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0d3b66;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: #667085;
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
}

.login-form .form-label {
    font-weight: 600;
    color: #344054;
}

.login-form .input-group-text {
    background: #f6f8fc;
    border-color: #d0d5dd;
    color: #0d3b66;
}

.login-icon {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-form .form-control {
    padding: 0.75rem 0.95rem;
}

.login-form .btn-primary {
    padding: 0.8rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 0.7rem;
    box-shadow: 0 6px 20px rgba(13, 59, 102, 0.3);
}

    .login-form .btn-primary:disabled {
        box-shadow: none;
    }

/* ?? Home Page ?? */
.home-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2rem;
}

.hero {
    background: radial-gradient(circle at 20% 20%, rgba(13, 110, 253, 0.22), transparent 30%), radial-gradient(circle at 80% 0%, rgba(8, 47, 73, 0.35), transparent 35%), linear-gradient(135deg, #0d3b66, #0b6fa4);
    color: #f5f7fb;
    border-radius: 1rem;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    box-shadow: 0 18px 40px rgba(6, 53, 90, 0.35);
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.85rem;
    color: #7ad8ff;
    margin: 0;
}

.hero__title {
    font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
    margin: 0;
    font-weight: 800;
    line-height: 1.2;
}

.hero__subtitle {
    color: #dce9f5;
    line-height: 1.65;
    max-width: 38rem;
    margin: 0;
    font-size: 0.95rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

    .hero__actions .btn {
        padding: 0.7rem 1.25rem;
        font-weight: 700;
        border-radius: 0.65rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .hero__actions .btn-light {
        background: #fff;
        color: #0d3b66;
    }

        .hero__actions .btn-light:hover {
            background: #f0f4ff;
            transform: translateY(-1px);
        }

    .hero__actions .btn-outline-light {
        border: 1.5px solid rgba(255, 255, 255, 0.4);
        color: #f5f7fb;
        background: rgba(255, 255, 255, 0.08);
    }

        .hero__actions .btn-outline-light:hover {
            background: rgba(255, 255, 255, 0.16);
            color: #fff;
            transform: translateY(-1px);
        }

.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

    .hero__badges .badge {
        background: rgba(255, 255, 255, 0.12);
        color: #e5f1ff;
        padding: 0.4rem 0.8rem;
        border-radius: 999px;
        font-weight: 600;
        font-size: 0.78rem;
    }

.hero__panel {
    display: flex;
    align-items: stretch;
}

.panel-card {
    background: rgba(255, 255, 255, 0.97);
    color: #0d1b2a;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

    .panel-card h3 {
        margin: 0;
        font-weight: 800;
        font-size: 1.1rem;
    }

    .panel-card p {
        margin: 0;
        color: #667085;
        font-size: 0.9rem;
    }

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.panel-grid__item {
    background: linear-gradient(180deg, #f8fbff, #f0f4f9);
    border: 1px solid #e4e7ec;
    border-radius: 0.7rem;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .panel-grid__item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    }

    .panel-grid__item .label {
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.7rem;
        color: #667085;
        font-weight: 700;
    }

    .panel-grid__item strong {
        font-size: 1.35rem;
        color: #0d3b66;
    }

    .panel-grid__item small {
        color: #667085;
        font-size: 0.78rem;
    }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: #ffffff;
    border-radius: 0.85rem;
    padding: 1.25rem;
    border: 1px solid #e4e7ec;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d3b66, #0b6fa4);
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(13, 59, 102, 0.3);
    margin-bottom: 0.25rem;
}

    .feature-icon .bi {
        font-size: 1.25rem;
    }

.feature-link {
    font-weight: 700;
    color: #0b6fa4;
    text-decoration: none;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

    .feature-link:hover {
        text-decoration: underline;
        color: #0d3b66;
    }

/* ?? Blazor Infrastructure ?? */
#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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI26My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA9IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI26My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 0.5rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.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: #0b6fa4;
            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;
}

/* ?? List Groups ?? */
.list-group {
    border-radius: 0.7rem;
    overflow: hidden;
}

.list-group-item {
    border-color: #f0f2f5;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */
@media (max-width: 992px) {
    .hero {
        padding: 1.75rem;
        gap: 1.25rem;
    }

    .home-page {
        gap: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .content {
        padding-top: 0.5rem;
    }

    .responsive-page-header {
        flex-direction: column;
   align-items: stretch;
    }

  .responsive-page-header h1 {
        font-size: 1.35rem;
        }

        .responsive-page-header .btn {
     width: 100%;
        }

    .table-responsive {
   border-radius: 0.75rem;
    }

    .table {
        min-width: 600px;
    }

    .btn-group {
        flex-wrap: nowrap;
    }

    .modal-dialog {
     margin: 0.75rem;
    }

    .modal-footer {
        flex-wrap: wrap;
    }

     .modal-footer .btn {
       flex: 1 1 auto;
        }

    .card-body.row {
        --bs-gutter-x: 0.75rem;
    }

    .hero {
        padding: 1.5rem;
    }

    /* MudBlazor cards — reduce padding on mobile */
    .mud-card-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .mud-card-header {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Table — enforce horizontal scroll for MudSimpleTable */
  .mud-simple-table {
        overflow-x: auto;
  -webkit-overflow-scrolling: touch;
    }

    .mud-simple-table table {
        min-width: 600px;
    }

    /* Chips inside tables — don't let them grow */
    .mud-simple-table .mud-chip {
        white-space: nowrap;
    }

    /* MudGrid items — tighter spacing on mobile */
    .mud-grid {
        gap: 8px;
    }

  /* Pagination footer — stack vertically on mobile */
    .mud-pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .mud-pagination .mud-button-root {
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 0 !important;
    }

    /* MudBlazor H4 — smaller on mobile */
    .mud-typography-h4 {
        font-size: 1.35rem !important;
    }

    /* MudBlazor H6 — smaller on mobile */
    .mud-typography-h6 {
        font-size: 0.95rem !important;
    }

    /* Button groups in table action columns — tighter */
    .mud-button-group {
        gap: 0;
    }

    /* Fix modal-like MudPaper overlays for small screens */
    .mud-paper[style*="position:fixed"] {
      max-height: 90vh;
        max-height: 90dvh;
        overflow-y: auto;
   -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
  .hero__title {
        font-size: clamp(1.4rem, 5vw + 0.85rem, 1.85rem);
    }

    .hero__actions .btn {
      width: 100%;
        justify-content: center;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 1.75rem;
        border-radius: 1rem;
    }

    .login-title {
        font-size: 1.4rem;
 }

    .form-control,
    .form-select {
 font-size: 1rem;
        min-height: 3rem;
     padding: 0.7rem 0.9rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.85rem 1rem;
    }

    .card-footer {
        padding: 0.85rem 1rem;
    }

    /* Extra-small: table needs even less min-width */
    .mud-simple-table table {
        min-width: 520px;
    }

    /* MudBlazor typography — even smaller */
    .mud-typography-h4 {
        font-size: 1.2rem !important;
    }

    /* MudBlazor H5 for KPI cards */
    .mud-typography-h5 {
        font-size: 1.1rem !important;
    }

    /* Buttons — full width on very small screens inside flex-end containers */
    div[style*="justify-content:flex-end"] {
        flex-wrap: wrap;
    }

    div[style*="justify-content:flex-end"] .mud-button-root {
        flex: 1 1 auto;
        justify-content: center;
  }
}
