/* 보험 서비스 대시보드 - 5개 페이지 공통 */

/* 좌측 상담 <- 버튼 심플 CSS (회색톤, 흰배경, 테두리) */
.insu-dashboard-page .back-btn {
    background: #fff;
    border: 1px solid #4c4c4c;
    border-radius: 8px;
    color: #4c4c4c;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.insu-dashboard-page .back-btn:hover {
    background: #f5f5f5;
    border-color: #333;
    color: #333;
}

/* 좌측 input/select 박스 - 테두리 */
.insu-dashboard-page .search-sidebar .form-control,
.insu-dashboard-page .search-sidebar input[type="text"],
.insu-dashboard-page .search-sidebar select,
.insu-dashboard-page .search-sidebar input.form-control {
    border: 2px solid #4c4c4c !important;
}

/* 대시보드 버튼 영역 - 좌측 사이드바 내 */
.insu-services-dashboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.insu-dashboard-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.insu-dashboard-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.insu-dashboard-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.insu-dashboard-btn i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* 모바일: 상단 카테고리 버튼 - 1줄 가로 배치
 * 패딩: 고객센터/손보방문센터는 search-results-area에서 15px 적용 → 대시보드 0
 *       청구서류/보험사약관/카드무이자는 각 div별 15px → 대시보드 15px */
.insu-services-dashboard-mobile {
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 10px 15px;
    margin: 0 0 12px 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-bottom: 2px solid #e5e7eb;
}

.insu-services-dashboard-mobile::-webkit-scrollbar {
    height: 0;
    display: none;
}

.insu-services-dashboard-mobile .insu-dashboard-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
    padding: 8px 6px;
    font-size: 11px;
    gap: 4px;
}

.insu-services-dashboard-mobile .insu-dashboard-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.insu-services-dashboard-mobile .insu-dashboard-btn i {
    font-size: 14px;
    flex-shrink: 0;
}

/* 모바일 공통: 5개 페이지 헤더 좌(뒤로가기) · 중앙(타이틀) · 우(FC홈) */
.insu-dashboard-page .insu-link-mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}
.insu-dashboard-page .insu-link-mobile-header-inner > div[class*="header-title"] {
    flex: 1;
    min-width: 0;
}
.insu-dashboard-page .insu-link-mobile-back {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.insu-dashboard-page .insu-link-mobile-back:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}
.insu-dashboard-page .insu-link-mobile-fchome {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.insu-dashboard-page .insu-link-mobile-fchome:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

@media (max-width: 768px) {
    .insu-dashboard-page .main-content {
        margin-top: 25px !important;
    }
    .insu-services-dashboard:not(.insu-services-dashboard-mobile) {
        display: none !important;
    }
    /* 1줄 5개 버튼 - grid로 균등 배치
     * 청구서류/보험사약관/카드무이자: 컨테이너 0 → 각 div 15px 패딩 */
    .insu-services-dashboard.insu-services-dashboard-mobile {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 4px;
        padding: 10px 15px !important;
    }
    /* 고객센터/손보방문센터: search-results-area 전체 15px → 대시보드 좌우 0 */
    .callcenter-page .insu-services-dashboard-mobile,
    .visit-centers-page .insu-services-dashboard-mobile {
        padding: 10px 0 !important;
    }
    .insu-services-dashboard-mobile .insu-dashboard-btn {
        flex: none;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
        padding: 5px 0;
        font-size: 12px;
    }
    .insu-services-dashboard-mobile .insu-dashboard-btn i {
        font-size: 14px;
    }
}

/* 매우 좁은 화면에서도 1줄 유지 */
@media (max-width: 400px) {
    .insu-services-dashboard-mobile .insu-dashboard-btn {
        padding: 6px 2px;
        font-size: 11px;
    }
    .insu-services-dashboard-mobile .insu-dashboard-btn i {
        font-size: 13px;
    }
}
