html, body {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* WASM mounts inside #app — must continue the full-height flex chain */
#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Loading screen — shown before Blazor WASM boots, cannot use Bootstrap classes */
.loadingpage {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-bs-theme="dark"] .loadingpage {
    background-color: #212529;
}

.loadingpage-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.loadingpage-app-name {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #6c757d;
}

[data-bs-theme="dark"] .loadingpage-app-name {
    color: #adb5bd;
}

.loadingpage-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(13, 110, 253, 0.2);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: loadingpage-spin 0.8s linear infinite;
}

@keyframes loadingpage-spin {
    to { transform: rotate(360deg); }
}

.loadingpage-text {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

[data-bs-theme="dark"] .loadingpage-text {
    color: #adb5bd;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

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

/*
 * Material Symbols Outlined — global icon override for DevExpress IconCssClass.
 * DevExpress renders icon spans with background-color + mask-image. We reset
 * that and use the Material Symbols font via ::before instead.
 */
.mi {
    background-color: transparent !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    width: auto !important;
    height: auto !important;
    min-width: 1.25rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.mi::before {
    font-family: 'Material Symbols Outlined';
    font-size: 1.25rem;
    font-weight: normal;
    font-style: normal;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    display: block;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Navigation icons */
.mi-home::before      { content: 'home'; }
.mi-locations::before { content: 'location_on'; }
.mi-library::before   { content: 'menu_book'; }
.mi-logout::before    { content: 'logout'; }

/* Layout control icons */
.mi-menu::before    { content: 'menu'; }
.mi-close::before   { content: 'close'; }
.mi-back::before    { content: 'arrow_back'; }
.mi-refresh::before { content: 'refresh'; }

/* Centered full-height page wrapper */
.page-centered {
    height: 100%;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* DFI Card — content card with shadow */
.dfi-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dfi-card-sm       { max-width: 380px; }
.dfi-card-md       { max-width: 600px; }
.dfi-card-lg       { max-width: 900px; }
.dfi-card-centered { align-items: center; }

.dfi-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-body-color);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
}

/* App store download badges */
.app-download-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-download-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.app-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: #000;
    color: #fff !important;
    text-decoration: none !important;
    padding: 0.5rem 1.125rem 0.5rem 0.875rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: opacity 0.15s ease;
    min-width: 150px;
}

.app-store-badge:hover { opacity: 0.82; }

.app-store-badge .material-symbols-outlined {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.app-store-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-store-badge-sub {
    font-size: 0.6rem;
    font-weight: 400;
    opacity: 0.85;
}

.app-store-badge-name {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Standard page heading */
.page-title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

/* Loading and empty states */
.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: var(--bs-secondary-color);
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.4;
}

/* Location card grid — wider minimum than nav cards to fit address content */
.location-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

/* Location card — left-aligned, built on .dfi-card */
.location-card {
    padding: 1.25rem !important;
    gap: 0.875rem !important;
}

.location-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-body-color);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.location-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--bs-body-color);
    text-decoration: none;
}

.location-info-row .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--bs-primary);
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1.4;
}

.location-phone:hover {
    color: var(--bs-primary) !important;
}

.location-directions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--bs-primary);
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: auto;
    transition: opacity 0.15s ease;
}

.location-directions-btn:hover { opacity: 0.85; }

.location-directions-btn .material-symbols-outlined { font-size: 1.1rem; }

/* Navigation card grid — use on any page to mirror the sidebar */
.nav-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bs-body-bg);
    border-radius: 12px;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    text-decoration: none !important;
    color: var(--bs-body-color) !important;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}

.nav-card-icon {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--bs-primary, #0d6efd);
}

.nav-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.nav-card-desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    line-height: 1.4;
}

/* Forgot password / forgot user ID shared styles */
.forgot-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-body-color);
}

.forgot-instructions {
    margin: 0;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    line-height: 1.5;
    text-align: center;
}

.forgot-success {
    color: var(--bs-success, #198754) !important;
}

.forgot-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.forgot-input { width: 100%; }
.forgot-btn   { width: 100%; margin-top: 0.5rem; }

.forgot-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    cursor: pointer;
    margin-top: 0.25rem;
}

.forgot-link:hover {
    text-decoration: underline;
    color: var(--bs-primary);
}

/* DFI Logo — SVG uses white fill, always needs a dark background */
.dfi-logo-container {
    background-color: #111;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dfi-logo {
    width: 200px;
    height: auto;
    display: block;
}
