html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #005192;
}

.btn-primary {
    color: #fff;
    background-color: #005192;
    border-color: #004080;
}

.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 rgba(0, 81, 146, 0.5);
}

.content {
    padding-top: 1.1rem;
}

/* Mobile-first layout styles - consistent across all screen sizes */
.page.mobile-first {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mobile-header {
    background-color: #001438;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header .navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}

.mobile-header .navbar-brand:hover {
    color: #ffffff;
}

.mobile-header .header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mobile-main {
    flex: 1;
    overflow-y: auto;
}

.mobile-main .content {
    padding: 1rem;
    max-width: 100%;
}

/* Mobile-friendly delivery cards */
.delivery-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.delivery-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.delivery-card:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.delivery-card h6 {
    color: #495057;
    font-size: 1rem;
}

.delivery-card .text-dark, .text-warning, .text-danger, .text-info {
    font-size: 0.8rem;
}

/* Depot breakdown styling */
.depot-breakdown {
    background: #fff;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.depot-line {
    background: #fff;
    transition: background-color 0.2s ease;
}

.depot-line:hover {
    background: #f8f9fa;
}

.depot-line:last-child {
    border-bottom: none !important;
}

.depot-info {
    flex: 1;
    min-width: 0;
}

.depot-name {
    margin-bottom: 0.25rem;
}

.depot-name .badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.depot-details {
    line-height: 1.2;
}

.depot-details strong {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.depot-details small {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .depot-name .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .depot-details strong {
        font-size: 1rem;
    }
    
    .depot-details small {
        font-size: 0.75rem;
    }
}


/* Icon-only buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-icon i {
    margin: 0;
}

.depot-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.depot-badges .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* User menu dropdown styles */
.dropdown-menu {
    min-width: 220px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.text-danger:hover {
    background-color: #f8d7da;
}

.dropdown-header {
    font-size: 0.875rem;
    color: #6c757d;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-weight: 600;
}

.dropdown-divider {
    margin: 0.25rem 0;
}

/* Cog button styling */
.btn-cog {
    border: none;
    background: none;
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-cog:hover {
    color: #61b729;
    background-color: #f8f9fa;
}

.btn-cog:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 81, 146, 0.25);
}

/* Compact cog button styling for header icons */
.btn-cog-compact {
    border: none;
    background: none;
    color: #ffffff;
    padding: 0.25rem 0.375rem !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-cog-compact:hover {
    color: #61b729;
    background-color: rgba(248, 249, 250, 0.1);
}

.btn-cog-compact:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 81, 146, 0.25);
}

/* Blinking animation for pending users */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.blink-animation {
    animation: blink 1s infinite;
}

/* Responsive adjustments for all screen sizes */
@media (max-width: 576px) {
    .mobile-header .navbar-brand {
        font-size: 1.1rem;
    }
    
    .mobile-main .content {
        padding: 0.75rem;
    }
    
    .dropdown-menu {
        min-width: 200px;
    }
    
    .delivery-card {
        padding: 0.75rem;
    }
    
    .delivery-card h6 {
        font-size: 0.9rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .mobile-main .content {
        padding: 1rem;
    }
    
    .delivery-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (min-width: 769px) {
    .mobile-main .content {
        padding: 1.5rem;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .delivery-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .mobile-main .content {
        padding: 2rem;
    }
    
    .delivery-cards {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 1.5rem;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #61b729;
}

.invalid {
    outline: 1px solid #dd401d;
}

.validation-message {
    color: #dd401d;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
}

.app-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: app-spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes app-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.app-loading-text {
    margin-top: 2rem;
    font-size: 1.25rem;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

code {
    color: #c02d76;
}

.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;
}

/* ========================================
   CONSOLIDATED PAGE STYLES
   ======================================== */

/* Card Headers - Navy Blue Theme */
.card-header {
    background-color: #001438 !important;
    color: white !important;
}

.card-header h5,
.card-header .badge {
    color: white !important;
}

/* Sortable Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.sortable-header:hover {
    background-color: rgba(0, 81, 146, 0.1);
}

/* Sort Buttons */
.sort-button {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.sort-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sort-button.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

/* Dropdown Active Item Hover Fix */
.dropdown-item.active:hover {
    color: #fff !important;
    background-color: #005192;
}

/* Progress Bar Animations */
.progress-bar {
    transition: width 0.6s ease-in-out;
    animation: progressPulse 0.3s ease-in-out;
}

.progress {
    background-color: #e9ecef;
    border-radius: 4px;
}

@keyframes progressPulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

/* Disabled Buttons in Flex Columns */
.d-flex.flex-column .btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner Animation */
.bi-hourglass-split {
    animation: spin 1s linear infinite;
}

/* Expandable Row Styles */
tr[style*="cursor: pointer"] {
    transition: background-color 0.2s ease;
}

tr[style*="cursor: pointer"]:hover {
    background-color: rgba(0, 81, 146, 0.05);
}

.bi-chevron-right, .bi-chevron-down {
    transition: transform 0.2s ease;
    color: #6c757d;
}

/* Hide Table Headers (Delivery Page Only) */
.delivery-page thead,
.delivery-page thead.table-light,
.delivery-page thead.sticky-top {
    display: none !important;
}

/* Show Table Headers on Claims Page */
.claims-page thead,
.claims-page thead.table-light,
.claims-page thead.sticky-top {
    display: table-header-group !important;
}

/* Dropdown Z-Index Fix */
.dropdown-menu-high-z {
    z-index: 1050 !important;
}

/* Mobile-Friendly Depot Buttons */
@media (max-width: 768px) {
    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .btn-group .btn .badge {
        font-size: 0.7rem;
    }
    
    /* Compact summary stats on mobile */
    .border-end {
        border-right: 1px solid #dee2e6;
    }
}

@media (max-width: 576px) {
    .border-end {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .border-end:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    /* Make depot buttons even more compact on very small screens */
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .btn-group .btn .bi-building {
        display: none; /* Hide building icon on very small screens */
    }
}

/* Wizard Steps (Claims Page) */
.wizard-step {
    display: inline-block;
    text-align: center;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: bold;
    border: 2px solid #dee2e6;
}

.wizard-step.active .wizard-step-number {
    background-color: #005192;
    color: white;
    border-color: #005192;
}

.wizard-step.completed .wizard-step-number {
    background-color: #61b729;
    color: white;
    border-color: #61b729;
}

.wizard-step.completed .wizard-step-number::before {
    content: "✓";
}

.wizard-line {
    height: 2px;
    background-color: #dee2e6;
    flex: 1;
    margin: 0 1rem;
    align-self: center;
    margin-bottom: 2rem;
}

.wizard-line.completed {
    background-color: #61b729;
}

/* Small Loader (Register/Admin Pages) */
.small-loader {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: small-spin 1s linear infinite;
}

@keyframes small-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Stat icon background styling */
.stat-icon-bg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}
