.btn-outline-secondary {
    padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
    color: white !important;
}

#ui-datepicker-div {
    z-index: 2 !important;
}

.select2-container {
    max-width: 100%;
}

/* 手機版優化 */
@media (max-width: 768px) {
    /* 頁面標題 */
    .page-title-wrapper {
        padding: 0.75rem 0;
        border-bottom: 3px solid #004767;
        margin-bottom: 1rem;
    }

        .page-title-wrapper h2 {
            font-size: 1.5rem;
        }

    /* 過濾卡片 */
    .filter-card {
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 71, 103, 0.08);
        background: #ffffff;
        padding: 1rem !important;
    }

        .filter-card .form-label {
            font-weight: 600;
            color: #004767;
            margin-bottom: 0.4rem;
            font-size: 0.9rem;
        }

        .filter-card .form-control {
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            padding: 0.6rem 0.7rem;
            transition: all 0.2s;
            font-size: 0.9rem;
        }

            .filter-card .form-control:focus {
                border-color: #004767;
                box-shadow: 0 0 0 3px rgba(0, 71, 103, 0.1);
            }

        /* Select2 樣式 */
        .filter-card .select2-container {
            width: 100% !important;
        }

            .filter-card .select2-container .select2-selection--single {
                border: 2px solid #e5e7eb;
                border-radius: 8px;
                padding: 0.35rem 0.7rem;
                height: auto;
                min-height: 40px;
                transition: all 0.2s;
            }

        .filter-card .select2-container--bootstrap-5 .select2-selection {
            font-size: 0.9rem;
        }

        .filter-card .select2-container .select2-selection--single .select2-selection__rendered {
            line-height: 1.5;
            padding-left: 0;
            color: #374151;
        }

        .filter-card .select2-container .select2-selection--single .select2-selection__arrow {
            height: 100%;
            right: 8px;
        }

        .filter-card .select2-container--bootstrap-5.select2-container--focus .select2-selection,
        .filter-card .select2-container--bootstrap-5.select2-container--open .select2-selection {
            border-color: #004767;
            box-shadow: 0 0 0 3px rgba(0, 71, 103, 0.1);
        }

    /* Select2 下拉選單 */
    .select2-dropdown {
        border: 2px solid #004767;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 71, 103, 0.15);
    }

    .select2-container--bootstrap-5 .select2-dropdown .select2-results__option {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .select2-container--bootstrap-5 .select2-dropdown .select2-results__option--highlighted {
        background-color: #f0f9ff;
        color: #004767;
    }

    .select2-container--bootstrap-5 .select2-dropdown .select2-results__option--selected {
        background-color: #004767;
        color: white;
    }

    /* 按鈕 */
    .btn-outline-secondary {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 8px;
        border-width: 2px;
        font-weight: 600;
        transition: all 0.2s;
    }

        .btn-outline-secondary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

    .btn-primary {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.2s;
    }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 71, 103, 0.3);
        }

    /* 毛寶貝卡片 */
    .card {
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
    }

        .card:hover {
            border-color: #004767;
            box-shadow: 0 8px 16px rgba(0, 71, 103, 0.15);
        }

    .card-img-container {
        border-bottom: 2px solid #e5e7eb;
    }

    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }

    .card-text {
        line-height: 1.6;
    }

        .card-text small {
            font-size: 0.85rem;
        }

    /* 載入動畫 */
    .spinner-border {
        width: 3rem;
        height: 3rem;
        border-width: 0.3rem;
    }
}

@media (max-width: 576px) {
    .select2-container {
        width: 100%;
    }

    .page-title-wrapper {
        padding: 0.75rem 0;
    }

        .page-title-wrapper h2 {
            font-size: 1.35rem;
        }

    .filter-card {
        border-radius: 10px;
    }

    .card {
        border-radius: 10px;
    }

    /* 按鈕在手機上全寬度 */
    .btn-outline-secondary,
    .btn-primary {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* 卡片在小螢幕上單列顯示 */
    .col-md-4 {
        margin-bottom: 1rem;
    }
}
