body {
    background-color: #f8f9fa;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-clickable:active {
    transform: translateY(0);
}

.navbar-brand {
    font-weight: bold;
}

/* Flashing animation for maintenance alerts */
@keyframes flash-danger {
    0%, 100% { background-color: #dc3545; color: #fff; }
    50% { background-color: #ff0000; color: #fff; }
}

@keyframes flash-warning {
    0%, 100% { background-color: #ffc107; color: #000; }
    50% { background-color: #ffff00; color: #000; }
}

.table-danger {
    background-color: #f8d7da !important;
}

.table-warning {
    background-color: #fff3cd !important;
}

/* Mobile optimizations */
@media (max-width: 767.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 80px; /* Space for sticky footer */
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    /* Don't make all buttons full-width, only specific ones */
    .btn-mobile-full {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    /* Better table action buttons on mobile */
    .table .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        margin: 2px;
    }

    /* Stack action buttons vertically on mobile */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .form-control, .form-select {
        font-size: 1rem;
        min-height: 48px; /* Better tap target */
    }

    .alert {
        font-size: 0.9rem;
    }

    /* Form improvements */
    .form-label {
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    /* Better spacing for form rows */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 0.75rem;
    }

    /* Larger checkboxes for mobile */
    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    /* Page title sizing */
    h1, h2, h3 {
        font-size: 1.5rem;
    }

    h4, h5 {
        font-size: 1.1rem;
    }
}

/* Sticky bottom navigation for back button */
.sticky-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Floating back button for larger screens */
.sticky-back-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1050;
}

.sticky-bottom-nav .btn {
    width: 100%;
}

/* Hide sticky nav on desktop */
@media (min-width: 768px) {
    .sticky-bottom-nav {
        display: none;
    }
    
    .container {
        padding-bottom: 0;
    }
}

/* Form card styling */
.form-card {
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.form-card .card-body {
    padding: 1.25rem;
}

/* Ensure mobile action buttons sit above sticky nav and receive taps */
.mobile-action-btn {
    position: relative;
    z-index: 2000 !important;
    pointer-events: auto !important;
}

/* Lower sticky nav z-index slightly so action buttons can overlay it */
.sticky-bottom-nav {
    z-index: 900;
}

