:root {
    --safe-top: 20px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    overscroll-behavior-y: none;
}

body {
    background-color: #f6f8fb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

.table-responsive {
    overflow-x: auto;
}

.btn {
    min-height: 44px;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border-radius: 12px;
}

.btn-add-trip {
    font-size: 1rem;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
}

.page-size-select {
    width: auto;
    display: inline-block;
    margin-left: 10px;
}

@media (max-width: 991.98px) {
    html, body {
        width: 100%;
        height: 100%;
        overflow: hidden !important;
    }
    body.app-active {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        overflow: hidden !important;
    }
    body.app-active #appView:not(.hidden) {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #f6f8fb;
    }
    body.app-active #appView:not(.hidden) > #topNavbar {
        flex-shrink: 0;
        position: relative !important;
        top: auto !important;
        width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    body.app-active #appView:not(.hidden) > #topNavbar > .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
    }
    body.app-active #appView:not(.hidden) > #mainContainer {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100% !important;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: 24px;
        margin-top: 0 !important;
        padding-top: 12px;
    }
    body.app-active.is-captain #appView:not(.hidden) > #mainContainer {
        padding-bottom: 90px;
    }
}

@media (max-width: 576px) {
    .display-6 {
        font-size: 1.5rem;
    }
    .btn {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    .card h5 {
        font-size: 1rem;
    }
    .btn-add-trip {
        font-size: 1.1rem;
        padding: 10px 18px;
    }
}